superdoc 1.0.0-beta.54 → 1.0.0-beta.55
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-D_U-y4Wi.es.js → PdfViewer-ARRkZgYS.es.js} +1 -1
- package/dist/chunks/{PdfViewer-qBKjClah.cjs → PdfViewer-ObG30G-u.cjs} +1 -1
- package/dist/chunks/{index-to6_YLa7.es.js → index-Bwqb03qi.es.js} +3 -3
- package/dist/chunks/{index-BKvAeQdF.cjs → index-DFHwDXHd.cjs} +3 -3
- package/dist/chunks/{index-t8thQIOL-CV8VTGI4.cjs → index-bqjMjne1-CJi4d9NS.cjs} +1 -1
- package/dist/chunks/{index-t8thQIOL-vW80ABaR.es.js → index-bqjMjne1-DBB94Dlj.es.js} +1 -1
- package/dist/chunks/{super-editor.es-xpC1DWhM.es.js → super-editor.es-7Twgz-8H.es.js} +485 -177
- package/dist/chunks/{super-editor.es-BMiadG4G.cjs → super-editor.es-C2Ob7BbN.cjs} +485 -177
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-OoT4LYwQ.js → converter-D33MGATy.js} +274 -171
- package/dist/super-editor/chunks/{docx-zipper-Cf_hIcjC.js → docx-zipper-C7Fp89_I.js} +1 -1
- package/dist/super-editor/chunks/{editor-CqbtudGQ.js → editor-BiFHsy25.js} +216 -11
- package/dist/super-editor/chunks/{index-t8thQIOL.js → index-bqjMjne1.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BsfRAJ0o.js → toolbar-BNta2qOv.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 +487 -179
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -18081,7 +18081,7 @@
|
|
|
18081
18081
|
decode: decode$R,
|
|
18082
18082
|
attributes: validXmlAttributes$h
|
|
18083
18083
|
};
|
|
18084
|
-
const translator$
|
|
18084
|
+
const translator$2p = NodeTranslator.from(config$p);
|
|
18085
18085
|
const encode$O = (attributes) => attributes?.["w:val"];
|
|
18086
18086
|
const decode$Q = (attrs) => attrs?.highlight;
|
|
18087
18087
|
const attrConfig$q = Object.freeze({
|
|
@@ -18143,7 +18143,7 @@
|
|
|
18143
18143
|
decode: decode$P,
|
|
18144
18144
|
attributes: validXmlAttributes$g
|
|
18145
18145
|
};
|
|
18146
|
-
const translator$
|
|
18146
|
+
const translator$2o = NodeTranslator.from(config$o);
|
|
18147
18147
|
const encode$M = (attributes) => {
|
|
18148
18148
|
return attributes["w:val"];
|
|
18149
18149
|
};
|
|
@@ -18222,7 +18222,7 @@
|
|
|
18222
18222
|
decode: decode$L,
|
|
18223
18223
|
attributes: validXmlAttributes$f
|
|
18224
18224
|
};
|
|
18225
|
-
const translator$
|
|
18225
|
+
const translator$2n = NodeTranslator.from(config$n);
|
|
18226
18226
|
const carbonCopy = (obj) => {
|
|
18227
18227
|
if (!obj) return void 0;
|
|
18228
18228
|
try {
|
|
@@ -18363,7 +18363,7 @@
|
|
|
18363
18363
|
"color",
|
|
18364
18364
|
(v2) => {
|
|
18365
18365
|
if (v2 === "auto") {
|
|
18366
|
-
return
|
|
18366
|
+
return "auto";
|
|
18367
18367
|
} else if (v2) {
|
|
18368
18368
|
return `#${v2}`;
|
|
18369
18369
|
} else {
|
|
@@ -18548,9 +18548,10 @@
|
|
|
18548
18548
|
const intValue = parseInteger(value);
|
|
18549
18549
|
return intValue != void 0 ? String(intValue) : void 0;
|
|
18550
18550
|
};
|
|
18551
|
-
const translator$
|
|
18552
|
-
const translator$
|
|
18553
|
-
const translator$
|
|
18551
|
+
const translator$2m = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
|
|
18552
|
+
const translator$2l = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
|
|
18553
|
+
const translator$2k = NodeTranslator.from(createBorderPropertyHandler("w:bdr", "borders"));
|
|
18554
|
+
const translator$2j = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
|
|
18554
18555
|
const encode$I = (attributes) => attributes?.["w:val"];
|
|
18555
18556
|
const decode$K = (attrs) => attrs?.underline;
|
|
18556
18557
|
const attrConfig$m = Object.freeze({
|
|
@@ -18645,10 +18646,10 @@
|
|
|
18645
18646
|
decode: decode$F,
|
|
18646
18647
|
attributes: validXmlAttributes$e
|
|
18647
18648
|
};
|
|
18648
|
-
const translator$
|
|
18649
|
-
const translator$
|
|
18650
|
-
const translator$
|
|
18651
|
-
const translator$
|
|
18649
|
+
const translator$2i = NodeTranslator.from(config$m);
|
|
18650
|
+
const translator$2h = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
|
|
18651
|
+
const translator$2g = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
|
|
18652
|
+
const translator$2f = NodeTranslator.from({
|
|
18652
18653
|
xmlName: "w:color",
|
|
18653
18654
|
sdNodeOrKeyName: "color",
|
|
18654
18655
|
attributes: [
|
|
@@ -18665,7 +18666,7 @@
|
|
|
18665
18666
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18666
18667
|
}
|
|
18667
18668
|
});
|
|
18668
|
-
const translator$
|
|
18669
|
+
const translator$2e = NodeTranslator.from({
|
|
18669
18670
|
xmlName: "w:rFonts",
|
|
18670
18671
|
sdNodeOrKeyName: "fontFamily",
|
|
18671
18672
|
attributes: [
|
|
@@ -18696,16 +18697,16 @@
|
|
|
18696
18697
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18697
18698
|
}
|
|
18698
18699
|
});
|
|
18699
|
-
const translator$
|
|
18700
|
-
const translator$
|
|
18701
|
-
const translator$
|
|
18702
|
-
const translator$
|
|
18700
|
+
const translator$2d = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
|
|
18701
|
+
const translator$2c = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
|
|
18702
|
+
const translator$2b = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
|
|
18703
|
+
const translator$2a = NodeTranslator.from({
|
|
18703
18704
|
xmlName: "w:caps",
|
|
18704
18705
|
sdNodeOrKeyName: "textTransform",
|
|
18705
18706
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
|
|
18706
18707
|
decode: ({ node: node2 }) => node2.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node2.attrs["textTransform"] === "uppercase") } } : void 0
|
|
18707
18708
|
});
|
|
18708
|
-
const translator$
|
|
18709
|
+
const translator$29 = NodeTranslator.from({
|
|
18709
18710
|
xmlName: "w:shd",
|
|
18710
18711
|
sdNodeOrKeyName: "shading",
|
|
18711
18712
|
attributes: [
|
|
@@ -18727,7 +18728,7 @@
|
|
|
18727
18728
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18728
18729
|
}
|
|
18729
18730
|
});
|
|
18730
|
-
const translator$
|
|
18731
|
+
const translator$28 = NodeTranslator.from({
|
|
18731
18732
|
xmlName: "w:lang",
|
|
18732
18733
|
sdNodeOrKeyName: "lang",
|
|
18733
18734
|
attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
|
|
@@ -18739,26 +18740,99 @@
|
|
|
18739
18740
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18740
18741
|
}
|
|
18741
18742
|
});
|
|
18742
|
-
const translator$
|
|
18743
|
+
const translator$27 = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
|
|
18744
|
+
const translator$26 = NodeTranslator.from(createSingleAttrPropertyHandler("w:vertAlign"));
|
|
18745
|
+
const translator$25 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:smallCaps"));
|
|
18746
|
+
const translator$24 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
|
|
18747
|
+
const translator$23 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:emboss"));
|
|
18748
|
+
const translator$22 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:imprint"));
|
|
18749
|
+
const translator$21 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:noProof"));
|
|
18750
|
+
const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:oMath"));
|
|
18751
|
+
const translator$1$ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:outline"));
|
|
18752
|
+
const translator$1_ = NodeTranslator.from(createSingleBooleanPropertyHandler("w:shadow"));
|
|
18753
|
+
const translator$1Z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:vanish"));
|
|
18754
|
+
const translator$1Y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:specVanish"));
|
|
18755
|
+
const translator$1X = NodeTranslator.from(createSingleAttrPropertyHandler("w:effect"));
|
|
18756
|
+
const translator$1W = NodeTranslator.from(createSingleAttrPropertyHandler("w:em"));
|
|
18757
|
+
const translator$1V = NodeTranslator.from(createSingleAttrPropertyHandler("w:w"));
|
|
18758
|
+
const translator$1U = NodeTranslator.from(createSingleIntegerPropertyHandler("w:kern"));
|
|
18759
|
+
const translator$1T = NodeTranslator.from(createSingleIntegerPropertyHandler("w:position"));
|
|
18760
|
+
const translator$1S = NodeTranslator.from({
|
|
18761
|
+
xmlName: "w:fitText",
|
|
18762
|
+
sdNodeOrKeyName: "fitText",
|
|
18763
|
+
attributes: [createIntegerAttributeHandler("w:val"), createIntegerAttributeHandler("w:id")],
|
|
18764
|
+
encode: (_2, encodedAttrs) => {
|
|
18765
|
+
return encodedAttrs;
|
|
18766
|
+
},
|
|
18767
|
+
decode: function({ node: node2 }) {
|
|
18768
|
+
const decodedAttrs = this.decodeAttributes({ node: { ...node2, attrs: node2.attrs["fitText"] || {} } });
|
|
18769
|
+
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18770
|
+
}
|
|
18771
|
+
});
|
|
18772
|
+
const translator$1R = NodeTranslator.from({
|
|
18773
|
+
xmlName: "w:eastAsianLayout",
|
|
18774
|
+
sdNodeOrKeyName: "eastAsianLayout",
|
|
18775
|
+
attributes: [
|
|
18776
|
+
createIntegerAttributeHandler("w:id"),
|
|
18777
|
+
createBooleanAttributeHandler("w:combine"),
|
|
18778
|
+
createAttributeHandler("w:combineBrackets"),
|
|
18779
|
+
createBooleanAttributeHandler("w:vert"),
|
|
18780
|
+
createBooleanAttributeHandler("w:vertCompress")
|
|
18781
|
+
],
|
|
18782
|
+
encode: (_2, encodedAttrs) => {
|
|
18783
|
+
return encodedAttrs;
|
|
18784
|
+
},
|
|
18785
|
+
decode: function({ node: node2 }) {
|
|
18786
|
+
const decodedAttrs = this.decodeAttributes({ node: { ...node2, attrs: node2.attrs["eastAsianLayout"] || {} } });
|
|
18787
|
+
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18788
|
+
}
|
|
18789
|
+
});
|
|
18790
|
+
const translator$1Q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:rtl"));
|
|
18791
|
+
const translator$1P = NodeTranslator.from(createSingleBooleanPropertyHandler("w:cs"));
|
|
18792
|
+
const translator$1O = NodeTranslator.from(createSingleBooleanPropertyHandler("w:iCs"));
|
|
18793
|
+
const translator$1N = NodeTranslator.from(createSingleBooleanPropertyHandler("w:webHidden"));
|
|
18743
18794
|
const propertyTranslators$b = [
|
|
18744
|
-
translator$
|
|
18745
|
-
translator$
|
|
18746
|
-
translator$
|
|
18747
|
-
translator$
|
|
18748
|
-
translator$
|
|
18795
|
+
translator$2l,
|
|
18796
|
+
translator$2m,
|
|
18797
|
+
translator$2k,
|
|
18798
|
+
translator$2a,
|
|
18799
|
+
translator$2f,
|
|
18800
|
+
translator$1P,
|
|
18801
|
+
translator$2g,
|
|
18802
|
+
translator$1R,
|
|
18749
18803
|
translator$1X,
|
|
18750
18804
|
translator$1W,
|
|
18805
|
+
translator$23,
|
|
18806
|
+
translator$1S,
|
|
18807
|
+
translator$2e,
|
|
18808
|
+
translator$2b,
|
|
18809
|
+
translator$2c,
|
|
18810
|
+
translator$2o,
|
|
18751
18811
|
translator$22,
|
|
18752
|
-
translator$
|
|
18812
|
+
translator$2j,
|
|
18813
|
+
translator$1O,
|
|
18753
18814
|
translator$1U,
|
|
18815
|
+
translator$28,
|
|
18816
|
+
translator$27,
|
|
18817
|
+
translator$21,
|
|
18818
|
+
translator$20,
|
|
18819
|
+
translator$1$,
|
|
18754
18820
|
translator$1T,
|
|
18755
|
-
translator$1S,
|
|
18756
|
-
translator$1R,
|
|
18757
18821
|
translator$1Q,
|
|
18758
|
-
translator$
|
|
18759
|
-
translator$
|
|
18822
|
+
translator$2d,
|
|
18823
|
+
translator$1_,
|
|
18824
|
+
translator$29,
|
|
18825
|
+
translator$25,
|
|
18826
|
+
translator$24,
|
|
18827
|
+
translator$1Y,
|
|
18828
|
+
translator$2h,
|
|
18829
|
+
translator$2i,
|
|
18830
|
+
translator$1Z,
|
|
18831
|
+
translator$26,
|
|
18832
|
+
translator$1N,
|
|
18833
|
+
translator$1V
|
|
18760
18834
|
];
|
|
18761
|
-
const translator$
|
|
18835
|
+
const translator$1M = NodeTranslator.from(
|
|
18762
18836
|
createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$b)
|
|
18763
18837
|
);
|
|
18764
18838
|
const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
|
|
@@ -18840,18 +18914,18 @@
|
|
|
18840
18914
|
elements: carbonCopy(selectedElements)
|
|
18841
18915
|
};
|
|
18842
18916
|
}
|
|
18843
|
-
const translator$
|
|
18917
|
+
const translator$1L = NodeTranslator.from(config$l);
|
|
18844
18918
|
function buildPath(existingPath = [], node2, branch) {
|
|
18845
18919
|
const path2 = [...existingPath];
|
|
18846
18920
|
if (node2) path2.push(node2);
|
|
18847
18921
|
if (branch) path2.push(branch);
|
|
18848
18922
|
return path2;
|
|
18849
18923
|
}
|
|
18850
|
-
const translator$
|
|
18851
|
-
const translator$
|
|
18852
|
-
const translator$
|
|
18853
|
-
const translator$
|
|
18854
|
-
const translator$
|
|
18924
|
+
const translator$1K = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
|
|
18925
|
+
const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
|
|
18926
|
+
const translator$1I = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
|
|
18927
|
+
const translator$1H = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
|
|
18928
|
+
const translator$1G = NodeTranslator.from({
|
|
18855
18929
|
xmlName: "w:cnfStyle",
|
|
18856
18930
|
sdNodeOrKeyName: "cnfStyle",
|
|
18857
18931
|
attributes: [
|
|
@@ -18877,9 +18951,9 @@
|
|
|
18877
18951
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18878
18952
|
}
|
|
18879
18953
|
});
|
|
18880
|
-
const translator$
|
|
18881
|
-
const translator$
|
|
18882
|
-
const translator$
|
|
18954
|
+
const translator$1F = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
|
|
18955
|
+
const translator$1E = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
18956
|
+
const translator$1D = NodeTranslator.from({
|
|
18883
18957
|
xmlName: "w:framePr",
|
|
18884
18958
|
sdNodeOrKeyName: "framePr",
|
|
18885
18959
|
attributes: [
|
|
@@ -18907,7 +18981,7 @@
|
|
|
18907
18981
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18908
18982
|
}
|
|
18909
18983
|
});
|
|
18910
|
-
const translator$
|
|
18984
|
+
const translator$1C = NodeTranslator.from({
|
|
18911
18985
|
xmlName: "w:ind",
|
|
18912
18986
|
sdNodeOrKeyName: "indent",
|
|
18913
18987
|
attributes: [
|
|
@@ -18932,12 +19006,12 @@
|
|
|
18932
19006
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
18933
19007
|
}
|
|
18934
19008
|
});
|
|
18935
|
-
const translator$
|
|
18936
|
-
const translator$
|
|
18937
|
-
const translator$
|
|
18938
|
-
const translator$
|
|
18939
|
-
const translator$
|
|
18940
|
-
const translator$
|
|
19009
|
+
const translator$1B = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
19010
|
+
const translator$1A = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
|
|
19011
|
+
const translator$1z = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
|
|
19012
|
+
const translator$1y = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
|
|
19013
|
+
const translator$1x = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
|
|
19014
|
+
const translator$1w = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
|
|
18941
19015
|
const createTrackStyleMark = (marks) => {
|
|
18942
19016
|
const trackStyleMark = marks.find((mark2) => mark2.type === "trackFormat");
|
|
18943
19017
|
if (trackStyleMark) {
|
|
@@ -19019,41 +19093,40 @@
|
|
|
19019
19093
|
decode: decode$D,
|
|
19020
19094
|
attributes: validXmlAttributes$c
|
|
19021
19095
|
};
|
|
19022
|
-
const translator$
|
|
19023
|
-
const translator$
|
|
19024
|
-
const propertyTranslators$a = [translator$
|
|
19025
|
-
const translator$
|
|
19096
|
+
const translator$1v = NodeTranslator.from(config$k);
|
|
19097
|
+
const translator$1u = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
|
|
19098
|
+
const propertyTranslators$a = [translator$1L, translator$1w, translator$1v, translator$1u];
|
|
19099
|
+
const translator$1t = NodeTranslator.from(
|
|
19026
19100
|
createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$a)
|
|
19027
19101
|
);
|
|
19028
|
-
const translator$
|
|
19102
|
+
const translator$1s = NodeTranslator.from(
|
|
19029
19103
|
createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
|
|
19030
19104
|
);
|
|
19031
|
-
const translator$
|
|
19032
|
-
const translator$
|
|
19033
|
-
const translator$
|
|
19034
|
-
const translator$
|
|
19035
|
-
const translator$
|
|
19036
|
-
const translator$
|
|
19037
|
-
const translator$
|
|
19038
|
-
const translator$
|
|
19039
|
-
const translator$
|
|
19040
|
-
const translator$
|
|
19041
|
-
const translator$
|
|
19105
|
+
const translator$1r = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
|
|
19106
|
+
const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
|
|
19107
|
+
const translator$1p = NodeTranslator.from(createBorderPropertyHandler("w:between"));
|
|
19108
|
+
const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
19109
|
+
const translator$1n = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
19110
|
+
const translator$1m = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
19111
|
+
const translator$1l = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
19112
|
+
const translator$1k = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
19113
|
+
const translator$1j = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
19114
|
+
const translator$1i = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
19115
|
+
const translator$1h = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
19042
19116
|
const propertyTranslators$9 = [
|
|
19043
|
-
translator$
|
|
19044
|
-
translator$1r,
|
|
19117
|
+
translator$1L,
|
|
19045
19118
|
translator$1q,
|
|
19046
19119
|
translator$1p,
|
|
19047
|
-
translator$
|
|
19048
|
-
translator$
|
|
19049
|
-
translator$
|
|
19120
|
+
translator$1o,
|
|
19121
|
+
translator$1m,
|
|
19122
|
+
translator$1k,
|
|
19123
|
+
translator$1i
|
|
19050
19124
|
];
|
|
19051
|
-
const translator$
|
|
19125
|
+
const translator$1g = NodeTranslator.from(
|
|
19052
19126
|
createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$9)
|
|
19053
19127
|
);
|
|
19054
|
-
const translator$
|
|
19055
|
-
const translator$
|
|
19056
|
-
const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
|
|
19128
|
+
const translator$1f = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
|
|
19129
|
+
const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
|
|
19057
19130
|
const translator$1d = NodeTranslator.from({
|
|
19058
19131
|
xmlName: "w:spacing",
|
|
19059
19132
|
sdNodeOrKeyName: "spacing",
|
|
@@ -19078,7 +19151,7 @@
|
|
|
19078
19151
|
const translator$1c = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
|
|
19079
19152
|
const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
|
|
19080
19153
|
const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
|
|
19081
|
-
const propertyTranslators$8 = [translator$
|
|
19154
|
+
const propertyTranslators$8 = [translator$1L, translator$2n];
|
|
19082
19155
|
const translator$19 = NodeTranslator.from(
|
|
19083
19156
|
createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$8, { skipRun: true })
|
|
19084
19157
|
);
|
|
@@ -19089,7 +19162,6 @@
|
|
|
19089
19162
|
const translator$14 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
|
|
19090
19163
|
const translator$13 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
|
|
19091
19164
|
const propertyTranslators$7 = [
|
|
19092
|
-
translator$1M,
|
|
19093
19165
|
translator$1L,
|
|
19094
19166
|
translator$1K,
|
|
19095
19167
|
translator$1J,
|
|
@@ -19104,14 +19176,15 @@
|
|
|
19104
19176
|
translator$1A,
|
|
19105
19177
|
translator$1z,
|
|
19106
19178
|
translator$1y,
|
|
19107
|
-
translator$
|
|
19179
|
+
translator$1x,
|
|
19108
19180
|
translator$1t,
|
|
19109
19181
|
translator$1s,
|
|
19110
|
-
translator$
|
|
19182
|
+
translator$1r,
|
|
19111
19183
|
translator$1g,
|
|
19112
19184
|
translator$1f,
|
|
19113
|
-
translator$1Q,
|
|
19114
19185
|
translator$1e,
|
|
19186
|
+
translator$29,
|
|
19187
|
+
translator$24,
|
|
19115
19188
|
translator$1d,
|
|
19116
19189
|
translator$1c,
|
|
19117
19190
|
translator$1b,
|
|
@@ -19123,7 +19196,7 @@
|
|
|
19123
19196
|
translator$15,
|
|
19124
19197
|
translator$14,
|
|
19125
19198
|
translator$13,
|
|
19126
|
-
translator$
|
|
19199
|
+
translator$1M
|
|
19127
19200
|
];
|
|
19128
19201
|
const translator$12 = NodeTranslator.from(
|
|
19129
19202
|
createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$7)
|
|
@@ -19196,12 +19269,12 @@
|
|
|
19196
19269
|
const DEFAULT_FONT_SIZE_HALF_POINTS = 20;
|
|
19197
19270
|
const resolveRunProperties = (params2, inlineRpr, resolvedPpr, isListNumber = false, numberingDefinedInline = false) => {
|
|
19198
19271
|
const paragraphStyleId = resolvedPpr?.styleId;
|
|
19199
|
-
const paragraphStyleProps = resolveStyleChain$1(params2, paragraphStyleId, translator$
|
|
19200
|
-
const defaultProps2 = getDefaultProperties(params2, translator$
|
|
19201
|
-
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$
|
|
19272
|
+
const paragraphStyleProps = resolveStyleChain$1(params2, paragraphStyleId, translator$1M);
|
|
19273
|
+
const defaultProps2 = getDefaultProperties(params2, translator$1M);
|
|
19274
|
+
const { properties: normalProps, isDefault: isNormalDefault } = getStyleProperties(params2, "Normal", translator$1M);
|
|
19202
19275
|
let runStyleProps = {};
|
|
19203
19276
|
if (!paragraphStyleId?.startsWith("TOC")) {
|
|
19204
|
-
runStyleProps = inlineRpr.styleId ? resolveStyleChain$1(params2, inlineRpr.styleId, translator$
|
|
19277
|
+
runStyleProps = inlineRpr.styleId ? resolveStyleChain$1(params2, inlineRpr.styleId, translator$1M) : {};
|
|
19205
19278
|
}
|
|
19206
19279
|
let styleChain;
|
|
19207
19280
|
if (isNormalDefault) {
|
|
@@ -19217,7 +19290,7 @@
|
|
|
19217
19290
|
params2,
|
|
19218
19291
|
resolvedPpr.numberingProperties.ilvl ?? 0,
|
|
19219
19292
|
numId,
|
|
19220
|
-
translator$
|
|
19293
|
+
translator$1M
|
|
19221
19294
|
);
|
|
19222
19295
|
}
|
|
19223
19296
|
if (!numberingDefinedInline) {
|
|
@@ -19379,6 +19452,7 @@
|
|
|
19379
19452
|
}
|
|
19380
19453
|
function getNumberingProperties(params2, ilvl, numId, translator2, tries = 0) {
|
|
19381
19454
|
const { numbering: allDefinitions } = params2;
|
|
19455
|
+
if (!allDefinitions) return {};
|
|
19382
19456
|
const { definitions, abstracts } = allDefinitions;
|
|
19383
19457
|
const propertiesChain = [];
|
|
19384
19458
|
const numDefinition = definitions[numId];
|
|
@@ -19806,13 +19880,12 @@
|
|
|
19806
19880
|
return runProperties;
|
|
19807
19881
|
}
|
|
19808
19882
|
marks.forEach((mark2) => {
|
|
19809
|
-
|
|
19883
|
+
const type2 = mark2.type.name ?? mark2.type;
|
|
19884
|
+
switch (type2) {
|
|
19810
19885
|
case "strike":
|
|
19811
19886
|
case "italic":
|
|
19812
19887
|
case "bold":
|
|
19813
|
-
|
|
19814
|
-
runProperties[mark2.type] = mark2.attrs.value;
|
|
19815
|
-
}
|
|
19888
|
+
runProperties[type2] = mark2.attrs.value !== "0" && mark2.attrs.value !== false;
|
|
19816
19889
|
break;
|
|
19817
19890
|
case "underline": {
|
|
19818
19891
|
const { underlineType, underlineColor } = mark2.attrs;
|
|
@@ -20061,7 +20134,7 @@
|
|
|
20061
20134
|
let submarks = [];
|
|
20062
20135
|
const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
|
|
20063
20136
|
if (rPr) {
|
|
20064
|
-
const runProperties = translator$
|
|
20137
|
+
const runProperties = translator$1M.encode({ ...params2, nodes: [rPr] });
|
|
20065
20138
|
submarks = encodeMarksFromRPr(runProperties, params2?.docx);
|
|
20066
20139
|
}
|
|
20067
20140
|
return [{ type: TrackFormatMarkName$1, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
|
|
@@ -20623,8 +20696,8 @@
|
|
|
20623
20696
|
{
|
|
20624
20697
|
xmlName: "w:history",
|
|
20625
20698
|
sdName: "history",
|
|
20626
|
-
encode: (attributes) => attributes["w:history"] === "1" || attributes["w:history"] === "true",
|
|
20627
|
-
decode: (attributes) => attributes["history"] ? "1" : "0"
|
|
20699
|
+
encode: (attributes) => attributes["w:history"] == null ? null : attributes["w:history"] === "1" || attributes["w:history"] === "true",
|
|
20700
|
+
decode: (attributes) => attributes["history"] == null ? null : attributes["history"] ? "1" : "0"
|
|
20628
20701
|
},
|
|
20629
20702
|
_createAttributeHandler("w:tooltip", "tooltip"),
|
|
20630
20703
|
_createAttributeHandler("r:id", "rId"),
|
|
@@ -20767,7 +20840,7 @@
|
|
|
20767
20840
|
if (!runNode) return void 0;
|
|
20768
20841
|
const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
|
|
20769
20842
|
const rPrNode = elements.find((child) => child?.name === "w:rPr");
|
|
20770
|
-
const runProperties = rPrNode ? translator$
|
|
20843
|
+
const runProperties = rPrNode ? translator$1M.encode({ ...params2, nodes: [rPrNode] }) : {};
|
|
20771
20844
|
const paragraphProperties = params2?.extraParams?.paragraphProperties || {};
|
|
20772
20845
|
const resolvedRunProperties = resolveRunProperties(params2, runProperties ?? {}, paragraphProperties);
|
|
20773
20846
|
const marks = encodeMarksFromRPr(resolvedRunProperties, params2?.docx) || [];
|
|
@@ -20828,29 +20901,37 @@
|
|
|
20828
20901
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node2);
|
|
20829
20902
|
const runAttrs = runNodeForExport.attrs || {};
|
|
20830
20903
|
const runProperties = runAttrs.runProperties || {};
|
|
20831
|
-
const marksProperties = decodeRPrFromMarks(runNodeForExport.marks || []);
|
|
20832
|
-
const finalRunProperties = combineRunProperties([runProperties, marksProperties]);
|
|
20833
20904
|
const exportParams = {
|
|
20834
20905
|
...params2,
|
|
20835
20906
|
node: runNodeForExport,
|
|
20836
|
-
extraParams: { ...params2?.extraParams, runProperties
|
|
20907
|
+
extraParams: { ...params2?.extraParams, runProperties }
|
|
20837
20908
|
};
|
|
20838
20909
|
if (!exportParams.editor) {
|
|
20839
20910
|
exportParams.editor = { extensionService: { extensions: [] } };
|
|
20840
20911
|
}
|
|
20841
20912
|
const childElements = translateChildNodes(exportParams) || [];
|
|
20842
|
-
let runPropertiesElement = translator$
|
|
20913
|
+
let runPropertiesElement = translator$1M.decode({
|
|
20843
20914
|
...params2,
|
|
20844
|
-
node: { attrs: { runProperties
|
|
20915
|
+
node: { attrs: { runProperties } }
|
|
20845
20916
|
});
|
|
20846
20917
|
const runPropsTemplate = runPropertiesElement ? cloneXmlNode(runPropertiesElement) : null;
|
|
20847
20918
|
const applyBaseRunProps = (runNode) => applyRunPropertiesTemplate(runNode, runPropsTemplate);
|
|
20919
|
+
const replaceRunProps = (runNode) => {
|
|
20920
|
+
if (Array.isArray(runNode.elements)) {
|
|
20921
|
+
runNode.elements = runNode.elements.filter((el) => el?.name !== "w:rPr");
|
|
20922
|
+
} else {
|
|
20923
|
+
runNode.elements = [];
|
|
20924
|
+
}
|
|
20925
|
+
if (runPropsTemplate) {
|
|
20926
|
+
runNode.elements.unshift(cloneXmlNode(runPropsTemplate));
|
|
20927
|
+
}
|
|
20928
|
+
};
|
|
20848
20929
|
const runs2 = [];
|
|
20849
20930
|
childElements.forEach((child) => {
|
|
20850
20931
|
if (!child) return;
|
|
20851
20932
|
if (child.name === "w:r") {
|
|
20852
20933
|
const clonedRun = cloneXmlNode(child);
|
|
20853
|
-
|
|
20934
|
+
replaceRunProps(clonedRun);
|
|
20854
20935
|
runs2.push(clonedRun);
|
|
20855
20936
|
return;
|
|
20856
20937
|
}
|
|
@@ -20866,7 +20947,7 @@
|
|
|
20866
20947
|
const trackedClone = cloneXmlNode(child);
|
|
20867
20948
|
if (Array.isArray(trackedClone.elements)) {
|
|
20868
20949
|
trackedClone.elements.forEach((element2) => {
|
|
20869
|
-
if (element2?.name === "w:r")
|
|
20950
|
+
if (element2?.name === "w:r") replaceRunProps(element2);
|
|
20870
20951
|
});
|
|
20871
20952
|
}
|
|
20872
20953
|
runs2.push(trackedClone);
|
|
@@ -20928,12 +21009,12 @@
|
|
|
20928
21009
|
const translator$R = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
|
|
20929
21010
|
const translator$Q = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
|
|
20930
21011
|
const propertyTranslators$6 = [
|
|
20931
|
-
translator$
|
|
21012
|
+
translator$1i,
|
|
20932
21013
|
translator$T,
|
|
20933
|
-
translator$
|
|
20934
|
-
translator$
|
|
21014
|
+
translator$1m,
|
|
21015
|
+
translator$1o,
|
|
20935
21016
|
translator$X,
|
|
20936
|
-
translator$
|
|
21017
|
+
translator$1k,
|
|
20937
21018
|
translator$V,
|
|
20938
21019
|
translator$U,
|
|
20939
21020
|
translator$R,
|
|
@@ -20952,12 +21033,12 @@
|
|
|
20952
21033
|
)
|
|
20953
21034
|
);
|
|
20954
21035
|
const propertyTranslators$5 = [
|
|
20955
|
-
translator$
|
|
21036
|
+
translator$1n,
|
|
20956
21037
|
translator$W,
|
|
20957
|
-
translator$
|
|
20958
|
-
translator$
|
|
21038
|
+
translator$1l,
|
|
21039
|
+
translator$1j,
|
|
20959
21040
|
translator$S,
|
|
20960
|
-
translator$
|
|
21041
|
+
translator$1h
|
|
20961
21042
|
];
|
|
20962
21043
|
const translator$N = NodeTranslator.from(
|
|
20963
21044
|
createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
|
|
@@ -20986,12 +21067,12 @@
|
|
|
20986
21067
|
createNestedArrayPropertyHandler("w:headers", "headers", [translator$J])
|
|
20987
21068
|
);
|
|
20988
21069
|
const propertyTranslators$4 = [
|
|
20989
|
-
translator$
|
|
21070
|
+
translator$1G,
|
|
20990
21071
|
translator$_,
|
|
20991
21072
|
translator$Z,
|
|
20992
21073
|
translator$Y,
|
|
20993
21074
|
translator$P,
|
|
20994
|
-
translator$
|
|
21075
|
+
translator$29,
|
|
20995
21076
|
translator$O,
|
|
20996
21077
|
translator$N,
|
|
20997
21078
|
translator$17,
|
|
@@ -21447,12 +21528,12 @@
|
|
|
21447
21528
|
const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
21448
21529
|
const propertyTranslators$3 = [
|
|
21449
21530
|
translator$F,
|
|
21450
|
-
translator$
|
|
21451
|
-
translator$
|
|
21531
|
+
translator$1G,
|
|
21532
|
+
translator$1E,
|
|
21452
21533
|
translator$E,
|
|
21453
21534
|
translator$D,
|
|
21454
21535
|
translator$C,
|
|
21455
|
-
translator$
|
|
21536
|
+
translator$1B,
|
|
21456
21537
|
translator$B,
|
|
21457
21538
|
translator$A,
|
|
21458
21539
|
translator$z,
|
|
@@ -36862,7 +36943,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36862
36943
|
const textRunProperties = decodeRPrFromMarks(marks || []);
|
|
36863
36944
|
const parentRunProperties = params2.extraParams?.runProperties || {};
|
|
36864
36945
|
const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
|
|
36865
|
-
const rPrNode = translator$
|
|
36946
|
+
const rPrNode = translator$1M.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
|
|
36866
36947
|
textNodes.push({
|
|
36867
36948
|
name: "w:t",
|
|
36868
36949
|
elements: [{ text: text2, type: "text" }],
|
|
@@ -37804,33 +37885,33 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
37804
37885
|
}
|
|
37805
37886
|
});
|
|
37806
37887
|
const propertyTranslators$2 = [
|
|
37807
|
-
translator$
|
|
37888
|
+
translator$1o,
|
|
37808
37889
|
translator$X,
|
|
37809
37890
|
translator$V,
|
|
37810
37891
|
translator$U,
|
|
37811
|
-
translator$
|
|
37812
|
-
translator$
|
|
37892
|
+
translator$1m,
|
|
37893
|
+
translator$1k,
|
|
37813
37894
|
translator$T,
|
|
37814
|
-
translator$
|
|
37895
|
+
translator$1i
|
|
37815
37896
|
];
|
|
37816
37897
|
const translator$e = NodeTranslator.from(
|
|
37817
37898
|
createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
|
|
37818
37899
|
);
|
|
37819
37900
|
const propertyTranslators$1 = [
|
|
37820
|
-
translator$
|
|
37901
|
+
translator$1n,
|
|
37821
37902
|
translator$W,
|
|
37822
|
-
translator$
|
|
37823
|
-
translator$
|
|
37903
|
+
translator$1l,
|
|
37904
|
+
translator$1j,
|
|
37824
37905
|
translator$S,
|
|
37825
|
-
translator$
|
|
37906
|
+
translator$1h
|
|
37826
37907
|
];
|
|
37827
37908
|
const translator$d = NodeTranslator.from(
|
|
37828
37909
|
createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
|
|
37829
37910
|
);
|
|
37830
37911
|
const propertyTranslators = [
|
|
37831
37912
|
translator$q,
|
|
37832
|
-
translator$
|
|
37833
|
-
translator$
|
|
37913
|
+
translator$1B,
|
|
37914
|
+
translator$29,
|
|
37834
37915
|
translator$p,
|
|
37835
37916
|
translator$B,
|
|
37836
37917
|
translator$o,
|
|
@@ -39101,7 +39182,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39101
39182
|
});
|
|
39102
39183
|
break;
|
|
39103
39184
|
case "w:ins":
|
|
39104
|
-
result = translator$
|
|
39185
|
+
result = translator$1v.encode({
|
|
39105
39186
|
...translatorParams,
|
|
39106
39187
|
extraParams: {
|
|
39107
39188
|
...translatorParams.extraParams,
|
|
@@ -39157,7 +39238,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39157
39238
|
case "trackDelete":
|
|
39158
39239
|
return translator$2.decode(params2);
|
|
39159
39240
|
case "trackInsert":
|
|
39160
|
-
return translator$
|
|
39241
|
+
return translator$1v.decode(params2);
|
|
39161
39242
|
}
|
|
39162
39243
|
}
|
|
39163
39244
|
const isLinkNode = node2.marks?.some((m2) => m2.type === "link");
|
|
@@ -39233,33 +39314,40 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39233
39314
|
};
|
|
39234
39315
|
const translatorList = Array.from(
|
|
39235
39316
|
/* @__PURE__ */ new Set([
|
|
39236
|
-
translator$
|
|
39317
|
+
translator$1L,
|
|
39237
39318
|
translator$6,
|
|
39238
39319
|
translator$5,
|
|
39239
39320
|
translator$4,
|
|
39240
39321
|
translator$3,
|
|
39241
|
-
translator$1L,
|
|
39242
39322
|
translator$1K,
|
|
39243
39323
|
translator$1J,
|
|
39244
|
-
translator$
|
|
39245
|
-
translator$
|
|
39246
|
-
translator$
|
|
39324
|
+
translator$1I,
|
|
39325
|
+
translator$2m,
|
|
39326
|
+
translator$1q,
|
|
39327
|
+
translator$2l,
|
|
39328
|
+
translator$2k,
|
|
39247
39329
|
translator$q,
|
|
39248
39330
|
translator$7,
|
|
39249
39331
|
translator$8,
|
|
39250
|
-
translator$
|
|
39251
|
-
translator$
|
|
39332
|
+
translator$1o,
|
|
39333
|
+
translator$2p,
|
|
39252
39334
|
translator$F,
|
|
39253
|
-
translator$
|
|
39254
|
-
translator$1H,
|
|
39255
|
-
translator$1W,
|
|
39335
|
+
translator$2a,
|
|
39256
39336
|
translator$1G,
|
|
39257
|
-
translator$
|
|
39337
|
+
translator$2f,
|
|
39258
39338
|
translator$1F,
|
|
39339
|
+
translator$1P,
|
|
39340
|
+
translator$2,
|
|
39341
|
+
translator$1E,
|
|
39259
39342
|
translator$s,
|
|
39343
|
+
translator$2g,
|
|
39344
|
+
translator$1R,
|
|
39260
39345
|
translator$1X,
|
|
39346
|
+
translator$1W,
|
|
39347
|
+
translator$23,
|
|
39261
39348
|
translator$X,
|
|
39262
|
-
translator$
|
|
39349
|
+
translator$1S,
|
|
39350
|
+
translator$1D,
|
|
39263
39351
|
translator$E,
|
|
39264
39352
|
translator$D,
|
|
39265
39353
|
translator$b,
|
|
@@ -39268,49 +39356,60 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39268
39356
|
translator$I,
|
|
39269
39357
|
translator$C,
|
|
39270
39358
|
translator$K,
|
|
39271
|
-
translator$
|
|
39359
|
+
translator$2o,
|
|
39272
39360
|
translator$10,
|
|
39273
|
-
translator$
|
|
39274
|
-
translator$
|
|
39275
|
-
translator$1D,
|
|
39361
|
+
translator$2j,
|
|
39362
|
+
translator$1O,
|
|
39276
39363
|
translator$1w,
|
|
39364
|
+
translator$1C,
|
|
39365
|
+
translator$22,
|
|
39366
|
+
translator$1v,
|
|
39277
39367
|
translator$V,
|
|
39278
39368
|
translator$U,
|
|
39279
|
-
translator$1C,
|
|
39280
39369
|
translator$1B,
|
|
39281
39370
|
translator$1A,
|
|
39282
39371
|
translator$1z,
|
|
39283
|
-
translator$
|
|
39284
|
-
translator$1n,
|
|
39372
|
+
translator$1U,
|
|
39285
39373
|
translator$1y,
|
|
39374
|
+
translator$28,
|
|
39375
|
+
translator$1m,
|
|
39376
|
+
translator$1x,
|
|
39377
|
+
translator$21,
|
|
39286
39378
|
translator$O,
|
|
39287
|
-
translator$1v,
|
|
39288
39379
|
translator$1u,
|
|
39289
39380
|
translator$1t,
|
|
39381
|
+
translator$1$,
|
|
39290
39382
|
translator$1s,
|
|
39383
|
+
translator$1r,
|
|
39384
|
+
translator$20,
|
|
39291
39385
|
translator$11,
|
|
39292
|
-
translator$
|
|
39293
|
-
translator$1h,
|
|
39294
|
-
translator$12,
|
|
39386
|
+
translator$1e,
|
|
39295
39387
|
translator$1g,
|
|
39388
|
+
translator$1T,
|
|
39389
|
+
translator$12,
|
|
39390
|
+
translator$1f,
|
|
39296
39391
|
translator$$,
|
|
39297
|
-
translator$
|
|
39298
|
-
translator$
|
|
39299
|
-
translator$
|
|
39300
|
-
translator$1l,
|
|
39301
|
-
translator$r,
|
|
39392
|
+
translator$2e,
|
|
39393
|
+
translator$1M,
|
|
39394
|
+
translator$2d,
|
|
39302
39395
|
translator$1Q,
|
|
39303
|
-
translator$
|
|
39396
|
+
translator$1k,
|
|
39397
|
+
translator$r,
|
|
39398
|
+
translator$1_,
|
|
39399
|
+
translator$29,
|
|
39400
|
+
translator$25,
|
|
39401
|
+
translator$24,
|
|
39304
39402
|
translator$1d,
|
|
39305
39403
|
translator$1c,
|
|
39306
39404
|
translator$1b,
|
|
39307
39405
|
translator$1a,
|
|
39308
|
-
translator$T,
|
|
39309
39406
|
translator$1Y,
|
|
39310
|
-
translator$
|
|
39311
|
-
translator$
|
|
39407
|
+
translator$T,
|
|
39408
|
+
translator$2h,
|
|
39409
|
+
translator$2c,
|
|
39410
|
+
translator$2b,
|
|
39312
39411
|
translator$1,
|
|
39313
|
-
translator$
|
|
39412
|
+
translator$2n,
|
|
39314
39413
|
translator$19,
|
|
39315
39414
|
translator$9,
|
|
39316
39415
|
translator$e,
|
|
@@ -39345,12 +39444,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39345
39444
|
translator$18,
|
|
39346
39445
|
translator$16,
|
|
39347
39446
|
translator$15,
|
|
39348
|
-
translator$
|
|
39349
|
-
translator$
|
|
39447
|
+
translator$1i,
|
|
39448
|
+
translator$2i,
|
|
39350
39449
|
translator$L,
|
|
39450
|
+
translator$1Z,
|
|
39451
|
+
translator$26,
|
|
39351
39452
|
translator$Y,
|
|
39453
|
+
translator$1V,
|
|
39352
39454
|
translator$y,
|
|
39353
39455
|
translator$x,
|
|
39456
|
+
translator$1N,
|
|
39354
39457
|
translator$14,
|
|
39355
39458
|
translator$13,
|
|
39356
39459
|
translator$u,
|
|
@@ -39458,7 +39561,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39458
39561
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
39459
39562
|
return { nodes: [], consumed: 0 };
|
|
39460
39563
|
}
|
|
39461
|
-
const result = translator$
|
|
39564
|
+
const result = translator$2p.encode(params2);
|
|
39462
39565
|
if (!result) return { nodes: [], consumed: 0 };
|
|
39463
39566
|
return {
|
|
39464
39567
|
nodes: [result],
|
|
@@ -39602,7 +39705,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39602
39705
|
...currentNode,
|
|
39603
39706
|
type: "element"
|
|
39604
39707
|
};
|
|
39605
|
-
const translated = translator$
|
|
39708
|
+
const translated = translator$1L.encode({
|
|
39606
39709
|
...params2,
|
|
39607
39710
|
nodes: [nodeForTranslator],
|
|
39608
39711
|
extraParams: { ...params2.extraParams || {}, node: nodeForTranslator }
|
|
@@ -40108,7 +40211,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
40108
40211
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
40109
40212
|
return { nodes: [], consumed: 0 };
|
|
40110
40213
|
}
|
|
40111
|
-
const node2 = translator$
|
|
40214
|
+
const node2 = translator$2n.encode(params2);
|
|
40112
40215
|
return { nodes: [node2], consumed: 1 };
|
|
40113
40216
|
};
|
|
40114
40217
|
const tabNodeEntityHandler = {
|
|
@@ -41187,7 +41290,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
41187
41290
|
if (vmlAttributes || horizontalRule) {
|
|
41188
41291
|
return translateVRectContentBlock(params2);
|
|
41189
41292
|
}
|
|
41190
|
-
const alternateContent = translator$
|
|
41293
|
+
const alternateContent = translator$1L.decode(params2);
|
|
41191
41294
|
return wrapTextInRun(alternateContent);
|
|
41192
41295
|
}
|
|
41193
41296
|
function translateVRectContentBlock(params2) {
|
|
@@ -41334,16 +41437,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
41334
41437
|
paragraph: translator$11,
|
|
41335
41438
|
run: translator$$,
|
|
41336
41439
|
text: translator$1,
|
|
41337
|
-
lineBreak: translator$
|
|
41440
|
+
lineBreak: translator$2p,
|
|
41338
41441
|
table: translator$9,
|
|
41339
41442
|
tableRow: translator$v,
|
|
41340
41443
|
tableCell: translator$G,
|
|
41341
41444
|
bookmarkStart: translator$8,
|
|
41342
41445
|
bookmarkEnd: translator$7,
|
|
41343
41446
|
fieldAnnotation: translator$r,
|
|
41344
|
-
tab: translator$
|
|
41447
|
+
tab: translator$2n,
|
|
41345
41448
|
image: translator$s,
|
|
41346
|
-
hardBreak: translator$
|
|
41449
|
+
hardBreak: translator$2p,
|
|
41347
41450
|
commentRangeStart: commentRangeStartTranslator,
|
|
41348
41451
|
commentRangeEnd: commentRangeEndTranslator,
|
|
41349
41452
|
commentReference: () => null,
|
|
@@ -41507,7 +41610,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
41507
41610
|
markElement.type = "element";
|
|
41508
41611
|
break;
|
|
41509
41612
|
case "underline": {
|
|
41510
|
-
const translated = translator$
|
|
41613
|
+
const translated = translator$2i.decode({
|
|
41511
41614
|
node: {
|
|
41512
41615
|
attrs: {
|
|
41513
41616
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -41571,7 +41674,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
41571
41674
|
break;
|
|
41572
41675
|
case "highlight": {
|
|
41573
41676
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
41574
|
-
const translated = translator$
|
|
41677
|
+
const translated = translator$2o.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
41575
41678
|
return translated || {};
|
|
41576
41679
|
}
|
|
41577
41680
|
case "strike":
|
|
@@ -42083,7 +42186,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42083
42186
|
static getStoredSuperdocVersion(docx) {
|
|
42084
42187
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42085
42188
|
}
|
|
42086
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42189
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.55") {
|
|
42087
42190
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42088
42191
|
}
|
|
42089
42192
|
/**
|
|
@@ -67122,7 +67225,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67122
67225
|
const shouldSkipNodeView = (editor) => {
|
|
67123
67226
|
return isHeadless(editor);
|
|
67124
67227
|
};
|
|
67125
|
-
const summaryVersion = "1.0.0-beta.
|
|
67228
|
+
const summaryVersion = "1.0.0-beta.55";
|
|
67126
67229
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67127
67230
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67128
67231
|
function mapAttributes(attrs) {
|
|
@@ -67911,7 +68014,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67911
68014
|
{ default: remarkStringify2 },
|
|
67912
68015
|
{ default: remarkGfm2 }
|
|
67913
68016
|
] = await Promise.all([
|
|
67914
|
-
Promise.resolve().then(() =>
|
|
68017
|
+
Promise.resolve().then(() => indexBqjMjne1),
|
|
67915
68018
|
Promise.resolve().then(() => indexDRCvimau),
|
|
67916
68019
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
67917
68020
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68116,7 +68219,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68116
68219
|
* Process collaboration migrations
|
|
68117
68220
|
*/
|
|
68118
68221
|
processCollaborationMigrations() {
|
|
68119
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68222
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.55");
|
|
68120
68223
|
if (!this.options.ydoc) return;
|
|
68121
68224
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68122
68225
|
let docVersion = metaMap.get("version");
|
|
@@ -98194,7 +98297,7 @@ ${l}
|
|
|
98194
98297
|
return tr.docChanged ? tr : null;
|
|
98195
98298
|
}
|
|
98196
98299
|
});
|
|
98197
|
-
const mergeRanges$
|
|
98300
|
+
const mergeRanges$2 = (ranges, docSize) => {
|
|
98198
98301
|
if (!ranges.length) return [];
|
|
98199
98302
|
const sorted = ranges.map(({ from: from2, to }) => ({
|
|
98200
98303
|
from: Math.max(0, from2),
|
|
@@ -98223,7 +98326,7 @@ ${l}
|
|
|
98223
98326
|
});
|
|
98224
98327
|
});
|
|
98225
98328
|
});
|
|
98226
|
-
return mergeRanges$
|
|
98329
|
+
return mergeRanges$2(ranges, docSize);
|
|
98227
98330
|
};
|
|
98228
98331
|
const mapRangesThroughTransactions = (ranges, transactions, docSize) => {
|
|
98229
98332
|
let mapped = ranges;
|
|
@@ -98235,7 +98338,7 @@ ${l}
|
|
|
98235
98338
|
return { from: mappedFrom, to: mappedTo };
|
|
98236
98339
|
}).filter(Boolean);
|
|
98237
98340
|
});
|
|
98238
|
-
return mergeRanges$
|
|
98341
|
+
return mergeRanges$2(mapped, docSize);
|
|
98239
98342
|
};
|
|
98240
98343
|
const buildWrapTransaction = (state2, ranges, runType) => {
|
|
98241
98344
|
if (!ranges.length) return null;
|
|
@@ -98294,7 +98397,7 @@ ${l}
|
|
|
98294
98397
|
if (!runType) return null;
|
|
98295
98398
|
pendingRanges = mapRangesThroughTransactions(pendingRanges, transactions, docSize);
|
|
98296
98399
|
const changedRanges = collectChangedRanges(transactions, docSize);
|
|
98297
|
-
pendingRanges = mergeRanges$
|
|
98400
|
+
pendingRanges = mergeRanges$2([...pendingRanges, ...changedRanges], docSize);
|
|
98298
98401
|
if (view?.composing) {
|
|
98299
98402
|
return null;
|
|
98300
98403
|
}
|
|
@@ -98304,6 +98407,204 @@ ${l}
|
|
|
98304
98407
|
}
|
|
98305
98408
|
});
|
|
98306
98409
|
};
|
|
98410
|
+
const splitRunsAfterMarkPlugin = new Plugin({
|
|
98411
|
+
appendTransaction(transactions, _old, newState) {
|
|
98412
|
+
const markRanges = [];
|
|
98413
|
+
let mappingToFinal = new Mapping();
|
|
98414
|
+
for (let ti = transactions.length - 1; ti >= 0; ti--) {
|
|
98415
|
+
const tr2 = transactions[ti];
|
|
98416
|
+
tr2.steps.forEach((step) => {
|
|
98417
|
+
if (!(step instanceof AddMarkStep || step instanceof RemoveMarkStep)) return;
|
|
98418
|
+
const fromAfterTr = tr2.mapping.map(step.from, 1);
|
|
98419
|
+
const toAfterTr = tr2.mapping.map(step.to, -1);
|
|
98420
|
+
markRanges.push({
|
|
98421
|
+
from: mappingToFinal.map(fromAfterTr, 1),
|
|
98422
|
+
to: mappingToFinal.map(toAfterTr, -1)
|
|
98423
|
+
});
|
|
98424
|
+
});
|
|
98425
|
+
const composed = new Mapping();
|
|
98426
|
+
composed.appendMapping(tr2.mapping);
|
|
98427
|
+
composed.appendMapping(mappingToFinal);
|
|
98428
|
+
mappingToFinal = composed;
|
|
98429
|
+
}
|
|
98430
|
+
if (!markRanges.length) return null;
|
|
98431
|
+
const runType = newState.schema.nodes["run"];
|
|
98432
|
+
if (!runType) return null;
|
|
98433
|
+
const runPositions = /* @__PURE__ */ new Set();
|
|
98434
|
+
markRanges.forEach(({ from: from2, to }) => {
|
|
98435
|
+
newState.doc.nodesBetween(from2, to, (node2, pos) => {
|
|
98436
|
+
if (node2.type === runType) runPositions.add(pos);
|
|
98437
|
+
});
|
|
98438
|
+
});
|
|
98439
|
+
if (!runPositions.size) return null;
|
|
98440
|
+
const tr = newState.tr;
|
|
98441
|
+
const originalSelection = newState.selection;
|
|
98442
|
+
const isTextSelection2 = originalSelection instanceof TextSelection$1;
|
|
98443
|
+
let preservedAnchor = isTextSelection2 ? originalSelection.anchor : null;
|
|
98444
|
+
let preservedHead = isTextSelection2 ? originalSelection.head : null;
|
|
98445
|
+
const anchorAssoc = preservedAnchor != null && preservedHead != null && preservedAnchor <= preservedHead ? -1 : 1;
|
|
98446
|
+
const headAssoc = preservedAnchor != null && preservedHead != null && preservedHead >= preservedAnchor ? 1 : -1;
|
|
98447
|
+
const mapOffsetThroughReplacement = (startPos, replacement, offset2) => {
|
|
98448
|
+
let currentPos = startPos;
|
|
98449
|
+
let remaining = offset2;
|
|
98450
|
+
let mapped = null;
|
|
98451
|
+
replacement.forEach((node2) => {
|
|
98452
|
+
if (mapped != null) return;
|
|
98453
|
+
const contentSize = node2.content.size;
|
|
98454
|
+
if (remaining <= contentSize) {
|
|
98455
|
+
mapped = currentPos + 1 + remaining;
|
|
98456
|
+
return;
|
|
98457
|
+
}
|
|
98458
|
+
remaining -= contentSize;
|
|
98459
|
+
currentPos += node2.nodeSize;
|
|
98460
|
+
});
|
|
98461
|
+
return mapped ?? currentPos;
|
|
98462
|
+
};
|
|
98463
|
+
Array.from(runPositions).sort((a2, b2) => b2 - a2).forEach((pos) => {
|
|
98464
|
+
const mappedPos = tr.mapping.map(pos);
|
|
98465
|
+
const runNode = tr.doc.nodeAt(mappedPos);
|
|
98466
|
+
if (!runNode) return;
|
|
98467
|
+
const groups = [];
|
|
98468
|
+
let current = [];
|
|
98469
|
+
let currentMarks = null;
|
|
98470
|
+
runNode.forEach((child) => {
|
|
98471
|
+
if (child.isText) {
|
|
98472
|
+
if (currentMarks && Mark$1.sameSet(currentMarks, child.marks)) {
|
|
98473
|
+
current.push(child);
|
|
98474
|
+
} else {
|
|
98475
|
+
if (current.length) groups.push(Fragment$1.from(current));
|
|
98476
|
+
current = [child];
|
|
98477
|
+
currentMarks = child.marks;
|
|
98478
|
+
}
|
|
98479
|
+
} else {
|
|
98480
|
+
if (current.length) groups.push(Fragment$1.from(current));
|
|
98481
|
+
groups.push(Fragment$1.from(child));
|
|
98482
|
+
current = [];
|
|
98483
|
+
currentMarks = null;
|
|
98484
|
+
}
|
|
98485
|
+
});
|
|
98486
|
+
if (current.length) groups.push(Fragment$1.from(current));
|
|
98487
|
+
if (groups.length <= 1) return;
|
|
98488
|
+
const replacement = Fragment$1.from(
|
|
98489
|
+
groups.map((content2) => runType.create(runNode.attrs, content2, runNode.marks))
|
|
98490
|
+
);
|
|
98491
|
+
tr.replaceWith(mappedPos, mappedPos + runNode.nodeSize, replacement);
|
|
98492
|
+
const stepMap = tr.mapping.maps[tr.mapping.maps.length - 1];
|
|
98493
|
+
const mapSelectionPos = (pos2, assoc) => {
|
|
98494
|
+
if (pos2 == null) return null;
|
|
98495
|
+
if (pos2 < mappedPos || pos2 > mappedPos + runNode.nodeSize) {
|
|
98496
|
+
return stepMap.map(pos2, assoc);
|
|
98497
|
+
}
|
|
98498
|
+
const offsetInRun = pos2 - (mappedPos + 1);
|
|
98499
|
+
return mapOffsetThroughReplacement(mappedPos, replacement, offsetInRun);
|
|
98500
|
+
};
|
|
98501
|
+
preservedAnchor = mapSelectionPos(preservedAnchor, anchorAssoc);
|
|
98502
|
+
preservedHead = mapSelectionPos(preservedHead, headAssoc);
|
|
98503
|
+
});
|
|
98504
|
+
if (tr.docChanged && originalSelection) {
|
|
98505
|
+
if (originalSelection instanceof TextSelection$1 && preservedAnchor != null && preservedHead != null) {
|
|
98506
|
+
tr.setSelection(TextSelection$1.create(tr.doc, preservedAnchor, preservedHead));
|
|
98507
|
+
} else {
|
|
98508
|
+
tr.setSelection(originalSelection.map(tr.doc, tr.mapping));
|
|
98509
|
+
}
|
|
98510
|
+
}
|
|
98511
|
+
return tr.docChanged ? tr : null;
|
|
98512
|
+
}
|
|
98513
|
+
});
|
|
98514
|
+
const calculateInlineRunPropertiesPlugin = (editor) => new Plugin({
|
|
98515
|
+
appendTransaction(transactions, _oldState, newState) {
|
|
98516
|
+
const tr = newState.tr;
|
|
98517
|
+
if (!transactions.some((t) => t.docChanged)) return null;
|
|
98518
|
+
if (!transactions.some(
|
|
98519
|
+
(tr2) => tr2.steps.some((step) => step instanceof AddMarkStep || step instanceof RemoveMarkStep)
|
|
98520
|
+
)) {
|
|
98521
|
+
return null;
|
|
98522
|
+
}
|
|
98523
|
+
const runType = newState.schema.nodes.run;
|
|
98524
|
+
if (!runType) return null;
|
|
98525
|
+
const changedRanges = [];
|
|
98526
|
+
transactions.forEach((tr2) => {
|
|
98527
|
+
tr2.steps.forEach((step) => {
|
|
98528
|
+
const from2 = tr2.mapping.map(step.from, 1);
|
|
98529
|
+
const to = tr2.mapping.map(step.to, -1);
|
|
98530
|
+
changedRanges.push({ from: from2, to });
|
|
98531
|
+
});
|
|
98532
|
+
});
|
|
98533
|
+
const runPositions = /* @__PURE__ */ new Set();
|
|
98534
|
+
mergeRanges$1(changedRanges, newState.doc.content.size).forEach(({ from: from2, to }) => {
|
|
98535
|
+
newState.doc.nodesBetween(from2, to, (node2, pos) => {
|
|
98536
|
+
if (node2.type === runType) runPositions.add(pos);
|
|
98537
|
+
});
|
|
98538
|
+
});
|
|
98539
|
+
if (!runPositions.size) return null;
|
|
98540
|
+
runPositions.forEach((pos) => {
|
|
98541
|
+
const runNode = tr.doc.nodeAt(pos);
|
|
98542
|
+
if (!runNode) return;
|
|
98543
|
+
const $pos = tr.doc.resolve(pos);
|
|
98544
|
+
let paragraphNode = null;
|
|
98545
|
+
for (let depth = $pos.depth; depth >= 0; depth--) {
|
|
98546
|
+
const node2 = $pos.node(depth);
|
|
98547
|
+
if (node2.type.name === "paragraph") {
|
|
98548
|
+
paragraphNode = node2;
|
|
98549
|
+
break;
|
|
98550
|
+
}
|
|
98551
|
+
}
|
|
98552
|
+
if (!paragraphNode) return;
|
|
98553
|
+
const marks = getMarksFromRun(runNode);
|
|
98554
|
+
const runPropertiesFromMarks = decodeRPrFromMarks(marks);
|
|
98555
|
+
const paragraphProperties = getResolvedParagraphProperties(paragraphNode) || calculateResolvedParagraphProperties(editor, paragraphNode, $pos);
|
|
98556
|
+
const runPropertiesFromStyles = resolveRunProperties(
|
|
98557
|
+
{ docx: editor.converter?.convertedXml ?? {}, numbering: editor.converter?.numbering ?? {} },
|
|
98558
|
+
{},
|
|
98559
|
+
paragraphProperties,
|
|
98560
|
+
false,
|
|
98561
|
+
Boolean(paragraphNode.attrs.paragraphProperties?.numberingProperties)
|
|
98562
|
+
);
|
|
98563
|
+
const inlineRunProperties = getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles);
|
|
98564
|
+
const runProperties = Object.keys(inlineRunProperties).length ? inlineRunProperties : null;
|
|
98565
|
+
if (JSON.stringify(runProperties) === JSON.stringify(runNode.attrs.runProperties)) return;
|
|
98566
|
+
tr.setNodeMarkup(pos, runNode.type, { ...runNode.attrs, runProperties }, runNode.marks);
|
|
98567
|
+
});
|
|
98568
|
+
return tr.docChanged ? tr : null;
|
|
98569
|
+
}
|
|
98570
|
+
});
|
|
98571
|
+
function getMarksFromRun(runNode) {
|
|
98572
|
+
let marks = [];
|
|
98573
|
+
runNode.forEach((child) => {
|
|
98574
|
+
if (!marks.length && child.isText) {
|
|
98575
|
+
marks = child.marks;
|
|
98576
|
+
}
|
|
98577
|
+
});
|
|
98578
|
+
return marks;
|
|
98579
|
+
}
|
|
98580
|
+
function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles) {
|
|
98581
|
+
const inlineRunProperties = {};
|
|
98582
|
+
for (const key2 in runPropertiesFromMarks) {
|
|
98583
|
+
const valueFromMarks = runPropertiesFromMarks[key2];
|
|
98584
|
+
const valueFromStyles = runPropertiesFromStyles[key2];
|
|
98585
|
+
if (JSON.stringify(valueFromMarks) !== JSON.stringify(valueFromStyles)) {
|
|
98586
|
+
inlineRunProperties[key2] = valueFromMarks;
|
|
98587
|
+
}
|
|
98588
|
+
}
|
|
98589
|
+
return inlineRunProperties;
|
|
98590
|
+
}
|
|
98591
|
+
function mergeRanges$1(ranges, docSize) {
|
|
98592
|
+
if (!ranges.length) return [];
|
|
98593
|
+
const sorted = ranges.map(({ from: from2, to }) => ({
|
|
98594
|
+
from: Math.max(0, from2),
|
|
98595
|
+
to: Math.min(docSize, to)
|
|
98596
|
+
})).filter(({ from: from2, to }) => from2 < to).sort((a2, b2) => a2.from - b2.from);
|
|
98597
|
+
const merged = [];
|
|
98598
|
+
for (const range2 of sorted) {
|
|
98599
|
+
const last = merged[merged.length - 1];
|
|
98600
|
+
if (last && range2.from <= last.to) {
|
|
98601
|
+
last.to = Math.max(last.to, range2.to);
|
|
98602
|
+
} else {
|
|
98603
|
+
merged.push({ ...range2 });
|
|
98604
|
+
}
|
|
98605
|
+
}
|
|
98606
|
+
return merged;
|
|
98607
|
+
}
|
|
98307
98608
|
const Run = OxmlNode.create({
|
|
98308
98609
|
name: "run",
|
|
98309
98610
|
oXmlName: "w:r",
|
|
@@ -98358,7 +98659,12 @@ ${l}
|
|
|
98358
98659
|
return ["span", base2, 0];
|
|
98359
98660
|
},
|
|
98360
98661
|
addPmPlugins() {
|
|
98361
|
-
return [
|
|
98662
|
+
return [
|
|
98663
|
+
wrapTextInRunsPlugin(),
|
|
98664
|
+
splitRunsAfterMarkPlugin,
|
|
98665
|
+
calculateInlineRunPropertiesPlugin(this.editor),
|
|
98666
|
+
cleanupEmptyRunsPlugin
|
|
98667
|
+
];
|
|
98362
98668
|
}
|
|
98363
98669
|
});
|
|
98364
98670
|
const restartNumbering = ({ editor, tr, state: state2, dispatch }) => {
|
|
@@ -103185,7 +103491,9 @@ ${l}
|
|
|
103185
103491
|
const style2 = sides.map((side) => {
|
|
103186
103492
|
const border = borders?.[side];
|
|
103187
103493
|
if (border && border.val === "none") return `border-${side}: ${border.val};`;
|
|
103188
|
-
|
|
103494
|
+
let color2 = border?.color || "black";
|
|
103495
|
+
if (color2 === "auto") color2 = "black";
|
|
103496
|
+
if (border) return `border-${side}: ${Math.ceil(border.size)}px solid ${color2};`;
|
|
103189
103497
|
return "";
|
|
103190
103498
|
}).join(" ");
|
|
103191
103499
|
return { style: style2 };
|
|
@@ -148663,7 +148971,7 @@ ${style2}
|
|
|
148663
148971
|
this.config.colors = shuffleArray(this.config.colors);
|
|
148664
148972
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
148665
148973
|
this.colorIndex = 0;
|
|
148666
|
-
this.version = "1.0.0-beta.
|
|
148974
|
+
this.version = "1.0.0-beta.55";
|
|
148667
148975
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
148668
148976
|
this.superdocId = config2.superdocId || v4();
|
|
148669
148977
|
this.colors = this.config.colors;
|
|
@@ -151129,7 +151437,7 @@ ${style2}
|
|
|
151129
151437
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
151130
151438
|
);
|
|
151131
151439
|
}
|
|
151132
|
-
const
|
|
151440
|
+
const indexBqjMjne1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151133
151441
|
__proto__: null,
|
|
151134
151442
|
unified
|
|
151135
151443
|
}, Symbol.toStringTag, { value: "Module" }));
|