@harbour-enterprises/superdoc 0.29.0-next.6 → 0.29.0-next.8
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-DBfl4V6j.es.js → PdfViewer-D52oZlMN.es.js} +2 -2
- package/dist/chunks/{PdfViewer-kTifNldY.cjs → PdfViewer-DN5OVJ2m.cjs} +1 -1
- package/dist/chunks/{eventemitter3-xrnx5jJP.es.js → eventemitter3-D4gv5QOO.es.js} +1 -1
- package/dist/chunks/{index-Caa0JKTo.es.js → index-Ckp6Xz_9.es.js} +166 -121
- package/dist/chunks/{index-D9lamqZc-xeA1gYMV.cjs → index-D08c3nkG-CEL2t8xk.cjs} +1 -1
- package/dist/chunks/{index-D9lamqZc-CwcGCvi6.es.js → index-D08c3nkG-DhTHMiRT.es.js} +1 -1
- package/dist/chunks/{index-kFJxUsf3.cjs → index-l9QIxky6.cjs} +164 -119
- package/dist/chunks/{jszip-9Y3n05fi.es.js → jszip-Bhl-Iudl.es.js} +1 -1
- package/dist/chunks/{super-editor.es-D6Olq3ex.es.js → super-editor.es-BMKdFBfO.es.js} +148 -112
- package/dist/chunks/{super-editor.es-DkfNbRLe.cjs → super-editor.es-DfufVFpB.cjs} +146 -110
- package/dist/chunks/{vue-DVNiXx7E.es.js → vue-D1vcEBAQ.es.js} +17 -17
- package/dist/chunks/xml-js-jMPlIVKT.es.js +2 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/comment-schemas.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/helpers.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/types.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-conversation.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-floating-comment.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/PdfViewer/helpers/range.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/PdfViewer/helpers/read-file.d.ts.map +1 -0
- package/dist/packages/superdoc/src/components/PdfViewer/pdf/pdf-adapter.d.ts.map +1 -0
- package/dist/packages/superdoc/src/composables/use-ai.d.ts.map +1 -0
- package/dist/packages/superdoc/src/composables/use-document.d.ts.map +1 -0
- package/dist/packages/superdoc/src/composables/use-field.d.ts.map +1 -0
- package/dist/packages/superdoc/src/composables/use-high-contrast-mode.d.ts.map +1 -0
- package/dist/packages/superdoc/src/composables/use-selected-text.d.ts.map +1 -0
- package/dist/{core → packages/superdoc/src/core}/SuperDoc.d.ts +1 -1
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/collaboration/helpers.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/collaboration/permissions.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/create-app.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/helpers/export.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/helpers/file.d.ts.map +1 -0
- package/dist/{core → packages/superdoc/src/core}/index.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -0
- package/dist/packages/superdoc/src/helpers/floor.d.ts.map +1 -0
- package/dist/packages/superdoc/src/helpers/group-changes.d.ts.map +1 -0
- package/dist/packages/superdoc/src/helpers/use-selection.d.ts.map +1 -0
- package/dist/{icons.d.ts.map → packages/superdoc/src/icons.d.ts.map} +1 -1
- package/dist/{index.d.ts → packages/superdoc/src/index.d.ts} +5 -5
- package/dist/packages/superdoc/src/index.d.ts.map +1 -0
- package/dist/packages/superdoc/src/main.d.ts.map +1 -0
- package/dist/{stores → packages/superdoc/src/stores}/comments-store.d.ts +36 -36
- package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -0
- package/dist/packages/superdoc/src/stores/hrbr-fields-store.d.ts.map +1 -0
- package/dist/{stores → packages/superdoc/src/stores}/superdoc-store.d.ts +110 -110
- package/dist/{stores → packages/superdoc/src/stores}/superdoc-store.d.ts.map +1 -1
- package/dist/{super-editor.d.ts.map → packages/superdoc/src/super-editor.d.ts.map} +1 -1
- package/dist/shared/common/Telemetry.d.ts +237 -0
- package/dist/shared/common/Telemetry.d.ts.map +1 -0
- package/dist/shared/common/collaboration/awareness.d.ts +39 -0
- package/dist/shared/common/collaboration/awareness.d.ts.map +1 -0
- package/dist/shared/common/document-types.d.ts +10 -0
- package/dist/shared/common/document-types.d.ts.map +1 -0
- package/dist/shared/common/event-types.d.ts +14 -0
- package/dist/shared/common/event-types.d.ts.map +1 -0
- package/dist/shared/common/helpers/compare-superdoc-versions.d.ts +8 -0
- package/dist/shared/common/helpers/compare-superdoc-versions.d.ts.map +1 -0
- package/dist/shared/common/helpers/get-file-object.d.ts +50 -0
- package/dist/shared/common/helpers/get-file-object.d.ts.map +1 -0
- package/dist/shared/common/helpers/v-click-outside.d.ts +11 -0
- package/dist/shared/common/helpers/v-click-outside.d.ts.map +1 -0
- package/dist/shared/common/index.d.ts +10 -0
- package/dist/shared/common/index.d.ts.map +1 -0
- package/dist/shared/common/key-transform.d.ts +44 -0
- package/dist/shared/common/key-transform.d.ts.map +1 -0
- package/dist/style.css +56 -56
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-6BwN6uD7.js → converter-CqYeAv65.js} +331 -50
- package/dist/super-editor/chunks/{docx-zipper-uOVWdyXU.js → docx-zipper-C97RawM-.js} +1 -1
- package/dist/super-editor/chunks/{editor-D-ahyJjH.js → editor-BrxCRICL.js} +7 -6
- package/dist/super-editor/chunks/{index-D9lamqZc.js → index-D08c3nkG.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-DlZ3uQM7.js → toolbar-B33VzEsn.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -2
- 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/style.css +29 -29
- package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/strike/strike.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/index.d.ts +0 -1
- package/dist/super-editor/super-editor/src/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +77 -50
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +3 -3
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -3
- package/dist/superdoc.es.js +2 -3
- package/dist/superdoc.umd.js +44279 -44198
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/xml-js-ByyNjzYS.es.js +0 -2
- package/dist/components/CommentsLayer/comment-schemas.d.ts.map +0 -1
- package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +0 -1
- package/dist/components/CommentsLayer/helpers.d.ts.map +0 -1
- package/dist/components/CommentsLayer/types.d.ts.map +0 -1
- package/dist/components/CommentsLayer/use-comment.d.ts.map +0 -1
- package/dist/components/CommentsLayer/use-conversation.d.ts.map +0 -1
- package/dist/components/CommentsLayer/use-floating-comment.d.ts.map +0 -1
- package/dist/components/PdfViewer/helpers/range.d.ts.map +0 -1
- package/dist/components/PdfViewer/helpers/read-file.d.ts.map +0 -1
- package/dist/components/PdfViewer/pdf/pdf-adapter.d.ts.map +0 -1
- package/dist/composables/use-ai.d.ts.map +0 -1
- package/dist/composables/use-document.d.ts.map +0 -1
- package/dist/composables/use-field.d.ts.map +0 -1
- package/dist/composables/use-high-contrast-mode.d.ts.map +0 -1
- package/dist/composables/use-selected-text.d.ts.map +0 -1
- package/dist/core/SuperDoc.d.ts.map +0 -1
- package/dist/core/collaboration/collaboration-comments.d.ts.map +0 -1
- package/dist/core/collaboration/collaboration.d.ts.map +0 -1
- package/dist/core/collaboration/helpers.d.ts.map +0 -1
- package/dist/core/collaboration/permissions.d.ts.map +0 -1
- package/dist/core/create-app.d.ts.map +0 -1
- package/dist/core/helpers/export.d.ts.map +0 -1
- package/dist/core/helpers/file.d.ts.map +0 -1
- package/dist/core/types/index.d.ts.map +0 -1
- package/dist/helpers/floor.d.ts.map +0 -1
- package/dist/helpers/group-changes.d.ts.map +0 -1
- package/dist/helpers/use-selection.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/main.d.ts.map +0 -1
- package/dist/stores/comments-store.d.ts.map +0 -1
- package/dist/stores/hrbr-fields-store.d.ts.map +0 -1
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/comment-schemas.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/commentsList/super-comments-list.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/helpers.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/types.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/use-comment.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/use-conversation.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/CommentsLayer/use-floating-comment.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/PdfViewer/helpers/range.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/PdfViewer/helpers/read-file.d.ts +0 -0
- /package/dist/{components → packages/superdoc/src/components}/PdfViewer/pdf/pdf-adapter.d.ts +0 -0
- /package/dist/{composables → packages/superdoc/src/composables}/use-ai.d.ts +0 -0
- /package/dist/{composables → packages/superdoc/src/composables}/use-document.d.ts +0 -0
- /package/dist/{composables → packages/superdoc/src/composables}/use-field.d.ts +0 -0
- /package/dist/{composables → packages/superdoc/src/composables}/use-high-contrast-mode.d.ts +0 -0
- /package/dist/{composables → packages/superdoc/src/composables}/use-selected-text.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/collaboration/collaboration-comments.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/collaboration/collaboration.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/collaboration/helpers.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/collaboration/permissions.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/create-app.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/helpers/export.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/helpers/file.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/index.d.ts +0 -0
- /package/dist/{core → packages/superdoc/src/core}/types/index.d.ts +0 -0
- /package/dist/{helpers → packages/superdoc/src/helpers}/floor.d.ts +0 -0
- /package/dist/{helpers → packages/superdoc/src/helpers}/group-changes.d.ts +0 -0
- /package/dist/{helpers → packages/superdoc/src/helpers}/use-selection.d.ts +0 -0
- /package/dist/{icons.d.ts → packages/superdoc/src/icons.d.ts} +0 -0
- /package/dist/{main.d.ts → packages/superdoc/src/main.d.ts} +0 -0
- /package/dist/{stores → packages/superdoc/src/stores}/hrbr-fields-store.d.ts +0 -0
- /package/dist/{super-editor.d.ts → packages/superdoc/src/super-editor.d.ts} +0 -0
|
@@ -8,7 +8,6 @@ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot
|
|
|
8
8
|
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);
|
|
9
9
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
10
10
|
var _a, _DocxExporter_instances, generate_xml_as_list_fn, replaceSpecialCharacters_fn, generateXml_fn, _SuperConverter_instances, generateDocumentHash_fn, exportNumberingFile_fn, prepareCommentsXmlFilesForExport_fn, exportProcessHeadersFooters_fn, exportProcessNewRelationships_fn, exportProcessMediaFiles_fn;
|
|
11
|
-
import { createElementBlock, openBlock, createElementVNode } from "vue";
|
|
12
11
|
var buffer = {};
|
|
13
12
|
var base64Js = {};
|
|
14
13
|
base64Js.byteLength = byteLength;
|
|
@@ -25000,7 +24999,7 @@ function parseMarks(property, unknownMarks = [], docx = null) {
|
|
|
25000
24999
|
seen.add(m2.type);
|
|
25001
25000
|
const { attributes = {} } = element;
|
|
25002
25001
|
const newMark = { type: m2.type };
|
|
25003
|
-
const exceptionMarks = ["w:b", "w:caps"];
|
|
25002
|
+
const exceptionMarks = ["w:b", "w:caps", "w:strike", "w:dstrike"];
|
|
25004
25003
|
if ((attributes["w:val"] === "0" || attributes["w:val"] === "none") && !exceptionMarks.includes(m2.name)) {
|
|
25005
25004
|
return;
|
|
25006
25005
|
}
|
|
@@ -25123,7 +25122,8 @@ function getStrikeValue(attributes) {
|
|
|
25123
25122
|
if (raw === void 0 || raw === null) return "1";
|
|
25124
25123
|
const value = String(raw).trim().toLowerCase();
|
|
25125
25124
|
if (value === "1" || value === "true" || value === "on") return "1";
|
|
25126
|
-
return
|
|
25125
|
+
if (value === "0" || value === "false" || value === "off") return "0";
|
|
25126
|
+
return "1";
|
|
25127
25127
|
}
|
|
25128
25128
|
const parseParagraphBorders = (pBdr) => {
|
|
25129
25129
|
if (!pBdr || !pBdr.elements) return {};
|
|
@@ -33126,72 +33126,351 @@ const DocxHelpers = {
|
|
|
33126
33126
|
getNewRelationshipId
|
|
33127
33127
|
};
|
|
33128
33128
|
const kebabCase = (str) => str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
33129
|
-
const comments_module_events =
|
|
33130
|
-
RESOLVED: "resolved",
|
|
33131
|
-
NEW: "new",
|
|
33129
|
+
const comments_module_events = {
|
|
33132
33130
|
ADD: "add",
|
|
33133
33131
|
UPDATE: "update",
|
|
33134
|
-
|
|
33135
|
-
|
|
33136
|
-
|
|
33137
|
-
|
|
33138
|
-
|
|
33139
|
-
|
|
33140
|
-
|
|
33141
|
-
|
|
33142
|
-
|
|
33132
|
+
SELECTED: "selected"
|
|
33133
|
+
};
|
|
33134
|
+
class FileObjectError extends Error {
|
|
33135
|
+
constructor(message, cause) {
|
|
33136
|
+
super(message);
|
|
33137
|
+
this.cause = cause;
|
|
33138
|
+
this.name = "FileObjectError";
|
|
33139
|
+
if (typeof Error.captureStackTrace === "function") {
|
|
33140
|
+
Error.captureStackTrace(this, FileObjectError);
|
|
33141
|
+
}
|
|
33142
|
+
}
|
|
33143
|
+
}
|
|
33144
|
+
class InvalidDataUriError extends FileObjectError {
|
|
33145
|
+
constructor(uri2) {
|
|
33146
|
+
super(`Invalid data URI format: URI must contain exactly one comma separator`);
|
|
33147
|
+
this.uri = uri2;
|
|
33148
|
+
this.name = "InvalidDataUriError";
|
|
33149
|
+
}
|
|
33150
|
+
}
|
|
33151
|
+
class FetchFailedError extends FileObjectError {
|
|
33152
|
+
constructor(url, cause) {
|
|
33153
|
+
super(`Failed to fetch file from URL: ${url}`, cause);
|
|
33154
|
+
this.url = url;
|
|
33155
|
+
this.name = "FetchFailedError";
|
|
33156
|
+
}
|
|
33157
|
+
}
|
|
33143
33158
|
const getFileObject = async (fileUrl, name, type2) => {
|
|
33144
|
-
|
|
33145
|
-
|
|
33146
|
-
|
|
33147
|
-
|
|
33159
|
+
try {
|
|
33160
|
+
if (fileUrl.startsWith("data:") && fileUrl.includes(";base64,")) {
|
|
33161
|
+
const parts = fileUrl.split(",");
|
|
33162
|
+
if (parts.length !== 2) {
|
|
33163
|
+
throw new InvalidDataUriError(fileUrl);
|
|
33164
|
+
}
|
|
33165
|
+
const binary = atob(parts[1]);
|
|
33166
|
+
const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0));
|
|
33167
|
+
return new File([bytes], name, { type: type2 });
|
|
33168
|
+
}
|
|
33169
|
+
const response = await fetch(fileUrl);
|
|
33170
|
+
if (!response.ok) {
|
|
33171
|
+
throw new FetchFailedError(fileUrl, new Error(`HTTP ${response.status}: ${response.statusText}`));
|
|
33172
|
+
}
|
|
33173
|
+
const blob = await response.blob();
|
|
33174
|
+
return new File([blob], name, { type: type2 });
|
|
33175
|
+
} catch (error) {
|
|
33176
|
+
if (error instanceof FileObjectError) {
|
|
33177
|
+
throw error;
|
|
33178
|
+
}
|
|
33179
|
+
throw new FileObjectError("Failed to create file object", error);
|
|
33148
33180
|
}
|
|
33149
|
-
const response = await fetch(fileUrl);
|
|
33150
|
-
const blob = await response.blob();
|
|
33151
|
-
return new File([blob], name, { type: type2 });
|
|
33152
33181
|
};
|
|
33153
33182
|
const vClickOutside = {
|
|
33154
33183
|
mounted(el, binding) {
|
|
33155
33184
|
const clickOutsideHandler = (event) => {
|
|
33156
33185
|
if (!el.contains(event.target)) {
|
|
33157
|
-
binding.value(event);
|
|
33186
|
+
binding.value?.(event);
|
|
33158
33187
|
}
|
|
33159
33188
|
};
|
|
33160
33189
|
document.addEventListener("click", clickOutsideHandler);
|
|
33161
33190
|
el.__clickOutsideHandler = clickOutsideHandler;
|
|
33162
33191
|
},
|
|
33163
33192
|
unmounted(el) {
|
|
33164
|
-
|
|
33165
|
-
|
|
33193
|
+
if (el.__clickOutsideHandler) {
|
|
33194
|
+
document.removeEventListener("click", el.__clickOutsideHandler);
|
|
33195
|
+
delete el.__clickOutsideHandler;
|
|
33196
|
+
}
|
|
33166
33197
|
}
|
|
33167
33198
|
};
|
|
33168
|
-
|
|
33169
|
-
|
|
33170
|
-
|
|
33171
|
-
|
|
33172
|
-
|
|
33173
|
-
|
|
33174
|
-
|
|
33199
|
+
function getCrypto() {
|
|
33200
|
+
if (typeof globalThis === "undefined") {
|
|
33201
|
+
return void 0;
|
|
33202
|
+
}
|
|
33203
|
+
const cryptoObj = globalThis.crypto ?? globalThis.msCrypto;
|
|
33204
|
+
if (cryptoObj?.getRandomValues) {
|
|
33205
|
+
return cryptoObj;
|
|
33206
|
+
}
|
|
33207
|
+
return void 0;
|
|
33208
|
+
}
|
|
33209
|
+
function randomBytes(length) {
|
|
33210
|
+
const array = new Uint8Array(length);
|
|
33211
|
+
const cryptoObj = getCrypto();
|
|
33212
|
+
if (cryptoObj) {
|
|
33213
|
+
cryptoObj.getRandomValues(array);
|
|
33214
|
+
return array;
|
|
33215
|
+
}
|
|
33216
|
+
for (let i = 0; i < length; i++) {
|
|
33217
|
+
array[i] = Math.floor(Math.random() * 256);
|
|
33218
|
+
}
|
|
33219
|
+
return array;
|
|
33220
|
+
}
|
|
33221
|
+
const _Telemetry = class _Telemetry {
|
|
33222
|
+
/**
|
|
33223
|
+
* Initialize telemetry service
|
|
33224
|
+
* @param config - Telemetry configuration
|
|
33225
|
+
*/
|
|
33226
|
+
constructor(config2) {
|
|
33227
|
+
this.statistics = {
|
|
33228
|
+
nodeTypes: {},
|
|
33229
|
+
markTypes: {},
|
|
33230
|
+
attributes: {},
|
|
33231
|
+
errorCount: 0
|
|
33232
|
+
};
|
|
33233
|
+
this.unknownElements = [];
|
|
33234
|
+
this.errors = [];
|
|
33235
|
+
this.fileStructure = {
|
|
33236
|
+
totalFiles: 0,
|
|
33237
|
+
maxDepth: 0,
|
|
33238
|
+
totalNodes: 0,
|
|
33239
|
+
files: []
|
|
33240
|
+
};
|
|
33241
|
+
this.documentInfo = null;
|
|
33242
|
+
this.enabled = config2.enabled ?? true;
|
|
33243
|
+
this.licenseKey = config2.licenseKey ?? _Telemetry.COMMUNITY_LICENSE_KEY;
|
|
33244
|
+
this.endpoint = config2.endpoint ?? _Telemetry.DEFAULT_ENDPOINT;
|
|
33245
|
+
this.documentGuid = config2.documentGuid;
|
|
33246
|
+
this.documentIdentifier = config2.documentIdentifier;
|
|
33247
|
+
this.superdocVersion = config2.superdocVersion;
|
|
33248
|
+
this.sessionId = this.generateId();
|
|
33249
|
+
}
|
|
33250
|
+
/**
|
|
33251
|
+
* Get browser environment information
|
|
33252
|
+
* @returns Browser information
|
|
33253
|
+
*/
|
|
33254
|
+
getBrowserInfo() {
|
|
33255
|
+
return {
|
|
33256
|
+
userAgent: window.navigator.userAgent,
|
|
33257
|
+
currentUrl: window.location.href,
|
|
33258
|
+
hostname: window.location.hostname,
|
|
33259
|
+
referrerUrl: document.referrer,
|
|
33260
|
+
screenSize: {
|
|
33261
|
+
width: window.screen.width,
|
|
33262
|
+
height: window.screen.height
|
|
33263
|
+
}
|
|
33264
|
+
};
|
|
33265
|
+
}
|
|
33266
|
+
/**
|
|
33267
|
+
* Track document usage event
|
|
33268
|
+
* @param name - Event name (use TelemetryEventNames for standard events)
|
|
33269
|
+
* @param properties - Additional properties
|
|
33270
|
+
*/
|
|
33271
|
+
async trackUsage(name, properties = {}) {
|
|
33272
|
+
if (!this.enabled) return;
|
|
33273
|
+
const event = {
|
|
33274
|
+
id: this.generateId(),
|
|
33275
|
+
type: "usage",
|
|
33276
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
33277
|
+
sessionId: this.sessionId,
|
|
33278
|
+
documentGuid: this.documentGuid,
|
|
33279
|
+
// Updated field name
|
|
33280
|
+
documentIdentifier: this.documentIdentifier,
|
|
33281
|
+
// Include both
|
|
33282
|
+
superdocVersion: this.superdocVersion,
|
|
33283
|
+
file: this.documentInfo,
|
|
33284
|
+
browser: this.getBrowserInfo(),
|
|
33285
|
+
name,
|
|
33286
|
+
properties
|
|
33287
|
+
};
|
|
33288
|
+
await this.sendDataToTelemetry(event);
|
|
33289
|
+
}
|
|
33290
|
+
trackStatistic(categoryOrData, legacyData) {
|
|
33291
|
+
let data;
|
|
33292
|
+
if (typeof categoryOrData === "string") {
|
|
33293
|
+
data = { ...legacyData, category: categoryOrData };
|
|
33294
|
+
} else {
|
|
33295
|
+
data = categoryOrData;
|
|
33296
|
+
}
|
|
33297
|
+
if (data.category === "node") {
|
|
33298
|
+
this.statistics.nodeTypes[data.elementName] = (this.statistics.nodeTypes[data.elementName] || 0) + 1;
|
|
33299
|
+
this.fileStructure.totalNodes++;
|
|
33300
|
+
} else if (data.category === "unknown") {
|
|
33301
|
+
const addedElement = this.unknownElements.find((e) => e.elementName === data.elementName);
|
|
33302
|
+
if (addedElement) {
|
|
33303
|
+
addedElement.count += 1;
|
|
33304
|
+
addedElement.attributes = {
|
|
33305
|
+
...addedElement.attributes,
|
|
33306
|
+
...data.attributes
|
|
33307
|
+
};
|
|
33308
|
+
} else {
|
|
33309
|
+
this.unknownElements.push({
|
|
33310
|
+
elementName: data.elementName,
|
|
33311
|
+
count: 1,
|
|
33312
|
+
attributes: data.attributes
|
|
33313
|
+
});
|
|
33314
|
+
}
|
|
33315
|
+
} else if (data.category === "error") {
|
|
33316
|
+
this.errors.push(data);
|
|
33317
|
+
this.statistics.errorCount++;
|
|
33175
33318
|
}
|
|
33176
|
-
|
|
33177
|
-
|
|
33178
|
-
|
|
33179
|
-
|
|
33180
|
-
|
|
33181
|
-
|
|
33319
|
+
if (data.category === "node" && data.marks?.length) {
|
|
33320
|
+
data.marks.forEach((mark) => {
|
|
33321
|
+
this.statistics.markTypes[mark.type] = (this.statistics.markTypes[mark.type] || 0) + 1;
|
|
33322
|
+
});
|
|
33323
|
+
}
|
|
33324
|
+
if (data.attributes && Object.keys(data.attributes).length) {
|
|
33325
|
+
const styleAttributes = [
|
|
33326
|
+
"textIndent",
|
|
33327
|
+
"textAlign",
|
|
33328
|
+
"spacing",
|
|
33329
|
+
"lineHeight",
|
|
33330
|
+
"indent",
|
|
33331
|
+
"list-style-type",
|
|
33332
|
+
"listLevel",
|
|
33333
|
+
"textStyle",
|
|
33334
|
+
"order",
|
|
33335
|
+
"lvlText",
|
|
33336
|
+
"lvlJc",
|
|
33337
|
+
"listNumberingType",
|
|
33338
|
+
"numId"
|
|
33339
|
+
];
|
|
33340
|
+
Object.keys(data.attributes).forEach((attribute) => {
|
|
33341
|
+
if (!styleAttributes.includes(attribute)) return;
|
|
33342
|
+
this.statistics.attributes[attribute] = (this.statistics.attributes[attribute] || 0) + 1;
|
|
33343
|
+
});
|
|
33344
|
+
}
|
|
33345
|
+
}
|
|
33346
|
+
/**
|
|
33347
|
+
* Track file structure
|
|
33348
|
+
* @param structure - File structure information
|
|
33349
|
+
* @param fileSource - original file
|
|
33350
|
+
* @param documentId - document GUID
|
|
33351
|
+
* @param documentIdentifier - document identifier (GUID or hash)
|
|
33352
|
+
* @param internalId - document ID from settings.xml
|
|
33353
|
+
*/
|
|
33354
|
+
async trackFileStructure(structure, fileSource, documentId, documentIdentifier, internalId) {
|
|
33355
|
+
this.fileStructure = structure;
|
|
33356
|
+
this.documentInfo = await this.processDocument(fileSource, {
|
|
33357
|
+
guid: documentId,
|
|
33358
|
+
// Updated parameter name
|
|
33359
|
+
identifier: documentIdentifier,
|
|
33360
|
+
// New parameter
|
|
33361
|
+
internalId
|
|
33362
|
+
});
|
|
33363
|
+
}
|
|
33364
|
+
/**
|
|
33365
|
+
* Process document metadata
|
|
33366
|
+
* @param file - Document file
|
|
33367
|
+
* @param options - Additional options
|
|
33368
|
+
* @returns Document metadata
|
|
33369
|
+
*/
|
|
33370
|
+
async processDocument(file, options = {}) {
|
|
33371
|
+
if (!file) {
|
|
33372
|
+
console.warn("Telemetry: missing file source");
|
|
33373
|
+
return null;
|
|
33374
|
+
}
|
|
33375
|
+
return {
|
|
33376
|
+
guid: options.guid,
|
|
33377
|
+
// Updated from 'id'
|
|
33378
|
+
identifier: options.identifier,
|
|
33379
|
+
// New field
|
|
33380
|
+
name: file.name,
|
|
33381
|
+
size: file.size,
|
|
33382
|
+
lastModified: file.lastModified ? new Date(file.lastModified).toISOString() : null,
|
|
33383
|
+
type: file.type || "docx",
|
|
33384
|
+
internalId: options.internalId
|
|
33385
|
+
// Microsoft's GUID if present
|
|
33182
33386
|
};
|
|
33183
|
-
|
|
33184
|
-
|
|
33185
|
-
|
|
33186
|
-
|
|
33187
|
-
|
|
33188
|
-
|
|
33189
|
-
|
|
33190
|
-
|
|
33191
|
-
|
|
33387
|
+
}
|
|
33388
|
+
isTelemetryDataChanged() {
|
|
33389
|
+
if (Object.keys(this.statistics.nodeTypes).length <= 1) return false;
|
|
33390
|
+
return Object.keys(this.statistics.nodeTypes).length > 0 || Object.keys(this.statistics.markTypes).length > 0 || Object.keys(this.statistics.attributes).length > 0 || this.statistics.errorCount > 0 || this.fileStructure.totalFiles > 0 || this.fileStructure.maxDepth > 0 || this.fileStructure.totalNodes > 0 || this.fileStructure.files.length > 0 || this.errors.length > 0 || this.unknownElements.length > 0;
|
|
33391
|
+
}
|
|
33392
|
+
/**
|
|
33393
|
+
* Sends current report
|
|
33394
|
+
* @returns Promise that resolves when report is sent
|
|
33395
|
+
*/
|
|
33396
|
+
async sendReport() {
|
|
33397
|
+
if (!this.enabled || !this.isTelemetryDataChanged()) return;
|
|
33398
|
+
const report = [
|
|
33399
|
+
{
|
|
33400
|
+
id: this.generateId(),
|
|
33401
|
+
type: "parsing",
|
|
33402
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
33403
|
+
sessionId: this.sessionId,
|
|
33404
|
+
documentGuid: this.documentGuid,
|
|
33405
|
+
documentIdentifier: this.documentIdentifier,
|
|
33406
|
+
superdocVersion: this.superdocVersion,
|
|
33407
|
+
file: this.documentInfo,
|
|
33408
|
+
browser: this.getBrowserInfo(),
|
|
33409
|
+
statistics: this.statistics,
|
|
33410
|
+
fileStructure: this.fileStructure,
|
|
33411
|
+
unknownElements: this.unknownElements,
|
|
33412
|
+
errors: this.errors
|
|
33413
|
+
}
|
|
33414
|
+
];
|
|
33415
|
+
await this.sendDataToTelemetry(report);
|
|
33416
|
+
}
|
|
33417
|
+
/**
|
|
33418
|
+
* Sends data to the service
|
|
33419
|
+
* @param data - Payload to send
|
|
33420
|
+
* @returns Promise that resolves when data is sent
|
|
33421
|
+
*/
|
|
33422
|
+
async sendDataToTelemetry(data) {
|
|
33423
|
+
try {
|
|
33424
|
+
const response = await fetch(this.endpoint, {
|
|
33425
|
+
method: "POST",
|
|
33426
|
+
headers: {
|
|
33427
|
+
"Content-Type": "application/json",
|
|
33428
|
+
"X-License-Key": this.licenseKey
|
|
33429
|
+
},
|
|
33430
|
+
body: JSON.stringify(data)
|
|
33431
|
+
});
|
|
33432
|
+
if (!response.ok) {
|
|
33433
|
+
throw new Error(`Upload failed: ${response.statusText}`);
|
|
33434
|
+
} else {
|
|
33435
|
+
this.resetStatistics();
|
|
33436
|
+
}
|
|
33437
|
+
} catch (error) {
|
|
33438
|
+
console.error("Failed to upload telemetry:", error);
|
|
33439
|
+
}
|
|
33440
|
+
}
|
|
33441
|
+
/**
|
|
33442
|
+
* Generate unique identifier
|
|
33443
|
+
* @returns Unique ID
|
|
33444
|
+
* @private
|
|
33445
|
+
*/
|
|
33446
|
+
generateId() {
|
|
33447
|
+
const timestamp = Date.now();
|
|
33448
|
+
const random = Array.from(randomBytes(4)).map((b2) => b2.toString(16).padStart(2, "0")).join("");
|
|
33449
|
+
return `${timestamp}-${random}`;
|
|
33450
|
+
}
|
|
33451
|
+
/**
|
|
33452
|
+
* Reset statistics
|
|
33453
|
+
*/
|
|
33454
|
+
resetStatistics() {
|
|
33455
|
+
this.statistics = {
|
|
33456
|
+
nodeTypes: {},
|
|
33457
|
+
markTypes: {},
|
|
33458
|
+
attributes: {},
|
|
33459
|
+
errorCount: 0
|
|
33192
33460
|
};
|
|
33461
|
+
this.fileStructure = {
|
|
33462
|
+
totalFiles: 0,
|
|
33463
|
+
maxDepth: 0,
|
|
33464
|
+
totalNodes: 0,
|
|
33465
|
+
files: []
|
|
33466
|
+
};
|
|
33467
|
+
this.unknownElements = [];
|
|
33468
|
+
this.errors = [];
|
|
33193
33469
|
}
|
|
33194
33470
|
};
|
|
33471
|
+
_Telemetry.COMMUNITY_LICENSE_KEY = "community-and-eval-agplv3";
|
|
33472
|
+
_Telemetry.DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
33473
|
+
let Telemetry = _Telemetry;
|
|
33195
33474
|
const getDefaultStyleDefinition = (defaultStyleId, docx) => {
|
|
33196
33475
|
const result = { lineSpaceBefore: null, lineSpaceAfter: null };
|
|
33197
33476
|
if (!defaultStyleId) return result;
|
|
@@ -35035,6 +35314,9 @@ function translateMark(mark) {
|
|
|
35035
35314
|
const translated = translator$1r.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
35036
35315
|
return translated || {};
|
|
35037
35316
|
}
|
|
35317
|
+
case "strike":
|
|
35318
|
+
if (attrs?.value === "0") markElement.attributes["w:val"] = attrs.value;
|
|
35319
|
+
break;
|
|
35038
35320
|
case "link":
|
|
35039
35321
|
return {};
|
|
35040
35322
|
}
|
|
@@ -35596,7 +35878,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
35596
35878
|
static getStoredSuperdocVersion(docx) {
|
|
35597
35879
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35598
35880
|
}
|
|
35599
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.0-next.
|
|
35881
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.29.0-next.8") {
|
|
35600
35882
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
35601
35883
|
}
|
|
35602
35884
|
/**
|
|
@@ -36149,7 +36431,7 @@ __publicField(_SuperConverter, "markTypes", [
|
|
|
36149
36431
|
{ name: "w:i", type: "italic" },
|
|
36150
36432
|
// { name: 'w:iCs', type: 'italic' },
|
|
36151
36433
|
{ name: "w:u", type: "underline", mark: "underline", property: "underlineType" },
|
|
36152
|
-
{ name: "w:strike", type: "strike", mark: "strike" },
|
|
36434
|
+
{ name: "w:strike", type: "strike", mark: "strike", property: "value" },
|
|
36153
36435
|
{ name: "w:color", type: "color", mark: "textStyle", property: "color" },
|
|
36154
36436
|
{ name: "w:sz", type: "fontSize", mark: "textStyle", property: "fontSize" },
|
|
36155
36437
|
// { name: 'w:szCs', type: 'fontSize', mark: 'textStyle', property: 'fontSize' },
|
|
@@ -36337,7 +36619,6 @@ export {
|
|
|
36337
36619
|
translator$1e as bz,
|
|
36338
36620
|
DOMParser$1 as c,
|
|
36339
36621
|
translator$1 as c0,
|
|
36340
|
-
_sfc_main as c1,
|
|
36341
36622
|
Mark as d,
|
|
36342
36623
|
dropPoint as e,
|
|
36343
36624
|
callOrGet as f,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-CqYeAv65.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, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_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, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } 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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-CqYeAv65.js";
|
|
16
|
+
import { D as DocxZipper } from "./docx-zipper-C97RawM-.js";
|
|
16
17
|
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-uOVWdyXU.js";
|
|
18
18
|
var GOOD_LEAF_SIZE = 200;
|
|
19
19
|
var RopeSequence = function RopeSequence2() {
|
|
20
20
|
};
|
|
@@ -15072,7 +15072,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15072
15072
|
{ default: remarkStringify },
|
|
15073
15073
|
{ default: remarkGfm }
|
|
15074
15074
|
] = await Promise.all([
|
|
15075
|
-
import("./index-
|
|
15075
|
+
import("./index-D08c3nkG.js"),
|
|
15076
15076
|
import("./index-DRCvimau.js"),
|
|
15077
15077
|
import("./index-C_x_N6Uh.js"),
|
|
15078
15078
|
import("./index-D_sWOSiG.js"),
|
|
@@ -15290,7 +15290,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
15290
15290
|
* @returns {Object | void} Migration results
|
|
15291
15291
|
*/
|
|
15292
15292
|
processCollaborationMigrations() {
|
|
15293
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.29.0-next.
|
|
15293
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.29.0-next.8");
|
|
15294
15294
|
if (!this.options.ydoc) return;
|
|
15295
15295
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
15296
15296
|
let docVersion = metaMap.get("version");
|
|
@@ -31851,9 +31851,10 @@ const Strike = Mark.create({
|
|
|
31851
31851
|
{ style: "text-decoration=auto", clearMark: (m) => m.type.name == "s" }
|
|
31852
31852
|
];
|
|
31853
31853
|
},
|
|
31854
|
-
renderDOM({ htmlAttributes }) {
|
|
31854
|
+
renderDOM({ mark, htmlAttributes }) {
|
|
31855
31855
|
const merged = Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes);
|
|
31856
|
-
const { value
|
|
31856
|
+
const { value } = mark.attrs;
|
|
31857
|
+
const { ...rest } = merged || {};
|
|
31857
31858
|
if (value === "0") {
|
|
31858
31859
|
return ["span", rest, 0];
|
|
31859
31860
|
}
|
|
@@ -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-CqYeAv65.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BrxCRICL.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-BrxCRICL.js";
|
|
2
|
+
import "./chunks/converter-CqYeAv65.js";
|
|
3
|
+
import "./chunks/docx-zipper-C97RawM-.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|