@harbour-enterprises/superdoc 0.21.0-next.2 → 0.21.0-next.4
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/{PdfViewer-BkXBRXPs.es.js → PdfViewer-D3zo7tPo.es.js} +1 -1
- package/dist/chunks/{PdfViewer-1mNuyy3m.cjs → PdfViewer-OZDJ7gwT.cjs} +1 -1
- package/dist/chunks/{index-BB3Qn69u.cjs → index-CfYf4T_z.cjs} +2 -2
- package/dist/chunks/{index-C-44kxYe.es.js → index-MzW5BVNd.es.js} +2 -2
- package/dist/core/SuperDoc.d.ts +21 -569
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +396 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{docx-zipper-BWZ2o1H5.js → docx-zipper-CZdELYi-.js} +1 -1
- package/dist/super-editor/chunks/{editor-XsrBXzy-.js → editor-BqYH4kDD.js} +2 -2
- package/dist/super-editor/chunks/{toolbar-tBWlOBPh.js → toolbar-TkaE2kKM.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +12 -12
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -5
- package/npm-deprecation-notice.cjs +0 -10
- package/dist/chunks/{super-editor.es-CKw7iZcz.es.js → super-editor.es-Bntob7Wd.es.js} +12 -12
- package/dist/chunks/{super-editor.es-Dd0joLAR.cjs → super-editor.es-U-GVCd_F.cjs} +12 -12
- package/dist/super-editor/chunks/{converter-FESR2WO7.js → converter-3xnF_NHq.js} +12 -12
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The current user of this superdoc
|
|
3
|
+
*/
|
|
4
|
+
export type User = {
|
|
5
|
+
/**
|
|
6
|
+
* The user's name
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* The user's email
|
|
11
|
+
*/
|
|
12
|
+
email: string;
|
|
13
|
+
/**
|
|
14
|
+
* The user's photo
|
|
15
|
+
*/
|
|
16
|
+
image?: string | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Telemetry configuration
|
|
20
|
+
*/
|
|
21
|
+
export type TelemetryConfig = {
|
|
22
|
+
/**
|
|
23
|
+
* Whether telemetry is enabled
|
|
24
|
+
*/
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The licence key for telemetry
|
|
28
|
+
*/
|
|
29
|
+
licenseKey?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The endpoint for telemetry
|
|
32
|
+
*/
|
|
33
|
+
endpoint?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The version of the superdoc
|
|
36
|
+
*/
|
|
37
|
+
superdocVersion?: string;
|
|
38
|
+
};
|
|
39
|
+
export type Document = {
|
|
40
|
+
/**
|
|
41
|
+
* The ID of the document
|
|
42
|
+
*/
|
|
43
|
+
id?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The type of the document
|
|
46
|
+
*/
|
|
47
|
+
type: string;
|
|
48
|
+
/**
|
|
49
|
+
* The initial data of the document (File, Blob, or null)
|
|
50
|
+
*/
|
|
51
|
+
data?: File | Blob | null;
|
|
52
|
+
/**
|
|
53
|
+
* The name of the document
|
|
54
|
+
*/
|
|
55
|
+
name?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The URL of the document
|
|
58
|
+
*/
|
|
59
|
+
url?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the document is a new file
|
|
62
|
+
*/
|
|
63
|
+
isNewFile?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The Yjs document for collaboration
|
|
66
|
+
*/
|
|
67
|
+
ydoc?: import("yjs").Doc;
|
|
68
|
+
/**
|
|
69
|
+
* The provider for collaboration
|
|
70
|
+
*/
|
|
71
|
+
provider?: import("@hocuspocus/provider").HocuspocusProvider;
|
|
72
|
+
};
|
|
73
|
+
export type Modules = {
|
|
74
|
+
/**
|
|
75
|
+
* Comments module configuration
|
|
76
|
+
*/
|
|
77
|
+
comments?: any;
|
|
78
|
+
/**
|
|
79
|
+
* AI module configuration
|
|
80
|
+
*/
|
|
81
|
+
ai?: {
|
|
82
|
+
apiKey?: string;
|
|
83
|
+
endpoint?: string;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Collaboration module configuration
|
|
87
|
+
*/
|
|
88
|
+
collaboration?: any;
|
|
89
|
+
/**
|
|
90
|
+
* Toolbar module configuration
|
|
91
|
+
*/
|
|
92
|
+
toolbar?: any;
|
|
93
|
+
};
|
|
94
|
+
export type Editor = {
|
|
95
|
+
setHighContrastMode: (value: any) => void;
|
|
96
|
+
get docChanged(): boolean;
|
|
97
|
+
mount(el: any): void;
|
|
98
|
+
unmount(): void;
|
|
99
|
+
view: any;
|
|
100
|
+
setToolbar(toolbar: any): void;
|
|
101
|
+
toolbar: any;
|
|
102
|
+
focus(): void;
|
|
103
|
+
get state(): any;
|
|
104
|
+
get storage(): any;
|
|
105
|
+
readonly commands: any;
|
|
106
|
+
readonly helpers: EditorHelpers;
|
|
107
|
+
get isEditable(): boolean;
|
|
108
|
+
get isDestroyed(): boolean;
|
|
109
|
+
get element(): HTMLElement;
|
|
110
|
+
get users(): Array<User>;
|
|
111
|
+
chain(): any;
|
|
112
|
+
can(): any;
|
|
113
|
+
setDocumentMode(documentMode: string): void;
|
|
114
|
+
generateCollaborationUpdate(): Promise<Uint8Array>;
|
|
115
|
+
initializeCollaborationData(): void;
|
|
116
|
+
replaceContent(content: object): void;
|
|
117
|
+
setOptions(options?: EditorOptions): void;
|
|
118
|
+
options: any;
|
|
119
|
+
setEditable(editable?: boolean, emitUpdate?: boolean): void;
|
|
120
|
+
registerPlugin(plugin: any, handlePlugins: any): void;
|
|
121
|
+
unregisterPlugin(nameOrPluginKey: string | any): void;
|
|
122
|
+
createNodeViews(): void;
|
|
123
|
+
getMaxContentSize(): any;
|
|
124
|
+
updateEditorStyles(element: any, proseMirror: any, hasPaginationEnabled?: boolean): void;
|
|
125
|
+
initDefaultStyles(element?: HTMLElement, isPaginationEnabled?: boolean): void;
|
|
126
|
+
initMobileStyles(element: HTMLElement | void): void;
|
|
127
|
+
getAttributes(nameOrType: string): any;
|
|
128
|
+
isActive(nameOrAttributes: string | any, attributesOrUndefined?: any): boolean;
|
|
129
|
+
getJSON(): any;
|
|
130
|
+
getHTML({ unflattenLists }?: {
|
|
131
|
+
unflattenLists?: boolean;
|
|
132
|
+
}): string;
|
|
133
|
+
createChildEditor(options: EditorOptions): {
|
|
134
|
+
new (options: EditorOptions): /*elided*/ any;
|
|
135
|
+
loadXmlData(fileSource: File | Blob | Buffer, isNode2?: boolean): Promise<any[]>;
|
|
136
|
+
getDocumentVersion(doc2: any): string;
|
|
137
|
+
updateDocumentVersion(doc2: any, version2: any): any;
|
|
138
|
+
checkIfMigrationsNeeded(): boolean;
|
|
139
|
+
};
|
|
140
|
+
getPageStyles(): any;
|
|
141
|
+
updatePageStyle({ pageMargins }: {
|
|
142
|
+
pageMargins: any;
|
|
143
|
+
}): void;
|
|
144
|
+
migrateListsToV2(): any[];
|
|
145
|
+
getUpdatedJson(): any;
|
|
146
|
+
exportDocx({ isFinalDoc, commentsType, exportJsonOnly, exportXmlOnly, comments, getUpdatedDocs, fieldsHighlightColor }?: {
|
|
147
|
+
isFinalDoc?: boolean;
|
|
148
|
+
commentsType?: string;
|
|
149
|
+
comments?: any[];
|
|
150
|
+
getUpdatedDocs?: boolean;
|
|
151
|
+
}): Promise<Blob | ArrayBuffer | any>;
|
|
152
|
+
destroy(): void;
|
|
153
|
+
destroyHeaderFooterEditors(): void;
|
|
154
|
+
processCollaborationMigrations(): any | void;
|
|
155
|
+
replaceFile(newFile: any): Promise<void>;
|
|
156
|
+
getInternalXmlFile(name: string, type?: string): any | string;
|
|
157
|
+
updateInternalXmlFile(name: string, updatedContent: string): void;
|
|
158
|
+
getNodesOfType(type: string): any[];
|
|
159
|
+
replaceNodeWithHTML(targetNode: any, html: string): void;
|
|
160
|
+
prepareForAnnotations(annotationValues?: FieldValue[]): void;
|
|
161
|
+
migrateParagraphFields(annotationValues?: FieldValue[]): Promise<FieldValue[]>;
|
|
162
|
+
annotate(annotationValues?: FieldValue[], hiddenIds?: string[], removeEmptyFields?: boolean): void;
|
|
163
|
+
previewAnnotations(annotationValues?: any[], hiddenIds?: string[]): void;
|
|
164
|
+
originalState: any;
|
|
165
|
+
closePreview(): void;
|
|
166
|
+
on(name: string, fn2: any): void;
|
|
167
|
+
emit(name: string, ...args: any[]): void;
|
|
168
|
+
off(name: string, fn2: any): void;
|
|
169
|
+
once(name: string, fn2: any): void;
|
|
170
|
+
removeAllListeners(): void;
|
|
171
|
+
};
|
|
172
|
+
export type SuperDoc = import("../SuperDoc.js").SuperDoc;
|
|
173
|
+
export type DocumentMode = string;
|
|
174
|
+
export type Config = {
|
|
175
|
+
/**
|
|
176
|
+
* The ID of the SuperDoc
|
|
177
|
+
*/
|
|
178
|
+
superdocId?: string;
|
|
179
|
+
/**
|
|
180
|
+
* The selector to mount the SuperDoc into
|
|
181
|
+
*/
|
|
182
|
+
selector: string;
|
|
183
|
+
/**
|
|
184
|
+
* The mode of the document
|
|
185
|
+
*/
|
|
186
|
+
documentMode: DocumentMode;
|
|
187
|
+
/**
|
|
188
|
+
* The role of the user in this SuperDoc
|
|
189
|
+
*/
|
|
190
|
+
role?: "editor" | "viewer" | "suggester";
|
|
191
|
+
/**
|
|
192
|
+
* The document to load. If a string, it will be treated as a URL. If a File or Blob, it will be used directly.
|
|
193
|
+
*/
|
|
194
|
+
document?: any | string | File | Blob;
|
|
195
|
+
/**
|
|
196
|
+
* The documents to load
|
|
197
|
+
*/
|
|
198
|
+
documents: Array<Document>;
|
|
199
|
+
/**
|
|
200
|
+
* The current user of this SuperDoc
|
|
201
|
+
*/
|
|
202
|
+
user?: User;
|
|
203
|
+
/**
|
|
204
|
+
* All users of this SuperDoc (can be used for "@"-mentions)
|
|
205
|
+
*/
|
|
206
|
+
users?: Array<User>;
|
|
207
|
+
/**
|
|
208
|
+
* Colors to use for user awareness
|
|
209
|
+
*/
|
|
210
|
+
colors?: Array<string>;
|
|
211
|
+
/**
|
|
212
|
+
* Modules to load
|
|
213
|
+
*/
|
|
214
|
+
modules?: Modules;
|
|
215
|
+
/**
|
|
216
|
+
* Whether to show pagination in SuperEditors
|
|
217
|
+
*/
|
|
218
|
+
pagination?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Optional DOM element to render the toolbar in
|
|
221
|
+
*/
|
|
222
|
+
toolbar?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Toolbar groups to show
|
|
225
|
+
*/
|
|
226
|
+
toolbarGroups?: Array<string>;
|
|
227
|
+
/**
|
|
228
|
+
* Icons to show in the toolbar
|
|
229
|
+
*/
|
|
230
|
+
toolbarIcons?: any;
|
|
231
|
+
/**
|
|
232
|
+
* Texts to override in the toolbar
|
|
233
|
+
*/
|
|
234
|
+
toolbarTexts?: any;
|
|
235
|
+
/**
|
|
236
|
+
* Whether the SuperDoc is in development mode
|
|
237
|
+
*/
|
|
238
|
+
isDev?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Telemetry configuration
|
|
241
|
+
*/
|
|
242
|
+
telemetry?: TelemetryConfig;
|
|
243
|
+
/**
|
|
244
|
+
* Callback before an editor is created
|
|
245
|
+
*/
|
|
246
|
+
onEditorBeforeCreate?: (editor: Editor) => void;
|
|
247
|
+
/**
|
|
248
|
+
* Callback after an editor is created
|
|
249
|
+
*/
|
|
250
|
+
onEditorCreate?: (editor: Editor) => void;
|
|
251
|
+
/**
|
|
252
|
+
* Callback when a transaction is made
|
|
253
|
+
*/
|
|
254
|
+
onTransaction?: (params: {
|
|
255
|
+
editor: Editor;
|
|
256
|
+
transaction: any;
|
|
257
|
+
duration: number;
|
|
258
|
+
}) => void;
|
|
259
|
+
/**
|
|
260
|
+
* Callback after an editor is destroyed
|
|
261
|
+
*/
|
|
262
|
+
onEditorDestroy?: () => void;
|
|
263
|
+
/**
|
|
264
|
+
* Callback when there is an error in the content
|
|
265
|
+
*/
|
|
266
|
+
onContentError?: (params: {
|
|
267
|
+
error: object;
|
|
268
|
+
editor: Editor;
|
|
269
|
+
documentId: string;
|
|
270
|
+
file: File;
|
|
271
|
+
}) => void;
|
|
272
|
+
/**
|
|
273
|
+
* Callback when the SuperDoc is ready
|
|
274
|
+
*/
|
|
275
|
+
onReady?: (editor: {
|
|
276
|
+
superdoc: SuperDoc;
|
|
277
|
+
}) => void;
|
|
278
|
+
/**
|
|
279
|
+
* Callback when comments are updated
|
|
280
|
+
*/
|
|
281
|
+
onCommentsUpdate?: (params: {
|
|
282
|
+
type: string;
|
|
283
|
+
data: object;
|
|
284
|
+
}) => void;
|
|
285
|
+
/**
|
|
286
|
+
* Callback when awareness is updated
|
|
287
|
+
*/
|
|
288
|
+
onAwarenessUpdate?: (params: {
|
|
289
|
+
context: SuperDoc;
|
|
290
|
+
states: any[];
|
|
291
|
+
}) => void;
|
|
292
|
+
/**
|
|
293
|
+
* Callback when the SuperDoc is locked
|
|
294
|
+
*/
|
|
295
|
+
onLocked?: (params: {
|
|
296
|
+
isLocked: boolean;
|
|
297
|
+
lockedBy: User;
|
|
298
|
+
}) => void;
|
|
299
|
+
/**
|
|
300
|
+
* Callback when the PDF document is ready
|
|
301
|
+
*/
|
|
302
|
+
onPdfDocumentReady?: () => void;
|
|
303
|
+
/**
|
|
304
|
+
* Callback when the sidebar is toggled
|
|
305
|
+
*/
|
|
306
|
+
onSidebarToggle?: (isOpened: boolean) => void;
|
|
307
|
+
/**
|
|
308
|
+
* Callback when collaboration is ready
|
|
309
|
+
*/
|
|
310
|
+
onCollaborationReady?: (params: {
|
|
311
|
+
editor: Editor;
|
|
312
|
+
}) => void;
|
|
313
|
+
/**
|
|
314
|
+
* Callback when document is updated
|
|
315
|
+
*/
|
|
316
|
+
onEditorUpdate?: (params: {
|
|
317
|
+
editor: Editor;
|
|
318
|
+
}) => void;
|
|
319
|
+
/**
|
|
320
|
+
* Callback when an exception is thrown
|
|
321
|
+
*/
|
|
322
|
+
onException?: (params: {
|
|
323
|
+
error: Error;
|
|
324
|
+
}) => void;
|
|
325
|
+
/**
|
|
326
|
+
* Callback when the comments list is rendered
|
|
327
|
+
*/
|
|
328
|
+
onCommentsListChange?: (params: {
|
|
329
|
+
isRendered: boolean;
|
|
330
|
+
}) => void;
|
|
331
|
+
/**
|
|
332
|
+
* Callback when the list definitions change
|
|
333
|
+
*/
|
|
334
|
+
onListDefinitionsChange?: (params: {}) => any;
|
|
335
|
+
/**
|
|
336
|
+
* The format of the document (docx, pdf, html)
|
|
337
|
+
*/
|
|
338
|
+
format?: string;
|
|
339
|
+
/**
|
|
340
|
+
* The extensions to load for the editor
|
|
341
|
+
*/
|
|
342
|
+
editorExtensions?: any[];
|
|
343
|
+
/**
|
|
344
|
+
* Whether the SuperDoc is internal
|
|
345
|
+
*/
|
|
346
|
+
isInternal?: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* The title of the SuperDoc
|
|
349
|
+
*/
|
|
350
|
+
title?: string;
|
|
351
|
+
/**
|
|
352
|
+
* The conversations to load
|
|
353
|
+
*/
|
|
354
|
+
conversations?: any[];
|
|
355
|
+
/**
|
|
356
|
+
* Whether the SuperDoc is locked
|
|
357
|
+
*/
|
|
358
|
+
isLocked?: boolean;
|
|
359
|
+
/**
|
|
360
|
+
* The function to handle image uploads
|
|
361
|
+
*/
|
|
362
|
+
handleImageUpload?: (arg0: File) => Promise<string>;
|
|
363
|
+
/**
|
|
364
|
+
* The user who locked the SuperDoc
|
|
365
|
+
*/
|
|
366
|
+
lockedBy?: User;
|
|
367
|
+
/**
|
|
368
|
+
* Whether to show the ruler in the editor
|
|
369
|
+
*/
|
|
370
|
+
rulers?: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Whether to suppress default styles in docx mode
|
|
373
|
+
*/
|
|
374
|
+
suppressDefaultDocxStyles?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Provided JSON to override content with
|
|
377
|
+
*/
|
|
378
|
+
jsonOverride?: any;
|
|
379
|
+
/**
|
|
380
|
+
* Whether to disable slash / right-click custom context menu
|
|
381
|
+
*/
|
|
382
|
+
disableContextMenu?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* HTML content to initialize the editor with
|
|
385
|
+
*/
|
|
386
|
+
html?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Markdown content to initialize the editor with
|
|
389
|
+
*/
|
|
390
|
+
markdown?: string;
|
|
391
|
+
/**
|
|
392
|
+
* Whether to enable debug mode
|
|
393
|
+
*/
|
|
394
|
+
isDebug?: boolean;
|
|
395
|
+
};
|
|
396
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-3xnF_NHq.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-BqYH4kDD.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, au as commonjsGlobal, B as Buffer, av as getDefaultExportFromCjs, aw as getContentTypesFromXml, ax as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, au as commonjsGlobal, B as Buffer, av as getDefaultExportFromCjs, aw as getContentTypesFromXml, ax as xmljs } from "./converter-3xnF_NHq.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as SelectionRange, ao as Transform, ap as isInTable$1, aq as generateDocxRandomId, ar as insertNewRelationship, as as updateDOMAttributes, at as htmlHandler } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as SelectionRange, ao as Transform, ap as isInTable$1, aq as generateDocxRandomId, ar as insertNewRelationship, as as updateDOMAttributes, at as htmlHandler } from "./converter-3xnF_NHq.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-CZdELYi-.js";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
20
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-3xnF_NHq.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BqYH4kDD.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-BqYH4kDD.js";
|
|
2
|
+
import "./chunks/converter-3xnF_NHq.js";
|
|
3
|
+
import "./chunks/docx-zipper-CZdELYi-.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { b2, a5, i, a2 } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { n, C, o, T, l, p, m } from "./chunks/editor-
|
|
12
|
+
import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, a as Plugin } from "./chunks/converter-3xnF_NHq.js";
|
|
13
|
+
import { b2, a5, i, a2 } from "./chunks/converter-3xnF_NHq.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-BqYH4kDD.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-BqYH4kDD.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-TkaE2kKM.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-CZdELYi-.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-U-GVCd_F.cjs");
|
|
4
4
|
require("./chunks/vue-DWle4Cai.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-Bntob7Wd.es.js";
|
|
2
2
|
import "./chunks/vue-CXxsqYcP.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-U-GVCd_F.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-CfYf4T_z.cjs");
|
|
5
5
|
require("./chunks/vue-DWle4Cai.cjs");
|
|
6
6
|
require("./chunks/jszip-b7l8QkfH.cjs");
|
|
7
7
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-Bntob7Wd.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-MzW5BVNd.es.js";
|
|
3
3
|
import "./chunks/vue-CXxsqYcP.es.js";
|
|
4
4
|
import "./chunks/jszip-B8KIZSNe.es.js";
|
|
5
5
|
import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -31938,18 +31938,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
31938
31938
|
}
|
|
31939
31939
|
]
|
|
31940
31940
|
};
|
|
31941
|
-
const sanitizeDocxMediaName = (value, fallback = "image") => {
|
|
31942
|
-
if (!value) return fallback;
|
|
31943
|
-
const sanitized = value.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
31944
|
-
return sanitized || fallback;
|
|
31945
|
-
};
|
|
31946
|
-
const getFallbackImageNameFromDataUri = (src = "", fallback = "image") => {
|
|
31947
|
-
if (!src || typeof src !== "string") return fallback;
|
|
31948
|
-
const [prefix2] = src.split(";");
|
|
31949
|
-
const [, maybeType] = prefix2.split("/");
|
|
31950
|
-
const extension = maybeType?.toLowerCase();
|
|
31951
|
-
return extension ? `${fallback}.${extension}` : fallback;
|
|
31952
|
-
};
|
|
31953
31941
|
const TranslatorTypes = Object.freeze({
|
|
31954
31942
|
NODE: "node",
|
|
31955
31943
|
ATTRIBUTE: "attribute"
|
|
@@ -36071,6 +36059,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36071
36059
|
}
|
|
36072
36060
|
return handleImageNode(node, params2, true);
|
|
36073
36061
|
}
|
|
36062
|
+
const sanitizeDocxMediaName = (value, fallback = "image") => {
|
|
36063
|
+
if (!value) return fallback;
|
|
36064
|
+
const sanitized = value.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
36065
|
+
return sanitized || fallback;
|
|
36066
|
+
};
|
|
36067
|
+
const getFallbackImageNameFromDataUri = (src = "", fallback = "image") => {
|
|
36068
|
+
if (!src || typeof src !== "string") return fallback;
|
|
36069
|
+
const [prefix2] = src.split(";");
|
|
36070
|
+
const [, maybeType] = prefix2.split("/");
|
|
36071
|
+
const extension = maybeType?.toLowerCase();
|
|
36072
|
+
return extension ? `${fallback}.${extension}` : fallback;
|
|
36073
|
+
};
|
|
36074
36074
|
const translateImageNode = (params2) => {
|
|
36075
36075
|
const {
|
|
36076
36076
|
node: { attrs = {} },
|