superdoc 2.29.0-next.9 → 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 (80) 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-aOWhUVI7.es.js → PdfViewer-CW09MNrB.es.js} +4 -10
  6. package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-CkrAHpC-.cjs} +4 -10
  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/{create-super-doc-ui-Bm5kmx0W.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +83 -114
  10. package/dist/chunks/{create-super-doc-ui-DN70aatf.cjs → create-super-doc-ui-L60GhVAX.cjs} +199 -236
  11. package/dist/collaboration-upgrade-engine.cjs +1 -1
  12. package/dist/collaboration-upgrade-engine.es.js +1 -1
  13. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  14. package/dist/public/ui-react.cjs +1 -1
  15. package/dist/public/ui-react.es.js +1 -1
  16. package/dist/public/ui-vue.cjs +1 -1
  17. package/dist/public/ui-vue.es.js +1 -1
  18. package/dist/public/ui.cjs +1 -1
  19. package/dist/public/ui.es.js +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/style.layered.css +1 -1
  22. package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
  23. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
  24. package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
  25. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
  26. package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
  27. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -1
  28. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +4 -5
  29. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +3 -4
  30. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +2 -0
  31. package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
  32. package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
  33. package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
  34. package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
  35. package/dist/superdoc/src/composables/use-password-prompt.d.ts +1 -1
  36. package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
  37. package/dist/superdoc/src/core/SuperDoc.d.ts +3 -3
  38. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
  39. package/dist/superdoc/src/core/types/index.d.ts +37 -4
  40. package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
  41. package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
  42. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
  43. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -0
  44. package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
  45. package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
  46. package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
  47. package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
  48. package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
  49. package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
  50. package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
  51. package/dist/superdoc/src/icons.d.ts +11 -19
  52. package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
  53. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
  54. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +3 -1
  55. package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
  56. package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
  57. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
  58. package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
  59. package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
  60. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  61. package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
  62. package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
  63. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
  64. package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
  65. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -3
  66. package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
  67. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
  68. package/dist/superdoc/src/stores/comments-store.d.ts +7 -7
  69. package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
  70. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
  71. package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
  72. package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
  73. package/dist/superdoc/src/stores/superdoc-store.d.ts +21 -21
  74. package/dist/superdoc.cjs +423 -464
  75. package/dist/superdoc.es.js +335 -376
  76. package/dist-cdn/style.layered.css +1 -1
  77. package/dist-cdn/superdoc.min.css +1 -1
  78. package/dist-cdn/superdoc.min.js +41 -41
  79. package/package.json +3 -2
  80. package/dist/superdoc/src/main.d.ts +0 -1
@@ -1 +1,16 @@
1
- export function trackedChangeThreadParentIdForComment(comment: Record<string, any> | null | undefined): string | number | null;
1
+ export type TrackedChangeThreadSource<Id> = {
2
+ trackedChangeThreadParentId?: Id | null;
3
+ trackedChangeParentId?: Id | null;
4
+ trackedChangeLink?: unknown;
5
+ trackedChangeType?: unknown;
6
+ trackedChangeDisplayType?: unknown;
7
+ trackedChangeText?: unknown;
8
+ deletedText?: unknown;
9
+ trackedChange?: unknown;
10
+ };
11
+ /**
12
+ * Resolve explicit thread provenance first, then the guarded legacy fallback.
13
+ * Spatial-only v2 comments carry neither the explicit field nor a legacy
14
+ * review signal and therefore remain standalone.
15
+ */
16
+ export declare const trackedChangeThreadParentIdForComment: <Id>(comment: TrackedChangeThreadSource<Id> | null | undefined) => Id | null;
@@ -1,13 +1,12 @@
1
1
  import { PropType } from 'vue';
2
- import { WhiteboardPage as WhiteboardPageModel } from '../../core/whiteboard/WhiteboardPage.js';
3
- import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize } from './whiteboard-types.js';
2
+ import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize, WhiteboardPageView } from './whiteboard-types.js';
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
4
  whiteboard: {
6
5
  type: PropType<WhiteboardDropTarget>;
7
6
  required: true;
8
7
  };
9
8
  pages: {
10
- type: PropType<WhiteboardPageModel[]>;
9
+ type: PropType<WhiteboardPageView[]>;
11
10
  default: () => never[];
12
11
  };
