superdoc 2.29.0-next.2 → 2.29.0-next.9

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 (151) 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-boENOZdF.cjs → PdfViewer-DmSkZehl.cjs} +70 -99
  6. package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-aOWhUVI7.es.js} +67 -96
  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-BFt8agAI.es.js → create-super-doc-ui-Bm5kmx0W.es.js} +12 -29
  10. package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-DN70aatf.cjs} +17 -28
  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/capabilities/html-markdown-support.d.ts +4 -6
  14. package/dist/document-api/src/comments/comments.d.ts +2 -0
  15. package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
  16. package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
  17. package/dist/document-api/src/index.d.ts +8 -7
  18. package/dist/document-api/src/insert/insert.d.ts +2 -2
  19. package/dist/document-api/src/replace/replace.d.ts +3 -2
  20. package/dist/document-api/src/types/address.d.ts +3 -0
  21. package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
  22. package/dist/document-api/src/write/write.d.ts +12 -6
  23. package/dist/public/ui-react.cjs +1 -1
  24. package/dist/public/ui-react.es.js +1 -1
  25. package/dist/public/ui-vue.cjs +1 -1
  26. package/dist/public/ui-vue.es.js +1 -1
  27. package/dist/public/ui.cjs +1 -1
  28. package/dist/public/ui.es.js +1 -1
  29. package/dist/style.css +1 -1
  30. package/dist/style.layered.css +1 -1
  31. package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
  32. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +35 -1867
  33. package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +3 -4
  34. package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +3 -618
  35. package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
  36. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +0 -1
  37. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
  38. package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
  39. package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
  40. package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
  41. package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
  42. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +81 -16
  43. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +49 -13
  44. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
  45. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +11 -0
  46. package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +58 -15
  47. package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +58 -15
  48. package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +14 -6
  49. package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +25 -15
  50. package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
  51. package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
  52. package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
  53. package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
  54. package/dist/superdoc/src/composables/use-field.d.ts +88 -25
  55. package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
  56. package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
  57. package/dist/superdoc/src/core/SuperDoc.d.ts +2 -7
  58. package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
  59. package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
  60. package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
  61. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
  62. package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
  63. package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
  64. package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
  65. package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
  66. package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
  67. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
  68. package/dist/superdoc/src/core/create-app.d.ts +13 -24
  69. package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
  70. package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
  71. package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
  72. package/dist/superdoc/src/core/editor-runtime/types.d.ts +9 -1
  73. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -1
  74. package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
  75. package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
  76. package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
  77. package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
  78. package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
  79. package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
  80. package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
  81. package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
  82. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +24 -61
  83. package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
  84. package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
  85. package/dist/superdoc/src/core/types/index.d.ts +4 -19
  86. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
  87. package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
  88. package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
  89. package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
  90. package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
  91. package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
  92. package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
  93. package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
  94. package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
  95. package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
  96. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -5
  97. package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
  98. package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
  99. package/dist/superdoc/src/icons.d.ts +8 -0
  100. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
  101. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +77 -16
  102. package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +5 -3
  103. package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +85 -5
  104. package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +20 -6
  105. package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +32 -8
  106. package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +32 -8
  107. package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +44 -12
  108. package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +32 -9
  109. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
  110. package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +39 -10
  111. package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +24 -6
  112. package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +7 -3
  113. package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
  114. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +13 -15
  115. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -10
  116. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +16 -6
  117. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +10 -20
  118. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +12 -45
  119. package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
  120. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  121. package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
  122. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +67 -0
  123. package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
  124. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
  125. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +7 -27
  126. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
  127. package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
  128. package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
  129. package/dist/superdoc/src/public/index.d.cts +26 -0
  130. package/dist/superdoc/src/public/index.d.ts +13 -0
  131. package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
  132. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
  133. package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
  134. package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
  135. package/dist/superdoc/src/public/ui/types.d.ts +1 -1
  136. package/dist/superdoc/src/stores/comments-store.d.ts +225 -99
  137. package/dist/superdoc/src/stores/helpers/comment-draft-text.d.ts +1 -0
  138. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
  139. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
  140. package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
  141. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
  142. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +21 -0
  143. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
  144. package/dist/superdoc/src/stores/superdoc-store.d.ts +676 -298
  145. package/dist/superdoc.cjs +1623 -2477
  146. package/dist/superdoc.es.js +1604 -2461
  147. package/dist-cdn/style.layered.css +1 -1
  148. package/dist-cdn/superdoc.min.css +1 -1
  149. package/dist-cdn/superdoc.min.js +42 -42
  150. package/package.json +2 -2
  151. package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
