superdoc 2.28.0 → 2.29.0-next.13

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 (192) hide show
  1. package/dist/chunks/{FindReplaceSurface-Dm043CZP.es.js → FindReplaceSurface-BKVHzhQ4.es.js} +34 -26
  2. package/dist/chunks/{FindReplaceSurface-BRs3JrCq.cjs → FindReplaceSurface-BNDrJ6VS.cjs} +34 -26
  3. package/dist/chunks/{PasswordPromptSurface-DGjmN7A-.es.js → PasswordPromptSurface-6mF6Azda.es.js} +6 -4
  4. package/dist/chunks/{PasswordPromptSurface-BpqP4pUa.cjs → PasswordPromptSurface-BNkaztaP.cjs} +6 -4
  5. package/dist/chunks/{PdfViewer-Cg072l5d.cjs → PdfViewer-DmSkZehl.cjs} +72 -100
  6. package/dist/chunks/{PdfViewer-JHXZQZ9x.es.js → PdfViewer-aOWhUVI7.es.js} +69 -97
  7. package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
  8. package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
  9. package/dist/chunks/{create-super-doc-ui-BbjHD1ul.es.js → create-super-doc-ui-DdT4b29f.es.js} +200 -65
  10. package/dist/chunks/{create-super-doc-ui-BfgYblyI.cjs → create-super-doc-ui-_SbygYQ4.cjs} +227 -68
  11. package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
  12. package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
  13. package/dist/collaboration-upgrade-engine.cjs +1 -1
  14. package/dist/collaboration-upgrade-engine.es.js +1 -1
  15. package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
  16. package/dist/document-api/src/comments/comments.d.ts +2 -0
  17. package/dist/document-api/src/contract/metadata-types.d.ts +1 -1
  18. package/dist/document-api/src/contract/operation-definitions.d.ts +3 -3
  19. package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
  20. package/dist/document-api/src/index.d.ts +8 -7
  21. package/dist/document-api/src/insert/insert.d.ts +2 -2
  22. package/dist/document-api/src/lists/lists.d.ts +79 -79
  23. package/dist/document-api/src/replace/replace.d.ts +3 -2
  24. package/dist/document-api/src/tables/tables.d.ts +2 -1
  25. package/dist/document-api/src/types/address.d.ts +3 -0
  26. package/dist/document-api/src/types/table-operations.types.d.ts +1 -0
  27. package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
  28. package/dist/document-api/src/write/write.d.ts +18 -11
  29. package/dist/layout-engine/contracts/src/index.d.ts +1 -1
  30. package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +3 -1
  31. package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
  32. package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
  33. package/dist/public/ui-react.cjs +1 -1
  34. package/dist/public/ui-react.es.js +1 -1
  35. package/dist/public/ui-vue.cjs +1 -1
  36. package/dist/public/ui-vue.es.js +1 -1
  37. package/dist/public/ui.cjs +1 -1
  38. package/dist/public/ui.es.js +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/style.layered.css +1 -1
  41. package/dist/superdoc/src/SuperDoc.vue.d.ts +137 -61
  42. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +533 -48
  43. package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +107 -23
  44. package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +74 -14
  45. package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +55 -20
  46. package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +21 -8
  47. package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +24 -8
  48. package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +5 -3
  49. package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +60 -12
  50. package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +20 -6
  51. package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
  52. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +0 -1
  53. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +29 -13
  54. package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
  55. package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
  56. package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
  57. package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
  58. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +81 -16
  59. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +49 -13
  60. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
  61. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +11 -0
  62. package/dist/superdoc/src/components/general/Avatar.vue.d.ts +14 -0
  63. package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +58 -15
  64. package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +58 -15
  65. package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
  66. package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
  67. package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +14 -6
  68. package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +25 -15
  69. package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
  70. package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
  71. package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
  72. package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
  73. package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
  74. package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
  75. package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
  76. package/dist/superdoc/src/composables/use-field.d.ts +88 -25
  77. package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
  78. package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
  79. package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +4 -1
  80. package/dist/superdoc/src/composables/use-viewport-fit.d.ts +40 -26
  81. package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
  82. package/dist/superdoc/src/core/SuperDoc.d.ts +3 -8
  83. package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
  84. package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
  85. package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -9
  86. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
  87. package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
  88. package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
  89. package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
  90. package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
  91. package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
  92. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
  93. package/dist/superdoc/src/core/create-app.d.ts +13 -24
  94. package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
  95. package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
  96. package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
  97. package/dist/superdoc/src/core/editor-runtime/types.d.ts +9 -1
  98. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -1
  99. package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
  100. package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
  101. package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
  102. package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
  103. package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
  104. package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
  105. package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
  106. package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
  107. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +24 -61
  108. package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
  109. package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
  110. package/dist/superdoc/src/core/types/index.d.ts +14 -23
  111. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
  112. package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
  113. package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
  114. package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
  115. package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
  116. package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
  117. package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
  118. package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
  119. package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
  120. package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
  121. package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
  122. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -5
  123. package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
  124. package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
  125. package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
  126. package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
  127. package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
  128. package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
  129. package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
  130. package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
  131. package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
  132. package/dist/superdoc/src/icons.d.ts +11 -11
  133. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +7 -16
  134. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +77 -16
  135. package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +5 -3
  136. package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +85 -5
  137. package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +20 -6
  138. package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +32 -8
  139. package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +32 -8
  140. package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +44 -12
  141. package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +32 -9
  142. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
  143. package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
  144. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
  145. package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
  146. package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +39 -10
  147. package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +24 -6
  148. package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +7 -3
  149. package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
  150. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
  151. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
  152. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +80 -11
  153. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +113 -33
  154. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +16 -6
  155. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +10 -20
  156. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +12 -45
  157. package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
  158. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  159. package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
  160. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +67 -0
  161. package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
  162. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -49
  163. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +7 -27
  164. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
  165. package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
  166. package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
  167. package/dist/superdoc/src/public/index.d.cts +26 -0
  168. package/dist/superdoc/src/public/index.d.ts +13 -0
  169. package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
  170. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
  171. package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
  172. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
  173. package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
  174. package/dist/superdoc/src/public/ui/types.d.ts +1 -1
  175. package/dist/superdoc/src/stores/comments-store.d.ts +372 -123
  176. package/dist/superdoc/src/stores/helpers/comment-draft-text.d.ts +1 -0
  177. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
  178. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
  179. package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
  180. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
  181. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +21 -0
  182. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
  183. package/dist/superdoc/src/stores/superdoc-store.d.ts +1117 -370
  184. package/dist/superdoc.cjs +1923 -2838
  185. package/dist/superdoc.es.js +1863 -2783
  186. package/dist-cdn/style.layered.css +1 -1
  187. package/dist-cdn/superdoc.min.css +1 -1
  188. package/dist-cdn/superdoc.min.js +42 -42
  189. package/package.json +2 -2
  190. package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
  191. package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
  192. package/dist/superdoc/src/main.d.ts +0 -1
