@case-framework/survey-editor-ui 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +75 -0
  2. package/dist/item-core-registry.cjs.js +1 -1
  3. package/dist/item-core-registry.cjs.js.map +1 -1
  4. package/dist/item-core-registry.es.js.map +1 -1
  5. package/dist/src/components/c-ui/alert-provider.d.ts +1 -1
  6. package/dist/src/components/c-ui/confirm-dialog.d.ts +3 -1
  7. package/dist/src/components/c-ui/confirm-provider.d.ts +2 -1
  8. package/dist/src/components/c-ui/dot-background.d.ts +2 -2
  9. package/dist/src/components/c-ui/filepicker-dropzone.d.ts +1 -1
  10. package/dist/src/components/common/content-editable-plain.d.ts +1 -1
  11. package/dist/src/components/common/drag-drop-provider.d.ts +7 -0
  12. package/dist/src/components/common/sortable-tree.d.ts +8 -1
  13. package/dist/src/components/rich-text/rich-text-block-editor.d.ts +1 -1
  14. package/dist/src/components/rich-text/rich-text-content-view.d.ts +1 -1
  15. package/dist/src/components/rich-text/rich-text-editor-context.d.ts +1 -1
  16. package/dist/src/components/rich-text-editor/plugins/docked-toolbar-plugin.d.ts +4 -2
  17. package/dist/src/components/rich-text-editor/plugins/end-of-content-editing-area-plugin.d.ts +1 -1
  18. package/dist/src/components/rich-text-editor/plugins/floating-toolbar-plugin.d.ts +1 -1
  19. package/dist/src/components/rich-text-editor/plugins/image-dialog-plugin.d.ts +1 -1
  20. package/dist/src/components/rich-text-editor/plugins/info-box-popover-plugin.d.ts +1 -1
  21. package/dist/src/components/rich-text-editor/plugins/link-popover-plugin.d.ts +1 -1
  22. package/dist/src/components/rich-text-editor/plugins/slash-command-menu-plugin.d.ts +3 -2
  23. package/dist/src/components/rich-text-editor/rich-text-editor.d.ts +3 -1
  24. package/dist/src/components/rich-text-editor/rich-text-menu-styles.d.ts +6 -0
  25. package/dist/src/components/rich-text-editor/style-control-icon.d.ts +1 -1
  26. package/dist/src/components/ui/alert-dialog.d.ts +12 -12
  27. package/dist/src/components/ui/alert.d.ts +4 -4
  28. package/dist/src/components/ui/badge.d.ts +2 -2
  29. package/dist/src/components/ui/breadcrumb.d.ts +7 -7
  30. package/dist/src/components/ui/button.d.ts +2 -2
  31. package/dist/src/components/ui/calendar.d.ts +2 -2
  32. package/dist/src/components/ui/card.d.ts +7 -7
  33. package/dist/src/components/ui/checkbox.d.ts +1 -1
  34. package/dist/src/components/ui/collapsible.d.ts +3 -3
  35. package/dist/src/components/ui/command.d.ts +9 -9
  36. package/dist/src/components/ui/context-menu.d.ts +15 -15
  37. package/dist/src/components/ui/dialog.d.ts +10 -10
  38. package/dist/src/components/ui/dropdown-menu.d.ts +15 -15
  39. package/dist/src/components/ui/field.d.ts +10 -10
  40. package/dist/src/components/ui/input-group.d.ts +6 -6
  41. package/dist/src/components/ui/input.d.ts +1 -1
  42. package/dist/src/components/ui/kbd.d.ts +2 -2
  43. package/dist/src/components/ui/label.d.ts +1 -1
  44. package/dist/src/components/ui/popover.d.ts +7 -7
  45. package/dist/src/components/ui/progress.d.ts +1 -1
  46. package/dist/src/components/ui/radio-group.d.ts +2 -2
  47. package/dist/src/components/ui/resizable.d.ts +3 -3
  48. package/dist/src/components/ui/scroll-area.d.ts +2 -2
  49. package/dist/src/components/ui/select.d.ts +10 -10
  50. package/dist/src/components/ui/separator.d.ts +1 -1
  51. package/dist/src/components/ui/skeleton.d.ts +1 -1
  52. package/dist/src/components/ui/slider.d.ts +1 -1
  53. package/dist/src/components/ui/sonner.d.ts +1 -1
  54. package/dist/src/components/ui/switch.d.ts +1 -1
  55. package/dist/src/components/ui/tabs.d.ts +4 -4
  56. package/dist/src/components/ui/textarea.d.ts +1 -1
  57. package/dist/src/components/ui/toggle-group.d.ts +2 -2
  58. package/dist/src/components/ui/toggle.d.ts +1 -1
  59. package/dist/src/components/ui/tooltip.d.ts +4 -4
  60. package/dist/src/index.d.ts +1 -1
  61. package/dist/src/modules/default-item-registry/items/form/editor/field-item-preview.d.ts +1 -1
  62. package/dist/src/modules/default-item-registry/items/form/editor/field-type-shared.d.ts +7 -7
  63. package/dist/src/modules/default-item-registry/items/form/editor/simple-field-editor.d.ts +1 -1
  64. package/dist/src/modules/default-item-registry/shared/preview/question-header.d.ts +1 -1
  65. package/dist/src/modules/default-item-registry/shared/question-editor/deferred-localized-rich-text-field.d.ts +1 -0
  66. package/dist/src/modules/survey-editor/assets/survey-image-asset-manager.d.ts +1 -1
  67. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-actions.d.ts +2 -6
  68. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-add-item-catalog.d.ts +6 -0
  69. package/dist/src/modules/survey-editor/editor-card/add-items/hooks/use-insert-item-preset.d.ts +18 -0
  70. package/dist/src/modules/survey-editor/editor-card/add-items/item-preset-utils.d.ts +6 -0
  71. package/dist/src/modules/survey-editor/editor-card/add-items/views/item-type-grid-view.d.ts +1 -1
  72. package/dist/src/modules/survey-editor/editor-card/copy-item-dropdown-menu.d.ts +1 -1
  73. package/dist/src/modules/survey-editor/editor-card/delete-item-dropdown-menu.d.ts +1 -1
  74. package/dist/src/modules/survey-editor/editor-card/group-items.d.ts +1 -1
  75. package/dist/src/modules/survey-editor/editor-card/index.d.ts +1 -0
  76. package/dist/src/modules/survey-editor/editor-card/item-authoring-state-preview.d.ts +7 -10
  77. package/dist/src/modules/survey-editor/editor-card/item-color-menu.d.ts +3 -2
  78. package/dist/src/modules/survey-editor/editor-card/item-editing-header.d.ts +17 -0
  79. package/dist/src/modules/survey-editor/editor-card/item-editing-panels.d.ts +16 -0
  80. package/dist/src/modules/survey-editor/editor-card/item-editing-surface-context.d.ts +8 -0
  81. package/dist/src/modules/survey-editor/editor-card/item-editing-surface.d.ts +10 -0
  82. package/dist/src/modules/survey-editor/editor-card/item-editor-apply-context.d.ts +19 -0
  83. package/dist/src/modules/survey-editor/editor-card/item-editor-card.d.ts +8 -0
  84. package/dist/src/modules/survey-editor/editor-card/item-editor-header-styles.d.ts +1 -0
  85. package/dist/src/modules/survey-editor/editor-card/item-expression-overview.d.ts +3 -3
  86. package/dist/src/modules/survey-editor/editor-card/item-key-editor.d.ts +1 -1
  87. package/dist/src/modules/survey-editor/editor-card/item-preview.d.ts +2 -1
  88. package/dist/src/modules/survey-editor/editor-card/item-type-icon-with-tooltip.d.ts +1 -1
  89. package/dist/src/modules/survey-editor/editor-card/recommended-item-types.d.ts +1 -1
  90. package/dist/src/modules/survey-editor/expression-integrity.d.ts +6 -0
  91. package/dist/src/modules/survey-editor/index.d.ts +1 -1
  92. package/dist/src/modules/survey-editor/preview-draft/preview-draft-context.d.ts +20 -0
  93. package/dist/src/modules/survey-editor/preview-viewport-toggle.d.ts +1 -1
  94. package/dist/src/modules/survey-editor/primitives/input-with-ai-popover.d.ts +1 -1
  95. package/dist/src/modules/survey-editor/routes/editor/_components/assistant-authoring-lock.d.ts +2 -2
  96. package/dist/src/modules/survey-editor/routes/editor/_components/editor-assistant-slot.d.ts +2 -2
  97. package/dist/src/modules/survey-editor/routes/editor/_components/editor-mode-switch.d.ts +1 -1
  98. package/dist/src/modules/survey-editor/routes/editor/_components/editor-workspace.d.ts +2 -2
  99. package/dist/src/modules/survey-editor/routes/editor/_components/expression-diagnostics-status.d.ts +1 -0
  100. package/dist/src/modules/survey-editor/routes/editor/_components/footer.d.ts +1 -1
  101. package/dist/src/modules/survey-editor/routes/editor/_components/main.d.ts +0 -2
  102. package/dist/src/modules/survey-editor/routes/editor/_components/workspace-panel-toggles.d.ts +23 -0
  103. package/dist/src/modules/survey-editor/routes/editor/asset-manager/index.d.ts +1 -1
  104. package/dist/src/modules/survey-editor/routes/editor/index.d.ts +0 -2
  105. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-drag-drop.d.ts +34 -0
  106. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/language-picker.d.ts +1 -1
  107. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-item-toolbox.d.ts +1 -0
  108. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-left-panel.d.ts +1 -0
  109. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-outline.d.ts +2 -2
  110. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/survey-workspace.d.ts +1 -3
  111. package/dist/src/modules/survey-editor/routes/editor/item-editor/index.d.ts +1 -5
  112. package/dist/src/modules/survey-editor/routes/editor/preview-mode/index.d.ts +3 -4
  113. package/dist/src/modules/survey-editor/routes/editor/preview-mode/page-break-divider.d.ts +1 -1
  114. package/dist/src/modules/survey-editor/routes/editor/preview-mode/preview-controls.d.ts +1 -4
  115. package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-canvas.d.ts +1 -1
  116. package/dist/src/modules/survey-editor/routes/editor/preview-mode/survey-preview-item.d.ts +1 -1
  117. package/dist/src/modules/survey-editor/routes/editor/translation-mode/index.d.ts +1 -1
  118. package/dist/src/modules/survey-editor/routes/editor/translation-mode/translation-left-panel.d.ts +5 -0
  119. package/dist/src/modules/survey-editor/store/editor-store.d.ts +3 -0
  120. package/dist/src/modules/survey-editor/survey-editor.d.ts +19 -2
  121. package/dist/survey-editor-defaults.css +14 -0
  122. package/dist/survey-editor-ui.cjs.js +70 -68
  123. package/dist/survey-editor-ui.cjs.js.map +1 -1
  124. package/dist/survey-editor-ui.css +2 -2
  125. package/dist/survey-editor-ui.es.js +22161 -20432
  126. package/dist/survey-editor-ui.es.js.map +1 -1
  127. package/package.json +10 -10
  128. package/dist/src/modules/survey-editor/routes/editor/item-editor/_components/item-editor-toolbar/item-editor-toolbar.d.ts +0 -6
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { Layout } from 'react-resizable-panels';
3
+ import { EditorSide } from './item-editing-header';
4
+ interface ItemEditingPanelsProps {
5
+ fillHeight: boolean;
6
+ horizontal: boolean;
7
+ editorSide: EditorSide;
8
+ previewVisible: boolean;
9
+ initialLayout?: Layout;
10
+ editor: ReactNode;
11
+ preview: ReactNode;
12
+ resizeLabel: string;
13
+ onLayoutChanged: (layout: Layout) => void;
14
+ }
15
+ export declare const ItemEditingPanels: ({ fillHeight, horizontal, editorSide, previewVisible, initialLayout, editor, preview, resizeLabel, onLayoutChanged, }: ItemEditingPanelsProps) => import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ItemEditingPresentation } from './item-editing-header';
2
+ interface ItemEditingSurfaceContextValue {
3
+ presentation: ItemEditingPresentation;
4
+ }
5
+ export declare const ItemEditingSurfaceProvider: import('react').Provider<ItemEditingSurfaceContextValue | null>;
6
+ export declare const useItemEditingSurface: () => ItemEditingSurfaceContextValue | null;
7
+ export declare const useIsInsideItemEditingSurface: () => boolean;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SurveyItemCore } from '@case-framework/survey-core';
2
+ import { ItemEditingPresentation } from './item-editing-header';
3
+ interface ItemEditingSurfaceProps {
4
+ item: SurveyItemCore;
5
+ presentation: ItemEditingPresentation;
6
+ afterDeleteItemId?: string | null;
7
+ className?: string;
8
+ }
9
+ export declare const ItemEditingSurface: (props: ItemEditingSurfaceProps) => import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ interface ItemEditorApplyContextValue {
3
+ hasPendingChanges: boolean;
4
+ applyPendingChanges: () => void;
5
+ registerPendingChange: (id: string, apply: () => void) => () => void;
6
+ setPendingChange: (id: string, isPending: boolean) => void;
7
+ }
8
+ export declare const ItemEditorApplyProvider: ({ children }: {
9
+ children: ReactNode;
10
+ }) => import("react").JSX.Element;
11
+ interface UseItemEditorApplyActionOptions {
12
+ id: string;
13
+ isPending: boolean;
14
+ apply: () => void;
15
+ }
16
+ /** Lets an editor-owned draft opt into the card-level Apply action. */
17
+ export declare const useItemEditorApplyAction: ({ id, isPending, apply, }: UseItemEditorApplyActionOptions) => void;
18
+ export declare const useItemEditorApply: () => ItemEditorApplyContextValue;
19
+ export {};
@@ -26,5 +26,13 @@ interface ItemEditorCardProps {
26
26
  conditionsPopover?: ConditionsPopoverConfig;
27
27
  children: ReactNode;
28
28
  }
