@elytracms/studio 0.0.32 → 0.0.33

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.
Files changed (113) hide show
  1. package/dist/components/app-views/default-modules.js +8 -6
  2. package/dist/components/app-views/default-modules.js.map +1 -1
  3. package/dist/components/assets/asset-library.js +21 -13
  4. package/dist/components/assets/asset-library.js.map +1 -1
  5. package/dist/components/assets/asset-thumb.js +3 -2
  6. package/dist/components/assets/asset-thumb.js.map +1 -1
  7. package/dist/components/backend-gate.js +4 -3
  8. package/dist/components/backend-gate.js.map +1 -1
  9. package/dist/components/builder/blocks-panel.js +11 -2
  10. package/dist/components/builder/blocks-panel.js.map +1 -1
  11. package/dist/components/builder/canvas.js +6 -5
  12. package/dist/components/builder/canvas.js.map +1 -1
  13. package/dist/components/builder/clipboard-actions.js +12 -6
  14. package/dist/components/builder/clipboard-actions.js.map +1 -1
  15. package/dist/components/builder/composition-field-editor.js +7 -4
  16. package/dist/components/builder/composition-field-editor.js.map +1 -1
  17. package/dist/components/builder/fixture-thumbnail.js +2 -1
  18. package/dist/components/builder/fixture-thumbnail.js.map +1 -1
  19. package/dist/components/builder/layout-inspector.d.ts +5 -5
  20. package/dist/components/builder/layout-inspector.js +21 -20
  21. package/dist/components/builder/layout-inspector.js.map +1 -1
  22. package/dist/components/builder/page-tree.js +5 -4
  23. package/dist/components/builder/page-tree.js.map +1 -1
  24. package/dist/components/builder/property-inspector.js +10 -10
  25. package/dist/components/builder/property-inspector.js.map +1 -1
  26. package/dist/components/builder/reuse-context.js +9 -9
  27. package/dist/components/builder/reuse-context.js.map +1 -1
  28. package/dist/components/builder/rich-text-toolbar.js +4 -3
  29. package/dist/components/builder/rich-text-toolbar.js.map +1 -1
  30. package/dist/components/builder/spacing-handles.js +4 -3
  31. package/dist/components/builder/spacing-handles.js.map +1 -1
  32. package/dist/components/cms/asset-picker.js +8 -7
  33. package/dist/components/cms/asset-picker.js.map +1 -1
  34. package/dist/components/cms/bulk-bar.js +8 -5
  35. package/dist/components/cms/bulk-bar.js.map +1 -1
  36. package/dist/components/cms/cell.js +9 -5
  37. package/dist/components/cms/cell.js.map +1 -1
  38. package/dist/components/cms/cms-store.js +4 -3
  39. package/dist/components/cms/cms-store.js.map +1 -1
  40. package/dist/components/cms/collection-table.js +18 -7
  41. package/dist/components/cms/collection-table.js.map +1 -1
  42. package/dist/components/cms/detail-editor.js +38 -27
  43. package/dist/components/cms/detail-editor.js.map +1 -1
  44. package/dist/components/cms/editable-cell.js +4 -4
  45. package/dist/components/cms/editable-cell.js.map +1 -1
  46. package/dist/components/cms/field-control.js +29 -21
  47. package/dist/components/cms/field-control.js.map +1 -1
  48. package/dist/components/cms/filter-builder.js +9 -8
  49. package/dist/components/cms/filter-builder.js.map +1 -1
  50. package/dist/components/cms/reference-confirm.js +24 -10
  51. package/dist/components/cms/reference-confirm.js.map +1 -1
  52. package/dist/components/cms/relation-picker.js +5 -4
  53. package/dist/components/cms/relation-picker.js.map +1 -1
  54. package/dist/components/cms/scalar-value-editor.js +5 -5
  55. package/dist/components/cms/scalar-value-editor.js.map +1 -1
  56. package/dist/components/cms/version-compare.js +36 -21
  57. package/dist/components/cms/version-compare.js.map +1 -1
  58. package/dist/components/cms/versions-pane.js +8 -5
  59. package/dist/components/cms/versions-pane.js.map +1 -1
  60. package/dist/components/cms/view-bar.js +3 -2
  61. package/dist/components/cms/view-bar.js.map +1 -1
  62. package/dist/components/components/component-detail.js +3 -2
  63. package/dist/components/components/component-detail.js.map +1 -1
  64. package/dist/components/components/component-status.js +8 -13
  65. package/dist/components/components/component-status.js.map +1 -1
  66. package/dist/components/components/components-index.js +5 -1
  67. package/dist/components/components/components-index.js.map +1 -1
  68. package/dist/components/components/field-inspector.js +4 -4
  69. package/dist/components/components/field-inspector.js.map +1 -1
  70. package/dist/components/components/fixture-runner.js +4 -1
  71. package/dist/components/components/fixture-runner.js.map +1 -1
  72. package/dist/components/components/registry-browser.js +4 -3
  73. package/dist/components/components/registry-browser.js.map +1 -1
  74. package/dist/components/delivery-health-banner.js +2 -1
  75. package/dist/components/delivery-health-banner.js.map +1 -1
  76. package/dist/components/dev-login-badge.js +2 -1
  77. package/dist/components/dev-login-badge.js.map +1 -1
  78. package/dist/components/extensions/extensions-view.js +22 -21
  79. package/dist/components/extensions/extensions-view.js.map +1 -1
  80. package/dist/components/guards.js +3 -2
  81. package/dist/components/guards.js.map +1 -1
  82. package/dist/components/operation-error.js +3 -2
  83. package/dist/components/operation-error.js.map +1 -1
  84. package/dist/components/playground-badge.js +2 -1
  85. package/dist/components/playground-badge.js.map +1 -1
  86. package/dist/components/project-list.js +5 -4
  87. package/dist/components/project-list.js.map +1 -1
  88. package/dist/components/project-session.js +3 -2
  89. package/dist/components/project-session.js.map +1 -1
  90. package/dist/components/project-switcher.js +4 -3
  91. package/dist/components/project-switcher.js.map +1 -1
  92. package/dist/components/redirects/redirects-module.js +3 -2
  93. package/dist/components/redirects/redirects-module.js.map +1 -1
  94. package/dist/components/references/references-panel.js +7 -6
  95. package/dist/components/references/references-panel.js.map +1 -1
  96. package/dist/components/section-nav.js +8 -5
  97. package/dist/components/section-nav.js.map +1 -1
  98. package/dist/components/section-state.js +13 -32
  99. package/dist/components/section-state.js.map +1 -1
  100. package/dist/components/settings-form.js +2 -1
  101. package/dist/components/settings-form.js.map +1 -1
  102. package/dist/components/studio-project-screen.js +3 -2
  103. package/dist/components/studio-project-screen.js.map +1 -1
  104. package/dist/components/studio-shell.js +3 -2
  105. package/dist/components/studio-shell.js.map +1 -1
  106. package/dist/components/users/users-module.js +5 -4
  107. package/dist/components/users/users-module.js.map +1 -1
  108. package/dist/components/workspace-gate.js +2 -1
  109. package/dist/components/workspace-gate.js.map +1 -1
  110. package/dist/lib/i18n/messages.en.d.ts +11 -4
  111. package/dist/lib/i18n/messages.en.js +636 -6
  112. package/dist/lib/i18n/messages.en.js.map +1 -1
  113. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"collection-table.js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,EAAE,GAAG,CAAC,IAAI,YAC5E,GAAG,CAAC,IAAI,GACJ,CACR,CAAA;AACH,CAAC","sourcesContent":["import { Link, STUDIO_PROJECT_ROUTE, studioPath, useNavigate } from '@elytracms/studio/router'\nimport { ArrowDown, ArrowUp, CornerDownRight, Download, ExternalLink, MoreHorizontal, Plus, Upload } from 'lucide-react'\nimport { useMemo, useState } from 'react'\nimport type { CmsDocument, CollectionDef, DocumentUrl, FieldDef, Locale, LocaleConfig } from '@elytracms/core/cms-core'\nimport {\n orderHierarchically,\n resolveDocumentForLocale,\n resolveDocumentTitle,\n validateCollectionShape,\n} from '@elytracms/core/cms-core'\nimport {\n Button,\n Code,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n Row,\n Separator,\n Spacer,\n Stack,\n Text,\n} from '@elytracms/studio/ui'\nimport { cn } from '@elytracms/studio/lib/utils'\nimport { localizedLabel } from '@elytracms/studio/lib/i18n'\nimport { LocaleSwitcher, resolveDisplayedValue } from '@elytracms/studio/lib/locale'\nimport {\n EMPTY_SELECTION,\n STATE_FIELD,\n applyViewState,\n clearSelection,\n primaryColumn,\n selectAll,\n toggleRow,\n visibleColumns,\n visibleSelection,\n} from '@elytracms/studio/lib/cms-views'\nimport type { SelectionState, ViewSort } from '@elytracms/studio/lib/cms-views'\nimport { cellEditKind, cellKey } from './cell-edit'\nimport { FallbackChip } from './cell'\nimport { EditableCell } from './editable-cell'\nimport { useCellEdit } from './use-cell-edit'\nimport { ImportDialog } from './import-export'\nimport { fieldLabel } from './cms-store'\nimport { cmsIssueLabel } from '@elytracms/studio/lib/persona/labels'\nimport { TriangleAlert } from 'lucide-react'\nimport type { BulkAction, BulkReport, BulkSetField } from './bulk-actions'\nimport { BulkBar, BulkReportPanel } from './bulk-bar'\nimport { ReferenceConfirmDialog } from './reference-confirm'\nimport { FilterControl } from './filter-builder'\nimport { DisplayMenu, ViewTabs } from './view-bar'\nimport { DocStateBadge } from './doc-state'\nimport { useSetBreadcrumb } from '../breadcrumb-context'\nimport { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source'\nimport { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context'\n\nexport function CollectionTable({ projectId, collectionId }: { projectId: string; collectionId: string }) {\n // AD-19: render over the portable CollectionViewSource, not `useCms()` directly,\n // so the SAME list surface serves the users rail (EC-240), redirects (EC-303), …\n const source = useCmsCollectionViewSource(collectionId)\n\n if (!source) {\n return (\n <div className=\"grid h-full place-items-center p-8\">\n <Text tone=\"muted\">\n Unknown collection <Code tone=\"muted\">{collectionId}</Code>.\n </Text>\n </div>\n )\n }\n\n // Keyed per collection so selection/report state never leaks across collections.\n return (\n <CollectionViewProvider source={source}>\n <LoadedCollectionTable key={collectionId} projectId={projectId} />\n </CollectionViewProvider>\n )\n}\n\n/**\n * The portable list surface (AD-19). Renders entirely over the ambient\n * {@link useCollectionView} source — no `useCms`, no `CmsProvider` required — so\n * any rail (the users rail, redirects, …) reuses it by wrapping it in a\n * {@link CollectionViewProvider} over its own source. `CollectionTable` is just\n * the CMS entry point that builds a CMS source and mounts this.\n */\nexport function LoadedCollectionTable({ projectId }: { projectId: string }) {\n const source = useCollectionView()\n const collection = source.schema\n const navigate = useNavigate()\n const collectionId = source.collectionId\n // EC-214: the collection is the active record — the global header breadcrumb\n // names it, replacing the per-view title heading.\n useSetBreadcrumb([{ label: localizedLabel(collection.form?.label, collectionId) }])\n const [importOpen, setImportOpen] = useState(false)\n const [selection, setSelection] = useState<SelectionState>(EMPTY_SELECTION)\n const [bulkBusy, setBulkBusy] = useState(false)\n const [bulkReport, setBulkReport] = useState<BulkReport | null>(null)\n // EC-173: bulk unpublish/delete go through the reference-aware confirmation\n // with a snapshot of the selection taken when the action was raised.\n const [pendingBulk, setPendingBulk] = useState<{\n action: 'unpublish' | 'delete'\n targets: { collection: string; id: string }[]\n } | null>(null)\n\n // The working view state (EC-169): filters + sort + columns, possibly dirty\n // against the active saved view. The table renders exactly this state.\n const viewState = source.viewState()\n // EC-213: the title/link column is the first visible column; the rest follow\n // in the view's column order. No separate primary-column selector.\n const primary = primaryColumn(collection, viewState)\n const columns = visibleColumns(collection, viewState).filter((name) => name !== primary)\n const primaryFieldDef = collection.fields.find((f) => f.name === primary)\n\n const docs = source.documents()\n\n // EC-274/EC-284: collection-shape drift (a singleton with > 1 document; later\n // duplicate/unknown/unfilled aliases). When the data has drifted from the lens's\n // expected shape the studio shows this list instead of skipping — surfacing the\n // conflicts here as a \"for review\" banner so an editor resolves them without a\n // developer (keep/delete the outliers), after which the lens applies again.\n const shapeIssues = useMemo(() => validateCollectionShape(collection, docs), [collection, docs])\n\n // EC-216 + EC-205 (\"live = published\"): each routable document's LIVE URL,\n // derived from the PUBLISHED pool (never draft rows), memoised inside the\n // source. `null` when the collection is not routable → the column is hidden.\n const urlByDocId = source.publishing?.liveUrls?.() ?? null\n\n const visibleDocs = useMemo(\n // EC-224: the `$state` filter/sort sources published-ness from the version\n // POINTER (`source.publishing.isPublished`), not a flat `state` field.\n () =>\n applyViewState(collection, docs, source.localeConfig, viewState, (doc) =>\n source.publishing?.isPublished({ collection: doc.collection, id: doc.id }) ?? false,\n ).docs,\n [collection, docs, source.localeConfig, viewState, source.publishing],\n )\n\n // EC-218: a collection with a `parent` self-relation can render as a nested\n // tree (parents above their children, indented). Tree mode reorders the\n // already-filtered rows depth-first — filters/sort still order siblings.\n const hierarchical = source.capabilities.hierarchy\n const [treeMode, setTreeMode] = useState(hierarchical)\n const treeRows = useMemo(\n () => (hierarchical && treeMode ? orderHierarchically(visibleDocs) : null),\n [hierarchical, treeMode, visibleDocs],\n )\n const orderedDocs = treeRows ? treeRows.map((row) => row.doc) : visibleDocs\n const depthById = useMemo(\n () => (treeRows ? new Map(treeRows.map((row) => [row.doc.id, row.depth])) : undefined),\n [treeRows],\n )\n\n // EC-246a header derivations. The count reads with the collection's own noun\n // (pluralized via the config labels), not a bare number or the generic kind.\n const pluralLabel = localizedLabel(collection.form?.label, `${collectionId}s`)\n const singularLabel = localizedLabel(collection.form?.labelSingular, collectionId)\n const countLabel =\n visibleDocs.length === docs.length\n ? `${docs.length} ${docs.length === 1 ? singularLabel : pluralLabel}`\n : `${visibleDocs.length} of ${docs.length} ${pluralLabel}`\n\n // EC-246d: New creates an empty draft and opens its editor directly — no\n // interstitial modal, for pages or any other collection. Id is auto-generated;\n // the slug/title (and, for pages, the parent) are typed in the form, and a\n // missing/duplicate slug surfaces as a Publish-gating issue, never blocks the\n // draft. Routes are config-sourced (EC-207), so nothing else is written here.\n const isPageCollection = collectionId === 'page'\n // Creation is a capability (a credential rail like users mints identities via\n // sign-up, not here), and the detail route is rail-owned (never the CMS route).\n const canCreate = source.capabilities.create && source.detailPath !== undefined\n const handleNew = () => {\n const ref = source.create()\n const splat = source.detailPath?.(ref.id)\n if (splat === undefined) return\n navigate({ to: STUDIO_PROJECT_ROUTE, params: { projectId, _splat: splat } })\n }\n const visibleIds = orderedDocs.map((doc) => doc.id)\n // Selection is always read against the current view — rows the filters hid\n // are never silently included in a bulk action.\n const selectedIds = visibleSelection(selection, visibleIds)\n\n function toggleSort(field: string) {\n source.setViewState((prev) => {\n const sort: ViewSort | null =\n prev.sort?.field !== field\n ? { field, dir: 'asc' }\n : prev.sort.dir === 'asc'\n ? { field, dir: 'desc' }\n : null\n return { ...prev, sort }\n })\n }\n\n function raiseBulk(action: BulkAction) {\n if (action === 'publish') {\n void handleBulk(action, [...selectedIds])\n return\n }\n // Set-field is composed + raised through the bulk bar's own panel\n // (onSetField), never this state-action path.\n if (action === 'set-field') return\n // Unpublish/delete first enumerate inbound references (EC-173): the\n // dialog shows the aggregate \"N documents, M references will break\".\n setPendingBulk({\n action,\n targets: selectedIds.map((id) => ({ collection: collectionId, id })),\n })\n }\n\n async function handleBulk(action: BulkAction, acted: readonly string[], setField?: BulkSetField) {\n if (!source.bulk) return\n setBulkBusy(true)\n try {\n const report = await source.bulk([...acted], action, setField)\n setBulkReport(report)\n // Succeeded items deselect; failed items stay selected for a retry.\n const actedSet = new Set(acted)\n const failed = new Set(report.results.filter((r) => !r.ok).map((r) => r.ref.id))\n setSelection((prev) => ({\n ids: prev.ids.filter((id) => !actedSet.has(id) || failed.has(id)),\n anchorId: null,\n }))\n } finally {\n setBulkBusy(false)\n }\n }\n\n function exportJson() {\n const data = JSON.stringify(source.documents(), null, 2)\n const blob = new Blob([data], { type: 'application/json' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${collectionId}.json`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {/* Header (EC-246a redesign). One toolbar: identity + refine on the left,\n lens + actions on the right; a transient filter bar drops below only\n while refining. The header breadcrumb (EC-214) names the collection —\n no title here. Locale is a lens; column/layout config lives behind the\n far-right Display control; shared views are config-as-code (EC-246b). */}\n <div className=\"shrink-0 border-b border-border px-4 py-3 sm:px-6\">\n <Row gap=\"2\" wrap>\n {/* Left — which view (only when >1), then the transient refine. */}\n <ViewTabs />\n {/* Transient ad-hoc refine — a chip beside the view tabs, editor in a\n popover (EC-246b); the chip's ✕ clears it, so no separate Reset. */}\n <FilterControl collection={collection} />\n {/* The working-set count is the RESULT of the view + filter above, so it\n reads last, set off by a divider and sized like its neighbours. */}\n <Separator orientation=\"vertical\" className=\"h-5 self-center\" />\n <Text\n as=\"span\"\n size=\"xs\"\n tone=\"muted\"\n className=\"whitespace-nowrap tabular-nums\"\n data-testid=\"collection-count\"\n >\n {countLabel}\n </Text>\n\n <Spacer />\n\n {/* Right — the ambient locale lens (EC-176; hidden for single-locale AND\n for a non-localized rail like users), then display config + write actions. */}\n {source.capabilities.locales ? <LocaleSwitcher /> : null}\n <DisplayMenu\n collection={collection}\n hierarchical={hierarchical}\n treeMode={treeMode}\n onToggleTree={setTreeMode}\n />\n {canCreate ? (\n <Button size=\"sm\" onClick={handleNew} data-testid=\"new-document\">\n <Plus /> {isPageCollection ? 'New page' : 'New'}\n </Button>\n ) : null}\n {/* EC-213: import/export fold into one action menu, off the header.\n AD-19: a capability — absent on credential rails (users), so identity\n records are never dumped to / loaded from raw JSON. */}\n {source.capabilities.importExport ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label=\"More actions\"\n data-testid=\"collection-actions\"\n >\n <MoreHorizontal />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setImportOpen(true)} data-testid=\"action-import\">\n <Upload /> Import…\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={exportJson}\n disabled={docs.length === 0}\n data-testid=\"action-export\"\n >\n <Download /> Export\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </Row>\n </div>\n\n {/* Bulk actions over the selection (EC-169) */}\n <BulkBar\n collection={collection}\n count={selectedIds.length}\n busy={bulkBusy}\n onAction={raiseBulk}\n onSetField={(setField) => void handleBulk('set-field', [...selectedIds], setField)}\n onClear={() => setSelection(clearSelection())}\n />\n {bulkReport ? (\n <BulkReportPanel report={bulkReport} onDismiss={() => setBulkReport(null)} />\n ) : null}\n\n {/* Reference-aware bulk unpublish/delete confirmation (EC-173). */}\n {pendingBulk !== null ? (\n <ReferenceConfirmDialog\n projectId={projectId}\n action={pendingBulk.action}\n targets={pendingBulk.targets}\n open\n busy={bulkBusy}\n onOpenChange={(open) => {\n if (!open) setPendingBulk(null)\n }}\n onConfirm={() => {\n const { action, targets } = pendingBulk\n setPendingBulk(null)\n void handleBulk(\n action,\n targets.map((target) => target.id),\n )\n }}\n />\n ) : null}\n\n {/* EC-274/EC-284: \"for review\" lane — the collection has drifted from its\n lens's expected shape; surface each conflict so an editor can resolve it. */}\n {shapeIssues.length > 0 ? (\n <div\n className=\"shrink-0 border-b border-warning/30 bg-warning/10 px-4 py-2 sm:px-6\"\n data-testid=\"shape-review-banner\"\n >\n <Stack gap=\"1\">\n {shapeIssues.map((issue, i) => (\n <Row key={`${issue.code}:${i}`} gap=\"2\" align=\"start\">\n <TriangleAlert className=\"mt-0.5 size-3.5 shrink-0 text-warning\" aria-hidden />\n <Stack gap=\"none\" className=\"min-w-0\">\n <Text size=\"xs\" weight=\"semibold\" tone=\"default\" title={issue.code}>\n For review · {cmsIssueLabel(issue.code)}\n </Text>\n <Text size=\"xs\" tone=\"muted\">\n {issue.message}\n </Text>\n </Stack>\n </Row>\n ))}\n </Stack>\n </div>\n ) : null}\n\n {/* Table */}\n <div className=\"min-h-0 flex-1 overflow-auto\">\n {docs.length === 0 ? (\n <div className=\"grid h-full place-items-center p-8\">\n <Stack gap=\"2\" align=\"center\" className=\"text-center\">\n <Text tone=\"muted\">No {pluralLabel.toLowerCase()} yet.</Text>\n {canCreate ? (\n <Button size=\"sm\" onClick={handleNew}>\n <Plus /> New {isPageCollection ? 'page' : localizedLabel(collection.form?.labelSingular, 'document')}\n </Button>\n ) : null}\n </Stack>\n </div>\n ) : visibleDocs.length === 0 ? (\n <div className=\"grid h-full place-items-center p-8\">\n <Text tone=\"muted\" data-testid=\"empty-filtered\">\n No documents match the current view's filters.\n </Text>\n </div>\n ) : (\n <DocumentsGrid\n projectId={projectId}\n collection={collection}\n primary={primary}\n primaryFieldDef={primaryFieldDef}\n columns={columns}\n sortedDocs={orderedDocs}\n depthById={depthById}\n urlByDocId={urlByDocId}\n sort={viewState.sort}\n onSort={toggleSort}\n selectedIds={selectedIds}\n onToggleRow={(id, shift) =>\n setSelection((prev) => toggleRow(prev, visibleIds, id, shift))\n }\n onToggleAll={() =>\n setSelection(\n selectedIds.length === visibleIds.length && visibleIds.length > 0\n ? clearSelection()\n : selectAll(visibleIds),\n )\n }\n />\n )}\n </div>\n\n {source.capabilities.importExport ? (\n <ImportDialog collectionId={collectionId} open={importOpen} onOpenChange={setImportOpen} />\n ) : null}\n </div>\n )\n}\n\n/**\n * The documents table with inline cell editing (EC-168). Cells edit in place\n * (text/number/boolean/select/date) or open pickers (relation/asset); each\n * commit is one operations command via the cell-edit controller, with\n * rollback + inline cell errors on rejection. Row checkboxes (EC-169) live in\n * their own column, so selection clicks never collide with cell editing.\n */\nfunction DocumentsGrid({\n projectId,\n collection,\n primary,\n primaryFieldDef,\n columns,\n sortedDocs,\n depthById,\n urlByDocId,\n sort,\n onSort,\n selectedIds,\n onToggleRow,\n onToggleAll,\n}: {\n projectId: string\n collection: CollectionDef\n primary: string\n primaryFieldDef: FieldDef | undefined\n columns: string[]\n sortedDocs: CmsDocument[]\n /** EC-218: nesting depth per doc id when rendering the hierarchy (tree mode). */\n depthById?: Map<string, number>\n /** EC-216: each routable doc's derived URL; `null` hides the URL column. */\n urlByDocId?: Map<string, DocumentUrl> | null\n sort: ViewSort | null\n onSort: (field: string) => void\n selectedIds: readonly string[]\n onToggleRow: (id: string, shift: boolean) => void\n onToggleAll: () => void\n}) {\n const source = useCollectionView()\n const collectionId = collection.id\n const fieldByName = (name: string) => collection.fields.find((f) => f.name === name)\n // Inline editing is a capability: a read-only rail yields no editable cells.\n const editableFields = source.capabilities.inlineEdit\n ? columns.filter((name) => {\n const field = fieldByName(name)\n return field ? cellEditKind(field, source.isFieldReadOnly(field)) !== 'none' : false\n })\n : []\n const cellEdit = useCellEdit({ collection, docs: sortedDocs, editableFields })\n const selected = new Set(selectedIds)\n const allSelected = sortedDocs.length > 0 && selectedIds.length === sortedDocs.length\n\n return (\n <div ref={cellEdit.containerRef}>\n <table className=\"w-full border-collapse text-sm\">\n <thead className=\"sticky top-0 z-10 bg-background\">\n <tr className=\"border-b border-border\">\n <th className=\"w-8 px-3 py-2 text-left\">\n <SelectionCheckbox\n checked={allSelected}\n indeterminate={selectedIds.length > 0 && !allSelected}\n label=\"Select all documents in view\"\n testId=\"select-all\"\n onToggle={() => onToggleAll()}\n />\n </th>\n <HeaderCell\n field={primary}\n label={primaryFieldDef ? fieldLabel(primaryFieldDef) : 'Title'}\n sort={sort}\n onSort={onSort}\n sticky\n />\n {columns.map((name) => {\n const field = fieldByName(name)\n return field ? (\n <HeaderCell key={name} field={name} label={fieldLabel(field)} sort={sort} onSort={onSort} />\n ) : null\n })}\n <HeaderCell field={STATE_FIELD} label=\"State\" sort={sort} onSort={onSort} />\n {/* EC-216: derived URL — not a field, so not sortable. */}\n {urlByDocId ? (\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-muted-foreground\">URL</th>\n ) : null}\n </tr>\n </thead>\n <tbody>\n {sortedDocs.map((doc) => (\n <tr\n key={doc.id}\n className={cn(\n 'group border-b border-border/60 hover:bg-muted/40',\n selected.has(doc.id) && 'bg-primary/5',\n )}\n >\n <td className=\"px-3 py-2 align-middle\">\n <SelectionCheckbox\n checked={selected.has(doc.id)}\n label={`Select ${doc.id}`}\n testId={`select-row-${doc.id}`}\n onToggle={(shift) => onToggleRow(doc.id, shift)}\n />\n </td>\n <td className=\"px-3 py-2 align-middle\">\n <PrimaryCell\n projectId={projectId}\n collection={collection}\n doc={doc}\n primary={primary}\n depth={depthById?.get(doc.id) ?? 0}\n locale={source.activeLocale}\n config={source.localeConfig}\n detailPath={source.detailPath}\n />\n </td>\n {columns.map((name) => {\n const field = fieldByName(name)\n const coord = { docId: doc.id, field: name }\n const key = cellKey(coord)\n return (\n <td key={name} className=\"px-3 py-2 align-middle\">\n {field ? (\n <EditableCell\n collection={collection}\n doc={doc}\n field={field}\n editing={cellEdit.activeKey === key}\n busy={cellEdit.busyKey === key}\n errorMessage={cellEdit.errorOf(key)}\n onStartEdit={() => cellEdit.start(coord)}\n onCancel={() => cellEdit.cancel(coord)}\n onCommit={(value, advance) => cellEdit.commit(coord, value, advance)}\n />\n ) : null}\n </td>\n )\n })}\n <td className=\"px-3 py-2 align-middle\">\n <DocStateBadge\n published={\n source.publishing?.isPublished({ collection: collectionId, id: doc.id }) ?? false\n }\n />\n </td>\n {urlByDocId ? (\n <td className=\"px-3 py-2 align-middle\">\n <UrlCell url={urlByDocId.get(doc.id)} />\n </td>\n ) : null}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\n/**\n * A selection checkbox (row or select-all). Its own column and focus target —\n * it never participates in the cell-edit keyboard flow. Shift-click selects\n * the anchor→row range (the mousedown guard stops text selection).\n */\nfunction SelectionCheckbox({\n checked,\n indeterminate = false,\n label,\n testId,\n onToggle,\n}: {\n checked: boolean\n indeterminate?: boolean\n label: string\n testId: string\n onToggle: (shift: boolean) => void\n}) {\n return (\n <input\n ref={(el) => {\n if (el) el.indeterminate = indeterminate && !checked\n }}\n type=\"checkbox\"\n className=\"size-4 cursor-pointer accent-primary align-middle\"\n checked={checked}\n readOnly\n aria-label={label}\n data-testid={testId}\n onClick={(event) => onToggle(event.shiftKey)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n onToggle(event.shiftKey)\n }\n }}\n onMouseDown={(event) => {\n if (event.shiftKey) event.preventDefault()\n }}\n />\n )\n}\n\nfunction HeaderCell({\n field,\n label,\n sort,\n onSort,\n sticky,\n}: {\n field: string\n label: string\n sort: ViewSort | null\n onSort: (field: string) => void\n sticky?: boolean\n}) {\n const active = sort?.field === field\n return (\n <th className={cn('px-3 py-2 text-left text-xs font-semibold text-muted-foreground', sticky && 'min-w-[12rem]')}>\n <button type=\"button\" onClick={() => onSort(field)} className=\"inline-flex items-center gap-1 hover:text-foreground\">\n {label}\n {active ? (\n sort!.dir === 'asc' ? (\n <ArrowUp className=\"size-3\" />\n ) : (\n <ArrowDown className=\"size-3\" />\n )\n ) : null}\n </button>\n </th>\n )\n}\n\n/**\n * The primary (title) column cell: the document link, resolved in the\n * ambient active locale with a visible fallback chip when the shown title is\n * untranslated (EC-176).\n */\nfunction PrimaryCell({\n projectId,\n collection,\n doc,\n primary,\n depth = 0,\n locale,\n config,\n detailPath,\n}: {\n projectId: string\n collection: CollectionDef\n doc: CmsDocument\n primary: string\n /** EC-218: nesting depth in the hierarchy (tree mode) — indents the title. */\n depth?: number\n locale: Locale\n config: LocaleConfig\n /** Rail-owned detail route splat (AD-19); absent ⇒ the rail has no detail surface. */\n detailPath?: (id: string) => string\n}) {\n // EC-242: the title cell renders the document identity (resolveDocumentTitle) —\n // a string `titleField` or a function pattern — over the fallback-resolved\n // values, NOT the raw `primary` column value. The untranslated-title chip applies\n // only to a field-backed title (a function pattern has no single source field).\n const title = resolveDocumentTitle(\n collection,\n resolveDocumentForLocale(collection, doc, locale, config),\n doc.id,\n )\n const fallback =\n typeof collection.titleField === 'function'\n ? null\n : resolveDisplayedValue(collection, doc, primary, locale, config).fallback\n const splat = detailPath?.(doc.id)\n return (\n <Row gap=\"2\" align=\"center\" className=\"min-w-0\" style={{ paddingLeft: depth * 20 }}>\n {depth > 0 ? (\n <CornerDownRight className=\"size-3.5 shrink-0 text-muted-foreground\" aria-hidden />\n ) : null}\n {splat !== undefined ? (\n <Link\n to={STUDIO_PROJECT_ROUTE}\n params={{ projectId, _splat: splat }}\n className=\"truncate font-medium text-foreground hover:text-primary hover:underline\"\n >\n {title}\n </Link>\n ) : (\n <Text as=\"span\" className=\"truncate font-medium text-foreground\">\n {title}\n </Text>\n )}\n <FallbackChip fallback={fallback} testId={`cell-fallback-${doc.id}-${primary}`} />\n </Row>\n )\n}\n\n/**\n * The read-only URL column cell (EC-216): the document's LIVE (published) path,\n * linking to the absolute live URL when a `frontendUrl` is configured. Only\n * published documents have a `url` here (the URL is derived from the published\n * pool, EC-205), so an unpublished document — having no live page — shows a dash.\n * The URL is always derived, never stored.\n */\nfunction UrlCell({ url }: { url?: DocumentUrl }) {\n if (!url) {\n return (\n <Text size=\"xs\" tone=\"subtle\">\n —\n </Text>\n )\n }\n if (url.href) {\n return (\n <a\n href={url.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n title={url.href}\n className=\"inline-flex max-w-[18rem] items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground\"\n >\n <span className=\"truncate\">{url.path}</span>\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden />\n </a>\n )\n }\n return (\n <Text size=\"xs\" tone=\"muted\" className=\"max-w-[18rem] truncate\" title={url.path}>\n {url.path}\n </Text>\n )\n}\n\nexport type { FieldDef }\n"]}
