@superdoc-dev/cli 0.8.0-next.109 → 0.8.0-next.110
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/index.js +132 -69
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -66096,7 +66096,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
66096
66096
|
emptyOptions2 = {};
|
|
66097
66097
|
});
|
|
66098
66098
|
|
|
66099
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
66099
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-1Voea3gd.es.js
|
|
66100
66100
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
66101
66101
|
const fieldValue = extension$1.config[field];
|
|
66102
66102
|
if (typeof fieldValue === "function")
|
|
@@ -75352,7 +75352,7 @@ function encodeMarksFromRPr(runProperties, docx) {
|
|
|
75352
75352
|
return [];
|
|
75353
75353
|
const marks = [];
|
|
75354
75354
|
const textStyleAttrs = {};
|
|
75355
|
-
let
|
|
75355
|
+
let highlightAttrs = null;
|
|
75356
75356
|
let hasHighlightTag = false;
|
|
75357
75357
|
Object.keys(runProperties).forEach((key) => {
|
|
75358
75358
|
const value = runProperties[key];
|
|
@@ -75429,7 +75429,9 @@ function encodeMarksFromRPr(runProperties, docx) {
|
|
|
75429
75429
|
const color2 = getHighLightValue$1(value);
|
|
75430
75430
|
if (color2) {
|
|
75431
75431
|
hasHighlightTag = true;
|
|
75432
|
-
|
|
75432
|
+
highlightAttrs = { color: color2 };
|
|
75433
|
+
if (color2.toLowerCase() === "transparent" && String(value?.["w:val"]).toLowerCase() === "none")
|
|
75434
|
+
highlightAttrs.ooxmlHighlightClear = true;
|
|
75433
75435
|
}
|
|
75434
75436
|
break;
|
|
75435
75437
|
case "shading": {
|
|
@@ -75438,11 +75440,11 @@ function encodeMarksFromRPr(runProperties, docx) {
|
|
|
75438
75440
|
const fill = value["fill"];
|
|
75439
75441
|
const shdVal = value["val"];
|
|
75440
75442
|
if (fill && String(fill).toLowerCase() !== "auto")
|
|
75441
|
-
|
|
75443
|
+
highlightAttrs = { color: `#${String(fill).replace("#", "")}` };
|
|
75442
75444
|
else if (typeof shdVal === "string") {
|
|
75443
75445
|
const normalized = shdVal.toLowerCase();
|
|
75444
75446
|
if (normalized === "clear" || normalized === "nil" || normalized === "none")
|
|
75445
|
-
|
|
75447
|
+
highlightAttrs = { color: "transparent" };
|
|
75446
75448
|
}
|
|
75447
75449
|
break;
|
|
75448
75450
|
}
|
|
@@ -75464,10 +75466,10 @@ function encodeMarksFromRPr(runProperties, docx) {
|
|
|
75464
75466
|
type: "textStyle",
|
|
75465
75467
|
attrs: textStyleAttrs
|
|
75466
75468
|
});
|
|
75467
|
-
if (
|
|
75469
|
+
if (highlightAttrs)
|
|
75468
75470
|
marks.push({
|
|
75469
75471
|
type: "highlight",
|
|
75470
|
-
attrs:
|
|
75472
|
+
attrs: highlightAttrs
|
|
75471
75473
|
});
|
|
75472
75474
|
return marks;
|
|
75473
75475
|
}
|
|
@@ -75750,10 +75752,6 @@ function decodeRPrFromMarks(marks) {
|
|
|
75750
75752
|
case "italic":
|
|
75751
75753
|
case "bold":
|
|
75752
75754
|
runProperties[type] = mark.attrs.value !== "0" && mark.attrs.value !== false;
|
|
75753
|
-
if (type === "bold")
|
|
75754
|
-
runProperties.boldCs = runProperties.bold;
|
|
75755
|
-
else if (type === "italic")
|
|
75756
|
-
runProperties.italicCs = runProperties.italic;
|
|
75757
75755
|
break;
|
|
75758
75756
|
case "underline": {
|
|
75759
75757
|
const { underlineType, underlineColor, underlineThemeColor, underlineThemeTint, underlineThemeShade } = mark.attrs;
|
|
@@ -75773,11 +75771,13 @@ function decodeRPrFromMarks(marks) {
|
|
|
75773
75771
|
break;
|
|
75774
75772
|
}
|
|
75775
75773
|
case "highlight":
|
|
75776
|
-
if (mark.attrs.color)
|
|
75777
|
-
|
|
75774
|
+
if (!mark.attrs.color)
|
|
75775
|
+
break;
|
|
75776
|
+
if (mark.attrs.color.toLowerCase() === "transparent") {
|
|
75777
|
+
if (mark.attrs.ooxmlHighlightClear)
|
|
75778
75778
|
runProperties.highlight = { "w:val": "none" };
|
|
75779
|
-
|
|
75780
|
-
|
|
75779
|
+
} else
|
|
75780
|
+
runProperties.highlight = { "w:val": mark.attrs.color };
|
|
75781
75781
|
break;
|
|
75782
75782
|
case "link":
|
|
75783
75783
|
runProperties.styleId = "Hyperlink";
|
|
@@ -84648,13 +84648,13 @@ function extractTableInfo($pos, depth) {
|
|
|
84648
84648
|
return fallbackInfo;
|
|
84649
84649
|
}
|
|
84650
84650
|
}
|
|
84651
|
-
function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys) {
|
|
84651
|
+
function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, removedKeys, preservedDerivedKeys, preferExistingKeys) {
|
|
84652
84652
|
const segments = [];
|
|
84653
84653
|
let lastKey = null;
|
|
84654
84654
|
let boundaryCounter = 0;
|
|
84655
84655
|
runNode.forEach((child) => {
|
|
84656
84656
|
if (child.isText) {
|
|
84657
|
-
const { inlineProps: inlineProps$1, inlineKey: inlineKey$2 } = computeInlineRunProps(child.marks, runNode.attrs?.runProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys);
|
|
84657
|
+
const { inlineProps: inlineProps$1, inlineKey: inlineKey$2 } = computeInlineRunProps(child.marks, runNode.attrs?.runProperties, paragraphNode, tableInfo, $pos, editor, removedKeys, preservedDerivedKeys, preferExistingKeys);
|
|
84658
84658
|
const last2 = segments[segments.length - 1];
|
|
84659
84659
|
if (last2 && inlineKey$2 === lastKey)
|
|
84660
84660
|
last2.content.push(child);
|
|
@@ -84682,20 +84682,20 @@ function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor
|
|
|
84682
84682
|
firstInlineProps: segments[0]?.inlineProps ?? null
|
|
84683
84683
|
};
|
|
84684
84684
|
}
|
|
84685
|
-
function computeInlineRunProps(marks, existingRunProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys) {
|
|
84685
|
+
function computeInlineRunProps(marks, existingRunProperties, paragraphNode, tableInfo, $pos, editor, removedKeys, preservedDerivedKeys, preferExistingKeys) {
|
|
84686
84686
|
const runPropertiesFromMarks = decodeRPrFromMarks(marks);
|
|
84687
84687
|
const paragraphProperties = getResolvedParagraphProperties(paragraphNode) || calculateResolvedParagraphProperties(editor, paragraphNode, $pos);
|
|
84688
84688
|
const inlineRunProperties = getInlineRunProperties(runPropertiesFromMarks, resolveRunProperties({
|
|
84689
84689
|
translatedNumbering: editor.converter?.translatedNumbering ?? {},
|
|
84690
84690
|
translatedLinkedStyles: editor.converter?.translatedLinkedStyles ?? {}
|
|
84691
|
-
}, existingRunProperties?.styleId != null ? { styleId: existingRunProperties?.styleId } : {}, paragraphProperties, tableInfo, false, Boolean(paragraphNode.attrs.paragraphProperties?.numberingProperties)), existingRunProperties, editor, preservedDerivedKeys, preferExistingKeys);
|
|
84691
|
+
}, existingRunProperties?.styleId != null ? { styleId: existingRunProperties?.styleId } : {}, paragraphProperties, tableInfo, false, Boolean(paragraphNode.attrs.paragraphProperties?.numberingProperties)), existingRunProperties, editor, removedKeys, preservedDerivedKeys, preferExistingKeys);
|
|
84692
84692
|
const inlineProps = Object.keys(inlineRunProperties).length ? inlineRunProperties : null;
|
|
84693
84693
|
return {
|
|
84694
84694
|
inlineProps,
|
|
84695
84695
|
inlineKey: stableStringifyInlineProps(inlineProps)
|
|
84696
84696
|
};
|
|
84697
84697
|
}
|
|
84698
|
-
function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles, existingRunProperties, editor, preservedDerivedKeys = /* @__PURE__ */ new Set, preferExistingKeys = /* @__PURE__ */ new Set) {
|
|
84698
|
+
function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles, existingRunProperties, editor, removedKeys = /* @__PURE__ */ new Set, preservedDerivedKeys = /* @__PURE__ */ new Set, preferExistingKeys = /* @__PURE__ */ new Set) {
|
|
84699
84699
|
const inlineRunProperties = {};
|
|
84700
84700
|
for (const key in runPropertiesFromMarks) {
|
|
84701
84701
|
if (preservedDerivedKeys.has(key)) {
|
|
@@ -84730,6 +84730,9 @@ function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles,
|
|
|
84730
84730
|
Object.keys(existingRunProperties).forEach((key) => {
|
|
84731
84731
|
if (RUN_PROPERTIES_DERIVED_FROM_MARKS.has(key) && !preservedDerivedKeys.has(key))
|
|
84732
84732
|
return;
|
|
84733
|
+
const baseKey = COMPANION_INLINE_KEYS[key];
|
|
84734
|
+
if (baseKey && removedKeys.has(baseKey))
|
|
84735
|
+
return;
|
|
84733
84736
|
if (key === "styleId" && TRANSIENT_HYPERLINK_STYLE_IDS.has(existingRunProperties[key]) && (runPropertiesFromMarks.styleId == null || runPropertiesFromMarks.styleId === ""))
|
|
84734
84737
|
return;
|
|
84735
84738
|
if (key in inlineRunProperties)
|
|
@@ -96772,11 +96775,13 @@ function translateDocumentNode(params3) {
|
|
|
96772
96775
|
const mergedIgnorable = mergeMcIgnorable(DEFAULT_DOCX_DEFS["mc:Ignorable"], originalAttrs["mc:Ignorable"]);
|
|
96773
96776
|
if (mergedIgnorable)
|
|
96774
96777
|
attributes["mc:Ignorable"] = mergedIgnorable;
|
|
96775
|
-
|
|
96778
|
+
const node3 = {
|
|
96776
96779
|
name: "w:document",
|
|
96777
96780
|
elements: [translatedBodyNode],
|
|
96778
96781
|
attributes
|
|
96779
|
-
}
|
|
96782
|
+
};
|
|
96783
|
+
normalizePgMarTwipsInTree(node3);
|
|
96784
|
+
return [node3, params3];
|
|
96780
96785
|
}
|
|
96781
96786
|
function wrapTextInRun(nodeOrNodes, marks) {
|
|
96782
96787
|
let elements = [];
|
|
@@ -96895,6 +96900,8 @@ function translateMark(mark) {
|
|
|
96895
96900
|
break;
|
|
96896
96901
|
case "highlight": {
|
|
96897
96902
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
96903
|
+
if (String(highlightValue).trim().toLowerCase() === "transparent" && !attrs.ooxmlHighlightClear)
|
|
96904
|
+
return {};
|
|
96898
96905
|
return translator$2.decode({ node: { attrs: { highlight: highlightValue } } }) || {};
|
|
96899
96906
|
}
|
|
96900
96907
|
case "strike":
|
|
@@ -105610,6 +105617,21 @@ var isRegExp = (value) => {
|
|
|
105610
105617
|
if (!Array.isArray(node3.elements))
|
|
105611
105618
|
return false;
|
|
105612
105619
|
return node3.elements.some((child) => hasXmlNodeNamed(child, targetName));
|
|
105620
|
+
}, COMPLEX_SCRIPT_CODEPOINT_RANGES, textHasComplexScript = (text$2) => {
|
|
105621
|
+
for (const char of text$2) {
|
|
105622
|
+
const codePoint = char.codePointAt(0);
|
|
105623
|
+
if (COMPLEX_SCRIPT_CODEPOINT_RANGES.some(([start, end]) => codePoint >= start && codePoint <= end))
|
|
105624
|
+
return true;
|
|
105625
|
+
}
|
|
105626
|
+
return false;
|
|
105627
|
+
}, hasComplexScriptText = (node3) => {
|
|
105628
|
+
if (!node3 || typeof node3 !== "object")
|
|
105629
|
+
return false;
|
|
105630
|
+
if (typeof node3.text === "string" && textHasComplexScript(node3.text))
|
|
105631
|
+
return true;
|
|
105632
|
+
if (!Array.isArray(node3.content))
|
|
105633
|
+
return false;
|
|
105634
|
+
return node3.content.some((child) => hasComplexScriptText(child));
|
|
105613
105635
|
}, getRunPropertiesNode = (runNode) => {
|
|
105614
105636
|
if (!runNode)
|
|
105615
105637
|
return null;
|
|
@@ -105820,6 +105842,12 @@ var isRegExp = (value) => {
|
|
|
105820
105842
|
const shouldExport = (key) => (key in (runProperties || {})) && (!(Array.isArray(styleKeys) && styleKeys.includes(key)) || Array.isArray(overrideKeys) && overrideKeys.includes(key));
|
|
105821
105843
|
const exportKeys = candidateKeys.filter(shouldExport);
|
|
105822
105844
|
const runPropertiesToExport = exportKeys.length > 0 ? Object.fromEntries(exportKeys.map((k) => [k, runProperties[k]])) : {};
|
|
105845
|
+
if (hasComplexScriptText(runNodeForExport)) {
|
|
105846
|
+
if ("bold" in runPropertiesToExport && !("boldCs" in runPropertiesToExport))
|
|
105847
|
+
runPropertiesToExport.boldCs = runPropertiesToExport.bold;
|
|
105848
|
+
if ("italic" in runPropertiesToExport && !("italicCs" in runPropertiesToExport))
|
|
105849
|
+
runPropertiesToExport.italicCs = runPropertiesToExport.italic;
|
|
105850
|
+
}
|
|
105823
105851
|
const exportParams = {
|
|
105824
105852
|
...params3,
|
|
105825
105853
|
node: runNodeForExport,
|
|
@@ -113538,7 +113566,7 @@ var isRegExp = (value) => {
|
|
|
113538
113566
|
const { paragraphNode, paragraphPos, tableInfo } = getRunContext($pos);
|
|
113539
113567
|
if (!paragraphNode || paragraphPos === undefined)
|
|
113540
113568
|
return;
|
|
113541
|
-
const { segments, firstInlineProps } = segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys);
|
|
113569
|
+
const { segments, firstInlineProps } = segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, removedKeys, preservedDerivedKeys, preferExistingKeys);
|
|
113542
113570
|
let runProperties = firstInlineProps ?? null;
|
|
113543
113571
|
const existingInlineKeys = runNode.attrs?.runPropertiesInlineKeys || [];
|
|
113544
113572
|
const hadInlineKeysMetadata = Array.isArray(runNode.attrs?.runPropertiesInlineKeys);
|
|
@@ -113603,6 +113631,9 @@ var isRegExp = (value) => {
|
|
|
113603
113631
|
lostKeys.forEach((k) => {
|
|
113604
113632
|
if (removedKeys.has(k))
|
|
113605
113633
|
return;
|
|
113634
|
+
const baseKey = COMPANION_INLINE_KEYS[k];
|
|
113635
|
+
if (baseKey && removedKeys.has(baseKey))
|
|
113636
|
+
return;
|
|
113606
113637
|
if (runNode.attrs?.runProperties?.[k] !== undefined)
|
|
113607
113638
|
runProperties[k] = runNode.attrs.runProperties[k];
|
|
113608
113639
|
});
|
|
@@ -118895,6 +118926,24 @@ var isRegExp = (value) => {
|
|
|
118895
118926
|
pgMar.attributes[attrKey] = value;
|
|
118896
118927
|
});
|
|
118897
118928
|
return sectPr;
|
|
118929
|
+
}, normalizePgMarTwipsInTree = (node3) => {
|
|
118930
|
+
if (!node3 || typeof node3 !== "object")
|
|
118931
|
+
return;
|
|
118932
|
+
if (node3.name === "w:pgMar" && node3.attributes && typeof node3.attributes === "object")
|
|
118933
|
+
for (const key of Object.keys(node3.attributes)) {
|
|
118934
|
+
const value = node3.attributes[key];
|
|
118935
|
+
if (value == null)
|
|
118936
|
+
continue;
|
|
118937
|
+
const serialized = String(value).trim();
|
|
118938
|
+
if (!serialized)
|
|
118939
|
+
continue;
|
|
118940
|
+
const num = Number(serialized);
|
|
118941
|
+
if (Number.isFinite(num) && !/^-?\d+$/.test(serialized))
|
|
118942
|
+
node3.attributes[key] = String(Math.round(num));
|
|
118943
|
+
}
|
|
118944
|
+
if (Array.isArray(node3.elements))
|
|
118945
|
+
for (const child of node3.elements)
|
|
118946
|
+
normalizePgMarTwipsInTree(child);
|
|
118898
118947
|
}, generateDefaultHeaderFooter = (type, id2) => {
|
|
118899
118948
|
return {
|
|
118900
118949
|
type: "element",
|
|
@@ -119707,7 +119756,7 @@ var isRegExp = (value) => {
|
|
|
119707
119756
|
state.kern = kernNode.attributes["w:val"];
|
|
119708
119757
|
}
|
|
119709
119758
|
}, SuperConverter;
|
|
119710
|
-
var
|
|
119759
|
+
var init_SuperConverter_1Voea3gd_es = __esm(() => {
|
|
119711
119760
|
init_rolldown_runtime_Bg48TavK_es();
|
|
119712
119761
|
init_jszip_C49i9kUs_es();
|
|
119713
119762
|
init_xml_js_CqGKpaft_es();
|
|
@@ -135856,6 +135905,14 @@ var init_SuperConverter_B_EF8ijE_es = __esm(() => {
|
|
|
135856
135905
|
"w:footnoteReference": "FootnoteReference",
|
|
135857
135906
|
"w:endnoteReference": "EndnoteReference"
|
|
135858
135907
|
};
|
|
135908
|
+
COMPLEX_SCRIPT_CODEPOINT_RANGES = [
|
|
135909
|
+
[1424, 2303],
|
|
135910
|
+
[2304, 4255],
|
|
135911
|
+
[6016, 6319],
|
|
135912
|
+
[7376, 7423],
|
|
135913
|
+
[43008, 43263],
|
|
135914
|
+
[43616, 43647]
|
|
135915
|
+
];
|
|
135859
135916
|
config$30 = {
|
|
135860
135917
|
xmlName: XML_NODE_NAME$31,
|
|
135861
135918
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
@@ -148982,9 +149039,7 @@ var init_SuperConverter_B_EF8ijE_es = __esm(() => {
|
|
|
148982
149039
|
RUN_PROPERTIES_DERIVED_FROM_MARKS = new Set([
|
|
148983
149040
|
"strike",
|
|
148984
149041
|
"italic",
|
|
148985
|
-
"italicCs",
|
|
148986
149042
|
"bold",
|
|
148987
|
-
"boldCs",
|
|
148988
149043
|
"underline",
|
|
148989
149044
|
"highlight",
|
|
148990
149045
|
"textTransform",
|
|
@@ -157581,7 +157636,7 @@ var init_SuperConverter_B_EF8ijE_es = __esm(() => {
|
|
|
157581
157636
|
};
|
|
157582
157637
|
});
|
|
157583
157638
|
|
|
157584
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
157639
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-cNPAdMd2.es.js
|
|
157585
157640
|
function parseSizeUnit(val = "0") {
|
|
157586
157641
|
const length3 = val.toString() || "0";
|
|
157587
157642
|
const value = Number.parseFloat(length3);
|
|
@@ -160303,8 +160358,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
160303
160358
|
}
|
|
160304
160359
|
};
|
|
160305
160360
|
};
|
|
160306
|
-
var
|
|
160307
|
-
|
|
160361
|
+
var init_create_headless_toolbar_cNPAdMd2_es = __esm(() => {
|
|
160362
|
+
init_SuperConverter_1Voea3gd_es();
|
|
160308
160363
|
init_constants_DrU4EASo_es();
|
|
160309
160364
|
init_dist_B8HfvhaK_es();
|
|
160310
160365
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -209002,7 +209057,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
209002
209057
|
init_remark_gfm_BhnWr3yf_es();
|
|
209003
209058
|
});
|
|
209004
209059
|
|
|
209005
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
209060
|
+
// ../../packages/superdoc/dist/chunks/src-GAfNMk63.es.js
|
|
209006
209061
|
function deleteProps(obj, propOrProps) {
|
|
209007
209062
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
209008
209063
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -281470,6 +281525,16 @@ var Node$13 = class Node$14 {
|
|
|
281470
281525
|
targetTr.setSelection(Selection.near(targetTr.doc.resolve(boundedFrom), -1));
|
|
281471
281526
|
}, require_lodash, import_lodash$1, normalizeAttrs = (attrs = {}) => {
|
|
281472
281527
|
return Object.fromEntries(Object.entries(attrs).filter(([, value]) => value !== null && value !== undefined));
|
|
281528
|
+
}, stripUnsetInternalSnapshotAttrs = (attrs = {}) => {
|
|
281529
|
+
const nextAttrs = { ...attrs };
|
|
281530
|
+
if (nextAttrs.ooxmlHighlightClear === null || nextAttrs.ooxmlHighlightClear === undefined)
|
|
281531
|
+
delete nextAttrs.ooxmlHighlightClear;
|
|
281532
|
+
return nextAttrs;
|
|
281533
|
+
}, createMarkSnapshot = (type, attrs = {}) => {
|
|
281534
|
+
return {
|
|
281535
|
+
type,
|
|
281536
|
+
attrs: stripUnsetInternalSnapshotAttrs(attrs)
|
|
281537
|
+
};
|
|
281473
281538
|
}, IDENTITY_ATTR_VALUES, ATTRIBUTE_ONLY_MARKS, normalizeSnapshotAttrs = (attrs = {}) => {
|
|
281474
281539
|
const base5 = normalizeAttrs(attrs);
|
|
281475
281540
|
return Object.fromEntries(Object.entries(base5).filter(([key2, value]) => IDENTITY_ATTR_VALUES[key2] !== value));
|
|
@@ -281510,14 +281575,14 @@ var Node$13 = class Node$14 {
|
|
|
281510
281575
|
if (existing) {
|
|
281511
281576
|
const merged = {
|
|
281512
281577
|
...existing,
|
|
281513
|
-
attrs: {
|
|
281578
|
+
attrs: stripUnsetInternalSnapshotAttrs({
|
|
281514
281579
|
...existing.attrs,
|
|
281515
281580
|
...incoming.attrs
|
|
281516
|
-
}
|
|
281581
|
+
})
|
|
281517
281582
|
};
|
|
281518
281583
|
return snapshots.map((mark2) => mark2 === existing ? merged : mark2);
|
|
281519
281584
|
}
|
|
281520
|
-
return [...snapshots, incoming];
|
|
281585
|
+
return [...snapshots, createMarkSnapshot(incoming.type, incoming.attrs)];
|
|
281521
281586
|
}, markMatchesSnapshot = (mark2, snapshot2, exact = true) => {
|
|
281522
281587
|
return marksMatch(mark2, snapshot2, exact);
|
|
281523
281588
|
}, markAttrsIncludeSnapshotAttrs = (mark2, snapshot2) => {
|
|
@@ -281627,19 +281692,13 @@ var Node$13 = class Node$14 {
|
|
|
281627
281692
|
before2 = [...beforeSnapshots];
|
|
281628
281693
|
after2 = upsertMarkSnapshotByType(afterSnapshots, {
|
|
281629
281694
|
type: step3.mark.type.name,
|
|
281630
|
-
attrs:
|
|
281695
|
+
attrs: step3.mark.attrs
|
|
281631
281696
|
});
|
|
281632
281697
|
}
|
|
281633
281698
|
} else {
|
|
281634
281699
|
const existingMarkOfSameType = liveMarks.find((mark2) => mark2.type.name === step3.mark.type.name && !["trackDelete", "trackFormat"].includes(mark2.type.name));
|
|
281635
|
-
before2 = existingMarkOfSameType ? [
|
|
281636
|
-
|
|
281637
|
-
attrs: { ...existingMarkOfSameType.attrs }
|
|
281638
|
-
}] : [];
|
|
281639
|
-
after2 = [{
|
|
281640
|
-
type: step3.mark.type.name,
|
|
281641
|
-
attrs: { ...step3.mark.attrs }
|
|
281642
|
-
}];
|
|
281700
|
+
before2 = existingMarkOfSameType ? [createMarkSnapshot(existingMarkOfSameType.type.name, existingMarkOfSameType.attrs)] : [];
|
|
281701
|
+
after2 = [createMarkSnapshot(step3.mark.type.name, step3.mark.attrs)];
|
|
281643
281702
|
}
|
|
281644
281703
|
if (isTrackFormatNoOp(before2, after2)) {
|
|
281645
281704
|
if (formatChangeMark)
|
|
@@ -281701,17 +281760,14 @@ var Node$13 = class Node$14 {
|
|
|
281701
281760
|
after2 = [...formatChangeMark.attrs.after];
|
|
281702
281761
|
before2 = upsertMarkSnapshotByType(formatChangeMark.attrs.before, {
|
|
281703
281762
|
type: step3.mark.type.name,
|
|
281704
|
-
attrs:
|
|
281763
|
+
attrs: step3.mark.attrs
|
|
281705
281764
|
});
|
|
281706
281765
|
}
|
|
281707
281766
|
else {
|
|
281708
281767
|
after2 = [];
|
|
281709
281768
|
let existingMark = node3.marks.find((mark2) => mark2.type === step3.mark.type);
|
|
281710
281769
|
if (existingMark)
|
|
281711
|
-
before2 = [
|
|
281712
|
-
type: step3.mark.type.name,
|
|
281713
|
-
attrs: { ...existingMark.attrs }
|
|
281714
|
-
}];
|
|
281770
|
+
before2 = [createMarkSnapshot(step3.mark.type.name, existingMark.attrs)];
|
|
281715
281771
|
else
|
|
281716
281772
|
before2 = [];
|
|
281717
281773
|
}
|
|
@@ -302816,12 +302872,12 @@ menclose::after {
|
|
|
302816
302872
|
return;
|
|
302817
302873
|
console.log(...args$1);
|
|
302818
302874
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
302819
|
-
var
|
|
302875
|
+
var init_src_GAfNMk63_es = __esm(() => {
|
|
302820
302876
|
init_rolldown_runtime_Bg48TavK_es();
|
|
302821
|
-
|
|
302877
|
+
init_SuperConverter_1Voea3gd_es();
|
|
302822
302878
|
init_jszip_C49i9kUs_es();
|
|
302823
302879
|
init_uuid_qzgm05fK_es();
|
|
302824
|
-
|
|
302880
|
+
init_create_headless_toolbar_cNPAdMd2_es();
|
|
302825
302881
|
init_constants_DrU4EASo_es();
|
|
302826
302882
|
init_dist_B8HfvhaK_es();
|
|
302827
302883
|
init_unified_Dsuw2be5_es();
|
|
@@ -313956,18 +314012,25 @@ ${err.toString()}`);
|
|
|
313956
314012
|
return { htmlAttributes: {} };
|
|
313957
314013
|
},
|
|
313958
314014
|
addAttributes() {
|
|
313959
|
-
return {
|
|
313960
|
-
|
|
313961
|
-
|
|
313962
|
-
|
|
313963
|
-
|
|
313964
|
-
|
|
313965
|
-
|
|
313966
|
-
|
|
313967
|
-
|
|
313968
|
-
|
|
314015
|
+
return {
|
|
314016
|
+
color: {
|
|
314017
|
+
default: null,
|
|
314018
|
+
parseDOM: (element3) => cssColorToHex(element3.getAttribute("data-color") || element3.style.backgroundColor),
|
|
314019
|
+
renderDOM: (attributes) => {
|
|
314020
|
+
if (!attributes.color)
|
|
314021
|
+
return {};
|
|
314022
|
+
return {
|
|
314023
|
+
"data-color": attributes.color,
|
|
314024
|
+
style: `background-color: ${attributes.color}; color: inherit`
|
|
314025
|
+
};
|
|
314026
|
+
}
|
|
314027
|
+
},
|
|
314028
|
+
ooxmlHighlightClear: {
|
|
314029
|
+
default: null,
|
|
314030
|
+
parseDOM: () => null,
|
|
314031
|
+
renderDOM: () => ({})
|
|
313969
314032
|
}
|
|
313970
|
-
}
|
|
314033
|
+
};
|
|
313971
314034
|
},
|
|
313972
314035
|
parseDOM() {
|
|
313973
314036
|
return [{ tag: "mark" }, {
|
|
@@ -340864,11 +340927,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
340864
340927
|
];
|
|
340865
340928
|
});
|
|
340866
340929
|
|
|
340867
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
340930
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-C8mCHw5x.es.js
|
|
340868
340931
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
340869
|
-
var
|
|
340870
|
-
|
|
340871
|
-
|
|
340932
|
+
var init_create_super_doc_ui_C8mCHw5x_es = __esm(() => {
|
|
340933
|
+
init_SuperConverter_1Voea3gd_es();
|
|
340934
|
+
init_create_headless_toolbar_cNPAdMd2_es();
|
|
340872
340935
|
MOD_ALIASES = new Set([
|
|
340873
340936
|
"Mod",
|
|
340874
340937
|
"Meta",
|
|
@@ -340910,16 +340973,16 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
|
|
|
340910
340973
|
|
|
340911
340974
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
340912
340975
|
var init_super_editor_es = __esm(() => {
|
|
340913
|
-
|
|
340914
|
-
|
|
340976
|
+
init_src_GAfNMk63_es();
|
|
340977
|
+
init_SuperConverter_1Voea3gd_es();
|
|
340915
340978
|
init_jszip_C49i9kUs_es();
|
|
340916
340979
|
init_xml_js_CqGKpaft_es();
|
|
340917
|
-
|
|
340980
|
+
init_create_headless_toolbar_cNPAdMd2_es();
|
|
340918
340981
|
init_constants_DrU4EASo_es();
|
|
340919
340982
|
init_dist_B8HfvhaK_es();
|
|
340920
340983
|
init_unified_Dsuw2be5_es();
|
|
340921
340984
|
init_DocxZipper_TPSo9G36_es();
|
|
340922
|
-
|
|
340985
|
+
init_create_super_doc_ui_C8mCHw5x_es();
|
|
340923
340986
|
init_ui_CGB3qmy3_es();
|
|
340924
340987
|
init_eventemitter3_UwU_CLPU_es();
|
|
340925
340988
|
init_errors_C_DoKMoN_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.110",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"
|
|
30
|
-
"superdoc": "
|
|
29
|
+
"superdoc": "1.32.0",
|
|
30
|
+
"@superdoc/super-editor": "0.0.1"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-linux-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.110",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.110",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.110",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.110",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.110"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|