@harbour-enterprises/superdoc 0.19.0-next.5 → 0.19.0-next.7
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-C2898kqZ.es.js → PdfViewer-BUcY_aLU.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DaZtoNpm.cjs → PdfViewer-DtzjcoY1.cjs} +1 -1
- package/dist/chunks/{index-CkJ5hnvC.es.js → index-BfPgSGCT.es.js} +35 -3
- package/dist/chunks/{index-Di9R4Aas.cjs → index-Dic-WukZ.cjs} +35 -3
- package/dist/chunks/{super-editor.es-DG-S6GN9.cjs → super-editor.es-BxWpMXrO.cjs} +11034 -10912
- package/dist/chunks/{super-editor.es-kuaVTS8t.es.js → super-editor.es-ZzKFiBVd.es.js} +11034 -10912
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/stores/superdoc-store.d.ts +3 -0
- package/dist/stores/superdoc-store.d.ts.map +1 -1
- package/dist/style.css +6 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CrJvpQ8J.js → converter-D7JstO1X.js} +11850 -11774
- package/dist/super-editor/chunks/{docx-zipper-CHHaFCfj.js → docx-zipper-CxuVkw7R.js} +1 -1
- package/dist/super-editor/chunks/{editor-DlzGbfD-.js → editor-C3cafdFa.js} +140 -99
- package/dist/super-editor/chunks/{toolbar-DeKOVf4h.js → toolbar-BSez2SLg.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/src/core/Editor.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/exporter.d.ts +19 -1
- package/dist/super-editor/src/core/super-converter/v2/exporter/index.d.ts +0 -1
- package/dist/super-editor/src/core/super-converter/v2/importer/sdtNodeImporter.d.ts +8 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-annotation-node.d.ts +22 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-doc-part-obj.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-document-section-node.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-structured-content-node.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/parse-tag-value-json.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/sdt-node-type-strategy.d.ts +9 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-document-section.d.ts +7 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-field-annotation.d.ts +80 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-structured-content.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/index.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/sdt-translator.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +8 -8
- package/dist/super-editor/style.css +6 -6
- package/dist/super-editor/super-editor.es.js +13 -8
- 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 +11190 -11036
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/super-editor/src/core/super-converter/v2/exporter/documentSectionExporter.d.ts +0 -1
- package/dist/super-editor/src/core/super-converter/v2/importer/annotationImporter.d.ts +0 -9
- package/dist/super-editor/src/core/super-converter/v2/importer/docPartGalleryImporter.d.ts +0 -1
- package/dist/super-editor/src/core/super-converter/v2/importer/docPartObjImporter.d.ts +0 -4
- package/dist/super-editor/src/core/super-converter/v2/importer/structuredDocumentNodeImporter.d.ts +0 -8
|
@@ -10,7 +10,7 @@ export const TranslatorTypes: Readonly<{
|
|
|
10
10
|
* @typedef {keyof typeof TranslatorTypes} TranslatorTypeKey
|
|
11
11
|
* @typedef {typeof TranslatorTypes[TranslatorTypeKey]} TranslatorType
|
|
12
12
|
* @typedef {string} XmlNodeName
|
|
13
|
-
* @typedef {string} SuperDocNodeOrKeyName
|
|
13
|
+
* @typedef {string|string[]} SuperDocNodeOrKeyName
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
16
|
* @typedef {Object} AttrConfig
|
|
@@ -46,7 +46,7 @@ export const TranslatorTypes: Readonly<{
|
|
|
46
46
|
/**
|
|
47
47
|
* @typedef {Object} NodeTranslatorConfig
|
|
48
48
|
* @property {string} xmlName - The name of the node in OOXML
|
|
49
|
-
* @property {
|
|
49
|
+
* @property {SuperDocNodeOrKeyName} sdNodeOrKeyName - The name of the node in SuperDoc
|
|
50
50
|
* @property {TranslatorType} [type="node"] - The type of the translator.
|
|
51
51
|
* @property {NodeTranslatorEncodeFn} encode - The function to encode the data.
|
|
52
52
|
* @property {NodeTranslatorDecodeFn} [decode] - The function to decode the data.
|
|
@@ -66,7 +66,7 @@ export class NodeTranslator {
|
|
|
66
66
|
static from(config: NodeTranslatorConfig): NodeTranslator;
|
|
67
67
|
/**
|
|
68
68
|
* @param {string} xmlName
|
|
69
|
-
* @param {
|
|
69
|
+
* @param {SuperDocNodeOrKeyName} sdNodeOrKeyName
|
|
70
70
|
* @param {NodeTranslatorEncodeFn} encode
|
|
71
71
|
* @param {NodeTranslatorDecodeFn} decode
|
|
72
72
|
* @param {number} [priority]
|
|
@@ -74,11 +74,11 @@ export class NodeTranslator {
|
|
|
74
74
|
* @param {MatchesDecodeFn} [matchesDecode]
|
|
75
75
|
* @param {AttrConfig[]} [attributes]
|
|
76
76
|
*/
|
|
77
|
-
constructor(xmlName: string, sdNodeOrKeyName:
|
|
77
|
+
constructor(xmlName: string, sdNodeOrKeyName: SuperDocNodeOrKeyName, encode: NodeTranslatorEncodeFn, decode: NodeTranslatorDecodeFn, priority?: number, matchesEncode?: MatchesEncodeFn, matchesDecode?: MatchesDecodeFn, attributes?: AttrConfig[]);
|
|
78
78
|
/** @type {string} */
|
|
79
79
|
xmlName: string;
|
|
80
|
-
/** @type {
|
|
81
|
-
sdNodeOrKeyName:
|
|
80
|
+
/** @type {SuperDocNodeOrKeyName} */
|
|
81
|
+
sdNodeOrKeyName: SuperDocNodeOrKeyName;
|
|
82
82
|
/** @type {number} */
|
|
83
83
|
priority: number;
|
|
84
84
|
/** @type {NodeTranslatorEncodeFn} */
|
|
@@ -124,7 +124,7 @@ export class NodeTranslator {
|
|
|
124
124
|
export type TranslatorTypeKey = keyof typeof TranslatorTypes;
|
|
125
125
|
export type TranslatorType = (typeof TranslatorTypes)[TranslatorTypeKey];
|
|
126
126
|
export type XmlNodeName = string;
|
|
127
|
-
export type SuperDocNodeOrKeyName = string;
|
|
127
|
+
export type SuperDocNodeOrKeyName = string | string[];
|
|
128
128
|
export type AttrConfig = {
|
|
129
129
|
/**
|
|
130
130
|
* - The name of the attribute in OOXML
|
|
@@ -173,7 +173,7 @@ export type NodeTranslatorConfig = {
|
|
|
173
173
|
/**
|
|
174
174
|
* - The name of the node in SuperDoc
|
|
175
175
|
*/
|
|
176
|
-
sdNodeOrKeyName:
|
|
176
|
+
sdNodeOrKeyName: SuperDocNodeOrKeyName;
|
|
177
177
|
/**
|
|
178
178
|
* - The type of the translator.
|
|
179
179
|
*/
|
|
@@ -1798,10 +1798,10 @@ on the right if it is inside shape textbox.
|
|
|
1798
1798
|
min-height: 40px;
|
|
1799
1799
|
}
|
|
1800
1800
|
|
|
1801
|
-
.editor-element[data-v-
|
|
1801
|
+
.editor-element[data-v-0c36dd72] {
|
|
1802
1802
|
position: relative;
|
|
1803
1803
|
}
|
|
1804
|
-
.super-editor-container[data-v-
|
|
1804
|
+
.super-editor-container[data-v-0c36dd72] {
|
|
1805
1805
|
width: auto;
|
|
1806
1806
|
height: auto;
|
|
1807
1807
|
min-width: 8in;
|
|
@@ -1810,13 +1810,13 @@ on the right if it is inside shape textbox.
|
|
|
1810
1810
|
display: flex;
|
|
1811
1811
|
flex-direction: column;
|
|
1812
1812
|
}
|
|
1813
|
-
.ruler[data-v-
|
|
1813
|
+
.ruler[data-v-0c36dd72] {
|
|
1814
1814
|
margin-bottom: 2px;
|
|
1815
1815
|
}
|
|
1816
|
-
.super-editor[data-v-
|
|
1816
|
+
.super-editor[data-v-0c36dd72] {
|
|
1817
1817
|
color: initial;
|
|
1818
1818
|
}
|
|
1819
|
-
.placeholder-editor[data-v-
|
|
1819
|
+
.placeholder-editor[data-v-0c36dd72] {
|
|
1820
1820
|
position: absolute;
|
|
1821
1821
|
top: 0;
|
|
1822
1822
|
left: 0;
|
|
@@ -1828,7 +1828,7 @@ on the right if it is inside shape textbox.
|
|
|
1828
1828
|
background-color: white;
|
|
1829
1829
|
box-sizing: border-box;
|
|
1830
1830
|
}
|
|
1831
|
-
.placeholder-title[data-v-
|
|
1831
|
+
.placeholder-title[data-v-0c36dd72] {
|
|
1832
1832
|
display: flex;
|
|
1833
1833
|
justify-content: center;
|
|
1834
1834
|
margin-bottom: 40px;
|
|
@@ -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 { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, ar as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as translator, aG as translator$1, aH as translator$2, a as Plugin } from "./chunks/converter-
|
|
13
|
-
import { aI, a5, i, a2 } from "./chunks/converter-
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { k, C, l, T, i as i2, m, j } from "./chunks/editor-
|
|
12
|
+
import { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, ar as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as translator, aG as translator$1, aH as translator$2, a as Plugin } from "./chunks/converter-D7JstO1X.js";
|
|
13
|
+
import { aI, a5, i, a2 } from "./chunks/converter-D7JstO1X.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-C3cafdFa.js";
|
|
15
|
+
import { k, C, l, T, i as i2, m, j } from "./chunks/editor-C3cafdFa.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-BSez2SLg.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-CxuVkw7R.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -3003,7 +3003,9 @@ class SuperToolbar extends EventEmitter {
|
|
|
3003
3003
|
} else if (typeof command === "function") {
|
|
3004
3004
|
command({ item, argument, option });
|
|
3005
3005
|
} else {
|
|
3006
|
-
|
|
3006
|
+
const error = new Error(`[super-toolbar 🎨] Command not found: ${command}`);
|
|
3007
|
+
this.emit("exception", { error, editor: this.activeEditor });
|
|
3008
|
+
throw error;
|
|
3007
3009
|
}
|
|
3008
3010
|
this.updateToolbarState();
|
|
3009
3011
|
}
|
|
@@ -4303,6 +4305,9 @@ const _sfc_main$1 = {
|
|
|
4303
4305
|
return { content: docx, media, mediaFiles, fonts };
|
|
4304
4306
|
} catch (err) {
|
|
4305
4307
|
console.debug("Error loading new file data:", err);
|
|
4308
|
+
if (typeof props.options.onException === "function") {
|
|
4309
|
+
props.options.onException({ error: err, editor: null });
|
|
4310
|
+
}
|
|
4306
4311
|
}
|
|
4307
4312
|
};
|
|
4308
4313
|
const initializeData = async () => {
|
|
@@ -4505,7 +4510,7 @@ const _sfc_main$1 = {
|
|
|
4505
4510
|
};
|
|
4506
4511
|
}
|
|
4507
4512
|
};
|
|
4508
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
4513
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-0c36dd72"]]);
|
|
4509
4514
|
const _hoisted_1 = ["innerHTML"];
|
|
4510
4515
|
const _sfc_main = {
|
|
4511
4516
|
__name: "SuperInput",
|
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-BxWpMXrO.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-ZzKFiBVd.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-BxWpMXrO.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Dic-WukZ.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-ZzKFiBVd.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-BfPgSGCT.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";
|