superdoc 2.28.0-next.9 → 2.29.0-next.1
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-8V8AjgR4.cjs → FindReplaceSurface-BRs3JrCq.cjs} +1 -1
- package/dist/chunks/{FindReplaceSurface-RUiTFDt3.es.js → FindReplaceSurface-Dm043CZP.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-B5DHV6qr.cjs → PasswordPromptSurface-BpqP4pUa.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BDpxqdzp.es.js → PasswordPromptSurface-DGjmN7A-.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DjdsIh6n.es.js → PdfViewer-D4lVeOJu.es.js} +4 -3
- package/dist/chunks/{PdfViewer-omriDChK.cjs → PdfViewer-boENOZdF.cjs} +4 -3
- package/dist/chunks/{_plugin-vue_export-helper-BUdjGKyl.cjs → _plugin-vue_export-helper-6MBoygIY.cjs} +9 -0
- package/dist/chunks/{_plugin-vue_export-helper-7ZiLY07t.es.js → _plugin-vue_export-helper-CsJQtMvr.es.js} +4 -1
- package/dist/chunks/{create-super-doc-ui-B4c55pFy.cjs → create-super-doc-ui-0OA8hCNb.cjs} +390 -44
- package/dist/chunks/{create-super-doc-ui-C4Ka5Ph3.es.js → create-super-doc-ui-Duf65d0b.es.js} +357 -41
- package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
- package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
- 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 +3 -3
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- package/dist/document-api/src/index.d.ts +1 -1
- package/dist/document-api/src/lists/lists.d.ts +79 -79
- package/dist/document-api/src/lists/lists.types.d.ts +1 -0
- package/dist/document-api/src/sections/sections.types.d.ts +5 -1
- package/dist/document-api/src/types/clipboard.d.ts +5 -1
- package/dist/document-api/src/types/receipt.d.ts +2 -1
- package/dist/document-api/src/write/write.d.ts +10 -9
- package/dist/layout-engine/contracts/src/index.d.ts +5 -1
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/index.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/place-inline-drawings.d.ts +9 -0
- package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +2 -1
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
- package/dist/layout-engine/style-engine/src/ooxml/index.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 +3 -2
- package/dist/public/ui.es.js +3 -2
- package/dist/shared/font-system/src/resolver.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +5 -3
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +1670 -24
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +2 -2
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +2 -2
- package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +24 -0
- package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +4 -0
- package/dist/superdoc/src/components/general/Avatar.vue.d.ts +7 -0
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
- package/dist/superdoc/src/composables/use-high-contrast-mode.d.ts +8 -4
- package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
- package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +10 -0
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +0 -5
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -0
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -1
- package/dist/superdoc/src/core/create-app.d.ts +2 -6
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -0
- package/dist/superdoc/src/core/types/index.d.ts +10 -4
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +1 -0
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +104 -84
- package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +2 -0
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +2 -2
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +82 -11
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +122 -33
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -48
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +0 -1
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -1
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +16 -0
- package/dist/superdoc/src/public/ui/types.d.ts +39 -1
- package/dist/superdoc/src/public/ui.d.cts +12 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +158 -125
- package/dist/superdoc/src/stores/superdoc-store.d.ts +475 -376
- package/dist/superdoc.cjs +561 -1843
- package/dist/superdoc.es.js +766 -13144
- 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 +4 -3
- package/dist/superdoc/src/core/collaboration/collaboration.d.ts +0 -18
- package/dist/superdoc/src/helpers/group-changes.d.ts +0 -1
- package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
2
|
$emit: (event: "reject" | "resolve" | "reopen" | "overflow-select", ...args: any[]) => void;
|
|
3
3
|
config: Record<string, any>;
|
|
4
|
-
isPendingInput: boolean;
|
|
5
4
|
isActive: boolean;
|
|
5
|
+
isPendingInput: boolean;
|
|
6
6
|
resolveDisabledReason: string;
|
|
7
7
|
rejectDisabledReason: string;
|
|
8
8
|
reopenDisabledReason: string;
|
|
@@ -12,8 +12,8 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
12
12
|
timestamp?: number | undefined;
|
|
13
13
|
$props: {
|
|
14
14
|
readonly config?: Record<string, any> | undefined;
|
|
15
|
-
readonly isPendingInput?: boolean | undefined;
|
|
16
15
|
readonly isActive?: boolean | undefined;
|
|
16
|
+
readonly isPendingInput?: boolean | undefined;
|
|
17
17
|
readonly resolveDisabledReason?: string | undefined;
|
|
18
18
|
readonly rejectDisabledReason?: string | undefined;
|
|
19
19
|
readonly reopenDisabledReason?: string | undefined;
|
|
@@ -2,14 +2,14 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
2
2
|
focus: (options: any) => void;
|
|
3
3
|
$emit: (event: "focus", ...args: any[]) => void;
|
|
4
4
|
config: Record<string, any>;
|
|
5
|
-
users: unknown[];
|
|
6
5
|
isFocused: boolean;
|
|
6
|
+
users: unknown[];
|
|
7
7
|
includeHeader: boolean;
|
|
8
8
|
comment?: Record<string, any> | undefined;
|
|
9
9
|
$props: {
|
|
10
10
|
readonly config?: Record<string, any> | undefined;
|
|
11
|
-
readonly users?: unknown[] | undefined;
|
|
12
11
|
readonly isFocused?: boolean | undefined;
|
|
12
|
+
readonly users?: unknown[] | undefined;
|
|
13
13
|
readonly includeHeader?: boolean | undefined;
|
|
14
14
|
readonly comment?: Record<string, any> | undefined;
|
|
15
15
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Document as SuperDocDocument } from '../../core/types/index.js';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
currentDocument: {
|
|
5
|
+
type: PropType<SuperDocDocument>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
parent: {
|
|
9
|
+
type: PropType<HTMLElement>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
currentDocument: {
|
|
14
|
+
type: PropType<SuperDocDocument>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
parent: {
|
|
18
|
+
type: PropType<HTMLElement>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
22
|
+
floatingCommentsContainer: HTMLDivElement;
|
|
23
|
+
}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
$emit: (event: "anchor-activate", ...args: any[]) => void;
|
|
3
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
+
user: Record<string, any>;
|
|
3
|
+
$props: {
|
|
4
|
+
readonly user?: Record<string, any> | undefined;
|
|
5
|
+
};
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ActiveSurface } from '../../core/surface-manager.js';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
surface: {
|
|
5
|
+
type: PropType<ActiveSurface>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
scrollLockTarget: {
|
|
9
|
+
type: PropType<HTMLElement | null>;
|
|
10
|
+
default: null;
|
|
11
|
+
};
|
|
12
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
close: (...args: any[]) => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
15
|
+
surface: {
|
|
16
|
+
type: PropType<ActiveSurface>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
scrollLockTarget: {
|
|
20
|
+
type: PropType<HTMLElement | null>;
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
}>> & Readonly<{
|
|
24
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
scrollLockTarget: HTMLElement | null;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
10
28
|
dialogRef: HTMLDivElement;
|
|
11
29
|
}, HTMLDivElement>;
|
|
12
30
|
export default _default;
|
|
@@ -1,19 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { DirectSurfaceRequest, ExternalSurfaceRenderContext, SurfaceMode, SurfaceRequest } from '../../core/types/index.js';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
surfaceId: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
mode: {
|
|
9
|
+
type: PropType<SurfaceMode>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
request: {
|
|
13
|
+
type: PropType<SurfaceRequest>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
render: {
|
|
17
|
+
type: PropType<NonNullable<DirectSurfaceRequest["render"]>>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
resolve: {
|
|
21
|
+
type: PropType<ExternalSurfaceRenderContext["resolve"]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
close: {
|
|
25
|
+
type: PropType<ExternalSurfaceRenderContext["close"]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
29
|
+
surfaceId: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
mode: {
|
|
34
|
+
type: PropType<SurfaceMode>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
request: {
|
|
38
|
+
type: PropType<SurfaceRequest>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
render: {
|
|
42
|
+
type: PropType<NonNullable<DirectSurfaceRequest["render"]>>;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
resolve: {
|
|
46
|
+
type: PropType<ExternalSurfaceRenderContext["resolve"]>;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
close: {
|
|
50
|
+
type: PropType<ExternalSurfaceRenderContext["close"]>;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
17
54
|
container: HTMLDivElement;
|
|
18
55
|
}, HTMLDivElement>;
|
|
19
56
|
export default _default;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
export interface HighContrastMode {
|
|
3
|
+
isHighContrastMode: Readonly<Ref<boolean>>;
|
|
4
|
+
setHighContrastMode: (value: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const HIGH_CONTRAST_MODE_KEY: InjectionKey<HighContrastMode>;
|
|
7
|
+
export declare function createHighContrastMode(): HighContrastMode;
|
|
8
|
+
export declare function useHighContrastMode(): HighContrastMode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SurfaceManager } from '../core/surface-manager.js';
|
|
2
2
|
import { DocumentMode, Editor, HyperlinkActivationHandler, LinkPopoverResolver } from '../core/types/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { BorrowedSuperDocUI } from '../public/ui/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The `v2-link-click` payload the shell relays from the v2 host's
|
|
6
6
|
* `onLinkClick` callback.
|
|
@@ -17,9 +17,9 @@ interface LinkClickPayload {
|
|
|
17
17
|
editableText?: boolean;
|
|
18
18
|
}
|
|
19
19
|
interface UseLinkPopoverOptions {
|
|
20
|
-
getSurfaceManager: () => SurfaceManager | null | undefined;
|
|
20
|
+
getSurfaceManager: () => Pick<SurfaceManager, 'open'> | null | undefined;
|
|
21
21
|
getActiveEditor: () => Editor | null | undefined;
|
|
22
|
-
getUi: () =>
|
|
22
|
+
getUi: () => BorrowedSuperDocUI | null | undefined;
|
|
23
23
|
getActivationHandler: () => HyperlinkActivationHandler | LinkPopoverResolver | null | undefined;
|
|
24
24
|
getActivationHandlerSource?: () => 'hyperlinks.onActivate' | 'compatibility' | null | undefined;
|
|
25
25
|
getBuiltInEditorDisabled?: () => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import { SuperDoc } from '../core/SuperDoc.js';
|
|
3
|
+
export type SuperDocComponentProxy = ComponentPublicInstance & {
|
|
4
|
+
$superdoc: SuperDoc;
|
|
5
|
+
};
|
|
6
|
+
export interface SuperDocInstanceAccess {
|
|
7
|
+
proxy: SuperDocComponentProxy;
|
|
8
|
+
superdoc: SuperDoc;
|
|
9
|
+
}
|
|
10
|
+
export declare function useSuperDocInstance(): SuperDocInstanceAccess;
|
|
@@ -206,10 +206,6 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
206
206
|
* @private
|
|
207
207
|
*/
|
|
208
208
|
private commentsStore;
|
|
209
|
-
/**
|
|
210
|
-
* @private
|
|
211
|
-
*/
|
|
212
|
-
private highContrastModeStore;
|
|
213
209
|
/**
|
|
214
210
|
* Internal mount handle for the `SuperComments` Vue component, created
|
|
215
211
|
* lazily by `addCommentsList()` and torn down by `removeCommentsList()`.
|
|
@@ -238,7 +234,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
238
234
|
* internal source compilation.
|
|
239
235
|
*
|
|
240
236
|
* Same SD-3213f-style TS surface hide as
|
|
241
|
-
* `superdocStore` / `commentsStore` /
|
|
237
|
+
* `superdocStore` / `commentsStore` /
|
|
242
238
|
* `commentsList`; not runtime privacy.
|
|
243
239
|
*
|
|
244
240
|
* @private
|
|
@@ -696,7 +692,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
696
692
|
* @deprecated replaceWith=`await superdoc.activeEditor.doc.getHtml({})` removeIn=v3.0
|
|
697
693
|
* @param _options Ignored.
|
|
698
694
|
*/
|
|
699
|
-
getHTML(_options?: Parameters<Editor['getHTML']
|
|
695
|
+
getHTML(_options?: Parameters<NonNullable<Editor['getHTML']>>[0]): unknown[];
|
|
700
696
|
/**
|
|
701
697
|
* Lock the current superdoc and emit the `locked` event.
|
|
702
698
|
*
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
export function loadCommentsFromYdoc(superdoc: Object): boolean;
|
|
2
2
|
export function initCollaborationComments(superdoc: Object): void;
|
|
3
|
-
export function initSuperdocYdoc(superdoc: Object): {
|
|
4
|
-
ydoc: import('yjs').Doc;
|
|
5
|
-
provider: import('../types/index.js').CollaborationProvider;
|
|
6
|
-
} | undefined;
|
|
7
|
-
export function makeDocumentsCollaborative(superdoc: Object): any;
|
|
8
3
|
export function syncCommentsToClients(superdoc: Object, event: Object): void;
|
|
@@ -11,6 +11,7 @@ export const PERMISSIONS: Readonly<{
|
|
|
11
11
|
VERSION_HISTORY: "VERSION_HISTORY";
|
|
12
12
|
}>;
|
|
13
13
|
export function createTrackedChangePermissionResolver(superdoc: any): (payload?: {}) => any;
|
|
14
|
+
export function readBuiltInTrackedChangePermissionDecision(superdoc: any, canPerform: any, permission: any, trackedChange: any): any;
|
|
14
15
|
export function isAllowed(permission: string, role: string, isInternal: boolean, context?: {
|
|
15
16
|
comment?: object | null | undefined;
|
|
16
17
|
superdoc?: object | null | undefined;
|
|
@@ -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
|
-
export type V2CollaborationUnsupportedReason = 'missing-target' | 'invalid-document-id' | 'invalid-server-url' | 'invalid-room-mode' | 'invalid-auth-endpoint' | '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';
|
|
24
|
+
export 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
|
*
|
|
@@ -45,6 +45,7 @@ export interface NormalizedV2CollaborationTarget {
|
|
|
45
45
|
publicApiKey?: string;
|
|
46
46
|
/** Liveblocks server-side auth endpoint mode. */
|
|
47
47
|
authEndpoint?: string;
|
|
48
|
+
baseUrl?: string;
|
|
48
49
|
/** Adapter registration key for a customer collaboration Worker. */
|
|
49
50
|
adapterId?: string;
|
|
50
51
|
/** Structured-clone-safe options interpreted by the registered adapter. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSuperdocStore } from '../stores/superdoc-store.js';
|
|
2
2
|
import { useCommentsStore } from '../stores/comments-store.js';
|
|
3
|
-
|
|
4
|
-
export function createSuperdocVueApp({ disablePiniaDevtools }?: {
|
|
3
|
+
export function createSuperdocVueApp({ disablePiniaDevtools, highContrastMode }: {
|
|
5
4
|
disablePiniaDevtools?: boolean | undefined;
|
|
5
|
+
highContrastMode: import('../composables/use-high-contrast-mode.js').HighContrastMode;
|
|
6
6
|
}): SuperdocVueAppRefs;
|
|
7
7
|
/**
|
|
8
8
|
* Result of `createSuperdocVueApp()`. Internal-only: the shape is consumed
|
|
@@ -25,8 +25,4 @@ export type SuperdocVueAppRefs = {
|
|
|
25
25
|
* The Comments Pinia store
|
|
26
26
|
*/
|
|
27
27
|
commentsStore: ReturnType<typeof useCommentsStore>;
|
|
28
|
-
/**
|
|
29
|
-
* The high-contrast mode composable refs (`isHighContrastMode`, `setHighContrastMode`). Named `*Store` for historical reasons; this is a plain Vue composable, not a Pinia store.
|
|
30
|
-
*/
|
|
31
|
-
highContrastModeStore: ReturnType<typeof useHighContrastMode>;
|
|
32
28
|
};
|
|
@@ -140,6 +140,8 @@ export type EditorRuntimeRejectionCode = 'runtime-not-ready' | 'host-saving' | '
|
|
|
140
140
|
* must not inspect these to invalidate document state.
|
|
141
141
|
*/
|
|
142
142
|
export type EditorRuntimeCommandResult = {
|
|
143
|
+
status: 'selected';
|
|
144
|
+
} | {
|
|
143
145
|
status: 'committed';
|
|
144
146
|
receipt?: unknown;
|
|
145
147
|
} | {
|
|
@@ -500,7 +500,12 @@ export interface Editor {
|
|
|
500
500
|
setHighContrastMode?: (isHighContrast: boolean) => unknown;
|
|
501
501
|
on?: (...args: unknown[]) => unknown;
|
|
502
502
|
off?: (...args: unknown[]) => unknown;
|
|
503
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Not implemented by the superdoc@2 active editor; guard before calling.
|
|
505
|
+
*
|
|
506
|
+
* @deprecated replaceWith=`await editor.doc.getHtml({})` removeIn=v3.0
|
|
507
|
+
*/
|
|
508
|
+
getHTML?: (options?: Record<string, unknown>) => unknown;
|
|
504
509
|
getDocumentId?: () => string | null | undefined;
|
|
505
510
|
/**
|
|
506
511
|
* Narrow v2 extension facet for command execution and diagnostics, backed by
|
|
@@ -651,6 +656,7 @@ export interface V2LiveblocksCollaborationConfig {
|
|
|
651
656
|
* page; non-browser SDK/CLI callers must use an absolute HTTP(S) URL.
|
|
652
657
|
*/
|
|
653
658
|
authEndpoint?: string;
|
|
659
|
+
baseUrl?: string;
|
|
654
660
|
/** Maximum initial synchronization wait in milliseconds. Defaults to 30,000. */
|
|
655
661
|
syncTimeoutMs?: number;
|
|
656
662
|
/** Explicit room operation. Defaults to `'join'`; `'create'` never joins an existing room. */
|
|
@@ -2996,9 +3002,9 @@ export interface SuperDocTrackedChangesBulkDecisionPayload {
|
|
|
2996
3002
|
* the editor it is bound to and ignore anything else.
|
|
2997
3003
|
*
|
|
2998
3004
|
* Typed `unknown` rather than `Editor`: the active editor can be a v2 facade
|
|
2999
|
-
*
|
|
3000
|
-
*
|
|
3001
|
-
*
|
|
3005
|
+
* whose runtime shape does not match `Editor`, so annotating it as `Editor`
|
|
3006
|
+
* would promise members it does not have. It is an identity token to compare,
|
|
3007
|
+
* not an object to call.
|
|
3002
3008
|
*/
|
|
3003
3009
|
export interface SuperDocDocumentReplacedPayload {
|
|
3004
3010
|
editor: unknown;
|
|
@@ -32,6 +32,7 @@ export function onScopeDispose(...args: any[]): any;
|
|
|
32
32
|
export function openBlock(...args: any[]): any;
|
|
33
33
|
export function provide(...args: any[]): any;
|
|
34
34
|
export function reactive(...args: any[]): any;
|
|
35
|
+
export function readonly(...args: any[]): any;
|
|
35
36
|
export function ref(...args: any[]): any;
|
|
36
37
|
export function renderList(...args: any[]): any;
|
|
37
38
|
export function renderSlot(...args: any[]): any;
|
|
@@ -1,86 +1,106 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
import { isSyntheticTrackedChangeCommentLaneItem } from '../../helpers/tracked-change-comment-lane.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
3
|
+
export interface V2GeometryPublishOptions {
|
|
4
|
+
retainMissingTrackedChangeGeometry?: boolean;
|
|
5
|
+
retainedTrackedChangeIds?: Iterable<string>;
|
|
6
|
+
reason?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface V2GeometryPayload {
|
|
9
|
+
mountContainer: HTMLElement | null;
|
|
10
|
+
epoch?: number | null;
|
|
11
|
+
host?: unknown;
|
|
12
|
+
mount?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export type V2CommittedPageWindow = Readonly<Record<string, unknown>>;
|
|
15
|
+
export interface V2GeometryPublisherOptions {
|
|
16
|
+
getLayersContainer: () => HTMLElement | null;
|
|
17
|
+
isCommentsEnabled: () => boolean;
|
|
18
|
+
publishPositions: (positions: Record<string, unknown>, options?: V2GeometryPublishOptions) => void;
|
|
19
|
+
clearPositions: () => void;
|
|
20
|
+
readCurrentPositions?: () => Record<string, unknown>;
|
|
21
|
+
setGeometryAvailable?: (value: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface V2GeometryPublisher {
|
|
24
|
+
publish(payload: V2GeometryPayload | null, options?: V2GeometryPublishOptions): Promise<void> | void;
|
|
25
|
+
recollect(options?: V2GeometryPublishOptions): Promise<void> | void;
|
|
26
|
+
noteCommittedPageWindow?(window: V2CommittedPageWindow | null | undefined): void;
|
|
27
|
+
reset(): void;
|
|
28
|
+
getLastEpoch(): number | null;
|
|
29
|
+
getLastPayload(): V2GeometryPayload | null;
|
|
30
|
+
}
|
|
31
|
+
export interface V2ReviewWindowContext {
|
|
32
|
+
superdoc: unknown;
|
|
33
|
+
documentId: string;
|
|
34
|
+
commentsAdapter: unknown;
|
|
35
|
+
trackedChangesAdapter: unknown;
|
|
36
|
+
resolveReviewWindow: (input: unknown) => unknown;
|
|
37
|
+
moveFragmentWordIds: (ids: readonly string[]) => unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface V2ReviewWindowResult {
|
|
40
|
+
comments?: {
|
|
41
|
+
items?: readonly unknown[];
|
|
42
|
+
requestedIds?: readonly string[];
|
|
43
|
+
unresolvedCommentIds?: readonly string[];
|
|
44
|
+
};
|
|
45
|
+
trackedChanges?: {
|
|
46
|
+
items?: readonly unknown[];
|
|
47
|
+
requestedIds?: readonly string[];
|
|
48
|
+
unresolvedTargets?: readonly unknown[];
|
|
49
|
+
};
|
|
50
|
+
preparedReview?: unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface V2ReviewWindowControllerOptions {
|
|
53
|
+
applyReviewWindow?: ((context: V2ReviewWindowContext, result: V2ReviewWindowResult) => unknown) | null;
|
|
54
|
+
}
|
|
55
|
+
export interface V2ReviewMutationSettlement {
|
|
56
|
+
outcome: 'aborted' | 'rejected' | 'committed';
|
|
57
|
+
allResolved?: boolean;
|
|
58
|
+
resumeDomains?: readonly ('comments' | 'trackedChanges')[];
|
|
59
|
+
trackedRowCount?: number | null;
|
|
60
|
+
}
|
|
61
|
+
export interface V2ReviewWindowSnapshot {
|
|
62
|
+
readonly status: 'pending' | 'ready' | 'stale';
|
|
63
|
+
readonly [field: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
export interface V2ReviewWindowDiagnostics {
|
|
66
|
+
generation: number;
|
|
67
|
+
reviewEpoch: number;
|
|
68
|
+
hasContext: boolean;
|
|
69
|
+
inFlight: boolean;
|
|
70
|
+
queued: boolean;
|
|
71
|
+
mutationPaused: boolean;
|
|
72
|
+
records: readonly Record<string, unknown>[];
|
|
73
|
+
}
|
|
74
|
+
export interface V2ReviewWindowController {
|
|
75
|
+
setContext(context: V2ReviewWindowContext | null): void;
|
|
76
|
+
onCommittedPagePaint?(commit: V2CommittedPageWindow): void;
|
|
77
|
+
refreshCommittedWindow(reason?: string): void;
|
|
78
|
+
invalidate(reason?: string): void;
|
|
79
|
+
beginMutation(fact: string | {
|
|
80
|
+
token?: string;
|
|
81
|
+
} | null | undefined): void;
|
|
82
|
+
settleMutation(token: string | undefined, settlement?: V2ReviewMutationSettlement): void;
|
|
83
|
+
reset(reason?: string): void;
|
|
84
|
+
getSnapshot?(): V2ReviewWindowSnapshot | null;
|
|
85
|
+
subscribe?(listener: (snapshot: V2ReviewWindowSnapshot) => void): () => void;
|
|
86
|
+
getDiagnostics(): V2ReviewWindowDiagnostics | null;
|
|
87
|
+
}
|
|
88
|
+
export interface SuperDocV2Integration {
|
|
57
89
|
version: number;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* Factory for the committed V2 review-window controller.
|
|
76
|
-
*/
|
|
77
|
-
createReviewWindowController?: ((...args: unknown[]) => unknown) | undefined;
|
|
78
|
-
/**
|
|
79
|
-
* Predicate for synthetic tracked-change comment-lane items.
|
|
80
|
-
*/
|
|
81
|
-
isSyntheticTrackedChangeCommentLaneItem?: ((value: unknown) => boolean) | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Predicate for synthesized V2 tracked-change rows.
|
|
84
|
-
*/
|
|
85
|
-
isV2SyntheticTrackedChangeRow?: ((value: unknown) => boolean) | undefined;
|
|
86
|
-
};
|
|
90
|
+
capabilities: unknown;
|
|
91
|
+
EditorComponent: Component;
|
|
92
|
+
RulerComponent: Component | null;
|
|
93
|
+
createGeometryPublisher: (options: V2GeometryPublisherOptions) => V2GeometryPublisher;
|
|
94
|
+
createReviewWindowController: (options: V2ReviewWindowControllerOptions) => V2ReviewWindowController;
|
|
95
|
+
isSyntheticTrackedChangeCommentLaneItem: (value: unknown) => boolean;
|
|
96
|
+
isV2SyntheticTrackedChangeRow: (value: unknown) => boolean;
|
|
97
|
+
}
|
|
98
|
+
export declare function configureDefaultV2IntegrationLoader(loader: () => Promise<unknown>): void;
|
|
99
|
+
export declare function loadDefaultV2Integration(): Promise<void>;
|
|
100
|
+
export declare function loadDefaultV2IntegrationOrFallback(): Promise<void>;
|
|
101
|
+
export declare const SUPERDOC_V2_INTEGRATION_VERSION = 1;
|
|
102
|
+
export { isSyntheticTrackedChangeCommentLaneItem };
|
|
103
|
+
export declare function isV2SyntheticTrackedChangeRow(row: unknown): boolean;
|
|
104
|
+
export declare function createStubV2Integration(): SuperDocV2Integration;
|
|
105
|
+
export declare function createDefaultV2Integration(): SuperDocV2Integration;
|
|
106
|
+
export declare function hasRealV2Integration(integration: SuperDocV2Integration | null | undefined): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isFiniteNumber(value: unknown): value is number;
|
|
@@ -26,6 +26,8 @@ type CommentInvalidationInput = {
|
|
|
26
26
|
superdoc?: SuperDoc | null;
|
|
27
27
|
documentId?: string | null;
|
|
28
28
|
};
|
|
29
|
+
export declare function mutationCommittedEventChangedVisibleContent(event: Record<string, unknown>): boolean;
|
|
30
|
+
export declare function mutationCommittedEventChangedDocument(event: Record<string, unknown>): boolean;
|
|
29
31
|
/**
|
|
30
32
|
* Classify the tracked-change identities carried by a v2 mutation event.
|
|
31
33
|
*
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* event only fires on success, fires AFTER the diagnostics events on the
|
|
13
13
|
* success path, and never fires at all for a failed attempt.
|
|
14
14
|
*
|
|
15
|
-
* @param {{generation?: unknown}} [payload]
|
|
15
|
+
* @param {{generation?: unknown} | null} [payload]
|
|
16
16
|
* @returns {number}
|
|
17
17
|
*/
|
|
18
18
|
export function getV2DiagnosticGeneration(payload?: {
|
|
19
19
|
generation?: unknown;
|
|
20
|
-
}): number;
|
|
20
|
+
} | null): number;
|
|
21
21
|
/**
|
|
22
22
|
* Creates a dedupe tracker for diagnostic emissions, scoped by documentId
|
|
23
23
|
* and generation. The key is `internalCode` only (per active generation) --
|
|
@@ -12,6 +12,11 @@ type RenderReadinessDiagnostic = {
|
|
|
12
12
|
code?: string;
|
|
13
13
|
reason?: string;
|
|
14
14
|
severity?: string;
|
|
15
|
+
error?: {
|
|
16
|
+
name?: string;
|
|
17
|
+
message?: string;
|
|
18
|
+
stack?: string;
|
|
19
|
+
};
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* Translates a `SDDiagnosticRecord`-shaped object (package-open / unzip
|