13
12
  pageSizes: {
@@ -43,7 +42,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
43
42
  required: true;
44
43
  };
45
44
  pages: {
46
- type: PropType<WhiteboardPageModel[]>;
45
+ type: PropType<WhiteboardPageView[]>;
47
46
  default: () => never[];
48
47
  };
49
48
  pageSizes: {
@@ -76,7 +75,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
76
75
  }>> & Readonly<{}>, {
77
76
  enabled: boolean;
78
77
  opacity: number;
79
- pages: WhiteboardPageModel[];
78
+ pages: WhiteboardPageView[];
80
79
  pageSizes: Record<number, WhiteboardPageSize>;
81
80
  pageOffsets: Record<number, WhiteboardPageOffset>;
82
81
  interactive: boolean | null;
@@ -1,13 +1,12 @@
1
1
  import { PropType } from 'vue';
2
- import { WhiteboardPage } from '../../core/whiteboard/WhiteboardPage.js';
3
- import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize } from './whiteboard-types.js';
2
+ import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize, WhiteboardPageView } from './whiteboard-types.js';
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
4
  whiteboard: {
6
5
  type: PropType<WhiteboardDropTarget>;
7
6
  required: true;
8
7
  };
9
8
  page: {
10
- type: PropType<WhiteboardPage>;
9
+ type: PropType<WhiteboardPageView>;
11
10
  required: true;
12
11
  };
13
12
  pageSize: {
@@ -28,7 +27,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
28
27
  required: true;
29
28
  };
30
29
  page: {
31
- type: PropType<WhiteboardPage>;
30
+ type: PropType<WhiteboardPageView>;
32
31
  required: true;
33
32
  };
