@knkcs/contenthub-ui 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +4 -4
- package/dist/{branch-content-fields-BQG6U0yl.js → branch-content-fields-CMa-BJa2.js} +2 -2
- package/dist/{branch-content-fields-BQG6U0yl.js.map → branch-content-fields-CMa-BJa2.js.map} +1 -1
- package/dist/{content-library-DFIk09bD.js → content-library-C5MCRNY0.js} +607 -387
- package/dist/content-library-C5MCRNY0.js.map +1 -0
- package/dist/{heads-DqHmAW0n.js → heads-BT8RZ-Gs.js} +19 -13
- package/dist/heads-BT8RZ-Gs.js.map +1 -0
- package/dist/index.d.ts +616 -50
- package/dist/index.js +3957 -3173
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +226 -28
- package/dist/testing.js +873 -609
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/content-library-DFIk09bD.js.map +0 -1
- package/dist/heads-DqHmAW0n.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.0](https://github.com/knkCS/contenthub/compare/contenthub-ui-v0.5.0...contenthub-ui-v0.6.0) (2026-10-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* a Required Check's "every Blueprint" is the explicit every_blueprint field; empty blueprint_accessors without it, or accessors with it, are refused with InvalidArgument. A write adding an accessor that names no non-archived content Blueprint is refused (ADR 0023).
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* pick a required check's blueprints from the catalogue ([#300](https://github.com/knkCS/contenthub/issues/300)) ([#309](https://github.com/knkCS/contenthub/issues/309)) ([8bc8027](https://github.com/knkCS/contenthub/commit/8bc80277198d765c816fec819a43bc4e2b8a71f0))
|
|
13
|
+
* refuse a blueprint accessor that names no blueprint on write ([#303](https://github.com/knkCS/contenthub/issues/303)) ([#313](https://github.com/knkCS/contenthub/issues/313)) ([49b3914](https://github.com/knkCS/contenthub/commit/49b391400dd23376e977c2e10ab75cec542f3028))
|
|
14
|
+
* **ui:** pick an editing override's blueprint, and new content's, with one select ([#302](https://github.com/knkCS/contenthub/issues/302)) ([#312](https://github.com/knkCS/contenthub/issues/312)) ([5f27f6c](https://github.com/knkCS/contenthub/commit/5f27f6c922b18325c583464c7c14524f7919c57a))
|
|
15
|
+
|
|
16
|
+
## [0.5.0](https://github.com/knkCS/contenthub/compare/contenthub-ui-v0.4.0...contenthub-ui-v0.5.0) (2026-10-14)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* direct edit on dated content ([#270](https://github.com/knkCS/contenthub/issues/270)) ([#293](https://github.com/knkCS/contenthub/issues/293)) ([f324a73](https://github.com/knkCS/contenthub/commit/f324a735d338a91a256fc9d2a3ec70a1da1b086a))
|
|
22
|
+
* force an editing block, and set the force group ([#269](https://github.com/knkCS/contenthub/issues/269)) ([#289](https://github.com/knkCS/contenthub/issues/289)) ([ea774d7](https://github.com/knkCS/contenthub/commit/ea774d746d1fc3f8504d192efaccf351dd1b2bbc))
|
|
23
|
+
* save & publish, the publish dialog, checks and compare for a direct edit ([#266](https://github.com/knkCS/contenthub/issues/266)) ([#282](https://github.com/knkCS/contenthub/issues/282)) ([d8fe67a](https://github.com/knkCS/contenthub/commit/d8fe67aca90da9e448d20dc7d8103be9c9040e62))
|
|
24
|
+
* set an editing block when a direct edit opens ([#267](https://github.com/knkCS/contenthub/issues/267)) ([#279](https://github.com/knkCS/contenthub/issues/279)) ([37a9977](https://github.com/knkCS/contenthub/commit/37a9977466edc1e2c1d1a8341c3173d75a17a88e))
|
|
25
|
+
* update a direct edit behind main and resolve its merge in place ([#268](https://github.com/knkCS/contenthub/issues/268)) ([#283](https://github.com/knkCS/contenthub/issues/283)) ([9c39762](https://github.com/knkCS/contenthub/commit/9c39762086cc0dc7098f163ab5c46ee75cc97ffb))
|
|
26
|
+
|
|
3
27
|
## [0.4.0](https://github.com/knkCS/contenthub/compare/contenthub-ui-v0.3.1...contenthub-ui-v0.4.0) (2026-10-14)
|
|
4
28
|
|
|
5
29
|
|
package/README.md
CHANGED
|
@@ -4,17 +4,17 @@ contenthub's screens for knk hosts (contenthub ADR 0020, knkcms/core ADR 0003).
|
|
|
4
4
|
|
|
5
5
|
The package exports screens only, never routes:
|
|
6
6
|
|
|
7
|
-
- `ContenthubSettings`: the workspace's configuration on one settings page of four tabs, chosen by `?tab=` (`required-checks`, `block-reasons`, `editing`, `collections`), so it needs a router. Required Checks are declared and edited in a Modal (name, scope, Blueprints by accessor
|
|
7
|
+
- `ContenthubSettings`: the workspace's configuration on one settings page of four tabs, chosen by `?tab=` (`required-checks`, `block-reasons`, `editing`, `collections`), so it needs a router. Required Checks are declared and edited in a Modal (name, scope, every Blueprint or the Blueprints picked from contenthub's catalogue, not yet released ones included, stored by accessor (ADR 0023), independent); the table and the Modal name each Blueprint, marking one since archived and an accessor of no Blueprint, both removable, and a Blueprint contenthub refuses on save is said on the Blueprint field, by accessor (`BlueprintAccessorsRefusedError`); who records each is read from contenthub (every member, until narrowed) and narrowed from its row to named members from the host's members, adding oneself (break-glass) included, or opened to every member again; in `authz.mode: workspace` every member records every check, and the tab says so and offers no recorders editor. Block Reasons are listed, created, renamed and removed. Editing shows the workspace's Editing Mode, Editing Block and Force Group (ADR 0022; the admins, and the people named beside them from the host's members), changed in a Modal, above a table of the per-Blueprint overrides, each Blueprint with the values its Content gets and a field left to the workspace marked as its default; overrides are added by picking a Blueprint from contenthub's catalogue (not yet released ones included, none that has an override already; stored by accessor, ADR 0023), changed (the Blueprint stays as it is; one contenthub refuses on save is said on the Blueprint field) and removed, the table and the Modal naming each Blueprint and marking one since archived and an accessor of no Blueprint, so a stale override is seen and removable, and an override may give a Blueprint a Force Group of its own. Collections are the tree in order, created, renamed, moved and removed; restricted (making the admin its owner) and unrestricted, each confirmed, the unrestrict as an acknowledged disclosure; and a Restricted Collection's grants are managed from the host's members, granting oneself (break-glass) included. In `authz.mode: workspace` contenthub refuses restriction, and the tab then says it needs guardian mode.
|
|
8
8
|
- `BlockReasonsSettings`: the Block Reasons on a page of their own, for a host that mounts them apart from `ContenthubSettings`.
|
|
9
9
|
- `ContentLibrary`: the Collection tree in `SubNavLayout.Nav` beside the Content table, narrowing together with the toolbar's search, view (Main, In Force, a Change Set) and Blueprint filters; the selected Collection is the URL's `?collection=`, so it needs a router. Rows call `onOpenContent({ contentId, changeSetId? })`; New Content creates a Content in an open or new Change Set and calls `onOpenBranch`.
|
|
10
|
-
- `ContentPage`: one Content, read on Main or (`changeSetId`) inside the Change Set it was born in, in tabs Data (read-only, through fieldkit's read mode, loaded lazily), Releases (on Dated Content each Release offers Change validity, which corrects its dates in one request, wherever the Blueprint's effective Editing Mode allows a Direct Edit), Revisions (with Compare), References, Change Sets and Filing. The header's one Save sets Filing (Collections, assignees) and never writes a Revision. Its rail offers Edit and Start editing as the Editing Mode in effect for the Content's Blueprint says (ADR 0022: Edit alone, both, or Start editing alone; Dated Content
|
|
10
|
+
- `ContentPage`: one Content, read on Main or (`changeSetId`) inside the Change Set it was born in, in tabs Data (read-only, through fieldkit's read mode, loaded lazily), Releases (on Dated Content each Release offers Change validity, which corrects its dates in one request, wherever the Blueprint's effective Editing Mode allows a Direct Edit), Revisions (with Compare), References, Change Sets and Filing. The header's one Save sets Filing (Collections, assignees) and never writes a Revision. Its rail offers Edit and Start editing as the Editing Mode in effect for the Content's Blueprint says (ADR 0022: Edit alone, both, or Start editing alone; on Dated Content Edit first asks when the change takes effect, today by default, unless the caller's open Direct Edit is the one it returns), Duplicate, Repeal or Withdraw, Block or Unblock, and Archive (only once nothing is In Force today or later) or Unarchive; Start editing and Duplicate end in `onOpenBranch`; Edit opens the caller's Direct Edit, or finds it open, and ends in `onOpenChangeSet`, so Edit is offered only with it. While the caller has an open Direct Edit of the Content the page says so and leads back to it. While another editor's Direct Edit holds the Content's Editing Block, the page says "Being edited by" them and since when, and offers no Edit; to a member of the Force Group in effect for the Blueprint (which `getEffectiveEditingSettings` reports as `callerInForceGroup`) the banner offers Force, which asks first, naming whose work it takes over, and then leaves the caller with the Direct Edit as their own; Block, Unblock and the Blocked badge are the editor's Block's alone and leave the Editing Block be. The Change Sets tab names each open Direct Edit's editor, and `onOpenContent` and `onOpenChangeSet` open the rows of its References and Change Sets tabs. It needs `@knkcs/fieldkit` as a peer.
|
|
11
11
|
- `ChangeSetsIndex`: the workspace's Change Sets, narrowed by kind (Direct Edits hidden until asked for), state and assignee, created in a Modal; `onOpenChangeSet(id)` opens one, a new one too.
|
|
12
12
|
- `ChangeSetPage`: one Change Set, its General tab (name and Source while it is open, status label, assignees, dependencies) saved from the header's one Save; its Contents tab, whose rows call `onOpenBranch({ changeSetId, contentId, branchId })`; its Releases tab (Planned Releases, proposals read-only, the Releases they cover) and its Checks tab (each Required Check's latest result, stale or not, and Record). Its rail holds Publish, Update from Main and Discard, and an About section with the readiness tile (`ValidatePublish` at the current heads), the status label and the Source; Publish opens a review that publishes exactly the heads it shows. `onPublished` and `onDiscarded` tell the host. Its leave guard needs a data router (react-router's `useBlocker`). A Change Set that is a Direct Edit shows as `DirectEditPage` instead.
|
|
13
|
-
- `DirectEditPage`: a Direct Edit (ADR 0022), as its editor sees it: the Content's fields in the Branch editor's form with the header's one
|
|
13
|
+
- `DirectEditPage`: a Direct Edit (ADR 0022), as its editor sees it: the Content's fields in the Branch editor's form with the header's Save and, beside it, Save & publish (the draft saved and published in one request, refused as a whole), Publish and Discard in the rail (Publish asks for unsaved edits to be saved first; Discard asks first), a Compare tab against the Revision it forked from, and a Checks tab with its Required Checks and Record. Publish and Save & publish go through a dialog when the Blueprint Release declares Release Spec Fields, prefilled with each Field's declared default, and the dialog lists every refusal of a Publish (its blockers, refused values, a Block). On Dated Content (#270) both always go through it: it shows the Release's Validity Period with its last day editable (a correction keeps the corrected wording's, a later day starts a new wording), the date-only Releases contenthub computes, read-only (`previewDirectEditPublish`), and one question per later wording, whether the change carries into it, answered before Publish; a period that would cover a Release entirely is shown refused, pointing to a Change Set. While a Change Set published past it leaves it behind Main, the screen says so (`ValidatePublish` at its head), and neither Publish nor Save & publish is offered: Update from Main stands in the rail where Publish was, and where both sides changed a field, Resolve merge takes its place and resolves the Pending Merge field by field, or aborts it, in the Direct Edit itself. No Change Set, Chain, Branch or Release tab. `onPublished` and `onDiscarded` tell the host. `ChangeSetPage` renders it for a Direct Edit, so a host needs no route of its own.
|
|
14
14
|
- `BranchEditor`: one Content inside a Change Set at one Branch (`changeSetId`, `contentId`, `branchId`), its header tabs chosen by `?tab=`. It reads the Content at that Branch's own head (`GetContent` with `branch_id`); only the Chain's last Branch is edited, and an earlier one shows read-only. The Content tab renders the Blueprint Release's form through fieldkit's `SpecForm`, with knkeditor for rich text, both loaded lazily; reference fields search contenthub, media fields use the `MediaSource` port. The forms above the tabs are the drafts (fieldkit's "Consumer-owned Save across unmounting tabs"): the Content's, and the Release tab's Planned Release (Validity Period, supersedes, Release Spec values; the Change Set's proposals beside it, read-only). The header's one Save persists every changed tab: one `SaveRevision` on the head the editor loaded, with a field mask of what changed, then `PlanRelease` or `UpdatePlannedRelease`; a refused save sends no plan, and a refused plan leaves only the Release tab changed. A moved head is refused with Reload, never merged; the leave guard needs a data router. Compare shows the head against its fork or Main, References its outgoing edges and outdated pins. The rail offers Update from Main and the merge resolution it may leave, Compare to the fork, Preview, Append a Branch (`onOpenBranch` opens it) and Drop Chain (`onDeleted` leaves), and shows the fork Release, the effective date, the Chain position and the head. It needs `@knkcs/fieldkit` (0.18), `@knkcms/knkeditor-editor` and `@knkcms/knkeditor-vocabulary` (GitHub Packages) as peers.
|
|
15
15
|
- `MediaSource`, the port a host fills with mediahub, in fieldkit's media-adapter shape (ADR 0020). Without it a media field offers nothing to pick.
|
|
16
16
|
- `StatusSource`, the port a host fills with statushub for Change Set status labels (ADR 0020). Without it the screens show the bare slug and offer no status picker. A status it answers with `isDefault` (statushub's default) is what a Change Set without a status reads as (ADR 0014 D9); a host should pass it on.
|
|
17
|
-
- `BlueprintSource`: content Blueprints and their Releases, for New Content, Blueprint names and the Library's Blueprint filter, which offers the Blueprints of the listed Content too, archived ones included (#241). Not a port a host fills: contenthub serves them itself (`BlueprintCatalogService`), because blueprinthub is its direct dependency (ADR 0020 as amended, #238), so every screen reads them through its `ContenthubClient`. A host may pass its own, which only tests need. A Release contenthub refuses is offered disabled in New Content, with its reasons.
|
|
17
|
+
- `BlueprintSource`: content Blueprints and their Releases, for New Content, Blueprint names (by id, or by accessor for configuration, ADR 0023), the one Blueprint select of New Content (by id), the Required Checks and the Editing Overrides (by accessor), and the Library's Blueprint filter, which offers the Blueprints of the listed Content too, archived ones included (#241). Not a port a host fills: contenthub serves them itself (`BlueprintCatalogService`), because blueprinthub is its direct dependency (ADR 0020 as amended, #238), so every screen reads them through its `ContenthubClient`. A host may pass its own, which only tests need. A Release contenthub refuses is offered disabled in New Content, with its reasons.
|
|
18
18
|
- `ContenthubClient`, the port every screen takes, and `createConnectContenthubClient({ baseUrl, fetch })`, its Connect implementation. `baseUrl` is `""` when contenthub serves the page, the mount prefix (`/api/contenthub`) under core.
|
|
19
19
|
- `ContenthubPathsProvider` and `ContenthubPaths`: where the host mounts the screens, for the breadcrumbs and links they draw. `contenthubSettings` is the settings page, whose tabs are `?tab=`; `contenthubSettingsPath(paths, tab)` builds a link to one.
|
|
20
20
|
- `contenthubTranslations`, the `{ namespace, resources }` a host merges (en and de), with `CONTENTHUB_UI_NS` for its namespace list (core ADR 0005).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "./content-library-
|
|
1
|
+
import { r as e } from "./content-library-C5MCRNY0.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
import { FieldKitProvider as r, SpecForm as i } from "@knkcs/fieldkit/renderer";
|
|
@@ -83,4 +83,4 @@ function d({ client: e, changeSetId: a, branchId: o, fields: s, parts: c, labels
|
|
|
83
83
|
//#endregion
|
|
84
84
|
export { d as default };
|
|
85
85
|
|
|
86
|
-
//# sourceMappingURL=branch-content-fields-
|
|
86
|
+
//# sourceMappingURL=branch-content-fields-CMa-BJa2.js.map
|
package/dist/{branch-content-fields-BQG6U0yl.js.map → branch-content-fields-CMa-BJa2.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-content-fields-
|
|
1
|
+
{"version":3,"file":"branch-content-fields-CMa-BJa2.js","names":["contentLabel","MAX_PAGE","itemOf","data","id","blueprintId","branchAdapters","wanted","page","page_size","list","client","query","blueprintIds","excluded","excludeIds","seen","items","c","start","total","ids","detail","contentId","mediaSource","file","filter","plugins","builtInFieldTypes","p","knkRichTextPlugin","BranchContentFields","adapters","useMemo","changeSetId","FieldKitProvider","SpecForm","fields","branchId"],"sources":["../src/screens/branch-adapters.ts","../src/screens/branch-content-fields.tsx"],"sourcesContent":["// fieldkit's adapters for the Branch editor (ADR 0020): references from\n// contenthub's own reads, media through the host's MediaSource port. Types\n// only from fieldkit, so this module adds nothing to the root bundle.\nimport type { FieldKitAdapters, PinTarget, ReferenceItem } from \"@knkcs/fieldkit/renderer\";\nimport type { ContenthubClient } from \"../client/contenthub-client\";\nimport type { MediaSource } from \"../types\";\nimport { contentLabel } from \"./content-library\";\n\n/** The most rows one search asks for: ListContents' own cap. */\nconst MAX_PAGE = 200;\n\n/** What a picker shows for a Content: its label, or its id when its data has none. */\nfunction itemOf(id: string, blueprintId: string, data: Record<string, unknown>): ReferenceItem {\n\treturn { id, display_name: contentLabel(data) || id, blueprint_id: blueprintId };\n}\n\n/**\n * The adapters a Branch's form gets: `reference` searches contenthub's\n * Editor Search on Main (which reads open Branch heads too, so Content born\n * in an open Change Set is found), names a referenced Content from its read\n * and offers its Releases to pin; `media` is the host's MediaSource, absent\n * when the host has none, which leaves a media field nothing to pick.\n */\nexport function branchAdapters({\n\tclient,\n\tchangeSetId,\n\tmediaSource,\n}: {\n\tclient: ContenthubClient;\n\tchangeSetId: string;\n\tmediaSource?: MediaSource;\n}): FieldKitAdapters {\n\treturn {\n\t\treference: {\n\t\t\tasync search({ query, blueprintIds, excludeIds, page, page_size }) {\n\t\t\t\tconst wanted = Math.min(MAX_PAGE, Math.max(1, page) * Math.max(1, page_size));\n\t\t\t\t// Every target Blueprint at once: the service narrows the page, so\n\t\t\t\t// it holds only what the Field may point at, and paging stays exact.\n\t\t\t\tconst list = await client.listContents({\n\t\t\t\t\tsearch: query.trim() || undefined,\n\t\t\t\t\tblueprintIds: blueprintIds.length > 0 ? blueprintIds : undefined,\n\t\t\t\t\tpageSize: wanted,\n\t\t\t\t});\n\t\t\t\tconst excluded = new Set(excludeIds ?? []);\n\t\t\t\tconst seen = new Set<string>();\n\t\t\t\tconst items: ReferenceItem[] = [];\n\t\t\t\t// A search lists a Content once per head that matched: one row each.\n\t\t\t\tfor (const c of list.contents) {\n\t\t\t\t\tif (seen.has(c.id) || excluded.has(c.id)) continue;\n\t\t\t\t\tseen.add(c.id);\n\t\t\t\t\titems.push(itemOf(c.id, c.blueprintId, c.data));\n\t\t\t\t}\n\t\t\t\tconst start = (Math.max(1, page) - 1) * page_size;\n\t\t\t\t// The total is exact on the last page; otherwise there is at least one more.\n\t\t\t\tconst total = list.nextPageToken ? items.length + 1 : items.length;\n\t\t\t\treturn { items: items.slice(start, start + page_size), total };\n\t\t\t},\n\t\t\tasync fetch(ids) {\n\t\t\t\treturn Promise.all(\n\t\t\t\t\tids.map(async (id) => {\n\t\t\t\t\t\t// Published Content reads on Main; Content born in this\n\t\t\t\t\t\t// Change Set exists only there.\n\t\t\t\t\t\tconst detail = await client\n\t\t\t\t\t\t\t.getContent({ id })\n\t\t\t\t\t\t\t.catch(() => client.getContent({ id, changeSetId }))\n\t\t\t\t\t\t\t.catch(() => undefined);\n\t\t\t\t\t\treturn detail\n\t\t\t\t\t\t\t? itemOf(id, detail.content.blueprintId, detail.content.data)\n\t\t\t\t\t\t\t: { id, display_name: id };\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t},\n\t\t\t// A Pin names a Release (the one pinning kind fieldkit has), newest first.\n\t\t\tasync listPinTargets(contentId) {\n\t\t\t\tconst timeline = await client.getTimeline(contentId);\n\t\t\t\treturn [...timeline.entries].reverse().map(\n\t\t\t\t\t(e): PinTarget => ({\n\t\t\t\t\t\tid: e.releaseId,\n\t\t\t\t\t\tlabel: `#${e.ordinal}`,\n\t\t\t\t\t\tdescription: e.validityPeriod\n\t\t\t\t\t\t\t? `${e.validityPeriod.firstDay} – ${e.validityPeriod.lastDay || \"…\"}`\n\t\t\t\t\t\t\t: e.publishTime.slice(0, 10),\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\tmedia: mediaSource\n\t\t\t? {\n\t\t\t\t\tupload: (file) => mediaSource.upload(file),\n\t\t\t\t\tbrowse: (filter) => mediaSource.browse(filter),\n\t\t\t\t}\n\t\t\t: undefined,\n\t};\n}\n","// fieldkit's renderer with knkeditor for rich text, behind a lazily loaded\n// module: both load the first time a Branch's Content tab is shown, never\n// with the rest of the package (spec #56; branch-editor-bundle.test.ts).\nimport { FieldKitProvider, SpecForm, type SpecFormLabels } from \"@knkcs/fieldkit/renderer\";\nimport { knkRichTextPlugin } from \"@knkcs/fieldkit/rich-text\";\nimport { builtInFieldTypes, type FieldTypePlugin, type Schema } from \"@knkcs/fieldkit/schema\";\nimport { useMemo } from \"react\";\nimport type { ContenthubClient } from \"../client/contenthub-client\";\nimport type { MediaSource, ResolvedField } from \"../types\";\nimport { branchAdapters } from \"./branch-adapters\";\n\n// rich_text through knkeditor (fieldkit ADR-0026); every other type as built in.\nconst plugins: FieldTypePlugin[] = builtInFieldTypes.map((p) =>\n\tp.id === \"rich_text\" ? (knkRichTextPlugin as FieldTypePlugin) : p,\n);\n\nexport interface BranchContentFieldsProps {\n\tclient: ContenthubClient;\n\tchangeSetId: string;\n\t/** The record the form holds, so SpecForm's remembered section is this Branch's. */\n\tbranchId: string;\n\tfields: ResolvedField[];\n\t/** The Resolved Release's parts: the Text Types its rich_text fields pin. */\n\tparts: Record<string, Record<string, unknown>>;\n\tlabels: SpecFormLabels;\n\treadOnly: boolean;\n\tmediaSource?: MediaSource;\n}\n\n/**\n * The Branch's data as the Blueprint Release lays it out, editable: its\n * sections, orientation and cards as fieldkit draws them, over the form the\n * editor holds above its tabs (fieldkit's spec-form.mdx, \"A Consumer-owned\n * Save across unmounting tabs\"). SpecForm keeps no draft of its own.\n */\nexport default function BranchContentFields({\n\tclient,\n\tchangeSetId,\n\tbranchId,\n\tfields,\n\tparts,\n\tlabels,\n\treadOnly,\n\tmediaSource,\n}: BranchContentFieldsProps) {\n\tconst adapters = useMemo(\n\t\t() => branchAdapters({ client, changeSetId, mediaSource }),\n\t\t[client, changeSetId, mediaSource],\n\t);\n\treturn (\n\t\t<FieldKitProvider plugins={plugins} adapters={adapters} parts={parts}>\n\t\t\t<SpecForm\n\t\t\t\tschema={fields as unknown as Schema}\n\t\t\t\tlabels={labels}\n\t\t\t\treadOnly={readOnly}\n\t\t\t\trecordKey={branchId}\n\t\t\t/>\n\t\t</FieldKitProvider>\n\t);\n}\n"],"mappings":";;;;;;;AASA,IAAMC,IAAW;AAGjB,SAASC,EAAO,GAAY,GAAqB,GAA8C;CAC9F,OAAO;EAAE;EAAI,cAAcF,EAAaG,CAAI,KAAKC;EAAI,cAAcC;CAAY;AAChF;AASA,SAAgBC,EAAe,EAC9B,WACA,gBACA,kBAKoB;CACpB,OAAO;EACN,WAAW;GACV,MAAM,OAAO,EAAE,UAAO,iBAAc,eAAY,SAAM,gBAAa;IAClE,IAAMC,IAAS,KAAK,IAAIN,GAAU,KAAK,IAAI,GAAGO,CAAI,IAAI,KAAK,IAAI,GAAGC,CAAS,CAAC,GAGtEC,IAAO,MAAMC,EAAO,aAAa;KACtC,QAAQC,E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