1
+ {"version":3,"file":"collection-table.js","sourceRoot":"","sources":["../../../src/components/cms/collection-table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC9F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACxH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,GAAG,EACH,SAAS,EACT,MAAM,EACN,KAAK,EACL,IAAI,GACL,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpF,OAAO,EACL,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,aAAa,EACb,SAAS,EACT,SAAS,EACT,cAAc,EACd,gBAAgB,GACjB,MAAM,iCAAiC,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO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,GAAI,IAC9E,CACP,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,OAAO,CAAC,EAAE,GAAG,EAAyB;IAC7C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,uBAEtB,CACR,CAAA;IACH,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,OAAO,CACL,aACE,IAAI,EAAE,GAAG,CAAC,IAAI,EACd,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,GAAG,CAAC,IAAI,EACf,SAAS,EAAC,oHAAoH,aAE9H,eAAM,SAAS,EAAC,UAAU,YAAE,GAAG,CAAC,IAAI,GAAQ,EAC5C,KAAC,YAAY,IAAC,SAAS,EAAC,iBAAiB,wBAAe,IACtD,CACL,CAAA;IACH,CAAC;IACD,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,GAAG,CAAC,IAAI,YAC5E,GAAG,CAAC,IAAI,GACJ,CACR,CAAA;AACH,CAAC","sourcesContent":["import { Link, STUDIO_PROJECT_ROUTE, studioPath, useNavigate } from '@elytracms/studio/router'\nimport { ArrowDown, ArrowUp, CornerDownRight, Download, ExternalLink, MoreHorizontal, Plus, Upload } from 'lucide-react'\nimport { useMemo, useState } from 'react'\nimport type { CmsDocument, CollectionDef, DocumentUrl, FieldDef, Locale, LocaleConfig } from '@elytracms/core/cms-core'\nimport {\n orderHierarchically,\n resolveDocumentForLocale,\n resolveDocumentTitle,\n validateCollectionShape,\n} from '@elytracms/core/cms-core'\nimport {\n Button,\n Code,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n Row,\n Separator,\n Spacer,\n Stack,\n Text,\n} from '@elytracms/studio/ui'\nimport { cn } from '@elytracms/studio/lib/utils'\nimport { localizedLabel, translate } from '@elytracms/studio/lib/i18n'\nimport { LocaleSwitcher, resolveDisplayedValue } from '@elytracms/studio/lib/locale'\nimport {\n EMPTY_SELECTION,\n STATE_FIELD,\n applyViewState,\n clearSelection,\n primaryColumn,\n selectAll,\n toggleRow,\n visibleColumns,\n visibleSelection,\n} from '@elytracms/studio/lib/cms-views'\nimport type { SelectionState, ViewSort } from '@elytracms/studio/lib/cms-views'\nimport { cellEditKind, cellKey } from './cell-edit'\nimport { FallbackChip } from './cell'\nimport { EditableCell } from './editable-cell'\nimport { useCellEdit } from './use-cell-edit'\nimport { ImportDialog } from './import-export'\nimport { fieldLabel } from './cms-store'\nimport { cmsIssueLabel } from '@elytracms/studio/lib/persona/labels'\nimport { TriangleAlert } from 'lucide-react'\nimport type { BulkAction, BulkReport, BulkSetField } from './bulk-actions'\nimport { BulkBar, BulkReportPanel } from './bulk-bar'\nimport { ReferenceConfirmDialog } from './reference-confirm'\nimport { FilterControl } from './filter-builder'\nimport { DisplayMenu, ViewTabs } from './view-bar'\nimport { DocStateBadge } from './doc-state'\nimport { useSetBreadcrumb } from '../breadcrumb-context'\nimport { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source'\nimport { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context'\n\nexport function CollectionTable({ projectId, collectionId }: { projectId: string; collectionId: string }) {\n // AD-19: render over the portable CollectionViewSource, not `useCms()` directly,\n // so the SAME list surface serves the users rail (EC-240), redirects (EC-303), …\n const source = useCmsCollectionViewSource(collectionId)\n\n if (!source) {\n return (\n <div className=\"grid h-full place-items-center p-8\">\n <Text tone=\"muted\">\n Unknown collection <Code tone=\"muted\">{collectionId}</Code>.\n </Text>\n </div>\n )\n }\n\n // Keyed per collection so selection/report state never leaks across collections.\n return (\n <CollectionViewProvider source={source}>\n <LoadedCollectionTable key={collectionId} projectId={projectId} />\n </CollectionViewProvider>\n )\n}\n\n/**\n * The portable list surface (AD-19). Renders entirely over the ambient\n * {@link useCollectionView} source — no `useCms`, no `CmsProvider` required — so\n * any rail (the users rail, redirects, …) reuses it by wrapping it in a\n * {@link CollectionViewProvider} over its own source. `CollectionTable` is just\n * the CMS entry point that builds a CMS source and mounts this.\n */\nexport function LoadedCollectionTable({ projectId }: { projectId: string }) {\n const source = useCollectionView()\n const collection = source.schema\n const navigate = useNavigate()\n const collectionId = source.collectionId\n // EC-214: the collection is the active record — the global header breadcrumb\n // names it, replacing the per-view title heading.\n useSetBreadcrumb([{ label: localizedLabel(collection.form?.label, collectionId) }])\n const [importOpen, setImportOpen] = useState(false)\n const [selection, setSelection] = useState<SelectionState>(EMPTY_SELECTION)\n const [bulkBusy, setBulkBusy] = useState(false)\n const [bulkReport, setBulkReport] = useState<BulkReport | null>(null)\n // EC-173: bulk unpublish/delete go through the reference-aware confirmation\n // with a snapshot of the selection taken when the action was raised.\n const [pendingBulk, setPendingBulk] = useState<{\n action: 'unpublish' | 'delete'\n targets: { collection: string; id: string }[]\n } | null>(null)\n\n // The working view state (EC-169): filters + sort + columns, possibly dirty\n // against the active saved view. The table renders exactly this state.\n const viewState = source.viewState()\n // EC-213: the title/link column is the first visible column; the rest follow\n // in the view's column order. No separate primary-column selector.\n const primary = primaryColumn(collection, viewState)\n const columns = visibleColumns(collection, viewState).filter((name) => name !== primary)\n const primaryFieldDef = collection.fields.find((f) => f.name === primary)\n\n const docs = source.documents()\n\n // EC-274/EC-284: collection-shape drift (a singleton with > 1 document; later\n // duplicate/unknown/unfilled aliases). When the data has drifted from the lens's\n // expected shape the studio shows this list instead of skipping — surfacing the\n // conflicts here as a \"for review\" banner so an editor resolves them without a\n // developer (keep/delete the outliers), after which the lens applies again.\n const shapeIssues = useMemo(() => validateCollectionShape(collection, docs), [collection, docs])\n\n // EC-216 + EC-205 (\"live = published\"): each routable document's LIVE URL,\n // derived from the PUBLISHED pool (never draft rows), memoised inside the\n // source. `null` when the collection is not routable → the column is hidden.\n const urlByDocId = source.publishing?.liveUrls?.() ?? null\n\n const visibleDocs = useMemo(\n // EC-224: the `$state` filter/sort sources published-ness from the version\n // POINTER (`source.publishing.isPublished`), not a flat `state` field.\n () =>\n applyViewState(collection, docs, source.localeConfig, viewState, (doc) =>\n source.publishing?.isPublished({ collection: doc.collection, id: doc.id }) ?? false,\n ).docs,\n [collection, docs, source.localeConfig, viewState, source.publishing],\n )\n\n // EC-218: a collection with a `parent` self-relation can render as a nested\n // tree (parents above their children, indented). Tree mode reorders the\n // already-filtered rows depth-first — filters/sort still order siblings.\n const hierarchical = source.capabilities.hierarchy\n const [treeMode, setTreeMode] = useState(hierarchical)\n const treeRows = useMemo(\n () => (hierarchical && treeMode ? orderHierarchically(visibleDocs) : null),\n [hierarchical, treeMode, visibleDocs],\n )\n const orderedDocs = treeRows ? treeRows.map((row) => row.doc) : visibleDocs\n const depthById = useMemo(\n () => (treeRows ? new Map(treeRows.map((row) => [row.doc.id, row.depth])) : undefined),\n [treeRows],\n )\n\n // EC-246a header derivations. The count reads with the collection's own noun\n // (pluralized via the config labels), not a bare number or the generic kind.\n const pluralLabel = localizedLabel(collection.form?.label, `${collectionId}s`)\n const singularLabel = localizedLabel(collection.form?.labelSingular, collectionId)\n const countLabel =\n visibleDocs.length === docs.length\n ? translate('cms.list.count', {\n count: docs.length,\n noun: docs.length === 1 ? singularLabel : pluralLabel,\n })\n : translate('cms.list.countFiltered', {\n visible: visibleDocs.length,\n total: docs.length,\n noun: pluralLabel,\n })\n\n // EC-246d: New creates an empty draft and opens its editor directly — no\n // interstitial modal, for pages or any other collection. Id is auto-generated;\n // the slug/title (and, for pages, the parent) are typed in the form, and a\n // missing/duplicate slug surfaces as a Publish-gating issue, never blocks the\n // draft. Routes are config-sourced (EC-207), so nothing else is written here.\n const isPageCollection = collectionId === 'page'\n // Creation is a capability (a credential rail like users mints identities via\n // sign-up, not here), and the detail route is rail-owned (never the CMS route).\n const canCreate = source.capabilities.create && source.detailPath !== undefined\n const handleNew = () => {\n const ref = source.create()\n const splat = source.detailPath?.(ref.id)\n if (splat === undefined) return\n navigate({ to: STUDIO_PROJECT_ROUTE, params: { projectId, _splat: splat } })\n }\n const visibleIds = orderedDocs.map((doc) => doc.id)\n // Selection is always read against the current view — rows the filters hid\n // are never silently included in a bulk action.\n const selectedIds = visibleSelection(selection, visibleIds)\n\n function toggleSort(field: string) {\n source.setViewState((prev) => {\n const sort: ViewSort | null =\n prev.sort?.field !== field\n ? { field, dir: 'asc' }\n : prev.sort.dir === 'asc'\n ? { field, dir: 'desc' }\n : null\n return { ...prev, sort }\n })\n }\n\n function raiseBulk(action: BulkAction) {\n if (action === 'publish') {\n void handleBulk(action, [...selectedIds])\n return\n }\n // Set-field is composed + raised through the bulk bar's own panel\n // (onSetField), never this state-action path.\n if (action === 'set-field') return\n // Unpublish/delete first enumerate inbound references (EC-173): the\n // dialog shows the aggregate \"N documents, M references will break\".\n setPendingBulk({\n action,\n targets: selectedIds.map((id) => ({ collection: collectionId, id })),\n })\n }\n\n async function handleBulk(action: BulkAction, acted: readonly string[], setField?: BulkSetField) {\n if (!source.bulk) return\n setBulkBusy(true)\n try {\n const report = await source.bulk([...acted], action, setField)\n setBulkReport(report)\n // Succeeded items deselect; failed items stay selected for a retry.\n const actedSet = new Set(acted)\n const failed = new Set(report.results.filter((r) => !r.ok).map((r) => r.ref.id))\n setSelection((prev) => ({\n ids: prev.ids.filter((id) => !actedSet.has(id) || failed.has(id)),\n anchorId: null,\n }))\n } finally {\n setBulkBusy(false)\n }\n }\n\n function exportJson() {\n const data = JSON.stringify(source.documents(), null, 2)\n const blob = new Blob([data], { type: 'application/json' })\n const url = URL.createObjectURL(blob)\n const a = document.createElement('a')\n a.href = url\n a.download = `${collectionId}.json`\n a.click()\n URL.revokeObjectURL(url)\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n {/* Header (EC-246a redesign). One toolbar: identity + refine on the left,\n lens + actions on the right; a transient filter bar drops below only\n while refining. The header breadcrumb (EC-214) names the collection —\n no title here. Locale is a lens; column/layout config lives behind the\n far-right Display control; shared views are config-as-code (EC-246b). */}\n <div className=\"shrink-0 border-b border-border px-4 py-3 sm:px-6\">\n <Row gap=\"2\" wrap>\n {/* Left — which view (only when >1), then the transient refine. */}\n <ViewTabs />\n {/* Transient ad-hoc refine — a chip beside the view tabs, editor in a\n popover (EC-246b); the chip's ✕ clears it, so no separate Reset. */}\n <FilterControl collection={collection} />\n {/* The working-set count is the RESULT of the view + filter above, so it\n reads last, set off by a divider and sized like its neighbours. */}\n <Separator orientation=\"vertical\" className=\"h-5 self-center\" />\n <Text\n as=\"span\"\n size=\"xs\"\n tone=\"muted\"\n className=\"whitespace-nowrap tabular-nums\"\n data-testid=\"collection-count\"\n >\n {countLabel}\n </Text>\n\n <Spacer />\n\n {/* Right — the ambient locale lens (EC-176; hidden for single-locale AND\n for a non-localized rail like users), then display config + write actions. */}\n {source.capabilities.locales ? <LocaleSwitcher /> : null}\n <DisplayMenu\n collection={collection}\n hierarchical={hierarchical}\n treeMode={treeMode}\n onToggleTree={setTreeMode}\n />\n {canCreate ? (\n <Button size=\"sm\" onClick={handleNew} data-testid=\"new-document\">\n <Plus /> {isPageCollection ? translate('cms.list.newPage') : translate('cms.list.new')}\n </Button>\n ) : null}\n {/* EC-213: import/export fold into one action menu, off the header.\n AD-19: a capability — absent on credential rails (users), so identity\n records are never dumped to / loaded from raw JSON. */}\n {source.capabilities.importExport ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={translate('cms.list.moreActions')}\n data-testid=\"collection-actions\"\n >\n <MoreHorizontal />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onClick={() => setImportOpen(true)} data-testid=\"action-import\">\n <Upload /> {translate('cms.list.import')}\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={exportJson}\n disabled={docs.length === 0}\n data-testid=\"action-export\"\n >\n <Download /> {translate('cms.list.export')}\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n ) : null}\n </Row>\n </div>\n\n {/* Bulk actions over the selection (EC-169) */}\n <BulkBar\n collection={collection}\n count={selectedIds.length}\n busy={bulkBusy}\n onAction={raiseBulk}\n onSetField={(setField) => void handleBulk('set-field', [...selectedIds], setField)}\n onClear={() => setSelection(clearSelection())}\n />\n {bulkReport ? (\n <BulkReportPanel report={bulkReport} onDismiss={() => setBulkReport(null)} />\n ) : null}\n\n {/* Reference-aware bulk unpublish/delete confirmation (EC-173). */}\n {pendingBulk !== null ? (\n <ReferenceConfirmDialog\n projectId={projectId}\n action={pendingBulk.action}\n targets={pendingBulk.targets}\n open\n busy={bulkBusy}\n onOpenChange={(open) => {\n if (!open) setPendingBulk(null)\n }}\n onConfirm={() => {\n const { action, targets } = pendingBulk\n setPendingBulk(null)\n void handleBulk(\n action,\n targets.map((target) => target.id),\n )\n }}\n />\n ) : null}\n\n {/* EC-274/EC-284: \"for review\" lane — the collection has drifted from its\n lens's expected shape; surface each conflict so an editor can resolve it. */}\n {shapeIssues.length > 0 ? (\n <div\n className=\"shrink-0 border-b border-warning/30 bg-warning/10 px-4 py-2 sm:px-6\"\n data-testid=\"shape-review-banner\"\n >\n <Stack gap=\"1\">\n {shapeIssues.map((issue, i) => (\n <Row key={`${issue.code}:${i}`} gap=\"2\" align=\"start\">\n <TriangleAlert className=\"mt-0.5 size-3.5 shrink-0 text-warning\" aria-hidden />\n <Stack gap=\"none\" className=\"min-w-0\">\n <Text size=\"xs\" weight=\"semibold\" tone=\"default\" title={issue.code}>\n {translate('cms.list.forReview')} · {cmsIssueLabel(issue.code)}\n </Text>\n <Text size=\"xs\" tone=\"muted\">\n {issue.message}\n </Text>\n </Stack>\n </Row>\n ))}\n </Stack>\n </div>\n ) : null}\n\n {/* Table */}\n <div className=\"min-h-0 flex-1 overflow-auto\">\n {docs.length === 0 ? (\n <div className=\"grid h-full place-items-center p-8\">\n <Stack gap=\"2\" align=\"center\" className=\"text-center\">\n <Text tone=\"muted\">{translate('cms.list.emptyNone', { noun: pluralLabel.toLowerCase() })}</Text>\n {canCreate ? (\n <Button size=\"sm\" onClick={handleNew}>\n <Plus />{' '}\n {isPageCollection\n ? translate('cms.list.newPage')\n : translate('cms.list.newNamed', {\n noun: localizedLabel(collection.form?.labelSingular, 'document'),\n })}\n </Button>\n ) : null}\n </Stack>\n </div>\n ) : visibleDocs.length === 0 ? (\n <div className=\"grid h-full place-items-center p-8\">\n <Text tone=\"muted\" data-testid=\"empty-filtered\">\n {translate('cms.list.emptyFiltered')}\n </Text>\n </div>\n ) : (\n <DocumentsGrid\n projectId={projectId}\n collection={collection}\n primary={primary}\n primaryFieldDef={primaryFieldDef}\n columns={columns}\n sortedDocs={orderedDocs}\n depthById={depthById}\n urlByDocId={urlByDocId}\n sort={viewState.sort}\n onSort={toggleSort}\n selectedIds={selectedIds}\n onToggleRow={(id, shift) =>\n setSelection((prev) => toggleRow(prev, visibleIds, id, shift))\n }\n onToggleAll={() =>\n setSelection(\n selectedIds.length === visibleIds.length && visibleIds.length > 0\n ? clearSelection()\n : selectAll(visibleIds),\n )\n }\n />\n )}\n </div>\n\n {source.capabilities.importExport ? (\n <ImportDialog collectionId={collectionId} open={importOpen} onOpenChange={setImportOpen} />\n ) : null}\n </div>\n )\n}\n\n/**\n * The documents table with inline cell editing (EC-168). Cells edit in place\n * (text/number/boolean/select/date) or open pickers (relation/asset); each\n * commit is one operations command via the cell-edit controller, with\n * rollback + inline cell errors on rejection. Row checkboxes (EC-169) live in\n * their own column, so selection clicks never collide with cell editing.\n */\nfunction DocumentsGrid({\n projectId,\n collection,\n primary,\n primaryFieldDef,\n columns,\n sortedDocs,\n depthById,\n urlByDocId,\n sort,\n onSort,\n selectedIds,\n onToggleRow,\n onToggleAll,\n}: {\n projectId: string\n collection: CollectionDef\n primary: string\n primaryFieldDef: FieldDef | undefined\n columns: string[]\n sortedDocs: CmsDocument[]\n /** EC-218: nesting depth per doc id when rendering the hierarchy (tree mode). */\n depthById?: Map<string, number>\n /** EC-216: each routable doc's derived URL; `null` hides the URL column. */\n urlByDocId?: Map<string, DocumentUrl> | null\n sort: ViewSort | null\n onSort: (field: string) => void\n selectedIds: readonly string[]\n onToggleRow: (id: string, shift: boolean) => void\n onToggleAll: () => void\n}) {\n const source = useCollectionView()\n const collectionId = collection.id\n const fieldByName = (name: string) => collection.fields.find((f) => f.name === name)\n // Inline editing is a capability: a read-only rail yields no editable cells.\n const editableFields = source.capabilities.inlineEdit\n ? columns.filter((name) => {\n const field = fieldByName(name)\n return field ? cellEditKind(field, source.isFieldReadOnly(field)) !== 'none' : false\n })\n : []\n const cellEdit = useCellEdit({ collection, docs: sortedDocs, editableFields })\n const selected = new Set(selectedIds)\n const allSelected = sortedDocs.length > 0 && selectedIds.length === sortedDocs.length\n\n return (\n <div ref={cellEdit.containerRef}>\n <table className=\"w-full border-collapse text-sm\">\n <thead className=\"sticky top-0 z-10 bg-background\">\n <tr className=\"border-b border-border\">\n <th className=\"w-8 px-3 py-2 text-left\">\n <SelectionCheckbox\n checked={allSelected}\n indeterminate={selectedIds.length > 0 && !allSelected}\n label={translate('cms.list.selectAll')}\n testId=\"select-all\"\n onToggle={() => onToggleAll()}\n />\n </th>\n <HeaderCell\n field={primary}\n label={primaryFieldDef ? fieldLabel(primaryFieldDef) : translate('cms.list.column.title')}\n sort={sort}\n onSort={onSort}\n sticky\n />\n {columns.map((name) => {\n const field = fieldByName(name)\n return field ? (\n <HeaderCell key={name} field={name} label={fieldLabel(field)} sort={sort} onSort={onSort} />\n ) : null\n })}\n <HeaderCell field={STATE_FIELD} label={translate('cms.list.column.state')} sort={sort} onSort={onSort} />\n {/* EC-216: derived URL — not a field, so not sortable. */}\n {urlByDocId ? (\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-muted-foreground\">{translate('cms.list.column.url')}</th>\n ) : null}\n </tr>\n </thead>\n <tbody>\n {sortedDocs.map((doc) => (\n <tr\n key={doc.id}\n className={cn(\n 'group border-b border-border/60 hover:bg-muted/40',\n selected.has(doc.id) && 'bg-primary/5',\n )}\n >\n <td className=\"px-3 py-2 align-middle\">\n <SelectionCheckbox\n checked={selected.has(doc.id)}\n label={translate('cms.list.selectRow', { id: doc.id })}\n testId={`select-row-${doc.id}`}\n onToggle={(shift) => onToggleRow(doc.id, shift)}\n />\n </td>\n <td className=\"px-3 py-2 align-middle\">\n <PrimaryCell\n projectId={projectId}\n collection={collection}\n doc={doc}\n primary={primary}\n depth={depthById?.get(doc.id) ?? 0}\n locale={source.activeLocale}\n config={source.localeConfig}\n detailPath={source.detailPath}\n />\n </td>\n {columns.map((name) => {\n const field = fieldByName(name)\n const coord = { docId: doc.id, field: name }\n const key = cellKey(coord)\n return (\n <td key={name} className=\"px-3 py-2 align-middle\">\n {field ? (\n <EditableCell\n collection={collection}\n doc={doc}\n field={field}\n editing={cellEdit.activeKey === key}\n busy={cellEdit.busyKey === key}\n errorMessage={cellEdit.errorOf(key)}\n onStartEdit={() => cellEdit.start(coord)}\n onCancel={() => cellEdit.cancel(coord)}\n onCommit={(value, advance) => cellEdit.commit(coord, value, advance)}\n />\n ) : null}\n </td>\n )\n })}\n <td className=\"px-3 py-2 align-middle\">\n <DocStateBadge\n published={\n source.publishing?.isPublished({ collection: collectionId, id: doc.id }) ?? false\n }\n />\n </td>\n {urlByDocId ? (\n <td className=\"px-3 py-2 align-middle\">\n <UrlCell url={urlByDocId.get(doc.id)} />\n </td>\n ) : null}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\n/**\n * A selection checkbox (row or select-all). Its own column and focus target —\n * it never participates in the cell-edit keyboard flow. Shift-click selects\n * the anchor→row range (the mousedown guard stops text selection).\n */\nfunction SelectionCheckbox({\n checked,\n indeterminate = false,\n label,\n testId,\n onToggle,\n}: {\n checked: boolean\n indeterminate?: boolean\n label: string\n testId: string\n onToggle: (shift: boolean) => void\n}) {\n return (\n <input\n ref={(el) => {\n if (el) el.indeterminate = indeterminate && !checked\n }}\n type=\"checkbox\"\n className=\"size-4 cursor-pointer accent-primary align-middle\"\n checked={checked}\n readOnly\n aria-label={label}\n data-testid={testId}\n onClick={(event) => onToggle(event.shiftKey)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n onToggle(event.shiftKey)\n }\n }}\n onMouseDown={(event) => {\n if (event.shiftKey) event.preventDefault()\n }}\n />\n )\n}\n\nfunction HeaderCell({\n field,\n label,\n sort,\n onSort,\n sticky,\n}: {\n field: string\n label: string\n sort: ViewSort | null\n onSort: (field: string) => void\n sticky?: boolean\n}) {\n const active = sort?.field === field\n return (\n <th className={cn('px-3 py-2 text-left text-xs font-semibold text-muted-foreground', sticky && 'min-w-[12rem]')}>\n <button type=\"button\" onClick={() => onSort(field)} className=\"inline-flex items-center gap-1 hover:text-foreground\">\n {label}\n {active ? (\n sort!.dir === 'asc' ? (\n <ArrowUp className=\"size-3\" />\n ) : (\n <ArrowDown className=\"size-3\" />\n )\n ) : null}\n </button>\n </th>\n )\n}\n\n/**\n * The primary (title) column cell: the document link, resolved in the\n * ambient active locale with a visible fallback chip when the shown title is\n * untranslated (EC-176).\n */\nfunction PrimaryCell({\n projectId,\n collection,\n doc,\n primary,\n depth = 0,\n locale,\n config,\n detailPath,\n}: {\n projectId: string\n collection: CollectionDef\n doc: CmsDocument\n primary: string\n /** EC-218: nesting depth in the hierarchy (tree mode) — indents the title. */\n depth?: number\n locale: Locale\n config: LocaleConfig\n /** Rail-owned detail route splat (AD-19); absent ⇒ the rail has no detail surface. */\n detailPath?: (id: string) => string\n}) {\n // EC-242: the title cell renders the document identity (resolveDocumentTitle) —\n // a string `titleField` or a function pattern — over the fallback-resolved\n // values, NOT the raw `primary` column value. The untranslated-title chip applies\n // only to a field-backed title (a function pattern has no single source field).\n const title = resolveDocumentTitle(\n collection,\n resolveDocumentForLocale(collection, doc, locale, config),\n doc.id,\n )\n const fallback =\n typeof collection.titleField === 'function'\n ? null\n : resolveDisplayedValue(collection, doc, primary, locale, config).fallback\n const splat = detailPath?.(doc.id)\n return (\n <Row gap=\"2\" align=\"center\" className=\"min-w-0\" style={{ paddingLeft: depth * 20 }}>\n {depth > 0 ? (\n <CornerDownRight className=\"size-3.5 shrink-0 text-muted-foreground\" aria-hidden />\n ) : null}\n {splat !== undefined ? (\n <Link\n to={STUDIO_PROJECT_ROUTE}\n params={{ projectId, _splat: splat }}\n className=\"truncate font-medium text-foreground hover:text-primary hover:underline\"\n >\n {title}\n </Link>\n ) : (\n <Text as=\"span\" className=\"truncate font-medium text-foreground\">\n {title}\n </Text>\n )}\n <FallbackChip fallback={fallback} testId={`cell-fallback-${doc.id}-${primary}`} />\n </Row>\n )\n}\n\n/**\n * The read-only URL column cell (EC-216): the document's LIVE (published) path,\n * linking to the absolute live URL when a `frontendUrl` is configured. Only\n * published documents have a `url` here (the URL is derived from the published\n * pool, EC-205), so an unpublished document — having no live page — shows a dash.\n * The URL is always derived, never stored.\n */\nfunction UrlCell({ url }: { url?: DocumentUrl }) {\n if (!url) {\n return (\n <Text size=\"xs\" tone=\"subtle\">\n —\n </Text>\n )\n }\n if (url.href) {\n return (\n <a\n href={url.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n title={url.href}\n className=\"inline-flex max-w-[18rem] items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground\"\n >\n <span className=\"truncate\">{url.path}</span>\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden />\n </a>\n )\n }\n return (\n <Text size=\"xs\" tone=\"muted\" className=\"max-w-[18rem] truncate\" title={url.path}>\n {url.path}\n </Text>\n )\n}\n\nexport type { FieldDef }\n"]}
@@ -8,7 +8,7 @@ import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter,
8
8
  import { getStudioRegistry } from '@elytracms/studio/lib/registry';
9
9
  import { collectEmbedRefs, resolveReuseCapability } from '../builder/reuse';
10
10
  import { cn } from '@elytracms/studio/lib/utils';
11
- import { localizedLabel } from '@elytracms/studio/lib/i18n';
11
+ import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
12
12
  import { LocaleSwitcher, displayedFieldFallback, hasLocaleVariant, localeChipLabel, setStudioLocale, } from '@elytracms/studio/lib/locale';
13
13
  import { parseDocumentFieldPath } from '@elytracms/studio/lib/references';
14
14
  import { FallbackChip, fallbackTitle } from './cell';
@@ -63,7 +63,7 @@ export function PortableDetailEditor({ source, projectId, documentId, focusPath,
63
63
  }
64
64
  /** The record-not-found state — a heading + a rail-owned "back to list" link. */
65
65
  function DocumentNotFound({ projectId, listPath, label, }) {
66
- return (_jsx("div", { className: "grid h-full place-items-center p-8", children: _jsxs(Stack, { gap: "3", align: "center", className: "text-center", children: [_jsx(Heading, { level: 2, size: "h2", children: "Not found" }), listPath !== undefined ? (_jsxs(Link, { to: STUDIO_PROJECT_ROUTE, params: { projectId, _splat: listPath }, className: "text-sm text-primary hover:underline", children: ["Back to ", label] })) : null] }) }));
66
+ return (_jsx("div", { className: "grid h-full place-items-center p-8", children: _jsxs(Stack, { gap: "3", align: "center", className: "text-center", children: [_jsx(Heading, { level: 2, size: "h2", children: translate('cms.editor.notFoundTitle') }), listPath !== undefined ? (_jsx(Link, { to: STUDIO_PROJECT_ROUTE, params: { projectId, _splat: listPath }, className: "text-sm text-primary hover:underline", children: translate('cms.editor.backToList', { label }) })) : null] }) }));
67
67
  }
68
68
  function EditorBody({ projectId, collection, doc, focusPath, }) {
69
69
  const source = useCollectionView();
@@ -373,7 +373,12 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
373
373
  localized &&
374
374
  hasLocaleVariant(draft, field.name, locale) &&
375
375
  !hasLocaleVariant(doc, field.name, locale);
376
- return (_jsxs(Field, { className: cn('rounded-md transition-shadow', highlightedField === field.name && 'bg-primary/5 p-2 ring-2 ring-primary/70'), label: _jsxs(Row, { gap: "2", children: [_jsx("span", { children: fieldLabel(field) }), field.validation?.required ? _jsx("span", { className: "text-destructive", children: "*" }) : null, localized ? _jsx(Badge, { variant: "outline", children: locale }) : null, fallback ? (_jsxs(Badge, { variant: "warning", title: fallbackTitle(fallback), "data-testid": `field-fallback-${field.name}`, children: ["showing ", localeChipLabel(fallback.sourceLocale)] })) : null, newlyTranslated ? (_jsxs(Badge, { variant: "success", "data-testid": `field-translated-${field.name}`, children: [_jsx(Languages, { className: "size-3" }), " translated to ", localeChipLabel(locale)] })) : null, fieldLevelReadOnly ? (_jsxs(Badge, { variant: "outline", children: [_jsx(Lock, { className: "size-3" }), " read-only"] })) : null, _jsx(Spacer, {})] }), htmlFor: `f-${field.name}`, hint: fallback ? (_jsxs(_Fragment, { children: ["Showing the ", localeChipLabel(fallback.sourceLocale), " (fallback) value \u2014 edit to translate to ", localeChipLabel(locale), ". Clearing the ", localeChipLabel(locale), " text falls back again."] })) : (localizedLabel(field.form?.description) || undefined), error: fieldReadOnly ? undefined : errorsByField.get(field.name), children: [_jsx(FieldControl, { id: `f-${field.name}`, field: field, value: getValue(field), onChange: (v) => setValue(field, v), readOnly: fieldReadOnly }), field.name === SLUG_FIELD && routableCollection ? _jsx(PathPreview, { url: draftUrl }) : null] }, field.name));
376
+ return (_jsxs(Field, { className: cn('rounded-md transition-shadow', highlightedField === field.name && 'bg-primary/5 p-2 ring-2 ring-primary/70'), label: _jsxs(Row, { gap: "2", children: [_jsx("span", { children: fieldLabel(field) }), field.validation?.required ? _jsx("span", { className: "text-destructive", children: "*" }) : null, localized ? _jsx(Badge, { variant: "outline", children: locale }) : null, fallback ? (_jsx(Badge, { variant: "warning", title: fallbackTitle(fallback), "data-testid": `field-fallback-${field.name}`, children: translate('cms.editor.fieldShowingFallback', {
377
+ locale: localeChipLabel(fallback.sourceLocale),
378
+ }) })) : null, newlyTranslated ? (_jsxs(Badge, { variant: "success", "data-testid": `field-translated-${field.name}`, children: [_jsx(Languages, { className: "size-3" }), ' ', translate('cms.editor.fieldTranslatedTo', { locale: localeChipLabel(locale) })] })) : null, fieldLevelReadOnly ? (_jsxs(Badge, { variant: "outline", children: [_jsx(Lock, { className: "size-3" }), " ", translate('cms.editor.readOnlyBadge')] })) : null, _jsx(Spacer, {})] }), htmlFor: `f-${field.name}`, hint: fallback ? (translate('cms.editor.fieldFallbackHint', {
379
+ source: localeChipLabel(fallback.sourceLocale),
380
+ locale: localeChipLabel(locale),
381
+ })) : (localizedLabel(field.form?.description) || undefined), error: fieldReadOnly ? undefined : errorsByField.get(field.name), children: [_jsx(FieldControl, { id: `f-${field.name}`, field: field, value: getValue(field), onChange: (v) => setValue(field, v), readOnly: fieldReadOnly }), field.name === SLUG_FIELD && routableCollection ? _jsx(PathPreview, { url: draftUrl }) : null] }, field.name));
377
382
  }
378
383
  function save() {
379
384
  source.save(draft);
@@ -394,7 +399,7 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
394
399
  // sidebar and the canvas view's sidebar.
395
400
  const versionsPane = useMemo(() => ({
396
401
  id: 'versions',
397
- label: 'Versions',
402
+ label: translate('cms.version.paneLabel'),
398
403
  icon: _jsx(History, { className: "size-3.5" }),
399
404
  render: () => _jsx(VersionsPane, {}),
400
405
  }), []);
@@ -404,7 +409,7 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
404
409
  // any tab; document-level issues (e.g. EC-260 nesting-depth) live only here.
405
410
  const issuesPane = useMemo(() => ({
406
411
  id: 'issues',
407
- label: 'Issues',
412
+ label: translate('cms.editor.issuesPane'),
408
413
  icon: _jsx(CircleAlert, { className: "size-3.5" }),
409
414
  badge: issues.length === 0 ? undefined : (_jsx(Badge, { variant: issues.some((i) => i.severity === 'error') ? 'error' : 'warning', className: "px-1.5 py-0 leading-none", children: issues.length })),
410
415
  render: () => (_jsx(IssuesPane, { issues: issues, collection: collection, onJumpToField: focusField })),
@@ -419,7 +424,7 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
419
424
  const detailsPane = hasAliases(collection) || visibleSidebarFields.length > 0
420
425
  ? {
421
426
  id: 'details',
422
- label: 'Details',
427
+ label: translate('cms.editor.detailsPane'),
423
428
  icon: _jsx(Tag, { className: "size-3.5" }),
424
429
  render: () => (_jsx(DetailsPane, { collection: collection, doc: draft, siblings: source.documents(), readOnly: viewReadOnly, fields: visibleSidebarFields, renderField: renderFieldRow, onAliasChange: (alias) => setDraft((d) => {
425
430
  const next = { ...d };
@@ -481,7 +486,9 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
481
486
  }
482
487
  catch (error) {
483
488
  setPublishState('idle');
484
- toast.error(error instanceof Error ? `Publish failed: ${error.message}` : 'Publish failed.');
489
+ toast.error(error instanceof Error
490
+ ? translate('cms.editor.publishFailedReason', { error: error.message })
491
+ : translate('cms.editor.publishFailed'));
485
492
  }
486
493
  }
487
494
  function handleConfirmedAction() {
@@ -582,26 +589,28 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
582
589
  setCompareTarget,
583
590
  exitCompare,
584
591
  }, children: _jsxs("div", { className: cn('flex h-full min-h-0 flex-col', viewReadOnly && 'bg-info/[0.04]'), children: [_jsxs("div", { className: "shrink-0 border-b border-border px-4 py-3 sm:px-6", children: [_jsxs(Row, { gap: "3", children: [_jsxs(Row, { gap: "2", align: "center", className: "min-w-0", children: [_jsx(Heading, { level: 1, size: "h2", className: "truncate", children: singleton ? localizedLabel(collection.form?.label, collection.id) : title || doc.id }), singleton ? null : _jsx(FallbackChip, { fallback: titleFallback, testId: "doc-title-fallback" })] }), _jsx(Spacer, {}), _jsx(Text, { size: "xs", tone: "muted", className: "whitespace-nowrap", "data-testid": "autosave-status", children: source.lastError
585
- ? 'Save failed'
592
+ ? translate('cms.editor.saveFailed')
586
593
  : explicitSave
587
594
  ? dirty
588
- ? 'Unsaved changes'
589
- : 'Saved'
595
+ ? translate('cms.editor.unsavedChanges')
596
+ : translate('cms.editor.saved')
590
597
  : dirty
591
- ? 'Saving…'
592
- : 'Saved' }), canPublish ? _jsx(DocStateBadge, { published: published }) : null, routableCollection ? (liveUrl?.href ? (_jsx(Button, { asChild: true, variant: "outline", size: "sm", title: `Open ${liveUrl.path}`, children: _jsxs("a", { href: liveUrl.href, target: "_blank", rel: "noreferrer", "data-testid": "view-live", children: [_jsx(ExternalLink, {}), " View live"] }) })) : (_jsxs(Button, { variant: "outline", size: "sm", disabled: true, "data-testid": "view-live-disabled", title: publishedDocs.status === 'loading'
593
- ? 'Loading the live URL…'
598
+ ? translate('cms.editor.saving')
599
+ : translate('cms.editor.saved') }), canPublish ? _jsx(DocStateBadge, { published: published }) : null, routableCollection ? (liveUrl?.href ? (_jsx(Button, { asChild: true, variant: "outline", size: "sm", title: translate('cms.editor.openLiveUrl', { path: liveUrl.path }), children: _jsxs("a", { href: liveUrl.href, target: "_blank", rel: "noreferrer", "data-testid": "view-live", children: [_jsx(ExternalLink, {}), " ", translate('cms.editor.viewLive')] }) })) : (_jsxs(Button, { variant: "outline", size: "sm", disabled: true, "data-testid": "view-live-disabled", title: publishedDocs.status === 'loading'
600
+ ? translate('cms.editor.loadingLiveUrl')
594
601
  : !published
595
- ? 'Publish to view the live page'
596
- : 'Set frontendUrl in elytra.config.ts to enable', children: [_jsx(ExternalLink, {}), " View live"] }))) : null, canPublish ? (_jsx(Button, { size: "sm", onClick: handlePublish, disabled: hasErrors || viewReadOnly || publishState === 'pending', title: viewReadOnly
597
- ? 'Switch to Draft to publish'
602
+ ? translate('cms.editor.publishToViewLive')
603
+ : translate('cms.editor.setFrontendUrlHint'), children: [_jsx(ExternalLink, {}), " ", translate('cms.editor.viewLive')] }))) : null, canPublish ? (_jsx(Button, { size: "sm", onClick: handlePublish, disabled: hasErrors || viewReadOnly || publishState === 'pending', title: viewReadOnly
604
+ ? translate('cms.editor.switchToDraftToPublish')
598
605
  : hasErrors
599
- ? `Fix ${errorCount} ${errorCount === 1 ? 'issue' : 'issues'} to publish`
600
- : undefined, children: publishState === 'pending' ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "animate-spin" }), " Publishing\u2026"] })) : publishState === 'success' ? (_jsxs(_Fragment, { children: [_jsx(CircleCheck, {}), " Published"] })) : (_jsxs(_Fragment, { children: [_jsx(Eye, {}), " Publish"] })) })) : null, explicitSave ? (_jsxs(Button, { size: "sm", onClick: save, disabled: !dirty, "data-testid": "doc-save", children: [_jsx(Check, {}), " Save"] })) : null, published || !singleton ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": "More actions", children: _jsx(MoreHorizontal, {}) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [published ? (_jsxs(DropdownMenuItem, { onClick: () => setConfirmAction('unpublish'), children: [_jsx(EyeOff, {}), " Unpublish"] })) : null, singleton ? null : (_jsxs(DropdownMenuItem, { "data-testid": "doc-delete", className: "text-destructive", onClick: () => setConfirmAction('delete'), children: [_jsx(Trash2, {}), " Delete"] }))] })] })) : null] }), showLensRow ? (_jsxs(Row, { gap: "3", className: "mt-3", wrap: true, children: [_jsxs(Row, { gap: "1", align: "center", children: [showContentTabs ? tabs.map((tab) => renderContentTab(tab)) : null, showReferences ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "mx-1 h-4 w-px bg-border", "aria-hidden": true }), renderContentTab(REFERENCES_TAB)] })) : null, compare ? (_jsxs("span", { className: cn('inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium transition-colors', activeTab === COMPARE_TAB
606
+ ? translate(errorCount === 1
607
+ ? 'cms.editor.fixIssuesToPublish.one'
608
+ : 'cms.editor.fixIssuesToPublish.other', { count: errorCount })
609
+ : undefined, children: publishState === 'pending' ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "animate-spin" }), " ", translate('cms.editor.publishing')] })) : publishState === 'success' ? (_jsxs(_Fragment, { children: [_jsx(CircleCheck, {}), " ", translate('cms.editor.publishedState')] })) : (_jsxs(_Fragment, { children: [_jsx(Eye, {}), " ", translate('cms.editor.publish')] })) })) : null, explicitSave ? (_jsxs(Button, { size: "sm", onClick: save, disabled: !dirty, "data-testid": "doc-save", children: [_jsx(Check, {}), " ", translate('common.save')] })) : null, published || !singleton ? (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon-sm", "aria-label": translate('cms.editor.moreActions'), children: _jsx(MoreHorizontal, {}) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [published ? (_jsxs(DropdownMenuItem, { onClick: () => setConfirmAction('unpublish'), children: [_jsx(EyeOff, {}), " ", translate('cms.editor.unpublish')] })) : null, singleton ? null : (_jsxs(DropdownMenuItem, { "data-testid": "doc-delete", className: "text-destructive", onClick: () => setConfirmAction('delete'), children: [_jsx(Trash2, {}), " ", translate('common.delete')] }))] })] })) : null] }), showLensRow ? (_jsxs(Row, { gap: "3", className: "mt-3", wrap: true, children: [_jsxs(Row, { gap: "1", align: "center", children: [showContentTabs ? tabs.map((tab) => renderContentTab(tab)) : null, showReferences ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "mx-1 h-4 w-px bg-border", "aria-hidden": true }), renderContentTab(REFERENCES_TAB)] })) : null, compare ? (_jsxs("span", { className: cn('inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium transition-colors', activeTab === COMPARE_TAB
601
610
  ? 'bg-accent text-accent-foreground'
602
- : 'text-muted-foreground hover:bg-muted'), children: [_jsxs("button", { type: "button", onClick: () => setActiveTab(COMPARE_TAB), "aria-pressed": activeTab === COMPARE_TAB, className: "inline-flex items-center gap-1", children: [_jsx(GitCompareArrows, { className: "size-3", "aria-hidden": true }), " Compare"] }), _jsx("button", { type: "button", onClick: exitCompare, "aria-label": "Close compare", className: "ml-0.5 rounded p-0.5 hover:bg-background/40", children: _jsx(X, { className: "size-3" }) })] })) : null] }), _jsx(Spacer, {}), canLocales ? _jsx(LocaleSwitcher, {}) : null, canPublish ? (_jsxs(Row, { gap: "px", className: "rounded-md bg-muted/60 p-0.5", children: [_jsx(PerspectiveButton, { label: "Draft", active: perspective === 'draft', onClick: () => setPerspective('draft') }), _jsx(PerspectiveButton, { label: "Published", active: perspective === 'published', accent: "info", disabled: !published, title: published ? undefined : 'Publish this document to view its published version', onClick: () => setPerspective('published') })] })) : null] })) : null] }), viewReadOnly ? (_jsxs(Row, { gap: "2", className: "shrink-0 border-b border-info/30 bg-info/10 px-4 py-1.5 text-info sm:px-6", "data-testid": "published-view-banner", children: [_jsx(Lock, { className: "size-3.5 shrink-0", "aria-hidden": true }), _jsx(Text, { size: "xs", className: "text-info", children: "Viewing the published version \u2014 read-only." }), _jsx(Spacer, {}), _jsx("button", { type: "button", onClick: () => setPerspective('draft'), className: "text-xs font-medium underline-offset-2 hover:underline", children: "Switch to Draft" })] })) : null, publishedPending ? (_jsx("div", { className: "grid min-h-0 flex-1 place-items-center p-8", children: _jsx(Text, { size: "sm", tone: "muted", children: publishedSnapshot.status === 'loading'
603
- ? 'Loading the published version…'
604
- : 'No published version found for this document.' }) })) : activeTab === COMPARE_TAB && compare ? (
611
+ : 'text-muted-foreground hover:bg-muted'), children: [_jsxs("button", { type: "button", onClick: () => setActiveTab(COMPARE_TAB), "aria-pressed": activeTab === COMPARE_TAB, className: "inline-flex items-center gap-1", children: [_jsx(GitCompareArrows, { className: "size-3", "aria-hidden": true }), " ", translate('cms.version.compare')] }), _jsx("button", { type: "button", onClick: exitCompare, "aria-label": translate('cms.version.closeCompare'), className: "ml-0.5 rounded p-0.5 hover:bg-background/40", children: _jsx(X, { className: "size-3" }) })] })) : null] }), _jsx(Spacer, {}), canLocales ? _jsx(LocaleSwitcher, {}) : null, canPublish ? (_jsxs(Row, { gap: "px", className: "rounded-md bg-muted/60 p-0.5", children: [_jsx(PerspectiveButton, { label: translate('cms.editor.draftState'), active: perspective === 'draft', onClick: () => setPerspective('draft') }), _jsx(PerspectiveButton, { label: translate('cms.editor.publishedState'), active: perspective === 'published', accent: "info", disabled: !published, title: published ? undefined : translate('cms.editor.publishToViewPublished'), onClick: () => setPerspective('published') })] })) : null] })) : null] }), viewReadOnly ? (_jsxs(Row, { gap: "2", className: "shrink-0 border-b border-info/30 bg-info/10 px-4 py-1.5 text-info sm:px-6", "data-testid": "published-view-banner", children: [_jsx(Lock, { className: "size-3.5 shrink-0", "aria-hidden": true }), _jsx(Text, { size: "xs", className: "text-info", children: translate('cms.editor.publishedReadOnlyBanner') }), _jsx(Spacer, {}), _jsx("button", { type: "button", onClick: () => setPerspective('draft'), className: "text-xs font-medium underline-offset-2 hover:underline", children: translate('cms.editor.switchToDraft') })] })) : null, publishedPending ? (_jsx("div", { className: "grid min-h-0 flex-1 place-items-center p-8", children: _jsx(Text, { size: "sm", tone: "muted", children: publishedSnapshot.status === 'loading'
612
+ ? translate('cms.editor.loadingPublishedVersion')
613
+ : translate('cms.editor.noPublishedVersion') }) })) : activeTab === COMPARE_TAB && compare ? (
605
614
  // EC-298: the version compare view takes over the main area, with the
606
615
  // shared inspector (Versions pane) staying on as the navigator — an
607
616
  // in-app surface, not a modal, so arbitrary versions can be browsed.
@@ -624,14 +633,16 @@ function EditorBody({ projectId, collection, doc, focusPath, }) {
624
633
  }) }) }) }), _jsx(InspectorSidebar, { panes: trailingPanes, activeId: inspectorPaneId, onActiveChange: setInspectorPaneId, className: "w-[320px] shrink-0 border-l border-border" })] })), explicitSave ? (_jsx(UnsavedChangesGuard, { when: dirty, onSave: () => {
625
634
  save();
626
635
  return true;
627
- }, description: "You have unsaved changes to this record. Save them before leaving, or discard them." })) : null, confirmAction !== null ? (_jsx(ReferenceConfirmDialog, { projectId: projectId, action: confirmAction, targets: confirmTargets, open: true, onOpenChange: (open) => {
636
+ }, description: translate('cms.editor.unsavedChangesGuard') })) : null, confirmAction !== null ? (_jsx(ReferenceConfirmDialog, { projectId: projectId, action: confirmAction, targets: confirmTargets, open: true, onOpenChange: (open) => {
628
637
  if (!open)
629
638
  setConfirmAction(null);
630
639
  }, onConfirm: handleConfirmedAction })) : null, _jsx(Dialog, { open: publishConfirm, onOpenChange: (open) => { if (!open)
631
- setPublishConfirm(false); }, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Publish with unpublished references?" }), _jsx(DialogDescription, { children: "This page references content that isn\u2019t published yet \u2014 those sections will be empty on the live site until you publish it too." })] }), _jsxs(Stack, { gap: "1", children: [referenceIssues.map((issue, i) => (_jsxs(Text, { size: "xs", tone: "muted", children: ["\u2022 ", issue.message] }, `${issue.meta?.id ?? i}`))), schemaIssues.length > 0 ? (_jsxs(Text, { size: "xs", tone: "muted", className: "mt-1", children: ["This page also has ", schemaIssues.length, " other unresolved", ' ', schemaIssues.length === 1 ? 'issue' : 'issues', " \u2014 see the Issues tab."] })) : null] }), _jsxs(DialogFooter, { className: "mt-4", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setPublishConfirm(false), children: "Cancel" }), _jsx(Button, { size: "sm", "data-testid": "publish-anyway", onClick: () => {
640
+ setPublishConfirm(false); }, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: translate('cms.editor.publishUnpublishedRefsTitle') }), _jsx(DialogDescription, { children: translate('cms.editor.publishUnpublishedRefsDescription') })] }), _jsxs(Stack, { gap: "1", children: [referenceIssues.map((issue, i) => (_jsxs(Text, { size: "xs", tone: "muted", children: ["\u2022 ", issue.message] }, `${issue.meta?.id ?? i}`))), schemaIssues.length > 0 ? (_jsx(Text, { size: "xs", tone: "muted", className: "mt-1", children: translate(schemaIssues.length === 1
641
+ ? 'cms.editor.publishAlsoHasIssues.one'
642
+ : 'cms.editor.publishAlsoHasIssues.other', { count: schemaIssues.length }) })) : null] }), _jsxs(DialogFooter, { className: "mt-4", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setPublishConfirm(false), children: translate('common.cancel') }), _jsx(Button, { size: "sm", "data-testid": "publish-anyway", onClick: () => {
632
643
  setPublishConfirm(false);
633
644
  void doPublish();
634
- }, children: "Publish anyway" })] })] }) })] }) }));
645
+ }, children: translate('cms.editor.publishAnyway') })] })] }) })] }) }));
635
646
  }
