superdoc 2.29.0-next.3 → 2.29.0
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-D4lVeOJu.es.js → PdfViewer-CW09MNrB.es.js} +70 -105
- package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-CkrAHpC-.cjs} +74 -109
- 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/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
- package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
- package/dist/chunks/{create-super-doc-ui-BFt8agAI.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +89 -137
- package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-L60GhVAX.cjs} +211 -259
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
- package/dist/document-api/src/comments/comments.d.ts +2 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
- package/dist/document-api/src/index.d.ts +8 -7
- package/dist/document-api/src/insert/insert.d.ts +2 -2
- package/dist/document-api/src/replace/replace.d.ts +3 -2
- package/dist/document-api/src/types/address.d.ts +3 -0
- package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
- package/dist/document-api/src/write/write.d.ts +12 -6
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +28 -13
- 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/floating-comment-positioning.d.ts +24 -23
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -2
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
- package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +80 -16
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +48 -13
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +13 -0
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
- package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
- package/dist/superdoc/src/composables/use-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 +1210 -30
- package/dist/superdoc/src/composables/use-field.d.ts +88 -25
- package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
- package/dist/superdoc/src/core/SuperDoc.d.ts +4 -4
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
- package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
- package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
- package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
- package/dist/superdoc/src/core/create-app.d.ts +13 -24
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -1
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
- package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
- package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +28 -61
- package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
- package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
- package/dist/superdoc/src/core/types/index.d.ts +41 -23
- 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/core/v2-integration/v2-integration.d.ts +10 -10
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
- package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
- package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
- package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
- package/dist/superdoc/src/helpers/object-guards.d.ts +2 -5
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
- package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
- package/dist/superdoc/src/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-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/diagnostic-dedupe.d.ts +6 -15
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +4 -24
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +12 -14
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -11
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +9 -19
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +14 -45
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
- 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/toolbar-focus-helpers.d.ts +10 -2
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -30
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
- package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
- package/dist/superdoc/src/public/index.d.cts +26 -0
- package/dist/superdoc/src/public/index.d.ts +13 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
- package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
- package/dist/superdoc/src/public/ui/types.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +231 -105
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
- package/dist/superdoc/src/stores/helpers/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/helpers/tracked-change-identity.d.ts +19 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +0 -4
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
- package/dist/superdoc/src/stores/superdoc-store.d.ts +694 -316
- package/dist/superdoc.cjs +1804 -2782
- package/dist/superdoc.es.js +1720 -2699
- 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 +3 -2
- package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
- package/dist/superdoc/src/main.d.ts +0 -1
|
@@ -1,210 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {{ width: number, height: number, originalWidth?: number, originalHeight?: number }} WhiteboardPageSize
|
|
3
|
-
* @typedef {{ x: number, y: number }} Point
|
|
4
|
-
*
|
|
5
|
-
* Authored input shapes — what `addStroke`/`addText`/`addImage` accept
|
|
6
|
-
* from a consumer (pixel-space coordinates, optional ids). The
|
|
7
|
-
* add* methods normalize these into the stored shapes below.
|
|
8
|
-
*
|
|
9
|
-
* @typedef {{ points: number[][], color?: string, width?: number, type?: 'draw'|'erase' }} WhiteboardStroke
|
|
10
|
-
* @typedef {{ id?: string|number, x: number, y: number, content: string, fontSize?: number, width?: number }} WhiteboardTextItem
|
|
11
|
-
* @typedef {{ id?: string|number, stickerId?: string, x: number, y: number, src: string, width?: number, height?: number, type?: string }} WhiteboardImageItem
|
|
12
|
-
*
|
|
13
|
-
* Stored / normalized shapes — what the page actually holds in
|
|
14
|
-
* `this.strokes` / `this.text` / `this.images` and what gets
|
|
15
|
-
* serialized via `toJSON()` and re-applied via `applyData()`. Fields
|
|
16
|
-
* suffixed with `N` (pointsN, xN, yN, widthN, heightN, fontSizeN) are
|
|
17
|
-
* normalized to the page's 0..1 coordinate space; raw `width`/`height`
|
|
18
|
-
* pairs are kept where consumers expect pixel sizes.
|
|
19
|
-
*
|
|
20
|
-
* SD-3213 follow-up: the public types were previously `any[]` for the
|
|
21
|
-
* fields and the toJSON / applyData signatures; consumers reading
|
|
22
|
-
* `page.strokes[0].points` would have hit pointsN at runtime with no
|
|
23
|
-
* IntelliSense. The named shapes below restore typing without
|
|
24
|
-
* over-committing the authored shapes (which the add* methods
|
|
25
|
-
* normalize away).
|
|
26
|
-
*
|
|
27
|
-
* @typedef {{ pointsN: number[][], widthN?: number, color?: string, type?: 'draw'|'erase' }} WhiteboardStoredStroke
|
|
28
|
-
* @typedef {{ id: string|number, xN: number, yN: number, content: string, fontSizeN?: number, widthN?: number | null }} WhiteboardStoredTextItem
|
|
29
|
-
* @typedef {{ id: string|number, stickerId?: string | number | null, xN: number, yN: number, src: string, widthN?: number | null, heightN?: number | null, type?: string }} WhiteboardStoredImageItem
|
|
30
|
-
*
|
|
31
|
-
* @typedef {{
|
|
32
|
-
* strokes?: WhiteboardStoredStroke[],
|
|
33
|
-
* text?: WhiteboardStoredTextItem[],
|
|
34
|
-
* images?: WhiteboardStoredImageItem[],
|
|
35
|
-
* }} WhiteboardStoredPageData
|
|
36
|
-
*
|
|
37
|
-
* @typedef {{
|
|
38
|
-
* pageIndex: number,
|
|
39
|
-
* enabled: boolean,
|
|
40
|
-
* Renderer: any,
|
|
41
|
-
* onChange?: () => void,
|
|
42
|
-
* onToolChange?: (tool: string) => void,
|
|
43
|
-
* }} WhiteboardPageInit
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Per-page whiteboard renderer/controller.
|
|
47
|
-
*/
|
|
48
|
-
export class WhiteboardPage {
|
|
49
|
-
/**
|
|
50
|
-
* Create a page controller.
|
|
51
|
-
* @param {WhiteboardPageInit} props
|
|
52
|
-
*/
|
|
53
|
-
constructor(props: WhiteboardPageInit);
|
|
54
|
-
/** @type {number|null} */
|
|
55
|
-
pageIndex: number | null;
|
|
56
|
-
/** @type {WhiteboardStoredStroke[]} */
|
|
57
|
-
strokes: WhiteboardStoredStroke[];
|
|
58
|
-
/** @type {WhiteboardStoredTextItem[]} */
|
|
59
|
-
text: WhiteboardStoredTextItem[];
|
|
60
|
-
/** @type {WhiteboardStoredImageItem[]} */
|
|
61
|
-
images: WhiteboardStoredImageItem[];
|
|
62
|
-
/** @type {WhiteboardPageSize|null} */
|
|
63
|
-
size: WhiteboardPageSize | null;
|
|
64
|
-
/** @type {{ width: number|null, height: number|null }|null} */
|
|
65
|
-
originalSize: {
|
|
66
|
-
width: number | null;
|
|
67
|
-
height: number | null;
|
|
68
|
-
} | null;
|
|
69
|
-
/**
|
|
70
|
-
* Set tool for this page.
|
|
71
|
-
* @param {string} tool
|
|
72
|
-
*/
|
|
73
|
-
setTool(tool: string): void;
|
|
74
|
-
/**
|
|
75
|
-
* Get current tool for this page.
|
|
76
|
-
* @returns {string}
|
|
77
|
-
*/
|
|
78
|
-
getTool(): string;
|
|
79
|
-
/**
|
|
80
|
-
* Enable/disable interactivity for this page.
|
|
81
|
-
* @param {boolean} enabled
|
|
82
|
-
*/
|
|
83
|
-
setEnabled(enabled: boolean): void;
|
|
84
|
-
/**
|
|
85
|
-
* @returns {boolean}
|
|
86
|
-
*/
|
|
87
|
-
isEnabled(): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Store page size (does not resize canvas).
|
|
90
|
-
* @param {WhiteboardPageSize} size
|
|
91
|
-
*/
|
|
92
|
-
setSize(size: WhiteboardPageSize): void;
|
|
93
|
-
/**
|
|
94
|
-
* Resize the Konva stage.
|
|
95
|
-
* @param {number} width
|
|
96
|
-
* @param {number} height
|
|
97
|
-
*/
|
|
98
|
-
resize(width: number, height: number): void;
|
|
99
|
-
/**
|
|
100
|
-
* Mount Konva stage into a container.
|
|
101
|
-
* @param {HTMLElement} container
|
|
102
|
-
*/
|
|
103
|
-
mount(container: HTMLElement): void;
|
|
104
|
-
/**
|
|
105
|
-
* Re-render all content for this page.
|
|
106
|
-
*/
|
|
107
|
-
render(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Render stroke paths.
|
|
110
|
-
*/
|
|
111
|
-
renderStrokes(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Render text nodes.
|
|
114
|
-
*/
|
|
115
|
-
renderText(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Render image/sticker nodes.
|
|
118
|
-
* NOTE: Images are reconciled by id to avoid re-creating nodes (prevents flicker).
|
|
119
|
-
* If src changes for an existing id, this path does not reload the image.
|
|
120
|
-
*/
|
|
121
|
-
renderImages(): void;
|
|
122
|
-
/**
|
|
123
|
-
* Destroy Konva stage and clean up listeners.
|
|
124
|
-
*/
|
|
125
|
-
destroy(): void;
|
|
126
|
-
/**
|
|
127
|
-
* Serialize page data.
|
|
128
|
-
* Returns the page's serializable shape. SD-3213 follow-up: fixed
|
|
129
|
-
* stale JSDoc that said `stickers` (which never existed on the
|
|
130
|
-
* runtime return) and typed the values as the stored normalized
|
|
131
|
-
* shapes instead of `any[]`.
|
|
132
|
-
*
|
|
133
|
-
* @returns {{ strokes: WhiteboardStoredStroke[], text: WhiteboardStoredTextItem[], images: WhiteboardStoredImageItem[] }}
|
|
134
|
-
*/
|
|
135
|
-
toJSON(): {
|
|
136
|
-
strokes: WhiteboardStoredStroke[];
|
|
137
|
-
text: WhiteboardStoredTextItem[];
|
|
138
|
-
images: WhiteboardStoredImageItem[];
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* Apply data to this page and re-render.
|
|
142
|
-
* @param {WhiteboardStoredPageData} data
|
|
143
|
-
*/
|
|
144
|
-
applyData(data?: WhiteboardStoredPageData): void;
|
|
145
|
-
/**
|
|
146
|
-
* Add a stroke to the model.
|
|
147
|
-
* @param {WhiteboardStroke} stroke
|
|
148
|
-
*/
|
|
149
|
-
addStroke(stroke: WhiteboardStroke): void;
|
|
150
|
-
/**
|
|
151
|
-
* Add a text item to the model.
|
|
152
|
-
* @param {WhiteboardTextItem} item
|
|
153
|
-
*/
|
|
154
|
-
addText(item: WhiteboardTextItem): void;
|
|
155
|
-
/**
|
|
156
|
-
* Add an image/sticker to the model.
|
|
157
|
-
* @param {WhiteboardImageItem} item
|
|
158
|
-
*/
|
|
159
|
-
addImage(item: WhiteboardImageItem): void;
|
|
160
|
-
#private;
|
|
161
|
-
}
|
|
162
1
|
export type WhiteboardPageSize = {
|
|
163
2
|
width: number;
|
|
164
3
|
height: number;
|
|
165
4
|
originalWidth?: number;
|
|
166
5
|
originalHeight?: number;
|
|
167
6
|
};
|
|
168
|
-
/**
|
|
169
|
-
* Authored input shapes — what `addStroke`/`addText`/`addImage` accept
|
|
170
|
-
* from a consumer (pixel-space coordinates, optional ids). The
|
|
171
|
-
* add* methods normalize these into the stored shapes below.
|
|
172
|
-
*/
|
|
173
7
|
export type Point = {
|
|
174
8
|
x: number;
|
|
175
9
|
y: number;
|
|
176
10
|
};
|
|
11
|
+
export type WhiteboardItemId = string | number;
|
|
12
|
+
export type WhiteboardStrokeType = 'draw' | 'erase';
|
|
177
13
|
export type WhiteboardStroke = {
|
|
178
14
|
points: number[][];
|
|
179
15
|
color?: string;
|
|
180
16
|
width?: number;
|
|
181
|
-
type?:
|
|
17
|
+
type?: WhiteboardStrokeType;
|
|
182
18
|
};
|
|
183
19
|
export type WhiteboardTextItem = {
|
|
184
|
-
id?:
|
|
20
|
+
id?: WhiteboardItemId;
|
|
185
21
|
x: number;
|
|
186
22
|
y: number;
|
|
187
23
|
content: string;
|
|
188
24
|
fontSize?: number;
|
|
189
25
|
width?: number;
|
|
190
26
|
};
|
|
191
|
-
/**
|
|
192
|
-
* Stored / normalized shapes — what the page actually holds in
|
|
193
|
-
* `this.strokes` / `this.text` / `this.images` and what gets
|
|
194
|
-
* serialized via `toJSON()` and re-applied via `applyData()`. Fields
|
|
195
|
-
* suffixed with `N` (pointsN, xN, yN, widthN, heightN, fontSizeN) are
|
|
196
|
-
* normalized to the page's 0..1 coordinate space; raw `width`/`height`
|
|
197
|
-
* pairs are kept where consumers expect pixel sizes.
|
|
198
|
-
*
|
|
199
|
-
* SD-3213 follow-up: the public types were previously `any[]` for the
|
|
200
|
-
* fields and the toJSON / applyData signatures; consumers reading
|
|
201
|
-
* `page.strokes[0].points` would have hit pointsN at runtime with no
|
|
202
|
-
* IntelliSense. The named shapes below restore typing without
|
|
203
|
-
* over-committing the authored shapes (which the add* methods
|
|
204
|
-
* normalize away).
|
|
205
|
-
*/
|
|
206
27
|
export type WhiteboardImageItem = {
|
|
207
|
-
id?:
|
|
28
|
+
id?: WhiteboardItemId;
|
|
208
29
|
stickerId?: string;
|
|
209
30
|
x: number;
|
|
210
31
|
y: number;
|
|
@@ -217,10 +38,10 @@ export type WhiteboardStoredStroke = {
|
|
|
217
38
|
pointsN: number[][];
|
|
218
39
|
widthN?: number;
|
|
219
40
|
color?: string;
|
|
220
|
-
type?:
|
|
41
|
+
type?: WhiteboardStrokeType;
|
|
221
42
|
};
|
|
222
43
|
export type WhiteboardStoredTextItem = {
|
|
223
|
-
id:
|
|
44
|
+
id: WhiteboardItemId;
|
|
224
45
|
xN: number;
|
|
225
46
|
yN: number;
|
|
226
47
|
content: string;
|
|
@@ -228,8 +49,8 @@ export type WhiteboardStoredTextItem = {
|
|
|
228
49
|
widthN?: number | null;
|
|
229
50
|
};
|
|
230
51
|
export type WhiteboardStoredImageItem = {
|
|
231
|
-
id:
|
|
232
|
-
stickerId?:
|
|
52
|
+
id: WhiteboardItemId;
|
|
53
|
+
stickerId?: WhiteboardItemId | null;
|
|
233
54
|
xN: number;
|
|
234
55
|
yN: number;
|
|
235
56
|
src: string;
|
|
@@ -242,10 +63,163 @@ export type WhiteboardStoredPageData = {
|
|
|
242
63
|
text?: WhiteboardStoredTextItem[];
|
|
243
64
|
images?: WhiteboardStoredImageItem[];
|
|
244
65
|
};
|
|
66
|
+
export type WhiteboardSerializedPage = {
|
|
67
|
+
strokes: WhiteboardStoredStroke[];
|
|
68
|
+
text: WhiteboardStoredTextItem[];
|
|
69
|
+
images: WhiteboardStoredImageItem[];
|
|
70
|
+
};
|
|
71
|
+
export type WhiteboardRendererEvent = {
|
|
72
|
+
target?: unknown;
|
|
73
|
+
cancelBubble?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export interface WhiteboardRendererNode {
|
|
76
|
+
_whiteboardId?: WhiteboardItemId;
|
|
77
|
+
on(events: string, handler: (event: WhiteboardRendererEvent) => void): unknown;
|
|
78
|
+
destroy(): unknown;
|
|
79
|
+
name(): string;
|
|
80
|
+
name(name: string): unknown;
|
|
81
|
+
}
|
|
82
|
+
export interface WhiteboardShapeNode extends WhiteboardRendererNode {
|
|
83
|
+
x(): number;
|
|
84
|
+
x(value: number): unknown;
|
|
85
|
+
y(): number;
|
|
86
|
+
y(value: number): unknown;
|
|
87
|
+
width(): number;
|
|
88
|
+
width(value: number): unknown;
|
|
89
|
+
height(): number;
|
|
90
|
+
height(value: number): unknown;
|
|
91
|
+
scaleX(): number;
|
|
92
|
+
scaleY(): number;
|
|
93
|
+
scale(scale: Point): unknown;
|
|
94
|
+
draggable(value: boolean): unknown;
|
|
95
|
+
position(): Point;
|
|
96
|
+
}
|
|
97
|
+
export interface WhiteboardTextNode extends WhiteboardShapeNode {
|
|
98
|
+
scaleY(): number;
|
|
99
|
+
scaleY(value: number): unknown;
|
|
100
|
+
setAttrs(attrs: {
|
|
101
|
+
width: number;
|
|
102
|
+
scaleX: number;
|
|
103
|
+
scaleY?: number;
|
|
104
|
+
}): unknown;
|
|
105
|
+
text(): string;
|
|
106
|
+
text(value: string): unknown;
|
|
107
|
+
fontSize(): number;
|
|
108
|
+
fontFamily(): string;
|
|
109
|
+
fill(): string | CanvasGradient;
|
|
110
|
+
}
|
|
111
|
+
export interface WhiteboardLineNode extends WhiteboardRendererNode {
|
|
112
|
+
points(points: number[]): unknown;
|
|
113
|
+
}
|
|
114
|
+
export type WhiteboardBox = {
|
|
115
|
+
x: number;
|
|
116
|
+
y: number;
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
rotation: number;
|
|
120
|
+
};
|
|
121
|
+
export type WhiteboardBoundBoxFunc = (oldBox: WhiteboardBox, newBox: WhiteboardBox) => WhiteboardBox;
|
|
122
|
+
export interface WhiteboardTransformerNode {
|
|
123
|
+
destroy(): unknown;
|
|
124
|
+
nodes(nodes: WhiteboardShapeNode[]): unknown;
|
|
125
|
+
enabledAnchors(anchors: string[]): unknown;
|
|
126
|
+
boundBoxFunc(fn: WhiteboardBoundBoxFunc): unknown;
|
|
127
|
+
}
|
|
128
|
+
export interface WhiteboardLayerNode {
|
|
129
|
+
add(child: WhiteboardRendererNode | WhiteboardTransformerNode): unknown;
|
|
130
|
+
find(selector: string): WhiteboardShapeNode[];
|
|
131
|
+
destroyChildren(): unknown;
|
|
132
|
+
batchDraw(): unknown;
|
|
133
|
+
listening(listening: boolean): unknown;
|
|
134
|
+
getCanvas(): {
|
|
135
|
+
setPixelRatio(ratio: number): unknown;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export interface WhiteboardStageNode {
|
|
139
|
+
on(events: string, handler: (event: WhiteboardRendererEvent) => void): unknown;
|
|
140
|
+
add(layer: WhiteboardLayerNode): unknown;
|
|
141
|
+
size(size: {
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
}): unknown;
|
|
145
|
+
getPointerPosition(): Point | null;
|
|
146
|
+
destroy(): unknown;
|
|
147
|
+
}
|
|
148
|
+
export type WhiteboardLineConfig = {
|
|
149
|
+
points: number[];
|
|
150
|
+
stroke: string;
|
|
151
|
+
strokeWidth: number;
|
|
152
|
+
lineCap: 'round';
|
|
153
|
+
lineJoin: 'round';
|
|
154
|
+
globalCompositeOperation: 'destination-out' | 'source-over';
|
|
155
|
+
};
|
|
156
|
+
export interface WhiteboardPageRenderer {
|
|
157
|
+
Stage: new (config: {
|
|
158
|
+
container: HTMLDivElement;
|
|
159
|
+
width: number;
|
|
160
|
+
height: number;
|
|
161
|
+
}) => WhiteboardStageNode;
|
|
162
|
+
Layer: new () => WhiteboardLayerNode;
|
|
163
|
+
Line: new (config: WhiteboardLineConfig) => WhiteboardLineNode;
|
|
164
|
+
Text: new (config: {
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
text: string;
|
|
168
|
+
fontSize: number;
|
|
169
|
+
fontFamily: string;
|
|
170
|
+
fill: string;
|
|
171
|
+
draggable: boolean;
|
|
172
|
+
width: number | undefined;
|
|
173
|
+
}) => WhiteboardTextNode;
|
|
174
|
+
Image: new (config: {
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
image: HTMLImageElement;
|
|
178
|
+
width: number;
|
|
179
|
+
height: number;
|
|
180
|
+
draggable: boolean;
|
|
181
|
+
}) => WhiteboardShapeNode;
|
|
182
|
+
Transformer: new (config: {
|
|
183
|
+
enabledAnchors: string[];
|
|
184
|
+
rotateEnabled: boolean;
|
|
185
|
+
keepRatio: boolean;
|
|
186
|
+
boundBoxFunc: WhiteboardBoundBoxFunc;
|
|
187
|
+
}) => WhiteboardTransformerNode;
|
|
188
|
+
}
|
|
245
189
|
export type WhiteboardPageInit = {
|
|
246
190
|
pageIndex: number;
|
|
247
191
|
enabled: boolean;
|
|
248
|
-
Renderer
|
|
192
|
+
Renderer?: WhiteboardPageRenderer;
|
|
249
193
|
onChange?: () => void;
|
|
250
194
|
onToolChange?: (tool: string) => void;
|
|
251
195
|
};
|
|
196
|
+
export declare class WhiteboardPage {
|
|
197
|
+
#private;
|
|
198
|
+
pageIndex: number;
|
|
199
|
+
strokes: WhiteboardStoredStroke[];
|
|
200
|
+
text: WhiteboardStoredTextItem[];
|
|
201
|
+
images: WhiteboardStoredImageItem[];
|
|
202
|
+
size: WhiteboardPageSize | null;
|
|
203
|
+
originalSize: {
|
|
204
|
+
width: number | null;
|
|
205
|
+
height: number | null;
|
|
206
|
+
} | null;
|
|
207
|
+
constructor(props: WhiteboardPageInit);
|
|
208
|
+
setTool(tool: string): void;
|
|
209
|
+
getTool(): string;
|
|
210
|
+
setEnabled(enabled: boolean): void;
|
|
211
|
+
isEnabled(): boolean;
|
|
212
|
+
setSize(size: WhiteboardPageSize): void;
|
|
213
|
+
resize(width: number, height: number): void;
|
|
214
|
+
mount(container: HTMLDivElement): void;
|
|
215
|
+
render(): void;
|
|
216
|
+
renderStrokes(): void;
|
|
217
|
+
renderText(): void;
|
|
218
|
+
renderImages(): void;
|
|
219
|
+
destroy(): void;
|
|
220
|
+
toJSON(): WhiteboardSerializedPage;
|
|
221
|
+
applyData(data?: WhiteboardStoredPageData): void;
|
|
222
|
+
addStroke(stroke: WhiteboardStroke): void;
|
|
223
|
+
addText(item: WhiteboardTextItem): void;
|
|
224
|
+
addImage(item: WhiteboardImageItem): void;
|
|
225
|
+
}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TextareaSize = number | string;
|
|
2
|
+
export interface TextareaOptions {
|
|
3
|
+
value?: string;
|
|
4
|
+
left?: number;
|
|
5
|
+
top?: number;
|
|
6
|
+
width?: TextareaSize;
|
|
7
|
+
height?: TextareaSize;
|
|
8
|
+
fontSize?: TextareaSize;
|
|
9
|
+
fontFamily?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
background?: string;
|
|
12
|
+
resize?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function createTextarea(options?: TextareaOptions): HTMLTextAreaElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function flattenPoints(points:
|
|
1
|
+
export declare function flattenPoints(points: readonly (readonly number[])[]): number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function getRandomId(prefix?: string): string;
|
|
1
|
+
export declare function getRandomId(prefix?: string): string;
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
type ClientRectSource = {
|
|
2
|
+
getBoundingClientRect?: () => {
|
|
3
|
+
top: number;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
type ThreadPositionEntry = {
|
|
7
|
+
bounds?: {
|
|
8
|
+
top?: number;
|
|
9
|
+
} | null;
|
|
10
|
+
} | null | undefined;
|
|
11
|
+
type ThreadAnchorPresentation = {
|
|
12
|
+
getReachableThreadAnchorClientY: (threadId: string, targetClientY: number) => number | null | undefined;
|
|
13
|
+
scrollThreadAnchorToClientY: (threadId: string, targetClientY: number, options: {
|
|
14
|
+
behavior: ScrollBehavior;
|
|
15
|
+
}) => boolean | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
export declare const getPreferredCommentFocusTargetClientY: () => number;
|
|
18
|
+
export declare const getVisibleThreadAnchorClientY: (layersElement: ClientRectSource | null | undefined, positionEntry: ThreadPositionEntry) => number | null;
|
|
19
|
+
export declare const getVisibleThreadHighlightClientY: (threadIds: ReadonlyArray<string | number | null | undefined> | null | undefined) => number | null;
|
|
20
|
+
export declare const scrollThreadAnchorToFocusTarget: (presentation: ThreadAnchorPresentation | null | undefined, primaryThreadId: string | null | undefined, fallbackThreadId: string | null | undefined, targetClientY: number | null | undefined) => number | null;
|
|
21
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { Editor } from '../core/types/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* Log a console.warn once per key. Subsequent calls with the same key are no-ops.
|
|
3
|
-
* @param {string} key
|
|
4
|
-
* @param {string} message
|
|
5
4
|
*/
|
|
6
|
-
export function warnOnce(key: string, message: string): void;
|
|
5
|
+
export declare function warnOnce(key: string, message: string): void;
|
|
7
6
|
/**
|
|
8
7
|
* Wrap an Editor instance in a Proxy that emits one-time deprecation
|
|
9
8
|
* warnings when consumers access ProseMirror internals or editor commands.
|
|
@@ -11,16 +10,11 @@ export function warnOnce(key: string, message: string): void;
|
|
|
11
10
|
* The proxy is fully transparent — all property access and method calls are
|
|
12
11
|
* forwarded to the underlying editor. Only the warning side-effect is added.
|
|
13
12
|
*
|
|
14
|
-
* @
|
|
15
|
-
* @returns {import('../core/types/index.js').Editor} Proxied editor (or the
|
|
16
|
-
* original if null/already wrapped)
|
|
13
|
+
* @returns Proxied editor (or the original if null/already wrapped)
|
|
17
14
|
*/
|
|
18
|
-
export function createDeprecatedEditorProxy(editor:
|
|
15
|
+
export declare function createDeprecatedEditorProxy<T extends Editor | null | undefined>(editor: T): T;
|
|
19
16
|
/**
|
|
20
17
|
* Unwrap a potentially proxied editor back to the raw Editor instance.
|
|
21
18
|
* Safe to call on an already-raw editor — returns it unchanged.
|
|
22
|
-
*
|
|
23
|
-
* @param {import('../core/types/index.js').Editor | null | undefined} editor
|
|
24
|
-
* @returns {import('../core/types/index.js').Editor | null | undefined}
|
|
25
19
|
*/
|
|
26
|
-
export function unwrapEditor(editor:
|
|
20
|
+
export declare function unwrapEditor(editor: Editor | null | undefined): Editor | null | undefined;
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {string} stage
|
|
3
|
-
* @param {string} branch
|
|
4
|
-
* @param {Record<string, unknown> | undefined} [meta]
|
|
5
|
-
* @returns {{ traceId: string, spanId: string } | null}
|
|
6
|
-
*/
|
|
7
|
-
export function startInteractionSpan(stage: string, branch: string, meta?: Record<string, unknown> | undefined): {
|
|
1
|
+
type InteractionSpan = {
|
|
8
2
|
traceId: string;
|
|
9
3
|
spanId: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
traceId: string;
|
|
17
|
-
spanId: string;
|
|
18
|
-
} | null | undefined, meta?: Record<string, unknown> | undefined): void;
|
|
19
|
-
/**
|
|
20
|
-
* @param {string} stage
|
|
21
|
-
* @param {string} branch
|
|
22
|
-
* @param {Record<string, unknown> | undefined} meta
|
|
23
|
-
* @param {() => any} fn
|
|
24
|
-
* @returns {any}
|
|
25
|
-
*/
|
|
26
|
-
export function withInteractionSpan(stage: string, branch: string, meta: Record<string, unknown> | undefined, fn: () => any): any;
|
|
4
|
+
};
|
|
5
|
+
type InteractionMeta = Record<string, unknown> | undefined;
|
|
6
|
+
export declare function startInteractionSpan(stage: string, branch: string, meta?: InteractionMeta): InteractionSpan | null;
|
|
7
|
+
export declare function endInteractionSpan(span: InteractionSpan | null | undefined, meta?: InteractionMeta): void;
|
|
8
|
+
export declare function withInteractionSpan<T>(stage: string, branch: string, meta: InteractionMeta, fn: () => T): T;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function markRawComponent(component: unknown): unknown;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @returns {value is Record<string, unknown>}
|
|
4
|
-
*/
|
|
5
|
-
export function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
1
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
2
|
+
export declare function isThenable(value: unknown): value is PromiseLike<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DOCUMENT_EDITOR_SELECTION_SOURCE
|
|
1
|
+
export declare const DOCUMENT_EDITOR_SELECTION_SOURCE = "document-editor";
|
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type SelectionBounds = {
|
|
3
|
+
top?: number;
|
|
4
|
+
left?: number;
|
|
5
|
+
right?: number;
|
|
6
|
+
bottom?: number;
|
|
7
|
+
};
|
|
8
|
+
type UseSelectionParams = {
|
|
9
|
+
documentId?: unknown;
|
|
10
|
+
page?: number;
|
|
11
|
+
selectionBounds?: SelectionBounds | null;
|
|
12
|
+
source?: string | null;
|
|
13
|
+
};
|
|
14
|
+
type ContainerLocation = {
|
|
15
|
+
top: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
type SelectionValues<Bounds extends SelectionBounds> = {
|
|
19
|
+
documentId: unknown;
|
|
20
|
+
page: number | undefined;
|
|
21
|
+
selectionBounds: Bounds;
|
|
22
|
+
source: string | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
type SelectionModel<Bounds extends SelectionBounds> = {
|
|
25
|
+
documentId: Ref<unknown>;
|
|
26
|
+
page: Ref<number | undefined>;
|
|
27
|
+
selectionBounds: Bounds;
|
|
28
|
+
source: Ref<string | null | undefined>;
|
|
29
|
+
getValues: () => SelectionValues<Bounds>;
|
|
12
30
|
getContainerId: () => string;
|
|
13
|
-
getContainerLocation: (parentContainer:
|
|
14
|
-
top: number;
|
|
15
|
-
left: number;
|
|
16
|
-
};
|
|
31
|
+
getContainerLocation: (parentContainer: Pick<Element, 'getBoundingClientRect'> | null | undefined) => ContainerLocation;
|
|
17
32
|
};
|
|
33
|
+
export default function useSelection<Bounds extends SelectionBounds>(params: UseSelectionParams & {
|
|
34
|
+
selectionBounds: Bounds;
|
|
35
|
+
}): SelectionModel<Bounds>;
|
|
36
|
+
export default function useSelection(params: UseSelectionParams): SelectionModel<SelectionBounds>;
|
|
37
|
+
export {};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* @param {any} event - a `v2-host-event` payload.
|
|
3
|
-
* @returns {boolean} true when the rejection means the session needs an author.
|
|
4
|
-
*/
|
|
5
|
-
export function isV2AuthorRequiredRejection(event: any): boolean;
|
|
6
|
-
export function createV2AuthorRequiredNotificationGate(): {
|
|
7
|
-
shouldNotify(scope: any, event: any): boolean;
|
|
8
|
-
clear(scope: any): void;
|
|
9
|
-
};
|
|
1
|
+
import { V2MutationRejectedEvent } from './v2-mutation-exception.js';
|
|
10
2
|
/** Stable, non-terminal exception code surfaced to consumers. */
|
|
11
|
-
export const V2_AUTHOR_REQUIRED_CODE
|
|
3
|
+
export declare const V2_AUTHOR_REQUIRED_CODE = "author-required";
|
|
12
4
|
/**
|
|
13
5
|
* Content-safe, actionable message. Contains no document text, imported author,
|
|
14
6
|
* email, path, or source key — only how to fix the configuration.
|
|
15
7
|
*/
|
|
16
|
-
export const V2_AUTHOR_REQUIRED_MESSAGE
|
|
8
|
+
export declare const V2_AUTHOR_REQUIRED_MESSAGE = "This edit needs an author identity. Set `user.name` in your SuperDoc configuration and reopen the document to make tracked or revision-overlapping edits.";
|
|
9
|
+
export declare function isV2AuthorRequiredRejection(event: unknown): event is V2MutationRejectedEvent;
|
|
10
|
+
export declare function createV2AuthorRequiredNotificationGate(): {
|
|
11
|
+
shouldNotify(scope: string | null | undefined, event: unknown): boolean;
|
|
12
|
+
clear(scope: string | null | undefined): void;
|
|
13
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { SuperDocTrackedChangesBulkDecisionPayload } from '../core/types/index.js';
|
|
2
|
+
export type V2TrackedChangeBulkDecisionFact = {
|
|
3
|
+
schemaVersion: number;
|
|
4
|
+
decision: string;
|
|
5
|
+
requestedCount: number;
|
|
6
|
+
appliedCount: number;
|
|
7
|
+
deniedCount: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function toV2BulkDecisionEvent(documentId: string | null | undefined, fact: V2TrackedChangeBulkDecisionFact | null | undefined): SuperDocTrackedChangesBulkDecisionPayload | null;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { V2MutationRejectedEvent } from './v2-mutation-exception.js';
|
|
2
|
+
export declare const V2_EDIT_REJECTED_CODE = "edit-rejected";
|
|
3
|
+
export declare const V2_EDIT_REJECTED_MESSAGE = "This edit couldn\u2019t be completed. Adjust the selection and try again.";
|
|
4
|
+
export declare function isV2KeyboardEditRejection(event: unknown): event is V2MutationRejectedEvent;
|
|
5
|
+
export declare function createV2KeyboardEditRejectionException(documentId: string | null | undefined, event?: unknown): {
|
|
3
6
|
documentId?: string | undefined;
|
|
4
7
|
error: Error;
|
|
5
8
|
code: string;
|
|
6
9
|
editor: null;
|
|
7
10
|
};
|
|
8
|
-
export function createV2KeyboardEditRejectionNotificationGate(): {
|
|
9
|
-
shouldNotify(scope:
|
|
10
|
-
clear(scope:
|
|
11
|
+
export declare function createV2KeyboardEditRejectionNotificationGate(): {
|
|
12
|
+
shouldNotify(scope: string | null | undefined, event: unknown): boolean;
|
|
13
|
+
clear(scope: string | null | undefined): void;
|
|
11
14
|
};
|
|
12
|
-
export const V2_EDIT_REJECTED_CODE: "edit-rejected";
|
|
13
|
-
export const V2_EDIT_REJECTED_MESSAGE: "This edit couldn\u2019t be completed. Adjust the selection and try again.";
|