superdoc 2.29.0-next.9 → 2.30.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -25
- package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-BEnRLpD9.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-DWXgWgg7.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-DjV1JgjD.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-VFPnQOML.cjs} +1 -1
- package/dist/chunks/{PdfViewer-aOWhUVI7.es.js → PdfViewer-C2r-K8zC.es.js} +4 -10
- package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-DYTbPVUr.cjs} +4 -10
- package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BzM2_tVU.cjs} +40 -7
- package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-CmkaJDnr.es.js} +23 -8
- package/dist/chunks/{create-super-doc-ui-Bm5kmx0W.es.js → create-super-doc-ui--o8TcYYv.es.js} +3322 -2729
- package/dist/chunks/{create-super-doc-ui-DN70aatf.cjs → create-super-doc-ui-CvK1JdZv.cjs} +3447 -2854
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/changes/changes.d.ts +26 -0
- package/dist/document-api/src/changes/changes.types.d.ts +156 -0
- package/dist/document-api/src/comments/comment-create-attribution.d.ts +4 -0
- package/dist/document-api/src/comments/comments.types.d.ts +4 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +76 -8
- package/dist/document-api/src/contract/operation-registry.d.ts +2 -2
- package/dist/document-api/src/contract/schemas.d.ts +7 -1
- package/dist/document-api/src/create/create.d.ts +0 -4
- package/dist/document-api/src/diff/diff.types.d.ts +6 -6
- package/dist/document-api/src/header-footers/header-footers.d.ts +1 -3
- package/dist/document-api/src/index.d.ts +13 -1
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +0 -2
- package/dist/document-api/src/insert/insert.d.ts +0 -1
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +8 -3
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +49 -5
- package/dist/document-api/src/tables/data/table-preset-appearance.generated.d.ts +2 -0
- package/dist/document-api/src/tables/table-style-presets.d.ts +73 -0
- package/dist/document-api/src/tables/tables.d.ts +4 -1
- package/dist/document-api/src/types/sd-props.d.ts +7 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +12 -15
- package/dist/layout-engine/contracts/src/index.d.ts +4 -1
- package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +4 -0
- package/dist/layout-engine/layout-bridge/src/coupled-footnote-pagination.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-certificate.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-planner.d.ts +5 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/footnote-page-flow.d.ts +3 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +7 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +5 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +3 -1
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +0 -4
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +4 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/styles.d.ts +0 -10
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +1 -13
- 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/shared/common/Telemetry.d.ts +50 -0
- package/dist/shared/common/event-types.d.ts +13 -0
- package/dist/shared/font-system/src/bundled-face-names.d.ts +1 -0
- package/dist/shared/font-system/src/resolver.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +17 -33
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +25 -6
- package/dist/superdoc/src/components/CommentsLayer/comment-params.d.ts +84 -0
- package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -1
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +15 -95
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +4 -5
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +3 -4
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -9
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +2 -0
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
- package/dist/superdoc/src/composables/use-document.d.ts +51 -99
- package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +1 -1
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/core/SuperDoc.d.ts +15 -6
- package/dist/superdoc/src/core/collaboration/cdn-collaboration-comment-map.d.ts +1 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comment-map.d.ts +2 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +1 -1
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
- package/dist/superdoc/src/core/document-open-telemetry.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
- package/dist/superdoc/src/core/types/index.d.ts +147 -43
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
- package/dist/superdoc/src/helpers/deprecation.d.ts +12 -3
- package/dist/superdoc/src/helpers/object-guards.d.ts +2 -0
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
- package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
- package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
- package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
- package/dist/superdoc/src/helpers/v2-review-geometry-delivery.d.ts +22 -0
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
- package/dist/superdoc/src/icons.d.ts +11 -19
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +3 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- package/dist/superdoc/src/public/content-control-ref.d.ts +12 -0
- package/dist/superdoc/src/public/index.d.cts +20 -0
- package/dist/superdoc/src/public/index.d.ts +4 -1
- package/dist/superdoc/src/public/ui/async-read-cache.d.ts +32 -0
- package/dist/superdoc/src/public/ui/block-commands.d.ts +39 -0
- package/dist/superdoc/src/public/ui/command-results.d.ts +39 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +5 -1
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -17
- package/dist/superdoc/src/public/ui/document-change-records.d.ts +7 -0
- package/dist/superdoc/src/public/ui/entity-rows.d.ts +14 -0
- package/dist/superdoc/src/public/ui/font-options.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-state.d.ts +29 -0
- package/dist/superdoc/src/public/ui/heavy-read-policy.d.ts +11 -0
- package/dist/superdoc/src/public/ui/host-events.d.ts +3 -0
- package/dist/superdoc/src/public/ui/inline-values.d.ts +80 -0
- package/dist/superdoc/src/public/ui/loose-record.d.ts +4 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
- package/dist/superdoc/src/public/ui/selection-targets.d.ts +53 -0
- package/dist/superdoc/src/public/ui/shared-tracked-changes-catalog.d.ts +16 -0
- package/dist/superdoc/src/public/ui/tracked-change-ids.d.ts +51 -0
- package/dist/superdoc/src/public/ui/types.d.ts +25 -2
- package/dist/superdoc/src/public/ui/ui-bench-timing.d.ts +9 -0
- package/dist/superdoc/src/public/ui.d.cts +18 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +23028 -552
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +10 -10
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
- package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +91 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +4 -2
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +1 -8
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +147 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -2895
- package/dist/superdoc.cjs +1330 -972
- package/dist/superdoc.es.js +1242 -884
- package/dist/word-layout/src/marker-utils.d.ts +0 -5
- package/dist/word-layout/src/unit-conversions.d.ts +0 -1
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -42
- package/package.json +13 -3
- package/dist/document-api/src/diff/index.d.ts +0 -3
- package/dist/document-api/src/write/locator.d.ts +0 -24
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +0 -41
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +0 -5
- package/dist/superdoc/src/main.d.ts +0 -1
- package/dist/word-layout/src/tab-layout.d.ts +0 -193
|
@@ -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
|
|
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 {};
|
|
@@ -2,7 +2,7 @@ import { SuperDocDiagnostics } from './types/diagnostics.js';
|
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
import { DocumentReplacementResult } from '../public/document-replacement.js';
|
|
4
4
|
import { HocuspocusProviderWebsocket } from '@hocuspocus/provider';
|
|
5
|
-
import {
|
|
5
|
+
import { Pinia } from 'pinia';
|
|
6
6
|
import { Whiteboard } from './whiteboard/Whiteboard.js';
|
|
7
7
|
import { normalizeUiConfig } from './config/normalize-ui-config.js';
|
|
8
8
|
import { normalizeInteractionConfig } from './config/normalize-interaction-config.js';
|
|
@@ -47,10 +47,12 @@ interface SuperDocEventMap {
|
|
|
47
47
|
'comments-list-change': [SuperDocCommentsListChangePayload];
|
|
48
48
|
/** Requests the shell open its find/replace surface (e.g. the toolbar search button). */
|
|
49
49
|
'search:open': [];
|
|
50
|
+
/** @deprecated replaceWith=`superdoc.ui.zoom.observe` removeIn=v3.0 */
|
|
50
51
|
zoomChange: [SuperDocZoomPayload];
|
|
51
52
|
'measurement-unit-change': [SuperDocMeasurementUnitChangePayload];
|
|
52
53
|
'page-margins-change': [SuperDocPageMarginsChangePayload];
|
|
53
54
|
'formatting-marks-change': [SuperDocFormattingMarksChangePayload];
|
|
55
|
+
/** @deprecated replaceWith=`superdoc.ui.document.observe` removeIn=v3.0 */
|
|
54
56
|
'document-mode-change': [SuperDocDocumentModeChangePayload];
|
|
55
57
|
/**
|
|
56
58
|
* The active editor was assigned or cleared. Internal: the UI controller
|
|
@@ -85,9 +87,15 @@ interface SuperDocEventMap {
|
|
|
85
87
|
'fonts-resolved': [FontsResolvedPayload];
|
|
86
88
|
'fonts-changed': [FontsChangedPayload];
|
|
87
89
|
'pagination-update': [SuperDocPaginationUpdatePayload];
|
|
90
|
+
/**
|
|
91
|
+
* Never emitted by SuperDoc 2.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated replaceWith=`editor-update` and `doc.lists.list` removeIn=v3.0
|
|
94
|
+
*/
|
|
88
95
|
'list-definitions-change': [ListDefinitionsPayload];
|
|
89
96
|
'comments-update': [SuperDocCommentsUpdatePayload];
|
|
90
97
|
'content-control:active-change': [ContentControlActiveChangePayload];
|
|
98
|
+
/** @deprecated replaceWith=`superdoc.ui.contentControls.onClick` removeIn=v3.0 */
|
|
91
99
|
'content-control:click': [ContentControlClickPayload];
|
|
92
100
|
'collaboration-ready': [SuperDocEditorPayload];
|
|
93
101
|
'awareness-update': [SuperDocAwarenessUpdatePayload];
|
|
@@ -98,6 +106,7 @@ interface SuperDocEventMap {
|
|
|
98
106
|
'whiteboard:change': [WhiteboardData];
|
|
99
107
|
'whiteboard:enabled': [boolean];
|
|
100
108
|
'whiteboard:tool': [string];
|
|
109
|
+
/** A union of payloads; narrow by `stage`, `code`, `itemName`, `source`, or `diagnosticCode` before reading on. */
|
|
101
110
|
exception: [SuperDocExceptionPayload];
|
|
102
111
|
'viewport-change': [SuperDocViewportChangePayload];
|
|
103
112
|
'source:complete': [];
|
|
@@ -223,9 +232,9 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
223
232
|
* mount/unmount, `provide()`, and `config.globalProperties` setup.
|
|
224
233
|
* Not consumer API: no docs or examples reference `superdoc.app`,
|
|
225
234
|
* and the only cross-file reader (`SuperComments.createVueApp()`
|
|
226
|
-
*
|
|
227
|
-
* `
|
|
228
|
-
* internal source compilation.
|
|
235
|
+
* in `super-comments-list.ts`) uses bracket access, which
|
|
236
|
+
* TypeScript allows for `private` members, so the `@private`
|
|
237
|
+
* boundary does not break internal source compilation.
|
|
229
238
|
*
|
|
230
239
|
* Same SD-3213f-style TS surface hide as
|
|
231
240
|
* `superdocStore` / `commentsStore` /
|
|
@@ -235,7 +244,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
235
244
|
*/
|
|
236
245
|
private app;
|
|
237
246
|
/** Pinia store root for the SuperDoc Vue app. Set in `#initVueApp`. */
|
|
238
|
-
pinia:
|
|
247
|
+
pinia: Pinia | undefined;
|
|
239
248
|
/** Count of editors that have signaled `editorCreate`. */
|
|
240
249
|
readyEditors: number;
|
|
241
250
|
activeEditor: Editor | null;
|
|
@@ -339,7 +348,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
339
348
|
* surface does not pull the Pinia comment model type graph.
|
|
340
349
|
*
|
|
341
350
|
*/
|
|
342
|
-
getComment(commentId: string):
|
|
351
|
+
getComment(commentId: string): Record<string, unknown> | null;
|
|
343
352
|
/**
|
|
344
353
|
* Get the SuperDoc container element
|
|
345
354
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createCollaborationCommentMap(entries: Iterable<[string, unknown]>): import('yjs').Map<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommentEvent } from '
|
|
1
|
+
import { CommentEvent } from '../../../../shared/common/event-types.js';
|
|
2
2
|
import { SuperDoc } from '../SuperDoc.js';
|
|
3
3
|
import { Modules, User } from '../types/index.js';
|
|
4
4
|
import { CollaborationCommentEvent } from './collaboration-comments.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommentInteractionLevel, Config } from '../types/index.js';
|
|
1
|
+
import { CommentInteractionLevel, Config, WritingAssistanceConfig } from '../types/index.js';
|
|
2
2
|
type InteractionSource = Pick<Config, 'interaction' | 'modules'>;
|
|
3
3
|
type NormalizedInteractionConfig = {
|
|
4
4
|
comments: {
|
|
@@ -9,6 +9,15 @@ type NormalizedInteractionConfig = {
|
|
|
9
9
|
trackedChanges: {
|
|
10
10
|
allowDecisions: boolean;
|
|
11
11
|
};
|
|
12
|
+
touch: {
|
|
13
|
+
gestures: boolean;
|
|
14
|
+
};
|
|
15
|
+
writingAssistance: {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
autocorrect: boolean;
|
|
18
|
+
autocapitalize: NonNullable<WritingAssistanceConfig['autocapitalize']>;
|
|
19
|
+
spellcheck: boolean;
|
|
20
|
+
};
|
|
12
21
|
};
|
|
13
22
|
/**
|
|
14
23
|
* Resolve the effective interaction policy.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Telemetry, TelemetryConfig } from '
|
|
1
|
+
import { Telemetry, TelemetryConfig } from '../../../shared/common/Telemetry.js';
|
|
2
2
|
import { Config } from './types/index.js';
|
|
3
3
|
type DocumentOpenTelemetryClient = Pick<Telemetry, 'trackDocumentOpen'>;
|
|
4
4
|
export type DocumentOpenTelemetry = {
|
|
@@ -377,6 +377,10 @@ export type EditorRuntimeUnsubscribe = () => void;
|
|
|
377
377
|
* computeds without forcing them async in current implementation.
|
|
378
378
|
*/
|
|
379
379
|
export interface EditorRuntimeUser {
|
|
380
|
+
commentIdentity?: {
|
|
381
|
+
providerId: string;
|
|
382
|
+
userId: string;
|
|
383
|
+
} | null;
|
|
380
384
|
name: string;
|
|
381
385
|
id?: string;
|
|
382
386
|
email?: string;
|
|
@@ -189,5 +189,6 @@ export interface V2EditorRuntimeAdapterOptions {
|
|
|
189
189
|
export declare function createV2EditorRuntimeAdapter(options: V2EditorRuntimeAdapterOptions): {
|
|
190
190
|
runtime: EditorRuntime;
|
|
191
191
|
attachMountHandle(handle: HostMountHandleLike | null): void;
|
|
192
|
+
detach(): void;
|
|
192
193
|
};
|
|
193
194
|
export {};
|
|
@@ -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:
|
|
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:
|
|
28
|
+
static create(config: PDFJSConfig & {
|
|
29
|
+
adapter: string;
|
|
30
|
+
}): PDFJSAdapter;
|
|
27
31
|
}
|
|
28
32
|
export declare function getWorkerSrcFromCDN(version: string): string;
|
|
29
33
|
export {};
|
|
@@ -3,11 +3,12 @@ import { DiagnosticsConfig } from './diagnostics.js';
|
|
|
3
3
|
import { Doc as YDoc } from 'yjs';
|
|
4
4
|
import { HocuspocusProviderWebsocket } from '@hocuspocus/provider';
|
|
5
5
|
import { Ref, ComputedRef } from 'vue';
|
|
6
|
-
import {
|
|
6
|
+
import { HyperlinkTarget } from '../../../../document-api/src/index.js';
|
|
7
7
|
import { DocumentFontOption, FontAssetUrlResolver, FontFamilyOption, FontLoadSummary, FontResolutionRecord } from '../../../../shared/font-system/src/index.js';
|
|
8
8
|
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
|
+
import { ContentControlClickPayload, ContentControlRef } from '../../public/content-control-ref.js';
|
|
11
12
|
import { CustomCommandContext, FontFamilyOption as ToolbarFontFamilyOption } from '../../public/ui/types.js';
|
|
12
13
|
export type { DocumentFontOption, FontFamilyOption, FontLoadSummary, FontResolutionRecord, } from '../../../../shared/font-system/src/index.js';
|
|
13
14
|
export type SuperDoc = SuperDocClass;
|
|
@@ -449,12 +450,41 @@ export interface V2AuthoringFacade {
|
|
|
449
450
|
* `#assignUserColor()` after `#init`.
|
|
450
451
|
*/
|
|
451
452
|
export interface User {
|
|
453
|
+
commentIdentity?: {
|
|
454
|
+
providerId: string;
|
|
455
|
+
userId: string;
|
|
456
|
+
} | null;
|
|
457
|
+
/** Stable application user id. Collaborative change records report it as the actor id. */
|
|
452
458
|
id?: string | null;
|
|
453
459
|
name?: string | null;
|
|
454
460
|
email?: string | null;
|
|
455
461
|
image?: string | null;
|
|
462
|
+
/**
|
|
463
|
+
* Opaque identity claim published with this session's change records, such as
|
|
464
|
+
* a JWT your server signs. SuperDoc never verifies it.
|
|
465
|
+
*/
|
|
466
|
+
claim?: UserClaim;
|
|
456
467
|
[key: string]: unknown;
|
|
457
468
|
}
|
|
469
|
+
/** Context passed to a {@link UserClaim} function. */
|
|
470
|
+
export interface UserClaimContext {
|
|
471
|
+
/** Collaboration document id of the session. */
|
|
472
|
+
documentId: string;
|
|
473
|
+
/** Yjs client id of the session. */
|
|
474
|
+
clientId: number;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Identity claim for {@link User.claim}: a string, or a function that returns
|
|
478
|
+
* one for the session's collaboration document and Yjs client id.
|
|
479
|
+
*/
|
|
480
|
+
export type UserClaim = string | ((ctx: UserClaimContext) => string | Promise<string>);
|
|
481
|
+
/** Per-session retention of attributed change records (`doc.changes`). */
|
|
482
|
+
export interface ChangesConfig {
|
|
483
|
+
/** Maximum number of retained records. Defaults to 1000. */
|
|
484
|
+
retainRecords?: number;
|
|
485
|
+
/** Maximum retained size in bytes, including captured updates. Defaults to 8 MiB. */
|
|
486
|
+
retainBytes?: number;
|
|
487
|
+
}
|
|
458
488
|
/** V2-neutral active editor facade exposed by legacy shell methods. */
|
|
459
489
|
export interface EditorCommands {
|
|
460
490
|
search?: (text: string | RegExp, options?: Record<string, unknown>) => SearchMatch[];
|
|
@@ -2919,6 +2949,7 @@ export interface EditorUpdateEvent {
|
|
|
2919
2949
|
* available. Always present (defaults to `null`); may be `null`.
|
|
2920
2950
|
*/
|
|
2921
2951
|
sectionType: string | null;
|
|
2952
|
+
isRemote: boolean;
|
|
2922
2953
|
}
|
|
2923
2954
|
/**
|
|
2924
2955
|
* Payload emitted with the `ready` event and passed to `Config.onReady`.
|
|
@@ -3071,18 +3102,50 @@ export interface SuperDocAwarenessUpdatePayload {
|
|
|
3071
3102
|
* `Config.onCommentsUpdate`. Field set differs from older inline
|
|
3072
3103
|
* declarations: the runtime emits `comment?` and `changes?` (never a
|
|
3073
3104
|
* `data` field).
|
|
3105
|
+
*
|
|
3106
|
+
* A refused comment mutation emits `rejected: true` with a stable `reason`
|
|
3107
|
+
* (e.g. `'adapter-threw'`, `'receipt-failure'`) and leaves the comment list
|
|
3108
|
+
* unchanged so the user can retry. It may add the document receipt failure
|
|
3109
|
+
* `code` (e.g. `'TARGET_NOT_FOUND'`), a `detail` (an error message or a
|
|
3110
|
+
* structured description of the mismatch), and `committed: true` when the
|
|
3111
|
+
* change reached the document but could not be confirmed in the comment list.
|
|
3074
3112
|
*/
|
|
3075
3113
|
export interface SuperDocCommentsUpdatePayload {
|
|
3076
|
-
/** Update kind (e.g. `'
|
|
3114
|
+
/** Update kind (e.g. `'add'`, `'update'`, `'deleted'`, `'resolved'`, `'pending'`); set by the comments store. */
|
|
3077
3115
|
type: string;
|
|
3078
|
-
/** The comment object the update refers to, when applicable. */
|
|
3079
|
-
comment?: Comment;
|
|
3080
|
-
/** Per-field change set
|
|
3116
|
+
/** The comment object the update refers to, when applicable; `null` when a created comment could not be read back. */
|
|
3117
|
+
comment?: Comment | null;
|
|
3118
|
+
/** Per-field change set: `'deleted'` names the comment; `text`, `isInternal`, `resolvedTime` carry `value` (check its type, not just `key`). */
|
|
3081
3119
|
changes?: Array<{
|
|
3082
3120
|
key: string;
|
|
3083
3121
|
commentId: string;
|
|
3084
3122
|
fileId?: string | null;
|
|
3123
|
+
value?: undefined;
|
|
3124
|
+
previousValue?: undefined;
|
|
3125
|
+
} | {
|
|
3126
|
+
key: 'text';
|
|
3127
|
+
value: string;
|
|
3128
|
+
commentId?: undefined;
|
|
3129
|
+
fileId?: undefined;
|
|
3130
|
+
previousValue?: undefined;
|
|
3131
|
+
} | {
|
|
3132
|
+
key: 'isInternal';
|
|
3133
|
+
value: boolean;
|
|
3134
|
+
previousValue: boolean;
|
|
3135
|
+
commentId?: undefined;
|
|
3136
|
+
fileId?: undefined;
|
|
3137
|
+
} | {
|
|
3138
|
+
key: 'resolvedTime';
|
|
3139
|
+
value: null;
|
|
3140
|
+
commentId?: undefined;
|
|
3141
|
+
fileId?: undefined;
|
|
3142
|
+
previousValue?: undefined;
|
|
3085
3143
|
}>;
|
|
3144
|
+
rejected?: true;
|
|
3145
|
+
reason?: string;
|
|
3146
|
+
committed?: true;
|
|
3147
|
+
code?: string;
|
|
3148
|
+
detail?: unknown;
|
|
3086
3149
|
/**
|
|
3087
3150
|
* The Document API selection snapshot captured at the moment a
|
|
3088
3151
|
* `'pending'` comment was started, before the pending mark is
|
|
@@ -3145,19 +3208,7 @@ export interface EditorTransactionEvent {
|
|
|
3145
3208
|
/** Header/footer variant (`default`, `first`, `even`, `odd`) when available. */
|
|
3146
3209
|
sectionType?: string | null;
|
|
3147
3210
|
}
|
|
3148
|
-
|
|
3149
|
-
export interface ContentControlRef {
|
|
3150
|
-
/** Content-control id from the DOCX. */
|
|
3151
|
-
id: string;
|
|
3152
|
-
/** Content-control tag, when the DOCX defines one. */
|
|
3153
|
-
tag?: string;
|
|
3154
|
-
/** Display name from the DOCX, when defined. */
|
|
3155
|
-
alias?: string;
|
|
3156
|
-
/** Content-control type, such as `text`, `checkbox`, or `date`. */
|
|
3157
|
-
controlType: ContentControlType;
|
|
3158
|
-
/** Whether the control is inline or contains one or more blocks. */
|
|
3159
|
-
scope: 'inline' | 'block';
|
|
3160
|
-
}
|
|
3211
|
+
export type { ContentControlRef } from '../../public/content-control-ref.js';
|
|
3161
3212
|
/**
|
|
3162
3213
|
* Previous content-control reference shape.
|
|
3163
3214
|
* @deprecated replaceWith=`ContentControlRef` compat-indefinitely=v2 event payload compatibility
|
|
@@ -3183,13 +3234,7 @@ export interface ContentControlActiveChangePayload {
|
|
|
3183
3234
|
/** Reported source of the selection change. */
|
|
3184
3235
|
source: 'keyboard' | 'pointer';
|
|
3185
3236
|
}
|
|
3186
|
-
|
|
3187
|
-
export interface ContentControlClickPayload {
|
|
3188
|
-
/** Innermost clicked content control. */
|
|
3189
|
-
target: ContentControlRef;
|
|
3190
|
-
/** Content-control clicks always originate from a pointer. */
|
|
3191
|
-
source: 'pointer';
|
|
3192
|
-
}
|
|
3237
|
+
export type { ContentControlClickPayload } from '../../public/content-control-ref.js';
|
|
3193
3238
|
export interface SuperDocLayoutEngineOptions {
|
|
3194
3239
|
/**
|
|
3195
3240
|
* Layout engine flow mode.
|
|
@@ -3848,6 +3893,37 @@ export interface TrackChangesInteractionConfig {
|
|
|
3848
3893
|
*/
|
|
3849
3894
|
allowDecisions?: boolean;
|
|
3850
3895
|
}
|
|
3896
|
+
/** Native keyboard writing assistance requested from the device keyboard. */
|
|
3897
|
+
export interface WritingAssistanceConfig {
|
|
3898
|
+
/** Let the keyboard apply autocorrect and predictive replacements (default: false). */
|
|
3899
|
+
autocorrect?: boolean;
|
|
3900
|
+
/** Keyboard auto-capitalization mode (default: 'off'). */
|
|
3901
|
+
autocapitalize?: 'off' | 'sentences' | 'words' | 'characters';
|
|
3902
|
+
/** Let the keyboard underline and suggest spelling fixes (default: false). */
|
|
3903
|
+
spellcheck?: boolean;
|
|
3904
|
+
}
|
|
3905
|
+
/**
|
|
3906
|
+
* Opt-in touch behavior for this Editor. Every field defaults to off, and
|
|
3907
|
+
* omitted or `false` values keep the existing touch behavior unchanged.
|
|
3908
|
+
* Mouse, pen and keyboard input are never affected.
|
|
3909
|
+
*/
|
|
3910
|
+
export interface TouchInteractionConfig {
|
|
3911
|
+
/**
|
|
3912
|
+
* Opt in to SuperDoc-owned touch gestures (default: false).
|
|
3913
|
+
*
|
|
3914
|
+
* When enabled, a stationary touch hold on document content opens the
|
|
3915
|
+
* existing SuperDoc context menu when the finger lifts, with the same caret
|
|
3916
|
+
* and selection rules as a right-click. The lift does not activate content
|
|
3917
|
+
* underneath. Where the browser shows its own text-selection menu for the
|
|
3918
|
+
* hold (iOS Safari), it is dismissed once the SuperDoc menu opens and the
|
|
3919
|
+
* held word stays selected in SuperDoc; where the browser reports the hold
|
|
3920
|
+
* as a context-menu event (Android Chrome), the existing right-click path
|
|
3921
|
+
* opens the menu once. A hold during IME composition does nothing. Taps and
|
|
3922
|
+
* swipes keep their existing behavior. Hosts that disable the context menu,
|
|
3923
|
+
* and viewing mode, keep native behavior. Read when the editor mounts.
|
|
3924
|
+
*/
|
|
3925
|
+
gestures?: boolean;
|
|
3926
|
+
}
|
|
3851
3927
|
/**
|
|
3852
3928
|
* Controls which interactions this Editor allows, independent of what
|
|
3853
3929
|
* SuperDoc renders.
|
|
@@ -3860,6 +3936,10 @@ export interface InteractionConfig {
|
|
|
3860
3936
|
comments?: CommentInteractionConfig;
|
|
3861
3937
|
/** Tracked-change interaction policy. */
|
|
3862
3938
|
trackedChanges?: TrackChangesInteractionConfig;
|
|
3939
|
+
/** Opt-in touch behavior. Omitted fields keep the existing behavior. */
|
|
3940
|
+
touch?: TouchInteractionConfig;
|
|
3941
|
+
/** Native keyboard writing assistance. Everything is off when omitted. */
|
|
3942
|
+
writingAssistance?: WritingAssistanceConfig;
|
|
3863
3943
|
}
|
|
3864
3944
|
/**
|
|
3865
3945
|
* Shared plumbing for dialogs and floating overlays, including surfaces the
|
|
@@ -3904,16 +3984,25 @@ export interface SurfacesConfig {
|
|
|
3904
3984
|
};
|
|
3905
3985
|
}
|
|
3906
3986
|
/**
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
3987
|
+
* Worker URLs accepted by v2. The editor runs on the page and starts no
|
|
3988
|
+
* document worker, so only `collaboration` is used, and only by collaboration
|
|
3989
|
+
* targets with `providerType: 'extension'`.
|
|
3910
3990
|
*/
|
|
3911
3991
|
interface V2WorkerUrlsConfig {
|
|
3912
|
-
/**
|
|
3992
|
+
/**
|
|
3993
|
+
* @deprecated The editor runs on the page and starts no document worker.
|
|
3994
|
+
* Accepted and ignored for configuration compatibility.
|
|
3995
|
+
*/
|
|
3913
3996
|
document?: string | URL;
|
|
3914
|
-
/**
|
|
3997
|
+
/**
|
|
3998
|
+
* Your provider-extension collaboration worker, built with
|
|
3999
|
+
* `bootstrapSuperDocCollaborationWorker` from the same SuperDoc version.
|
|
4000
|
+
* Must be a same-origin module worker URL. Required for
|
|
4001
|
+
* `providerType: 'extension'`; ignored by the built-in providers, which
|
|
4002
|
+
* sync on the page.
|
|
4003
|
+
*/
|
|
3915
4004
|
collaboration?: string | URL;
|
|
3916
|
-
/** @deprecated
|
|
4005
|
+
/** @deprecated Accepted and ignored for configuration compatibility. */
|
|
3917
4006
|
reviewIndex?: string | URL;
|
|
3918
4007
|
}
|
|
3919
4008
|
export interface Config {
|
|
@@ -4139,12 +4228,25 @@ export interface Config {
|
|
|
4139
4228
|
onReady?: (params: SuperDocReadyPayload) => void;
|
|
4140
4229
|
/** Callback when comments are updated. */
|
|
4141
4230
|
onCommentsUpdate?: (params: SuperDocCommentsUpdatePayload) => void;
|
|
4231
|
+
/**
|
|
4232
|
+
* Called when someone accepts a tracked change from its bubble in the comments sidebar.
|
|
4233
|
+
* Receives the tracked-change comment and the active editor. In SuperDoc 2 it runs after the accept is applied.
|
|
4234
|
+
*/
|
|
4235
|
+
onTrackedChangeBubbleAccept?: (comment: Comment, editor: Editor | null) => void;
|
|
4236
|
+
/**
|
|
4237
|
+
* Called when someone rejects a tracked change from its bubble in the comments sidebar.
|
|
4238
|
+
* Receives the tracked-change comment and the active editor. In SuperDoc 2 it runs after the reject is applied.
|
|
4239
|
+
*/
|
|
4240
|
+
onTrackedChangeBubbleReject?: (comment: Comment, editor: Editor | null) => void;
|
|
4142
4241
|
/**
|
|
4143
4242
|
* Callback when the selection enters, leaves, or moves between content controls.
|
|
4144
4243
|
* @deprecated replaceWith=`superdoc.ui.contentControls.observe` compat-indefinitely=v2 event compatibility
|
|
4145
4244
|
*/
|
|
4146
4245
|
onContentControlActiveChange?: (params: ContentControlActiveChangePayload) => void;
|
|
4147
|
-
/**
|
|
4246
|
+
/**
|
|
4247
|
+
* Callback when someone clicks inside a content control.
|
|
4248
|
+
* @deprecated replaceWith=`superdoc.ui.contentControls.onClick` removeIn=v3.0
|
|
4249
|
+
*/
|
|
4148
4250
|
onContentControlClick?: (params: ContentControlClickPayload) => void;
|
|
4149
4251
|
/** Callback when awareness is updated. */
|
|
4150
4252
|
onAwarenessUpdate?: (params: SuperDocAwarenessUpdatePayload) => void;
|
|
@@ -4199,6 +4301,8 @@ export interface Config {
|
|
|
4199
4301
|
* Callback when the zoom level changes. Fires for every zoom source:
|
|
4200
4302
|
* `setZoom()`, the toolbar zoom control, and fit-width
|
|
4201
4303
|
* adjustments.
|
|
4304
|
+
*
|
|
4305
|
+
* @deprecated replaceWith=`superdoc.ui.zoom.observe` removeIn=v3.0
|
|
4202
4306
|
*/
|
|
4203
4307
|
onZoomChange?: (params: SuperDocZoomPayload) => void;
|
|
4204
4308
|
/**
|
|
@@ -4371,22 +4475,22 @@ export interface Config {
|
|
|
4371
4475
|
*/
|
|
4372
4476
|
fonts?: FontsConfig;
|
|
4373
4477
|
/**
|
|
4374
|
-
*
|
|
4375
|
-
*
|
|
4376
|
-
*
|
|
4478
|
+
* Worker URLs. Only `collaboration` is used: the provider-extension
|
|
4479
|
+
* collaboration worker for `providerType: 'extension'`. `document` and
|
|
4480
|
+
* `reviewIndex` are accepted and ignored because the editor runs on the page.
|
|
4377
4481
|
*/
|
|
4378
4482
|
workerUrls?: V2WorkerUrlsConfig;
|
|
4379
4483
|
/**
|
|
4380
|
-
* Budget for the
|
|
4381
|
-
* (
|
|
4382
|
-
*
|
|
4383
|
-
*
|
|
4384
|
-
*
|
|
4385
|
-
*
|
|
4386
|
-
* budget. Must be a finite positive number no greater than 2147483647, the
|
|
4387
|
-
* platform timer ceiling above which a delay would fire immediately.
|
|
4484
|
+
* Budget for the provider-extension collaboration worker
|
|
4485
|
+
* (`workerUrls.collaboration`, `providerType: 'extension'`) to start up and
|
|
4486
|
+
* send its first response, in milliseconds. Defaults to the collaboration
|
|
4487
|
+
* `syncTimeoutMs`, or 30000. Worker load errors are reported immediately and
|
|
4488
|
+
* do not wait for this budget. Ignored by the built-in providers and by
|
|
4489
|
+
* documents opened without collaboration, which start no worker.
|
|
4388
4490
|
*/
|
|
4389
4491
|
workerStartupTimeoutMs?: number;
|
|
4492
|
+
/** Retention of attributed change records read through `activeEditor.doc.changes`. */
|
|
4493
|
+
changes?: ChangesConfig;
|
|
4390
4494
|
/**
|
|
4391
4495
|
* Whether `layoutEngineOptions` are passed when a DOCX editor opens.
|
|
4392
4496
|
*
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export
|
|
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
|
-
|
|
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>;
|