@@ -1,33 +1,96 @@
1
- export function useFieldValueWatcher(field: any, originalValue: any): {
2
- value: any;
1
+ export interface FieldOptionDefinition {
2
+ itemdisplaylabel?: unknown;
3
+ itemlinkvalue?: unknown;
4
+ ischecked?: unknown;
5
+ itemid?: unknown;
6
+ annotationId?: unknown;
7
+ }
8
+ export interface FieldDefinition {
9
+ itemid: {
10
+ value?: unknown;
11
+ };
12
+ itemicon?: unknown;
13
+ itemiconpack?: unknown;
14
+ itemdisplaylabel?: unknown;
15
+ itemlinkvalue?: unknown;
16
+ itemplaceholdertext?: unknown;
17
+ itemtype?: string;
18
+ itemfieldtype?: unknown;
19
+ itemformat?: unknown;
20
+ itemoptions?: FieldOptionDefinition[] | null;
21
+ iteminputtype?: unknown;
22
+ fontfamily?: string | null;
23
+ font_size?: string | null;
24
+ original_font_size?: string | null;
25
+ logicrules?: unknown;
26
+ valueGetter?: (data: object) => string;
27
+ }
28
+ export declare function useFieldValueWatcher(originalValue: unknown): {
29
+ value: {};
3
30
  };
4
- export function useField(field: any): {
5
- id: import('vue').Ref<any, any>;
6
- icon: import('vue').Ref<any, any>;
7
- iconPack: import('vue').Ref<any, any>;
8
- label: import('vue').Ref<any, any>;
9
- placeholder: any;
10
- fieldType: import('vue').Ref<any, any>;
11
- fieldSubType: import('vue').Ref<any, any>;
12
- value: any;
13
- format: import('vue').Ref<any, any>;
14
- logicRules: import('vue').Ref<any, any>;
31
+ export declare function useField(field: FieldDefinition): {
32
+ id: import('vue').Ref<{
33
+ value?: unknown;
34
+ }, {
35
+ value?: unknown;
36
+ } | {
37
+ value?: unknown;
38
+ }>;
39
+ icon: import('vue').Ref<unknown, unknown>;
40
+ iconPack: import('vue').Ref<unknown, unknown>;
41
+ label: import('vue').Ref<unknown, unknown>;
42
+ placeholder: unknown;
43
+ fieldType: import('vue').Ref<string | undefined, string | undefined>;
44
+ fieldSubType: import('vue').Ref<unknown, unknown>;
45
+ value: {};
46
+ format: import('vue').Ref<unknown, unknown>;
47
+ logicRules: import('vue').Ref<unknown, unknown>;
15
48
  hidden: import('vue').Ref<boolean, boolean>;
16
- originalJSON: any;
49
+ originalJSON: FieldDefinition;
17
50
  fieldStyle: {
18
- fontFamily: any;
19
- fontSize: any;
20
- originalFontSize: any;
51
+ fontFamily: string;
52
+ fontSize: string;
53
+ originalFontSize: string;
21
54
  };
22
- valueGetter: any;
55
+ valueGetter: ((data: object) => string) | undefined;
23
56
  };
24
- export function useImageField(field: any): {
25
- fontfamily: import('vue').Ref<any, any>;
26
- iteminputtype: import('vue').Ref<any, any>;
57
+ export declare function useImageField(field: Pick<FieldDefinition, 'fontfamily' | 'iteminputtype'>): {
58
+ fontfamily: import('vue').Ref<string | null | undefined, string | null | undefined>;
59
+ iteminputtype: import('vue').Ref<unknown, unknown>;
27
60
  };
28
- export function useSelectField(field: any): {
29
- options: import('vue').Ref<any, any>;
61
+ export declare function useSelectField(field: Pick<FieldDefinition, 'itemoptions'>): {
62
+ options: import('vue').Ref<{
63
+ itemdisplaylabel?: unknown;
64
+ itemlinkvalue?: unknown;
65
+ ischecked?: unknown;
66
+ itemid?: unknown;
67
+ annotationId?: unknown;
68
+ }[] | null | undefined, FieldOptionDefinition[] | {
69
+ itemdisplaylabel?: unknown;
70
+ itemlinkvalue?: unknown;
71
+ ischecked?: unknown;
72
+ itemid?: unknown;
73
+ annotationId?: unknown;
74
+ }[] | null | undefined>;
30
75
  };
31
- export function useCheckboxField(field: any): {
32
- options: import('vue').Ref<any, any>;
76
+ export declare function useCheckboxField(field: Pick<FieldDefinition, 'itemoptions'>): {
77
+ options: import('vue').Ref<{
78
+ label: unknown;
79
+ value: unknown;
80
+ checked: unknown;
81
+ id: unknown;
82
+ annotationId: unknown;
83
+ }[] | null | undefined, {
84
+ label: unknown;
85
+ value: unknown;
86
+ checked: unknown;
87
+ id: unknown;
88
+ annotationId: unknown;
89
+ }[] | {
90
+ label: unknown;
91
+ value: unknown;
92
+ checked: unknown;
93
+ id: unknown;
94
+ annotationId: unknown;
95
+ }[] | null | undefined>;
33
96
  };
@@ -1,6 +1,6 @@
1
1
  import { SurfaceManager } from '../core/surface-manager.js';
2
2
  import { DocumentMode, Editor, HyperlinkActivationHandler, LinkPopoverResolver } from '../core/types/index.js';
3
- import { SuperDocUI } from '../public/ui/types.js';
3
+ import { BorrowedSuperDocUI } from '../public/ui/types.js';
4
4
  /**
5
5
  * The `v2-link-click` payload the shell relays from the v2 host's
6
6
  * `onLinkClick` callback.
@@ -17,9 +17,9 @@ interface LinkClickPayload {
17
17
  editableText?: boolean;
18
18
  }
19
19
  interface UseLinkPopoverOptions {
20
- getSurfaceManager: () => SurfaceManager | null | undefined;
20
+ getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null | undefined;
21
21
  getActiveEditor: () => Editor | null | undefined;
22
- getUi: () => SuperDocUI | null | undefined;
22
+ getUi: () => BorrowedSuperDocUI | null | undefined;
23
23
  getActivationHandler: () => HyperlinkActivationHandler | LinkPopoverResolver | null | undefined;
24
24
  getActivationHandlerSource?: () => 'hyperlinks.onActivate' | 'compatibility' | null | undefined;
25
25
  getBuiltInEditorDisabled?: () => boolean;
@@ -1,33 +1,32 @@
1
+ import { SurfaceManager } from '../core/surface-manager.js';
2
+ import { Editor, PasswordPromptConfig } from '../core/types/index.js';
3
+ export interface PasswordPromptDocument {
4
+ id: string;
5
+ password?: string;
6
+ editorMountNonce: number;
7
+ }
8
+ export interface PasswordPromptException {
9
+ error?: Error;
10
+ editor?: Editor | null;
11
+ }
12
+ export interface UsePasswordPromptOptions {
13
+ getSurfaceManager: () => SurfaceManager | null;
14
+ getPasswordPromptConfig: () => boolean | PasswordPromptConfig | undefined;
15
+ /**
16
+ * Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw).
17
+ * Receives the original exception payload so the host can re-emit it unchanged.
18
+ */
19
+ onUnhandled?: (doc: PasswordPromptDocument, errorCode: string, originalException?: PasswordPromptException) => void;
20
+ }
1
21
  /**
2
22
  * Composable that coordinates password-prompt dialogs for encrypted DOCX files.
3
23
  *
4
24
  * Owns a FIFO queue of pending prompts (one active dialog at a time), and a
5
25
  * `pendingSignals` map that bridges the async gap between triggering a remount
6
26
  * and observing the result via `onEditorReady` / `onEditorException`.
7
- *
8
- * @param {Object} options
9
- * @param {() => import('../core/surface-manager.js').SurfaceManager | null} options.getSurfaceManager
10
- * @param {() => boolean | PasswordPromptConfig | undefined} options.getPasswordPromptConfig
11
- * @param {(doc: any, errorCode: string, originalException?: { error?: Error, editor?: any }) => void} [options.onUnhandled] Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw). Receives the original exception payload so the host can re-emit it unchanged.
12
27
  */
13
- export function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhandled }: {
14
- getSurfaceManager: () => import('../core/surface-manager.js').SurfaceManager | null;
15
- getPasswordPromptConfig: () => boolean | PasswordPromptConfig | undefined;
16
- onUnhandled?: ((doc: any, errorCode: string, originalException?: {
17
- error?: Error;
18
- editor?: any;
19
- }) => void) | undefined;
20
- }): {
21
- handleEncryptionError: (doc: any, errorCode: string, originalException?: {
22
- error?: Error;
23
- editor?: any;
24
- }) => boolean;
25
- handleEditorReady: (doc: any) => void;
28
+ export declare function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhandled, }: UsePasswordPromptOptions): {
29
+ handleEncryptionError: (doc: PasswordPromptDocument | null | undefined, errorCode: string, originalException?: PasswordPromptException) => boolean;
30
+ handleEditorReady: (doc: PasswordPromptDocument | null | undefined) => void;
26
31
  destroy: () => void;
27
32
  };
28
- export type PasswordPromptConfig = import('../core/types/index.js').PasswordPromptConfig;
29
- export type ResolvedPasswordPromptTexts = import('../core/types/index.js').ResolvedPasswordPromptTexts;
30
- export type PasswordPromptHandle = import('../core/types/index.js').PasswordPromptHandle;
31
- export type PasswordPromptContext = import('../core/types/index.js').PasswordPromptContext;
32
- export type PasswordPromptResolution = import('../core/types/index.js').PasswordPromptResolution;
33
- export type PasswordPromptAttemptResult = import('../core/types/index.js').PasswordPromptAttemptResult;
@@ -1,7 +1,10 @@
1
1
  import { ComponentPublicInstance } from 'vue';
2
2
  import { SuperDoc } from '../core/SuperDoc.js';
3
+ export type SuperDocComponentProxy = ComponentPublicInstance & {
4
+ $superdoc: SuperDoc;
5
+ };
3
6
  export interface SuperDocInstanceAccess {
4
- proxy: ComponentPublicInstance;
7
+ proxy: SuperDocComponentProxy;
5
8
  superdoc: SuperDoc;
6
9
  }
7
10
  export declare function useSuperDocInstance(): SuperDocInstanceAccess;
@@ -1,3 +1,41 @@
1
+ import { Ref } from 'vue';
2
+ import { SuperDoc } from '../core/SuperDoc.js';
3
+ import { Editor, RuntimeDocument, SuperDocFitWidthOptions, SuperDocViewportMetrics, SuperDocZoomMode } from '../core/types/index.js';
4
+ export type ResolvedFitWidthOptions = Required<SuperDocFitWidthOptions>;
5
+ type EditorPageGeometry = Pick<Editor, 'pageMetrics'> & {
6
+ getPages?: () => Array<{
7
+ size?: {
8
+ w?: unknown;
9
+ };
10
+ } | null | undefined> | null | undefined;
11
+ getPageStyles?: () => {
12
+ pageSize?: {
13
+ width?: unknown;
14
+ };
15
+ } | null | undefined;
16
+ };
17
+ interface UseViewportFitOptions {
18
+ getSuperdoc: () => SuperDoc | null | undefined;
19
+ superdocContainerWidth: Readonly<Ref<number>>;
20
+ isReady: Readonly<Ref<boolean>>;
21
+ activeZoom: Ref<number>;
22
+ zoomMode: Readonly<Ref<SuperDocZoomMode>>;
23
+ viewportMetrics: Ref<SuperDocViewportMetrics | null>;
24
+ showCommentsSidebar?: Readonly<Ref<unknown>>;
25
+ rightSidebarRef?: Readonly<Ref<HTMLElement | null>>;
26
+ superdocRoot: Readonly<Ref<HTMLElement | null>>;
27
+ documents?: Readonly<Ref<readonly RuntimeDocument[]>>;
28
+ }
29
+ export declare const FIT_WIDTH_DEFAULTS: Readonly<{
30
+ min: 10;
31
+ max: 100;
32
+ padding: 0;
33
+ }>;
34
+ export declare const resolveFitWidthOptions: (rawFitConfig: SuperDocFitWidthOptions | null | undefined) => ResolvedFitWidthOptions;
35
+ export declare const computeFitZoom: (availableWidth: number, documentWidth: number) => number | null;
36
+ export declare const computeAppliedFitZoom: (availableWidth: number, documentWidth: number, options: ResolvedFitWidthOptions) => number | null;
37
+ export declare const normalizePdfPageMeasurement: (measured: number, scaleFactor: number, zoomFactor: number) => number | null;
38
+ export declare const resolveEditorPageWidth: (editor: EditorPageGeometry | null | undefined) => number | null;
1
39
  /**
2
40
  * Viewport fit tracking. Maintains pure viewport metrics (available width,
3
41
  * document base width, fit zoom), stores them for `getViewportMetrics()`,
@@ -21,31 +59,7 @@
21
59
  * Must be called inside a component `setup()` (registers watchers and an
22
60
  * unmount hook).
23
61
  */
24
- export function useViewportFit({ getSuperdoc, superdocContainerWidth, isReady, activeZoom, zoomMode, viewportMetrics, showCommentsSidebar, rightSidebarRef, superdocRoot, documents, }: {
25
- getSuperdoc: any;
26
- superdocContainerWidth: any;
27
- isReady: any;
28
- activeZoom: any;
29
- zoomMode: any;
30
- viewportMetrics: any;
31
- showCommentsSidebar: any;
32
- rightSidebarRef: any;
33
- superdocRoot: any;
34
- documents: any;
35
- }): {
62
+ export declare function useViewportFit({ getSuperdoc, superdocContainerWidth, isReady, activeZoom, zoomMode, viewportMetrics, showCommentsSidebar, rightSidebarRef, superdocRoot, documents, }: UseViewportFitOptions): {
36
63
  evaluateViewport: () => void;
37
64
  };
38
- export const FIT_WIDTH_DEFAULTS: Readonly<{
39
- min: 10;
40
- max: 100;
41
- padding: 0;
42
- }>;
43
- export function resolveFitWidthOptions(rawFitConfig: any): {
44
- min: number;
45
- max: number;
46
- padding: any;
47
- };
48
- export function computeFitZoom(availableWidth: any, documentWidth: any): number | null;
49
- export function computeAppliedFitZoom(availableWidth: any, documentWidth: any, options: any): number | null;
50
- export function normalizePdfPageMeasurement(measured: any, scaleFactor: any, zoomFactor: any): any;
51
- export function resolveEditorPageWidth(editor: any): number | null;
65
+ export {};
@@ -1,3 +1,4 @@
1
+ import { ComputedRef } from 'vue';
1
2
  /**
2
3
  * Vue composable that returns the computed UI font-family for SuperDoc surfaces.
3
4
  *
@@ -9,16 +10,7 @@
9
10
  * The font-family is determined by checking the `uiDisplayFallbackFont` config property.
10
11
  * If it's a non-empty string, it will be used. Otherwise, the DEFAULT_UI_FONT_FAMILY
11
12
  * constant is returned.
12
- *
13
- * @returns {{ uiFontFamily: import('vue').ComputedRef<string> }} An object containing:
14
- * - uiFontFamily: A computed reference to the UI font-family string
15
13
  */
16
- export function useUiFontFamily(): {
17
- uiFontFamily: import('vue').ComputedRef<string>;
14
+ export declare function useUiFontFamily(): {
15
+ uiFontFamily: ComputedRef<string>;
18
16
  };
19
- /**
20
- * The default font-family to use for SuperDoc UI surfaces when no custom font is configured.
21
- * This constant ensures consistency across the application.
22
- * @constant {string}
23
- */
24
- export const DEFAULT_UI_FONT_FAMILY: "Arial, Helvetica, sans-serif";
@@ -103,12 +103,6 @@ interface SuperDocEventMap {
103
103
  'source:complete': [];
104
104
  'source:signals-complete': [];
105
105
  }
106
- /**
107
- * SuperDoc class
108
- * Expects a config object
109
- *
110
- * @class
111
- */
112
106
  export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
113
107
  #private;
114
108
  static allowedTypes: ("application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/pdf")[];
@@ -345,7 +339,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
345
339
  * surface does not pull the Pinia comment model type graph.
346
340
  *
347
341
  */
348
- getComment(commentId: string): Record<string, unknown> | null;
342
+ getComment(commentId: string): import('../stores/helpers/comment-identity.js').CommentIdentityRow | null;
349
343
  /**
350
344
  * Get the SuperDoc container element
351
345
  */
@@ -372,6 +366,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
372
366
  * @returns The attached room and document once the collaborative runtime is ready
373
367
  */
374
368
  upgradeToCollaboration(options: UpgradeToCollaborationOptions): Promise<UpgradeToCollaborationResult>;
369
+ setUser(user: User): Promise<void>;
375
370
  /**
376
371
  * Add a user to the shared users list. Requires the instance to be
377
372
  * ready; pre-ready mutations would be silently overwritten by the
@@ -692,7 +687,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
692
687
  * @deprecated replaceWith=`await superdoc.activeEditor.doc.getHtml({})` removeIn=v3.0
693
688
  * @param _options Ignored.
694
689
  */
695
- getHTML(_options?: Parameters<Editor['getHTML']>[0]): unknown[];
690
+ getHTML(_options?: Parameters<NonNullable<Editor['getHTML']>>[0]): unknown[];
696
691
  /**
697
692
  * Lock the current superdoc and emit the `locked` event.
698
693
  *
@@ -1,4 +1,9 @@
1
- export function addYComment(yArray: any, ydoc: any, event: any, user: any): void;
2
- export function updateYComment(yArray: any, ydoc: any, event: any, user: any): void;
3
- export function deleteYComment(yArray: any, ydoc: any, event: any, user: any): void;
4
- export function getCommentIndex(yArray: any, comment: any): any;
1
+ import { Array as YArray, Doc as YDoc } from 'yjs';
2
+ import { User } from '../types/index.js';
3
+ export type CollaborationCommentEvent = {
4
+ comment: unknown;
5
+ };
6
+ export declare const addYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
7
+ export declare const updateYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
8
+ export declare const deleteYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
9
+ export declare const getCommentIndex: (yArray: YArray<unknown>, comment: Record<string, unknown>) => number;
@@ -1,3 +1,20 @@
1
- export function loadCommentsFromYdoc(superdoc: Object): boolean;
2
- export function initCollaborationComments(superdoc: Object): void;
3
- export function syncCommentsToClients(superdoc: Object, event: Object): void;
1
+ import { CommentEvent } from '../../../../../shared/common';
2
+ import { SuperDoc } from '../SuperDoc.js';
3
+ import { Modules, User } from '../types/index.js';
4
+ import { CollaborationCommentEvent } from './collaboration-comments.js';
5
+ import type * as Y from 'yjs';
6
+ type CommentsSyncHost = {
7
+ isCollaborative?: boolean;
8
+ ydoc?: Y.Doc;
9
+ config?: {
10
+ modules?: Modules;
11
+ user?: User;
12
+ };
13
+ };
14
+ type CommentsSyncEvent = CollaborationCommentEvent & {
15
+ type: CommentEvent;
16
+ };
17
+ export declare const loadCommentsFromYdoc: (superdoc: SuperDoc | null | undefined) => boolean;
18
+ export declare const initCollaborationComments: (superdoc: SuperDoc) => void;
19
+ export declare const syncCommentsToClients: (superdoc: CommentsSyncHost, event: CommentsSyncEvent) => void;
20
+ export {};
@@ -1,4 +1,6 @@
1
- export const PERMISSIONS: Readonly<{
1
+ import { SuperDoc } from '../SuperDoc.js';
2
+ import { CanPerformPermissionParams, PermissionResolver, User } from '../types/index.js';
3
+ export declare const PERMISSIONS: Readonly<{
2
4
  RESOLVE_OWN: "RESOLVE_OWN";
3
5
  RESOLVE_OTHER: "RESOLVE_OTHER";
4
6
  REJECT_OWN: "REJECT_OWN";
@@ -10,11 +12,15 @@ export const PERMISSIONS: Readonly<{
10
12
  UPLOAD_VERSION: "UPLOAD_VERSION";
11
13
  VERSION_HISTORY: "VERSION_HISTORY";
12
14
  }>;
13
- export function createTrackedChangePermissionResolver(superdoc: any): (payload?: {}) => any;
14
- export function isAllowed(permission: string, role: string, isInternal: boolean, context?: {
15
- comment?: object | null | undefined;
16
- superdoc?: object | null | undefined;
17
- currentUser?: object | null | undefined;
18
- permissionResolver?: Function | undefined;
19
- trackedChange?: object | null | undefined;
20
- }): boolean;
15
+ interface PermissionContext {
16
+ comment?: object | null;
17
+ superdoc?: SuperDoc | null;
18
+ currentUser?: User | null;
19
+ permissionResolver?: PermissionResolver;
20
+ trackedChange?: object | null;
21
+ }
22
+ export declare const BUILT_IN_PERMISSION_METHOD: unique symbol;
23
+ export declare const createTrackedChangePermissionResolver: (superdoc: SuperDoc) => (payload?: CanPerformPermissionParams) => boolean;
24
+ export declare const readBuiltInTrackedChangePermissionDecision: (superdoc: unknown, canPerform: unknown, permission: string, trackedChange: unknown) => boolean | null;
25
+ export declare const isAllowed: (permission: string, role: string | undefined, isInternal: boolean | undefined, context?: PermissionContext) => boolean;
26
+ export {};
@@ -21,7 +21,7 @@ export type SupportedV2ProviderFamily = 'y-websocket' | 'hocuspocus' | 'livebloc
21
21
  * collaboration room. These strings are part of the diagnostic contract and are
22
22
  * safe to assert against in tests; they never carry caller-provided values.
23
23
  */
24
- export type V2CollaborationUnsupportedReason = 'missing-target' | 'invalid-document-id' | 'invalid-server-url' | 'invalid-room-mode' | 'invalid-auth-endpoint' | 'invalid-base-url' | 'invalid-adapter-id' | 'invalid-provider-options' | 'invalid-sync-timeout' | 'missing-auth' | 'mixed-auth' | 'unsupported-document-type' | 'unsupported-multi-document' | 'unsupported-legacy-provider' | 'unsupported-provider-family';
24
+ type V2CollaborationUnsupportedReason = 'missing-target' | 'invalid-document-id' | 'invalid-server-url' | 'invalid-room-mode' | 'invalid-auth-endpoint' | 'invalid-base-url' | 'invalid-adapter-id' | 'invalid-provider-options' | 'invalid-sync-timeout' | 'missing-auth' | 'mixed-auth' | 'unsupported-document-type' | 'unsupported-multi-document' | 'unsupported-legacy-provider' | 'unsupported-provider-family';
25
25
  /**
26
26
  * Normalized, supported v2 collaboration room target.
27
27
  *
@@ -55,7 +55,7 @@ export interface NormalizedV2CollaborationTarget {
55
55
  /** Explicit room operation; join is the default at the untrusted input boundary. */
56
56
  roomMode: 'join' | 'create';
57
57
  }
58
- export type V2CollaborationTargetResolution = {
58
+ type V2CollaborationTargetResolution = {
59
59
  ok: true;
60
60
  target: NormalizedV2CollaborationTarget;
61
61
  } | {
@@ -76,7 +76,7 @@ export interface LegacyCollaborationLike {
76
76
  url?: unknown;
77
77
  [key: string]: unknown;
78
78
  }
79
- export interface ResolveV2CollaborationTargetInput {
79
+ interface ResolveV2CollaborationTargetInput {
80
80
  /** Preferred connection settings. Explicit null or invalid input never falls back to the alias. */
81
81
  collaboration?: unknown;
82
82
  /** Compatibility spelling for document-level connection settings. */
@@ -113,3 +113,4 @@ export declare function redactCollaborationUrl(url: unknown): string;
113
113
  * supported v2 room target, or a stable redacted diagnostic.
114
114
  */
115
115
  export declare function resolveV2CollaborationTarget(input: ResolveV2CollaborationTargetInput): V2CollaborationTargetResolution;
116
+ export {};
@@ -29,7 +29,7 @@ export interface V2AwarenessSnapshotLike {
29
29
  remoteActors: ReadonlyArray<V2AwarenessRemoteActor>;
30
30
  }
31
31
  /** Core `awareness-update` payload (the `superdoc` backref is added by the caller). */
32
- export interface V2AwarenessPayloadCore {
32
+ interface V2AwarenessPayloadCore {
33
33
  states: AwarenessState[];
34
34
  added: number[];
35
35
  removed: number[];
@@ -55,3 +55,4 @@ export declare function createV2AwarenessDiffer(getLocalUser: () => User | null
55
55
  registry: V2AwarenessIdRegistry;
56
56
  next(snapshot: V2AwarenessSnapshotLike): V2AwarenessPayloadCore;
57
57
  };
58
+ export {};
@@ -3,9 +3,5 @@
3
3
  *
4
4
  * The responsive options can be migrated independently, so merge that nested
5
5
  * bag by field while keeping canonical values authoritative.
6
- *
7
- * @param {Record<string, unknown>} config
8
- * @param {Record<string, unknown>} presentation
9
- * @returns {Record<string, unknown>}
10
6
  */
11
- export function mergeCommentsConfig(config: Record<string, unknown>, presentation: Record<string, unknown>): Record<string, unknown>;
7
+ export declare function mergeCommentsConfig(config: Record<string, unknown>, presentation: Record<string, unknown>): Record<string, unknown>;
@@ -17,19 +17,14 @@
17
17
  *
18
18
  * Later sources win, as with spread. Non-object sources are ignored so callers
19
19
  * can pass a possibly-absent block without guarding first.
20
- *
21
- * @param {...unknown} sources
22
- * @returns {Record<string, unknown>}
23
20
  */
24
- export function mergeDefined(...sources: unknown[]): Record<string, unknown>;
21
+ export declare function mergeDefined(...sources: unknown[]): Record<string, unknown>;
22
+ export declare function mergeDefinedFields<T extends object>(...sources: Array<T | undefined>): Partial<T>;
25
23
  /**
26
24
  * Pick the first defined value, so `undefined` falls through but `null`,
27
25
  * `false`, and `0` are honored as deliberate choices.
28
26
  *
29
27
  * `??` already does this for null and undefined together, which is wrong when
30
28
  * `null` carries meaning — clearing an inherited resolver, for instance.
31
- *
32
- * @param {...unknown} values
33
- * @returns {unknown}
34
29
  */
35
- export function firstDefined(...values: unknown[]): unknown;
30
+ export declare function firstDefined(...values: unknown[]): unknown;
@@ -1,23 +1,18 @@
1
+ import { Config, HyperlinkActivationHandler, LinkPopoverResolver } from '../types/index.js';
2
+ type HyperlinkHandler = HyperlinkActivationHandler | LinkPopoverResolver;
3
+ type HyperlinkHandlerSource = 'hyperlinks.onActivate' | 'compatibility';
1
4
  /**
2
5
  * Resolve hyperlink activation behavior.
3
6
  *
4
7
  * A canonical handler remains active under `ui: false` because an application
5
8
  * may navigate or render its own interface. Without a canonical handler, the
6
9
  * existing UI suppression rules keep their current behavior.
7
- *
8
- * @param {Record<string, any>} [config] Raw consumer config.
9
- * @returns {{
10
- * handler: import('../types/index.js').HyperlinkActivationHandler | import('../types/index.js').LinkPopoverResolver | undefined,
11
- * handlerSource: 'hyperlinks.onActivate' | 'compatibility' | undefined,
12
- * editableActivationDisabled: boolean,
13
- * builtInEditorDisabled: boolean,
14
- * interceptsNavigationOnly: boolean,
15
- * }}
16
10
  */
17
- export function normalizeHyperlinksConfig(config?: Record<string, any>): {
18
- handler: import('../types/index.js').HyperlinkActivationHandler | import('../types/index.js').LinkPopoverResolver | undefined;
19
- handlerSource: "hyperlinks.onActivate" | "compatibility" | undefined;
11
+ export declare function normalizeHyperlinksConfig(config?: Pick<Config, 'hyperlinks' | 'ui' | 'modules'>): {
12
+ handler: HyperlinkHandler | undefined;
13
+ handlerSource: HyperlinkHandlerSource | undefined;
20
14
  editableActivationDisabled: boolean;
21
15
  builtInEditorDisabled: boolean;
22
16
  interceptsNavigationOnly: boolean;
23
17
  };
18
+ export {};
@@ -1,3 +1,10 @@
1
+ import { Config, SurfaceResolver, SurfacesConfig } from '../types/index.js';
2
+ type SurfacesSource = Pick<Config, 'surfaces' | 'modules'>;
3
+ type NormalizedSurfacesConfig = {
4
+ resolver: SurfaceResolver | null;
5
+ dialog: NonNullable<SurfacesConfig['dialog']>;
6
+ floating: NonNullable<SurfacesConfig['floating']>;
7
+ };
1
8
  /**
2
9
  * Resolve the generic surface infrastructure config.
3
10
  *
@@ -8,16 +15,6 @@
8
15
  * The resolved shape mirrors the public `SurfacesConfig`, with every member
9
16
  * present: the presets are merged objects rather than optional, and `resolver`
10
17
  * is a function or `null` once a non-function value has been rejected.
11
- *
12
- * @param {Record<string, any>} [config] Raw consumer config.
13
- * @returns {{
14
- * resolver: import('../types/index.js').SurfaceResolver | null,
15
- * dialog: NonNullable<import('../types/index.js').SurfacesConfig['dialog']>,
16
- * floating: NonNullable<import('../types/index.js').SurfacesConfig['floating']>,
17
- * }}
18
18
  */
19
- export function normalizeSurfacesConfig(config?: Record<string, any>): {
20
- resolver: import('../types/index.js').SurfaceResolver | null;
21
- dialog: NonNullable<import('../types/index.js').SurfacesConfig["dialog"]>;
22
- floating: NonNullable<import('../types/index.js').SurfacesConfig["floating"]>;
23
- };
19
+ export declare function normalizeSurfacesConfig(config?: SurfacesSource): NormalizedSurfacesConfig;
20
+ export {};
@@ -40,21 +40,10 @@ type NormalizedUiConfig = {
40
40
  options: Record<string, unknown>;
41
41
  };
42
42
  };
43
- /** Surfaces that render when the consumer says nothing at all. */
44
- declare const HISTORICAL_DEFAULTS: Readonly<{
45
- toolbar: true;
46
- comments: true;
47
- contextMenu: true;
48
- loading: true;
49
- search: false;
50
- linkPopover: false;
51
- ruler: false;
52
- contentControls: true;
53
- }>;
54
43
  /** Every built-in surface `ui: false` turns off. */
55
44
  declare const BUILT_IN_SURFACES: readonly ("search" | "comments" | "contentControls" | "loading" | "ruler" | "toolbar" | "contextMenu" | "linkPopover")[];
56
45
  /**
57
46
  * Collapse a consumer config into the effective built-in UI profile.
58
47
  */
59
48
  export declare function normalizeUiConfig(config?: UiConfigSource): NormalizedUiConfig;
60
- export { BUILT_IN_SURFACES, HISTORICAL_DEFAULTS };
49
+ export { BUILT_IN_SURFACES };
@@ -1,28 +1,17 @@
1
+ import { App as VueApp } from 'vue';
2
+ import { Pinia } from 'pinia';
1
3
  import { useSuperdocStore } from '../stores/superdoc-store.js';
2
4
  import { useCommentsStore } from '../stores/comments-store.js';
3
- export function createSuperdocVueApp({ disablePiniaDevtools, highContrastMode }: {
4
- disablePiniaDevtools?: boolean | undefined;
5
- highContrastMode: import('../composables/use-high-contrast-mode.js').HighContrastMode;
6
- }): SuperdocVueAppRefs;
7
- /**
8
- * Result of `createSuperdocVueApp()`. Internal-only: the shape is consumed
9
- * by `SuperDoc.#initVueApp` and is not part of the public surface.
10
- */
11
- export type SuperdocVueAppRefs = {
12
- /**
13
- * The Vue 3 app instance
14
- */
15
- app: import('vue').App;
16
- /**
17
- * The Pinia store instance attached to `app`
18
- */
19
- pinia: import('pinia').Pinia;
20
- /**
21
- * The SuperDoc Pinia store
22
- */
5
+ import { HighContrastMode } from '../composables/use-high-contrast-mode.js';
6
+ interface SuperdocVueAppOptions {
7
+ disablePiniaDevtools?: boolean;
8
+ highContrastMode: HighContrastMode;
9
+ }
10
+ interface SuperdocVueAppRefs {
11
+ app: VueApp;
12
+ pinia: Pinia;
23
13
  superdocStore: ReturnType<typeof useSuperdocStore>;
24
- /**
25
- * The Comments Pinia store
26
- */
27
14
  commentsStore: ReturnType<typeof useCommentsStore>;
28
- };
15
+ }
16
+ export declare const createSuperdocVueApp: ({ disablePiniaDevtools, highContrastMode, }: SuperdocVueAppOptions) => SuperdocVueAppRefs;
17
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { EditorRuntime, EditorRuntimeDocumentMode, EditorRuntimeId, EditorRuntimeState } from '../index.js';
2
- export interface FakeV2RuntimeOptions {
2
+ interface FakeV2RuntimeOptions {
3
3
  id?: EditorRuntimeId;
4
4
  documentId?: string;
5
5
  root?: HTMLElement;
@@ -7,3 +7,4 @@ export interface FakeV2RuntimeOptions {
7
7
  initialDocumentMode?: EditorRuntimeDocumentMode;
8
8
  }
9
9
  export declare function createFakeV2Runtime(options?: FakeV2RuntimeOptions): EditorRuntime;
10
+ export {};