@elytracms/studio 0.0.52 → 0.0.54
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/dist/components/account/account-settings.js +4 -4
- package/dist/components/account/credential-panel.js +1 -1
- package/dist/components/account/self-account-view-source.js +3 -3
- package/dist/components/ai/ai-chat-panel-lazy.js +1 -1
- package/dist/components/ai/ai-chat-panel.js +4 -4
- package/dist/components/ai/ai-cms-panel.js +1 -1
- package/dist/components/ai/proposal-card.js +4 -4
- package/dist/components/ai/translate-document-action.js +1 -1
- package/dist/components/ai/translate-document-dialog.d.ts +1 -1
- package/dist/components/app-views/default-modules.d.ts +3 -3
- package/dist/components/app-views/default-modules.js +20 -20
- package/dist/components/app-views/sidebar.d.ts +1 -1
- package/dist/components/app-views/sidebar.js +2 -2
- package/dist/components/app-views/studio-config.d.ts +1 -1
- package/dist/components/assets/asset-detail.js +9 -9
- package/dist/components/assets/asset-grid.js +7 -7
- package/dist/components/assets/asset-thumb.d.ts +1 -1
- package/dist/components/assets/asset-thumb.js +2 -2
- package/dist/components/assets/assets-collection-view-source.js +3 -3
- package/dist/components/assets/assets-module.js +8 -8
- package/dist/components/assets/assets-store.d.ts +1 -1
- package/dist/components/assets/assets-store.js +1 -1
- package/dist/components/builder/blocks-model.js +1 -1
- package/dist/components/builder/blocks-panel.d.ts +1 -1
- package/dist/components/builder/blocks-panel.js +6 -6
- package/dist/components/builder/canvas.js +11 -11
- package/dist/components/builder/clipboard-actions.js +2 -2
- package/dist/components/builder/composition-field-editor-lazy.d.ts +1 -1
- package/dist/components/builder/composition-field-editor-lazy.js +1 -1
- package/dist/components/builder/composition-field-editor.d.ts +1 -1
- package/dist/components/builder/composition-field-editor.js +9 -9
- package/dist/components/builder/insert-context.d.ts +2 -2
- package/dist/components/builder/insert-context.js +2 -2
- package/dist/components/builder/insert-menu.d.ts +2 -2
- package/dist/components/builder/insert-menu.js +1 -1
- package/dist/components/builder/layout-inspector.js +1 -1
- package/dist/components/builder/page-tree.js +5 -5
- package/dist/components/builder/property-inspector.js +3 -3
- package/dist/components/builder/reuse-context.d.ts +1 -1
- package/dist/components/builder/reuse-context.js +3 -3
- package/dist/components/builder/spacing-handles.js +2 -2
- package/dist/components/cms/asset-picker.js +4 -4
- package/dist/components/cms/bulk-actions.js +1 -1
- package/dist/components/cms/bulk-bar.d.ts +1 -1
- package/dist/components/cms/bulk-bar.js +3 -3
- package/dist/components/cms/cell-edit.js +1 -1
- package/dist/components/cms/cell.js +2 -2
- package/dist/components/cms/cms-index.js +1 -1
- package/dist/components/cms/cms-store.d.ts +2 -2
- package/dist/components/cms/cms-store.js +6 -6
- package/dist/components/cms/collection-table.js +17 -17
- package/dist/components/cms/detail-editor.js +31 -31
- package/dist/components/cms/document-diff-view.js +4 -4
- package/dist/components/cms/editable-cell.d.ts +1 -1
- package/dist/components/cms/editable-cell.js +6 -6
- package/dist/components/cms/field-control.js +15 -15
- package/dist/components/cms/field-renderer.d.ts +2 -2
- package/dist/components/cms/filter-builder.js +3 -3
- package/dist/components/cms/import-export.js +1 -1
- package/dist/components/cms/issues-pane.js +1 -1
- package/dist/components/cms/prop-fields.js +3 -3
- package/dist/components/cms/reference-confirm.js +1 -1
- package/dist/components/cms/relation-picker.js +1 -1
- package/dist/components/cms/rich-text/block-commands.d.ts +1 -1
- package/dist/components/cms/rich-text/component-embed.js +2 -2
- package/dist/components/cms/rich-text/editor.js +8 -8
- package/dist/components/cms/rich-text/embed-inspector.d.ts +1 -1
- package/dist/components/cms/rich-text/embed-inspector.js +2 -2
- package/dist/components/cms/rich-text/embed-picker.js +1 -1
- package/dist/components/cms/rich-text/embed-props.js +1 -1
- package/dist/components/cms/rich-text/extensions.d.ts +1 -1
- package/dist/components/cms/rich-text/extensions.js +4 -4
- package/dist/components/cms/rich-text/index.d.ts +1 -1
- package/dist/components/cms/rich-text/index.js +1 -1
- package/dist/components/cms/rich-text/insert.d.ts +1 -1
- package/dist/components/cms/rich-text/lazy.d.ts +1 -1
- package/dist/components/cms/rich-text/lazy.js +1 -1
- package/dist/components/cms/rich-text/slash-command.js +1 -1
- package/dist/components/cms/rich-text/toolbar.d.ts +1 -1
- package/dist/components/cms/rich-text/toolbar.js +4 -4
- package/dist/components/cms/use-cell-edit.d.ts +1 -1
- package/dist/components/cms/use-cell-edit.js +2 -2
- package/dist/components/cms/use-compare-selection.d.ts +1 -1
- package/dist/components/cms/use-discard-controller.d.ts +1 -1
- package/dist/components/cms/use-discard-controller.js +2 -2
- package/dist/components/cms/use-document-versions.d.ts +1 -1
- package/dist/components/cms/use-document-versions.js +1 -1
- package/dist/components/cms/use-embed-inspector-host.d.ts +1 -1
- package/dist/components/cms/use-published-perspective.d.ts +2 -2
- package/dist/components/cms/use-published-perspective.js +2 -2
- package/dist/components/cms/use-restore-version.js +1 -1
- package/dist/components/cms/version-compare-lazy.js +1 -1
- package/dist/components/cms/version-compare.js +6 -6
- package/dist/components/cms/versions-model.d.ts +1 -1
- package/dist/components/cms/versions-pane.js +5 -5
- package/dist/components/cms/view-bar.js +2 -2
- package/dist/components/collab/collab-context.js +1 -1
- package/dist/components/collection-view/cms-collection-view-source.js +2 -2
- package/dist/components/components/component-preview.js +3 -3
- package/dist/components/components/components-index.js +2 -2
- package/dist/components/components/registry-browser.js +2 -2
- package/dist/components/components/transfer-dialog.js +5 -5
- package/dist/components/components/transfer.js +4 -4
- package/dist/components/current-user-menu.js +2 -2
- package/dist/components/delivery-health-banner.js +2 -2
- package/dist/components/operation-error.js +1 -1
- package/dist/components/project-list.js +5 -5
- package/dist/components/project-session.js +1 -1
- package/dist/components/project-switcher.js +3 -3
- package/dist/components/rail-store-status.js +1 -1
- package/dist/components/redirects/redirects-collection-view-source.js +3 -3
- package/dist/components/redirects/redirects-module.js +6 -6
- package/dist/components/section-nav.js +3 -3
- package/dist/components/section-surface.js +1 -1
- package/dist/components/studio-project-screen.js +7 -7
- package/dist/components/studio-shell.js +9 -9
- package/dist/components/use-hydration-phase.js +1 -1
- package/dist/components/users/users-collection-view-source.js +4 -4
- package/dist/components/users/users-module.js +9 -9
- package/dist/components/workspace-projects.js +1 -1
- package/dist/customization.d.ts +9 -9
- package/dist/customization.js +5 -5
- package/dist/lib/ai/anthropic-provider.d.ts +1 -1
- package/dist/lib/ai/apply-content.d.ts +1 -1
- package/dist/lib/ai/apply-content.js +3 -3
- package/dist/lib/ai/chat-state.d.ts +2 -2
- package/dist/lib/ai/config.d.ts +1 -1
- package/dist/lib/ai/convex-session-headers.d.ts +68 -0
- package/dist/lib/ai/convex-session-headers.js +79 -0
- package/dist/lib/ai/convex-session-headers.js.map +1 -0
- package/dist/lib/ai/convex-session.d.ts +82 -0
- package/dist/lib/ai/convex-session.js +92 -0
- package/dist/lib/ai/convex-session.js.map +1 -0
- package/dist/lib/ai/create-flow.d.ts +2 -2
- package/dist/lib/ai/create-flow.js +3 -3
- package/dist/lib/ai/fake-provider.d.ts +1 -1
- package/dist/lib/ai/index.d.ts +27 -16
- package/dist/lib/ai/index.js +27 -16
- package/dist/lib/ai/index.js.map +1 -1
- package/dist/lib/ai/knowledge.d.ts +1 -1
- package/dist/lib/ai/node-handler.d.ts +29 -0
- package/dist/lib/ai/node-handler.js +48 -0
- package/dist/lib/ai/node-handler.js.map +1 -0
- package/dist/lib/ai/provenance.d.ts +1 -1
- package/dist/lib/ai/route-provider.d.ts +1 -1
- package/dist/lib/ai/route.d.ts +1 -1
- package/dist/lib/ai/shape.d.ts +1 -1
- package/dist/lib/ai/translate-document.d.ts +1 -1
- package/dist/lib/ai/translate-document.js +3 -3
- package/dist/lib/ai/vite.d.ts +32 -0
- package/dist/lib/ai/vite.js +97 -0
- package/dist/lib/ai/vite.js.map +1 -0
- package/dist/lib/ai-panel.js +1 -1
- package/dist/lib/assets/index.d.ts +4 -4
- package/dist/lib/assets/index.js +4 -4
- package/dist/lib/assets/upload.d.ts +2 -2
- package/dist/lib/assets/upload.js +2 -2
- package/dist/lib/auth/convex-auth-adapter.d.ts +2 -2
- package/dist/lib/auth/convex-auth-adapter.js +1 -1
- package/dist/lib/auth/dev-auto-login-adapter.d.ts +1 -1
- package/dist/lib/auth/index.d.ts +9 -9
- package/dist/lib/auth/index.js +10 -10
- package/dist/lib/auth/local-auth-adapter.d.ts +1 -1
- package/dist/lib/auth/route-guard.d.ts +1 -1
- package/dist/lib/auth-errors.d.ts +1 -1
- package/dist/lib/clipboard/index.d.ts +3 -3
- package/dist/lib/clipboard/index.js +3 -3
- package/dist/lib/cms/published-documents.d.ts +1 -1
- package/dist/lib/cms-views/index.d.ts +2 -2
- package/dist/lib/cms-views/index.js +2 -2
- package/dist/lib/collection-view/collection-view-source.d.ts +4 -4
- package/dist/lib/data/collection-content.js +1 -1
- package/dist/lib/data/data-store.js +6 -6
- package/dist/lib/data/index.d.ts +4 -4
- package/dist/lib/data/index.js +4 -4
- package/dist/lib/data/sample-capture.js +4 -4
- package/dist/lib/data/sources-store.d.ts +1 -1
- package/dist/lib/diff-view-preference.js +1 -1
- package/dist/lib/dnd/gap-drag.d.ts +1 -1
- package/dist/lib/i18n/i18n.d.ts +1 -1
- package/dist/lib/i18n/i18n.js +1 -1
- package/dist/lib/i18n/index.d.ts +4 -4
- package/dist/lib/i18n/index.js +3 -3
- package/dist/lib/i18n/messages.en.d.ts +1 -1
- package/dist/lib/i18n/messages.en.js +1 -1
- package/dist/lib/locale/binding-fallback.d.ts +1 -1
- package/dist/lib/locale/binding-fallback.js +2 -2
- package/dist/lib/locale/index.d.ts +6 -6
- package/dist/lib/locale/index.js +6 -6
- package/dist/lib/locale/locale-switcher.js +3 -3
- package/dist/lib/locale/use-studio-locale.js +1 -1
- package/dist/lib/operations/asset-repository.d.ts +1 -1
- package/dist/lib/operations/cms-persistence.d.ts +1 -1
- package/dist/lib/operations/cms-persistence.js +1 -1
- package/dist/lib/operations/index.d.ts +6 -6
- package/dist/lib/operations/index.js +6 -6
- package/dist/lib/operations/session-hydration.d.ts +1 -1
- package/dist/lib/operations/session-hydration.js +1 -1
- package/dist/lib/operations/studio-operations.d.ts +1 -1
- package/dist/lib/operations/studio-operations.js +3 -3
- package/dist/lib/persistence/convex-adapter.js +2 -2
- package/dist/lib/persistence/convex-blob-storage.d.ts +1 -1
- package/dist/lib/persistence/convex-blob-storage.js +1 -1
- package/dist/lib/persistence/deployment-readiness.d.ts +2 -2
- package/dist/lib/persistence/index.d.ts +6 -6
- package/dist/lib/persistence/index.js +7 -7
- package/dist/lib/persona/labels.js +1 -1
- package/dist/lib/query/index.d.ts +2 -2
- package/dist/lib/query/index.js +1 -1
- package/dist/lib/rail.js +1 -1
- package/dist/lib/references/impact.d.ts +1 -1
- package/dist/lib/references/impact.js +1 -1
- package/dist/lib/references/index.d.ts +3 -3
- package/dist/lib/references/index.js +3 -3
- package/dist/lib/references/references-store.d.ts +2 -2
- package/dist/lib/references/references-store.js +3 -3
- package/dist/lib/registry/index.js +2 -2
- package/dist/lib/theme.js +1 -1
- package/dist/lib/webhooks/config.d.ts +1 -1
- package/dist/lib/webhooks/config.js +2 -2
- package/dist/lib/webhooks/dispatcher.js +2 -2
- package/dist/lib/webhooks/index.d.ts +6 -6
- package/dist/lib/webhooks/index.js +4 -4
- package/dist/lib/workspace/index.d.ts +7 -7
- package/dist/lib/workspace/index.js +3 -3
- package/dist/lib/workspace/switcher-source.d.ts +1 -1
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.js +1 -1
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/collapsible-section.js +2 -2
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/index.d.ts +19 -19
- package/dist/ui/index.js +19 -19
- package/dist/ui/input.js +1 -1
- package/dist/ui/inspector.js +1 -1
- package/dist/ui/layout.js +1 -1
- package/dist/ui/panel.js +2 -2
- package/dist/ui/popover.js +1 -1
- package/dist/ui/row-item.js +2 -2
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/toolbar.js +2 -2
- package/dist/ui/typography.js +1 -1
- package/package.json +13 -5
- package/dist/components/assets/asset-library.d.ts +0 -14
- package/dist/components/assets/asset-library.js +0 -202
- package/dist/components/assets/asset-library.js.map +0 -1
- package/dist/components/backend-gate.d.ts +0 -19
- package/dist/components/backend-gate.js +0 -64
- package/dist/components/backend-gate.js.map +0 -1
- package/dist/components/builder/composition-scope.d.ts +0 -16
- package/dist/components/builder/composition-scope.js +0 -7
- package/dist/components/builder/composition-scope.js.map +0 -1
- package/dist/components/cms/alias-selector.d.ts +0 -20
- package/dist/components/cms/alias-selector.js +0 -34
- package/dist/components/cms/alias-selector.js.map +0 -1
- package/dist/components/cms/collections-sidebar.d.ts +0 -18
- package/dist/components/cms/collections-sidebar.js +0 -36
- package/dist/components/cms/collections-sidebar.js.map +0 -1
- package/dist/components/cms/new-page-dialog.d.ts +0 -22
- package/dist/components/cms/new-page-dialog.js +0 -42
- package/dist/components/cms/new-page-dialog.js.map +0 -1
- package/dist/components/cms/rich-text/embed-control.d.ts +0 -17
- package/dist/components/cms/rich-text/embed-control.js +0 -62
- package/dist/components/cms/rich-text/embed-control.js.map +0 -1
- package/dist/components/cms/rich-text/image-control.d.ts +0 -16
- package/dist/components/cms/rich-text/image-control.js +0 -36
- package/dist/components/cms/rich-text/image-control.js.map +0 -1
- package/dist/components/components/fixture-runner.d.ts +0 -10
- package/dist/components/components/fixture-runner.js +0 -27
- package/dist/components/components/fixture-runner.js.map +0 -1
- package/dist/components/references/builder-deep-link.d.ts +0 -12
- package/dist/components/references/builder-deep-link.js +0 -53
- package/dist/components/references/builder-deep-link.js.map +0 -1
- package/dist/components/routes/redirect-chain.d.ts +0 -9
- package/dist/components/routes/redirect-chain.js +0 -16
- package/dist/components/routes/redirect-chain.js.map +0 -1
- package/dist/components/routes/redirect-manager.d.ts +0 -13
- package/dist/components/routes/redirect-manager.js +0 -24
- package/dist/components/routes/redirect-manager.js.map +0 -1
- package/dist/components/routes/route-list.d.ts +0 -35
- package/dist/components/routes/route-list.js +0 -69
- package/dist/components/routes/route-list.js.map +0 -1
- package/dist/components/routes/routes-shell.d.ts +0 -14
- package/dist/components/routes/routes-shell.js +0 -68
- package/dist/components/routes/routes-shell.js.map +0 -1
- package/dist/components/sections.d.ts +0 -37
- package/dist/components/sections.js +0 -62
- package/dist/components/sections.js.map +0 -1
- package/dist/components/users/user-search.d.ts +0 -8
- package/dist/components/users/user-search.js +0 -13
- package/dist/components/users/user-search.js.map +0 -1
- package/dist/components/workspace-gate.d.ts +0 -12
- package/dist/components/workspace-gate.js +0 -28
- package/dist/components/workspace-gate.js.map +0 -1
- package/dist/lib/cms-views/views-store.d.ts +0 -70
- package/dist/lib/cms-views/views-store.js +0 -129
- package/dist/lib/cms-views/views-store.js.map +0 -1
- package/dist/lib/operations/graph-commands.d.ts +0 -136
- package/dist/lib/operations/graph-commands.js +0 -85
- package/dist/lib/operations/graph-commands.js.map +0 -1
- package/dist/lib/operations/graph-persistence.d.ts +0 -27
- package/dist/lib/operations/graph-persistence.js +0 -35
- package/dist/lib/operations/graph-persistence.js.map +0 -1
- package/dist/lib/routing/index.d.ts +0 -10
- package/dist/lib/routing/index.js +0 -11
- package/dist/lib/routing/index.js.map +0 -1
- package/dist/lib/routing/routing-analysis.d.ts +0 -26
- package/dist/lib/routing/routing-analysis.js +0 -37
- package/dist/lib/routing/routing-analysis.js.map +0 -1
- package/dist/lib/routing/routing-store.d.ts +0 -50
- package/dist/lib/routing/routing-store.js +0 -72
- package/dist/lib/routing/routing-store.js.map +0 -1
- package/dist/lib/working-graph.d.ts +0 -82
- package/dist/lib/working-graph.js +0 -113
- package/dist/lib/working-graph.js.map +0 -1
|
@@ -5,8 +5,8 @@ import { DEFAULT_SLOT, isLayoutContainerNode, staticProp } from '@elytracms/core
|
|
|
5
5
|
import { containerFlowAxis } from '@elytracms/studio/lib/dnd/drop-rules';
|
|
6
6
|
import { containerGapStep, gapHandleSpots, gapStepCss, gapStepFromDrag, } from '@elytracms/studio/lib/dnd/gap-drag';
|
|
7
7
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
8
|
-
import { useBuilder } from './builder-store';
|
|
9
|
-
import { GAP_LABEL_KEYS, GAP_NONE_LABEL_KEY } from './layout-inspector';
|
|
8
|
+
import { useBuilder } from './builder-store.js';
|
|
9
|
+
import { GAP_LABEL_KEYS, GAP_NONE_LABEL_KEY } from './layout-inspector.js';
|
|
10
10
|
/**
|
|
11
11
|
* Tokenized spacing handles (EC-163, vision §3.1 / AD-10): when a Stack/Grid
|
|
12
12
|
* container is selected on the canvas, draggable gap handles appear between
|
|
@@ -4,10 +4,10 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
4
4
|
import { Button, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Row, Spacer, Stack, Text, } from '@elytracms/studio/ui';
|
|
5
5
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
|
-
import { filterAssets } from '../assets/asset-search';
|
|
8
|
-
import { AssetsProvider, useAssets, useOptionalAssets } from '../assets/assets-store';
|
|
9
|
-
import { newlyAddedAssetIds } from '../assets/focal-point';
|
|
10
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
7
|
+
import { filterAssets } from '../assets/asset-search.js';
|
|
8
|
+
import { AssetsProvider, useAssets, useOptionalAssets } from '../assets/assets-store.js';
|
|
9
|
+
import { newlyAddedAssetIds } from '../assets/focal-point.js';
|
|
10
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
11
11
|
/**
|
|
12
12
|
* Pick an asset for a CMS `asset` field (brief §8.4, §8.6, EC-075 → EC-152).
|
|
13
13
|
* Backed by the *real* asset library (the assets store over the operations
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CollectionDef } from '@elytracms/core/cms-core';
|
|
2
2
|
import type { FilterScalar } from '@elytracms/core/content';
|
|
3
3
|
import type { FilterableFieldOption } from '@elytracms/studio/lib/cms-views';
|
|
4
|
-
import type { BulkAction, BulkReport, BulkSetField } from './bulk-actions';
|
|
4
|
+
import type { BulkAction, BulkReport, BulkSetField } from './bulk-actions.js';
|
|
5
5
|
/**
|
|
6
6
|
* The scalar filterable fields a bulk set-field may target (EC-247): the
|
|
7
7
|
* schema's `filterable` fields whose type edits inline (text/number/boolean/
|
|
@@ -4,9 +4,9 @@ import { Check, CheckCircle2, CircleSlash, PencilLine, Trash2, X } from 'lucide-
|
|
|
4
4
|
import { Badge, Button, Code, Row, Select, Spacer, Stack, Text } from '@elytracms/studio/ui';
|
|
5
5
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
6
6
|
import { filterableFieldOptions } from '@elytracms/studio/lib/cms-views';
|
|
7
|
-
import { bulkSummary } from './bulk-actions';
|
|
8
|
-
import { cellEditKind } from './cell-edit';
|
|
9
|
-
import { ScalarFieldValueEditor } from './scalar-value-editor';
|
|
7
|
+
import { bulkSummary } from './bulk-actions.js';
|
|
8
|
+
import { cellEditKind } from './cell-edit.js';
|
|
9
|
+
import { ScalarFieldValueEditor } from './scalar-value-editor.js';
|
|
10
10
|
/**
|
|
11
11
|
* The scalar filterable fields a bulk set-field may target (EC-247): the
|
|
12
12
|
* schema's `filterable` fields whose type edits inline (text/number/boolean/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDocumentStore, isFieldLocalized, validateDocument } from '@elytracms/core/cms-core';
|
|
2
|
-
import { replaceDoc } from './document-ref-utils';
|
|
2
|
+
import { replaceDoc } from './document-ref-utils.js';
|
|
3
3
|
/** Stable key for a cell (state maps, DOM lookups). */
|
|
4
4
|
export function cellKey(coord) {
|
|
5
5
|
return `${coord.docId}::${coord.field}`;
|
|
@@ -6,8 +6,8 @@ import { richTextPlainText } from '@elytracms/core/rich-text';
|
|
|
6
6
|
import { Badge, Text } from '@elytracms/studio/ui';
|
|
7
7
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
8
8
|
import { localeChipLabel, resolveDisplayedValue } from '@elytracms/studio/lib/locale';
|
|
9
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
10
|
-
import { AssetThumb, useAssetRecord } from '../assets/asset-thumb';
|
|
9
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
10
|
+
import { AssetThumb, useAssetRecord } from '../assets/asset-thumb.js';
|
|
11
11
|
/**
|
|
12
12
|
* Render a document's field value for a table cell, by field type (brief
|
|
13
13
|
* §8.4, EC-070), resolved in the studio's ambient active locale (EC-176).
|
|
@@ -3,7 +3,7 @@ import { Database, FileCog } from 'lucide-react';
|
|
|
3
3
|
import { isSingleton } from '@elytracms/core/cms-core';
|
|
4
4
|
import { Link, STUDIO_PROJECT_ROUTE, studioPath } from '@elytracms/studio/router';
|
|
5
5
|
import { useCms } from '@elytracms/studio/components/cms/cms-store';
|
|
6
|
-
import { focusCollectionList } from './collection-focus';
|
|
6
|
+
import { focusCollectionList } from './collection-focus.js';
|
|
7
7
|
import { Card, Code, Heading, Spacer, Stack, Text } from '@elytracms/studio/ui';
|
|
8
8
|
import { localizedLabel } from '@elytracms/studio/lib/i18n';
|
|
9
9
|
/**
|
|
@@ -3,8 +3,8 @@ import type { CmsDocument, CmsValidationIssue, CollectionDef, CollectionRegistry
|
|
|
3
3
|
import type { DocumentVersionRecord } from '@elytracms/core/persistence';
|
|
4
4
|
import type { OperationError } from '@elytracms/studio/lib/operations';
|
|
5
5
|
import type { TableViewState } from '@elytracms/studio/lib/cms-views';
|
|
6
|
-
import type { CellCommitInput, CellCommitOutcome } from './cell-edit';
|
|
7
|
-
import type { BulkAction, BulkReport, BulkSetField } from './bulk-actions';
|
|
6
|
+
import type { CellCommitInput, CellCommitOutcome } from './cell-edit.js';
|
|
7
|
+
import type { BulkAction, BulkReport, BulkSetField } from './bulk-actions.js';
|
|
8
8
|
/**
|
|
9
9
|
* A resolved table view: a named bundle of filters (closed AD-3 vocabulary),
|
|
10
10
|
* sort, and visible/ordered columns. EC-246b: named views are **config-as-code**
|
|
@@ -5,15 +5,15 @@ import { translate } from '@elytracms/studio/lib/i18n';
|
|
|
5
5
|
import { configureStudioLocales, useStudioLocale } from '@elytracms/studio/lib/locale';
|
|
6
6
|
import { studioManifestLookup } from '@elytracms/studio/lib/registry';
|
|
7
7
|
import { resolveDeploymentCollections } from '@elytracms/studio/lib/workspace';
|
|
8
|
-
import { validateComposition, validateRichTextEmbeds } from './cms-composition-validators';
|
|
9
|
-
import { matchesRef, removeDoc, replaceDoc, upsertDoc } from './document-ref-utils';
|
|
8
|
+
import { validateComposition, validateRichTextEmbeds } from './cms-composition-validators.js';
|
|
9
|
+
import { matchesRef, removeDoc, replaceDoc, upsertDoc } from './document-ref-utils.js';
|
|
10
10
|
import { createRequiredContext } from '@elytracms/studio/lib/required-context';
|
|
11
11
|
import { createCmsPersister, getStudioOperations } from '@elytracms/studio/lib/operations';
|
|
12
12
|
import { ALL_VIEW_ID, canonicalViewState, configViewIssues, configViewsFor, defaultConfigViewId, defaultViewState, viewStatesEqual, } from '@elytracms/studio/lib/cms-views';
|
|
13
|
-
import { useOptionalAssets } from '../assets/assets-store';
|
|
14
|
-
import { consumeStagedDocuments } from './document-staging';
|
|
15
|
-
import { applyCellValue, commitCellEdit } from './cell-edit';
|
|
16
|
-
import { runBulkAction } from './bulk-actions';
|
|
13
|
+
import { useOptionalAssets } from '../assets/assets-store.js';
|
|
14
|
+
import { consumeStagedDocuments } from './document-staging.js';
|
|
15
|
+
import { applyCellValue, commitCellEdit } from './cell-edit.js';
|
|
16
|
+
import { runBulkAction } from './bulk-actions.js';
|
|
17
17
|
const { Context: CmsContext, useRequired: useCms } = createRequiredContext('Cms');
|
|
18
18
|
function primaryField(collection) {
|
|
19
19
|
return titleFieldOf(collection)?.name ?? collection.fields[0]?.name ?? 'id';
|
|
@@ -8,25 +8,25 @@ import { cn } from '@elytracms/studio/lib/utils';
|
|
|
8
8
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
9
9
|
import { LocaleSwitcher, resolveDisplayedValue } from '@elytracms/studio/lib/locale';
|
|
10
10
|
import { EMPTY_SELECTION, STATE_FIELD, applyViewState, clearSelection, primaryColumn, selectAll, toggleRow, visibleColumns, visibleSelection, } from '@elytracms/studio/lib/cms-views';
|
|
11
|
-
import { cellEditKind, cellKey } from './cell-edit';
|
|
12
|
-
import { FallbackChip } from './cell';
|
|
13
|
-
import { EditableCell } from './editable-cell';
|
|
14
|
-
import { useCellEdit } from './use-cell-edit';
|
|
15
|
-
import { ImportDialog } from './import-export';
|
|
16
|
-
import { AssetThumb, useAssetRecord } from '../assets/asset-thumb';
|
|
17
|
-
import { fieldLabel } from './cms-labels';
|
|
11
|
+
import { cellEditKind, cellKey } from './cell-edit.js';
|
|
12
|
+
import { FallbackChip } from './cell.js';
|
|
13
|
+
import { EditableCell } from './editable-cell.js';
|
|
14
|
+
import { useCellEdit } from './use-cell-edit.js';
|
|
15
|
+
import { ImportDialog } from './import-export.js';
|
|
16
|
+
import { AssetThumb, useAssetRecord } from '../assets/asset-thumb.js';
|
|
17
|
+
import { fieldLabel } from './cms-labels.js';
|
|
18
18
|
import { cmsIssueLabel } from '@elytracms/studio/lib/persona/labels';
|
|
19
19
|
import { TriangleAlert } from 'lucide-react';
|
|
20
|
-
import { BulkBar, BulkReportPanel } from './bulk-bar';
|
|
21
|
-
import { rowActionsFor } from './row-actions';
|
|
22
|
-
import { CHECKBOX_COLUMN_WIDTH_REM, PRIMARY_COLUMN_WIDTH_REM, ROW_ACTIONS_COLUMN_WIDTH_REM, STATE_COLUMN_WIDTH_REM, URL_COLUMN_WIDTH_REM, columnWidthRem, } from './column-width';
|
|
23
|
-
import { ReferenceConfirmDialog } from './reference-confirm';
|
|
24
|
-
import { FilterControl } from './filter-builder';
|
|
25
|
-
import { DisplayMenu, ViewTabs } from './view-bar';
|
|
26
|
-
import { DocStateBadge } from './doc-state';
|
|
27
|
-
import { useSetBreadcrumb } from '../breadcrumb-context';
|
|
28
|
-
import { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source';
|
|
29
|
-
import { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context';
|
|
20
|
+
import { BulkBar, BulkReportPanel } from './bulk-bar.js';
|
|
21
|
+
import { rowActionsFor } from './row-actions.js';
|
|
22
|
+
import { CHECKBOX_COLUMN_WIDTH_REM, PRIMARY_COLUMN_WIDTH_REM, ROW_ACTIONS_COLUMN_WIDTH_REM, STATE_COLUMN_WIDTH_REM, URL_COLUMN_WIDTH_REM, columnWidthRem, } from './column-width.js';
|
|
23
|
+
import { ReferenceConfirmDialog } from './reference-confirm.js';
|
|
24
|
+
import { FilterControl } from './filter-builder.js';
|
|
25
|
+
import { DisplayMenu, ViewTabs } from './view-bar.js';
|
|
26
|
+
import { DocStateBadge } from './doc-state.js';
|
|
27
|
+
import { useSetBreadcrumb } from '../breadcrumb-context.js';
|
|
28
|
+
import { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source.js';
|
|
29
|
+
import { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context.js';
|
|
30
30
|
export function CollectionTable({ projectId, collectionId }) {
|
|
31
31
|
// AD-19: render over the portable CollectionViewSource, not `useCms()` directly,
|
|
32
32
|
// so the SAME list surface serves the users rail (EC-240), redirects (EC-303), …
|
|
@@ -6,51 +6,51 @@ import { FIELD_WIDTH_SPANS, SIDEBAR_FIELD_GROUP, documentKey, groupOrder, groupS
|
|
|
6
6
|
import { blockRootsOf } from '@elytracms/core/project-graph';
|
|
7
7
|
import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, CollapsibleSection, Field, Heading, Row, Spacer, Stack, Text, toast, } from '@elytracms/studio/ui';
|
|
8
8
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
9
|
-
import { collectEmbedRefs, resolveReuseCapability } from '../builder/reuse';
|
|
9
|
+
import { collectEmbedRefs, resolveReuseCapability } from '../builder/reuse.js';
|
|
10
10
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
11
11
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
12
12
|
import { LocaleSwitcher, activeLocaleValues, displayedFieldFallback, fieldConnection, fillFieldFromBase, resetFieldToBase, setFieldValue, } from '@elytracms/studio/lib/locale';
|
|
13
|
-
import { FallbackChip } from './cell';
|
|
14
|
-
import { FieldConnectionControl } from './field-connection';
|
|
15
|
-
import { FieldControl } from './field-control';
|
|
13
|
+
import { FallbackChip } from './cell.js';
|
|
14
|
+
import { FieldConnectionControl } from './field-connection.js';
|
|
15
|
+
import { FieldControl } from './field-control.js';
|
|
16
16
|
// EC-322: the lazy-wrapped page builder — the heavy canvas subtree code-splits out
|
|
17
17
|
// of the detail-view critical path and downloads only when a `blocks` field opens.
|
|
18
|
-
import { CompositionFieldEditor } from '../builder/composition-field-editor-lazy';
|
|
19
|
-
import { fieldLabel } from './cms-labels';
|
|
20
|
-
import { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source';
|
|
21
|
-
import { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context';
|
|
18
|
+
import { CompositionFieldEditor } from '../builder/composition-field-editor-lazy.js';
|
|
19
|
+
import { fieldLabel } from './cms-labels.js';
|
|
20
|
+
import { useCmsCollectionViewSource } from '../collection-view/cms-collection-view-source.js';
|
|
21
|
+
import { CollectionViewProvider, useCollectionView } from '../collection-view/collection-view-context.js';
|
|
22
22
|
import { resolveFieldAccess } from '@elytracms/studio/lib/collection-view/collection-view-source';
|
|
23
|
-
import { DocStateBadge } from './doc-state';
|
|
24
|
-
import { UnsavedChangesGuard } from '../guards';
|
|
25
|
-
import { ReferenceConfirmDialog } from './reference-confirm';
|
|
26
|
-
import { ReferencesPanel } from '../references/references-panel';
|
|
27
|
-
import { InspectorSidebar } from '../inspector/inspector-sidebar';
|
|
28
|
-
import { DocumentEditorProvider } from './document-editor-context';
|
|
29
|
-
import { TranslateDocumentAction } from '../ai/translate-document-action';
|
|
30
|
-
import { VersionsPane } from './versions-pane';
|
|
23
|
+
import { DocStateBadge } from './doc-state.js';
|
|
24
|
+
import { UnsavedChangesGuard } from '../guards.js';
|
|
25
|
+
import { ReferenceConfirmDialog } from './reference-confirm.js';
|
|
26
|
+
import { ReferencesPanel } from '../references/references-panel.js';
|
|
27
|
+
import { InspectorSidebar } from '../inspector/inspector-sidebar.js';
|
|
28
|
+
import { DocumentEditorProvider } from './document-editor-context.js';
|
|
29
|
+
import { TranslateDocumentAction } from '../ai/translate-document-action.js';
|
|
30
|
+
import { VersionsPane } from './versions-pane.js';
|
|
31
31
|
// EC-322: the lazy-wrapped compare view — its diff UI code-splits off the detail-view
|
|
32
32
|
// critical path and loads only when the Compare tab opens.
|
|
33
|
-
import { VersionCompare } from './version-compare-lazy';
|
|
34
|
-
import { IssuesPane } from './issues-pane';
|
|
35
|
-
import { DetailsPane } from './details-pane';
|
|
36
|
-
import { DocumentUrlPath } from './document-url-path';
|
|
33
|
+
import { VersionCompare } from './version-compare-lazy.js';
|
|
34
|
+
import { IssuesPane } from './issues-pane.js';
|
|
35
|
+
import { DetailsPane } from './details-pane.js';
|
|
36
|
+
import { DocumentUrlPath } from './document-url-path.js';
|
|
37
37
|
// 0.0.41: selection-driven embed inspector. Both modules are deliberately TipTap-free
|
|
38
38
|
// so the editor runtime stays behind rich-text/lazy (EC-322) — see their doc comments.
|
|
39
|
-
import { EmbedInspectorProvider } from './rich-text/embed-inspector-context';
|
|
40
|
-
import { EmbedInspector } from './rich-text/embed-inspector';
|
|
41
|
-
import { useSetBreadcrumb } from '../breadcrumb-context';
|
|
39
|
+
import { EmbedInspectorProvider } from './rich-text/embed-inspector-context.js';
|
|
40
|
+
import { EmbedInspector } from './rich-text/embed-inspector.js';
|
|
41
|
+
import { useSetBreadcrumb } from '../breadcrumb-context.js';
|
|
42
42
|
import { resolveDeploymentRoutes } from '@elytracms/studio/lib/workspace';
|
|
43
43
|
// EC-325 — the controller hooks EditorBody orchestrates (each independently
|
|
44
44
|
// unit-tested at its pure core); the shell threads shared draft/ref/replaceDraft
|
|
45
45
|
// state across their boundaries.
|
|
46
|
-
import { usePublishedPerspective } from './use-published-perspective';
|
|
47
|
-
import { useSaveMode } from './use-save-mode';
|
|
48
|
-
import { useDiscardController } from './use-discard-controller';
|
|
49
|
-
import { usePublishController, publishGate } from './use-publish-controller';
|
|
50
|
-
import { useFieldFocus } from './use-field-focus';
|
|
51
|
-
import { useCompareSelection } from './use-compare-selection';
|
|
52
|
-
import { useLiveUrl } from './use-live-url';
|
|
53
|
-
import { useEmbedInspectorHost } from './use-embed-inspector-host';
|
|
46
|
+
import { usePublishedPerspective } from './use-published-perspective.js';
|
|
47
|
+
import { useSaveMode } from './use-save-mode.js';
|
|
48
|
+
import { useDiscardController } from './use-discard-controller.js';
|
|
49
|
+
import { usePublishController, publishGate } from './use-publish-controller.js';
|
|
50
|
+
import { useFieldFocus } from './use-field-focus.js';
|
|
51
|
+
import { useCompareSelection } from './use-compare-selection.js';
|
|
52
|
+
import { useLiveUrl } from './use-live-url.js';
|
|
53
|
+
import { useEmbedInspectorHost } from './use-embed-inspector-host.js';
|
|
54
54
|
export function DetailEditor({ projectId, collectionId, documentId, focusPath, }) {
|
|
55
55
|
// AD-19: the edit shell is a portable surface over a CollectionViewSource, just
|
|
56
56
|
// like the list. `DetailEditor` is the CMS entry point — it builds the CMS source
|
|
@@ -7,10 +7,10 @@ import { translate } from '@elytracms/studio/lib/i18n';
|
|
|
7
7
|
import { localeChipLabel } from '@elytracms/studio/lib/locale';
|
|
8
8
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
9
9
|
import { readDiffViewMode, storeDiffViewMode } from '@elytracms/studio/lib/diff-view-preference';
|
|
10
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
11
|
-
import { fieldLabel } from './cms-labels';
|
|
12
|
-
import { toRefArray } from './cell';
|
|
13
|
-
import { DIFF_TRUNCATE_THRESHOLD, mergeWordDiff, richTextToText, truncateText, truncateTokens, wordDiff, } from './version-compare-text';
|
|
10
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
11
|
+
import { fieldLabel } from './cms-labels.js';
|
|
12
|
+
import { toRefArray } from './cell.js';
|
|
13
|
+
import { DIFF_TRUNCATE_THRESHOLD, mergeWordDiff, richTextToText, truncateText, truncateTokens, wordDiff, } from './version-compare-text.js';
|
|
14
14
|
export function DocumentDiffView({ diff, collection, columnHeaders, restore, summaryHint, }) {
|
|
15
15
|
const source = useCollectionView();
|
|
16
16
|
// EC-317 — the unified/side-by-side toggle is a transient, personal-local view
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CmsDocument, CollectionDef, FieldDef } from '@elytracms/core/cms-core';
|
|
2
|
-
import type { AdvanceDirection } from './cell-edit';
|
|
2
|
+
import type { AdvanceDirection } from './cell-edit.js';
|
|
3
3
|
/**
|
|
4
4
|
* One editable table cell (EC-168, the Airtable-feel wedge of vision 3.2).
|
|
5
5
|
*
|
|
@@ -5,12 +5,12 @@ import { Badge, Input, Row, Select, Text } from '@elytracms/studio/ui';
|
|
|
5
5
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
6
6
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
7
7
|
import { editCreatesVariant, resolveDisplayedValue } from '@elytracms/studio/lib/locale';
|
|
8
|
-
import { applyAssetSelection, singleAssetIdOf } from '../assets/asset-selection';
|
|
9
|
-
import { CellValue, toRefArray } from './cell';
|
|
10
|
-
import { cellEditKind, cellKey } from './cell-edit';
|
|
11
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
12
|
-
import { RelationPicker } from './relation-picker';
|
|
13
|
-
import { AssetPicker } from './asset-picker';
|
|
8
|
+
import { applyAssetSelection, singleAssetIdOf } from '../assets/asset-selection.js';
|
|
9
|
+
import { CellValue, toRefArray } from './cell.js';
|
|
10
|
+
import { cellEditKind, cellKey } from './cell-edit.js';
|
|
11
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
12
|
+
import { RelationPicker } from './relation-picker.js';
|
|
13
|
+
import { AssetPicker } from './asset-picker.js';
|
|
14
14
|
/**
|
|
15
15
|
* One editable table cell (EC-168, the Airtable-feel wedge of vision 3.2).
|
|
16
16
|
*
|
|
@@ -8,21 +8,21 @@ import { Button, Card, Code, Dialog, DialogContent, DialogDescription, DialogHea
|
|
|
8
8
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
9
9
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
10
10
|
import { activeLocaleValues } from '@elytracms/studio/lib/locale';
|
|
11
|
-
import { applyAssetSelection, assetIdsOf, singleAssetIdOf } from '../assets/asset-selection';
|
|
12
|
-
import { useOptionalAssets } from '../assets/assets-store';
|
|
13
|
-
import { AssetThumb, FocalCropPreviews, FocalPointPicker, useAssetRecord } from '../assets/asset-thumb';
|
|
14
|
-
import { newlyAddedAssetIds } from '../assets/focal-point';
|
|
15
|
-
import { assetMetaFieldsOf, pruneMeta } from '../assets/asset-metadata';
|
|
16
|
-
import { fieldLabel } from './cms-labels';
|
|
17
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
18
|
-
import { useFieldDensity } from './field-density';
|
|
19
|
-
import { useOptionalDocumentEditor } from './document-editor-context';
|
|
20
|
-
import { toRefArray } from './cell';
|
|
21
|
-
import { RelationPicker } from './relation-picker';
|
|
22
|
-
import { AssetPicker } from './asset-picker';
|
|
23
|
-
import { RichTextEditor } from './rich-text';
|
|
24
|
-
import { DocumentUrlSegment } from './document-url-path';
|
|
25
|
-
import { FieldRendererBoundary, FieldRendererIssue, useFieldRenderers, } from './field-renderer';
|
|
11
|
+
import { applyAssetSelection, assetIdsOf, singleAssetIdOf } from '../assets/asset-selection.js';
|
|
12
|
+
import { useOptionalAssets } from '../assets/assets-store.js';
|
|
13
|
+
import { AssetThumb, FocalCropPreviews, FocalPointPicker, useAssetRecord } from '../assets/asset-thumb.js';
|
|
14
|
+
import { newlyAddedAssetIds } from '../assets/focal-point.js';
|
|
15
|
+
import { assetMetaFieldsOf, pruneMeta } from '../assets/asset-metadata.js';
|
|
16
|
+
import { fieldLabel } from './cms-labels.js';
|
|
17
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
18
|
+
import { useFieldDensity } from './field-density.js';
|
|
19
|
+
import { useOptionalDocumentEditor } from './document-editor-context.js';
|
|
20
|
+
import { toRefArray } from './cell.js';
|
|
21
|
+
import { RelationPicker } from './relation-picker.js';
|
|
22
|
+
import { AssetPicker } from './asset-picker.js';
|
|
23
|
+
import { RichTextEditor } from './rich-text/index.js';
|
|
24
|
+
import { DocumentUrlSegment } from './document-url-path.js';
|
|
25
|
+
import { FieldRendererBoundary, FieldRendererIssue, useFieldRenderers, } from './field-renderer.js';
|
|
26
26
|
/**
|
|
27
27
|
* The document-editor field control. Resolves a project's custom renderer by the
|
|
28
28
|
* field's `form.control` (EC-238, customization seam EC-236) and falls back to the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { CustomizationIssue } from '@elytracms/core/studio-core';
|
|
4
|
-
import type { CustomFieldRenderer } from '../app-views/studio-config';
|
|
4
|
+
import type { CustomFieldRenderer } from '../app-views/studio-config.js';
|
|
5
5
|
/**
|
|
6
6
|
* EC-238 — custom field renderers, an instance of the EC-236 customization seam.
|
|
7
7
|
*
|
|
@@ -19,7 +19,7 @@ import type { CustomFieldRenderer } from '../app-views/studio-config';
|
|
|
19
19
|
* field, or a renderer that throws — surfaces a visible issue, never a silent drop
|
|
20
20
|
* or a crash.
|
|
21
21
|
*/
|
|
22
|
-
export type { CustomFieldRenderer, CustomFieldRendererProps } from '../app-views/studio-config';
|
|
22
|
+
export type { CustomFieldRenderer, CustomFieldRendererProps } from '../app-views/studio-config.js';
|
|
23
23
|
export interface ResolvedFieldRenderers {
|
|
24
24
|
/** The custom renderer for a control name, or `undefined` → use the built-in. */
|
|
25
25
|
get(control: string): CustomFieldRenderer | undefined;
|
|
@@ -5,9 +5,9 @@ import { Button, Popover, PopoverAnchor, PopoverContent, Row, Select, Spacer, St
|
|
|
5
5
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
7
|
import { STATE_FIELD, defaultClause, filterableFieldOptions, operatorChoices, operatorLabelKey, scalarListFromText, scalarListToText, validateClauses, } from '@elytracms/studio/lib/cms-views';
|
|
8
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
9
|
-
import { RelationPicker } from './relation-picker';
|
|
10
|
-
import { DraftValueInput, ScalarFieldValueEditor } from './scalar-value-editor';
|
|
8
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
9
|
+
import { RelationPicker } from './relation-picker.js';
|
|
10
|
+
import { DraftValueInput, ScalarFieldValueEditor } from './scalar-value-editor.js';
|
|
11
11
|
const defaultDescribeValue = (clause) => Array.isArray(clause.value) ? clause.value.join(', ') : String(clause.value);
|
|
12
12
|
/**
|
|
13
13
|
* A one-line summary of the active filter for the chip face (EC-246b): the single
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { Badge, Button, Code, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Stack, Text, } from '@elytracms/studio/ui';
|
|
4
4
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
5
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
5
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
6
6
|
/** Import collection data from JSON with validation + error reporting (brief §8.4, EC-079). */
|
|
7
7
|
export function ImportDialog({ collectionId, open, onOpenChange, }) {
|
|
8
8
|
const source = useCollectionView();
|
|
@@ -4,7 +4,7 @@ import { Button, Row, Stack, Text } from '@elytracms/studio/ui';
|
|
|
4
4
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
5
5
|
import { cmsIssueLabel } from '@elytracms/studio/lib/persona/labels';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
|
-
import { fieldLabel } from './cms-labels';
|
|
7
|
+
import { fieldLabel } from './cms-labels.js';
|
|
8
8
|
/**
|
|
9
9
|
* EC-283 — the document-scoped validation surface.
|
|
10
10
|
*
|
|
@@ -4,9 +4,9 @@ import { isStaticProp } from '@elytracms/core/project-graph';
|
|
|
4
4
|
import { fieldValueValidator } from '@elytracms/core/cms-core';
|
|
5
5
|
import { Input, Row, Select, Stack, Text } from '@elytracms/studio/ui';
|
|
6
6
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
7
|
-
import { FieldControl } from './field-control';
|
|
8
|
-
import { FieldDensityProvider } from './field-density';
|
|
9
|
-
import { useOptionalCollectionView } from '../collection-view/collection-view-context';
|
|
7
|
+
import { FieldControl } from './field-control.js';
|
|
8
|
+
import { FieldDensityProvider } from './field-density.js';
|
|
9
|
+
import { useOptionalCollectionView } from '../collection-view/collection-view-context.js';
|
|
10
10
|
export function controlKind(spec) {
|
|
11
11
|
switch (spec.type) {
|
|
12
12
|
case 'boolean':
|
|
@@ -6,7 +6,7 @@ import { documentKey } from '@elytracms/core/cms-core';
|
|
|
6
6
|
import { buildReferenceImpact, loadInboundReferenceViews } from '@elytracms/studio/lib/references';
|
|
7
7
|
import { Badge, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Row, Stack, Text, } from '@elytracms/studio/ui';
|
|
8
8
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
9
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
9
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
10
10
|
const ACTION_LABELS = {
|
|
11
11
|
unpublish: translate('cms.editor.unpublish'),
|
|
12
12
|
delete: translate('common.delete'),
|
|
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react';
|
|
|
4
4
|
import { Badge, Button, Code, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Input, Row, Spacer, Text, } from '@elytracms/studio/ui';
|
|
5
5
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
|
-
import { useCollectionView } from '../collection-view/collection-view-context';
|
|
7
|
+
import { useCollectionView } from '../collection-view/collection-view-context.js';
|
|
8
8
|
/** Pick related document(s) from a target collection (brief §8.4, EC-074). */
|
|
9
9
|
export function RelationPicker({ targetCollection, multiple, value, open, onOpenChange, onChange, excludeIds, }) {
|
|
10
10
|
const source = useCollectionView();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/react';
|
|
2
2
|
import type { LucideIcon } from 'lucide-react';
|
|
3
|
-
import type { ToolbarState } from './toolbar-state';
|
|
3
|
+
import type { ToolbarState } from './toolbar-state.js';
|
|
4
4
|
/**
|
|
5
5
|
* Shared block-command metadata (EC-328) — the five block operations
|
|
6
6
|
* `buildSlashItems` (slash-command.tsx) and `RichTextToolbar` (toolbar.tsx)
|
|
@@ -8,8 +8,8 @@ import { Button } from '@elytracms/studio/ui';
|
|
|
8
8
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
9
9
|
import { componentDisplayName } from '@elytracms/studio/lib/persona/labels';
|
|
10
10
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
11
|
-
import { EmbedPropsDialog, embedPropsSummary } from './embed-props';
|
|
12
|
-
import { useOptionalEmbedInspector } from './embed-inspector-context';
|
|
11
|
+
import { EmbedPropsDialog, embedPropsSummary } from './embed-props.js';
|
|
12
|
+
import { useOptionalEmbedInspector } from './embed-inspector-context.js';
|
|
13
13
|
/**
|
|
14
14
|
* The rich-text component-embed node (EC-189/EC-314): a block atom holding a single
|
|
15
15
|
* composition value at `attrs.node`. It is the third place constrained composition
|
|
@@ -3,15 +3,15 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
3
3
|
import { EditorContent, useEditor } from '@tiptap/react';
|
|
4
4
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
5
5
|
import { localizedLabel } from '@elytracms/studio/lib/i18n';
|
|
6
|
-
import { useOptionalCollectionView } from '../../collection-view/collection-view-context';
|
|
7
|
-
import { useOptionalAssets } from '../../assets/assets-store';
|
|
8
|
-
import { AssetPicker } from '../asset-picker';
|
|
9
|
-
import { buildRichTextExtensions } from './extensions';
|
|
10
|
-
import { isEffectivelyEmpty, isEquivalentToStored, normalizeEditorDoc, richTextValueFromDoc, toEditorDoc, } from './value';
|
|
11
|
-
import { insertAssetImage, insertComponentEmbed, listEmbeddable } from './insert';
|
|
12
|
-
import { EmbedPicker } from './embed-picker';
|
|
6
|
+
import { useOptionalCollectionView } from '../../collection-view/collection-view-context.js';
|
|
7
|
+
import { useOptionalAssets } from '../../assets/assets-store.js';
|
|
8
|
+
import { AssetPicker } from '../asset-picker.js';
|
|
9
|
+
import { buildRichTextExtensions } from './extensions.js';
|
|
10
|
+
import { isEffectivelyEmpty, isEquivalentToStored, normalizeEditorDoc, richTextValueFromDoc, toEditorDoc, } from './value.js';
|
|
11
|
+
import { insertAssetImage, insertComponentEmbed, listEmbeddable } from './insert.js';
|
|
12
|
+
import { EmbedPicker } from './embed-picker.js';
|
|
13
13
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
14
|
-
import { RichTextToolbar } from './toolbar';
|
|
14
|
+
import { RichTextToolbar } from './toolbar.js';
|
|
15
15
|
/**
|
|
16
16
|
* The CMS rich-text field editor (EC-314) — a real TipTap editor over the shared
|
|
17
17
|
* `@elytracms/core/rich-text` storage, replacing the plaintext textarea stub.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmbedInspectorPayload } from './embed-inspector-context';
|
|
1
|
+
import type { EmbedInspectorPayload } from './embed-inspector-context.js';
|
|
2
2
|
/**
|
|
3
3
|
* The selection-driven embed prop inspector (0.0.41) — the detail editor's right
|
|
4
4
|
* sidebar swaps to this when a `componentEmbed` node is selected in a rich-text
|
|
@@ -4,8 +4,8 @@ import { Button, Field, Row, Separator, Stack, Text } from '@elytracms/studio/ui
|
|
|
4
4
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
5
5
|
import { componentDisplayName } from '@elytracms/studio/lib/persona/labels';
|
|
6
6
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
7
|
-
import { PropValueControl } from '../prop-fields';
|
|
8
|
-
import { blocksEmbedProps, clearComponentNodeProp, editableEmbedProps, resolveEmbedWrite, setComponentNodeProp, } from './embed-props';
|
|
7
|
+
import { PropValueControl } from '../prop-fields.js';
|
|
8
|
+
import { blocksEmbedProps, clearComponentNodeProp, editableEmbedProps, resolveEmbedWrite, setComponentNodeProp, } from './embed-props.js';
|
|
9
9
|
/**
|
|
10
10
|
* The selection-driven embed prop inspector (0.0.41) — the detail editor's right
|
|
11
11
|
* sidebar swaps to this when a `componentEmbed` node is selected in a rich-text
|
|
@@ -5,7 +5,7 @@ import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
|
5
5
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, Input, Stack, Text, } from '@elytracms/studio/ui';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
7
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
8
|
-
import { listEmbeddable } from './insert';
|
|
8
|
+
import { listEmbeddable } from './insert.js';
|
|
9
9
|
/**
|
|
10
10
|
* The component-embed picker dialog (EC-314/EC-189): a searchable list of the
|
|
11
11
|
* components permitted for inline embedding. Rendered once at the editor level and
|
|
@@ -5,7 +5,7 @@ import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle,
|
|
|
5
5
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
6
6
|
import { humanizeName } from '@elytracms/studio/lib/utils';
|
|
7
7
|
import { componentDisplayName } from '@elytracms/studio/lib/persona/labels';
|
|
8
|
-
import { PropValueControl } from '../prop-fields';
|
|
8
|
+
import { PropValueControl } from '../prop-fields.js';
|
|
9
9
|
/**
|
|
10
10
|
* Prop editing for rich-text component embeds (EC-314 phase 4).
|
|
11
11
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import StarterKit from '@tiptap/starter-kit';
|
|
2
2
|
import { Placeholder } from '@tiptap/extensions';
|
|
3
3
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
4
|
-
import { RefLink } from './ref-link';
|
|
5
|
-
import { AssetImage } from './asset-image';
|
|
6
|
-
import { ComponentEmbed } from './component-embed';
|
|
7
|
-
import { createSlashCommand } from './slash-command';
|
|
4
|
+
import { RefLink } from './ref-link.js';
|
|
5
|
+
import { AssetImage } from './asset-image.js';
|
|
6
|
+
import { ComponentEmbed } from './component-embed.js';
|
|
7
|
+
import { createSlashCommand } from './slash-command.js';
|
|
8
8
|
/**
|
|
9
9
|
* The TipTap extension set for the CMS rich-text editor (EC-314).
|
|
10
10
|
*
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* main route chunk. The eager editor stays available as `./editor` for the unit tests
|
|
10
10
|
* and the extension-level modules that import it directly.
|
|
11
11
|
*/
|
|
12
|
-
export { RichTextEditor } from './lazy';
|
|
12
|
+
export { RichTextEditor } from './lazy.js';
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Editor } from '@tiptap/react';
|
|
2
2
|
import type { ComponentNode } from '@elytracms/core/project-graph';
|
|
3
3
|
import type { ComponentManifest } from '@elytracms/core/component-registry';
|
|
4
|
-
import type { AssetsStore } from '../../assets/assets-store';
|
|
4
|
+
import type { AssetsStore } from '../../assets/assets-store.js';
|
|
5
5
|
/**
|
|
6
6
|
* Reference-carrying node insertions shared by the toolbar controls and the slash
|
|
7
7
|
* menu (EC-314). Centralised so both entry points produce byte-identical envelopes
|
|
@@ -14,6 +14,6 @@ import type { ComponentProps } from 'react';
|
|
|
14
14
|
* toolbar-and-body min-height) so the swap-in is layout-jank-free, and carries an
|
|
15
15
|
* accessible loading label from the message catalog.
|
|
16
16
|
*/
|
|
17
|
-
declare const RichTextEditorImpl: import("react").LazyExoticComponent<typeof import("./editor").RichTextEditor>;
|
|
17
|
+
declare const RichTextEditorImpl: import("react").LazyExoticComponent<typeof import("./editor.js").RichTextEditor>;
|
|
18
18
|
export declare function RichTextEditor(props: ComponentProps<typeof RichTextEditorImpl>): import("react").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -16,7 +16,7 @@ import { translate } from '@elytracms/studio/lib/i18n';
|
|
|
16
16
|
* toolbar-and-body min-height) so the swap-in is layout-jank-free, and carries an
|
|
17
17
|
* accessible loading label from the message catalog.
|
|
18
18
|
*/
|
|
19
|
-
const RichTextEditorImpl = lazy(() => import('./editor').then((module) => ({ default: module.RichTextEditor })));
|
|
19
|
+
const RichTextEditorImpl = lazy(() => import('./editor.js').then((module) => ({ default: module.RichTextEditor })));
|
|
20
20
|
function RichTextEditorFallback() {
|
|
21
21
|
return (_jsx("div", { className: "ec-rte min-h-[7.5rem] animate-pulse rounded-md border border-input bg-muted/20 shadow-sm", role: "status", "aria-busy": "true", children: _jsx("span", { className: "sr-only", children: translate('richText.loading') }) }));
|
|
22
22
|
}
|
|
@@ -6,7 +6,7 @@ import { Blocks, Heading1, Heading2, Heading3, ImagePlus, Pilcrow } from 'lucide
|
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
7
|
import { componentDisplayName } from '@elytracms/studio/lib/persona/labels';
|
|
8
8
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
9
|
-
import { BLOCK_COMMANDS } from './block-commands';
|
|
9
|
+
import { BLOCK_COMMANDS } from './block-commands.js';
|
|
10
10
|
/** The command list, gated by which media actions + components the editor provided. */
|
|
11
11
|
export function buildSlashItems(options) {
|
|
12
12
|
const block = (run) => (editor, range) => run(editor.chain().focus().deleteRange(range)).run();
|