superdoc 2.12.1-next.3 → 2.13.0-next.10
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/{create-super-doc-ui-BWWWNPP8.cjs → create-super-doc-ui-mHK2pqj3.cjs} +3 -1
- package/dist/chunks/{create-super-doc-ui-FnwgTkUv.es.js → create-super-doc-ui-u1giSvlm.es.js} +3 -1
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/blocks/blocks.d.ts +3 -1
- package/dist/document-api/src/blocks/find-text.d.ts +3 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -1
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +11 -1
- package/dist/document-api/src/contract/operation-registry.d.ts +7 -2
- package/dist/document-api/src/index.d.ts +7 -6
- package/dist/document-api/src/invoke/invoke.d.ts +2 -1
- package/dist/document-api/src/types/blocks.types.d.ts +38 -0
- package/dist/document-api/src/types/mutation-plan.types.d.ts +28 -4
- package/dist/document-api/src/types/table-operations.types.d.ts +2 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +3 -2
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +1 -0
- package/dist/public/collaboration-worker.cjs +9 -0
- package/dist/public/collaboration-worker.es.js +8 -0
- 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 +26 -26
- package/dist/style.layered.css +26 -26
- package/dist/superdoc/src/core/collaboration/collaboration-exception.d.ts +2 -0
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +16 -5
- package/dist/superdoc/src/core/types/index.d.ts +58 -41
- package/dist/superdoc/src/public/collaboration-worker.d.cts +18 -0
- package/dist/superdoc/src/public/collaboration-worker.d.ts +48 -0
- package/dist/superdoc/src/public/index.d.cts +4 -0
- package/dist/superdoc/src/public/index.d.ts +2 -0
- package/dist/superdoc.cjs +350 -238
- package/dist/superdoc.es.js +350 -238
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +35 -35
- package/package.json +13 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Doc as YDoc } from 'yjs';
|
|
2
|
+
export type SuperDocCollaborationProviderFamily = 'y-websocket' | 'hocuspocus' | 'liveblocks';
|
|
3
|
+
export interface SuperDocCollaborationProviderAwareness {
|
|
4
|
+
getLocalState(): Record<string, unknown> | null;
|
|
5
|
+
setLocalState(state: Record<string, unknown> | null): void;
|
|
6
|
+
getStates(): Map<number, Record<string, unknown>>;
|
|
7
|
+
on(event: 'change' | 'update', listener: (payload: {
|
|
8
|
+
added: number[];
|
|
9
|
+
updated: number[];
|
|
10
|
+
removed: number[];
|
|
11
|
+
}) => void): void;
|
|
12
|
+
off(event: 'change' | 'update', listener: (payload: {
|
|
13
|
+
added: number[];
|
|
14
|
+
updated: number[];
|
|
15
|
+
removed: number[];
|
|
16
|
+
}) => void): void;
|
|
17
|
+
}
|
|
18
|
+
export interface SuperDocCollaborationProviderAttachInput {
|
|
19
|
+
readonly rootId: string;
|
|
20
|
+
readonly ydoc: YDoc;
|
|
21
|
+
readonly providerRoomName: string;
|
|
22
|
+
onSynced(): void;
|
|
23
|
+
onDegraded(): void;
|
|
24
|
+
onFailed(detail: Record<string, unknown>): void;
|
|
25
|
+
onStateless(message: string): void;
|
|
26
|
+
}
|
|
27
|
+
export interface SuperDocCollaborationProviderTransport {
|
|
28
|
+
readonly awareness?: SuperDocCollaborationProviderAwareness | null;
|
|
29
|
+
disconnect(): void;
|
|
30
|
+
destroy(): void;
|
|
31
|
+
sendStateless?(message: string): Promise<void> | void;
|
|
32
|
+
}
|
|
33
|
+
export interface SuperDocCollaborationProviderAdapter {
|
|
34
|
+
readonly providerFamily: SuperDocCollaborationProviderFamily;
|
|
35
|
+
attach(input: SuperDocCollaborationProviderAttachInput): SuperDocCollaborationProviderTransport;
|
|
36
|
+
destroy?(): void;
|
|
37
|
+
}
|
|
38
|
+
export interface SuperDocCollaborationProviderFactoryInput {
|
|
39
|
+
readonly documentId: string;
|
|
40
|
+
readonly providerOptions: unknown;
|
|
41
|
+
readonly token: string | (() => Promise<string>) | null;
|
|
42
|
+
}
|
|
43
|
+
export type SuperDocCollaborationProviderFactory = (input: SuperDocCollaborationProviderFactoryInput) => SuperDocCollaborationProviderAdapter;
|
|
44
|
+
export interface SuperDocCollaborationWorkerOptions {
|
|
45
|
+
readonly providerAdapters: Readonly<Record<string, SuperDocCollaborationProviderFactory>>;
|
|
46
|
+
}
|
|
47
|
+
/** Register provider adapters and start the worker used by `workerUrls.collaboration`. */
|
|
48
|
+
export declare function bootstrapSuperDocCollaborationWorker(options: SuperDocCollaborationWorkerOptions): void;
|
|
@@ -38,6 +38,7 @@ import type { DirectSurfaceRequest as __Cjs_DirectSurfaceRequest } from './index
|
|
|
38
38
|
import type { DocRange as __Cjs_DocRange } from './index.js' with { "resolution-mode": "import" };
|
|
39
39
|
import type { Document as __Cjs_Document } from './index.js' with { "resolution-mode": "import" };
|
|
40
40
|
import type { DocumentApi as __Cjs_DocumentApi } from './index.js' with { "resolution-mode": "import" };
|
|
41
|
+
import type { DocumentCollaborationConfig as __Cjs_DocumentCollaborationConfig } from './index.js' with { "resolution-mode": "import" };
|
|
41
42
|
import type { DocumentDataSource as __Cjs_DocumentDataSource } from './index.js' with { "resolution-mode": "import" };
|
|
42
43
|
import type { DocumentMode as __Cjs_DocumentMode } from './index.js' with { "resolution-mode": "import" };
|
|
43
44
|
import type { DocumentProtectionState as __Cjs_DocumentProtectionState } from './index.js' with { "resolution-mode": "import" };
|
|
@@ -131,6 +132,7 @@ import type { SuperDocDiagnosticStage as __Cjs_SuperDocDiagnosticStage } from '.
|
|
|
131
132
|
import type { SuperDocDisposableBag as __Cjs_SuperDocDisposableBag } from './index.js' with { "resolution-mode": "import" };
|
|
132
133
|
import type { SuperDocDocumentModeChangePayload as __Cjs_SuperDocDocumentModeChangePayload } from './index.js' with { "resolution-mode": "import" };
|
|
133
134
|
import type { SuperDocEditorPayload as __Cjs_SuperDocEditorPayload } from './index.js' with { "resolution-mode": "import" };
|
|
135
|
+
import type { SuperDocExceptionCollaborationPayload as __Cjs_SuperDocExceptionCollaborationPayload } from './index.js' with { "resolution-mode": "import" };
|
|
134
136
|
import type { SuperDocExceptionDiagnosticPayload as __Cjs_SuperDocExceptionDiagnosticPayload } from './index.js' with { "resolution-mode": "import" };
|
|
135
137
|
import type { SuperDocExceptionEditorPayload as __Cjs_SuperDocExceptionEditorPayload } from './index.js' with { "resolution-mode": "import" };
|
|
136
138
|
import type { SuperDocExceptionHyperlinkPayload as __Cjs_SuperDocExceptionHyperlinkPayload } from './index.js' with { "resolution-mode": "import" };
|
|
@@ -298,6 +300,7 @@ export type { __Cjs_DirectSurfaceRequest as DirectSurfaceRequest };
|
|
|
298
300
|
export type { __Cjs_DocRange as DocRange };
|
|
299
301
|
export type { __Cjs_Document as Document };
|
|
300
302
|
export type { __Cjs_DocumentApi as DocumentApi };
|
|
303
|
+
export type { __Cjs_DocumentCollaborationConfig as DocumentCollaborationConfig };
|
|
301
304
|
export type { __Cjs_DocumentDataSource as DocumentDataSource };
|
|
302
305
|
export type { __Cjs_DocumentMode as DocumentMode };
|
|
303
306
|
export type { __Cjs_DocumentProtectionState as DocumentProtectionState };
|
|
@@ -396,6 +399,7 @@ export type { __Cjs_SuperDocDiagnosticStage as SuperDocDiagnosticStage };
|
|
|
396
399
|
export type { __Cjs_SuperDocDisposableBag as SuperDocDisposableBag };
|
|
397
400
|
export type { __Cjs_SuperDocDocumentModeChangePayload as SuperDocDocumentModeChangePayload };
|
|
398
401
|
export type { __Cjs_SuperDocEditorPayload as SuperDocEditorPayload };
|
|
402
|
+
export type { __Cjs_SuperDocExceptionCollaborationPayload as SuperDocExceptionCollaborationPayload };
|
|
399
403
|
export type { __Cjs_SuperDocExceptionDiagnosticPayload as SuperDocExceptionDiagnosticPayload };
|
|
400
404
|
export type { __Cjs_SuperDocExceptionEditorPayload as SuperDocExceptionEditorPayload };
|
|
401
405
|
export type { __Cjs_SuperDocExceptionHyperlinkPayload as SuperDocExceptionHyperlinkPayload };
|
|
@@ -23,6 +23,7 @@ export type { Config } from '../core/types/index.js';
|
|
|
23
23
|
export type { DirectSurfaceRequest } from '../core/types/index.js';
|
|
24
24
|
export type { DocRange } from '../core/types/index.js';
|
|
25
25
|
export type { Document } from '../core/types/index.js';
|
|
26
|
+
export type { DocumentCollaborationConfig } from '../core/types/index.js';
|
|
26
27
|
export type { DocumentDataSource } from '../core/types/index.js';
|
|
27
28
|
export type { DocumentSource } from '../core/types/index.js';
|
|
28
29
|
export type { DocumentUploadSource } from '../core/types/index.js';
|
|
@@ -86,6 +87,7 @@ export type { SuperDocWorkerFailureDetail } from '../core/types/index.js';
|
|
|
86
87
|
export type { SuperDocExceptionHyperlinkPayload } from '../core/types/index.js';
|
|
87
88
|
export type { SuperDocExceptionToolbarPayload } from '../core/types/index.js';
|
|
88
89
|
export type { SuperDocExceptionPayload } from '../core/types/index.js';
|
|
90
|
+
export type { SuperDocExceptionCollaborationPayload } from '../core/types/index.js';
|
|
89
91
|
export type { SuperDocExceptionRestorePayload } from '../core/types/index.js';
|
|
90
92
|
export type { SuperDocExceptionStorePayload } from '../core/types/index.js';
|
|
91
93
|
export type { SuperDocFitWidthOptions } from '../core/types/index.js';
|