@elytracms/studio 0.0.51 → 0.0.53
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/convex/auth.ts +135 -62
- package/convex/invites.ts +77 -0
- 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/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 +15 -15
- package/dist/lib/ai/index.js +15 -15
- package/dist/lib/ai/knowledge.d.ts +1 -1
- 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-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 +53 -2
- package/dist/lib/auth/convex-auth-adapter.js +149 -68
- package/dist/lib/auth/convex-auth-adapter.js.map +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 +3 -3
- 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
|
@@ -2,7 +2,7 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
import type { AssetRecord } from '@elytracms/core/persistence';
|
|
3
3
|
import type { DeleteAssetResult, UploadState, UploadableFile } from '@elytracms/studio/lib/assets';
|
|
4
4
|
import type { ReferenceEntryView } from '@elytracms/studio/lib/references';
|
|
5
|
-
import type { AssetMetadataPatch, UpdateAssetMetadataResult } from './asset-metadata';
|
|
5
|
+
import type { AssetMetadataPatch, UpdateAssetMetadataResult } from './asset-metadata.js';
|
|
6
6
|
/**
|
|
7
7
|
* Asset library store (EC-151, EC-141). Asset *metadata* mutations go through
|
|
8
8
|
* the shared operations client (`assets.*` commands — validate → authorize →
|
|
@@ -5,7 +5,7 @@ import { loadInboundAssetReferenceViews } from '@elytracms/studio/lib/references
|
|
|
5
5
|
import { getStudioOperations, operationsAssetRepository } from '@elytracms/studio/lib/operations';
|
|
6
6
|
import { listStoreState, useOperationCache, useOperationQuery } from '@elytracms/studio/lib/query';
|
|
7
7
|
import { createRequiredContext } from '@elytracms/studio/lib/required-context';
|
|
8
|
-
import { updateAssetMetadata } from './asset-metadata';
|
|
8
|
+
import { updateAssetMetadata } from './asset-metadata.js';
|
|
9
9
|
const { Context: AssetsContext, useRequired: useAssets } = createRequiredContext('Assets', { article: 'an' });
|
|
10
10
|
const EMPTY_ASSETS = [];
|
|
11
11
|
/** Cache key for a project's asset library (shared by the query and its patches). */
|
|
@@ -2,7 +2,7 @@ import { cloneWithNewIds } from '@elytracms/core/project-graph';
|
|
|
2
2
|
import { isCanvasEligible, propValueValidator } from '@elytracms/core/component-registry';
|
|
3
3
|
import { componentStatus } from '@elytracms/studio/lib/registry';
|
|
4
4
|
import { nodeFromProps, previewSpecs } from '@elytracms/studio/lib/registry/preview';
|
|
5
|
-
import { LAYOUT_PRESETS, nodeFromManifest } from './node-factory';
|
|
5
|
+
import { LAYOUT_PRESETS, nodeFromManifest } from './node-factory.js';
|
|
6
6
|
/**
|
|
7
7
|
* Intersect two component-id allow-lists. `undefined` means "no constraint from
|
|
8
8
|
* this source", so the result is the other list (copied); two present lists yield
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InsertTarget } from '@elytracms/core/project-graph';
|
|
2
2
|
import type { ClipboardFragment } from '@elytracms/core/clipboard';
|
|
3
3
|
import type { StudioRegistry } from '@elytracms/studio/lib/registry';
|
|
4
|
-
import type { BlockTile } from './blocks-model';
|
|
4
|
+
import type { BlockTile } from './blocks-model.js';
|
|
5
5
|
/**
|
|
6
6
|
* Blocks panel (EC-164): the visual insert surface. Every registry component
|
|
7
7
|
* and each of its fixture variations is a tile with a live, scaled render —
|
|
@@ -4,14 +4,14 @@ import { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
4
4
|
import { buildFragmentFromRegistryFixture, buildFragmentFromSubtree, } from '@elytracms/core/clipboard';
|
|
5
5
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
6
6
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
7
|
-
import { useCollab } from '../collab/collab-context';
|
|
8
|
-
import { useStudioClipboard } from './clipboard-actions';
|
|
9
|
-
import { beginDrag, endDrag, onDragSessionEnd } from './drag-session';
|
|
7
|
+
import { useCollab } from '../collab/collab-context.js';
|
|
8
|
+
import { useStudioClipboard } from './clipboard-actions.js';
|
|
9
|
+
import { beginDrag, endDrag, onDragSessionEnd } from './drag-session.js';
|
|
10
10
|
import { Code, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, Input, Row, Text, } from '@elytracms/studio/ui';
|
|
11
11
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
12
|
-
import { useBuilder } from './builder-store';
|
|
13
|
-
import { blockGroups, presetTiles } from './blocks-model';
|
|
14
|
-
import { ScaledFixtureThumbnail } from './fixture-thumbnail';
|
|
12
|
+
import { useBuilder } from './builder-store.js';
|
|
13
|
+
import { blockGroups, presetTiles } from './blocks-model.js';
|
|
14
|
+
import { ScaledFixtureThumbnail } from './fixture-thumbnail.js';
|
|
15
15
|
/**
|
|
16
16
|
* "Copy exact configuration" (EC-175, vision 3.3): the EC-174 fragment for a
|
|
17
17
|
* blocks-panel tile. Tiles backed by a declared manifest fixture go through
|
|
@@ -5,23 +5,23 @@ import { renderPageComposition } from '@elytracms/core/runtime-renderer';
|
|
|
5
5
|
import { useParams } from '@elytracms/studio/router';
|
|
6
6
|
import { getNode, getParentInfo, staticProp } from '@elytracms/core/project-graph';
|
|
7
7
|
import { canNestInto, containerFlowAxis, dropIndicatorFor, dropPositionForPoint, resolveDrop, } from '@elytracms/studio/lib/dnd/drop-rules';
|
|
8
|
-
import { activeDrag, beginDrag, endDrag, onDragSessionEnd } from './drag-session';
|
|
8
|
+
import { activeDrag, beginDrag, endDrag, onDragSessionEnd } from './drag-session.js';
|
|
9
9
|
import { PRESERVE_NODE_ATTR, collectPreservedPairs, richTextDocFromDom, } from '@elytracms/core/rich-text';
|
|
10
10
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
11
11
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
12
|
-
import { useOptionalAssets } from '../assets/assets-store';
|
|
12
|
+
import { useOptionalAssets } from '../assets/assets-store.js';
|
|
13
13
|
import { resolveCanvasLink, resolveCanvasListing, resolveCanvasRelation, useData, } from '@elytracms/studio/lib/data';
|
|
14
14
|
import { cmsBindingFallback, useStudioLocale } from '@elytracms/studio/lib/locale';
|
|
15
15
|
import { getInstantiatedKit } from '@elytracms/studio/lib/starters/kit-session';
|
|
16
|
-
import { getCanvasStylesheetUrl } from './canvas-stylesheet';
|
|
17
|
-
import { useBuilder } from './builder-store';
|
|
18
|
-
import { useReuse } from './reuse-context';
|
|
19
|
-
import { reuseEmbedRef } from './reuse';
|
|
20
|
-
import { useCanvasViewports, viewportWidth } from './canvas-breakpoints';
|
|
21
|
-
import { ClipboardNoticeOverlay, attachClipboardListeners, useStudioClipboard, } from './clipboard-actions';
|
|
22
|
-
import { createInlineEditSession, createInlineRichTextSession, findInlineTextHost, resolveInlineEditableProp, resolveInlineRichTextProp, } from './inline-edit';
|
|
23
|
-
import { RichTextToolbar } from './rich-text-toolbar';
|
|
24
|
-
import { SpacingHandles, hasSpacingHandles } from './spacing-handles';
|
|
16
|
+
import { getCanvasStylesheetUrl } from './canvas-stylesheet.js';
|
|
17
|
+
import { useBuilder } from './builder-store.js';
|
|
18
|
+
import { useReuse } from './reuse-context.js';
|
|
19
|
+
import { reuseEmbedRef } from './reuse.js';
|
|
20
|
+
import { useCanvasViewports, viewportWidth } from './canvas-breakpoints.js';
|
|
21
|
+
import { ClipboardNoticeOverlay, attachClipboardListeners, useStudioClipboard, } from './clipboard-actions.js';
|
|
22
|
+
import { createInlineEditSession, createInlineRichTextSession, findInlineTextHost, resolveInlineEditableProp, resolveInlineRichTextProp, } from './inline-edit.js';
|
|
23
|
+
import { RichTextToolbar } from './rich-text-toolbar.js';
|
|
24
|
+
import { SpacingHandles, hasSpacingHandles } from './spacing-handles.js';
|
|
25
25
|
/** Selection/hover outlines, scoped to the per-node editable wrappers. */
|
|
26
26
|
const OUTLINE_CSS = `
|
|
27
27
|
/* The canvas backdrop is deliberately always light/site-like (see the
|
|
@@ -8,9 +8,9 @@ import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
|
8
8
|
import { shortId } from '@elytracms/studio/lib/persona/labels';
|
|
9
9
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
10
10
|
import { useData } from '@elytracms/studio/lib/data';
|
|
11
|
-
import { useCollab } from '../collab/collab-context';
|
|
11
|
+
import { useCollab } from '../collab/collab-context.js';
|
|
12
12
|
import { Badge, Row, Text } from '@elytracms/studio/ui';
|
|
13
|
-
import { makeNodeIdCounter, useBuilder } from './builder-store';
|
|
13
|
+
import { makeNodeIdCounter, useBuilder } from './builder-store.js';
|
|
14
14
|
let currentNotice = null;
|
|
15
15
|
const noticeListeners = new Set();
|
|
16
16
|
export function publishClipboardNotice(notice) {
|
|
@@ -14,6 +14,6 @@ import type { ComponentProps } from 'react';
|
|
|
14
14
|
* detail editor's seam is unchanged — it still imports `CompositionFieldEditor`,
|
|
15
15
|
* now the lazy-wrapped one, and renders it behind the same `canvasField` gate.
|
|
16
16
|
*/
|
|
17
|
-
declare const CompositionFieldEditorImpl: import("react").LazyExoticComponent<typeof import("./composition-field-editor").CompositionFieldEditor>;
|
|
17
|
+
declare const CompositionFieldEditorImpl: import("react").LazyExoticComponent<typeof import("./composition-field-editor.js").CompositionFieldEditor>;
|
|
18
18
|
export declare function CompositionFieldEditor(props: ComponentProps<typeof CompositionFieldEditorImpl>): import("react").JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -17,7 +17,7 @@ import { translate } from '@elytracms/studio/lib/i18n';
|
|
|
17
17
|
* detail editor's seam is unchanged — it still imports `CompositionFieldEditor`,
|
|
18
18
|
* now the lazy-wrapped one, and renders it behind the same `canvasField` gate.
|
|
19
19
|
*/
|
|
20
|
-
const CompositionFieldEditorImpl = lazy(() => import('./composition-field-editor').then((module) => ({
|
|
20
|
+
const CompositionFieldEditorImpl = lazy(() => import('./composition-field-editor.js').then((module) => ({
|
|
21
21
|
default: module.CompositionFieldEditor,
|
|
22
22
|
})));
|
|
23
23
|
function CanvasFallback() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BlocksFieldDef } from '@elytracms/core/cms-core';
|
|
2
|
-
import type { InspectorPane } from '../inspector/inspector-sidebar';
|
|
2
|
+
import type { InspectorPane } from '../inspector/inspector-sidebar.js';
|
|
3
3
|
export declare function CompositionFieldEditor({ field, value, onChange, readOnly, trailingPanes, }: {
|
|
4
4
|
field: BlocksFieldDef;
|
|
5
5
|
value: unknown;
|
|
@@ -5,15 +5,15 @@ import { DEFAULT_SLOT, blockRootsOf } from '@elytracms/core/project-graph';
|
|
|
5
5
|
import { Button, Panel, Row, Spacer, Text, Toolbar, ToolbarGroup, ToolbarSeparator } from '@elytracms/studio/ui';
|
|
6
6
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
7
7
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
8
|
-
import { BuilderProvider, useBuilder } from './builder-store';
|
|
9
|
-
import { useCanvasViewports } from './canvas-breakpoints';
|
|
10
|
-
import { BuilderCanvas } from './canvas';
|
|
11
|
-
import { PageTree } from './page-tree';
|
|
12
|
-
import { PropertyInspector } from './property-inspector';
|
|
13
|
-
import { InspectorSidebar } from '../inspector/inspector-sidebar';
|
|
14
|
-
import { InsertMenu } from './insert-menu';
|
|
15
|
-
import { resolveInsertContext } from './insert-context';
|
|
16
|
-
import { ReuseProvider } from './reuse-context';
|
|
8
|
+
import { BuilderProvider, useBuilder } from './builder-store.js';
|
|
9
|
+
import { useCanvasViewports } from './canvas-breakpoints.js';
|
|
10
|
+
import { BuilderCanvas } from './canvas.js';
|
|
11
|
+
import { PageTree } from './page-tree.js';
|
|
12
|
+
import { PropertyInspector } from './property-inspector.js';
|
|
13
|
+
import { InspectorSidebar } from '../inspector/inspector-sidebar.js';
|
|
14
|
+
import { InsertMenu } from './insert-menu.js';
|
|
15
|
+
import { resolveInsertContext } from './insert-context.js';
|
|
16
|
+
import { ReuseProvider } from './reuse-context.js';
|
|
17
17
|
/**
|
|
18
18
|
* EC-188 — the block-field surface: one canvas engine mounted on a composition
|
|
19
19
|
* **field value** (AD-12), not the project graph.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InsertContext } from './insert-menu';
|
|
2
|
-
import { useBuilder } from './builder-store';
|
|
1
|
+
import type { InsertContext } from './insert-menu.js';
|
|
2
|
+
import { useBuilder } from './builder-store.js';
|
|
3
3
|
/**
|
|
4
4
|
* Where an insert lands: the canvas insert-context resolution, shared by every
|
|
5
5
|
* surface that mounts the canvas engine.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getNode, getParentInfo } from '@elytracms/core/project-graph';
|
|
2
2
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
3
3
|
import { shortId } from '@elytracms/studio/lib/persona/labels';
|
|
4
|
-
import { intersectAllow } from './blocks-model';
|
|
5
|
-
import { useBuilder } from './builder-store';
|
|
4
|
+
import { intersectAllow } from './blocks-model.js';
|
|
5
|
+
import { useBuilder } from './builder-store.js';
|
|
6
6
|
/**
|
|
7
7
|
* Where an insert lands: the canvas insert-context resolution, shared by every
|
|
8
8
|
* surface that mounts the canvas engine.
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* max-height behaviours carried over from the old dialog) lives in
|
|
6
6
|
* `blocks-panel.tsx`.
|
|
7
7
|
*/
|
|
8
|
-
export { BlocksPanel as InsertMenu, preventOutsideDismiss } from './blocks-panel';
|
|
9
|
-
export type { InsertContext } from './blocks-panel';
|
|
8
|
+
export { BlocksPanel as InsertMenu, preventOutsideDismiss } from './blocks-panel.js';
|
|
9
|
+
export type { InsertContext } from './blocks-panel.js';
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* max-height behaviours carried over from the old dialog) lives in
|
|
6
6
|
* `blocks-panel.tsx`.
|
|
7
7
|
*/
|
|
8
|
-
export { BlocksPanel as InsertMenu, preventOutsideDismiss } from './blocks-panel';
|
|
8
|
+
export { BlocksPanel as InsertMenu, preventOutsideDismiss } from './blocks-panel.js';
|
|
9
9
|
//# sourceMappingURL=insert-menu.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CONTAINER_ALIGNMENTS, GRID_MAX_COLUMNS, SPACING_TOKEN_NAMES, STACK_COMPONENT_ID, STACK_ON_MOBILE_PROP, gridStacksOnMobile, isLayoutContainerNode, isSpacingTokenName, isStaticProp, spacingTokenFromLegacyGap, staticProp, } from '@elytracms/core/project-graph';
|
|
3
3
|
import { Field, InspectorSection, Select, Stack } from '@elytracms/studio/ui';
|
|
4
4
|
import { translate } from '@elytracms/studio/lib/i18n';
|
|
5
|
-
import { useBuilder } from './builder-store';
|
|
5
|
+
import { useBuilder } from './builder-store.js';
|
|
6
6
|
/**
|
|
7
7
|
* Contextual layout inspector (EC-162): when a `Stack`/`Grid` container is
|
|
8
8
|
* selected, the Settings tab shows its canonical layout values — direction,
|
|
@@ -9,11 +9,11 @@ import { translate } from '@elytracms/studio/lib/i18n';
|
|
|
9
9
|
import { useData } from '@elytracms/studio/lib/data';
|
|
10
10
|
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, Row, Spacer, Text, } from '@elytracms/studio/ui';
|
|
11
11
|
import { cn } from '@elytracms/studio/lib/utils';
|
|
12
|
-
import { useCollab } from '../collab/collab-context';
|
|
13
|
-
import { useBuilder } from './builder-store';
|
|
14
|
-
import { attachClipboardListeners, useStudioClipboard } from './clipboard-actions';
|
|
15
|
-
import { useReuse } from './reuse-context';
|
|
16
|
-
import { activeDrag, beginDrag, endDrag, onDragSessionEnd } from './drag-session';
|
|
12
|
+
import { useCollab } from '../collab/collab-context.js';
|
|
13
|
+
import { useBuilder } from './builder-store.js';
|
|
14
|
+
import { attachClipboardListeners, useStudioClipboard } from './clipboard-actions.js';
|
|
15
|
+
import { useReuse } from './reuse-context.js';
|
|
16
|
+
import { activeDrag, beginDrag, endDrag, onDragSessionEnd } from './drag-session.js';
|
|
17
17
|
function flatten(node, depth, rows, meta) {
|
|
18
18
|
rows.push({ id: node.id, componentId: node.componentId, depth, ...meta, condition: node.condition });
|
|
19
19
|
for (const children of Object.values(node.slots ?? {})) {
|
|
@@ -6,9 +6,9 @@ import { Badge, Code, Field, InspectorSection, PanelHeader, Row, Spacer, Stack,
|
|
|
6
6
|
import { humanizeName } from '@elytracms/studio/lib/utils';
|
|
7
7
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
8
8
|
import { componentDisplayName } from '@elytracms/studio/lib/persona/labels';
|
|
9
|
-
import { PropValueControl } from '../cms/prop-fields';
|
|
10
|
-
import { useBuilder } from './builder-store';
|
|
11
|
-
import { LayoutSection, layoutManagedPropNames } from './layout-inspector';
|
|
9
|
+
import { PropValueControl } from '../cms/prop-fields.js';
|
|
10
|
+
import { useBuilder } from './builder-store.js';
|
|
11
|
+
import { LayoutSection, layoutManagedPropNames } from './layout-inspector.js';
|
|
12
12
|
export function PropertyInspector() {
|
|
13
13
|
const builder = useBuilder();
|
|
14
14
|
const studio = getStudioRegistry();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ReuseCapability } from './reuse';
|
|
2
|
+
import type { ReuseCapability } from './reuse.js';
|
|
3
3
|
/**
|
|
4
4
|
* In-canvas reuse gestures (EC-282): "Make reusable" promotes a selected block to
|
|
5
5
|
* a new reusable document and replaces it in place with a transcluding embed;
|
|
@@ -5,9 +5,9 @@ import { readDocumentRef } from '@elytracms/core/cms-core';
|
|
|
5
5
|
import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Field, Input, Stack, toast, } from '@elytracms/studio/ui';
|
|
6
6
|
import { getStudioRegistry } from '@elytracms/studio/lib/registry';
|
|
7
7
|
import { localizedLabel, translate } from '@elytracms/studio/lib/i18n';
|
|
8
|
-
import { useCms } from '../cms/cms-store';
|
|
9
|
-
import { useBuilder } from './builder-store';
|
|
10
|
-
import { buildReusableValues, makeEmbedNode, resolveReuseCapability } from './reuse';
|
|
8
|
+
import { useCms } from '../cms/cms-store.js';
|
|
9
|
+
import { useBuilder } from './builder-store.js';
|
|
10
|
+
import { buildReusableValues, makeEmbedNode, resolveReuseCapability } from './reuse.js';
|
|
11
11
|
const ReuseContext = createContext(null);
|
|
12
12
|
export function useReuse() {
|
|
13
13
|
return useContext(ReuseContext);
|
|
@@ -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
|
*
|