636
647
  /**
637
648
  * EC-300/AD-16 — errors for composition embeds (hard references) whose target isn't
@@ -669,8 +680,8 @@ function unpublishedEmbedIssue(collection, draft, field, ref, exists, source) {
669
680
  code: exists ? 'unpublished-relation-target' : 'unknown-relation-target',
670
681
  severity: 'error',
671
682
  message: exists
672
- ? `Embeds the reusable “${source.titleOf(ref)}”, which isn’t published — it will be empty on the live site until you publish it.`
673
- : `Embeds a reusable that no longer exists (“${ref.id}”) — fix or remove the embed.`,
683
+ ? translate('cms.editor.embedUnpublishedIssue', { title: source.titleOf(ref) })
684
+ : translate('cms.editor.embedMissingIssue', { id: ref.id }),
674
685
  path: [field],
675
686
  collectionId: collection.id,
676
687
  documentId: draft.id,
@@ -697,7 +708,7 @@ function PerspectiveButton({ label, active, accent, disabled, title, onClick, })
697
708
  * hierarchy page), a hint explains where the URL comes from.
698
709
  */
699
710
  function PathPreview({ url }) {
700
- return (_jsxs(Row, { gap: "1", className: "text-xs text-muted-foreground", "data-testid": "slug-path-preview", children: [_jsx(Link2, { className: "size-3 shrink-0", "aria-hidden": true }), url ? (_jsxs(Text, { as: "span", size: "xs", tone: "muted", className: "min-w-0 truncate", title: url.path, children: ["Served at ", _jsx("span", { className: "font-medium text-foreground/80", children: url.path })] })) : (_jsx(Text, { as: "span", size: "xs", tone: "muted", children: "The URL is derived from the slug (and parent) \u2014 set a slug to define it." }))] }));
711
+ return (_jsxs(Row, { gap: "1", className: "text-xs text-muted-foreground", "data-testid": "slug-path-preview", children: [_jsx(Link2, { className: "size-3 shrink-0", "aria-hidden": true }), url ? (_jsxs(Text, { as: "span", size: "xs", tone: "muted", className: "min-w-0 truncate", title: url.path, children: ["Served at ", _jsx("span", { className: "font-medium text-foreground/80", children: url.path })] })) : (_jsx(Text, { as: "span", size: "xs", tone: "muted", children: translate('cms.editor.slugUrlHint') }))] }));
701
712
  }
702
713
  function groupFields(fields, collection) {
703
714
  const order = groupOrder(collection.form);