superdoc 2.29.0-next.9 → 2.30.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -25
- package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-BEnRLpD9.es.js} +1 -1
- package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-DWXgWgg7.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-DjV1JgjD.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-VFPnQOML.cjs} +1 -1
- package/dist/chunks/{PdfViewer-aOWhUVI7.es.js → PdfViewer-C2r-K8zC.es.js} +4 -10
- package/dist/chunks/{PdfViewer-DmSkZehl.cjs → PdfViewer-DYTbPVUr.cjs} +4 -10
- package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BzM2_tVU.cjs} +40 -7
- package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-CmkaJDnr.es.js} +23 -8
- package/dist/chunks/{create-super-doc-ui-Bm5kmx0W.es.js → create-super-doc-ui--o8TcYYv.es.js} +3322 -2729
- package/dist/chunks/{create-super-doc-ui-DN70aatf.cjs → create-super-doc-ui-CvK1JdZv.cjs} +3447 -2854
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/changes/changes.d.ts +26 -0
- package/dist/document-api/src/changes/changes.types.d.ts +156 -0
- package/dist/document-api/src/comments/comment-create-attribution.d.ts +4 -0
- package/dist/document-api/src/comments/comments.types.d.ts +4 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +76 -8
- package/dist/document-api/src/contract/operation-registry.d.ts +2 -2
- package/dist/document-api/src/contract/schemas.d.ts +7 -1
- package/dist/document-api/src/create/create.d.ts +0 -4
- package/dist/document-api/src/diff/diff.types.d.ts +6 -6
- package/dist/document-api/src/header-footers/header-footers.d.ts +1 -3
- package/dist/document-api/src/index.d.ts +13 -1
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +0 -2
- package/dist/document-api/src/insert/insert.d.ts +0 -1
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +8 -3
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +49 -5
- package/dist/document-api/src/tables/data/table-preset-appearance.generated.d.ts +2 -0
- package/dist/document-api/src/tables/table-style-presets.d.ts +73 -0
- package/dist/document-api/src/tables/tables.d.ts +4 -1
- package/dist/document-api/src/types/sd-props.d.ts +7 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +12 -15
- package/dist/layout-engine/contracts/src/index.d.ts +4 -1
- package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +4 -0
- package/dist/layout-engine/layout-bridge/src/coupled-footnote-pagination.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-certificate.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/footnote-page-planner.d.ts +5 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/footnote-page-flow.d.ts +3 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +7 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +5 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +3 -1
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +0 -4
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +4 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/styles.d.ts +0 -10
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +1 -13
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/shared/common/Telemetry.d.ts +50 -0
- package/dist/shared/common/event-types.d.ts +13 -0
- package/dist/shared/font-system/src/bundled-face-names.d.ts +1 -0
- package/dist/shared/font-system/src/resolver.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +17 -33
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +25 -6
- package/dist/superdoc/src/components/CommentsLayer/comment-params.d.ts +84 -0
- package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -1
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +15 -95
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +4 -5
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +3 -4
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -9
- package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +2 -0
- package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
- package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
- package/dist/superdoc/src/composables/use-document.d.ts +51 -99
- package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +1 -1
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
- package/dist/superdoc/src/core/SuperDoc.d.ts +15 -6
- package/dist/superdoc/src/core/collaboration/cdn-collaboration-comment-map.d.ts +1 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comment-map.d.ts +2 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +1 -1
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
- package/dist/superdoc/src/core/document-open-telemetry.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +6 -2
- package/dist/superdoc/src/core/types/index.d.ts +147 -43
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
- package/dist/superdoc/src/helpers/deprecation.d.ts +12 -3
- package/dist/superdoc/src/helpers/object-guards.d.ts +2 -0
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
- package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
- package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
- package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
- package/dist/superdoc/src/helpers/v2-review-geometry-delivery.d.ts +22 -0
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
- package/dist/superdoc/src/icons.d.ts +11 -19
- package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +3 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -3
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
- package/dist/superdoc/src/public/content-control-ref.d.ts +12 -0
- package/dist/superdoc/src/public/index.d.cts +20 -0
- package/dist/superdoc/src/public/index.d.ts +4 -1
- package/dist/superdoc/src/public/ui/async-read-cache.d.ts +32 -0
- package/dist/superdoc/src/public/ui/block-commands.d.ts +39 -0
- package/dist/superdoc/src/public/ui/command-results.d.ts +39 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +5 -1
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -17
- package/dist/superdoc/src/public/ui/document-change-records.d.ts +7 -0
- package/dist/superdoc/src/public/ui/entity-rows.d.ts +14 -0
- package/dist/superdoc/src/public/ui/font-options.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
- package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
- package/dist/superdoc/src/public/ui/format-painter-state.d.ts +29 -0
- package/dist/superdoc/src/public/ui/heavy-read-policy.d.ts +11 -0
- package/dist/superdoc/src/public/ui/host-events.d.ts +3 -0
- package/dist/superdoc/src/public/ui/inline-values.d.ts +80 -0
- package/dist/superdoc/src/public/ui/loose-record.d.ts +4 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
- package/dist/superdoc/src/public/ui/selection-targets.d.ts +53 -0
- package/dist/superdoc/src/public/ui/shared-tracked-changes-catalog.d.ts +16 -0
- package/dist/superdoc/src/public/ui/tracked-change-ids.d.ts +51 -0
- package/dist/superdoc/src/public/ui/types.d.ts +25 -2
- package/dist/superdoc/src/public/ui/ui-bench-timing.d.ts +9 -0
- package/dist/superdoc/src/public/ui.d.cts +18 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +23028 -552
- package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
- package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +10 -10
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
- package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +91 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +4 -2
- package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +1 -8
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +1 -1
- package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +147 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -2895
- package/dist/superdoc.cjs +1330 -972
- package/dist/superdoc.es.js +1242 -884
- package/dist/word-layout/src/marker-utils.d.ts +0 -5
- package/dist/word-layout/src/unit-conversions.d.ts +0 -1
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -42
- package/package.json +13 -3
- package/dist/document-api/src/diff/index.d.ts +0 -3
- package/dist/document-api/src/write/locator.d.ts +0 -24
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +0 -41
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +0 -5
- package/dist/superdoc/src/main.d.ts +0 -1
- package/dist/word-layout/src/tab-layout.d.ts +0 -193
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# superdoc
|
|
2
2
|
|
|
3
|
-
Browser editor for
|
|
3
|
+
Browser DOCX editor for reviewing, filling, and editing Word documents. Edits
|
|
4
|
+
write back to OOXML without an HTML conversion step. Use the built-in UI or
|
|
5
|
+
build your own. For headless or agent workflows, use
|
|
6
|
+
[`@superdoc/sdk`](https://www.npmjs.com/package/@superdoc/sdk).
|
|
7
|
+
|
|
8
|
+
[Live demo](https://www.superdoc.dev) · [Documentation](https://docs.superdoc.dev) · [GitHub](https://github.com/superdoc/docx-editor)
|
|
4
9
|
|
|
5
10
|
## Install
|
|
6
11
|
|
|
@@ -8,49 +13,146 @@ Browser editor for opening, editing, and rendering DOCX files.
|
|
|
8
13
|
npm install superdoc
|
|
9
14
|
```
|
|
10
15
|
|
|
16
|
+
The imports below need a bundler such as Vite or webpack.
|
|
17
|
+
|
|
11
18
|
## Quick start
|
|
12
19
|
|
|
20
|
+
```html
|
|
21
|
+
<div id="toolbar"></div>
|
|
22
|
+
<div id="editor" style="height: 100vh"></div>
|
|
23
|
+
```
|
|
24
|
+
|
|
13
25
|
```js
|
|
14
26
|
import { SuperDoc } from 'superdoc';
|
|
15
27
|
import 'superdoc/style.css';
|
|
16
28
|
|
|
17
|
-
const
|
|
29
|
+
const superdoc = new SuperDoc({
|
|
18
30
|
selector: '#editor',
|
|
19
|
-
document: '/
|
|
31
|
+
document: '/sample.docx', // URL, File, or Blob; omit for a blank document
|
|
32
|
+
documentMode: 'editing', // 'editing' | 'suggesting' | 'viewing'
|
|
33
|
+
user: { name: 'Ada Lovelace', email: 'ada@superdoc.dev' },
|
|
34
|
+
ui: { toolbar: { container: '#toolbar' } },
|
|
35
|
+
onReady: ({ superdoc }) => {
|
|
36
|
+
console.log('Document ready');
|
|
37
|
+
},
|
|
20
38
|
});
|
|
21
39
|
```
|
|
22
40
|
|
|
23
|
-
|
|
24
|
-
[SuperDoc documentation](https://docs.superdoc.dev) for configuration and APIs.
|
|
41
|
+
## Common tasks
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
### Export the edited DOCX
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
```js
|
|
46
|
+
await superdoc.export({ exportedName: 'sample-edited' }); // downloads sample-edited.docx
|
|
47
|
+
const docx = await superdoc.export({ triggerDownload: false }); // returns the file instead
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Exports keep tracked changes and comments by default. See
|
|
51
|
+
[export options](https://docs.superdoc.dev/editor/export-options) to accept
|
|
52
|
+
changes or remove comments in the exported copy.
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
### Record edits as tracked changes
|
|
31
55
|
|
|
32
|
-
|
|
56
|
+
Set `documentMode: 'suggesting'` and a `user` so each change has an author.
|
|
57
|
+
Switch modes later with:
|
|
33
58
|
|
|
34
|
-
|
|
59
|
+
```js
|
|
60
|
+
superdoc.setDocumentMode('suggesting');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Find and replace text
|
|
64
|
+
|
|
65
|
+
Use the Document API at `superdoc.activeEditor.doc` after `onReady`. Find a
|
|
66
|
+
target with `query.match`, then pass that target to the mutation:
|
|
35
67
|
|
|
36
68
|
```js
|
|
37
|
-
|
|
69
|
+
onReady: async ({ superdoc }) => {
|
|
70
|
+
const doc = superdoc.activeEditor?.doc;
|
|
71
|
+
if (!doc) throw new Error('The active document is unavailable.');
|
|
72
|
+
|
|
73
|
+
const match = await doc.query.match({
|
|
74
|
+
select: { type: 'text', pattern: 'Amazing' },
|
|
75
|
+
require: 'exactlyOne',
|
|
76
|
+
});
|
|
77
|
+
const item = match.items[0];
|
|
78
|
+
if (!item || item.matchKind !== 'text') throw new Error('Text not found.');
|
|
79
|
+
|
|
80
|
+
const receipt = await doc.replace(
|
|
81
|
+
{ target: item.target, text: 'Northstar' },
|
|
82
|
+
{ changeMode: 'tracked', expectedRevision: match.evaluatedRevision },
|
|
83
|
+
);
|
|
84
|
+
if (!receipt.success) throw new Error(receipt.failure?.message ?? 'Replace failed.');
|
|
85
|
+
},
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Add a comment
|
|
89
|
+
|
|
90
|
+
Every edit changes the document revision, so query again after an edit instead
|
|
91
|
+
of reusing an earlier `match`:
|
|
92
|
+
|
|
93
|
+
```js
|
|
94
|
+
const match = await doc.query.match({
|
|
95
|
+
select: { type: 'text', pattern: 'Confidential Information' },
|
|
96
|
+
require: 'exactlyOne',
|
|
97
|
+
});
|
|
98
|
+
const item = match.items[0];
|
|
99
|
+
if (!item || item.matchKind !== 'text') throw new Error('Text not found.');
|
|
100
|
+
|
|
101
|
+
const receipt = await doc.comments.create(
|
|
102
|
+
{ target: item.target, text: 'Confirm this definition.' },
|
|
103
|
+
{ expectedRevision: match.evaluatedRevision },
|
|
104
|
+
);
|
|
105
|
+
if (!receipt.success) throw new Error(receipt.failure?.message ?? 'Comment failed.');
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Navigate to a bookmark
|
|
109
|
+
|
|
110
|
+
After the document is ready, navigate by an exact bookmark name:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
const result = await superdoc.ui.bookmarks.navigateTo('Terms');
|
|
38
114
|
if (!result.success) console.log(result.reason);
|
|
39
115
|
```
|
|
40
116
|
|
|
41
|
-
You can also pass a `BookmarkAddress`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
117
|
+
You can also pass a `BookmarkAddress` from `doc.bookmarks.get()` or `.list()`.
|
|
118
|
+
Navigation scrolls to the bookmark and selects its range without changing
|
|
119
|
+
content or other collaborators' selections. Pass
|
|
120
|
+
`{ block: 'start', behavior: 'auto' }` as a second argument to change
|
|
121
|
+
alignment or scrolling. Only body bookmarks are supported; other targets
|
|
122
|
+
return `{ success: false, reason: 'target-unresolved' }`. The handle and
|
|
123
|
+
address types are exported from `superdoc/ui`.
|
|
124
|
+
|
|
125
|
+
## Common mistakes
|
|
46
126
|
|
|
47
|
-
|
|
48
|
-
|
|
127
|
+
| Wrong | Right |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `documentMode: 'edit'`, `'view'`, or `'suggest'` | `'editing'`, `'viewing'`, or `'suggesting'` |
|
|
130
|
+
| Importing `SuperDoc` without `superdoc/style.css` | Import both |
|
|
131
|
+
| `modules: { collaboration: { ydoc, provider } }` (V1) | `document: { url, collaboration: { providerType, serverUrl, documentId } }` |
|
|
132
|
+
| `Editor`, `superdoc/super-editor`, ProseMirror commands, or plugin keys (V1) | The Document API at `superdoc.activeEditor.doc` |
|
|
133
|
+
| Calling the Document API before the document loads | Call it inside `onReady` |
|
|
134
|
+
| Building edit targets from DOM positions or OOXML IDs | Use the `target` returned by `doc.query.match` |
|
|
135
|
+
| Importing `superdoc` in Node.js | Use `@superdoc/sdk` |
|
|
136
|
+
|
|
137
|
+
`documentMode` controls editor behavior only. Your application still manages
|
|
138
|
+
who may open or change a document.
|
|
139
|
+
|
|
140
|
+
## Related packages
|
|
141
|
+
|
|
142
|
+
- [`@superdoc/react`](https://www.npmjs.com/package/@superdoc/react) and [`@superdoc/vue`](https://www.npmjs.com/package/@superdoc/vue): framework wrappers for this editor.
|
|
143
|
+
- [`@superdoc/sdk`](https://www.npmjs.com/package/@superdoc/sdk): Node.js SDK for headless editing and agent toolkits. Python and Rust SDKs are listed in the [documentation](https://docs.superdoc.dev).
|
|
144
|
+
- [`@superdoc/mcp`](https://www.npmjs.com/package/@superdoc/mcp): MCP server for AI agents.
|
|
145
|
+
|
|
146
|
+
## Documentation
|
|
147
|
+
|
|
148
|
+
- [Editor quick start](https://docs.superdoc.dev/editor/quickstart)
|
|
149
|
+
- [Configuration](https://docs.superdoc.dev/editor/configuration)
|
|
150
|
+
- [Document modes](https://docs.superdoc.dev/editor/document-modes)
|
|
151
|
+
- [Export options](https://docs.superdoc.dev/editor/export-options)
|
|
152
|
+
- [Package compatibility](https://docs.superdoc.dev/resources/package-compatibility): peer dependency policy and version inspection.
|
|
153
|
+
- [`llms.txt`](https://docs.superdoc.dev/llms.txt): machine-readable index of the documentation for coding agents.
|
|
154
|
+
|
|
155
|
+
## License
|
|
49
156
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Name-only lookup requires a unique match across the document; an explicit body address scopes
|
|
53
|
-
lookup to the body. Resolution or reveal failure preserves the existing selection. Navigation
|
|
54
|
-
abandons stale work after content changes, document replacement, or a newer request, and times
|
|
55
|
-
out after 15 seconds. Missing editor or host capabilities return their readiness or availability
|
|
56
|
-
reason. The handle and address types are exported from `superdoc/ui`.
|
|
157
|
+
AGPL-3.0. [Commercial licenses](https://www.superdoc.dev/#pricing) are
|
|
158
|
+
available for proprietary deployments.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as normalizeClass, F as openBlock, G as toDisplayString, N as onMounted, a as computed, at as withModifiers, c as createCommentVNode, h as defineComponent, it as withKeys, l as createElementBlock, t as _plugin_vue_export_helper_default, u as createElementVNode, z as ref } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { D as normalizeClass, F as openBlock, G as toDisplayString, N as onMounted, a as computed, at as withModifiers, c as createCommentVNode, h as defineComponent, it as withKeys, l as createElementBlock, t as _plugin_vue_export_helper_default, u as createElementVNode, z as ref } from "./_plugin-vue_export-helper-CmkaJDnr.es.js";
|
|
2
2
|
//#region src/components/surfaces/FindReplaceSurface.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var _hoisted_1 = ["onKeydown"];
|
|
4
4
|
var _hoisted_2 = { class: "sd-find-replace__row" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-
|
|
1
|
+
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BzM2_tVU.cjs");
|
|
2
2
|
//#region src/components/surfaces/FindReplaceSurface.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var _hoisted_1 = ["onKeydown"];
|
|
4
4
|
var _hoisted_2 = { class: "sd-find-replace__row" };
|
package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-DjV1JgjD.es.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as openBlock, G as toDisplayString, a as computed, at as withModifiers, c as createCommentVNode, et as vModelText, h as defineComponent, it as withKeys, l as createElementBlock, rt as withDirectives, t as _plugin_vue_export_helper_default, u as createElementVNode, z as ref } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { F as openBlock, G as toDisplayString, a as computed, at as withModifiers, c as createCommentVNode, et as vModelText, h as defineComponent, it as withKeys, l as createElementBlock, rt as withDirectives, t as _plugin_vue_export_helper_default, u as createElementVNode, z as ref } from "./_plugin-vue_export-helper-CmkaJDnr.es.js";
|
|
2
2
|
//#region src/components/surfaces/PasswordPromptSurface.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var _hoisted_1 = ["onKeydown"];
|
|
4
4
|
var _hoisted_2 = ["id"];
|
package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-VFPnQOML.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-
|
|
1
|
+
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BzM2_tVU.cjs");
|
|
2
2
|
//#region src/components/surfaces/PasswordPromptSurface.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var _hoisted_1 = ["onKeydown"];
|
|
4
4
|
var _hoisted_2 = ["id"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as renderList, F as openBlock, N as onMounted, T as mergeProps, W as shallowRef, a as computed, c as createCommentVNode, h as defineComponent, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, n as Fragment, p as createVNode, s as createBlock, t as _plugin_vue_export_helper_default, tt as watch, u as createElementVNode, w as markRaw, z as ref } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { B as renderList, F as openBlock, N as onMounted, T as mergeProps, W as shallowRef, a as computed, c as createCommentVNode, h as defineComponent, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, n as Fragment, p as createVNode, s as createBlock, t as _plugin_vue_export_helper_default, tt as watch, u as createElementVNode, w as markRaw, z as ref } from "./_plugin-vue_export-helper-CmkaJDnr.es.js";
|
|
2
2
|
import { t as isFiniteNumber } from "./is-finite-number-BpL4F38c.es.js";
|
|
3
3
|
import { t as PDF_TO_CSS_UNITS } from "./constants-BvNs_ybI.es.js";
|
|
4
4
|
//#region src/core/pdf/helpers/floor.ts
|
|
@@ -71,15 +71,9 @@ var PDFJSAdapter = class extends PDFAdapter {
|
|
|
71
71
|
};
|
|
72
72
|
var PDFAdapterFactory = class {
|
|
73
73
|
static create(config) {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
default: () => {
|
|
79
|
-
throw new Error("Unsupported adapter");
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return (adapters[config.adapter] ?? adapters.default)();
|
|
74
|
+
const adapter = (/* @__PURE__ */ new Map([["pdfjs", () => new PDFJSAdapter(config)]])).get(config.adapter);
|
|
75
|
+
if (!adapter) throw new Error("Unsupported adapter");
|
|
76
|
+
return adapter();
|
|
83
77
|
}
|
|
84
78
|
};
|
|
85
79
|
function getWorkerSrcFromCDN(version) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-
|
|
1
|
+
const require__plugin_vue_export_helper = require("./_plugin-vue_export-helper-BzM2_tVU.cjs");
|
|
2
2
|
const require_is_finite_number = require("./is-finite-number-BEXgTRgc.cjs");
|
|
3
3
|
const require_constants = require("./constants-BeeNZoQp.cjs");
|
|
4
4
|
//#region src/core/pdf/helpers/floor.ts
|
|
@@ -71,15 +71,9 @@ var PDFJSAdapter = class extends PDFAdapter {
|
|
|
71
71
|
};
|
|
72
72
|
var PDFAdapterFactory = class {
|
|
73
73
|
static create(config) {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
default: () => {
|
|
79
|
-
throw new Error("Unsupported adapter");
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return (adapters[config.adapter] ?? adapters.default)();
|
|
74
|
+
const adapter = (/* @__PURE__ */ new Map([["pdfjs", () => new PDFJSAdapter(config)]])).get(config.adapter);
|
|
75
|
+
if (!adapter) throw new Error("Unsupported adapter");
|
|
76
|
+
return adapter();
|
|
83
77
|
}
|
|
84
78
|
};
|
|
85
79
|
function getWorkerSrcFromCDN(version) {
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/helpers/object-guards.ts
|
|
2
|
+
function isPlainObject(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function isObjectRecord(value) {
|
|
6
|
+
return typeof value === "object" && value !== null;
|
|
7
|
+
}
|
|
8
|
+
function isThenable(value) {
|
|
9
|
+
return (typeof value === "object" || typeof value === "function") && value !== null && "then" in value && typeof value.then === "function";
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/core/v2-integration/internal-vue-runtime.ts
|
|
2
13
|
var runtimeKey = "__SUPERDOC_V2_BROWSER_RUNTIME__";
|
|
14
|
+
function isVueRuntime(value) {
|
|
15
|
+
return isPlainObject(value) && typeof value.createApp === "function";
|
|
16
|
+
}
|
|
3
17
|
function runtime() {
|
|
4
|
-
const
|
|
5
|
-
|
|
18
|
+
const installed = Reflect.get(globalThis, runtimeKey);
|
|
19
|
+
const vue = isPlainObject(installed) ? installed.vue : void 0;
|
|
20
|
+
if (!isVueRuntime(vue)) throw new Error("SuperDoc rendering runtime is unavailable; initialize SuperDoc before rendering built-in surfaces.");
|
|
6
21
|
return vue;
|
|
7
22
|
}
|
|
8
23
|
function component(name) {
|
|
9
24
|
return new Proxy({}, {
|
|
10
25
|
get(_target, key) {
|
|
11
|
-
return runtime()[name]
|
|
26
|
+
return Reflect.get(runtime()[name], key);
|
|
12
27
|
},
|
|
13
28
|
set(_target, key, value) {
|
|
14
|
-
runtime()[name]
|
|
29
|
+
Reflect.set(runtime()[name], key, value);
|
|
15
30
|
return true;
|
|
16
31
|
},
|
|
17
32
|
has(_target, key) {
|
|
@@ -38,10 +53,10 @@ function defineComponent(options, extraOptions) {
|
|
|
38
53
|
}
|
|
39
54
|
var Transition = new Proxy((props, context) => runtime().Transition(props, context), {
|
|
40
55
|
get(_target, key) {
|
|
41
|
-
return runtime().Transition
|
|
56
|
+
return Reflect.get(runtime().Transition, key);
|
|
42
57
|
},
|
|
43
58
|
set(_target, key, value) {
|
|
44
|
-
runtime().Transition
|
|
59
|
+
Reflect.set(runtime().Transition, key, value);
|
|
45
60
|
return true;
|
|
46
61
|
},
|
|
47
62
|
has(_target, key) {
|
|
@@ -340,6 +355,18 @@ Object.defineProperty(exports, "inject", {
|
|
|
340
355
|
return inject;
|
|
341
356
|
}
|
|
342
357
|
});
|
|
358
|
+
Object.defineProperty(exports, "isObjectRecord", {
|
|
359
|
+
enumerable: true,
|
|
360
|
+
get: function() {
|
|
361
|
+
return isObjectRecord;
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
Object.defineProperty(exports, "isPlainObject", {
|
|
365
|
+
enumerable: true,
|
|
366
|
+
get: function() {
|
|
367
|
+
return isPlainObject;
|
|
368
|
+
}
|
|
369
|
+
});
|
|
343
370
|
Object.defineProperty(exports, "isReactive", {
|
|
344
371
|
enumerable: true,
|
|
345
372
|
get: function() {
|
|
@@ -352,6 +379,12 @@ Object.defineProperty(exports, "isRef", {
|
|
|
352
379
|
return isRef;
|
|
353
380
|
}
|
|
354
381
|
});
|
|
382
|
+
Object.defineProperty(exports, "isThenable", {
|
|
383
|
+
enumerable: true,
|
|
384
|
+
get: function() {
|
|
385
|
+
return isThenable;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
355
388
|
Object.defineProperty(exports, "markRaw", {
|
|
356
389
|
enumerable: true,
|
|
357
390
|
get: function() {
|
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
//#region src/
|
|
1
|
+
//#region src/helpers/object-guards.ts
|
|
2
|
+
function isPlainObject(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function isObjectRecord(value) {
|
|
6
|
+
return typeof value === "object" && value !== null;
|
|
7
|
+
}
|
|
8
|
+
function isThenable(value) {
|
|
9
|
+
return (typeof value === "object" || typeof value === "function") && value !== null && "then" in value && typeof value.then === "function";
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/core/v2-integration/internal-vue-runtime.ts
|
|
2
13
|
var runtimeKey = "__SUPERDOC_V2_BROWSER_RUNTIME__";
|
|
14
|
+
function isVueRuntime(value) {
|
|
15
|
+
return isPlainObject(value) && typeof value.createApp === "function";
|
|
16
|
+
}
|
|
3
17
|
function runtime() {
|
|
4
|
-
const
|
|
5
|
-
|
|
18
|
+
const installed = Reflect.get(globalThis, runtimeKey);
|
|
19
|
+
const vue = isPlainObject(installed) ? installed.vue : void 0;
|
|
20
|
+
if (!isVueRuntime(vue)) throw new Error("SuperDoc rendering runtime is unavailable; initialize SuperDoc before rendering built-in surfaces.");
|
|
6
21
|
return vue;
|
|
7
22
|
}
|
|
8
23
|
function component(name) {
|
|
9
24
|
return new Proxy({}, {
|
|
10
25
|
get(_target, key) {
|
|
11
|
-
return runtime()[name]
|
|
26
|
+
return Reflect.get(runtime()[name], key);
|
|
12
27
|
},
|
|
13
28
|
set(_target, key, value) {
|
|
14
|
-
runtime()[name]
|
|
29
|
+
Reflect.set(runtime()[name], key, value);
|
|
15
30
|
return true;
|
|
16
31
|
},
|
|
17
32
|
has(_target, key) {
|
|
@@ -38,10 +53,10 @@ function defineComponent(options, extraOptions) {
|
|
|
38
53
|
}
|
|
39
54
|
var Transition = new Proxy((props, context) => runtime().Transition(props, context), {
|
|
40
55
|
get(_target, key) {
|
|
41
|
-
return runtime().Transition
|
|
56
|
+
return Reflect.get(runtime().Transition, key);
|
|
42
57
|
},
|
|
43
58
|
set(_target, key, value) {
|
|
44
|
-
runtime().Transition
|
|
59
|
+
Reflect.set(runtime().Transition, key, value);
|
|
45
60
|
return true;
|
|
46
61
|
},
|
|
47
62
|
has(_target, key) {
|
|
@@ -214,4 +229,4 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
214
229
|
return target;
|
|
215
230
|
};
|
|
216
231
|
//#endregion
|
|
217
|
-
export { vModelSelect as $, onActivated as A, renderList as B, isRef as C, normalizeClass as D, nextTick as E, openBlock as F, toDisplayString as G, resolveDirective as H, provide as I, toRefs as J, toRaw as K, reactive as L, onDeactivated as M, onMounted as N, normalizeProps as O, onScopeDispose as P, vModelCheckbox as Q, readonly as R, isReactive as S, mergeProps as T, resolveDynamicComponent as U, renderSlot as V, shallowRef as W, useAttrs as X, unref as Y, useSlots as Z, getCurrentInstance as _, computed as a, withModifiers as at, hasInjectionContext as b, createCommentVNode as c, createStaticVNode as d, vModelText as et, createTextVNode as f, effectScope as g, defineComponent as h, Transition as i, withKeys as it, onBeforeUnmount as j, normalizeStyle as k, createElementBlock as l, defineAsyncComponent as m, Fragment as n, withCtx as nt, createApp as o, createVNode as p, toRef as q, Teleport as r, withDirectives as rt, createBlock as s, _plugin_vue_export_helper_default as t, watch as tt, createElementVNode as u, getCurrentScope as v, markRaw as w, inject as x, h as y, ref as z };
|
|
232
|
+
export { vModelSelect as $, onActivated as A, renderList as B, isRef as C, normalizeClass as D, nextTick as E, openBlock as F, toDisplayString as G, resolveDirective as H, provide as I, toRefs as J, toRaw as K, reactive as L, onDeactivated as M, onMounted as N, normalizeProps as O, onScopeDispose as P, vModelCheckbox as Q, readonly as R, isReactive as S, mergeProps as T, resolveDynamicComponent as U, renderSlot as V, shallowRef as W, useAttrs as X, unref as Y, useSlots as Z, getCurrentInstance as _, computed as a, withModifiers as at, hasInjectionContext as b, createCommentVNode as c, isThenable as ct, createStaticVNode as d, vModelText as et, createTextVNode as f, effectScope as g, defineComponent as h, Transition as i, withKeys as it, onBeforeUnmount as j, normalizeStyle as k, createElementBlock as l, defineAsyncComponent as m, Fragment as n, withCtx as nt, createApp as o, isObjectRecord as ot, createVNode as p, toRef as q, Teleport as r, withDirectives as rt, createBlock as s, isPlainObject as st, _plugin_vue_export_helper_default as t, watch as tt, createElementVNode as u, getCurrentScope as v, markRaw as w, inject as x, h as y, ref as z };
|