superdoc 2.29.0-next.13 → 2.29.0-next.17
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-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
- package/dist/chunks/{PdfViewer-aOWhUVI7.es.js → PdfViewer-CW09MNrB.es.js} +4 -10
- package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-CkrAHpC-.cjs} +4 -10
- package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
- package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
- package/dist/chunks/{create-super-doc-ui-DdT4b29f.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +54 -77
- package/dist/chunks/{create-super-doc-ui-_SbygYQ4.cjs → create-super-doc-ui-L60GhVAX.cjs} +177 -206
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- 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/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
- 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/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/whiteboard-types.d.ts +2 -0
- 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 +27 -5
- package/dist/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
- package/dist/superdoc/src/core/types/index.d.ts +36 -4
- 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/object-guards.d.ts +1 -0
- 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/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/format-negation.d.ts +10 -4
- 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/stores/comments-store.d.ts +7 -7
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -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/superdoc-store.d.ts +21 -21
- package/dist/superdoc.cjs +396 -423
- package/dist/superdoc.es.js +303 -330
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +41 -41
- package/package.json +3 -2
|
@@ -1 +1,16 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TrackedChangeThreadSource<Id> = {
|
|
2
|
+
trackedChangeThreadParentId?: Id | null;
|
|
3
|
+
trackedChangeParentId?: Id | null;
|
|
4
|
+
trackedChangeLink?: unknown;
|
|
5
|
+
trackedChangeType?: unknown;
|
|
6
|
+
trackedChangeDisplayType?: unknown;
|
|
7
|
+
trackedChangeText?: unknown;
|
|
8
|
+
deletedText?: unknown;
|
|
9
|
+
trackedChange?: unknown;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Resolve explicit thread provenance first, then the guarded legacy fallback.
|
|
13
|
+
* Spatial-only v2 comments carry neither the explicit field nor a legacy
|
|
14
|
+
* review signal and therefore remain standalone.
|
|
15
|
+
*/
|
|
16
|
+
export declare const trackedChangeThreadParentIdForComment: <Id>(comment: TrackedChangeThreadSource<Id> | null | undefined) => Id | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize } from './whiteboard-types.js';
|
|
2
|
+
import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize, WhiteboardPageView } from './whiteboard-types.js';
|
|
4
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
4
|
whiteboard: {
|
|
6
5
|
type: PropType<WhiteboardDropTarget>;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
pages: {
|
|
10
|
-
type: PropType<
|
|
9
|
+
type: PropType<WhiteboardPageView[]>;
|
|
11
10
|
default: () => never[];
|
|
12
11
|
};
|
|
13
12
|
pageSizes: {
|
|
@@ -43,7 +42,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
43
42
|
required: true;
|
|
44
43
|
};
|
|
45
44
|
pages: {
|
|
46
|
-
type: PropType<
|
|
45
|
+
type: PropType<WhiteboardPageView[]>;
|
|
47
46
|
default: () => never[];
|
|
48
47
|
};
|
|
49
48
|
pageSizes: {
|
|
@@ -76,7 +75,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
76
75
|
}>> & Readonly<{}>, {
|
|
77
76
|
enabled: boolean;
|
|
78
77
|
opacity: number;
|
|
79
|
-
pages:
|
|
78
|
+
pages: WhiteboardPageView[];
|
|
80
79
|
pageSizes: Record<number, WhiteboardPageSize>;
|
|
81
80
|
pageOffsets: Record<number, WhiteboardPageOffset>;
|
|
82
81
|
interactive: boolean | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize } from './whiteboard-types.js';
|
|
2
|
+
import { WhiteboardDropTarget, WhiteboardPageOffset, WhiteboardPageSize, WhiteboardPageView } from './whiteboard-types.js';
|
|
4
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
4
|
whiteboard: {
|
|
6
5
|
type: PropType<WhiteboardDropTarget>;
|
|
7
6
|
required: true;
|
|
8
7
|
};
|
|
9
8
|
page: {
|
|
10
|
-
type: PropType<
|
|
9
|
+
type: PropType<WhiteboardPageView>;
|
|
11
10
|
required: true;
|
|
12
11
|
};
|
|
13
12
|
pageSize: {
|
|
@@ -28,7 +27,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
28
27
|
required: true;
|
|
29
28
|
};
|
|
30
29
|
page: {
|
|
31
|
-
type: PropType<
|
|
30
|
+
type: PropType<WhiteboardPageView>;
|
|
32
31
|
required: true;
|
|
33
32
|
};
|
|
34
33
|
pageSize: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Whiteboard } from '../../core/whiteboard/Whiteboard.js';
|
|
2
|
+
import { WhiteboardPage } from '../../core/whiteboard/WhiteboardPage.js';
|
|
2
3
|
export type WhiteboardPageSize = {
|
|
3
4
|
width: number;
|
|
4
5
|
height: number;
|
|
@@ -9,3 +10,4 @@ export type WhiteboardPageOffset = {
|
|
|
9
10
|
left: number;
|
|
10
11
|
};
|
|
11
12
|
export type WhiteboardDropTarget = Pick<Whiteboard, 'getTool' | 'getType'>;
|
|
13
|
+
export type WhiteboardPageView = Pick<WhiteboardPage, 'pageIndex' | 'size' | 'mount' | 'resize' | 'destroy' | 'addImage' | 'addText'>;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { SurfaceManager } from '../core/surface-manager.js';
|
|
3
3
|
import { Editor, FindReplaceConfig } from '../core/types/index.js';
|
|
4
|
-
import { SearchController } from '../public/ui/types.js';
|
|
4
|
+
import { SearchController, SearchSnapshot } from '../public/ui/types.js';
|
|
5
|
+
type FindReplaceSearchQuery = (...args: Parameters<SearchController['find']>) => Partial<SearchSnapshot>;
|
|
6
|
+
export type FindReplaceSearch = Pick<SearchController, 'next' | 'previous' | 'clear' | 'replace' | 'replaceAll'> & {
|
|
7
|
+
getSnapshot: () => Partial<SearchSnapshot>;
|
|
8
|
+
} & ({
|
|
9
|
+
find: FindReplaceSearchQuery;
|
|
10
|
+
search?: FindReplaceSearchQuery;
|
|
11
|
+
} | {
|
|
12
|
+
find?: undefined;
|
|
13
|
+
search: FindReplaceSearchQuery;
|
|
14
|
+
});
|
|
5
15
|
type UseFindReplaceOptions = {
|
|
6
|
-
getSurfaceManager: () => SurfaceManager | null;
|
|
16
|
+
getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null;
|
|
7
17
|
getActiveEditor: () => Editor | null;
|
|
8
18
|
activeEditorRef?: Ref<Editor | null | undefined>;
|
|
9
19
|
getFindReplaceConfig?: () => boolean | FindReplaceConfig | undefined;
|
|
@@ -12,7 +22,7 @@ type UseFindReplaceOptions = {
|
|
|
12
22
|
* slice is the single find/replace session authority.
|
|
13
23
|
*/
|
|
14
24
|
getSuperDocUI?: () => {
|
|
15
|
-
search?:
|
|
25
|
+
search?: FindReplaceSearch | null;
|
|
16
26
|
} | null | undefined;
|
|
17
27
|
};
|
|
18
28
|
/**
|
|
@@ -10,7 +10,7 @@ export interface PasswordPromptException {
|
|
|
10
10
|
editor?: Editor | null;
|
|
11
11
|
}
|
|
12
12
|
export interface UsePasswordPromptOptions {
|
|
13
|
-
getSurfaceManager: () => SurfaceManager | null;
|
|
13
|
+
getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null;
|
|
14
14
|
getPasswordPromptConfig: () => boolean | PasswordPromptConfig | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* Called when a queued prompt cannot be shown (resolver returned `none`, config error, or resolver threw).
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { RuntimeDocument, SuperDocFitWidthOptions, SuperDocViewportMetrics, SuperDocZoomConfig, SuperDocZoomMode } from '../core/types/index.js';
|
|
3
|
+
import { PageMetricsPage, PageMetricsSnapshot } from '../public/ui/page-metrics.js';
|
|
4
4
|
export type ResolvedFitWidthOptions = Required<SuperDocFitWidthOptions>;
|
|
5
|
-
type
|
|
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;
|
|
6
14
|
getPages?: () => Array<{
|
|
7
15
|
size?: {
|
|
8
16
|
w?: unknown;
|
|
@@ -14,8 +22,22 @@ type EditorPageGeometry = Pick<Editor, 'pageMetrics'> & {
|
|
|
14
22
|
};
|
|
15
23
|
} | null | undefined;
|
|
16
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
|
+
}
|
|
17
39
|
interface UseViewportFitOptions {
|
|
18
|
-
getSuperdoc: () =>
|
|
40
|
+
getSuperdoc: () => ViewportFitSuperDoc | null | undefined;
|
|
19
41
|
superdocContainerWidth: Readonly<Ref<number>>;
|
|
20
42
|
isReady: Readonly<Ref<boolean>>;
|
|
21
43
|
activeZoom: Ref<number>;
|
|
@@ -31,7 +53,7 @@ export declare const FIT_WIDTH_DEFAULTS: Readonly<{
|
|
|
31
53
|
max: 100;
|
|
32
54
|
padding: 0;
|
|
33
55
|
}>;
|
|
34
|
-
export declare const resolveFitWidthOptions: (rawFitConfig:
|
|
56
|
+
export declare const resolveFitWidthOptions: (rawFitConfig: unknown) => ResolvedFitWidthOptions;
|
|
35
57
|
export declare const computeFitZoom: (availableWidth: number, documentWidth: number) => number | null;
|
|
36
58
|
export declare const computeAppliedFitZoom: (availableWidth: number, documentWidth: number, options: ResolvedFitWidthOptions) => number | null;
|
|
37
59
|
export declare const normalizePdfPageMeasurement: (measured: number, scaleFactor: number, zoomFactor: number) => number | null;
|
|
@@ -223,9 +223,9 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
223
223
|
* mount/unmount, `provide()`, and `config.globalProperties` setup.
|
|
224
224
|
* Not consumer API: no docs or examples reference `superdoc.app`,
|
|
225
225
|
* and the only cross-file reader (`SuperComments.createVueApp()`
|
|
226
|
-
*
|
|
227
|
-
* `
|
|
228
|
-
* internal source compilation.
|
|
226
|
+
* in `super-comments-list.ts`) uses bracket access, which
|
|
227
|
+
* TypeScript allows for `private` members, so the `@private`
|
|
228
|
+
* boundary does not break internal source compilation.
|
|
229
229
|
*
|
|
230
230
|
* Same SD-3213f-style TS surface hide as
|
|
231
231
|
* `superdocStore` / `commentsStore` /
|
|
@@ -20,10 +20,14 @@ export declare class PDFJSAdapter extends PDFAdapter {
|
|
|
20
20
|
workerSrc: string | undefined;
|
|
21
21
|
constructor(config: PDFJSConfig);
|
|
22
22
|
getDocument(file: PdfSource): Promise<PDFDocumentProxy>;
|
|
23
|
-
getPages(pdf:
|
|
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 {};
|
|
@@ -3072,18 +3072,50 @@ export interface SuperDocAwarenessUpdatePayload {
|
|
|
3072
3072
|
* `Config.onCommentsUpdate`. Field set differs from older inline
|
|
3073
3073
|
* declarations: the runtime emits `comment?` and `changes?` (never a
|
|
3074
3074
|
* `data` field).
|
|
3075
|
+
*
|
|
3076
|
+
* A refused comment mutation emits `rejected: true` with a stable `reason`
|
|
3077
|
+
* (e.g. `'adapter-threw'`, `'receipt-failure'`) and leaves the comment list
|
|
3078
|
+
* unchanged so the user can retry. It may add the document receipt failure
|
|
3079
|
+
* `code` (e.g. `'TARGET_NOT_FOUND'`), a `detail` (an error message or a
|
|
3080
|
+
* structured description of the mismatch), and `committed: true` when the
|
|
3081
|
+
* change reached the document but could not be confirmed in the comment list.
|
|
3075
3082
|
*/
|
|
3076
3083
|
export interface SuperDocCommentsUpdatePayload {
|
|
3077
|
-
/** Update kind (e.g. `'
|
|
3084
|
+
/** Update kind (e.g. `'add'`, `'update'`, `'deleted'`, `'resolved'`, `'pending'`); set by the comments store. */
|
|
3078
3085
|
type: string;
|
|
3079
|
-
/** The comment object the update refers to, when applicable. */
|
|
3080
|
-
comment?: Comment;
|
|
3081
|
-
/** Per-field change set
|
|
3086
|
+
/** The comment object the update refers to, when applicable; `null` when a created comment could not be read back. */
|
|
3087
|
+
comment?: Comment | null;
|
|
3088
|
+
/** Per-field change set: `'deleted'` names the comment; `text`, `isInternal`, `resolvedTime` carry `value` (check its type, not just `key`). */
|
|
3082
3089
|
changes?: Array<{
|
|
3083
3090
|
key: string;
|
|
3084
3091
|
commentId: string;
|
|
3085
3092
|
fileId?: string | null;
|
|
3093
|
+
value?: undefined;
|
|
3094
|
+
previousValue?: undefined;
|
|
3095
|
+
} | {
|
|
3096
|
+
key: 'text';
|
|
3097
|
+
value: string;
|
|
3098
|
+
commentId?: undefined;
|
|
3099
|
+
fileId?: undefined;
|
|
3100
|
+
previousValue?: undefined;
|
|
3101
|
+
} | {
|
|
3102
|
+
key: 'isInternal';
|
|
3103
|
+
value: boolean;
|
|
3104
|
+
previousValue: boolean;
|
|
3105
|
+
commentId?: undefined;
|
|
3106
|
+
fileId?: undefined;
|
|
3107
|
+
} | {
|
|
3108
|
+
key: 'resolvedTime';
|
|
3109
|
+
value: null;
|
|
3110
|
+
commentId?: undefined;
|
|
3111
|
+
fileId?: undefined;
|
|
3112
|
+
previousValue?: undefined;
|
|
3086
3113
|
}>;
|
|
3114
|
+
rejected?: true;
|
|
3115
|
+
reason?: string;
|
|
3116
|
+
committed?: true;
|
|
3117
|
+
code?: string;
|
|
3118
|
+
detail?: unknown;
|
|
3087
3119
|
/**
|
|
3088
3120
|
* The Document API selection snapshot captured at the moment a
|
|
3089
3121
|
* `'pending'` comment was started, before the pending mark is
|
|
@@ -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>;
|
|
@@ -1,59 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export function
|
|
10
|
-
export function
|
|
11
|
-
export function
|
|
12
|
-
export function
|
|
13
|
-
export function
|
|
14
|
-
export function
|
|
15
|
-
export function
|
|
16
|
-
export function
|
|
17
|
-
export function
|
|
18
|
-
export function
|
|
19
|
-
export function
|
|
20
|
-
export function
|
|
21
|
-
export function
|
|
22
|
-
export function
|
|
23
|
-
export function
|
|
24
|
-
export function
|
|
25
|
-
export function
|
|
26
|
-
export function
|
|
27
|
-
export function
|
|
28
|
-
export function
|
|
29
|
-
export function
|
|
30
|
-
export function
|
|
31
|
-
export function
|
|
32
|
-
export function
|
|
33
|
-
export function
|
|
34
|
-
export function
|
|
35
|
-
export function
|
|
36
|
-
export function
|
|
37
|
-
export function
|
|
38
|
-
export function
|
|
39
|
-
export function
|
|
40
|
-
export function
|
|
41
|
-
export function
|
|
42
|
-
export function
|
|
43
|
-
export function
|
|
44
|
-
export function
|
|
45
|
-
export function
|
|
46
|
-
export function
|
|
47
|
-
export function
|
|
48
|
-
export function
|
|
49
|
-
export function
|
|
50
|
-
export function
|
|
51
|
-
export function
|
|
52
|
-
export function
|
|
53
|
-
export function
|
|
54
|
-
export function
|
|
55
|
-
export
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export
|
|
1
|
+
import type * as Vue from 'vue';
|
|
2
|
+
type VueRuntime = typeof Vue;
|
|
3
|
+
type TransitionProps = Parameters<VueRuntime['Transition']>[0];
|
|
4
|
+
type TransitionContext = Parameters<VueRuntime['Transition']>[1];
|
|
5
|
+
export declare function defineComponent(options: object, extraOptions?: object): object;
|
|
6
|
+
export declare const Transition: (props: TransitionProps, context: TransitionContext) => any;
|
|
7
|
+
export declare const Fragment: unique symbol;
|
|
8
|
+
export declare const Teleport: object;
|
|
9
|
+
export declare function computed(...args: Parameters<VueRuntime['computed']>): ReturnType<VueRuntime['computed']>;
|
|
10
|
+
export declare function createApp(...args: Parameters<VueRuntime['createApp']>): ReturnType<VueRuntime['createApp']>;
|
|
11
|
+
export declare function createBlock(...args: Parameters<VueRuntime['createBlock']>): ReturnType<VueRuntime['createBlock']>;
|
|
12
|
+
export declare function createCommentVNode(...args: Parameters<VueRuntime['createCommentVNode']>): ReturnType<VueRuntime['createCommentVNode']>;
|
|
13
|
+
export declare function createElementBlock(...args: Parameters<VueRuntime['createElementBlock']>): ReturnType<VueRuntime['createElementBlock']>;
|
|
14
|
+
export declare function createElementVNode(...args: Parameters<VueRuntime['createElementVNode']>): ReturnType<VueRuntime['createElementVNode']>;
|
|
15
|
+
export declare function createStaticVNode(...args: Parameters<VueRuntime['createStaticVNode']>): ReturnType<VueRuntime['createStaticVNode']>;
|
|
16
|
+
export declare function createTextVNode(...args: Parameters<VueRuntime['createTextVNode']>): ReturnType<VueRuntime['createTextVNode']>;
|
|
17
|
+
export declare function createVNode(...args: Parameters<VueRuntime['createVNode']>): ReturnType<VueRuntime['createVNode']>;
|
|
18
|
+
export declare function defineAsyncComponent(...args: Parameters<VueRuntime['defineAsyncComponent']>): ReturnType<VueRuntime['defineAsyncComponent']>;
|
|
19
|
+
export declare function effectScope(...args: Parameters<VueRuntime['effectScope']>): ReturnType<VueRuntime['effectScope']>;
|
|
20
|
+
export declare function getCurrentInstance(...args: Parameters<VueRuntime['getCurrentInstance']>): ReturnType<VueRuntime['getCurrentInstance']>;
|
|
21
|
+
export declare function getCurrentScope(...args: Parameters<VueRuntime['getCurrentScope']>): ReturnType<VueRuntime['getCurrentScope']>;
|
|
22
|
+
export declare function guardReactiveProps(...args: Parameters<VueRuntime['guardReactiveProps']>): ReturnType<VueRuntime['guardReactiveProps']>;
|
|
23
|
+
export declare function h(...args: Parameters<VueRuntime['h']>): ReturnType<VueRuntime['h']>;
|
|
24
|
+
export declare function hasInjectionContext(...args: Parameters<VueRuntime['hasInjectionContext']>): ReturnType<VueRuntime['hasInjectionContext']>;
|
|
25
|
+
export declare function inject(...args: Parameters<VueRuntime['inject']>): ReturnType<VueRuntime['inject']>;
|
|
26
|
+
export declare function isReactive(...args: Parameters<VueRuntime['isReactive']>): ReturnType<VueRuntime['isReactive']>;
|
|
27
|
+
export declare function isRef(...args: Parameters<VueRuntime['isRef']>): ReturnType<VueRuntime['isRef']>;
|
|
28
|
+
export declare function markRaw(...args: Parameters<VueRuntime['markRaw']>): ReturnType<VueRuntime['markRaw']>;
|
|
29
|
+
export declare function mergeProps(...args: Parameters<VueRuntime['mergeProps']>): ReturnType<VueRuntime['mergeProps']>;
|
|
30
|
+
export declare function nextTick(...args: Parameters<VueRuntime['nextTick']>): ReturnType<VueRuntime['nextTick']>;
|
|
31
|
+
export declare function normalizeClass(...args: Parameters<VueRuntime['normalizeClass']>): ReturnType<VueRuntime['normalizeClass']>;
|
|
32
|
+
export declare function normalizeProps(...args: Parameters<VueRuntime['normalizeProps']>): ReturnType<VueRuntime['normalizeProps']>;
|
|
33
|
+
export declare function normalizeStyle(...args: Parameters<VueRuntime['normalizeStyle']>): ReturnType<VueRuntime['normalizeStyle']>;
|
|
34
|
+
export declare function onActivated(...args: Parameters<VueRuntime['onActivated']>): ReturnType<VueRuntime['onActivated']>;
|
|
35
|
+
export declare function onBeforeUnmount(...args: Parameters<VueRuntime['onBeforeUnmount']>): ReturnType<VueRuntime['onBeforeUnmount']>;
|
|
36
|
+
export declare function onDeactivated(...args: Parameters<VueRuntime['onDeactivated']>): ReturnType<VueRuntime['onDeactivated']>;
|
|
37
|
+
export declare function onMounted(...args: Parameters<VueRuntime['onMounted']>): ReturnType<VueRuntime['onMounted']>;
|
|
38
|
+
export declare function onScopeDispose(...args: Parameters<VueRuntime['onScopeDispose']>): ReturnType<VueRuntime['onScopeDispose']>;
|
|
39
|
+
export declare function openBlock(...args: Parameters<VueRuntime['openBlock']>): ReturnType<VueRuntime['openBlock']>;
|
|
40
|
+
export declare function provide(...args: Parameters<VueRuntime['provide']>): ReturnType<VueRuntime['provide']>;
|
|
41
|
+
export declare function reactive(...args: Parameters<VueRuntime['reactive']>): ReturnType<VueRuntime['reactive']>;
|
|
42
|
+
export declare function readonly(...args: Parameters<VueRuntime['readonly']>): ReturnType<VueRuntime['readonly']>;
|
|
43
|
+
export declare function ref(...args: Parameters<VueRuntime['ref']>): ReturnType<VueRuntime['ref']>;
|
|
44
|
+
export declare function renderList(...args: Parameters<VueRuntime['renderList']>): ReturnType<VueRuntime['renderList']>;
|
|
45
|
+
export declare function renderSlot(...args: Parameters<VueRuntime['renderSlot']>): ReturnType<VueRuntime['renderSlot']>;
|
|
46
|
+
export declare function resolveDirective(...args: Parameters<VueRuntime['resolveDirective']>): ReturnType<VueRuntime['resolveDirective']>;
|
|
47
|
+
export declare function resolveDynamicComponent(...args: Parameters<VueRuntime['resolveDynamicComponent']>): ReturnType<VueRuntime['resolveDynamicComponent']>;
|
|
48
|
+
export declare function shallowRef(...args: Parameters<VueRuntime['shallowRef']>): ReturnType<VueRuntime['shallowRef']>;
|
|
49
|
+
export declare function toDisplayString(...args: Parameters<VueRuntime['toDisplayString']>): ReturnType<VueRuntime['toDisplayString']>;
|
|
50
|
+
export declare function toRaw(...args: Parameters<VueRuntime['toRaw']>): ReturnType<VueRuntime['toRaw']>;
|
|
51
|
+
export declare function toRef(...args: Parameters<VueRuntime['toRef']>): ReturnType<VueRuntime['toRef']>;
|
|
52
|
+
export declare function toRefs(...args: Parameters<VueRuntime['toRefs']>): ReturnType<VueRuntime['toRefs']>;
|
|
53
|
+
export declare function unref(...args: Parameters<VueRuntime['unref']>): ReturnType<VueRuntime['unref']>;
|
|
54
|
+
export declare function useAttrs(...args: Parameters<VueRuntime['useAttrs']>): ReturnType<VueRuntime['useAttrs']>;
|
|
55
|
+
export declare function useSlots(...args: Parameters<VueRuntime['useSlots']>): ReturnType<VueRuntime['useSlots']>;
|
|
56
|
+
export declare const vModelCheckbox: object;
|
|
57
|
+
export declare const vModelSelect: object;
|
|
58
|
+
export declare const vModelText: object;
|
|
59
|
+
export declare function watch(...args: Parameters<VueRuntime['watch']>): ReturnType<VueRuntime['watch']>;
|
|
60
|
+
export declare function withCtx(...args: Parameters<VueRuntime['withCtx']>): ReturnType<VueRuntime['withCtx']>;
|
|
61
|
+
export declare function withDirectives(...args: Parameters<VueRuntime['withDirectives']>): ReturnType<VueRuntime['withDirectives']>;
|
|
62
|
+
export declare function withKeys(...args: Parameters<VueRuntime['withKeys']>): ReturnType<VueRuntime['withKeys']>;
|
|
63
|
+
export declare function withModifiers(...args: Parameters<VueRuntime['withModifiers']>): ReturnType<VueRuntime['withModifiers']>;
|
|
64
|
+
export {};
|
|
@@ -13,9 +13,9 @@ type RenderReadinessDiagnostic = {
|
|
|
13
13
|
reason?: string;
|
|
14
14
|
severity?: string;
|
|
15
15
|
error?: {
|
|
16
|
-
name?:
|
|
17
|
-
message?:
|
|
18
|
-
stack?:
|
|
16
|
+
name?: unknown;
|
|
17
|
+
message?: unknown;
|
|
18
|
+
stack?: unknown;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -27,7 +27,9 @@ export declare function translateUnzipDiagnostic(record: DiagnosticRecord | null
|
|
|
27
27
|
* Translates a `V2RenderReadinessDiagnostic`-shaped object (render stage)
|
|
28
28
|
* into a public diagnostic payload, or `null` if out of scope.
|
|
29
29
|
*/
|
|
30
|
-
export declare function translateRenderReadinessDiagnostic(diag: RenderReadinessDiagnostic | null | undefined, ctx?: DiagnosticTranslationContext): SuperDocExceptionDiagnosticPayload
|
|
30
|
+
export declare function translateRenderReadinessDiagnostic(diag: RenderReadinessDiagnostic | null | undefined, ctx?: DiagnosticTranslationContext): (SuperDocExceptionDiagnosticPayload & {
|
|
31
|
+
error: Error;
|
|
32
|
+
}) | null;
|
|
31
33
|
/**
|
|
32
34
|
* Translates a boot/open failure into a public diagnostic payload, or
|
|
33
35
|
* `null` if out of scope.
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { HeaderFooterKind, HeaderFooterPageNumberAlignment, HeaderFooterPageNumbersInfo, SectionPageNumberingFormat } from '../../../../../document-api/src/index.js';
|
|
3
3
|
import { CommandExecutionResult, CommandState } from '../../../public/ui/types.js';
|
|
4
|
+
type CommandReceipt = Exclude<CommandExecutionResult, boolean>;
|
|
5
|
+
type FailedCommandReceipt = Extract<CommandReceipt, {
|
|
6
|
+
success: false;
|
|
7
|
+
}>;
|
|
8
|
+
type PageNumberCommandResult = boolean | Pick<Extract<CommandReceipt, {
|
|
9
|
+
success: true;
|
|
10
|
+
}>, 'success'> | (Pick<FailedCommandReceipt, 'success'> & {
|
|
11
|
+
failure: Pick<FailedCommandReceipt['failure'], 'code' | 'details'>;
|
|
12
|
+
});
|
|
13
|
+
type PageNumberCommandState = Pick<CommandState, 'enabled'> & Partial<CommandState>;
|
|
4
14
|
type PagePosition = 'top' | 'bottom';
|
|
5
15
|
interface PageNumberChoice {
|
|
6
16
|
position: PagePosition;
|
|
@@ -26,12 +36,12 @@ type PageNumberMenuOutcome = {
|
|
|
26
36
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
27
37
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
28
38
|
pageNumbersState: {
|
|
29
|
-
type: PropType<
|
|
39
|
+
type: PropType<PageNumberCommandState | null>;
|
|
30
40
|
default: null;
|
|
31
41
|
};
|
|
32
42
|
/** Command state of `page-number-insert` (insert at the header/footer cursor). */
|
|
33
43
|
atCursorState: {
|
|
34
|
-
type: PropType<
|
|
44
|
+
type: PropType<PageNumberCommandState | null>;
|
|
35
45
|
default: null;
|
|
36
46
|
};
|
|
37
47
|
/** Header/footer structure cannot be suggested, so numbering needs Editing. */
|
|
@@ -51,17 +61,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
51
61
|
};
|
|
52
62
|
/** Runs `page-numbers-apply` with `{ position, alignment?, showOnFirstPage?, format?, start? }`. */
|
|
53
63
|
applyPageNumbers: {
|
|
54
|
-
type: PropType<(choice: PageNumberChoice) => Promise<
|
|
64
|
+
type: PropType<(choice: PageNumberChoice) => Promise<PageNumberCommandResult>>;
|
|
55
65
|
required: true;
|
|
56
66
|
};
|
|
57
67
|
/** Runs `page-numbers-remove`. */
|
|
58
68
|
removePageNumbers: {
|
|
59
|
-
type: PropType<() => Promise<
|
|
69
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
60
70
|
required: true;
|
|
61
71
|
};
|
|
62
72
|
/** Runs `page-number-insert` at the header/footer cursor. */
|
|
63
73
|
insertAtCursor: {
|
|
64
|
-
type: PropType<() => Promise<
|
|
74
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
65
75
|
required: true;
|
|
66
76
|
};
|
|
67
77
|
/** Closes the popover after a successful action. */
|
|
@@ -71,18 +81,18 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
71
81
|
};
|
|
72
82
|
/** Last choice made in this session, used when the section has no numbers yet. */
|
|
73
83
|
initialChoice: {
|
|
74
|
-
type: PropType<RememberedChoice | null>;
|
|
84
|
+
type: PropType<Partial<RememberedChoice> | null>;
|
|
75
85
|
default: null;
|
|
76
86
|
};
|
|
77
87
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
78
88
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
79
89
|
pageNumbersState: {
|
|
80
|
-
type: PropType<
|
|
90
|
+
type: PropType<PageNumberCommandState | null>;
|
|
81
91
|
default: null;
|
|
82
92
|
};
|
|
83
93
|
/** Command state of `page-number-insert` (insert at the header/footer cursor). */
|
|
84
94
|
atCursorState: {
|
|
85
|
-
type: PropType<
|
|
95
|
+
type: PropType<PageNumberCommandState | null>;
|
|
86
96
|
default: null;
|
|
87
97
|
};
|
|
88
98
|
/** Header/footer structure cannot be suggested, so numbering needs Editing. */
|
|
@@ -102,17 +112,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
102
112
|
};
|
|
103
113
|
/** Runs `page-numbers-apply` with `{ position, alignment?, showOnFirstPage?, format?, start? }`. */
|
|
104
114
|
applyPageNumbers: {
|
|
105
|
-
type: PropType<(choice: PageNumberChoice) => Promise<
|
|
115
|
+
type: PropType<(choice: PageNumberChoice) => Promise<PageNumberCommandResult>>;
|
|
106
116
|
required: true;
|
|
107
117
|
};
|
|
108
118
|
/** Runs `page-numbers-remove`. */
|
|
109
119
|
removePageNumbers: {
|
|
110
|
-
type: PropType<() => Promise<
|
|
120
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
111
121
|
required: true;
|
|
112
122
|
};
|
|
113
123
|
/** Runs `page-number-insert` at the header/footer cursor. */
|
|
114
124
|
insertAtCursor: {
|
|
115
|
-
type: PropType<() => Promise<
|
|
125
|
+
type: PropType<() => Promise<PageNumberCommandResult>>;
|
|
116
126
|
required: true;
|
|
117
127
|
};
|
|
118
128
|
/** Closes the popover after a successful action. */
|
|
@@ -122,15 +132,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
122
132
|
};
|
|
123
133
|
/** Last choice made in this session, used when the section has no numbers yet. */
|
|
124
134
|
initialChoice: {
|
|
125
|
-
type: PropType<RememberedChoice | null>;
|
|
135
|
+
type: PropType<Partial<RememberedChoice> | null>;
|
|
126
136
|
default: null;
|
|
127
137
|
};
|
|
128
138
|
}>> & Readonly<{}>, {
|
|
129
139
|
suggesting: boolean;
|
|
130
|
-
pageNumbersState:
|
|
131
|
-
atCursorState:
|
|
140
|
+
pageNumbersState: PageNumberCommandState | null;
|
|
141
|
+
atCursorState: PageNumberCommandState | null;
|
|
132
142
|
inHeaderFooter: boolean;
|
|
133
143
|
loadCurrent: () => Promise<HeaderFooterPageNumbersInfo | null>;
|
|
134
|
-
initialChoice: RememberedChoice | null;
|
|
144
|
+
initialChoice: Partial<RememberedChoice> | null;
|
|
135
145
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
136
146
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DocumentFontOption, FontFamilyOption } from '../../../../../shared/font-system/src/index.js';
|
|
2
2
|
import { ToolbarFontOption } from '../../../core/types/index.js';
|
|
3
3
|
export declare const TOOLBAR_FONTS: ToolbarFontOption[];
|
|
4
|
-
|
|
4
|
+
type ToolbarDocumentFontOption = Pick<DocumentFontOption, 'logicalFamily' | 'previewFamily'>;
|
|
5
|
+
export declare function composeToolbarFontOptions(documentOptions: readonly ToolbarDocumentFontOption[] | null | undefined, configFonts?: readonly ToolbarFontOption[]): readonly ToolbarFontOption[] | undefined;
|
|
5
6
|
export declare function mapFontFamilyOptionsToToolbar(options: readonly FontFamilyOption[] | null | undefined): ToolbarFontOption[] | undefined;
|
|
6
7
|
export declare const TOOLBAR_FONT_SIZES: {
|
|
7
8
|
label: string;
|
|
@@ -16,3 +17,4 @@ export declare const RESPONSIVE_BREAKPOINTS: {
|
|
|
16
17
|
lg: number;
|
|
17
18
|
xl: number;
|
|
18
19
|
};
|
|
20
|
+
export {};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { ToolbarFontOption } from '../../../core/types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Normalize a font dropdown option so each row renders in its own typeface.
|
|
4
|
+
*
|
|
5
|
+
* Consumers can pass a minimal `{ label, key }` shape. The toolbar dropdown
|
|
6
|
+
* spreads `option.props` onto each rendered `<li>`, so without an inline
|
|
7
|
+
* `style.fontFamily` every row inherits the toolbar's UI font and the
|
|
8
|
+
* dropdown loses its visual font preview. This fills that in from
|
|
9
|
+
* `props.style.fontFamily` → `label` → `key` and keeps the existing
|
|
10
|
+
* `data-item` hook that e2e selectors rely on.
|
|
11
|
+
*
|
|
12
|
+
* Idempotent: if `props.style.fontFamily` and `data-item` are already set,
|
|
13
|
+
* the option is returned with those values preserved.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeFontOption: <T extends ToolbarFontOption>(option: T) => T;
|