@project-sunbird/sunbird-questionset-editor-web-component-react 0.1.9 → 0.1.11

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/LICENSE +201 -0
  2. package/README.md +308 -0
  3. package/dist/api/content.d.ts +0 -1
  4. package/dist/api/framework.d.ts +0 -1
  5. package/dist/api/hierarchy.d.ts +0 -1
  6. package/dist/assets/sunbird-quml-player.js +5 -5
  7. package/dist/components/AssetBrowser/AssetBrowser.d.ts +0 -1
  8. package/dist/components/BehaviourForm/SetBehaviourForm.d.ts +0 -1
  9. package/dist/components/CKEditorField/CKEditorField.d.ts +0 -1
  10. package/dist/components/ContextualEditor/ContextualEditor.d.ts +0 -1
  11. package/dist/components/LibraryDock/LibraryDock.d.ts +0 -1
  12. package/dist/components/OutlineTree/OutlineTree.d.ts +0 -1
  13. package/dist/components/QuestionDetail/QuestionDetail.d.ts +0 -1
  14. package/dist/components/QuestionEditor/BooleanEditor/BooleanEditor.d.ts +0 -1
  15. package/dist/components/QuestionEditor/FtbEditor/FtbEditor.d.ts +0 -1
  16. package/dist/components/QuestionEditor/McqEditor/McqEditor.d.ts +0 -1
  17. package/dist/components/QuestionEditor/MtfEditor/MtfEditor.d.ts +0 -1
  18. package/dist/components/QuestionEditor/QuestionEditor.d.ts +0 -1
  19. package/dist/components/QuestionEditor/ReoEditor/ReoEditor.d.ts +0 -1
  20. package/dist/components/QuestionEditor/SaEditor/SaEditor.d.ts +0 -1
  21. package/dist/components/QuestionEditor/SeqEditor/SeqEditor.d.ts +0 -1
  22. package/dist/components/QuestionsetEditor/QuestionsetEditor.d.ts +0 -1
  23. package/dist/components/QumlPlayer/QumlPlayer.d.ts +7 -1
  24. package/dist/components/SectionBehaviourForm/SectionBehaviourForm.d.ts +0 -1
  25. package/dist/components/SparkMetaForm/SparkMetaForm.d.ts +0 -1
  26. package/dist/components/SplitEditorShell/SplitEditorShell.d.ts +0 -1
  27. package/dist/components/Topbar/Topbar.d.ts +0 -1
  28. package/dist/components/modals/ConfirmDialog.d.ts +0 -1
  29. package/dist/components/modals/MissingRequiredFieldsModal.d.ts +0 -1
  30. package/dist/components/modals/ProgressStatusModal.d.ts +0 -1
  31. package/dist/components/modals/PublishChecklist.d.ts +0 -1
  32. package/dist/components/modals/QualityParamsModal.d.ts +0 -1
  33. package/dist/components/modals/QuestionTypeSelectorModal.d.ts +0 -1
  34. package/dist/components/modals/TermAndConditionModal.d.ts +0 -1
  35. package/dist/components/modals/UnsavedChangesModal.d.ts +0 -1
  36. package/dist/components/shared/Badge.d.ts +0 -1
  37. package/dist/components/shared/Button.d.ts +0 -1
  38. package/dist/components/shared/ContentEditable.d.ts +0 -1
  39. package/dist/components/shared/Icon.d.ts +0 -1
  40. package/dist/components/shared/ImagePickerModal.d.ts +0 -1
  41. package/dist/components/shared/MathModal.d.ts +0 -1
  42. package/dist/components/shared/Modal.d.ts +0 -1
  43. package/dist/components/shared/SharedRichToolbar.d.ts +0 -1
  44. package/dist/components/shared/Spinner.d.ts +0 -1
  45. package/dist/hooks/useChannelData.d.ts +0 -1
  46. package/dist/hooks/useEditorInit.d.ts +0 -1
  47. package/dist/hooks/useFramework.d.ts +0 -1
  48. package/dist/hooks/useLibrary.d.ts +0 -1
  49. package/dist/hooks/useSaveQuestion.d.ts +4 -0
  50. package/dist/hooks/useTelemetry.d.ts +0 -1
  51. package/dist/hooks/useToolbarActions.d.ts +0 -1
  52. package/dist/hooks/useValidateAndSave.d.ts +7 -0
  53. package/dist/index.js +8427 -10155
  54. package/dist/registry/index.d.ts +0 -1
  55. package/dist/registry/questionTypeRegistry.d.ts +0 -1
  56. package/dist/store/editor.store.d.ts +0 -1
  57. package/dist/store/library.store.d.ts +0 -1
  58. package/dist/store/question.store.d.ts +0 -1
  59. package/dist/store/tree.store.d.ts +0 -1
  60. package/dist/store/ui.store.d.ts +6 -0
  61. package/dist/style.css +1 -1
  62. package/dist/utils/context.d.ts +0 -1
  63. package/dist/utils/i18nSerialize.d.ts +0 -1
  64. package/dist/utils/nodeKind.d.ts +0 -1
  65. package/dist/utils/questionRead.d.ts +0 -1
  66. package/dist/utils/telemetry.d.ts +0 -1
  67. package/package.json +11 -26
  68. package/dist/components/RichTextEditor/RichTextEditor.d.ts +0 -28
  69. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_AMS-Regular.ttf +0 -0
  70. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_AMS-Regular.woff +0 -0
  71. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_AMS-Regular.woff2 +0 -0
  72. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Bold.ttf +0 -0
  73. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Bold.woff +0 -0
  74. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Bold.woff2 +0 -0
  75. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Regular.ttf +0 -0
  76. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Regular.woff +0 -0
  77. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Caligraphic-Regular.woff2 +0 -0
  78. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Bold.ttf +0 -0
  79. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Bold.woff +0 -0
  80. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Bold.woff2 +0 -0
  81. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Regular.ttf +0 -0
  82. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Regular.woff +0 -0
  83. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Fraktur-Regular.woff2 +0 -0
  84. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Bold.ttf +0 -0
  85. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Bold.woff +0 -0
  86. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Bold.woff2 +0 -0
  87. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-BoldItalic.ttf +0 -0
  88. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-BoldItalic.woff +0 -0
  89. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-BoldItalic.woff2 +0 -0
  90. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Italic.ttf +0 -0
  91. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Italic.woff +0 -0
  92. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Italic.woff2 +0 -0
  93. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Regular.ttf +0 -0
  94. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Regular.woff +0 -0
  95. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Main-Regular.woff2 +0 -0
  96. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-BoldItalic.ttf +0 -0
  97. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-BoldItalic.woff +0 -0
  98. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-BoldItalic.woff2 +0 -0
  99. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-Italic.ttf +0 -0
  100. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-Italic.woff +0 -0
  101. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Math-Italic.woff2 +0 -0
  102. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Bold.ttf +0 -0
  103. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Bold.woff +0 -0
  104. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Bold.woff2 +0 -0
  105. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Italic.ttf +0 -0
  106. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Italic.woff +0 -0
  107. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Italic.woff2 +0 -0
  108. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Regular.ttf +0 -0
  109. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Regular.woff +0 -0
  110. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_SansSerif-Regular.woff2 +0 -0
  111. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Script-Regular.ttf +0 -0
  112. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Script-Regular.woff +0 -0
  113. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Script-Regular.woff2 +0 -0
  114. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size1-Regular.ttf +0 -0
  115. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size1-Regular.woff +0 -0
  116. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size1-Regular.woff2 +0 -0
  117. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size2-Regular.ttf +0 -0
  118. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size2-Regular.woff +0 -0
  119. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size2-Regular.woff2 +0 -0
  120. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size3-Regular.ttf +0 -0
  121. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size3-Regular.woff +0 -0
  122. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size3-Regular.woff2 +0 -0
  123. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size4-Regular.ttf +0 -0
  124. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size4-Regular.woff +0 -0
  125. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Size4-Regular.woff2 +0 -0
  126. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Typewriter-Regular.ttf +0 -0
  127. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Typewriter-Regular.woff +0 -0
  128. /package/dist/{fonts → assets/libs/mathEquation/plugin/mathModal/fonts}/KaTeX_Typewriter-Regular.woff2 +0 -0
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface AssetBrowserProps {
4
3
  isOpen: boolean;
5
4
  onClose: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface SetBehaviourFormProps {
4
3
  nodeId: string;
5
4
  readOnly?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface CKEditorFieldProps {
4
3
  value?: string;
5
4
  onChange?: (html: string) => void;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode, ToolbarAction } from '../../types/editor';
3
-
4
3
  export interface ContextualEditorProps {
5
4
  editorMode?: EditorMode;
6
5
  onToolbarEvent: (event: {
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface LibraryDockProps {
4
3
  /** Called when the user clicks the collapse button */
5
4
  onCollapse: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface OutlineTreeProps {
4
3
  onCollapse: () => void;
5
4
  }
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { INode } from '../../types/editor';
3
-
4
3
  interface QuestionDetailProps {
5
4
  node: INode;
6
5
  onOpenEditor: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface BooleanEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface FtbEditorProps {
4
3
  stemText?: string;
5
4
  readOnly?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface McqEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface MtfEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { EditorMode } from '../../types/editor';
2
-
3
2
  export interface QuestionEditorProps {
4
3
  editorMode: EditorMode;
5
4
  onBack?: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface ReoEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface SaEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface SeqEditorProps {
4
3
  readOnly?: boolean;
5
4
  }
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IEditorConfig, IEditorEvents } from '../../types/editor';
3
-
4
3
  export type QuestionsetEditorProps = IEditorConfig & IEditorEvents;
5
4
  export declare function QuestionsetEditor(props: QuestionsetEditorProps): React.JSX.Element;
6
5
  export default QuestionsetEditor;
@@ -1,10 +1,16 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface QumlPlayerProps {
4
3
  /** Identifier of the question set being previewed. */
5
4
  questionSetId: string;
6
5
  /** When set, previews just this question (old editor question preview). */
7
6
  singleQuestionId?: string;
7
+ /**
8
+ * Pre-built live question metadata (useSaveQuestion's buildLiveQuestionMeta)
9
+ * — when provided alongside singleQuestionId, this is used directly instead
10
+ * of fetching the question, so unsaved edits in the question editor show up
11
+ * in preview (old editor's previewContent()/getQuestionMetadata()).
12
+ */
13
+ draftQuestionMeta?: Record<string, unknown>;
8
14
  /** Render embedded in the page instead of a full-screen overlay. */
9
15
  inline?: boolean;
10
16
  onClose?: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface SectionBehaviourFormProps {
4
3
  nodeId: string;
5
4
  readOnly?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { ICategoryField } from '../../api/categoryDefinition';
3
-
4
3
  /** Shape of a single framework term entry. */
5
4
  export interface FrameworkTerm {
6
5
  name: string;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IEditorEvents } from '../../types/editor';
3
-
4
3
  interface SplitEditorShellProps {
5
4
  events: IEditorEvents;
6
5
  }
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { EditorMode, ToolbarAction } from '../../types/editor';
3
-
4
3
  interface TopbarProps {
5
4
  /** Locks all topbar actions while the inline question editor is open. */
6
5
  disabled?: boolean;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const ConnectedConfirmDialog: React.FC;
4
3
  export default ConnectedConfirmDialog;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface MissingFieldGroup {
4
3
  tab: string;
5
4
  fields: string[];
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface ProgressStatusModalProps {
4
3
  onClose: () => void;
5
4
  }
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface PublishChecklistProps {
4
3
  contentId: string;
5
4
  onConfirm: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface QualityParamsModalProps {
4
3
  contentId: string;
5
4
  action: 'approve' | 'reject';
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const QuestionTypeSelectorModal: React.FC;
4
3
  export default QuestionTypeSelectorModal;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface TermAndConditionModalProps {
4
3
  onConfirm: () => void;
5
4
  onCancel: () => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface UnsavedChangesModalProps {
4
3
  onSave: () => void;
5
4
  onDiscard: () => void;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { QuestionType } from '../../types/question';
3
-
4
3
  export type BadgeSize = 'sm' | 'md';
5
4
  export interface BadgeProps {
6
5
  /** The question type that determines color and icon. */
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export type ButtonVariant = 'primary' | 'ghost' | 'danger' | 'outline';
4
3
  export type ButtonSize = 'sm' | 'md';
5
4
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export interface ContentEditableProps {
4
3
  value?: string;
5
4
  onChange?: (html: string) => void;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IconProps {
4
3
  name: string;
5
4
  size?: number;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export type PickerMediaType = 'image' | 'video' | 'audio';
4
3
  export interface PickedAsset {
5
4
  id: string;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface MathModalProps {
4
3
  /** Position of the Σ toolbar button — dropdown appears below it */
5
4
  anchor: DOMRect;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
3
  export interface ModalProps {
5
4
  /** Title displayed in the modal header. */
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export default function SharedRichToolbar({ disabled }: {
4
3
  disabled?: boolean;
5
4
  }): React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export type SpinnerSize = 'sm' | 'md' | 'lg';
4
3
  export interface SpinnerProps {
5
4
  /** Visual size of the spinner ring. Defaults to 'md'. */
@@ -1,3 +1,2 @@
1
1
  import { IChannelData } from '../api/channel';
2
-
3
2
  export declare function useChannelData(): import('@tanstack/react-query').UseQueryResult<NoInfer<IChannelData>, Error>;
@@ -1,5 +1,4 @@
1
1
  import { IEditorConfig } from '../types/editor';
2
-
3
2
  interface UseEditorInitOptions {
4
3
  config: IEditorConfig;
5
4
  onError?: (e: Error) => void;
@@ -1,5 +1,4 @@
1
1
  import { IFramework, ITerm } from '../types/framework';
2
-
3
2
  export declare function useFramework(): {
4
3
  orgFramework: NoInfer<IFramework> | undefined;
5
4
  targetFrameworks: IFramework[];
@@ -1,5 +1,4 @@
1
1
  import { LibraryFilters } from '../store/library.store';
2
-
3
2
  export declare function useLibrary(): {
4
3
  content: import('../types/content').IContent[];
5
4
  isLoading: boolean;
@@ -1,3 +1,7 @@
1
+ export declare function buildLiveQuestionMeta(): {
2
+ questionName: string;
3
+ questionMeta: Record<string, unknown>;
4
+ } | null;
1
5
  export declare function useSaveQuestion(): {
2
6
  save: () => Promise<boolean>;
3
7
  };
@@ -1,5 +1,4 @@
1
1
  import { telemetryInteract } from '../utils/telemetry';
2
-
3
2
  /**
4
3
  * Telemetry lifecycle — old editor parity: init with the host context, fire
5
4
  * START + the first IMPRESSION on mount, END (with a final flush) on unmount.
@@ -1,5 +1,4 @@
1
1
  import { ToolbarAction } from '../types/editor';
2
-
3
2
  export declare function useToolbarActions(save: () => Promise<boolean | void>): {
4
3
  runAction: (action: ToolbarAction, data?: unknown) => Promise<boolean>;
5
4
  };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Validates root + all sections' required fields (same check "Save as Draft"
3
+ * runs), surfaces MissingRequiredFieldsModal via ui.store on failure, and
4
+ * saves the hierarchy on success. Shared by the toolbar's Save-as-Draft and
5
+ * OutlineTree's auto-save-on-click (Add Section / Add Question).
6
+ */
7
+ export declare function useValidateAndSave(): () => Promise<boolean>;