29
+ interface ConditionsIndicatorProps {
30
+ item: SurveyItemCore;
31
+ title: string;
32
+ description?: string;
33
+ accent: string;
34
+ }
35
+ /** A compact, always-visible summary of an item's branching and validation rules. */
36
+ export declare const ConditionsIndicator: React.FC<ConditionsIndicatorProps>;
29
37
  declare const ItemEditorCard: React.FC<ItemEditorCardProps>;
30
38
  export default ItemEditorCard;
@@ -0,0 +1 @@
1
+ export declare const ITEM_EDITOR_HEADER_ROW_CLASS_NAME = "flex min-h-9 w-full shrink-0 flex-wrap items-center gap-1.5 px-4 py-0.5";
@@ -14,7 +14,7 @@ interface ExpressionIconButtonProps {
14
14
  className?: string;
15
15
  }
16
16
  /** A compact condition indicator that opens the same complete read-only expression view. */
17
- export declare function ExpressionIconButton({ expression, title, className }: ExpressionIconButtonProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ExpressionIconButton({ expression, title, className }: ExpressionIconButtonProps): import("react").JSX.Element;
18
18
  interface ItemExpressionsDialogButtonProps {
19
19
  item: SurveyItemCore;
20
20
  title: string;
@@ -22,12 +22,12 @@ interface ItemExpressionsDialogButtonProps {
22
22
  scope?: ItemExpressionScope;
23
23
  }
24
24
  /** Opens all expression-bearing rules for an item from small indicators such as preview badges. */
25
- export declare function ItemExpressionsDialogButton({ item, title, className, scope, }: ItemExpressionsDialogButtonProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function ItemExpressionsDialogButton({ item, title, className, scope, }: ItemExpressionsDialogButtonProps): import("react").JSX.Element;
26
26
  interface ItemExpressionOverviewProps {
27
27
  item: SurveyItemCore;
28
28
  scope?: ItemExpressionScope;
29
29
  className?: string;
30
30
  compact?: boolean;
31
31
  }
32
- export declare function ItemExpressionOverview({ item, scope, className, compact, }: ItemExpressionOverviewProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function ItemExpressionOverview({ item, scope, className, compact, }: ItemExpressionOverviewProps): import("react").JSX.Element;
33
33
  export {};
@@ -6,5 +6,5 @@ interface ItemKeyEditorProps {
6
6
  onChangeItemKey: (newKey: string) => void;
7
7
  suppressInitialTooltipFocus?: boolean;
8
8
  }
9
- declare const ItemKeyEditor: (props: ItemKeyEditorProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const ItemKeyEditor: (props: ItemKeyEditorProps) => import("react").JSX.Element;
10
10
  export default ItemKeyEditor;
@@ -3,6 +3,7 @@ import { ItemPreviewMode } from '../../../../modules/survey-editor/registry';
3
3
  interface ItemPreviewProps {
4
4
  item: SurveyItemCore | undefined;
5
5
  mode?: ItemPreviewMode;
6
+ previewOnly?: boolean;
6
7
  }
7
- declare const ItemPreview: ({ item, mode }: ItemPreviewProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const ItemPreview: ({ item, mode, previewOnly }: ItemPreviewProps) => import("react").JSX.Element;
8
9
  export default ItemPreview;
@@ -5,5 +5,5 @@ interface ItemTypeIconWithTooltipProps {
5
5
  iconClassName?: string;
6
6
  preventAutoFocus?: boolean;
7
7
  }
8
- declare const ItemTypeIconWithTooltip: ({ typeInfos, color, iconClassName, preventAutoFocus, }: ItemTypeIconWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const ItemTypeIconWithTooltip: ({ typeInfos, color, iconClassName, preventAutoFocus, }: ItemTypeIconWithTooltipProps) => import("react").JSX.Element;
9
9
  export default ItemTypeIconWithTooltip;
@@ -6,5 +6,5 @@ interface RecommendedItemTypesProps {
6
6
  className?: string;
7
7
  headingId?: string;
8
8
  }
9
- export declare const RecommendedItemTypes: ({ targetParentId, targetIndex, title, browseLabel, className, headingId, }: RecommendedItemTypesProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const RecommendedItemTypes: ({ targetParentId, targetIndex, title, browseLabel, className, headingId, }: RecommendedItemTypesProps) => import("react").JSX.Element;
10
10
  export {};
@@ -0,0 +1,6 @@
1
+ import { Survey, SurveyExpressionReferenceDiagnostic, SurveyExpressionResponseSlot, ReferenceUsage } from '@case-framework/survey-core';
2
+ export declare const getEditorSurveyExpressionResponseSlots: (survey: Survey) => SurveyExpressionResponseSlot[];
3
+ export declare const analyzeEditorSurveyExpressionReferences: (survey: Survey) => SurveyExpressionReferenceDiagnostic[];
4
+ export declare const getItemAndDescendantIds: (survey: Survey, itemId: string) => Set<string>;
5
+ /** Returns only valid references outside the subtree that deletion would break. */
6
+ export declare const getExternalReferencesToRemovedItems: (survey: Survey, itemId: string) => ReferenceUsage[];
@@ -1,5 +1,5 @@
1
1
  export { SurveyEditor } from './survey-editor';
2
- export type { SurveyEditorProps, SurveyEditorStateChange } from './survey-editor';
2
+ export type { SurveyEditorController, SurveyEditorHostState, SurveyEditorProps, SurveyEditorStateChange, } from './survey-editor';
3
3
  export type { SurveyEditorWorkspace, SurveyEditorWorkspacePanelOptions } from './workspace';
4
4
  export * from './assistant';
5
5
  export { createSnapshotSurveyEditorAIProvider, type CreateSnapshotSurveyEditorAIProviderOptions, type SurveyEditorAITaskCacheOptions, type SurveyEditorAITaskExecution, type SurveyEditorAITaskExecutor, } from './ai/create-provider';
@@ -0,0 +1,20 @@
1
+ import { Content, Survey } from '@case-framework/survey-core';
2
+ import { ReactNode } from 'react';
3
+ interface PreviewDraftContextValue {
4
+ /** Publish an uncommitted translation change for the participant-facing previews. */
5
+ setTranslationDraft: (itemId: string, locale: string, contentKey: string, content?: Content) => void;
6
+ clearDraft: (itemId: string) => void;
7
+ }
8
+ /**
9
+ * Holds transient authoring values used only by previews. It deliberately never
10
+ * mutates SurveyEditor, so drafts cannot create history entries or be persisted.
11
+ */
12
+ export declare const PreviewDraftProvider: ({ survey, activeItemId, children, }: {
13
+ survey: Survey | null;
14
+ activeItemId?: string;
15
+ children: ReactNode;
16
+ }) => import("react").JSX.Element;
17
+ export declare const usePreviewDraft: () => PreviewDraftContextValue;
18
+ /** The single derived survey shared by inline and fullscreen previews. */
19
+ export declare const usePreviewSurvey: (committedSurvey: Survey | null) => Survey | null;
20
+ export {};
@@ -7,5 +7,5 @@ interface PreviewViewportToggleProps {
7
7
  className?: string;
8
8
  }
9
9
  /** The viewport toggle shared by the expanded authoring preview and simulators. */
10
- export declare const PreviewViewportToggle: ({ viewport, onViewportChange, ariaLabel, getViewportLabel, className, }: PreviewViewportToggleProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const PreviewViewportToggle: ({ viewport, onViewportChange, ariaLabel, getViewportLabel, className, }: PreviewViewportToggleProps) => import("react").JSX.Element;
11
11
  export {};
@@ -31,5 +31,5 @@ interface InputWithAIPopoverProps {
31
31
  onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
32
32
  onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
33
33
  }
34
- declare const InputWithAIPopover: (props: InputWithAIPopoverProps) => import("react/jsx-runtime").JSX.Element;
34
+ declare const InputWithAIPopover: (props: InputWithAIPopoverProps) => import("react").JSX.Element;
35
35
  export default InputWithAIPopover;
@@ -1,7 +1,7 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare const AssistantAuthoringLockStatus: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const AssistantAuthoringLockStatus: () => import("react").JSX.Element | null;
3
3
  interface UserMutationBoundaryProps extends PropsWithChildren {
4
4
  className?: string;
5
5
  }
6
- export declare const UserMutationBoundary: ({ children, className }: UserMutationBoundaryProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const UserMutationBoundary: ({ children, className }: UserMutationBoundaryProps) => import("react").JSX.Element;
7
7
  export {};
@@ -5,8 +5,8 @@ interface EditorAssistantPanelProviderProps {
5
5
  panel?: ReactNode;
6
6
  threadLauncher?: SurveyAssistantThreadLauncher;
7
7
  }
8
- export declare const EditorAssistantPanelProvider: ({ children, panel, threadLauncher, }: EditorAssistantPanelProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const EditorAssistantPanelProvider: ({ children, panel, threadLauncher, }: EditorAssistantPanelProviderProps) => import("react").JSX.Element;
9
9
  export declare const EditorAssistantPanelSlot: ({ openPanel }: {
10
10
  openPanel?: () => void;
11
- }) => import("react/jsx-runtime").JSX.Element;
11
+ }) => import("react").JSX.Element;
12
12
  export {};
@@ -3,5 +3,5 @@ interface EditorModeSwitchProps {
3
3
  onClick: () => void;
4
4
  className?: string;
5
5
  }
6
- export declare const EditorModeSwitch: ({ label, onClick, className }: EditorModeSwitchProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const EditorModeSwitch: ({ label, onClick, className }: EditorModeSwitchProps) => import("react").JSX.Element;
7
7
  export {};
@@ -19,12 +19,12 @@ export interface EditorWorkspacePanelController {
19
19
  }
20
20
  interface EditorWorkspaceProps {
21
21
  id: string;
22
- toolbar: ReactNode;
22
+ toolbar?: ReactNode;
23
23
  main: ReactNode;
24
24
  mainLabel: string;
25
25
  primaryMinSize?: number;
26
26
  left?: EditorWorkspacePanelDefinition;
27
27
  right?: EditorWorkspacePanelDefinition;
28
28
  }
29
- export declare const EditorWorkspace: ({ id, toolbar, main, mainLabel, primaryMinSize, left, right, }: EditorWorkspaceProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const EditorWorkspace: ({ id, toolbar, main, mainLabel, primaryMinSize, left, right, }: EditorWorkspaceProps) => import("react").JSX.Element;
30
30
  export {};
@@ -0,0 +1 @@
1
+ export declare const ExpressionDiagnosticsStatus: () => import("react").JSX.Element | null;
@@ -1,2 +1,2 @@
1
- declare const EditorFooter: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const EditorFooter: () => import("react").JSX.Element;
2
2
  export default EditorFooter;
@@ -1,6 +1,4 @@
1
1
  interface EditorMainProps {
2
- onBackRequested?: () => void;
3
- onSaveRequested: () => void;
4
2
  onSimulatorRequested?: () => void;
5
3
  }
6
4
  declare const EditorMain: React.FC<EditorMainProps>;
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ interface WorkspacePanelTogglesState {
3
+ leftLabel?: string;
4
+ leftOpen: boolean;
5
+ onLeftToggle: () => void;
6
+ rightLabel?: string;
7
+ rightOpen: boolean;
8
+ onRightToggle: () => void;
9
+ }
10
+ export declare const WorkspacePanelTogglesProvider: ({ value, children, }: {
11
+ value: WorkspacePanelTogglesState;
12
+ children: ReactNode;
13
+ }) => import("react").JSX.Element;
14
+ type PanelToggleSeparator = "before" | "after";
15
+ /** Shared left workspace-panel control for mode headers. */
16
+ export declare const WorkspaceLeftPanelToggle: ({ separator }: {
17
+ separator?: PanelToggleSeparator;
18
+ }) => import("react").JSX.Element;
19
+ /** Shared right workspace-panel control for mode headers. */
20
+ export declare const WorkspaceRightPanelToggle: ({ separator }: {
21
+ separator?: PanelToggleSeparator;
22
+ }) => import("react").JSX.Element;
23
+ export {};
@@ -1,2 +1,2 @@
1
- declare const AssetManager: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const AssetManager: () => import("react").JSX.Element;
2
2
  export default AssetManager;
@@ -1,6 +1,4 @@
1
1
  interface EditorProps {
2
- onBackRequested?: () => void;
3
- onSaveRequested?: () => void;
4
2
  onSimulatorRequested?: () => void;
5
3
  }
6
4
  declare const Editor: React.FC<EditorProps>;
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ import { ItemInsertionTarget } from '../../../../../../../modules/survey-editor/editor-card/add-items/hooks/use-insert-item-preset';
3
+ export declare const SURVEY_ITEM_DRAG_TYPE = "survey-editor-item";
4
+ export interface ItemPresetDragData {
5
+ kind: "item-preset";
6
+ presetId: string;
7
+ }
8
+ export interface ExistingItemDragData {
9
+ kind: "existing-item";
10
+ itemId: string;
11
+ }
12
+ export declare const isItemPresetDragData: (data: unknown) => data is ItemPresetDragData;
13
+ export declare const isExistingItemDragData: (data: unknown) => data is ExistingItemDragData;
14
+ export declare const useItemPresetDragActive: () => boolean;
15
+ export declare const useExistingItemDragActive: () => boolean;
16
+ export declare function ExistingItemDragHandle({ itemId, label, disabled }: {
17
+ itemId: string;
18
+ label: string;
19
+ disabled?: boolean;
20
+ }): import("react").JSX.Element;
21
+ export declare function SurveyItemDragDropProvider({ children }: {
22
+ children: ReactNode;
23
+ }): import("react").JSX.Element;
24
+ interface ItemInsertionDropTargetProps {
25
+ target: ItemInsertionTarget;
26
+ surface: "outline" | "preview";
27
+ navigation?: "outline" | "preview" | "none";
28
+ className?: string;
29
+ activeClassName?: string;
30
+ idSuffix?: string;
31
+ children: ReactNode;
32
+ }
33
+ export declare function ItemInsertionDropTarget({ target, surface, navigation, className, activeClassName, idSuffix, children, }: ItemInsertionDropTargetProps): import("react").JSX.Element;
34
+ export {};
@@ -1,2 +1,2 @@
1
- declare const LanguagePicker: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const LanguagePicker: () => import("react").JSX.Element;
2
2
  export default LanguagePicker;
@@ -0,0 +1 @@
1
+ export declare function SurveyItemToolbox(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SurveyLeftPanel(): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const NavigableSurveyOutline: () => import("react/jsx-runtime").JSX.Element;
2
- declare const EditableSurveyOutline: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const NavigableSurveyOutline: () => import("react").JSX.Element;
2
+ declare const EditableSurveyOutline: () => import("react").JSX.Element;
3
3
  export default EditableSurveyOutline;
@@ -5,8 +5,6 @@ interface SurveyWorkspaceProps {
5
5
  main: ReactNode;
6
6
  overlay?: ReactNode;
7
7
  mainLabel: string;
8
- onBackRequested?: () => void;
9
- onSaveRequested: () => void;
10
8
  }
11
- export declare const SurveyWorkspace: ({ mode, main, overlay, mainLabel, onBackRequested, onSaveRequested, }: SurveyWorkspaceProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const SurveyWorkspace: ({ mode, main, overlay, mainLabel }: SurveyWorkspaceProps) => import("react").JSX.Element;
12
10
  export {};
@@ -1,6 +1,2 @@
1
- interface ItemEditorProps {
2
- onBackRequested?: () => void;
3
- onSaveRequested: () => void;
4
- }
5
- declare const ItemEditor: React.FC<ItemEditorProps>;
1
+ declare const ItemEditor: React.FC;
6
2
  export default ItemEditor;
@@ -1,7 +1,6 @@
1
- interface PreviewModeProps {
2
- onBackRequested?: () => void;
3
- onSaveRequested: () => void;
1
+ export interface PreviewModeProps {
4
2
  onSimulatorRequested?: () => void;
3
+ onWorkspaceInertChange?: (inert: boolean) => void;
5
4
  }
6
- declare const PreviewMode: ({ onBackRequested, onSaveRequested, onSimulatorRequested, }: PreviewModeProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const PreviewMode: (props: PreviewModeProps) => import("react").JSX.Element;
7
6
  export default PreviewMode;
@@ -2,5 +2,5 @@ interface PageBreakDividerProps {
2
2
  itemId: string;
3
3
  highlighted: boolean;
4
4
  }
5
- export declare const PageBreakDivider: ({ itemId, highlighted }: PageBreakDividerProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const PageBreakDivider: ({ itemId, highlighted }: PageBreakDividerProps) => import("react").JSX.Element;
6
6
  export {};
@@ -7,9 +7,6 @@ interface PreviewControlsProps {
7
7
  canReset: boolean;
8
8
  onReset: () => void;
9
9
  onSimulatorRequested?: () => void;
10
- fullscreen: boolean;
11
- onFullscreenChange: (fullscreen: boolean) => void;
12
- expanded?: boolean;
13
10
  }
14
- export declare const PreviewControls: ({ preferences, onPreferencesChange, canLocate, onLocate, canReset, onReset, onSimulatorRequested, fullscreen, onFullscreenChange, expanded, }: PreviewControlsProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const PreviewControls: ({ preferences, onPreferencesChange, canLocate, onLocate, canReset, onReset, onSimulatorRequested, }: PreviewControlsProps) => import("react").JSX.Element;
15
12
  export {};
@@ -13,5 +13,5 @@ interface SurveyPreviewCanvasProps {
13
13
  onResponseChanged: () => void;
14
14
  className?: string;
15
15
  }
16
- export declare const SurveyPreviewCanvas: ({ survey, surveyEngine, preferences, focusedItemId, editingItemId, locateRequestKey, initialLocateReady, currentPageIndex, onCurrentPageIndexChange, onResponseChanged, className, }: SurveyPreviewCanvasProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const SurveyPreviewCanvas: ({ survey, surveyEngine, preferences, focusedItemId, editingItemId, locateRequestKey, initialLocateReady, currentPageIndex, onCurrentPageIndexChange, onResponseChanged, className, }: SurveyPreviewCanvasProps) => import("react").JSX.Element;
17
17
  export {};
@@ -9,5 +9,5 @@ interface SurveyPreviewItemProps {
9
9
  onFocus: () => void;
10
10
  afterDeleteItemId: string | null;
11
11
  }
12
- export declare const SurveyPreviewItem: ({ item, renderedItem, preferences, focused, highlighted, onFocus, afterDeleteItemId, }: SurveyPreviewItemProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const SurveyPreviewItem: ({ item, renderedItem, preferences, focused, highlighted, onFocus, afterDeleteItemId, }: SurveyPreviewItemProps) => import("react").JSX.Element;
13
13
  export {};
@@ -1,2 +1,2 @@
1
- declare const TranslationMode: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const TranslationMode: () => import("react").JSX.Element;
2
2
  export default TranslationMode;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Translation mode deliberately exposes language navigation only. Structural
3
+ * survey operations belong to the authoring workspace, not this panel.
4
+ */
5
+ export declare const TranslationLeftPanel: () => import("react").JSX.Element;
@@ -51,13 +51,16 @@ export interface EditorStore {
51
51
  getCommitsSinceInitial: () => SurveyEditorHistoryCommit[];
52
52
  addItem: (target: Target | null, item: SurveyItemCore, content?: SurveyItemTranslations) => void;
53
53
  removeItem: (itemId: string, nested?: boolean) => boolean;
54
+ removeItems: (itemIds: readonly string[]) => boolean;
54
55
  moveItem: (itemId: string, newTarget: Target) => boolean;
56
+ moveItems: (itemIds: readonly string[], newTarget: Target) => boolean;
55
57
  updateItemTranslations: (itemId: string, updatedContent?: SurveyItemTranslations) => boolean;
56
58
  copyItem: (itemId: string) => SurveyItemClipboardData;
57
59
  pasteItem: (clipboardData: SurveyItemClipboardData, target: Target) => string | null;
58
60
  getRootItem: () => GroupItemCore | undefined;
59
61
  getItemDataCopy: (itemId: string) => RawSurveyItem;
60
62
  updateItem: (itemId: string, rawItemData: RawSurveyItem | Partial<RawSurveyItem>) => void;
63
+ rewriteResponseReferences: (replacements: Readonly<Record<string, string>>) => number;
61
64
  updateSurveyTranslations: (updates: {
62
65
  surveyCard?: {
63
66
  locale: string;
@@ -10,6 +10,21 @@ import { LocalizationCatalog } from '@case-framework/ui-localization';
10
10
  import { SurveyEditorDateLocales } from './localization/date-fns';
11
11
  import { SurveyEditorWorkspace } from './workspace';
12
12
  export type SurveyEditorStateChange = EditorStateChangePayload;
13
+ /** Current editor status intended for application-owned controls. */
14
+ export interface SurveyEditorHostState {
15
+ sessionId: string | null;
16
+ revision: number;
17
+ dirty: boolean;
18
+ canUndo: boolean;
19
+ canRedo: boolean;
20
+ readOnly: boolean;
21
+ }
22
+ /** Commands a host application may invoke from controls outside the editor. */
23
+ export interface SurveyEditorController {
24
+ getSerializedState: () => SerializedSurveyEditor | null;
25
+ undo: () => boolean;
26
+ redo: () => boolean;
27
+ }
13
28
  export interface SurveyEditorProps {
14
29
  initialEditorState?: SerializedSurveyEditor;
15
30
  initialSessionId?: string;
@@ -21,6 +36,10 @@ export interface SurveyEditorProps {
21
36
  /** Override or extend default add-item category headings (merged with built-in defaults). */
22
37
  categoryLabels?: Partial<Record<ItemCategory, ItemLocaleMap>>;
23
38
  onEditorStateChange?: (change: SurveyEditorStateChange) => void;
39
+ /** Receives immediate status updates for application-owned editor controls. */
40
+ onHostStateChange?: (state: SurveyEditorHostState) => void;
41
+ /** Optional imperative bridge for application-owned editor controls. */
42
+ controllerRef?: React.Ref<SurveyEditorController | null>;
24
43
  /** Prevent user-authored survey mutations while preserving preview and navigation. */
25
44
  readOnly?: boolean;
26
45
  /** Optional imperative bridge for a survey assistant host. */
@@ -35,9 +54,7 @@ export interface SurveyEditorProps {
35
54
  /** Configure the initial main panel and workspace panels. */
36
55
  workspace?: SurveyEditorWorkspace;
37
56
  aiProvider?: SurveyEditorAIProvider | null;
38
- onBackRequested?: () => void;
39
57
  onSimulatorRequested?: () => void;
40
- onSaveRequested?: () => void;
41
58
  }
42
59
  declare const SurveyEditor: React.FC<SurveyEditorProps>;
43
60
  export { SurveyEditor };
@@ -1,6 +1,10 @@
1
1
  .survey-editor {
2
2
  /* Editor card / preview canvas — neutral near-white */
3
3
  --surface-bg-color: oklch(99.1% 0 0);
4
+ --survey-editor-workspace-radius: 0.75rem;
5
+ --survey-editor-workspace-border-top-width: 1px;
6
+ --survey-editor-footer-padding-inline: 0px;
7
+ --survey-editor-footer-padding-bottom: 0px;
4
8
 
5
9
  /*
6
10
  * Rich text emphasis (Lexical + preview). Chosen for strong contrast on
@@ -13,3 +17,13 @@
13
17
  --rich-text-editor-primary-color: oklch(0.36 0.12 264);
14
18
  --rich-text-editor-accent-color: oklch(0.44 0.15 48);
15
19
  }
20
+
21
+ .survey-editor-workspace-surface {
22
+ border-radius: var(--survey-editor-workspace-radius);
23
+ border-top-width: var(--survey-editor-workspace-border-top-width);
24
+ }
25
+
26
+ .survey-editor-footer {
27
+ padding-inline: var(--survey-editor-footer-padding-inline);
28
+ padding-bottom: var(--survey-editor-footer-padding-bottom);
29
+ }