@harbour-enterprises/superdoc 1.0.0-beta.94 → 1.0.0-beta.95
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-CC_fv7lS.cjs → PdfViewer--l9mxuw6.cjs} +1 -1
- package/dist/chunks/{PdfViewer-BR7hR5hX.es.js → PdfViewer-DC5ZtOHL.es.js} +1 -1
- package/dist/chunks/{index-DHRt1tCk.cjs → index-DA6_gKCn.cjs} +3 -3
- package/dist/chunks/{index-BstIHBcW-6lPNsqaA.cjs → index-DJD7xO_i-CVT8OSh8.cjs} +1 -1
- package/dist/chunks/{index-BstIHBcW-BxKvjs-R.es.js → index-DJD7xO_i-DlZGZmeW.es.js} +1 -1
- package/dist/chunks/{index-JAE9iqTX.es.js → index-D_AIVJix.es.js} +3 -3
- package/dist/chunks/{super-editor.es-DXKgM3JR.cjs → super-editor.es-DLfNMkAR.cjs} +29 -5
- package/dist/chunks/{super-editor.es-C1RjP_IO.es.js → super-editor.es-L0F8-awY.es.js} +29 -5
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CIgfC-et.js → converter-CAiO-oW4.js} +26 -2
- package/dist/super-editor/chunks/{docx-zipper-AQa91HPZ.js → docx-zipper-DRP7HhmI.js} +1 -1
- package/dist/super-editor/chunks/{editor-6Tyu_6Nf.js → editor-D5oQ83xJ.js} +5 -5
- package/dist/super-editor/chunks/{index-BstIHBcW.js → index-DJD7xO_i.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-yzD6N9Br.js → toolbar-ax2sbcF_.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 +31 -7
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -42236,6 +42236,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42236
42236
|
}
|
|
42237
42237
|
return false;
|
|
42238
42238
|
}
|
|
42239
|
+
/**
|
|
42240
|
+
* Extracts the namespace prefix from an element name.
|
|
42241
|
+
*
|
|
42242
|
+
* @private
|
|
42243
|
+
* @static
|
|
42244
|
+
* @param {string} elementName - The element name (may include namespace prefix, e.g., 'op:Properties')
|
|
42245
|
+
* @returns {string} The namespace prefix (e.g., 'op') or empty string if no prefix
|
|
42246
|
+
*
|
|
42247
|
+
* @example
|
|
42248
|
+
* _extractNamespacePrefix('op:Properties') // => 'op'
|
|
42249
|
+
* _extractNamespacePrefix('Properties') // => ''
|
|
42250
|
+
* _extractNamespacePrefix('custom:property') // => 'custom'
|
|
42251
|
+
*/
|
|
42252
|
+
static _extractNamespacePrefix(elementName) {
|
|
42253
|
+
if (!elementName || typeof elementName !== "string") return "";
|
|
42254
|
+
const colonIndex = elementName.indexOf(":");
|
|
42255
|
+
return colonIndex > 0 ? elementName.slice(0, colonIndex) : "";
|
|
42256
|
+
}
|
|
42239
42257
|
/**
|
|
42240
42258
|
* Generic method to get a stored custom property from docx.
|
|
42241
42259
|
* Supports both standard and custom namespace prefixes (e.g., 'op:Properties', 'custom:property').
|
|
@@ -42334,6 +42352,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42334
42352
|
const properties = customXml.elements?.find((el) => _SuperConverter2._matchesElementName(el.name, "Properties"));
|
|
42335
42353
|
if (!properties) return null;
|
|
42336
42354
|
if (!properties.elements) properties.elements = [];
|
|
42355
|
+
const namespacePrefix = _SuperConverter2._extractNamespacePrefix(properties.name);
|
|
42356
|
+
const propertyElementName = namespacePrefix ? `${namespacePrefix}:property` : "property";
|
|
42337
42357
|
let property2 = properties.elements.find(
|
|
42338
42358
|
(el) => _SuperConverter2._matchesElementName(el.name, "property") && el.attributes?.name === propertyName
|
|
42339
42359
|
);
|
|
@@ -42350,7 +42370,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42350
42370
|
const pid = existingPids.length > 0 ? Math.max(...existingPids) + 1 : 2;
|
|
42351
42371
|
property2 = {
|
|
42352
42372
|
type: "element",
|
|
42353
|
-
name:
|
|
42373
|
+
name: propertyElementName,
|
|
42354
42374
|
attributes: {
|
|
42355
42375
|
name: propertyName,
|
|
42356
42376
|
fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",
|
|
@@ -42371,6 +42391,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42371
42391
|
};
|
|
42372
42392
|
properties.elements.push(property2);
|
|
42373
42393
|
} else {
|
|
42394
|
+
const existingPropertyPrefix = _SuperConverter2._extractNamespacePrefix(property2.name);
|
|
42395
|
+
if (existingPropertyPrefix !== namespacePrefix) {
|
|
42396
|
+
property2.name = propertyElementName;
|
|
42397
|
+
}
|
|
42374
42398
|
if (!property2.elements?.[0]?.elements?.[0]) {
|
|
42375
42399
|
console.warn(`Malformed property structure for "${propertyName}", recreating structure`);
|
|
42376
42400
|
property2.elements = [
|
|
@@ -42398,7 +42422,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42398
42422
|
static getStoredSuperdocVersion(docx) {
|
|
42399
42423
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42400
42424
|
}
|
|
42401
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42425
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.95") {
|
|
42402
42426
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42403
42427
|
}
|
|
42404
42428
|
/**
|
|
@@ -67473,7 +67497,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67473
67497
|
const shouldSkipNodeView = (editor) => {
|
|
67474
67498
|
return isHeadless(editor);
|
|
67475
67499
|
};
|
|
67476
|
-
const summaryVersion = "1.0.0-beta.
|
|
67500
|
+
const summaryVersion = "1.0.0-beta.95";
|
|
67477
67501
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67478
67502
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67479
67503
|
function mapAttributes(attrs) {
|
|
@@ -68262,7 +68286,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68262
68286
|
{ default: remarkStringify2 },
|
|
68263
68287
|
{ default: remarkGfm2 }
|
|
68264
68288
|
] = await Promise.all([
|
|
68265
|
-
Promise.resolve().then(() =>
|
|
68289
|
+
Promise.resolve().then(() => indexDJD7xO_i),
|
|
68266
68290
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68267
68291
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68268
68292
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68467,7 +68491,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68467
68491
|
* Process collaboration migrations
|
|
68468
68492
|
*/
|
|
68469
68493
|
processCollaborationMigrations() {
|
|
68470
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68494
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.95");
|
|
68471
68495
|
if (!this.options.ydoc) return;
|
|
68472
68496
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68473
68497
|
let docVersion = metaMap.get("version");
|
|
@@ -151926,7 +151950,7 @@ ${style2}
|
|
|
151926
151950
|
this.config.colors = shuffleArray(this.config.colors);
|
|
151927
151951
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
151928
151952
|
this.colorIndex = 0;
|
|
151929
|
-
this.version = "1.0.0-beta.
|
|
151953
|
+
this.version = "1.0.0-beta.95";
|
|
151930
151954
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
151931
151955
|
this.superdocId = config2.superdocId || v4();
|
|
151932
151956
|
this.colors = this.config.colors;
|
|
@@ -154398,7 +154422,7 @@ ${style2}
|
|
|
154398
154422
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
154399
154423
|
);
|
|
154400
154424
|
}
|
|
154401
|
-
const
|
|
154425
|
+
const indexDJD7xO_i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
154402
154426
|
__proto__: null,
|
|
154403
154427
|
unified
|
|
154404
154428
|
}, Symbol.toStringTag, { value: "Module" }));
|