@case-framework/survey-editor-ui 0.1.1 → 0.3.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adds editor-only room below non-empty content. Clicking it selects an existing
3
+ * trailing paragraph or creates one, without persisting a placeholder paragraph
4
+ * merely because the editor was opened.
5
+ */
6
+ export declare function EndOfContentEditingAreaPlugin(): import("react/jsx-runtime").JSX.Element | null;
@@ -19,6 +19,8 @@ export interface RichTextEditorProps {
19
19
  wrapperClassName?: string;
20
20
  surfaceClassName?: string;
21
21
  contentClassName?: string;
22
+ /** Add generous editor-only space below non-empty content that continues in a new paragraph. */
23
+ endOfContentEditingArea?: boolean;
22
24
  placeholderClassName?: string;
23
25
  toolbarClassName?: string;
24
26
  commandMenuClassName?: string;
@@ -40,4 +42,4 @@ export interface RichTextEditorProps {
40
42
  onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
41
43
  onKeyDownCapture?: KeyboardEventHandler<HTMLDivElement>;
42
44
  }
43
- export declare function RichTextEditor({ id, value, placeholder, autoFocus, editable, wrapperClassName, surfaceClassName, contentClassName, placeholderClassName, toolbarClassName, commandMenuClassName, styleControls, templateVariables, editorVariant, contentPolicy, resolveImageAssetUrl, imageAssets, registerImageAsset, imageAssetDeletion, linksEnabled, "aria-label": ariaLabel, onChange, onFocus, onBlur, onKeyDown, onKeyDownCapture, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function RichTextEditor({ id, value, placeholder, autoFocus, editable, wrapperClassName, surfaceClassName, contentClassName, endOfContentEditingArea, placeholderClassName, toolbarClassName, commandMenuClassName, styleControls, templateVariables, editorVariant, contentPolicy, resolveImageAssetUrl, imageAssets, registerImageAsset, imageAssetDeletion, linksEnabled, "aria-label": ariaLabel, onChange, onFocus, onBlur, onKeyDown, onKeyDownCapture, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,7 @@ export interface DeferredLocalizedRichTextFieldProps {
13
13
  wrapperClassName?: string;
14
14
  surfaceClassName?: string;
15
15
  contentClassName?: string;
16
+ endOfContentEditingArea?: boolean;
16
17
  placeholderClassName?: string;
17
18
  styleControls?: RichTextStyleControl[];
18
19
  templateVariables?: RichTextTemplateVariable[];
@@ -1,2 +1,6 @@
1
- declare const ItemEditorCard: React.FC;
1
+ interface ItemEditorCardProps {
2
+ itemId?: string;
3
+ presentation?: "workspace" | "inline" | "fullscreen";
4
+ }
5
+ declare const ItemEditorCard: React.FC<ItemEditorCardProps>;
2
6
  export default ItemEditorCard;
@@ -4,9 +4,10 @@ interface ItemAuthoringStatePreviewProps {
4
4
  state: ItemAuthoringState;
5
5
  itemTypeLabel: string;
6
6
  onEdit?: () => void;
7
+ description?: string;
7
8
  className?: string;
8
9
  }
9
- export declare function ItemAuthoringStatePreview({ state, itemTypeLabel, onEdit, className, }: ItemAuthoringStatePreviewProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function ItemAuthoringStatePreview({ state, itemTypeLabel, onEdit, description, className, }: ItemAuthoringStatePreviewProps): import("react/jsx-runtime").JSX.Element;
10
11
  interface IncompleteItemPreviewFrameProps {
11
12
  children: ReactNode;
12
13
  onEdit?: () => void;
@@ -0,0 +1,10 @@
1
+ interface RecommendedItemTypesProps {
2
+ targetParentId: string;
3
+ targetIndex?: number;
4
+ title: string;
5
+ browseLabel: string;
6
+ className?: string;
7
+ headingId?: string;
8
+ }
9
+ export declare const RecommendedItemTypes: ({ targetParentId, targetIndex, title, browseLabel, className, headingId, }: RecommendedItemTypesProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -9,6 +9,8 @@ export interface TranslationModeLocation {
9
9
  export interface PreviewModeLocation {
10
10
  view: "preview-mode";
11
11
  itemId?: string;
12
+ editingItemId?: string;
13
+ presentation?: "inline" | "fullscreen";
12
14
  }
13
15
  export interface AssetManagerLocation {
14
16
  view: "asset-manager";
@@ -5,6 +5,7 @@ interface SurveyPreviewCanvasProps {
5
5
  surveyEngine: SurveyEngineCore;
6
6
  preferences: PreviewPreferences;
7
7
  focusedItemId?: string;
8
+ editingItemId?: string;
8
9
  locateRequestKey: number;
9
10
  initialLocateReady: boolean;
10
11
  currentPageIndex: number;
@@ -12,5 +13,5 @@ interface SurveyPreviewCanvasProps {
12
13
  onResponseChanged: () => void;
13
14
  className?: string;
14
15
  }
15
- export declare const SurveyPreviewCanvas: ({ survey, surveyEngine, preferences, focusedItemId, 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-runtime").JSX.Element;
16
17
  export {};
@@ -0,0 +1,2 @@
1
+ import { SurveyEditorLocation } from '../navigation/types';
2
+ export declare const getFocusedItemLocation: (location: SurveyEditorLocation, itemId?: string, itemType?: string, isRootItem?: boolean) => SurveyEditorLocation;
@@ -55,6 +55,24 @@
55
55
  will-change: transform, opacity;
56
56
  }
57
57
 
58
+ .survey-editor-opening-inline-item {
59
+ animation: survey-editor-open-inline-item 180ms cubic-bezier(0.215, 0.61, 0.355, 1);
60
+ transform-origin: top center;
61
+ will-change: transform, opacity;
62
+ }
63
+
64
+ @keyframes survey-editor-open-inline-item {
65
+ from {
66
+ opacity: 0;
67
+ transform: translateY(8px) scale(0.99);
68
+ }
69
+
70
+ to {
71
+ opacity: 1;
72
+ transform: translateY(0) scale(1);
73
+ }
74
+ }
75
+
58
76
  @keyframes survey-editor-open-item {
59
77
  from {
60
78
  opacity: 0;
@@ -80,7 +98,8 @@
80
98
  @media (prefers-reduced-motion: reduce) {
81
99
  .survey-editor-opening-item,
82
100
  .survey-editor-opening-item > *,
83
- .survey-editor-opening-preview {
101
+ .survey-editor-opening-preview,
102
+ .survey-editor-opening-inline-item {
84
103
  animation: none;
85
104
  will-change: auto;
86
105
  }