superdoc 2.29.0-next.3 → 2.29.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 (175) hide show
  1. package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
  2. package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
  3. package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
  5. package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-CW09MNrB.es.js} +70 -105
  6. package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-CkrAHpC-.cjs} +74 -109
  7. package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
  8. package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
  9. package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
  10. package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
  11. package/dist/chunks/{create-super-doc-ui-BFt8agAI.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +89 -137
  12. package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-L60GhVAX.cjs} +211 -259
  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/command-catalog.d.ts +1 -1
  18. package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
  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/replace/replace.d.ts +3 -2
  23. package/dist/document-api/src/types/address.d.ts +3 -0
  24. package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
  25. package/dist/document-api/src/write/write.d.ts +12 -6
  26. package/dist/public/ui-react.cjs +1 -1
  27. package/dist/public/ui-react.es.js +1 -1
  28. package/dist/public/ui-vue.cjs +1 -1
  29. package/dist/public/ui-vue.es.js +1 -1
  30. package/dist/public/ui.cjs +1 -1
  31. package/dist/public/ui.es.js +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/style.layered.css +1 -1
  34. package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
  35. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +28 -13
  36. package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
  37. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
  38. package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
  39. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
  40. package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
  41. package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
  42. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -2
  43. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
  44. package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
  45. package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
  46. package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
  47. package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
  48. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +80 -16
  49. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +48 -13
  50. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
  51. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +13 -0
  52. package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
  53. package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
  54. package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
  55. package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
  56. package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
  57. package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
  58. package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
  59. package/dist/superdoc/src/composables/use-field.d.ts +88 -25
  60. package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
  61. package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
  62. package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
  63. package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
  64. package/dist/superdoc/src/core/SuperDoc.d.ts +4 -4
  65. package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
  66. package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
  67. package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
  68. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
  69. package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
  70. package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
  71. package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
  72. package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
  73. package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
  74. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
  75. package/dist/superdoc/src/core/create-app.d.ts +13 -24
  76. package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
  77. package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
  78. package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
  79. package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -1
  80. package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
  81. package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
  82. package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
  83. package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
  84. package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
  85. package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
  86. package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
  87. package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
  88. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +28 -61
  89. package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
  90. package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
  91. package/dist/superdoc/src/core/types/index.d.ts +41 -23
  92. package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
  93. package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
  94. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
  95. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
  96. package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
  97. package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
  98. package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
  99. package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
  100. package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
  101. package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
  102. package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
  103. package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
  104. package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
  105. package/dist/superdoc/src/helpers/object-guards.d.ts +2 -5
  106. package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
  107. package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
  108. package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
  109. package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
  110. package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
  111. package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
  112. package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
  113. package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
  114. package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
  115. package/dist/superdoc/src/icons.d.ts +11 -19
  116. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
  117. package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
  118. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
  119. package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +4 -24
  120. package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +34 -0
  121. package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +34 -0
  122. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
  123. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
  124. package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
  125. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +12 -14
  126. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -11
  127. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +9 -19
  128. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +14 -45
  129. package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
  130. package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
  131. package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
  132. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
  133. package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
  134. package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
  135. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  136. package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
  137. package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
  138. package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
  139. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
  140. package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
  141. package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
  142. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
  143. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -30
  144. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
  145. package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
  146. package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
  147. package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
  148. package/dist/superdoc/src/public/index.d.cts +26 -0
  149. package/dist/superdoc/src/public/index.d.ts +13 -0
  150. package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
  151. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
  152. package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
  153. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
  154. package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
  155. package/dist/superdoc/src/public/ui/types.d.ts +1 -1
  156. package/dist/superdoc/src/stores/comments-store.d.ts +231 -105
  157. package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
  158. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
  159. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
  160. package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
  161. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
  162. package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
  163. package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
  164. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
  165. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +0 -4
  166. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
  167. package/dist/superdoc/src/stores/superdoc-store.d.ts +694 -316
  168. package/dist/superdoc.cjs +1804 -2782
  169. package/dist/superdoc.es.js +1720 -2699
  170. package/dist-cdn/style.layered.css +1 -1
  171. package/dist-cdn/superdoc.min.css +1 -1
  172. package/dist-cdn/superdoc.min.js +42 -42
  173. package/package.json +3 -2
  174. package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
  175. package/dist/superdoc/src/main.d.ts +0 -1