34
33
  pageSize: {
@@ -1,4 +1,5 @@
1
1
  import { Whiteboard } from '../../core/whiteboard/Whiteboard.js';
2
+ import { WhiteboardPage } from '../../core/whiteboard/WhiteboardPage.js';
2
3
  export type WhiteboardPageSize = {
3
4
  width: number;
4
5
  height: number;
@@ -9,3 +10,4 @@ export type WhiteboardPageOffset = {
9
10
  left: number;
10
11
  };
11
12
  export type WhiteboardDropTarget = Pick<Whiteboard, 'getTool' | 'getType'>;
13
+ export type WhiteboardPageView = Pick<WhiteboardPage, 'pageIndex' | 'size' | 'mount' | 'resize' | 'destroy' | 'addImage' | 'addText'>;
@@ -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,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 {};
@@ -1,9 +1,19 @@
1
1
  import { Ref } from 'vue';
2
2
  import { SurfaceManager } from '../core/surface-manager.js';
3
3
  import { Editor, FindReplaceConfig } from '../core/types/index.js';
4
- import { SearchController } from '../public/ui/types.js';
4
+ import { SearchController, SearchSnapshot } from '../public/ui/types.js';
5
+ type FindReplaceSearchQuery = (...args: Parameters<SearchController['find']>) => Partial<SearchSnapshot>;
6
+ export type FindReplaceSearch = Pick<SearchController, 'next' | 'previous' | 'clear' | 'replace' | 'replaceAll'> & {
7
+ getSnapshot: () => Partial<SearchSnapshot>;
8
+ } & ({
9
+ find: FindReplaceSearchQuery;
10
+ search?: FindReplaceSearchQuery;
11
+ } | {
12
+ find?: undefined;
13
+ search: FindReplaceSearchQuery;
14
+ });
5
15
  type UseFindReplaceOptions = {
6
- getSurfaceManager: () => SurfaceManager | null;
16
+ getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null;
7
17
  getActiveEditor: () => Editor | null;
8
18
  activeEditorRef?: Ref<Editor | null | undefined>;
9
19
  getFindReplaceConfig?: () => boolean | FindReplaceConfig | undefined;
@@ -12,7 +22,7 @@ type UseFindReplaceOptions = {
12
22
  * slice is the single find/replace session authority.
13
23
  */
14
24
  getSuperDocUI?: () => {
15
- search?: SearchController | null;
25
+ search?: FindReplaceSearch | null;
16
26
  } | null | undefined;
17
27
  };
18
28
  /**
@@ -10,7 +10,7 @@ export interface PasswordPromptException {
10
10
  editor?: Editor | null;
11
11
  }
12
12
  export interface UsePasswordPromptOptions {
13
- getSurfaceManager: () => SurfaceManager | null;
13
+ getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null;
14
14
  getPasswordPromptConfig: () => boolean | PasswordPromptConfig | undefined;
15
15
  /**
16
16
  * Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw).
@@ -1,3 +1,63 @@
1
+ import { Ref } from 'vue';
2
+ import { RuntimeDocument, SuperDocFitWidthOptions, SuperDocViewportMetrics, SuperDocZoomConfig, SuperDocZoomMode } from '../core/types/index.js';
3
+ import { PageMetricsPage, PageMetricsSnapshot } from '../public/ui/page-metrics.js';
4
+ export type ResolvedFitWidthOptions = Required<SuperDocFitWidthOptions>;
5
+ type PageWidthSnapshot = Partial<Pick<PageMetricsSnapshot, 'widestPageWidthPx'>> & {
6
+ pages?: ReadonlyArray<{
7
+ base?: Partial<Pick<PageMetricsPage['base'], 'widthPx'>>;
8
+ } | null | undefined>;
9
+ };
10
+ type EditorPageGeometry = {
11
+ pageMetrics?: {
12
+ getSnapshot?: () => PageWidthSnapshot | null | undefined;
13
+ } | null;
14
+ getPages?: () => Array<{
15
+ size?: {
16
+ w?: unknown;
17
+ };
18
+ } | null | undefined> | null | undefined;
19
+ getPageStyles?: () => {
20
+ pageSize?: {
21
+ width?: unknown;
22
+ };
23
+ } | null | undefined;
24
+ };
25
+ type ViewportFitEventName = 'editorCreate' | 'pagination-update' | 'pdf:document-ready';
26
+ interface ViewportFitSuperDoc {
27
+ config?: {
28
+ zoom?: Pick<SuperDocZoomConfig, 'fitWidth'> | null;
29
+ } | null;
30
+ activeEditor?: EditorPageGeometry | null;
31
+ emit(event: 'zoomChange', payload: {
32
+ zoom: number;
33
+ mode: 'fit-width';
34
+ }): unknown;
35
+ emit(event: 'viewport-change', payload: SuperDocViewportMetrics): unknown;
36
+ on?(event: ViewportFitEventName, listener: () => void): unknown;
37
+ off?(event: ViewportFitEventName, listener: () => void): unknown;
38
+ }
39
+ interface UseViewportFitOptions {
40
+ getSuperdoc: () => ViewportFitSuperDoc | null | undefined;
41
+ superdocContainerWidth: Readonly<Ref<number>>;
42
+ isReady: Readonly<Ref<boolean>>;
43
+ activeZoom: Ref<number>;
44
+ zoomMode: Readonly<Ref<SuperDocZoomMode>>;
45
+ viewportMetrics: Ref<SuperDocViewportMetrics | null>;
46
+ showCommentsSidebar?: Readonly<Ref<unknown>>;
47
+ rightSidebarRef?: Readonly<Ref<HTMLElement | null>>;
48
+ superdocRoot: Readonly<Ref<HTMLElement | null>>;
49
+ documents?: Readonly<Ref<readonly RuntimeDocument[]>>;
50
+ }
51
+ export declare const FIT_WIDTH_DEFAULTS: Readonly<{
52
+ min: 10;
53
+ max: 100;
54
+ padding: 0;
55
+ }>;
56
+ export declare const resolveFitWidthOptions: (rawFitConfig: unknown) => ResolvedFitWidthOptions;
57
+ export declare const computeFitZoom: (availableWidth: number, documentWidth: number) => number | null;
58
+ export declare const computeAppliedFitZoom: (availableWidth: number, documentWidth: number, options: ResolvedFitWidthOptions) => number | null;
59
+ export declare const normalizePdfPageMeasurement: (measured: number, scaleFactor: number, zoomFactor: number) => number | null;
60
+ export declare const resolveEditorPageWidth: (editor: EditorPageGeometry | null | undefined) => number | null;
1
61
  /**
2
62
  * Viewport fit tracking. Maintains pure viewport metrics (available width,
3
63
  * document base width, fit zoom), stores them for `getViewportMetrics()`,
@@ -21,31 +81,7 @@
21
81
  * Must be called inside a component `setup()` (registers watchers and an
22
82
  * unmount hook).
23
83
  */
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
- }): {
84
+ export declare function useViewportFit({ getSuperdoc, superdocContainerWidth, isReady, activeZoom, zoomMode, viewportMetrics, showCommentsSidebar, rightSidebarRef, superdocRoot, documents, }: UseViewportFitOptions): {
36
85
  evaluateViewport: () => void;
37
86
  };
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;
87
+ export {};
@@ -223,9 +223,9 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
223
223
  * mount/unmount, `provide()`, and `config.globalProperties` setup.
224
224
  * Not consumer API: no docs or examples reference `superdoc.app`,
225
225
  * and the only cross-file reader (`SuperComments.createVueApp()`
226
- * at `super-comments-list.js:35`) is a `.js` file under
227
- * `checkJs: false`, so the `@private` boundary does not break
228
- * internal source compilation.
226
+ * in `super-comments-list.ts`) uses bracket access, which
227
+ * TypeScript allows for `private` members, so the `@private`
228
+ * boundary does not break internal source compilation.
229
229
  *
230
230
  * Same SD-3213f-style TS surface hide as
231
231
  * `superdocStore` / `commentsStore` /
@@ -20,10 +20,14 @@ export declare class PDFJSAdapter extends PDFAdapter {
20
20
  workerSrc: string | undefined;
21
21
  constructor(config: PDFJSConfig);
22
22
  getDocument(file: PdfSource): Promise<PDFDocumentProxy>;
23
- getPages(pdf: PDFDocumentProxy, firstPage: number, lastPage: number): Promise<PDFPageProxy[]>;
23
+ getPages<Page = PDFPageProxy>(pdf: {
24
+ getPage(pageNumber: number): Promise<Page>;
25
+ }, firstPage: number, lastPage: number): Promise<Page[]>;
24
26
  }
25
27
  export declare class PDFAdapterFactory {
26
- static create(config: PDFConfig): PDFJSAdapter;
28
+ static create(config: PDFJSConfig & {
29
+ adapter: string;
30
+ }): PDFJSAdapter;
27
31
  }
28
32
  export declare function getWorkerSrcFromCDN(version: string): string;
29
33
  export {};
@@ -2919,6 +2919,7 @@ export interface EditorUpdateEvent {
2919
2919
  * available. Always present (defaults to `null`); may be `null`.
2920
2920
  */
2921
2921
  sectionType: string | null;
2922
+ isRemote: boolean;
2922
2923
  }
2923
2924
  /**
2924
2925
  * Payload emitted with the `ready` event and passed to `Config.onReady`.
@@ -3071,18 +3072,50 @@ export interface SuperDocAwarenessUpdatePayload {
3071
3072
  * `Config.onCommentsUpdate`. Field set differs from older inline
3072
3073
  * declarations: the runtime emits `comment?` and `changes?` (never a
3073
3074
  * `data` field).
3075
+ *
3076
+ * A refused comment mutation emits `rejected: true` with a stable `reason`
3077
+ * (e.g. `'adapter-threw'`, `'receipt-failure'`) and leaves the comment list
3078
+ * unchanged so the user can retry. It may add the document receipt failure
3079
+ * `code` (e.g. `'TARGET_NOT_FOUND'`), a `detail` (an error message or a
3080
+ * structured description of the mismatch), and `committed: true` when the
3081
+ * change reached the document but could not be confirmed in the comment list.
3074
3082
  */
3075
3083
  export interface SuperDocCommentsUpdatePayload {
3076
- /** Update kind (e.g. `'created'`, `'updated'`, `'deleted'`); set by the comments store. */
3084
+ /** Update kind (e.g. `'add'`, `'update'`, `'deleted'`, `'resolved'`, `'pending'`); set by the comments store. */
3077
3085
  type: string;
3078
- /** The comment object the update refers to, when applicable. */
3079
- comment?: Comment;
3080
- /** Per-field change set when the update is a mutation. */
3086
+ /** The comment object the update refers to, when applicable; `null` when a created comment could not be read back. */
3087
+ comment?: Comment | null;
3088
+ /** Per-field change set: `'deleted'` names the comment; `text`, `isInternal`, `resolvedTime` carry `value` (check its type, not just `key`). */
3081
3089
  changes?: Array<{
3082
3090
  key: string;
3083
3091
  commentId: string;
3084
3092
  fileId?: string | null;
3093
+ value?: undefined;
3094
+ previousValue?: undefined;
3095
+ } | {
3096
+ key: 'text';
3097
+ value: string;
3098
+ commentId?: undefined;
3099
+ fileId?: undefined;
3100
+ previousValue?: undefined;
3101
+ } | {
3102
+ key: 'isInternal';
3103
+ value: boolean;
3104
+ previousValue: boolean;
3105
+ commentId?: undefined;
3106
+ fileId?: undefined;
3107
+ } | {
3108
+ key: 'resolvedTime';
3109
+ value: null;
3110
+ commentId?: undefined;
3111
+ fileId?: undefined;
3112
+ previousValue?: undefined;
3085
3113
  }>;
3114
+ rejected?: true;
3115
+ reason?: string;
3116
+ committed?: true;
3117
+ code?: string;
3118
+ detail?: unknown;
3086
3119
  /**
3087
3120
  * The Document API selection snapshot captured at the moment a
3088
3121
  * `'pending'` comment was started, before the pending mark is
@@ -1,3 +1,5 @@
1
- export function readSuperDocV2BrowserRuntime(globalObject?: typeof globalThis): any;
2
- export function installSuperDocV2BrowserRuntime(runtime?: {}, globalObject?: typeof globalThis): any;
3
- export const SUPERDOC_V2_BROWSER_RUNTIME_GLOBAL_KEY: "__SUPERDOC_V2_BROWSER_RUNTIME__";
1
+ export declare const SUPERDOC_V2_BROWSER_RUNTIME_GLOBAL_KEY = "__SUPERDOC_V2_BROWSER_RUNTIME__";
2
+ type SuperDocV2BrowserRuntime = Record<string, unknown>;
3
+ export declare function readSuperDocV2BrowserRuntime(globalObject?: object): SuperDocV2BrowserRuntime | null;
4
+ export declare function installSuperDocV2BrowserRuntime(runtime?: SuperDocV2BrowserRuntime, globalObject?: object): SuperDocV2BrowserRuntime;
5
+ export {};
@@ -1,16 +1,6 @@
1
- /**
2
- * @param {typeof globalThis} globalObject
3
- * @param {string} engineVersion
4
- * @param {string | null} buildOverride
5
- */
6
- export function resolveDocxEngineCdnBaseUrl(globalObject: typeof globalThis, engineVersion: string, buildOverride?: string | null): any;
7
- /** @param {{ engineVersion: string, buildBaseUrl: string | null }} options */
8
- export function configureCdnEngineLoader({ engineVersion, buildBaseUrl }: {
1
+ export declare function resolveDocxEngineCdnBaseUrl(globalObject: object, engineVersion: string, buildOverride?: string | null): string;
2
+ export declare function configureCdnEngineLoader({ engineVersion, buildBaseUrl, }: {
9
3
  engineVersion: string;
10
4
  buildBaseUrl: string | null;
11
5
  }): void;
12
- /**
13
- * @param {string} url
14
- * @returns {Promise<void>}
15
- */
16
- export function loadStylesheetOnce(url: string): Promise<void>;
6
+ export declare function loadStylesheetOnce(url: string): Promise<void>;
@@ -1,59 +1,64 @@
1
- export function defineComponent(options: any, extraOptions: any): any;
2
- export function computed(...args: any[]): any;
3
- export function createApp(...args: any[]): any;
4
- export function createBlock(...args: any[]): any;
5
- export function createCommentVNode(...args: any[]): any;
6
- export function createElementBlock(...args: any[]): any;
7
- export function createElementVNode(...args: any[]): any;
8
- export function createStaticVNode(...args: any[]): any;
9
- export function createTextVNode(...args: any[]): any;
10
- export function createVNode(...args: any[]): any;
11
- export function defineAsyncComponent(...args: any[]): any;
12
- export function effectScope(...args: any[]): any;
13
- export function getCurrentInstance(...args: any[]): any;
14
- export function getCurrentScope(...args: any[]): any;
15
- export function guardReactiveProps(...args: any[]): any;
16
- export function h(...args: any[]): any;
17
- export function hasInjectionContext(...args: any[]): any;
18
- export function inject(...args: any[]): any;
19
- export function isReactive(...args: any[]): any;
20
- export function isRef(...args: any[]): any;
21
- export function markRaw(...args: any[]): any;
22
- export function mergeProps(...args: any[]): any;
23
- export function nextTick(...args: any[]): any;
24
- export function normalizeClass(...args: any[]): any;
25
- export function normalizeProps(...args: any[]): any;
26
- export function normalizeStyle(...args: any[]): any;
27
- export function onActivated(...args: any[]): any;
28
- export function onBeforeUnmount(...args: any[]): any;
29
- export function onDeactivated(...args: any[]): any;
30
- export function onMounted(...args: any[]): any;
31
- export function onScopeDispose(...args: any[]): any;
32
- export function openBlock(...args: any[]): any;
33
- export function provide(...args: any[]): any;
34
- export function reactive(...args: any[]): any;
35
- export function readonly(...args: any[]): any;
36
- export function ref(...args: any[]): any;
37
- export function renderList(...args: any[]): any;
38
- export function renderSlot(...args: any[]): any;
39
- export function resolveDirective(...args: any[]): any;
40
- export function resolveDynamicComponent(...args: any[]): any;
41
- export function shallowRef(...args: any[]): any;
42
- export function toDisplayString(...args: any[]): any;
43
- export function toRaw(...args: any[]): any;
44
- export function toRef(...args: any[]): any;
45
- export function toRefs(...args: any[]): any;
46
- export function unref(...args: any[]): any;
47
- export function useAttrs(...args: any[]): any;
48
- export function useSlots(...args: any[]): any;
49
- export function watch(...args: any[]): any;
50
- export function withCtx(...args: any[]): any;
51
- export function withDirectives(...args: any[]): any;
52
- export function withKeys(...args: any[]): any;
53
- export function withModifiers(...args: any[]): any;
54
- export function Transition(props: any, context: any): any;
55
- export const Fragment: unique symbol;
56
- export const Teleport: {};
57
- export const vModelCheckbox: {};
58
- export const vModelSelect: {};
59
- export const vModelText: {};
1
+ import type * as Vue from 'vue';
2
+ type VueRuntime = typeof Vue;
3
+ type TransitionProps = Parameters<VueRuntime['Transition']>[0];
4
+ type TransitionContext = Parameters<VueRuntime['Transition']>[1];
5
+ export declare function defineComponent(options: object, extraOptions?: object): object;
6
+ export declare const Transition: (props: TransitionProps, context: TransitionContext) => any;
7
+ export declare const Fragment: unique symbol;
8
+ export declare const Teleport: object;
9
+ export declare function computed(...args: Parameters<VueRuntime['computed']>): ReturnType<VueRuntime['computed']>;
10
+ export declare function createApp(...args: Parameters<VueRuntime['createApp']>): ReturnType<VueRuntime['createApp']>;
11
+ export declare function createBlock(...args: Parameters<VueRuntime['createBlock']>): ReturnType<VueRuntime['createBlock']>;
12
+ export declare function createCommentVNode(...args: Parameters<VueRuntime['createCommentVNode']>): ReturnType<VueRuntime['createCommentVNode']>;
13
+ export declare function createElementBlock(...args: Parameters<VueRuntime['createElementBlock']>): ReturnType<VueRuntime['createElementBlock']>;
14
+ export declare function createElementVNode(...args: Parameters<VueRuntime['createElementVNode']>): ReturnType<VueRuntime['createElementVNode']>;
15
+ export declare function createStaticVNode(...args: Parameters<VueRuntime['createStaticVNode']>): ReturnType<VueRuntime['createStaticVNode']>;
16
+ export declare function createTextVNode(...args: Parameters<VueRuntime['createTextVNode']>): ReturnType<VueRuntime['createTextVNode']>;
17
+ export declare function createVNode(...args: Parameters<VueRuntime['createVNode']>): ReturnType<VueRuntime['createVNode']>;
18
+ export declare function defineAsyncComponent(...args: Parameters<VueRuntime['defineAsyncComponent']>): ReturnType<VueRuntime['defineAsyncComponent']>;
19
+ export declare function effectScope(...args: Parameters<VueRuntime['effectScope']>): ReturnType<VueRuntime['effectScope']>;
20
+ export declare function getCurrentInstance(...args: Parameters<VueRuntime['getCurrentInstance']>): ReturnType<VueRuntime['getCurrentInstance']>;
21
+ export declare function getCurrentScope(...args: Parameters<VueRuntime['getCurrentScope']>): ReturnType<VueRuntime['getCurrentScope']>;
22
+ export declare function guardReactiveProps(...args: Parameters<VueRuntime['guardReactiveProps']>): ReturnType<VueRuntime['guardReactiveProps']>;
23
+ export declare function h(...args: Parameters<VueRuntime['h']>): ReturnType<VueRuntime['h']>;
24
+ export declare function hasInjectionContext(...args: Parameters<VueRuntime['hasInjectionContext']>): ReturnType<VueRuntime['hasInjectionContext']>;
25
+ export declare function inject(...args: Parameters<VueRuntime['inject']>): ReturnType<VueRuntime['inject']>;
26
+ export declare function isReactive(...args: Parameters<VueRuntime['isReactive']>): ReturnType<VueRuntime['isReactive']>;
27
+ export declare function isRef(...args: Parameters<VueRuntime['isRef']>): ReturnType<VueRuntime['isRef']>;
28
+ export declare function markRaw(...args: Parameters<VueRuntime['markRaw']>): ReturnType<VueRuntime['markRaw']>;
29
+ export declare function mergeProps(...args: Parameters<VueRuntime['mergeProps']>): ReturnType<VueRuntime['mergeProps']>;
30
+ export declare function nextTick(...args: Parameters<VueRuntime['nextTick']>): ReturnType<VueRuntime['nextTick']>;
31
+ export declare function normalizeClass(...args: Parameters<VueRuntime['normalizeClass']>): ReturnType<VueRuntime['normalizeClass']>;
32
+ export declare function normalizeProps(...args: Parameters<VueRuntime['normalizeProps']>): ReturnType<VueRuntime['normalizeProps']>;
33
+ export declare function normalizeStyle(...args: Parameters<VueRuntime['normalizeStyle']>): ReturnType<VueRuntime['normalizeStyle']>;
34
+ export declare function onActivated(...args: Parameters<VueRuntime['onActivated']>): ReturnType<VueRuntime['onActivated']>;
35
+ export declare function onBeforeUnmount(...args: Parameters<VueRuntime['onBeforeUnmount']>): ReturnType<VueRuntime['onBeforeUnmount']>;
36
+ export declare function onDeactivated(...args: Parameters<VueRuntime['onDeactivated']>): ReturnType<VueRuntime['onDeactivated']>;
37
+ export declare function onMounted(...args: Parameters<VueRuntime['onMounted']>): ReturnType<VueRuntime['onMounted']>;
38
+ export declare function onScopeDispose(...args: Parameters<VueRuntime['onScopeDispose']>): ReturnType<VueRuntime['onScopeDispose']>;
39
+ export declare function openBlock(...args: Parameters<VueRuntime['openBlock']>): ReturnType<VueRuntime['openBlock']>;
40
+ export declare function provide(...args: Parameters<VueRuntime['provide']>): ReturnType<VueRuntime['provide']>;
41
+ export declare function reactive(...args: Parameters<VueRuntime['reactive']>): ReturnType<VueRuntime['reactive']>;
42
+ export declare function readonly(...args: Parameters<VueRuntime['readonly']>): ReturnType<VueRuntime['readonly']>;
43
+ export declare function ref(...args: Parameters<VueRuntime['ref']>): ReturnType<VueRuntime['ref']>;
44
+ export declare function renderList(...args: Parameters<VueRuntime['renderList']>): ReturnType<VueRuntime['renderList']>;
45
+ export declare function renderSlot(...args: Parameters<VueRuntime['renderSlot']>): ReturnType<VueRuntime['renderSlot']>;
46
+ export declare function resolveDirective(...args: Parameters<VueRuntime['resolveDirective']>): ReturnType<VueRuntime['resolveDirective']>;
47
+ export declare function resolveDynamicComponent(...args: Parameters<VueRuntime['resolveDynamicComponent']>): ReturnType<VueRuntime['resolveDynamicComponent']>;
48
+ export declare function shallowRef(...args: Parameters<VueRuntime['shallowRef']>): ReturnType<VueRuntime['shallowRef']>;
49
+ export declare function toDisplayString(...args: Parameters<VueRuntime['toDisplayString']>): ReturnType<VueRuntime['toDisplayString']>;
50
+ export declare function toRaw(...args: Parameters<VueRuntime['toRaw']>): ReturnType<VueRuntime['toRaw']>;
51
+ export declare function toRef(...args: Parameters<VueRuntime['toRef']>): ReturnType<VueRuntime['toRef']>;
52
+ export declare function toRefs(...args: Parameters<VueRuntime['toRefs']>): ReturnType<VueRuntime['toRefs']>;
53
+ export declare function unref(...args: Parameters<VueRuntime['unref']>): ReturnType<VueRuntime['unref']>;
54
+ export declare function useAttrs(...args: Parameters<VueRuntime['useAttrs']>): ReturnType<VueRuntime['useAttrs']>;
55
+ export declare function useSlots(...args: Parameters<VueRuntime['useSlots']>): ReturnType<VueRuntime['useSlots']>;
56
+ export declare const vModelCheckbox: object;
57
+ export declare const vModelSelect: object;
58
+ export declare const vModelText: object;
59
+ export declare function watch(...args: Parameters<VueRuntime['watch']>): ReturnType<VueRuntime['watch']>;
60
+ export declare function withCtx(...args: Parameters<VueRuntime['withCtx']>): ReturnType<VueRuntime['withCtx']>;
61
+ export declare function withDirectives(...args: Parameters<VueRuntime['withDirectives']>): ReturnType<VueRuntime['withDirectives']>;
62
+ export declare function withKeys(...args: Parameters<VueRuntime['withKeys']>): ReturnType<VueRuntime['withKeys']>;
63
+ export declare function withModifiers(...args: Parameters<VueRuntime['withModifiers']>): ReturnType<VueRuntime['withModifiers']>;
64
+ export {};
@@ -1 +1,2 @@
1
1
  export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
2
+ export declare function isThenable(value: unknown): value is PromiseLike<unknown>;
@@ -1,16 +1,13 @@
1
- /**
2
- * @param {any} event - a `v2-host-event` payload.
3
- * @returns {boolean} true when the rejection means the session needs an author.
4
- */
5
- export function isV2AuthorRequiredRejection(event: any): boolean;
6
- export function createV2AuthorRequiredNotificationGate(): {
7
- shouldNotify(scope: any, event: any): boolean;
8
- clear(scope: any): void;
9
- };
1
+ import { V2MutationRejectedEvent } from './v2-mutation-exception.js';
10
2
  /** Stable, non-terminal exception code surfaced to consumers. */
11
- export const V2_AUTHOR_REQUIRED_CODE: "author-required";
3
+ export declare const V2_AUTHOR_REQUIRED_CODE = "author-required";
12
4
  /**
13
5
  * Content-safe, actionable message. Contains no document text, imported author,
14
6
  * email, path, or source key — only how to fix the configuration.
15
7
  */
16
- export const V2_AUTHOR_REQUIRED_MESSAGE: "This edit needs an author identity. Set `user.name` in your SuperDoc configuration and reopen the document to make tracked or revision-overlapping edits.";
8
+ export declare const V2_AUTHOR_REQUIRED_MESSAGE = "This edit needs an author identity. Set `user.name` in your SuperDoc configuration and reopen the document to make tracked or revision-overlapping edits.";
9
+ export declare function isV2AuthorRequiredRejection(event: unknown): event is V2MutationRejectedEvent;
10
+ export declare function createV2AuthorRequiredNotificationGate(): {
11
+ shouldNotify(scope: string | null | undefined, event: unknown): boolean;
12
+ clear(scope: string | null | undefined): void;
13
+ };