@@ -1,45 +1,8 @@
1
- export function extractBrowserFile(input: File | Blob | UploadWrapper | any, fallbackName?: string): File | Blob | null;
2
- export function isDocumentByteSource(input: unknown): input is ArrayBuffer | Uint8Array;
3
- export function documentByteSourceToBlob(input: ArrayBuffer | Uint8Array, type: string): Blob;
4
- export function normalizeDocumentEntry(entry: File | Blob | UploadWrapper | DocumentEntry | any): DocumentEntry | any;
5
- export type UploadWrapper = {
6
- /**
7
- * Underlying file reference used by some uploaders
8
- */
9
- originFileObj?: File | Blob | undefined;
10
- /**
11
- * Underlying file reference used by some uploaders
12
- */
13
- file?: File | Blob | undefined;
14
- /**
15
- * Underlying file reference used by some uploaders
16
- */
17
- raw?: File | Blob | undefined;
18
- /**
19
- * Optional unique id from uploaders (ignored)
20
- */
21
- uid?: string | number | undefined;
22
- /**
23
- * Display name (not always reliable for the native file)
24
- */
25
- name?: string | undefined;
26
- };
27
- export type DocumentEntry = {
28
- /**
29
- * Mime type or shorthand ('docx' | 'pdf' | 'html')
30
- */
31
- type?: string | undefined;
32
- /**
33
- * Filename to display
34
- */
35
- name?: string | undefined;
36
- /**
37
- * Document data
38
- */
39
- data?: File | Blob | ArrayBuffer | Uint8Array<ArrayBufferLike> | UploadWrapper | undefined;
40
- /**
41
- * Remote URL to fetch; left as-is for URL flows
42
- */
43
- url?: string | undefined;
44
- isNewFile?: boolean | undefined;
45
- };
1
+ import { Document, DocumentSource } from '../types/index.js';
2
+ type BrowserFile = File | Blob;
3
+ type DocumentByteSource = ArrayBuffer | Uint8Array;
4
+ export declare const extractBrowserFile: (input: unknown, fallbackName?: unknown) => BrowserFile | null;
5
+ export declare const isDocumentByteSource: (input: unknown) => input is DocumentByteSource;
6
+ export declare const documentByteSourceToBlob: (input: DocumentByteSource, type: string) => Blob;
7
+ export declare function normalizeDocumentEntry(entry: Exclude<DocumentSource, string>): Document;
8
+ export {};
@@ -1,60 +1,6 @@
1
- /**
2
- * Resolves tracked-change behavior from `config.trackChanges` and viewer
3
- * projection from `config.viewing.trackedChanges`. The normalized result is
4
- * mirrored to the previous paths while their internal consumers migrate.
5
- *
6
- * Precedence per field: canonical > legacy > derived default.
7
- *
8
- * Emits a one-time deprecation warning per legacy key path that was
9
- * populated by the caller. Suppresses warnings on a second pass over the
10
- * same config object so write-through values don't look like new legacy
11
- * usage.
12
- *
13
- * @param {Record<string, any>} config The SuperDoc config object (mutated in place)
14
- * @returns {NormalizedTrackChangesConfig}
15
- */
16
- export function normalizeTrackChangesConfig(config: Record<string, any>): NormalizedTrackChangesConfig;
17
- /**
18
- * Test-only hook: clears the deduplicated deprecation-warning set so
19
- * tests can assert the warning fires on the first invocation.
20
- */
21
- export function __resetDeprecationWarnings(): void;
22
- export type TrackChangesMode = "review" | "original" | "final" | "off";
23
- export type ViewingTrackedChangesMode = "original" | "markup" | "final";
24
- export type TrackChangesReplacementMode = "grouped" | "separate";
25
- export type InternalTrackChangesReplacementMode = "paired" | "independent";
26
- export type AuthorColorsConfig = {
27
- enabled?: boolean;
28
- overrides?: Record<string, string>;
29
- resolve?: (author: {
30
- name?: string;
31
- email?: string;
32
- image?: string;
33
- }) => (string | undefined);
34
- };
35
- export type TrackedChangeSemanticColorKey = import('../types/index.js').TrackedChangeSemanticColorKey;
36
- export type SemanticColorResolverInput = {
37
- key: TrackedChangeSemanticColorKey;
38
- author?: {
39
- name?: string;
40
- email?: string;
41
- image?: string;
42
- };
43
- type?: string;
44
- subtype?: string;
45
- targetKind?: string;
46
- semanticAnchorScope?: string;
47
- };
48
- export type SemanticColorsConfig = {
49
- enabled?: boolean;
50
- overrides?: Partial<Record<TrackedChangeSemanticColorKey, string>>;
51
- resolve?: (input: SemanticColorResolverInput) => (string | undefined);
52
- };
53
- export type NormalizedTrackChangesConfig = {
54
- visible: boolean;
55
- mode: TrackChangesMode;
56
- enabled: boolean;
57
- replacements: InternalTrackChangesReplacementMode;
58
- authorColors?: AuthorColorsConfig;
59
- semanticColors?: SemanticColorsConfig;
60
- };
1
+ import { Config, TrackChangesModuleConfig } from '../types/index.js';
2
+ type TrackChangesConfigSource = Pick<Config, 'documentMode' | 'viewing' | 'modules' | 'trackChanges' | 'layoutEngineOptions' | 'comments'>;
3
+ type NormalizedTrackChangesConfig = Required<Pick<TrackChangesModuleConfig, 'visible' | 'mode' | 'enabled' | 'replacements'>> & Pick<TrackChangesModuleConfig, 'authorColors' | 'semanticColors'>;
4
+ export declare function normalizeTrackChangesConfig(config: TrackChangesConfigSource): NormalizedTrackChangesConfig;
5
+ export declare function __resetDeprecationWarnings(): void;
6
+ export {};
@@ -1,2 +1,2 @@
1
- export const OUTPUT_SCALE: 2;
2
- export const PDF_TO_CSS_UNITS: number;
1
+ export declare const OUTPUT_SCALE = 2;
2
+ export declare const PDF_TO_CSS_UNITS: number;
@@ -1 +1 @@
1
- export function floor(val: any, precision: any): number;
1
+ export declare const floor: (val: number, precision?: number) => number;
@@ -1 +1 @@
1
- export function range(start: any, end: any): any[];
1
+ export declare const range: (start: number, end: number) => number[];
@@ -1 +1 @@
1
- export function readFileAsArrayBuffer(blob: any): Promise<any>;
1
+ export declare const readFileAsArrayBuffer: (blob: Blob) => Promise<ArrayBuffer>;
@@ -1,66 +1,29 @@
1
- /**
2
- * @param {number} version
3
- * @returns {string}
4
- */
5
- export function getWorkerSrcFromCDN(version: number): string;
6
- export function createPDFConfig(config?: Partial<PDFConfig>): PDFConfig;
7
- export class PDFJSAdapter extends PDFAdapter {
8
- /**
9
- * @param {PDFJSConfig} config
10
- */
11
- constructor(config: PDFJSConfig);
12
- pdfLib: any;
13
- workerSrc: string | undefined;
14
- /**
15
- * @param {string | ArrayBuffer | Uint8Array} file
16
- * @returns {Promise<PDFDocumentProxy>}
17
- */
18
- getDocument(file: string | ArrayBuffer | Uint8Array): Promise<PDFDocumentProxy>;
19
- /**
20
- * @param {PDFDocumentProxy} pdf
21
- * @param {number} firstPage
22
- * @param {number} lastPage
23
- * @returns {Promise<PDFPageProxy[]>}
24
- */
25
- getPages(pdf: PDFDocumentProxy, firstPage: number, lastPage: number): Promise<PDFPageProxy[]>;
26
- }
27
- export class PDFAdapterFactory {
28
- /**
29
- * @param {PDFJSConfig & {adapter: AdapterType}} config
30
- * @returns {PDFAdapter}
31
- * @throws {Error}
32
- */
33
- static create(config: PDFJSConfig & {
34
- adapter: AdapterType;
35
- }): PDFAdapter;
36
- }
37
- export type PDFDocumentProxy = import('pdfjs-dist').PDFDocumentProxy;
38
- export type PDFPageProxy = import('pdfjs-dist').PDFPageProxy;
39
- export type AdapterType = "pdfjs";
40
- export type PDFConfig = {
41
- adapter: AdapterType;
42
- pdfLib?: any;
43
- workerSrc?: string | undefined;
44
- setWorker?: boolean | undefined;
45
- };
1
+ import { PDFDocumentProxy, PDFPageProxy } from 'pdfjs-dist';
2
+ import type * as PdfJs from 'pdfjs-dist';
3
+ export type AdapterType = 'pdfjs';
4
+ export type PdfJsLib = Pick<typeof PdfJs, 'getDocument' | 'GlobalWorkerOptions' | 'version'>;
5
+ export type PdfSource = NonNullable<Parameters<PdfJsLib['getDocument']>[0]>;
46
6
  export type PDFJSConfig = {
47
- pdfLib: any;
48
- workerSrc?: string | undefined;
49
- setWorker?: boolean | undefined;
7
+ pdfLib?: object;
8
+ workerSrc?: string;
9
+ setWorker?: boolean;
50
10
  };