@@ -1,8 +1,8 @@
1
- /** The runtime owns its Vue component; consumers only need the surface request value. */
2
- export function createWatermarkSurfaceRuntime(getContainer?: () => HTMLElement | null): {
3
- component: unknown;
4
- captureFocusReturn(): (isCurrent: () => boolean) => Promise<void>;
5
- mount(): void;
6
- announce(message: string): void;
7
- destroy(): void;
1
+ /** Keeps Vue rendering and post-dismissal announcements outside the public type graph. */
2
+ export declare function createWatermarkSurfaceRuntime(getContainer?: () => HTMLElement | null): {
3
+ component: unknown;
4
+ captureFocusReturn(): (isCurrent: () => boolean) => Promise<void>;
5
+ mount(): void;
6
+ announce(message: string): void;
7
+ destroy(): void;
8
8
  };
@@ -1,32 +1,39 @@
1
+ /**
2
+ * Shared ownership registry for the ambient (no-focus) Cmd/Ctrl+F shortcut.
3
+ *
4
+ * Several SuperDoc instances can be mounted on one page, and each registers a
5
+ * document-level capture listener for the find shortcut. When focus is inside
6
+ * an instance that instance handles the shortcut, but when focus is on <body>
7
+ * (fresh page load, clicks on page chrome) every instance would otherwise
8
+ * consider itself eligible — and `stopPropagation()` cannot suppress sibling
9
+ * listeners already registered on the same node, so multiple find bars would
10
+ * open. This registry elects a single ambient owner: the most recently mounted
11
+ * or interacted-with instance.
12
+ */
1
13
  /**
2
14
  * Make `owner` the ambient find-shortcut owner. Call on mount and on user
3
15
  * interaction (pointerdown / focusin inside the instance) so "the SuperDoc the
4
16
  * user last touched" wins the ambient shortcut.
5
- * @param {unknown} owner
6
17
  */
7
- export function claimFindShortcut(owner: unknown): void;
18
+ export declare function claimFindShortcut(owner: unknown): void;
8
19
  /**
9
20
  * Clear ownership if `owner` currently holds it. Call on unmount.
10
- * @param {unknown} owner
11
21
  */
12
- export function releaseFindShortcut(owner: unknown): void;
22
+ export declare function releaseFindShortcut(owner: unknown): void;
13
23
  /**
14
24
  * Whether `owner` may handle the ambient (no-focus) find shortcut. With no
15
25
  * claimed owner any instance may handle it (single-instance pages), relying on
16
26
  * the `defaultPrevented` check in {@link shouldHandleFindShortcut} to keep the
17
27
  * shortcut single-fire.
18
- * @param {unknown} owner
19
28
  */
20
- export function ownsAmbientFindShortcut(owner: unknown): boolean;
29
+ export declare function ownsAmbientFindShortcut(owner: unknown): boolean;
21
30
  /**
22
31
  * Decide whether one SuperDoc instance's capture listener should handle a
23
32
  * find-shortcut keydown. `defaultPrevented` covers the cross-instance race
24
33
  * directly: the first instance to act marks the event, and sibling capture
25
34
  * listeners on the same node skip it.
26
- * @param {KeyboardEvent} event
27
- * @param {{ focusInside: boolean, owner: unknown }} context
28
35
  */
29
- export function shouldHandleFindShortcut(event: KeyboardEvent, { focusInside, owner }: {
36
+ export declare function shouldHandleFindShortcut(event: KeyboardEvent, { focusInside, owner }: {
30
37
  focusInside: boolean;
31
38
  owner: unknown;
32
39
  }): boolean;
@@ -8,30 +8,26 @@
8
8
  * longer looking at.
9
9
  *
10
10
  * A leaf module rather than a closure inside `useFindReplace`, following
11
- * `find-shortcut-owner.js`. The guard previously lived in two byte-identical
11
+ * `find-shortcut-owner.ts`. The guard previously lived in two byte-identical
12
12
  * inline closures, each of which needed a full composable driving a
13
13
  * worker-backed host caught mid-swap to reach one branch. Nothing could, so it
14
14
  * shipped with a comment admitting it was verified by inspection only. The
15
15
  * duplication was the tell: logic worth stating twice is worth naming once.
16
16
  */
17
+ type ReplaceSession = {
18
+ getSnapshot: () => unknown;
19
+ };
20
+ type ReplaceContinuationDeps<S extends ReplaceSession> = {
21
+ getCurrentSession: () => S | null;
22
+ applySlice: (snapshot: unknown) => void;
23
+ onSettled: () => void;
24
+ };
17
25
  /**
18
26
  * Build the continuation that publishes a settled replace back into the panel.
19
27
  *
20
28
  * The session handle itself is the identity. `onSettled` always runs, including
21
29
  * when the write is skipped: it clears the pending flag that gates the replace
22
30
  * controls, and leaving it set would disable them with nothing left to settle.
23
- *
24
- * @param {{ getSnapshot: () => unknown }} session The handle captured when the replace was issued.
25
- * @param {object} deps
26
- * @param {() => unknown} deps.getCurrentSession Reads the live session identity.
27
- * @param {(snapshot: unknown) => void} deps.applySlice Publishes a snapshot into the panel.
28
- * @param {() => void} deps.onSettled Runs whether or not the write was skipped.
29
- * @returns {() => void}
30
31
  */
31
- export function createReplaceContinuation(session: {
32
- getSnapshot: () => unknown;
33
- }, { getCurrentSession, applySlice, onSettled }: {
34
- getCurrentSession: () => unknown;
35
- applySlice: (snapshot: unknown) => void;
36
- onSettled: () => void;
37
- }): () => void;
32
+ export declare function createReplaceContinuation<S extends ReplaceSession>(session: S, { getCurrentSession, applySlice, onSettled }: ReplaceContinuationDeps<S>): () => void;
33
+ export {};
@@ -1,10 +1,14 @@
1
- export function useCommentSmallScreen({ commentsModuleConfig, superdocRoot, layers }: {
2
- commentsModuleConfig: any;
3
- superdocRoot: any;
4
- layers: any;
5
- }): {
6
- superdocContainerWidth: import('vue').Ref<number, number>;
7
- isCompactCommentsMode: import('vue').Ref<boolean, boolean>;
1
+ import { Ref } from 'vue';
2
+ import { CommentsConfig } from '../core/types/index.js';
3
+ interface UseCommentSmallScreenOptions {
4
+ commentsModuleConfig: Readonly<Ref<CommentsConfig | null | undefined>>;
5
+ superdocRoot: Readonly<Ref<HTMLElement | null>>;
6
+ layers: Readonly<Ref<HTMLElement | null>>;
7
+ }
8
+ export declare function useCommentSmallScreen({ commentsModuleConfig, superdocRoot, layers }: UseCommentSmallScreenOptions): {
9
+ superdocContainerWidth: Ref<number, number>;
10
+ isCompactCommentsMode: Ref<boolean, boolean>;
8
11
  recalculateCompactCommentsMode: () => void;
9
12
  ensureCompactMeasurementObserver: () => void;
10
13
  };
14
+ export {};
@@ -1,21 +1,47 @@
1
- export function useCompactCommentPopover({ activeComment, pendingComment, activeCompactComment, showCommentsSidebar, selectionPosition, activeZoom, superdocRoot, layers, documents, resolveCommentPositionEntry, clearActiveComment, clearPendingComment, }: {
2
- activeComment: any;
3
- pendingComment: any;
4
- activeCompactComment: any;
5
- showCommentsSidebar: any;
6
- selectionPosition: any;
7
- activeZoom: any;
8
- superdocRoot: any;
9
- layers: any;
10
- documents: any;
11
- resolveCommentPositionEntry: any;
12
- clearActiveComment: any;
13
- clearPendingComment: any;
14
- }): {
15
- compactCommentPopoverStyle: import('vue').ComputedRef<{
16
- top: string;
17
- right: string;
18
- }>;
1
+ import { Ref } from 'vue';
2
+ import { RuntimeDocument } from '../core/types/index.js';
3
+ type CompactComment = {
4
+ commentId?: unknown;
5
+ importedId?: unknown;
6
+ selection?: {
7
+ source?: unknown;
8
+ } | null;
9
+ };
10
+ type CompactSelectionPosition = {
11
+ top?: unknown;
12
+ bottom?: unknown;
13
+ source?: unknown;
14
+ };
15
+ type CommentPositionLookup = (commentOrId: unknown) => {
16
+ entry: {
17
+ bounds?: {
18
+ top?: unknown;
19
+ bottom?: unknown;
20
+ } | null;
21
+ } | null;
22
+ };
23
+ type PopoverStyle = {
24
+ top: string;
25
+ left?: string;
26
+ right: string;
27
+ };
28
+ interface UseCompactCommentPopoverOptions {
29
+ activeComment: Readonly<Ref<unknown>>;
30
+ pendingComment: Readonly<Ref<CompactComment | null | undefined>>;
31
+ activeCompactComment: Readonly<Ref<CompactComment | null | undefined>>;
32
+ showCommentsSidebar: Readonly<Ref<unknown>>;
33
+ selectionPosition: Readonly<Ref<CompactSelectionPosition | null | undefined>>;
34
+ activeZoom: Readonly<Ref<number | null | undefined>>;
35
+ superdocRoot: Readonly<Ref<HTMLElement | null>>;
36
+ layers: Readonly<Ref<HTMLElement | null>>;
37
+ documents: Readonly<Ref<readonly Pick<RuntimeDocument, 'type'>[] | null | undefined>>;
38
+ resolveCommentPositionEntry: CommentPositionLookup;
39
+ clearActiveComment: () => void;
40
+ clearPendingComment: () => void;
41
+ }
42
+ export declare function useCompactCommentPopover({ activeComment, pendingComment, activeCompactComment, showCommentsSidebar, selectionPosition, activeZoom, superdocRoot, layers, documents, resolveCommentPositionEntry, clearActiveComment, clearPendingComment, }: UseCompactCommentPopoverOptions): {
43
+ compactCommentPopoverStyle: import('vue').ComputedRef<PopoverStyle>;
19
44
  closeCompactCommentPopover: () => void;
20
45
  resetClickAnchor: () => void;
21
46
  };
47
+ export {};