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.
- package/dist/chunks/{FindReplaceSurface-Dm043CZP.es.js → FindReplaceSurface-BKVHzhQ4.es.js} +34 -26
- package/dist/chunks/{FindReplaceSurface-BRs3JrCq.cjs → FindReplaceSurface-BNDrJ6VS.cjs} +34 -26
- package/dist/chunks/{PasswordPromptSurface-DGjmN7A-.es.js → PasswordPromptSurface-6mF6Azda.es.js} +6 -4
- package/dist/chunks/{PasswordPromptSurface-BpqP4pUa.cjs → PasswordPromptSurface-BNkaztaP.cjs} +6 -4
- package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-DmSkZehl.cjs} +70 -99
- package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-aOWhUVI7.es.js} +67 -96
- package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
- package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
- package/dist/chunks/{create-super-doc-ui-BFt8agAI.es.js → create-super-doc-ui-Bm5kmx0W.es.js} +12 -29
- package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-DN70aatf.cjs} +17 -28
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
- package/dist/document-api/src/comments/comments.d.ts +2 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
- package/dist/document-api/src/index.d.ts +8 -7
- package/dist/document-api/src/insert/insert.d.ts +2 -2
- package/dist/document-api/src/replace/replace.d.ts +3 -2
- package/dist/document-api/src/types/address.d.ts +3 -0
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/write/write.d.ts +12 -6
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +35 -1867
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +3 -4
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +3 -618
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +0 -1
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
- package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +81 -16
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +49 -13
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +11 -0
- package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +58 -15
- package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +58 -15
- package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +14 -6
- package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +25 -15
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
- package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
- package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
- package/dist/superdoc/src/composables/use-field.d.ts +88 -25
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -7
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
- package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
- package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
- package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
- package/dist/superdoc/src/core/create-app.d.ts +13 -24
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +9 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
- package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
- package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +24 -61
- package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
- package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
- package/dist/superdoc/src/core/types/index.d.ts +4 -19
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
- package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
- package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
- package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
- package/dist/superdoc/src/helpers/object-guards.d.ts +1 -5
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
- package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
- package/dist/superdoc/src/icons.d.ts +8 -0
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +77 -16
- package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +5 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +85 -5
- package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +20 -6
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +32 -8
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +32 -8
- package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +44 -12
- package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +32 -9
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
- package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +39 -10
- package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +24 -6
- package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +7 -3
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +13 -15
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -10
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +16 -6
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +10 -20
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +12 -45
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +67 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +7 -27
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
- package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
- package/dist/superdoc/src/public/index.d.cts +26 -0
- package/dist/superdoc/src/public/index.d.ts +13 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
- package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
- package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
- package/dist/superdoc/src/public/ui/types.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +225 -99
- package/dist/superdoc/src/stores/helpers/comment-draft-text.d.ts +1 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +21 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
- package/dist/superdoc/src/stores/superdoc-store.d.ts +676 -298
- package/dist/superdoc.cjs +1623 -2477
- package/dist/superdoc.es.js +1604 -2461
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
- package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
|
@@ -1,33 +1,96 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export interface FieldOptionDefinition {
|
|
2
|
+
itemdisplaylabel?: unknown;
|
|
3
|
+
itemlinkvalue?: unknown;
|
|
4
|
+
ischecked?: unknown;
|
|
5
|
+
itemid?: unknown;
|
|
6
|
+
annotationId?: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldDefinition {
|
|
9
|
+
itemid: {
|
|
10
|
+
value?: unknown;
|
|
11
|
+
};
|
|
12
|
+
itemicon?: unknown;
|
|
13
|
+
itemiconpack?: unknown;
|
|
14
|
+
itemdisplaylabel?: unknown;
|
|
15
|
+
itemlinkvalue?: unknown;
|
|
16
|
+
itemplaceholdertext?: unknown;
|
|
17
|
+
itemtype?: string;
|
|
18
|
+
itemfieldtype?: unknown;
|
|
19
|
+
itemformat?: unknown;
|
|
20
|
+
itemoptions?: FieldOptionDefinition[] | null;
|
|
21
|
+
iteminputtype?: unknown;
|
|
22
|
+
fontfamily?: string | null;
|
|
23
|
+
font_size?: string | null;
|
|
24
|
+
original_font_size?: string | null;
|
|
25
|
+
logicrules?: unknown;
|
|
26
|
+
valueGetter?: (data: object) => string;
|
|
27
|
+
}
|
|
28
|
+
export declare function useFieldValueWatcher(originalValue: unknown): {
|
|
29
|
+
value: {};
|
|
3
30
|
};
|
|
4
|
-
export function useField(field:
|
|
5
|
-
id: import('vue').Ref<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
31
|
+
export declare function useField(field: FieldDefinition): {
|
|
32
|
+
id: import('vue').Ref<{
|
|
33
|
+
value?: unknown;
|
|
34
|
+
}, {
|
|
35
|
+
value?: unknown;
|
|
36
|
+
} | {
|
|
37
|
+
value?: unknown;
|
|
38
|
+
}>;
|
|
39
|
+
icon: import('vue').Ref<unknown, unknown>;
|
|
40
|
+
iconPack: import('vue').Ref<unknown, unknown>;
|
|
41
|
+
label: import('vue').Ref<unknown, unknown>;
|
|
42
|
+
placeholder: unknown;
|
|
43
|
+
fieldType: import('vue').Ref<string | undefined, string | undefined>;
|
|
44
|
+
fieldSubType: import('vue').Ref<unknown, unknown>;
|
|
45
|
+
value: {};
|
|
46
|
+
format: import('vue').Ref<unknown, unknown>;
|
|
47
|
+
logicRules: import('vue').Ref<unknown, unknown>;
|
|
15
48
|
hidden: import('vue').Ref<boolean, boolean>;
|
|
16
|
-
originalJSON:
|
|
49
|
+
originalJSON: FieldDefinition;
|
|
17
50
|
fieldStyle: {
|
|
18
|
-
fontFamily:
|
|
19
|
-
fontSize:
|
|
20
|
-
originalFontSize:
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontSize: string;
|
|
53
|
+
originalFontSize: string;
|
|
21
54
|
};
|
|
22
|
-
valueGetter:
|
|
55
|
+
valueGetter: ((data: object) => string) | undefined;
|
|
23
56
|
};
|
|
24
|
-
export function useImageField(field:
|
|
25
|
-
fontfamily: import('vue').Ref<
|
|
26
|
-
iteminputtype: import('vue').Ref<
|
|
57
|
+
export declare function useImageField(field: Pick<FieldDefinition, 'fontfamily' | 'iteminputtype'>): {
|
|
58
|
+
fontfamily: import('vue').Ref<string | null | undefined, string | null | undefined>;
|
|
59
|
+
iteminputtype: import('vue').Ref<unknown, unknown>;
|
|
27
60
|
};
|
|
28
|
-
export function useSelectField(field:
|
|
29
|
-
options: import('vue').Ref<
|
|
61
|
+
export declare function useSelectField(field: Pick<FieldDefinition, 'itemoptions'>): {
|
|
62
|
+
options: import('vue').Ref<{
|
|
63
|
+
itemdisplaylabel?: unknown;
|
|
64
|
+
itemlinkvalue?: unknown;
|
|
65
|
+
ischecked?: unknown;
|
|
66
|
+
itemid?: unknown;
|
|
67
|
+
annotationId?: unknown;
|
|
68
|
+
}[] | null | undefined, FieldOptionDefinition[] | {
|
|
69
|
+
itemdisplaylabel?: unknown;
|
|
70
|
+
itemlinkvalue?: unknown;
|
|
71
|
+
ischecked?: unknown;
|
|
72
|
+
itemid?: unknown;
|
|
73
|
+
annotationId?: unknown;
|
|
74
|
+
}[] | null | undefined>;
|
|
30
75
|
};
|
|
31
|
-
export function useCheckboxField(field:
|
|
32
|
-
options: import('vue').Ref<
|
|
76
|
+
export declare function useCheckboxField(field: Pick<FieldDefinition, 'itemoptions'>): {
|
|
77
|
+
options: import('vue').Ref<{
|
|
78
|
+
label: unknown;
|
|
79
|
+
value: unknown;
|
|
80
|
+
checked: unknown;
|
|
81
|
+
id: unknown;
|
|
82
|
+
annotationId: unknown;
|
|
83
|
+
}[] | null | undefined, {
|
|
84
|
+
label: unknown;
|
|
85
|
+
value: unknown;
|
|
86
|
+
checked: unknown;
|
|
87
|
+
id: unknown;
|
|
88
|
+
annotationId: unknown;
|
|
89
|
+
}[] | {
|
|
90
|
+
label: unknown;
|
|
91
|
+
value: unknown;
|
|
92
|
+
checked: unknown;
|
|
93
|
+
id: unknown;
|
|
94
|
+
annotationId: unknown;
|
|
95
|
+
}[] | null | undefined>;
|
|
33
96
|
};
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
+
import { SurfaceManager } from '../core/surface-manager.js';
|
|
2
|
+
import { Editor, PasswordPromptConfig } from '../core/types/index.js';
|
|
3
|
+
export interface PasswordPromptDocument {
|
|
4
|
+
id: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
editorMountNonce: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PasswordPromptException {
|
|
9
|
+
error?: Error;
|
|
10
|
+
editor?: Editor | null;
|
|
11
|
+
}
|
|
12
|
+
export interface UsePasswordPromptOptions {
|
|
13
|
+
getSurfaceManager: () => SurfaceManager | null;
|
|
14
|
+
getPasswordPromptConfig: () => boolean | PasswordPromptConfig | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw).
|
|
17
|
+
* Receives the original exception payload so the host can re-emit it unchanged.
|
|
18
|
+
*/
|
|
19
|
+
onUnhandled?: (doc: PasswordPromptDocument, errorCode: string, originalException?: PasswordPromptException) => void;
|
|
20
|
+
}
|
|
1
21
|
/**
|
|
2
22
|
* Composable that coordinates password-prompt dialogs for encrypted DOCX files.
|
|
3
23
|
*
|
|
4
24
|
* Owns a FIFO queue of pending prompts (one active dialog at a time), and a
|
|
5
25
|
* `pendingSignals` map that bridges the async gap between triggering a remount
|
|
6
26
|
* and observing the result via `onEditorReady` / `onEditorException`.
|
|
7
|
-
*
|
|
8
|
-
* @param {Object} options
|
|
9
|
-
* @param {() => import('../core/surface-manager.js').SurfaceManager | null} options.getSurfaceManager
|
|
10
|
-
* @param {() => boolean | PasswordPromptConfig | undefined} options.getPasswordPromptConfig
|
|
11
|
-
* @param {(doc: any, errorCode: string, originalException?: { error?: Error, editor?: any }) => void} [options.onUnhandled] Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw). Receives the original exception payload so the host can re-emit it unchanged.
|
|
12
27
|
*/
|
|
13
|
-
export function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhandled }: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onUnhandled?: ((doc: any, errorCode: string, originalException?: {
|
|
17
|
-
error?: Error;
|
|
18
|
-
editor?: any;
|
|
19
|
-
}) => void) | undefined;
|
|
20
|
-
}): {
|
|
21
|
-
handleEncryptionError: (doc: any, errorCode: string, originalException?: {
|
|
22
|
-
error?: Error;
|
|
23
|
-
editor?: any;
|
|
24
|
-
}) => boolean;
|
|
25
|
-
handleEditorReady: (doc: any) => void;
|
|
28
|
+
export declare function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhandled, }: UsePasswordPromptOptions): {
|
|
29
|
+
handleEncryptionError: (doc: PasswordPromptDocument | null | undefined, errorCode: string, originalException?: PasswordPromptException) => boolean;
|
|
30
|
+
handleEditorReady: (doc: PasswordPromptDocument | null | undefined) => void;
|
|
26
31
|
destroy: () => void;
|
|
27
32
|
};
|
|
28
|
-
export type PasswordPromptConfig = import('../core/types/index.js').PasswordPromptConfig;
|
|
29
|
-
export type ResolvedPasswordPromptTexts = import('../core/types/index.js').ResolvedPasswordPromptTexts;
|
|
30
|
-
export type PasswordPromptHandle = import('../core/types/index.js').PasswordPromptHandle;
|
|
31
|
-
export type PasswordPromptContext = import('../core/types/index.js').PasswordPromptContext;
|
|
32
|
-
export type PasswordPromptResolution = import('../core/types/index.js').PasswordPromptResolution;
|
|
33
|
-
export type PasswordPromptAttemptResult = import('../core/types/index.js').PasswordPromptAttemptResult;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* Vue composable that returns the computed UI font-family for SuperDoc surfaces.
|
|
3
4
|
*
|
|
@@ -9,16 +10,7 @@
|
|
|
9
10
|
* The font-family is determined by checking the `uiDisplayFallbackFont` config property.
|
|
10
11
|
* If it's a non-empty string, it will be used. Otherwise, the DEFAULT_UI_FONT_FAMILY
|
|
11
12
|
* constant is returned.
|
|
12
|
-
*
|
|
13
|
-
* @returns {{ uiFontFamily: import('vue').ComputedRef<string> }} An object containing:
|
|
14
|
-
* - uiFontFamily: A computed reference to the UI font-family string
|
|
15
13
|
*/
|
|
16
|
-
export function useUiFontFamily(): {
|
|
17
|
-
uiFontFamily:
|
|
14
|
+
export declare function useUiFontFamily(): {
|
|
15
|
+
uiFontFamily: ComputedRef<string>;
|
|
18
16
|
};
|
|
19
|
-
/**
|
|
20
|
-
* The default font-family to use for SuperDoc UI surfaces when no custom font is configured.
|
|
21
|
-
* This constant ensures consistency across the application.
|
|
22
|
-
* @constant {string}
|
|
23
|
-
*/
|
|
24
|
-
export const DEFAULT_UI_FONT_FAMILY: "Arial, Helvetica, sans-serif";
|
|
@@ -103,12 +103,6 @@ interface SuperDocEventMap {
|
|
|
103
103
|
'source:complete': [];
|
|
104
104
|
'source:signals-complete': [];
|
|
105
105
|
}
|
|
106
|
-
/**
|
|
107
|
-
* SuperDoc class
|
|
108
|
-
* Expects a config object
|
|
109
|
-
*
|
|
110
|
-
* @class
|
|
111
|
-
*/
|
|
112
106
|
export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
113
107
|
#private;
|
|
114
108
|
static allowedTypes: ("application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/pdf")[];
|
|
@@ -345,7 +339,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
345
339
|
* surface does not pull the Pinia comment model type graph.
|
|
346
340
|
*
|
|
347
341
|
*/
|
|
348
|
-
getComment(commentId: string):
|
|
342
|
+
getComment(commentId: string): import('../stores/helpers/comment-identity.js').CommentIdentityRow | null;
|
|
349
343
|
/**
|
|
350
344
|
* Get the SuperDoc container element
|
|
351
345
|
*/
|
|
@@ -372,6 +366,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
372
366
|
* @returns The attached room and document once the collaborative runtime is ready
|
|
373
367
|
*/
|
|
374
368
|
upgradeToCollaboration(options: UpgradeToCollaborationOptions): Promise<UpgradeToCollaborationResult>;
|
|
369
|
+
setUser(user: User): Promise<void>;
|
|
375
370
|
/**
|
|
376
371
|
* Add a user to the shared users list. Requires the instance to be
|
|
377
372
|
* ready; pre-ready mutations would be silently overwritten by the
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import { Array as YArray, Doc as YDoc } from 'yjs';
|
|
2
|
+
import { User } from '../types/index.js';
|
|
3
|
+
export type CollaborationCommentEvent = {
|
|
4
|
+
comment: unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare const addYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
|
|
7
|
+
export declare const updateYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
|
|
8
|
+
export declare const deleteYComment: (yArray: YArray<unknown>, ydoc: YDoc, event: CollaborationCommentEvent, user: User | undefined) => void;
|
|
9
|
+
export declare const getCommentIndex: (yArray: YArray<unknown>, comment: Record<string, unknown>) => number;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { CommentEvent } from '../../../../../shared/common';
|
|
2
|
+
import { SuperDoc } from '../SuperDoc.js';
|
|
3
|
+
import { Modules, User } from '../types/index.js';
|
|
4
|
+
import { CollaborationCommentEvent } from './collaboration-comments.js';
|
|
5
|
+
import type * as Y from 'yjs';
|
|
6
|
+
type CommentsSyncHost = {
|
|
7
|
+
isCollaborative?: boolean;
|
|
8
|
+
ydoc?: Y.Doc;
|
|
9
|
+
config?: {
|
|
10
|
+
modules?: Modules;
|
|
11
|
+
user?: User;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type CommentsSyncEvent = CollaborationCommentEvent & {
|
|
15
|
+
type: CommentEvent;
|
|
16
|
+
};
|
|
17
|
+
export declare const loadCommentsFromYdoc: (superdoc: SuperDoc | null | undefined) => boolean;
|
|
18
|
+
export declare const initCollaborationComments: (superdoc: SuperDoc) => void;
|
|
19
|
+
export declare const syncCommentsToClients: (superdoc: CommentsSyncHost, event: CommentsSyncEvent) => void;
|
|
20
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SuperDoc } from '../SuperDoc.js';
|
|
2
|
+
import { CanPerformPermissionParams, PermissionResolver, User } from '../types/index.js';
|
|
3
|
+
export declare const PERMISSIONS: Readonly<{
|
|
2
4
|
RESOLVE_OWN: "RESOLVE_OWN";
|
|
3
5
|
RESOLVE_OTHER: "RESOLVE_OTHER";
|
|
4
6
|
REJECT_OWN: "REJECT_OWN";
|
|
@@ -10,12 +12,15 @@ export const PERMISSIONS: Readonly<{
|
|
|
10
12
|
UPLOAD_VERSION: "UPLOAD_VERSION";
|
|
11
13
|
VERSION_HISTORY: "VERSION_HISTORY";
|
|
12
14
|
}>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
interface PermissionContext {
|
|
16
|
+
comment?: object | null;
|
|
17
|
+
superdoc?: SuperDoc | null;
|
|
18
|
+
currentUser?: User | null;
|
|
19
|
+
permissionResolver?: PermissionResolver;
|
|
20
|
+
trackedChange?: object | null;
|
|
21
|
+
}
|
|
22
|
+
export declare const BUILT_IN_PERMISSION_METHOD: unique symbol;
|
|
23
|
+
export declare const createTrackedChangePermissionResolver: (superdoc: SuperDoc) => (payload?: CanPerformPermissionParams) => boolean;
|
|
24
|
+
export declare const readBuiltInTrackedChangePermissionDecision: (superdoc: unknown, canPerform: unknown, permission: string, trackedChange: unknown) => boolean | null;
|
|
25
|
+
export declare const isAllowed: (permission: string, role: string | undefined, isInternal: boolean | undefined, context?: PermissionContext) => boolean;
|
|
26
|
+
export {};
|
|
@@ -21,7 +21,7 @@ export type SupportedV2ProviderFamily = 'y-websocket' | 'hocuspocus' | 'livebloc
|
|
|
21
21
|
* collaboration room. These strings are part of the diagnostic contract and are
|
|
22
22
|
* safe to assert against in tests; they never carry caller-provided values.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
type V2CollaborationUnsupportedReason = 'missing-target' | 'invalid-document-id' | 'invalid-server-url' | 'invalid-room-mode' | 'invalid-auth-endpoint' | 'invalid-base-url' | 'invalid-adapter-id' | 'invalid-provider-options' | 'invalid-sync-timeout' | 'missing-auth' | 'mixed-auth' | 'unsupported-document-type' | 'unsupported-multi-document' | 'unsupported-legacy-provider' | 'unsupported-provider-family';
|
|
25
25
|
/**
|
|
26
26
|
* Normalized, supported v2 collaboration room target.
|
|
27
27
|
*
|
|
@@ -55,7 +55,7 @@ export interface NormalizedV2CollaborationTarget {
|
|
|
55
55
|
/** Explicit room operation; join is the default at the untrusted input boundary. */
|
|
56
56
|
roomMode: 'join' | 'create';
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
type V2CollaborationTargetResolution = {
|
|
59
59
|
ok: true;
|
|
60
60
|
target: NormalizedV2CollaborationTarget;
|
|
61
61
|
} | {
|
|
@@ -76,7 +76,7 @@ export interface LegacyCollaborationLike {
|
|
|
76
76
|
url?: unknown;
|
|
77
77
|
[key: string]: unknown;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
interface ResolveV2CollaborationTargetInput {
|
|
80
80
|
/** Preferred connection settings. Explicit null or invalid input never falls back to the alias. */
|
|
81
81
|
collaboration?: unknown;
|
|
82
82
|
/** Compatibility spelling for document-level connection settings. */
|
|
@@ -113,3 +113,4 @@ export declare function redactCollaborationUrl(url: unknown): string;
|
|
|
113
113
|
* supported v2 room target, or a stable redacted diagnostic.
|
|
114
114
|
*/
|
|
115
115
|
export declare function resolveV2CollaborationTarget(input: ResolveV2CollaborationTargetInput): V2CollaborationTargetResolution;
|
|
116
|
+
export {};
|
|
@@ -29,7 +29,7 @@ export interface V2AwarenessSnapshotLike {
|
|
|
29
29
|
remoteActors: ReadonlyArray<V2AwarenessRemoteActor>;
|
|
30
30
|
}
|
|
31
31
|
/** Core `awareness-update` payload (the `superdoc` backref is added by the caller). */
|
|
32
|
-
|
|
32
|
+
interface V2AwarenessPayloadCore {
|
|
33
33
|
states: AwarenessState[];
|
|
34
34
|
added: number[];
|
|
35
35
|
removed: number[];
|
|
@@ -55,3 +55,4 @@ export declare function createV2AwarenessDiffer(getLocalUser: () => User | null
|
|
|
55
55
|
registry: V2AwarenessIdRegistry;
|
|
56
56
|
next(snapshot: V2AwarenessSnapshotLike): V2AwarenessPayloadCore;
|
|
57
57
|
};
|
|
58
|
+
export {};
|
|
@@ -3,9 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The responsive options can be migrated independently, so merge that nested
|
|
5
5
|
* bag by field while keeping canonical values authoritative.
|
|
6
|
-
*
|
|
7
|
-
* @param {Record<string, unknown>} config
|
|
8
|
-
* @param {Record<string, unknown>} presentation
|
|
9
|
-
* @returns {Record<string, unknown>}
|
|
10
6
|
*/
|
|
11
|
-
export function mergeCommentsConfig(config: Record<string, unknown>, presentation: Record<string, unknown>): Record<string, unknown>;
|
|
7
|
+
export declare function mergeCommentsConfig(config: Record<string, unknown>, presentation: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -17,19 +17,14 @@
|
|
|
17
17
|
*
|
|
18
18
|
* Later sources win, as with spread. Non-object sources are ignored so callers
|
|
19
19
|
* can pass a possibly-absent block without guarding first.
|
|
20
|
-
*
|
|
21
|
-
* @param {...unknown} sources
|
|
22
|
-
* @returns {Record<string, unknown>}
|
|
23
20
|
*/
|
|
24
|
-
export function mergeDefined(...sources: unknown[]): Record<string, unknown>;
|
|
21
|
+
export declare function mergeDefined(...sources: unknown[]): Record<string, unknown>;
|
|
22
|
+
export declare function mergeDefinedFields<T extends object>(...sources: Array<T | undefined>): Partial<T>;
|
|
25
23
|
/**
|
|
26
24
|
* Pick the first defined value, so `undefined` falls through but `null`,
|
|
27
25
|
* `false`, and `0` are honored as deliberate choices.
|
|
28
26
|
*
|
|
29
27
|
* `??` already does this for null and undefined together, which is wrong when
|
|
30
28
|
* `null` carries meaning — clearing an inherited resolver, for instance.
|
|
31
|
-
*
|
|
32
|
-
* @param {...unknown} values
|
|
33
|
-
* @returns {unknown}
|
|
34
29
|
*/
|
|
35
|
-
export function firstDefined(...values: unknown[]): unknown;
|
|
30
|
+
export declare function firstDefined(...values: unknown[]): unknown;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
+
import { Config, HyperlinkActivationHandler, LinkPopoverResolver } from '../types/index.js';
|
|
2
|
+
type HyperlinkHandler = HyperlinkActivationHandler | LinkPopoverResolver;
|
|
3
|
+
type HyperlinkHandlerSource = 'hyperlinks.onActivate' | 'compatibility';
|
|
1
4
|
/**
|
|
2
5
|
* Resolve hyperlink activation behavior.
|
|
3
6
|
*
|
|
4
7
|
* A canonical handler remains active under `ui: false` because an application
|
|
5
8
|
* may navigate or render its own interface. Without a canonical handler, the
|
|
6
9
|
* existing UI suppression rules keep their current behavior.
|
|
7
|
-
*
|
|
8
|
-
* @param {Record<string, any>} [config] Raw consumer config.
|
|
9
|
-
* @returns {{
|
|
10
|
-
* handler: import('../types/index.js').HyperlinkActivationHandler | import('../types/index.js').LinkPopoverResolver | undefined,
|
|
11
|
-
* handlerSource: 'hyperlinks.onActivate' | 'compatibility' | undefined,
|
|
12
|
-
* editableActivationDisabled: boolean,
|
|
13
|
-
* builtInEditorDisabled: boolean,
|
|
14
|
-
* interceptsNavigationOnly: boolean,
|
|
15
|
-
* }}
|
|
16
10
|
*/
|
|
17
|
-
export function normalizeHyperlinksConfig(config?:
|
|
18
|
-
handler:
|
|
19
|
-
handlerSource:
|
|
11
|
+
export declare function normalizeHyperlinksConfig(config?: Pick<Config, 'hyperlinks' | 'ui' | 'modules'>): {
|
|
12
|
+
handler: HyperlinkHandler | undefined;
|
|
13
|
+
handlerSource: HyperlinkHandlerSource | undefined;
|
|
20
14
|
editableActivationDisabled: boolean;
|
|
21
15
|
builtInEditorDisabled: boolean;
|
|
22
16
|
interceptsNavigationOnly: boolean;
|
|
23
17
|
};
|
|
18
|
+
export {};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import { Config, SurfaceResolver, SurfacesConfig } from '../types/index.js';
|
|
2
|
+
type SurfacesSource = Pick<Config, 'surfaces' | 'modules'>;
|
|
3
|
+
type NormalizedSurfacesConfig = {
|
|
4
|
+
resolver: SurfaceResolver | null;
|
|
5
|
+
dialog: NonNullable<SurfacesConfig['dialog']>;
|
|
6
|
+
floating: NonNullable<SurfacesConfig['floating']>;
|
|
7
|
+
};
|
|
1
8
|
/**
|
|
2
9
|
* Resolve the generic surface infrastructure config.
|
|
3
10
|
*
|
|
@@ -8,16 +15,6 @@
|
|
|
8
15
|
* The resolved shape mirrors the public `SurfacesConfig`, with every member
|
|
9
16
|
* present: the presets are merged objects rather than optional, and `resolver`
|
|
10
17
|
* is a function or `null` once a non-function value has been rejected.
|
|
11
|
-
*
|
|
12
|
-
* @param {Record<string, any>} [config] Raw consumer config.
|
|
13
|
-
* @returns {{
|
|
14
|
-
* resolver: import('../types/index.js').SurfaceResolver | null,
|
|
15
|
-
* dialog: NonNullable<import('../types/index.js').SurfacesConfig['dialog']>,
|
|
16
|
-
* floating: NonNullable<import('../types/index.js').SurfacesConfig['floating']>,
|
|
17
|
-
* }}
|
|
18
18
|
*/
|
|
19
|
-
export function normalizeSurfacesConfig(config?:
|
|
20
|
-
|
|
21
|
-
dialog: NonNullable<import('../types/index.js').SurfacesConfig["dialog"]>;
|
|
22
|
-
floating: NonNullable<import('../types/index.js').SurfacesConfig["floating"]>;
|
|
23
|
-
};
|
|
19
|
+
export declare function normalizeSurfacesConfig(config?: SurfacesSource): NormalizedSurfacesConfig;
|
|
20
|
+
export {};
|
|
@@ -40,21 +40,10 @@ type NormalizedUiConfig = {
|
|
|
40
40
|
options: Record<string, unknown>;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
/** Surfaces that render when the consumer says nothing at all. */
|
|
44
|
-
declare const HISTORICAL_DEFAULTS: Readonly<{
|
|
45
|
-
toolbar: true;
|
|
46
|
-
comments: true;
|
|
47
|
-
contextMenu: true;
|
|
48
|
-
loading: true;
|
|
49
|
-
search: false;
|
|
50
|
-
linkPopover: false;
|
|
51
|
-
ruler: false;
|
|
52
|
-
contentControls: true;
|
|
53
|
-
}>;
|
|
54
43
|
/** Every built-in surface `ui: false` turns off. */
|
|
55
44
|
declare const BUILT_IN_SURFACES: readonly ("search" | "comments" | "contentControls" | "loading" | "ruler" | "toolbar" | "contextMenu" | "linkPopover")[];
|
|
56
45
|
/**
|
|
57
46
|
* Collapse a consumer config into the effective built-in UI profile.
|
|
58
47
|
*/
|
|
59
48
|
export declare function normalizeUiConfig(config?: UiConfigSource): NormalizedUiConfig;
|
|
60
|
-
export { BUILT_IN_SURFACES
|
|
49
|
+
export { BUILT_IN_SURFACES };
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
+
import { App as VueApp } from 'vue';
|
|
2
|
+
import { Pinia } from 'pinia';
|
|
1
3
|
import { useSuperdocStore } from '../stores/superdoc-store.js';
|
|
2
4
|
import { useCommentsStore } from '../stores/comments-store.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type SuperdocVueAppRefs = {
|
|
12
|
-
/**
|
|
13
|
-
* The Vue 3 app instance
|
|
14
|
-
*/
|
|
15
|
-
app: import('vue').App;
|
|
16
|
-
/**
|
|
17
|
-
* The Pinia store instance attached to `app`
|
|
18
|
-
*/
|
|
19
|
-
pinia: import('pinia').Pinia;
|
|
20
|
-
/**
|
|
21
|
-
* The SuperDoc Pinia store
|
|
22
|
-
*/
|
|
5
|
+
import { HighContrastMode } from '../composables/use-high-contrast-mode.js';
|
|
6
|
+
interface SuperdocVueAppOptions {
|
|
7
|
+
disablePiniaDevtools?: boolean;
|
|
8
|
+
highContrastMode: HighContrastMode;
|
|
9
|
+
}
|
|
10
|
+
interface SuperdocVueAppRefs {
|
|
11
|
+
app: VueApp;
|
|
12
|
+
pinia: Pinia;
|
|
23
13
|
superdocStore: ReturnType<typeof useSuperdocStore>;
|
|
24
|
-
/**
|
|
25
|
-
* The Comments Pinia store
|
|
26
|
-
*/
|
|
27
14
|
commentsStore: ReturnType<typeof useCommentsStore>;
|
|
28
|
-
}
|
|
15
|
+
}
|
|
16
|
+
export declare const createSuperdocVueApp: ({ disablePiniaDevtools, highContrastMode, }: SuperdocVueAppOptions) => SuperdocVueAppRefs;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorRuntime, EditorRuntimeDocumentMode, EditorRuntimeId, EditorRuntimeState } from '../index.js';
|
|
2
|
-
|
|
2
|
+
interface FakeV2RuntimeOptions {
|
|
3
3
|
id?: EditorRuntimeId;
|
|
4
4
|
documentId?: string;
|
|
5
5
|
root?: HTMLElement;
|
|
@@ -7,3 +7,4 @@ export interface FakeV2RuntimeOptions {
|
|
|
7
7
|
initialDocumentMode?: EditorRuntimeDocumentMode;
|
|
8
8
|
}
|
|
9
9
|
export declare function createFakeV2Runtime(options?: FakeV2RuntimeOptions): EditorRuntime;
|
|
10
|
+
export {};
|
|
@@ -18,7 +18,7 @@ export interface EditorRuntimeRegistryActiveChange {
|
|
|
18
18
|
*/
|
|
19
19
|
readonly legacyEditorProjection: unknown | null;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
type EditorRuntimeRegistryListener = (change: EditorRuntimeRegistryActiveChange) => void;
|
|
22
22
|
export type EditorRuntimeRegistryUnsubscribe = () => void;
|
|
23
23
|
/**
|
|
24
24
|
* Internal SuperDoc registry of mounted editor runtimes and the active-runtime
|
|
@@ -115,3 +115,4 @@ export declare class EditorRuntimeRegistry {
|
|
|
115
115
|
*/
|
|
116
116
|
clear(): void;
|
|
117
117
|
}
|
|
118
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { EditorRuntimeId, EditorRuntimeDocumentMode, EditorRuntimeUser, EditorRuntimeState, EditorRuntime, EditorRuntimeSnapshot, EditorRuntimeCapabilities, EditorRuntimeCommand, EditorRuntimeCommandKind, EditorRuntimeCommandResult, EditorRuntimeRejectionCode, EditorRuntimeSelectionSnapshot, EditorRuntimeFindSessionSnapshot, EditorRuntimeToolbarState, EditorRuntimeLayoutSnapshot, EditorRuntimePositionToken, EditorRuntimeFocusOptions, EditorRuntimeExportOptions, EditorRuntimeNavigationTarget, EditorRuntimeEvent, EditorRuntimeListener, EditorRuntimeUnsubscribe, } from './types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** A structured-clone / JSON-safe primitive. */
|
|
2
|
-
|
|
2
|
+
type RuntimeJsonPrimitive = string | number | boolean | null;
|
|
3
3
|
/** A structured-clone / JSON-safe value. */
|
|
4
4
|
export type RuntimeJsonValue = RuntimeJsonPrimitive | RuntimeJsonValue[] | {
|
|
5
5
|
[key: string]: RuntimeJsonValue;
|
|
@@ -376,6 +376,12 @@ export type EditorRuntimeUnsubscribe = () => void;
|
|
|
376
376
|
* synchronous so they can back existing synchronous shell APIs and Vue
|
|
377
377
|
* computeds without forcing them async in current implementation.
|
|
378
378
|
*/
|
|
379
|
+
export interface EditorRuntimeUser {
|
|
380
|
+
name: string;
|
|
381
|
+
id?: string;
|
|
382
|
+
email?: string;
|
|
383
|
+
initials?: string;
|
|
384
|
+
}
|
|
379
385
|
export interface EditorRuntime {
|
|
380
386
|
readonly id: EditorRuntimeId;
|
|
381
387
|
readonly kind: EditorRuntimeKind;
|
|
@@ -386,6 +392,7 @@ export interface EditorRuntime {
|
|
|
386
392
|
getSnapshot(): EditorRuntimeSnapshot;
|
|
387
393
|
setDocumentMode(mode: EditorRuntimeDocumentMode): void;
|
|
388
394
|
getDocumentMode(): EditorRuntimeDocumentMode;
|
|
395
|
+
setUser?(user: EditorRuntimeUser): Promise<void>;
|
|
389
396
|
setTrackedChangesRenderOptions(options?: {
|
|
390
397
|
mode?: 'review' | 'original' | 'final' | 'off';
|
|
391
398
|
enabled?: boolean;
|
|
@@ -411,3 +418,4 @@ export interface EditorRuntime {
|
|
|
411
418
|
reveal(target: EditorRuntimeNavigationTarget): Promise<EditorRuntimeCommandResult>;
|
|
412
419
|
subscribe(listener: EditorRuntimeListener): EditorRuntimeUnsubscribe;
|
|
413
420
|
}
|
|
421
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorRuntime, EditorRuntimeDocumentMode, EditorRuntimeId, EditorRuntimeState } from '../index.js';
|
|
1
|
+
import { EditorRuntime, EditorRuntimeDocumentMode, EditorRuntimeUser, EditorRuntimeId, EditorRuntimeState } from '../index.js';
|
|
2
2
|
import { resolveV2DocxExportOptions } from '../../helpers/resolve-docx-export.js';
|
|
3
3
|
type HostLifecycleState = EditorRuntimeState | 'ready';
|
|
4
4
|
type HostCommandKind = 'text.insert' | 'text.replace' | 'text.deleteBackward' | 'text.deleteForward' | 'text.pastePlain' | 'history.undo' | 'history.redo' | 'structural.enter' | 'structural.listIndent' | 'structural.listOutdent' | string;
|
|
@@ -161,6 +161,7 @@ interface ModeAwareHostLike {
|
|
|
161
161
|
subscribe(listener: (snapshot: HostSnapshotLike) => void): () => void;
|
|
162
162
|
getDocumentMode(): EditorRuntimeDocumentMode;
|
|
163
163
|
setDocumentMode(mode: EditorRuntimeDocumentMode): void;
|
|
164
|
+
setUser?(user: EditorRuntimeUser): Promise<void>;
|
|
164
165
|
setTrackedChangesRenderOptions(options?: {
|
|
165
166
|
mode?: 'review' | 'original' | 'final' | 'off';
|
|
166
167
|
enabled?: boolean;
|
|
@@ -40,7 +40,7 @@ interface PageNumberCommandRoute {
|
|
|
40
40
|
/** Run the command as a first-party UI action. */
|
|
41
41
|
execute: () => Promise<unknown>;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
interface CreateV2SessionShortcutRoutesDeps {
|
|
44
44
|
/** Resolve the live toolbar container element for this SuperDoc instance. */
|
|
45
45
|
resolveToolbarElement: () => HTMLElement | null | undefined;
|
|
46
46
|
/** Resolve the live public Document API facade, or null when unavailable. */
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type DownloadData = Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer> | string;
|
|
2
|
+
export declare const createDownload: (data: DownloadData, name: string, extension: string) => Blob;
|
|
3
|
+
export declare const cleanName: (currentName: string) => string;
|