51
- export type RenderPagesOptions = {
52
- documentId: string;
53
- pdfDocument: PDFDocumentProxy;
54
- viewerContainer: HTMLElement;
55
- emit?: ((arg0: string, ...arg1: any[]) => void) | undefined;
56
- };
57
- export type PageSize = {
58
- width: number;
59
- height: number;
11
+ export type PDFConfig = PDFJSConfig & {
12
+ adapter: AdapterType;
60
13
  };
61
- /**
62
- * @abstract
63
- */
64
- declare class PDFAdapter {
14
+ export declare const createPDFConfig: (config?: Partial<PDFConfig>) => PDFConfig;
15
+ declare abstract class PDFAdapter {
16
+ constructor();
17
+ }
18
+ export declare class PDFJSAdapter extends PDFAdapter {
19
+ pdfLib: object | undefined;
20
+ workerSrc: string | undefined;
21
+ constructor(config: PDFJSConfig);
22
+ getDocument(file: PdfSource): Promise<PDFDocumentProxy>;
23
+ getPages(pdf: PDFDocumentProxy, firstPage: number, lastPage: number): Promise<PDFPageProxy[]>;
24
+ }
25
+ export declare class PDFAdapterFactory {
26
+ static create(config: PDFConfig): PDFJSAdapter;
65
27
  }
28
+ export declare function getWorkerSrcFromCDN(version: string): string;
66
29
  export {};
@@ -1 +1 @@
1
- export function getSuperDocUiOwnerId(superdoc: any): any;
1
+ export declare function getSuperDocUiOwnerId(superdoc: unknown): string | null;
@@ -1,90 +1,28 @@
1
- /**
2
- * SurfaceManager — a plain JavaScript class that owns surface lifecycle state.
3
- *
4
- * NOT a Pinia store. Lives on the SuperDoc instance and survives runtime
5
- * restarts (collaboration upgrades). Vue components observe the reactive
6
- * refs (`activeDialog`, `activeFloating`) via provide/inject.
7
- */
8
- export class SurfaceManager {
9
- /**
10
- * @param {{ getModuleConfig: () => SurfacesModuleConfig | undefined }} options
11
- */
12
- constructor({ getModuleConfig }: {
13
- getModuleConfig: () => SurfacesModuleConfig | undefined;
14
- });
15
- /** @type {import('vue').ShallowRef<ActiveSurface | null>} */
16
- activeDialog: import('vue').ShallowRef<ActiveSurface | null>;
17
- /** @type {import('vue').ShallowRef<ActiveSurface | null>} */
18
- activeFloating: import('vue').ShallowRef<ActiveSurface | null>;
19
- /**
20
- * Open a surface. Returns a handle with a result promise that always resolves.
21
- *
22
- * Throws synchronously on API misuse (bad request shape, unresolvable intent).
23
- * Normal lifecycle events (close, replace, destroy) resolve through the handle.
24
- *
25
- * @template [TResult=unknown]
26
- * @param {SurfaceRequest} rawRequest
27
- * @returns {SurfaceHandle<TResult>}
28
- */
29
- open<TResult = unknown>(rawRequest: SurfaceRequest): SurfaceHandle<TResult>;
30
- /**
31
- * Close a surface by id, or the topmost surface if no id is given.
32
- * @param {string} [id]
33
- * @param {unknown} [reason]
34
- */
35
- close(id?: string, reason?: unknown): void;
36
- /**
37
- * Settle all active surfaces with the given outcome.
38
- * Used by SuperDoc during runtime restart and destroy.
39
- * @param {SurfaceOutcome} outcome
40
- */
41
- settleAll(outcome: SurfaceOutcome): void;
42
- /**
43
- * Permanently shut down the manager. All active surfaces are settled with
44
- * { status: 'destroyed' }. Future open() calls return destroyed handles.
45
- */
46
- destroy(): void;
47
- #private;
48
- }
49
- export type SurfaceMode = import('./types/index.js').SurfaceMode;
50
- export type SurfaceRequest = import('./types/index.js').SurfaceRequest;
51
- export type SurfaceResolution = import('./types/index.js').SurfaceResolution;
52
- export type SurfaceHandle = import('./types/index.js').SurfaceHandle;
53
- export type SurfaceOutcome = import('./types/index.js').SurfaceOutcome;
54
- export type SurfacesModuleConfig = import('./types/index.js').SurfacesModuleConfig;
55
- export type ExternalSurfaceRenderContext = import('./types/index.js').ExternalSurfaceRenderContext;
56
- export type ActiveSurface = {
1
+ import { ShallowRef } from 'vue';
2
+ import { DirectSurfaceRequest, SurfaceHandle, SurfaceMode, SurfaceOutcome, SurfaceRequest, SurfacesModuleConfig } from './types/index.js';
3
+ type SurfaceRender = NonNullable<DirectSurfaceRequest['render']>;
4
+ export interface ActiveSurface {
57
5
  id: string;
58
6
  mode: SurfaceMode;
59
7
  request: SurfaceRequest;
60
- /**
61
- * Resolved Vue component
62
- */
63
8
  component?: unknown;
64
- /**
65
- * Extra props for the Vue component
66
- */
67
- props?: Record<string, unknown> | undefined;
68
- /**
69
- * External renderer
70
- */
71
- render?: ((ctx: ExternalSurfaceRenderContext) => ({
72
- destroy?: () => void;
73
- } | void)) | undefined;
74
- /**
75
- * Content-facing: settle with 'submitted'
76
- */
9
+ props?: Record<string, unknown>;
10
+ render?: SurfaceRender;
77
11
  resolve: (data?: unknown) => void;
78
- /**
79
- * Content-facing: settle with 'closed' and clear slot
80
- */
81
12
  close: (reason?: unknown) => void;
82
- /**
83
- * Settle the handle promise (internal)
84
- */
85
13
  settle: (outcome: SurfaceOutcome) => boolean;
86
- /**
87
- * Whether the handle has already been settled
88
- */
89
- settled: boolean;
90
- };
14
+ readonly settled: boolean;
15
+ }
16
+ export declare class SurfaceManager {
17
+ #private;
18
+ activeDialog: ShallowRef<ActiveSurface | null>;
19
+ activeFloating: ShallowRef<ActiveSurface | null>;
20
+ constructor({ getModuleConfig }: {
21
+ getModuleConfig: () => SurfacesModuleConfig | undefined;
22
+ });
23
+ open(rawRequest: SurfaceRequest): SurfaceHandle;
24
+ close(id?: string, reason?: unknown): void;
25
+ settleAll(outcome: SurfaceOutcome): void;
26
+ destroy(): void;
27
+ }
28
+ export {};
@@ -9,7 +9,7 @@ import { SuperDoc as SuperDocClass } from '../SuperDoc.js';
9
9
  import { SuperDocActiveEditorExtensions, SuperDocExtension } from '../extensions/index.js';
10
10
  import { BrowserDocumentApi } from '../../public/browser-document-api.js';
11
11
  import { CustomCommandContext, FontFamilyOption as ToolbarFontFamilyOption } from '../../public/ui/types.js';
12
- export type { DocumentFontOption, FontAssetUrlContext, FontAssetUrlResolver, FontFaceSlot, FontFamilyOption, FontLoadResult, FontLoadStatus, FontLoadSummary, FontResolutionReason, FontResolutionRecord, GlyphException, ResolvedFontEvidence, SubstitutePolicyAction, SubstituteVerdict, } from '../../../../shared/font-system/src/index.js';
12
+ export type { DocumentFontOption, FontFamilyOption, FontLoadSummary, FontResolutionRecord, } from '../../../../shared/font-system/src/index.js';
13
13
  export type SuperDoc = SuperDocClass;
14
14
  export type { BrowserDocumentApi } from '../../public/browser-document-api.js';
15
15
  export type { CommentsType, ExportParams, ExportType } from '../../public/export-types.js';
@@ -1099,9 +1099,7 @@ export interface RuntimeDocument extends Document {
1099
1099
  * created one. Set by the editor-create lifecycle.
1100
1100
  *
1101
1101
  * @deprecated Direct editor access will be removed in a future version.
1102
- * Use the Document API (`editor.doc`) instead. This typedef carries the
1103
- * deprecation marker forward from the source accessor in
1104
- * `packages/superdoc/src/composables/use-document.js`.
1102
+ * Use the Document API (`editor.doc`) instead.
1105
1103
  */
1106
1104
  getEditor?: () => Editor | null | undefined;
1107
1105
  /**
@@ -2882,7 +2880,7 @@ export type DocumentMode = 'editing' | 'viewing' | 'suggesting';
2882
2880
  * - 'print': Print Layout View — displays document as it prints (default)
2883
2881
  * - 'web': Web Page View — content reflows to fit container (mobile/accessibility)
2884
2882
  */
2885
- export type ViewLayout = 'print' | 'web';
2883
+ type ViewLayout = 'print' | 'web';
2886
2884
  /**
2887
2885
  * Document view options for controlling how the document is displayed.
2888
2886
  * Mirrors OOXML document view settings.
@@ -3102,7 +3100,7 @@ export interface SuperDocCommentsUpdatePayload {
3102
3100
  */
3103
3101
  pendingSelection?: SelectionInfo | null;
3104
3102
  }
3105
- export interface EditorTransactionLike {
3103
+ interface EditorTransactionLike {
3106
3104
  readonly docChanged?: boolean;
3107
3105
  readonly doc?: {
3108
3106
  readonly content?: {
@@ -4480,19 +4478,6 @@ export interface InternalConfig extends Config {
4480
4478
  /** Normalized to `{}` by `#init` if the consumer passes nothing or `undefined`. */
4481
4479
  layoutEngineOptions: SuperDocLayoutEngineOptions;
4482
4480
  }
4483
- /**
4484
- * Internal augmentation of `SuperDocLayoutEngineOptions` for unstable tuning
4485
- * fields. The public `SuperDocLayoutEngineOptions` interface above is the
4486
- * customer-facing contract; this type adds fields the implementation may
4487
- * read but that are intentionally not part of the v1 stable API.
4488
- */
4489
- export interface InternalSuperDocLayoutEngineOptions extends SuperDocLayoutEngineOptions {
4490
- /**
4491
- * Internal-only semantic mode tuning options. Shape may change without
4492
- * notice; not part of the public surface.
4493
- */
4494
- semanticOptions?: object;
4495
- }
4496
4481
  export type ProofingStatus = 'idle' | 'checking' | 'disabled' | 'degraded';
4497
4482
  export interface ProofingError {
4498
4483
  kind: 'provider-error' | 'validation-error' | 'timeout';
@@ -12,7 +12,7 @@ export interface V2GeometryPayload {
12
12
  mount?: unknown;
13
13
  }
14
14
  export type V2CommittedPageWindow = Readonly<Record<string, unknown>>;
15
- export interface V2GeometryPublisherOptions {
15
+ interface V2GeometryPublisherOptions {
16
16
  getLayersContainer: () => HTMLElement | null;
17
17
  isCommentsEnabled: () => boolean;
18
18
  publishPositions: (positions: Record<string, unknown>, options?: V2GeometryPublishOptions) => void;
@@ -20,7 +20,7 @@ export interface V2GeometryPublisherOptions {
20
20
  readCurrentPositions?: () => Record<string, unknown>;
21
21
  setGeometryAvailable?: (value: boolean) => void;
22
22
  }
23
- export interface V2GeometryPublisher {
23
+ interface V2GeometryPublisher {
24
24
  publish(payload: V2GeometryPayload | null, options?: V2GeometryPublishOptions): Promise<void> | void;
25
25
  recollect(options?: V2GeometryPublishOptions): Promise<void> | void;
26
26
  noteCommittedPageWindow?(window: V2CommittedPageWindow | null | undefined): void;
@@ -28,7 +28,7 @@ export interface V2GeometryPublisher {
28
28
  getLastEpoch(): number | null;
29
29
  getLastPayload(): V2GeometryPayload | null;
30
30
  }
31
- export interface V2ReviewWindowContext {
31
+ interface V2ReviewWindowContext {
32
32
  superdoc: unknown;
33
33
  documentId: string;
34
34
  commentsAdapter: unknown;
@@ -36,7 +36,7 @@ export interface V2ReviewWindowContext {
36
36
  resolveReviewWindow: (input: unknown) => unknown;
37
37
  moveFragmentWordIds: (ids: readonly string[]) => unknown;
38
38
  }
39
- export interface V2ReviewWindowResult {
39
+ interface V2ReviewWindowResult {
40
40
  comments?: {
41
41
  items?: readonly unknown[];
42
42
  requestedIds?: readonly string[];
@@ -49,20 +49,20 @@ export interface V2ReviewWindowResult {
49
49
  };
50
50
  preparedReview?: unknown;
51
51
  }
52
- export interface V2ReviewWindowControllerOptions {
52
+ interface V2ReviewWindowControllerOptions {
53
53
  applyReviewWindow?: ((context: V2ReviewWindowContext, result: V2ReviewWindowResult) => unknown) | null;
54
54
  }
55
- export interface V2ReviewMutationSettlement {
55
+ interface V2ReviewMutationSettlement {
56
56
  outcome: 'aborted' | 'rejected' | 'committed';
57
57
  allResolved?: boolean;
58
58
  resumeDomains?: readonly ('comments' | 'trackedChanges')[];
59
59
  trackedRowCount?: number | null;
60
60
  }
61
- export interface V2ReviewWindowSnapshot {
61
+ interface V2ReviewWindowSnapshot {
62
62
  readonly status: 'pending' | 'ready' | 'stale';
63
63
  readonly [field: string]: unknown;
64
64
  }
65
- export interface V2ReviewWindowDiagnostics {
65
+ interface V2ReviewWindowDiagnostics {
66
66
  generation: number;
67
67
  reviewEpoch: number;
68
68
  hasContext: boolean;
@@ -71,7 +71,7 @@ export interface V2ReviewWindowDiagnostics {
71
71
  mutationPaused: boolean;
72
72
  records: readonly Record<string, unknown>[];
73
73
  }
74
- export interface V2ReviewWindowController {
74
+ interface V2ReviewWindowController {
75
75
  setContext(context: V2ReviewWindowContext | null): void;
76
76
  onCommittedPagePaint?(commit: V2CommittedPageWindow): void;
77
77
  refreshCommittedWindow(reason?: string): void;
@@ -85,7 +85,7 @@ export interface V2ReviewWindowController {
85
85
  subscribe?(listener: (snapshot: V2ReviewWindowSnapshot) => void): () => void;
86
86
  getDiagnostics(): V2ReviewWindowDiagnostics | null;
87
87
  }
88
- export interface SuperDocV2Integration {
88
+ interface SuperDocV2Integration {
89
89
  version: number;
90
90
  capabilities: unknown;
91
91
  EditorComponent: Component;