@harbour-enterprises/superdoc 0.21.0-next.4 → 0.21.0-next.6
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-OZDJ7gwT.cjs → PdfViewer-BrJSIJjF.cjs} +1 -1
- package/dist/chunks/{PdfViewer-D3zo7tPo.es.js → PdfViewer-CJAEtjUD.es.js} +1 -1
- package/dist/chunks/{index-MzW5BVNd.es.js → index-BDfKQQiO.es.js} +4 -3
- package/dist/chunks/{index-CfYf4T_z.cjs → index-NiOytIlp.cjs} +4 -3
- package/dist/chunks/{super-editor.es-U-GVCd_F.cjs → super-editor.es-DmkkMNKU.cjs} +2015 -787
- package/dist/chunks/{super-editor.es-Bntob7Wd.es.js → super-editor.es-iVTtEcot.es.js} +2015 -787
- package/dist/core/types/index.d.ts +8 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +43 -38
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-3xnF_NHq.js → converter-CYC0HBJe.js} +733 -642
- package/dist/super-editor/chunks/{docx-zipper-CZdELYi-.js → docx-zipper-DlwteneT.js} +1 -1
- package/dist/super-editor/chunks/{editor-BqYH4kDD.js → editor-BzT9rpXb.js} +59 -13
- package/dist/super-editor/chunks/{toolbar-TkaE2kKM.js → toolbar-BnTHDmlP.js} +6 -7
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/components/slash-menu/menuItems.d.ts +5 -1
- package/dist/super-editor/src/components/slash-menu/tests/testHelpers.d.ts +466 -0
- package/dist/super-editor/src/components/slash-menu/utils.d.ts +9 -2
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/alternate-content-translator.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/mc/altermateContent/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/noderesizer/helpers.d.ts +2 -0
- package/dist/super-editor/src/tests/helpers/helpers.d.ts +1 -0
- package/dist/super-editor/src/utils/shadow-root.d.ts +12 -0
- package/dist/super-editor/style.css +16 -11
- package/dist/super-editor/super-editor.es.js +1226 -134
- 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 +2017 -788
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -32058,37 +32058,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32058
32058
|
};
|
|
32059
32059
|
__publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
|
|
32060
32060
|
let NodeTranslator = _NodeTranslator;
|
|
32061
|
-
const encode$
|
|
32061
|
+
const encode$18 = (attributes) => {
|
|
32062
32062
|
return attributes["w:type"];
|
|
32063
32063
|
};
|
|
32064
|
-
const decode
|
|
32064
|
+
const decode$$ = (attrs) => {
|
|
32065
32065
|
const { lineBreakType } = attrs;
|
|
32066
32066
|
return lineBreakType;
|
|
32067
32067
|
};
|
|
32068
32068
|
const attrConfig$F = Object.freeze({
|
|
32069
32069
|
xmlName: "w:type",
|
|
32070
32070
|
sdName: "lineBreakType",
|
|
32071
|
-
encode: encode$
|
|
32072
|
-
decode: decode
|
|
32071
|
+
encode: encode$18,
|
|
32072
|
+
decode: decode$$
|
|
32073
32073
|
});
|
|
32074
|
-
const encode$
|
|
32074
|
+
const encode$17 = (attributes) => {
|
|
32075
32075
|
const xmlAttrValue = attributes["w:clear"];
|
|
32076
32076
|
return xmlAttrValue;
|
|
32077
32077
|
};
|
|
32078
|
-
const decode$
|
|
32078
|
+
const decode$_ = (attrs) => {
|
|
32079
32079
|
const { clear } = attrs;
|
|
32080
32080
|
return clear;
|
|
32081
32081
|
};
|
|
32082
32082
|
const attrConfig$E = Object.freeze({
|
|
32083
32083
|
xmlName: "w:clear",
|
|
32084
32084
|
sdName: "clear",
|
|
32085
|
-
encode: encode$
|
|
32086
|
-
decode: decode$
|
|
32085
|
+
encode: encode$17,
|
|
32086
|
+
decode: decode$_
|
|
32087
32087
|
});
|
|
32088
|
-
const validXmlAttributes$
|
|
32089
|
-
const XML_NODE_NAME$
|
|
32090
|
-
const SD_NODE_NAME$
|
|
32091
|
-
const encode$
|
|
32088
|
+
const validXmlAttributes$m = [attrConfig$F, attrConfig$E];
|
|
32089
|
+
const XML_NODE_NAME$u = "w:br";
|
|
32090
|
+
const SD_NODE_NAME$d = "lineBreak";
|
|
32091
|
+
const encode$16 = (_2, encodedAttrs) => {
|
|
32092
32092
|
const isPageBreak = encodedAttrs?.lineBreakType === "page";
|
|
32093
32093
|
const translated = {
|
|
32094
32094
|
type: isPageBreak ? "hardBreak" : "lineBreak"
|
|
@@ -32098,7 +32098,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32098
32098
|
}
|
|
32099
32099
|
return translated;
|
|
32100
32100
|
};
|
|
32101
|
-
const decode$
|
|
32101
|
+
const decode$Z = (params2, decodedAttrs) => {
|
|
32102
32102
|
const { node } = params2;
|
|
32103
32103
|
if (!node) return;
|
|
32104
32104
|
const wBreak = { name: "w:br" };
|
|
@@ -32115,39 +32115,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32115
32115
|
};
|
|
32116
32116
|
return translated;
|
|
32117
32117
|
};
|
|
32118
|
-
const config$
|
|
32119
|
-
xmlName: XML_NODE_NAME$
|
|
32120
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32118
|
+
const config$s = {
|
|
32119
|
+
xmlName: XML_NODE_NAME$u,
|
|
32120
|
+
sdNodeOrKeyName: SD_NODE_NAME$d,
|
|
32121
32121
|
type: NodeTranslator.translatorTypes.NODE,
|
|
32122
|
-
encode: encode$
|
|
32123
|
-
decode: decode$
|
|
32124
|
-
attributes: validXmlAttributes$
|
|
32122
|
+
encode: encode$16,
|
|
32123
|
+
decode: decode$Z,
|
|
32124
|
+
attributes: validXmlAttributes$m
|
|
32125
32125
|
};
|
|
32126
|
-
const translator$
|
|
32127
|
-
const encode$
|
|
32128
|
-
const decode$
|
|
32126
|
+
const translator$16 = NodeTranslator.from(config$s);
|
|
32127
|
+
const encode$15 = (attributes) => attributes?.["w:val"];
|
|
32128
|
+
const decode$Y = (attrs) => attrs?.highlight;
|
|
32129
32129
|
const attrConfig$D = Object.freeze({
|
|
32130
32130
|
xmlName: "w:val",
|
|
32131
32131
|
sdName: "highlight",
|
|
32132
|
-
encode: encode$
|
|
32133
|
-
decode: decode$
|
|
32132
|
+
encode: encode$15,
|
|
32133
|
+
decode: decode$Y
|
|
32134
32134
|
});
|
|
32135
|
-
const validXmlAttributes$
|
|
32136
|
-
const XML_NODE_NAME$
|
|
32135
|
+
const validXmlAttributes$l = [attrConfig$D];
|
|
32136
|
+
const XML_NODE_NAME$t = "w:highlight";
|
|
32137
32137
|
const SD_ATTR_KEY$f = "highlight";
|
|
32138
32138
|
const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
|
|
32139
|
-
const encode$
|
|
32139
|
+
const encode$14 = (params2, encodedAttrs = {}) => {
|
|
32140
32140
|
const { nodes } = params2;
|
|
32141
32141
|
const node = nodes?.[0];
|
|
32142
32142
|
const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
|
|
32143
32143
|
return {
|
|
32144
32144
|
type: "attr",
|
|
32145
|
-
xmlName: XML_NODE_NAME$
|
|
32145
|
+
xmlName: XML_NODE_NAME$t,
|
|
32146
32146
|
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
32147
32147
|
attributes: { "w:val": value ?? null }
|
|
32148
32148
|
};
|
|
32149
32149
|
};
|
|
32150
|
-
const decode$
|
|
32150
|
+
const decode$X = (params2) => {
|
|
32151
32151
|
const attrs = params2?.node?.attrs || {};
|
|
32152
32152
|
const highlightValue = attrs.highlight ?? attrs.color ?? null;
|
|
32153
32153
|
if (!highlightValue) return void 0;
|
|
@@ -32155,14 +32155,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32155
32155
|
if (!normalizedValue) return void 0;
|
|
32156
32156
|
if (DISABLED_TOKENS.has(normalizedValue)) {
|
|
32157
32157
|
return {
|
|
32158
|
-
name: XML_NODE_NAME$
|
|
32158
|
+
name: XML_NODE_NAME$t,
|
|
32159
32159
|
attributes: { "w:val": "none" }
|
|
32160
32160
|
};
|
|
32161
32161
|
}
|
|
32162
32162
|
const keyword = getDocxHighlightKeywordFromHex(highlightValue);
|
|
32163
32163
|
if (keyword) {
|
|
32164
32164
|
return {
|
|
32165
|
-
name: XML_NODE_NAME$
|
|
32165
|
+
name: XML_NODE_NAME$t,
|
|
32166
32166
|
attributes: { "w:val": keyword }
|
|
32167
32167
|
};
|
|
32168
32168
|
}
|
|
@@ -32177,63 +32177,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32177
32177
|
}
|
|
32178
32178
|
};
|
|
32179
32179
|
};
|
|
32180
|
-
const config$
|
|
32181
|
-
xmlName: XML_NODE_NAME$
|
|
32180
|
+
const config$r = {
|
|
32181
|
+
xmlName: XML_NODE_NAME$t,
|
|
32182
32182
|
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
32183
32183
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
32184
|
-
encode: encode$
|
|
32185
|
-
decode: decode$
|
|
32186
|
-
attributes: validXmlAttributes$
|
|
32184
|
+
encode: encode$14,
|
|
32185
|
+
decode: decode$X,
|
|
32186
|
+
attributes: validXmlAttributes$l
|
|
32187
32187
|
};
|
|
32188
|
-
const translator$
|
|
32189
|
-
const encode$
|
|
32188
|
+
const translator$15 = NodeTranslator.from(config$r);
|
|
32189
|
+
const encode$13 = (attributes) => {
|
|
32190
32190
|
return attributes["w:val"];
|
|
32191
32191
|
};
|
|
32192
|
-
const decode$
|
|
32192
|
+
const decode$W = (attrs) => {
|
|
32193
32193
|
const { tabSize } = attrs || {};
|
|
32194
32194
|
return tabSize;
|
|
32195
32195
|
};
|
|
32196
32196
|
const attrConfig$C = Object.freeze({
|
|
32197
32197
|
xmlName: "w:val",
|
|
32198
32198
|
sdName: "tabSize",
|
|
32199
|
-
encode: encode$
|
|
32200
|
-
decode: decode$
|
|
32199
|
+
encode: encode$13,
|
|
32200
|
+
decode: decode$W
|
|
32201
32201
|
});
|
|
32202
|
-
const encode$
|
|
32202
|
+
const encode$12 = (attributes) => {
|
|
32203
32203
|
return attributes["w:leader"];
|
|
32204
32204
|
};
|
|
32205
|
-
const decode$
|
|
32205
|
+
const decode$V = (attrs) => {
|
|
32206
32206
|
const { leader } = attrs || {};
|
|
32207
32207
|
return leader;
|
|
32208
32208
|
};
|
|
32209
32209
|
const attrConfig$B = Object.freeze({
|
|
32210
32210
|
xmlName: "w:leader",
|
|
32211
32211
|
sdName: "leader",
|
|
32212
|
-
encode: encode$
|
|
32213
|
-
decode: decode$
|
|
32212
|
+
encode: encode$12,
|
|
32213
|
+
decode: decode$V
|
|
32214
32214
|
});
|
|
32215
|
-
const encode$
|
|
32215
|
+
const encode$11 = (attributes) => {
|
|
32216
32216
|
return attributes["w:pos"];
|
|
32217
32217
|
};
|
|
32218
|
-
const decode$
|
|
32218
|
+
const decode$U = (attrs) => {
|
|
32219
32219
|
const { pos } = attrs || {};
|
|
32220
32220
|
return pos;
|
|
32221
32221
|
};
|
|
32222
32222
|
const attrConfig$A = Object.freeze({
|
|
32223
32223
|
xmlName: "w:pos",
|
|
32224
32224
|
sdName: "pos",
|
|
32225
|
-
encode: encode$
|
|
32226
|
-
decode: decode$
|
|
32225
|
+
encode: encode$11,
|
|
32226
|
+
decode: decode$U
|
|
32227
32227
|
});
|
|
32228
|
-
const validXmlAttributes$
|
|
32229
|
-
const XML_NODE_NAME$
|
|
32230
|
-
const SD_NODE_NAME$
|
|
32231
|
-
const encode
|
|
32228
|
+
const validXmlAttributes$k = [attrConfig$C, attrConfig$A, attrConfig$B];
|
|
32229
|
+
const XML_NODE_NAME$s = "w:tab";
|
|
32230
|
+
const SD_NODE_NAME$c = "tab";
|
|
32231
|
+
const encode$10 = (_2, encodedAttrs = {}) => {
|
|
32232
32232
|
const translated = { type: "tab" };
|
|
32233
32233
|
if (encodedAttrs) translated.attrs = { ...encodedAttrs };
|
|
32234
32234
|
return translated;
|
|
32235
32235
|
};
|
|
32236
|
-
const decode$
|
|
32236
|
+
const decode$T = (params2, decodedAttrs = {}) => {
|
|
32237
32237
|
const { node } = params2 || {};
|
|
32238
32238
|
if (!node) return;
|
|
32239
32239
|
const wTab = { name: "w:tab" };
|
|
@@ -32249,15 +32249,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32249
32249
|
}
|
|
32250
32250
|
return translated;
|
|
32251
32251
|
};
|
|
32252
|
-
const config$
|
|
32253
|
-
xmlName: XML_NODE_NAME$
|
|
32254
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32252
|
+
const config$q = {
|
|
32253
|
+
xmlName: XML_NODE_NAME$s,
|
|
32254
|
+
sdNodeOrKeyName: SD_NODE_NAME$c,
|
|
32255
32255
|
type: NodeTranslator.translatorTypes.NODE,
|
|
32256
|
-
encode: encode
|
|
32257
|
-
decode: decode$
|
|
32258
|
-
attributes: validXmlAttributes$
|
|
32256
|
+
encode: encode$10,
|
|
32257
|
+
decode: decode$T,
|
|
32258
|
+
attributes: validXmlAttributes$k
|
|
32259
32259
|
};
|
|
32260
|
-
const translator$
|
|
32260
|
+
const translator$14 = NodeTranslator.from(config$q);
|
|
32261
32261
|
const mergeTextNodes = (nodes) => {
|
|
32262
32262
|
if (!nodes || !Array.isArray(nodes)) {
|
|
32263
32263
|
return nodes;
|
|
@@ -32872,91 +32872,91 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32872
32872
|
}
|
|
32873
32873
|
return schemaNode;
|
|
32874
32874
|
};
|
|
32875
|
-
const encode
|
|
32875
|
+
const encode$$ = (attributes) => {
|
|
32876
32876
|
return attributes["w:rsidDel"];
|
|
32877
32877
|
};
|
|
32878
|
-
const decode$
|
|
32878
|
+
const decode$S = (attrs) => {
|
|
32879
32879
|
return attrs.rsidDel;
|
|
32880
32880
|
};
|
|
32881
32881
|
const attrConfig$z = Object.freeze({
|
|
32882
32882
|
xmlName: "w:rsidDel",
|
|
32883
32883
|
sdName: "rsidDel",
|
|
32884
|
-
encode: encode
|
|
32885
|
-
decode: decode$
|
|
32884
|
+
encode: encode$$,
|
|
32885
|
+
decode: decode$S
|
|
32886
32886
|
});
|
|
32887
|
-
const encode$
|
|
32887
|
+
const encode$_ = (attributes) => {
|
|
32888
32888
|
return attributes["w:rsidP"];
|
|
32889
32889
|
};
|
|
32890
|
-
const decode$
|
|
32890
|
+
const decode$R = (attrs) => {
|
|
32891
32891
|
return attrs.rsidP;
|
|
32892
32892
|
};
|
|
32893
32893
|
const attrConfig$y = Object.freeze({
|
|
32894
32894
|
xmlName: "w:rsidP",
|
|
32895
32895
|
sdName: "rsidP",
|
|
32896
|
-
encode: encode$
|
|
32897
|
-
decode: decode$
|
|
32896
|
+
encode: encode$_,
|
|
32897
|
+
decode: decode$R
|
|
32898
32898
|
});
|
|
32899
|
-
const encode$
|
|
32899
|
+
const encode$Z = (attributes) => {
|
|
32900
32900
|
return attributes["w:rsidR"];
|
|
32901
32901
|
};
|
|
32902
|
-
const decode$
|
|
32902
|
+
const decode$Q = (attrs) => {
|
|
32903
32903
|
return attrs.rsidR;
|
|
32904
32904
|
};
|
|
32905
32905
|
const attrConfig$x = Object.freeze({
|
|
32906
32906
|
xmlName: "w:rsidR",
|
|
32907
32907
|
sdName: "rsidR",
|
|
32908
|
-
encode: encode$
|
|
32909
|
-
decode: decode$
|
|
32908
|
+
encode: encode$Z,
|
|
32909
|
+
decode: decode$Q
|
|
32910
32910
|
});
|
|
32911
|
-
const encode$
|
|
32911
|
+
const encode$Y = (attributes) => {
|
|
32912
32912
|
return attributes["w:rsidRPr"];
|
|
32913
32913
|
};
|
|
32914
|
-
const decode$
|
|
32914
|
+
const decode$P = (attrs) => {
|
|
32915
32915
|
return attrs.rsidRPr;
|
|
32916
32916
|
};
|
|
32917
32917
|
const attrConfig$w = Object.freeze({
|
|
32918
32918
|
xmlName: "w:rsidRPr",
|
|
32919
32919
|
sdName: "rsidRPr",
|
|
32920
|
-
encode: encode$
|
|
32921
|
-
decode: decode$
|
|
32920
|
+
encode: encode$Y,
|
|
32921
|
+
decode: decode$P
|
|
32922
32922
|
});
|
|
32923
|
-
const encode$
|
|
32923
|
+
const encode$X = (attributes) => {
|
|
32924
32924
|
return attributes["w:rsidRDefault"];
|
|
32925
32925
|
};
|
|
32926
|
-
const decode$
|
|
32926
|
+
const decode$O = (attrs) => {
|
|
32927
32927
|
return attrs.rsidRDefault;
|
|
32928
32928
|
};
|
|
32929
32929
|
const attrConfig$v = Object.freeze({
|
|
32930
32930
|
xmlName: "w:rsidRDefault",
|
|
32931
32931
|
sdName: "rsidRDefault",
|
|
32932
|
-
encode: encode$
|
|
32933
|
-
decode: decode$
|
|
32932
|
+
encode: encode$X,
|
|
32933
|
+
decode: decode$O
|
|
32934
32934
|
});
|
|
32935
|
-
const encode$
|
|
32935
|
+
const encode$W = (attributes) => {
|
|
32936
32936
|
return attributes["w14:paraId"];
|
|
32937
32937
|
};
|
|
32938
|
-
const decode$
|
|
32938
|
+
const decode$N = (attrs) => {
|
|
32939
32939
|
return attrs.paraId;
|
|
32940
32940
|
};
|
|
32941
32941
|
const attrConfig$u = Object.freeze({
|
|
32942
32942
|
xmlName: "w14:paraId",
|
|
32943
32943
|
sdName: "paraId",
|
|
32944
|
-
encode: encode$
|
|
32945
|
-
decode: decode$
|
|
32944
|
+
encode: encode$W,
|
|
32945
|
+
decode: decode$N
|
|
32946
32946
|
});
|
|
32947
|
-
const encode$
|
|
32947
|
+
const encode$V = (attributes) => {
|
|
32948
32948
|
return attributes["w14:textId"];
|
|
32949
32949
|
};
|
|
32950
|
-
const decode$
|
|
32950
|
+
const decode$M = (attrs) => {
|
|
32951
32951
|
return attrs.textId;
|
|
32952
32952
|
};
|
|
32953
32953
|
const attrConfig$t = Object.freeze({
|
|
32954
32954
|
xmlName: "w14:textId",
|
|
32955
32955
|
sdName: "textId",
|
|
32956
|
-
encode: encode$
|
|
32957
|
-
decode: decode$
|
|
32956
|
+
encode: encode$V,
|
|
32957
|
+
decode: decode$M
|
|
32958
32958
|
});
|
|
32959
|
-
const validXmlAttributes$
|
|
32959
|
+
const validXmlAttributes$j = [
|
|
32960
32960
|
attrConfig$u,
|
|
32961
32961
|
attrConfig$t,
|
|
32962
32962
|
attrConfig$x,
|
|
@@ -32965,9 +32965,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32965
32965
|
attrConfig$w,
|
|
32966
32966
|
attrConfig$z
|
|
32967
32967
|
];
|
|
32968
|
-
const XML_NODE_NAME$
|
|
32969
|
-
const SD_NODE_NAME$
|
|
32970
|
-
const encode$
|
|
32968
|
+
const XML_NODE_NAME$r = "w:p";
|
|
32969
|
+
const SD_NODE_NAME$b = "paragraph";
|
|
32970
|
+
const encode$U = (params2, encodedAttrs = {}) => {
|
|
32971
32971
|
const node = handleParagraphNode$1(params2);
|
|
32972
32972
|
if (!node) return void 0;
|
|
32973
32973
|
if (encodedAttrs && Object.keys(encodedAttrs).length) {
|
|
@@ -32975,7 +32975,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32975
32975
|
}
|
|
32976
32976
|
return node;
|
|
32977
32977
|
};
|
|
32978
|
-
const decode$
|
|
32978
|
+
const decode$L = (params2, decodedAttrs = {}) => {
|
|
32979
32979
|
const translated = translateParagraphNode(params2);
|
|
32980
32980
|
if (!translated) return void 0;
|
|
32981
32981
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
@@ -32983,16 +32983,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
32983
32983
|
}
|
|
32984
32984
|
return translated;
|
|
32985
32985
|
};
|
|
32986
|
-
const config$
|
|
32987
|
-
xmlName: XML_NODE_NAME$
|
|
32988
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
32986
|
+
const config$p = {
|
|
32987
|
+
xmlName: XML_NODE_NAME$r,
|
|
32988
|
+
sdNodeOrKeyName: SD_NODE_NAME$b,
|
|
32989
32989
|
type: NodeTranslator.translatorTypes.NODE,
|
|
32990
|
-
encode: encode$
|
|
32991
|
-
decode: decode$
|
|
32992
|
-
attributes: validXmlAttributes$
|
|
32990
|
+
encode: encode$U,
|
|
32991
|
+
decode: decode$L,
|
|
32992
|
+
attributes: validXmlAttributes$j
|
|
32993
32993
|
};
|
|
32994
|
-
const translator$
|
|
32995
|
-
const encode$
|
|
32994
|
+
const translator$13 = NodeTranslator.from(config$p);
|
|
32995
|
+
const encode$T = (attributes) => {
|
|
32996
32996
|
const raw = attributes?.["w:val"];
|
|
32997
32997
|
if (raw === void 0 || raw === null) return void 0;
|
|
32998
32998
|
if (typeof raw === "boolean") return raw;
|
|
@@ -33002,20 +33002,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33002
33002
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
33003
33003
|
return void 0;
|
|
33004
33004
|
};
|
|
33005
|
-
const decode$
|
|
33005
|
+
const decode$K = (runProps) => {
|
|
33006
33006
|
if (runProps?.bold === false) return "0";
|
|
33007
33007
|
return void 0;
|
|
33008
33008
|
};
|
|
33009
33009
|
const attrConfig$s = Object.freeze({
|
|
33010
33010
|
xmlName: "w:val",
|
|
33011
33011
|
sdName: "bold",
|
|
33012
|
-
encode: encode$
|
|
33013
|
-
decode: decode$
|
|
33012
|
+
encode: encode$T,
|
|
33013
|
+
decode: decode$K
|
|
33014
33014
|
});
|
|
33015
|
-
const validXmlAttributes$
|
|
33016
|
-
const XML_NODE_NAME$
|
|
33015
|
+
const validXmlAttributes$i = [attrConfig$s];
|
|
33016
|
+
const XML_NODE_NAME$q = "w:b";
|
|
33017
33017
|
const SD_ATTR_KEY$e = "bold";
|
|
33018
|
-
const encode$
|
|
33018
|
+
const encode$S = (params2, encodedAttrs = {}) => {
|
|
33019
33019
|
const { nodes } = params2;
|
|
33020
33020
|
const node = nodes[0];
|
|
33021
33021
|
if (!node) return void 0;
|
|
@@ -33027,85 +33027,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33027
33027
|
else attributes = node.attributes || {};
|
|
33028
33028
|
return {
|
|
33029
33029
|
type: "attr",
|
|
33030
|
-
xmlName: XML_NODE_NAME$
|
|
33030
|
+
xmlName: XML_NODE_NAME$q,
|
|
33031
33031
|
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
33032
33032
|
attributes
|
|
33033
33033
|
};
|
|
33034
33034
|
};
|
|
33035
|
-
const config$
|
|
33036
|
-
xmlName: XML_NODE_NAME$
|
|
33035
|
+
const config$o = {
|
|
33036
|
+
xmlName: XML_NODE_NAME$q,
|
|
33037
33037
|
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
33038
33038
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33039
|
-
encode: encode$
|
|
33040
|
-
attributes: validXmlAttributes$
|
|
33039
|
+
encode: encode$S,
|
|
33040
|
+
attributes: validXmlAttributes$i
|
|
33041
33041
|
};
|
|
33042
|
-
const translator$
|
|
33043
|
-
const XML_NODE_NAME$
|
|
33042
|
+
const translator$12 = NodeTranslator.from(config$o);
|
|
33043
|
+
const XML_NODE_NAME$p = "w:i";
|
|
33044
33044
|
const SD_ATTR_KEY$d = "italic";
|
|
33045
|
-
const encode$
|
|
33045
|
+
const encode$R = (params2) => {
|
|
33046
33046
|
const { nodes } = params2;
|
|
33047
33047
|
const node = nodes?.[0];
|
|
33048
33048
|
if (!node) return void 0;
|
|
33049
33049
|
return {
|
|
33050
33050
|
type: "attr",
|
|
33051
|
-
xmlName: XML_NODE_NAME$
|
|
33051
|
+
xmlName: XML_NODE_NAME$p,
|
|
33052
33052
|
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
33053
33053
|
attributes: {
|
|
33054
33054
|
"w:val": node.attributes?.["w:val"] ?? null
|
|
33055
33055
|
}
|
|
33056
33056
|
};
|
|
33057
33057
|
};
|
|
33058
|
-
const config$
|
|
33059
|
-
xmlName: XML_NODE_NAME$
|
|
33058
|
+
const config$n = {
|
|
33059
|
+
xmlName: XML_NODE_NAME$p,
|
|
33060
33060
|
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
33061
33061
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33062
|
-
encode: encode$
|
|
33062
|
+
encode: encode$R
|
|
33063
33063
|
};
|
|
33064
|
-
const translator$
|
|
33065
|
-
const encode$
|
|
33066
|
-
const decode$
|
|
33064
|
+
const translator$11 = NodeTranslator.from(config$n);
|
|
33065
|
+
const encode$Q = (attributes) => attributes?.["w:val"];
|
|
33066
|
+
const decode$J = (attrs) => attrs?.underline;
|
|
33067
33067
|
const attrConfig$r = Object.freeze({
|
|
33068
33068
|
xmlName: "w:val",
|
|
33069
33069
|
sdName: "underline",
|
|
33070
|
-
encode: encode$
|
|
33071
|
-
decode: decode$
|
|
33070
|
+
encode: encode$Q,
|
|
33071
|
+
decode: decode$J
|
|
33072
33072
|
});
|
|
33073
|
-
const encode$
|
|
33074
|
-
const decode$
|
|
33073
|
+
const encode$P = (attributes) => attributes?.["w:color"];
|
|
33074
|
+
const decode$I = (attrs) => attrs?.color;
|
|
33075
33075
|
const attrConfig$q = Object.freeze({
|
|
33076
33076
|
xmlName: "w:color",
|
|
33077
33077
|
sdName: "color",
|
|
33078
|
-
encode: encode$
|
|
33079
|
-
decode: decode$
|
|
33078
|
+
encode: encode$P,
|
|
33079
|
+
decode: decode$I
|
|
33080
33080
|
});
|
|
33081
|
-
const encode$
|
|
33082
|
-
const decode$
|
|
33081
|
+
const encode$O = (attributes) => attributes?.["w:themeColor"];
|
|
33082
|
+
const decode$H = (attrs) => attrs?.themeColor;
|
|
33083
33083
|
const attrConfig$p = Object.freeze({
|
|
33084
33084
|
xmlName: "w:themeColor",
|
|
33085
33085
|
sdName: "themeColor",
|
|
33086
|
-
encode: encode$
|
|
33087
|
-
decode: decode$
|
|
33086
|
+
encode: encode$O,
|
|
33087
|
+
decode: decode$H
|
|
33088
33088
|
});
|
|
33089
|
-
const encode$
|
|
33090
|
-
const decode$
|
|
33089
|
+
const encode$N = (attributes) => attributes?.["w:themeTint"];
|
|
33090
|
+
const decode$G = (attrs) => attrs?.themeTint;
|
|
33091
33091
|
const attrConfig$o = Object.freeze({
|
|
33092
33092
|
xmlName: "w:themeTint",
|
|
33093
33093
|
sdName: "themeTint",
|
|
33094
|
-
encode: encode$
|
|
33095
|
-
decode: decode$
|
|
33094
|
+
encode: encode$N,
|
|
33095
|
+
decode: decode$G
|
|
33096
33096
|
});
|
|
33097
|
-
const encode$
|
|
33098
|
-
const decode$
|
|
33097
|
+
const encode$M = (attributes) => attributes?.["w:themeShade"];
|
|
33098
|
+
const decode$F = (attrs) => attrs?.themeShade;
|
|
33099
33099
|
const attrConfig$n = Object.freeze({
|
|
33100
33100
|
xmlName: "w:themeShade",
|
|
33101
33101
|
sdName: "themeShade",
|
|
33102
|
-
encode: encode$
|
|
33103
|
-
decode: decode$
|
|
33102
|
+
encode: encode$M,
|
|
33103
|
+
decode: decode$F
|
|
33104
33104
|
});
|
|
33105
|
-
const validXmlAttributes$
|
|
33106
|
-
const XML_NODE_NAME$
|
|
33105
|
+
const validXmlAttributes$h = [attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o, attrConfig$n];
|
|
33106
|
+
const XML_NODE_NAME$o = "w:u";
|
|
33107
33107
|
const SD_ATTR_KEY$c = "underline";
|
|
33108
|
-
const encode$
|
|
33108
|
+
const encode$L = (params2, encodedAttrs = {}) => {
|
|
33109
33109
|
const { nodes } = params2;
|
|
33110
33110
|
const node = nodes?.[0];
|
|
33111
33111
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -33121,12 +33121,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33121
33121
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
33122
33122
|
return {
|
|
33123
33123
|
type: "attr",
|
|
33124
|
-
xmlName: XML_NODE_NAME$
|
|
33124
|
+
xmlName: XML_NODE_NAME$o,
|
|
33125
33125
|
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
33126
33126
|
attributes
|
|
33127
33127
|
};
|
|
33128
33128
|
};
|
|
33129
|
-
const decode$
|
|
33129
|
+
const decode$E = (params2) => {
|
|
33130
33130
|
const attrs = params2?.node?.attrs || {};
|
|
33131
33131
|
const underlineType = attrs.underlineType ?? attrs.underline ?? null;
|
|
33132
33132
|
const color = attrs.underlineColor ?? attrs.color ?? null;
|
|
@@ -33144,20 +33144,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33144
33144
|
if (themeTint) attributes["w:themeTint"] = themeTint;
|
|
33145
33145
|
if (themeShade) attributes["w:themeShade"] = themeShade;
|
|
33146
33146
|
return {
|
|
33147
|
-
name: XML_NODE_NAME$
|
|
33147
|
+
name: XML_NODE_NAME$o,
|
|
33148
33148
|
attributes
|
|
33149
33149
|
};
|
|
33150
33150
|
};
|
|
33151
|
-
const config$
|
|
33152
|
-
xmlName: XML_NODE_NAME$
|
|
33151
|
+
const config$m = {
|
|
33152
|
+
xmlName: XML_NODE_NAME$o,
|
|
33153
33153
|
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
33154
33154
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33155
|
-
encode: encode$
|
|
33156
|
-
decode: decode$
|
|
33157
|
-
attributes: validXmlAttributes$
|
|
33155
|
+
encode: encode$L,
|
|
33156
|
+
decode: decode$E,
|
|
33157
|
+
attributes: validXmlAttributes$h
|
|
33158
33158
|
};
|
|
33159
|
-
const translator
|
|
33160
|
-
const encode$
|
|
33159
|
+
const translator$10 = NodeTranslator.from(config$m);
|
|
33160
|
+
const encode$K = (attributes) => {
|
|
33161
33161
|
const raw = attributes?.["w:val"];
|
|
33162
33162
|
if (raw === void 0 || raw === null) return void 0;
|
|
33163
33163
|
if (typeof raw === "boolean") return raw;
|
|
@@ -33167,20 +33167,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33167
33167
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
33168
33168
|
return void 0;
|
|
33169
33169
|
};
|
|
33170
|
-
const decode$
|
|
33170
|
+
const decode$D = (attrs) => {
|
|
33171
33171
|
if (attrs?.strike === false) return "0";
|
|
33172
33172
|
return void 0;
|
|
33173
33173
|
};
|
|
33174
33174
|
const attrConfig$m = Object.freeze({
|
|
33175
33175
|
xmlName: "w:val",
|
|
33176
33176
|
sdName: "strike",
|
|
33177
|
-
encode: encode$
|
|
33178
|
-
decode: decode$
|
|
33177
|
+
encode: encode$K,
|
|
33178
|
+
decode: decode$D
|
|
33179
33179
|
});
|
|
33180
|
-
const validXmlAttributes$
|
|
33181
|
-
const XML_NODE_NAME$
|
|
33180
|
+
const validXmlAttributes$g = [attrConfig$m];
|
|
33181
|
+
const XML_NODE_NAME$n = "w:strike";
|
|
33182
33182
|
const SD_ATTR_KEY$b = "strike";
|
|
33183
|
-
const encode$
|
|
33183
|
+
const encode$J = (params2, encodedAttrs = {}) => {
|
|
33184
33184
|
const { nodes } = params2;
|
|
33185
33185
|
const node = nodes?.[0];
|
|
33186
33186
|
if (!node) return void 0;
|
|
@@ -33193,55 +33193,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33193
33193
|
else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
33194
33194
|
return {
|
|
33195
33195
|
type: "attr",
|
|
33196
|
-
xmlName: XML_NODE_NAME$
|
|
33196
|
+
xmlName: XML_NODE_NAME$n,
|
|
33197
33197
|
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
33198
33198
|
attributes
|
|
33199
33199
|
};
|
|
33200
33200
|
};
|
|
33201
|
-
const config$
|
|
33202
|
-
xmlName: XML_NODE_NAME$
|
|
33201
|
+
const config$l = {
|
|
33202
|
+
xmlName: XML_NODE_NAME$n,
|
|
33203
33203
|
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
33204
33204
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33205
|
-
encode: encode$
|
|
33206
|
-
attributes: validXmlAttributes$
|
|
33205
|
+
encode: encode$J,
|
|
33206
|
+
attributes: validXmlAttributes$g
|
|
33207
33207
|
};
|
|
33208
|
-
const translator
|
|
33209
|
-
const encode$
|
|
33210
|
-
const decode$
|
|
33208
|
+
const translator$$ = NodeTranslator.from(config$l);
|
|
33209
|
+
const encode$I = (attributes) => attributes?.["w:val"];
|
|
33210
|
+
const decode$C = (attrs) => attrs?.color;
|
|
33211
33211
|
const attrConfig$l = Object.freeze({
|
|
33212
33212
|
xmlName: "w:val",
|
|
33213
33213
|
sdName: "color",
|
|
33214
|
-
encode: encode$
|
|
33215
|
-
decode: decode$
|
|
33214
|
+
encode: encode$I,
|
|
33215
|
+
decode: decode$C
|
|
33216
33216
|
});
|
|
33217
|
-
const encode$
|
|
33218
|
-
const decode$
|
|
33217
|
+
const encode$H = (attributes) => attributes?.["w:themeColor"];
|
|
33218
|
+
const decode$B = (attrs) => attrs?.themeColor;
|
|
33219
33219
|
const attrConfig$k = Object.freeze({
|
|
33220
33220
|
xmlName: "w:themeColor",
|
|
33221
33221
|
sdName: "themeColor",
|
|
33222
|
-
encode: encode$
|
|
33223
|
-
decode: decode$
|
|
33222
|
+
encode: encode$H,
|
|
33223
|
+
decode: decode$B
|
|
33224
33224
|
});
|
|
33225
|
-
const encode$
|
|
33226
|
-
const decode$
|
|
33225
|
+
const encode$G = (attributes) => attributes?.["w:themeTint"];
|
|
33226
|
+
const decode$A = (attrs) => attrs?.themeTint;
|
|
33227
33227
|
const attrConfig$j = Object.freeze({
|
|
33228
33228
|
xmlName: "w:themeTint",
|
|
33229
33229
|
sdName: "themeTint",
|
|
33230
|
-
encode: encode$
|
|
33231
|
-
decode: decode$
|
|
33230
|
+
encode: encode$G,
|
|
33231
|
+
decode: decode$A
|
|
33232
33232
|
});
|
|
33233
|
-
const encode$
|
|
33234
|
-
const decode$
|
|
33233
|
+
const encode$F = (attributes) => attributes?.["w:themeShade"];
|
|
33234
|
+
const decode$z = (attrs) => attrs?.themeShade;
|
|
33235
33235
|
const attrConfig$i = Object.freeze({
|
|
33236
33236
|
xmlName: "w:themeShade",
|
|
33237
33237
|
sdName: "themeShade",
|
|
33238
|
-
encode: encode$
|
|
33239
|
-
decode: decode$
|
|
33238
|
+
encode: encode$F,
|
|
33239
|
+
decode: decode$z
|
|
33240
33240
|
});
|
|
33241
|
-
const validXmlAttributes$
|
|
33242
|
-
const XML_NODE_NAME$
|
|
33241
|
+
const validXmlAttributes$f = [attrConfig$l, attrConfig$k, attrConfig$j, attrConfig$i];
|
|
33242
|
+
const XML_NODE_NAME$m = "w:color";
|
|
33243
33243
|
const SD_ATTR_KEY$a = "color";
|
|
33244
|
-
const encode$
|
|
33244
|
+
const encode$E = (params2, encodedAttrs = {}) => {
|
|
33245
33245
|
const { nodes } = params2;
|
|
33246
33246
|
const node = nodes?.[0];
|
|
33247
33247
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -33256,63 +33256,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33256
33256
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
33257
33257
|
return {
|
|
33258
33258
|
type: "attr",
|
|
33259
|
-
xmlName: XML_NODE_NAME$
|
|
33259
|
+
xmlName: XML_NODE_NAME$m,
|
|
33260
33260
|
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
33261
33261
|
attributes
|
|
33262
33262
|
};
|
|
33263
33263
|
};
|
|
33264
|
-
const config$
|
|
33265
|
-
xmlName: XML_NODE_NAME$
|
|
33264
|
+
const config$k = {
|
|
33265
|
+
xmlName: XML_NODE_NAME$m,
|
|
33266
33266
|
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
33267
33267
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33268
|
-
encode: encode$
|
|
33269
|
-
attributes: validXmlAttributes$
|
|
33268
|
+
encode: encode$E,
|
|
33269
|
+
attributes: validXmlAttributes$f
|
|
33270
33270
|
};
|
|
33271
|
-
const translator$
|
|
33272
|
-
const encode$
|
|
33273
|
-
const decode$
|
|
33271
|
+
const translator$_ = NodeTranslator.from(config$k);
|
|
33272
|
+
const encode$D = (attributes) => attributes?.["w:eastAsia"];
|
|
33273
|
+
const decode$y = (attrs) => attrs?.eastAsia;
|
|
33274
33274
|
const attrConfig$h = Object.freeze({
|
|
33275
33275
|
xmlName: "w:eastAsia",
|
|
33276
33276
|
sdName: "eastAsia",
|
|
33277
|
-
encode: encode$
|
|
33278
|
-
decode: decode$
|
|
33277
|
+
encode: encode$D,
|
|
33278
|
+
decode: decode$y
|
|
33279
33279
|
});
|
|
33280
|
-
const encode$
|
|
33281
|
-
const decode$
|
|
33280
|
+
const encode$C = (attributes) => attributes?.["w:ascii"];
|
|
33281
|
+
const decode$x = (attrs) => attrs?.ascii;
|
|
33282
33282
|
const attrConfig$g = Object.freeze({
|
|
33283
33283
|
xmlName: "w:ascii",
|
|
33284
33284
|
sdName: "ascii",
|
|
33285
|
-
encode: encode$
|
|
33286
|
-
decode: decode$
|
|
33285
|
+
encode: encode$C,
|
|
33286
|
+
decode: decode$x
|
|
33287
33287
|
});
|
|
33288
|
-
const encode$
|
|
33289
|
-
const decode$
|
|
33288
|
+
const encode$B = (attributes) => attributes?.["w:hAnsi"];
|
|
33289
|
+
const decode$w = (attrs) => attrs?.hAnsi;
|
|
33290
33290
|
const attrConfig$f = Object.freeze({
|
|
33291
33291
|
xmlName: "w:hAnsi",
|
|
33292
33292
|
sdName: "hAnsi",
|
|
33293
|
-
encode: encode$
|
|
33294
|
-
decode: decode$
|
|
33293
|
+
encode: encode$B,
|
|
33294
|
+
decode: decode$w
|
|
33295
33295
|
});
|
|
33296
|
-
const encode$
|
|
33297
|
-
const decode$
|
|
33296
|
+
const encode$A = (attributes) => attributes?.["w:cs"];
|
|
33297
|
+
const decode$v = (attrs) => attrs?.cs;
|
|
33298
33298
|
const attrConfig$e = Object.freeze({
|
|
33299
33299
|
xmlName: "w:cs",
|
|
33300
33300
|
sdName: "cs",
|
|
33301
|
-
encode: encode$
|
|
33302
|
-
decode: decode$
|
|
33301
|
+
encode: encode$A,
|
|
33302
|
+
decode: decode$v
|
|
33303
33303
|
});
|
|
33304
|
-
const encode$
|
|
33305
|
-
const decode$
|
|
33304
|
+
const encode$z = (attributes) => attributes?.["w:val"];
|
|
33305
|
+
const decode$u = (attrs) => attrs?.value;
|
|
33306
33306
|
const attrConfig$d = Object.freeze({
|
|
33307
33307
|
xmlName: "w:val",
|
|
33308
33308
|
sdName: "value",
|
|
33309
|
-
encode: encode$
|
|
33310
|
-
decode: decode$
|
|
33309
|
+
encode: encode$z,
|
|
33310
|
+
decode: decode$u
|
|
33311
33311
|
});
|
|
33312
|
-
const validXmlAttributes$
|
|
33313
|
-
const XML_NODE_NAME$
|
|
33312
|
+
const validXmlAttributes$e = [attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d];
|
|
33313
|
+
const XML_NODE_NAME$l = "w:rFonts";
|
|
33314
33314
|
const SD_ATTR_KEY$9 = "fontFamily";
|
|
33315
|
-
const encode$
|
|
33315
|
+
const encode$y = (params2, encodedAttrs = {}) => {
|
|
33316
33316
|
const { nodes } = params2;
|
|
33317
33317
|
const node = nodes?.[0];
|
|
33318
33318
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -33338,120 +33338,120 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33338
33338
|
if (attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
33339
33339
|
return {
|
|
33340
33340
|
type: "attr",
|
|
33341
|
-
xmlName: XML_NODE_NAME$
|
|
33341
|
+
xmlName: XML_NODE_NAME$l,
|
|
33342
33342
|
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
33343
33343
|
attributes
|
|
33344
33344
|
};
|
|
33345
33345
|
};
|
|
33346
|
-
const config$
|
|
33347
|
-
xmlName: XML_NODE_NAME$
|
|
33346
|
+
const config$j = {
|
|
33347
|
+
xmlName: XML_NODE_NAME$l,
|
|
33348
33348
|
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
33349
33349
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33350
|
-
encode: encode$
|
|
33351
|
-
attributes: validXmlAttributes$
|
|
33350
|
+
encode: encode$y,
|
|
33351
|
+
attributes: validXmlAttributes$e
|
|
33352
33352
|
};
|
|
33353
|
-
const translator$
|
|
33354
|
-
const encode$
|
|
33355
|
-
const decode$
|
|
33353
|
+
const translator$Z = NodeTranslator.from(config$j);
|
|
33354
|
+
const encode$x = (attributes) => attributes?.["w:val"];
|
|
33355
|
+
const decode$t = (attrs) => attrs?.styleId;
|
|
33356
33356
|
const attrConfig$c = Object.freeze({
|
|
33357
33357
|
xmlName: "w:val",
|
|
33358
33358
|
sdName: "styleId",
|
|
33359
|
-
encode: encode$
|
|
33360
|
-
decode: decode$
|
|
33359
|
+
encode: encode$x,
|
|
33360
|
+
decode: decode$t
|
|
33361
33361
|
});
|
|
33362
|
-
const validXmlAttributes$
|
|
33363
|
-
const XML_NODE_NAME$
|
|
33362
|
+
const validXmlAttributes$d = [attrConfig$c];
|
|
33363
|
+
const XML_NODE_NAME$k = "w:rStyle";
|
|
33364
33364
|
const SD_ATTR_KEY$8 = "styleId";
|
|
33365
|
-
const encode$
|
|
33365
|
+
const encode$w = (params2, encodedAttrs = {}) => {
|
|
33366
33366
|
const { nodes } = params2;
|
|
33367
33367
|
const node = nodes?.[0];
|
|
33368
33368
|
const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
|
|
33369
33369
|
return {
|
|
33370
33370
|
type: "attr",
|
|
33371
|
-
xmlName: XML_NODE_NAME$
|
|
33371
|
+
xmlName: XML_NODE_NAME$k,
|
|
33372
33372
|
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
33373
33373
|
attributes: { "w:val": value ?? null }
|
|
33374
33374
|
};
|
|
33375
33375
|
};
|
|
33376
|
-
const config$
|
|
33377
|
-
xmlName: XML_NODE_NAME$
|
|
33376
|
+
const config$i = {
|
|
33377
|
+
xmlName: XML_NODE_NAME$k,
|
|
33378
33378
|
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
33379
33379
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33380
|
-
encode: encode$
|
|
33381
|
-
attributes: validXmlAttributes$
|
|
33380
|
+
encode: encode$w,
|
|
33381
|
+
attributes: validXmlAttributes$d
|
|
33382
33382
|
};
|
|
33383
|
-
const translator$
|
|
33384
|
-
const encode$
|
|
33385
|
-
const decode$
|
|
33383
|
+
const translator$Y = NodeTranslator.from(config$i);
|
|
33384
|
+
const encode$v = (attributes) => attributes?.["w:val"];
|
|
33385
|
+
const decode$s = (attrs) => attrs?.fontSize;
|
|
33386
33386
|
const attrConfig$b = Object.freeze({
|
|
33387
33387
|
xmlName: "w:val",
|
|
33388
33388
|
sdName: "fontSize",
|
|
33389
|
-
encode: encode$
|
|
33390
|
-
decode: decode$
|
|
33389
|
+
encode: encode$v,
|
|
33390
|
+
decode: decode$s
|
|
33391
33391
|
});
|
|
33392
|
-
const validXmlAttributes$
|
|
33393
|
-
const XML_NODE_NAME$
|
|
33392
|
+
const validXmlAttributes$c = [attrConfig$b];
|
|
33393
|
+
const XML_NODE_NAME$j = "w:sz";
|
|
33394
33394
|
const SD_ATTR_KEY$7 = "fontSize";
|
|
33395
|
-
const encode$
|
|
33395
|
+
const encode$u = (params2, encodedAttrs = {}) => {
|
|
33396
33396
|
const { nodes } = params2;
|
|
33397
33397
|
const node = nodes?.[0];
|
|
33398
33398
|
const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
|
|
33399
33399
|
return {
|
|
33400
33400
|
type: "attr",
|
|
33401
|
-
xmlName: XML_NODE_NAME$
|
|
33401
|
+
xmlName: XML_NODE_NAME$j,
|
|
33402
33402
|
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
33403
33403
|
attributes: { "w:val": value ?? null }
|
|
33404
33404
|
};
|
|
33405
33405
|
};
|
|
33406
|
-
const config$
|
|
33407
|
-
xmlName: XML_NODE_NAME$
|
|
33406
|
+
const config$h = {
|
|
33407
|
+
xmlName: XML_NODE_NAME$j,
|
|
33408
33408
|
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
33409
33409
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33410
|
-
encode: encode$
|
|
33411
|
-
attributes: validXmlAttributes$
|
|
33410
|
+
encode: encode$u,
|
|
33411
|
+
attributes: validXmlAttributes$c
|
|
33412
33412
|
};
|
|
33413
|
-
const translator$
|
|
33414
|
-
const encode$
|
|
33415
|
-
const decode$
|
|
33413
|
+
const translator$X = NodeTranslator.from(config$h);
|
|
33414
|
+
const encode$t = (attributes) => attributes?.["w:val"];
|
|
33415
|
+
const decode$r = (attrs) => attrs?.fontSizeCs;
|
|
33416
33416
|
const attrConfig$a = Object.freeze({
|
|
33417
33417
|
xmlName: "w:val",
|
|
33418
33418
|
sdName: "fontSizeCs",
|
|
33419
|
-
encode: encode$
|
|
33420
|
-
decode: decode$
|
|
33419
|
+
encode: encode$t,
|
|
33420
|
+
decode: decode$r
|
|
33421
33421
|
});
|
|
33422
|
-
const validXmlAttributes$
|
|
33423
|
-
const XML_NODE_NAME$
|
|
33422
|
+
const validXmlAttributes$b = [attrConfig$a];
|
|
33423
|
+
const XML_NODE_NAME$i = "w:szCs";
|
|
33424
33424
|
const SD_ATTR_KEY$6 = "fontSizeCs";
|
|
33425
|
-
const encode$
|
|
33425
|
+
const encode$s = (params2, encodedAttrs = {}) => {
|
|
33426
33426
|
const { nodes } = params2;
|
|
33427
33427
|
const node = nodes?.[0];
|
|
33428
33428
|
const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
|
|
33429
33429
|
return {
|
|
33430
33430
|
type: "attr",
|
|
33431
|
-
xmlName: XML_NODE_NAME$
|
|
33431
|
+
xmlName: XML_NODE_NAME$i,
|
|
33432
33432
|
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
33433
33433
|
attributes: { "w:val": value ?? null }
|
|
33434
33434
|
};
|
|
33435
33435
|
};
|
|
33436
|
-
const config$
|
|
33437
|
-
xmlName: XML_NODE_NAME$
|
|
33436
|
+
const config$g = {
|
|
33437
|
+
xmlName: XML_NODE_NAME$i,
|
|
33438
33438
|
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
33439
33439
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33440
|
-
encode: encode$
|
|
33441
|
-
attributes: validXmlAttributes$
|
|
33440
|
+
encode: encode$s,
|
|
33441
|
+
attributes: validXmlAttributes$b
|
|
33442
33442
|
};
|
|
33443
|
-
const translator$
|
|
33443
|
+
const translator$W = NodeTranslator.from(config$g);
|
|
33444
33444
|
const runPropertyTranslators = Object.freeze({
|
|
33445
|
-
"w:b": translator$
|
|
33446
|
-
"w:i": translator$
|
|
33447
|
-
"w:u": translator
|
|
33448
|
-
"w:strike": translator
|
|
33449
|
-
"w:color": translator$
|
|
33450
|
-
"w:highlight": translator$
|
|
33451
|
-
"w:rFonts": translator$
|
|
33452
|
-
"w:rStyle": translator$
|
|
33453
|
-
"w:sz": translator$
|
|
33454
|
-
"w:szCs": translator$
|
|
33445
|
+
"w:b": translator$12,
|
|
33446
|
+
"w:i": translator$11,
|
|
33447
|
+
"w:u": translator$10,
|
|
33448
|
+
"w:strike": translator$$,
|
|
33449
|
+
"w:color": translator$_,
|
|
33450
|
+
"w:highlight": translator$15,
|
|
33451
|
+
"w:rFonts": translator$Z,
|
|
33452
|
+
"w:rStyle": translator$Y,
|
|
33453
|
+
"w:sz": translator$X,
|
|
33454
|
+
"w:szCs": translator$W
|
|
33455
33455
|
});
|
|
33456
33456
|
const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
|
|
33457
33457
|
const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
|
|
@@ -33465,9 +33465,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33465
33465
|
attributes: { ...candidate.attributes || {} }
|
|
33466
33466
|
};
|
|
33467
33467
|
};
|
|
33468
|
-
const XML_NODE_NAME$
|
|
33468
|
+
const XML_NODE_NAME$h = "w:rPr";
|
|
33469
33469
|
const SD_ATTR_KEY$5 = "runProperties";
|
|
33470
|
-
const encode$
|
|
33470
|
+
const encode$r = (params2) => {
|
|
33471
33471
|
const { nodes } = params2;
|
|
33472
33472
|
const node = nodes?.[0] || {};
|
|
33473
33473
|
const contents = Array.isArray(node.elements) ? node.elements : [];
|
|
@@ -33501,16 +33501,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33501
33501
|
attributes: runPropsArray
|
|
33502
33502
|
};
|
|
33503
33503
|
};
|
|
33504
|
-
const config$
|
|
33505
|
-
xmlName: XML_NODE_NAME$
|
|
33504
|
+
const config$f = {
|
|
33505
|
+
xmlName: XML_NODE_NAME$h,
|
|
33506
33506
|
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
33507
33507
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
33508
|
-
encode: encode$
|
|
33508
|
+
encode: encode$r
|
|
33509
33509
|
};
|
|
33510
|
-
const translator$
|
|
33510
|
+
const translator$V = NodeTranslator.from(config$f);
|
|
33511
33511
|
const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
|
|
33512
33512
|
const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
|
|
33513
|
-
const collectRunProperties = (params2, rPrNode, translator2 = translator$
|
|
33513
|
+
const collectRunProperties = (params2, rPrNode, translator2 = translator$V) => {
|
|
33514
33514
|
if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
|
|
33515
33515
|
const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
|
|
33516
33516
|
let entries = [];
|
|
@@ -33972,46 +33972,46 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
33972
33972
|
}
|
|
33973
33973
|
return runs;
|
|
33974
33974
|
};
|
|
33975
|
-
const encode$
|
|
33975
|
+
const encode$q = (attributes) => {
|
|
33976
33976
|
return attributes["w:rsidR"];
|
|
33977
33977
|
};
|
|
33978
|
-
const decode$
|
|
33978
|
+
const decode$q = (attrs) => {
|
|
33979
33979
|
return attrs.rsidR;
|
|
33980
33980
|
};
|
|
33981
33981
|
const attrConfig$9 = Object.freeze({
|
|
33982
33982
|
xmlName: "w:rsidR",
|
|
33983
33983
|
sdName: "rsidR",
|
|
33984
|
-
encode: encode$
|
|
33985
|
-
decode: decode$
|
|
33984
|
+
encode: encode$q,
|
|
33985
|
+
decode: decode$q
|
|
33986
33986
|
});
|
|
33987
|
-
const encode$
|
|
33987
|
+
const encode$p = (attributes) => {
|
|
33988
33988
|
return attributes["w:rsidRPr"];
|
|
33989
33989
|
};
|
|
33990
|
-
const decode$
|
|
33990
|
+
const decode$p = (attrs) => {
|
|
33991
33991
|
return attrs.rsidRPr;
|
|
33992
33992
|
};
|
|
33993
33993
|
const attrConfig$8 = Object.freeze({
|
|
33994
33994
|
xmlName: "w:rsidRPr",
|
|
33995
33995
|
sdName: "rsidRPr",
|
|
33996
|
-
encode: encode$
|
|
33997
|
-
decode: decode$
|
|
33996
|
+
encode: encode$p,
|
|
33997
|
+
decode: decode$p
|
|
33998
33998
|
});
|
|
33999
|
-
const encode$
|
|
33999
|
+
const encode$o = (attributes) => {
|
|
34000
34000
|
return attributes["w:rsidDel"];
|
|
34001
34001
|
};
|
|
34002
|
-
const decode$
|
|
34002
|
+
const decode$o = (attrs) => {
|
|
34003
34003
|
return attrs.rsidDel;
|
|
34004
34004
|
};
|
|
34005
34005
|
const attrConfig$7 = Object.freeze({
|
|
34006
34006
|
xmlName: "w:rsidDel",
|
|
34007
34007
|
sdName: "rsidDel",
|
|
34008
|
-
encode: encode$
|
|
34009
|
-
decode: decode$
|
|
34008
|
+
encode: encode$o,
|
|
34009
|
+
decode: decode$o
|
|
34010
34010
|
});
|
|
34011
|
-
const validXmlAttributes$
|
|
34012
|
-
const XML_NODE_NAME$
|
|
34011
|
+
const validXmlAttributes$a = [attrConfig$9, attrConfig$8, attrConfig$7];
|
|
34012
|
+
const XML_NODE_NAME$g = "w:r";
|
|
34013
34013
|
const SD_KEY_NAME = "run";
|
|
34014
|
-
const encode$
|
|
34014
|
+
const encode$n = (params2, encodedAttrs = {}) => {
|
|
34015
34015
|
const { nodes = [], nodeListHandler } = params2 || {};
|
|
34016
34016
|
const runNode = nodes[0];
|
|
34017
34017
|
if (!runNode) return void 0;
|
|
@@ -34059,7 +34059,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34059
34059
|
}
|
|
34060
34060
|
return runNodeResult;
|
|
34061
34061
|
};
|
|
34062
|
-
const decode$
|
|
34062
|
+
const decode$n = (params2, decodedAttrs = {}) => {
|
|
34063
34063
|
const { node } = params2 || {};
|
|
34064
34064
|
if (!node) return void 0;
|
|
34065
34065
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
|
|
@@ -34116,7 +34116,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34116
34116
|
runs.push(trackedClone);
|
|
34117
34117
|
return;
|
|
34118
34118
|
}
|
|
34119
|
-
const runWrapper = { name: XML_NODE_NAME$
|
|
34119
|
+
const runWrapper = { name: XML_NODE_NAME$g, elements: [] };
|
|
34120
34120
|
applyBaseRunProps(runWrapper);
|
|
34121
34121
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
34122
34122
|
runWrapper.elements.push(cloneXmlNode(child));
|
|
@@ -34124,7 +34124,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34124
34124
|
});
|
|
34125
34125
|
const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
|
|
34126
34126
|
if (!trackedRuns.length) {
|
|
34127
|
-
const emptyRun = { name: XML_NODE_NAME$
|
|
34127
|
+
const emptyRun = { name: XML_NODE_NAME$g, elements: [] };
|
|
34128
34128
|
applyBaseRunProps(emptyRun);
|
|
34129
34129
|
trackedRuns.push(emptyRun);
|
|
34130
34130
|
}
|
|
@@ -34138,15 +34138,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34138
34138
|
}
|
|
34139
34139
|
return trackedRuns;
|
|
34140
34140
|
};
|
|
34141
|
-
const config$
|
|
34142
|
-
xmlName: XML_NODE_NAME$
|
|
34141
|
+
const config$e = {
|
|
34142
|
+
xmlName: XML_NODE_NAME$g,
|
|
34143
34143
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
34144
34144
|
type: NodeTranslator.translatorTypes.NODE,
|
|
34145
|
-
encode: encode$
|
|
34146
|
-
decode: decode$
|
|
34147
|
-
attributes: validXmlAttributes$
|
|
34145
|
+
encode: encode$n,
|
|
34146
|
+
decode: decode$n,
|
|
34147
|
+
attributes: validXmlAttributes$a
|
|
34148
34148
|
};
|
|
34149
|
-
const translator$
|
|
34149
|
+
const translator$U = NodeTranslator.from(config$e);
|
|
34150
34150
|
const generateV2HandlerEntity = (handlerName, translator2) => ({
|
|
34151
34151
|
handlerName,
|
|
34152
34152
|
handler: (params2) => {
|
|
@@ -34320,13 +34320,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34320
34320
|
}
|
|
34321
34321
|
return table;
|
|
34322
34322
|
}
|
|
34323
|
-
const translator$
|
|
34323
|
+
const translator$T = NodeTranslator.from({
|
|
34324
34324
|
xmlName: "w:cantSplit",
|
|
34325
34325
|
sdNodeOrKeyName: "cantSplit",
|
|
34326
34326
|
encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
34327
34327
|
decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
|
|
34328
34328
|
});
|
|
34329
|
-
const translator$
|
|
34329
|
+
const translator$S = NodeTranslator.from({
|
|
34330
34330
|
xmlName: "w:cnfStyle",
|
|
34331
34331
|
sdNodeOrKeyName: "cnfStyle",
|
|
34332
34332
|
attributes: [
|
|
@@ -34352,8 +34352,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34352
34352
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
34353
34353
|
}
|
|
34354
34354
|
});
|
|
34355
|
-
const translator$
|
|
34356
|
-
const translator$
|
|
34355
|
+
const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
34356
|
+
const translator$Q = NodeTranslator.from(
|
|
34357
34357
|
createSingleAttrPropertyHandler(
|
|
34358
34358
|
"w:gridAfter",
|
|
34359
34359
|
null,
|
|
@@ -34362,7 +34362,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34362
34362
|
(v2) => integerToString(v2)
|
|
34363
34363
|
)
|
|
34364
34364
|
);
|
|
34365
|
-
const translator$
|
|
34365
|
+
const translator$P = NodeTranslator.from(
|
|
34366
34366
|
createSingleAttrPropertyHandler(
|
|
34367
34367
|
"w:gridBefore",
|
|
34368
34368
|
null,
|
|
@@ -34371,21 +34371,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34371
34371
|
(v2) => integerToString(v2)
|
|
34372
34372
|
)
|
|
34373
34373
|
);
|
|
34374
|
-
const translator$
|
|
34374
|
+
const translator$O = NodeTranslator.from({
|
|
34375
34375
|
xmlName: "w:hidden",
|
|
34376
34376
|
sdNodeOrKeyName: "hidden",
|
|
34377
34377
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
34378
34378
|
decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
|
|
34379
34379
|
});
|
|
34380
|
-
const translator$
|
|
34381
|
-
const translator$
|
|
34382
|
-
const translator$
|
|
34380
|
+
const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
34381
|
+
const translator$M = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
|
|
34382
|
+
const translator$L = NodeTranslator.from({
|
|
34383
34383
|
xmlName: "w:tblHeader",
|
|
34384
34384
|
sdNodeOrKeyName: "repeatHeader",
|
|
34385
34385
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
34386
34386
|
decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
|
|
34387
34387
|
});
|
|
34388
|
-
const translator$
|
|
34388
|
+
const translator$K = NodeTranslator.from({
|
|
34389
34389
|
xmlName: "w:trHeight",
|
|
34390
34390
|
sdNodeOrKeyName: "rowHeight",
|
|
34391
34391
|
encode: ({ nodes }) => {
|
|
@@ -34412,11 +34412,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34412
34412
|
return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
|
|
34413
34413
|
}
|
|
34414
34414
|
});
|
|
34415
|
-
const translator$
|
|
34416
|
-
const translator$
|
|
34417
|
-
const XML_NODE_NAME$
|
|
34415
|
+
const translator$J = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
|
|
34416
|
+
const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
34417
|
+
const XML_NODE_NAME$f = "w:trPr";
|
|
34418
34418
|
const SD_ATTR_KEY$4 = "tableRowProperties";
|
|
34419
|
-
const encode$
|
|
34419
|
+
const encode$m = (params2) => {
|
|
34420
34420
|
const { nodes } = params2;
|
|
34421
34421
|
const node = nodes[0];
|
|
34422
34422
|
let attributes = {
|
|
@@ -34430,12 +34430,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34430
34430
|
};
|
|
34431
34431
|
return {
|
|
34432
34432
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
34433
|
-
xmlName: XML_NODE_NAME$
|
|
34433
|
+
xmlName: XML_NODE_NAME$f,
|
|
34434
34434
|
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
34435
34435
|
attributes
|
|
34436
34436
|
};
|
|
34437
34437
|
};
|
|
34438
|
-
const decode$
|
|
34438
|
+
const decode$m = (params2) => {
|
|
34439
34439
|
const { tableRowProperties = {} } = params2.node.attrs || {};
|
|
34440
34440
|
const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
|
|
34441
34441
|
const newNode = {
|
|
@@ -34447,6 +34447,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34447
34447
|
return newNode;
|
|
34448
34448
|
};
|
|
34449
34449
|
const propertyTranslators$3 = [
|
|
34450
|
+
translator$T,
|
|
34450
34451
|
translator$S,
|
|
34451
34452
|
translator$R,
|
|
34452
34453
|
translator$Q,
|
|
@@ -34457,8 +34458,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34457
34458
|
translator$L,
|
|
34458
34459
|
translator$K,
|
|
34459
34460
|
translator$J,
|
|
34460
|
-
translator$I
|
|
34461
|
-
translator$H
|
|
34461
|
+
translator$I
|
|
34462
34462
|
];
|
|
34463
34463
|
const propertyTranslatorsByXmlName$2 = {};
|
|
34464
34464
|
propertyTranslators$3.forEach((translator2) => {
|
|
@@ -34468,25 +34468,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34468
34468
|
propertyTranslators$3.forEach((translator2) => {
|
|
34469
34469
|
propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
|
|
34470
34470
|
});
|
|
34471
|
-
const config$
|
|
34472
|
-
xmlName: XML_NODE_NAME$
|
|
34471
|
+
const config$d = {
|
|
34472
|
+
xmlName: XML_NODE_NAME$f,
|
|
34473
34473
|
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
34474
34474
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
34475
|
-
encode: encode$
|
|
34476
|
-
decode: decode$
|
|
34475
|
+
encode: encode$m,
|
|
34476
|
+
decode: decode$m
|
|
34477
34477
|
};
|
|
34478
|
-
const translator$
|
|
34479
|
-
const XML_NODE_NAME$
|
|
34480
|
-
const SD_NODE_NAME$
|
|
34481
|
-
const validXmlAttributes$
|
|
34478
|
+
const translator$H = NodeTranslator.from(config$d);
|
|
34479
|
+
const XML_NODE_NAME$e = "w:tr";
|
|
34480
|
+
const SD_NODE_NAME$a = "tableRow";
|
|
34481
|
+
const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
|
|
34482
34482
|
(xmlName) => createAttributeHandler(xmlName)
|
|
34483
34483
|
);
|
|
34484
|
-
const encode$
|
|
34484
|
+
const encode$l = (params2, encodedAttrs) => {
|
|
34485
34485
|
const { row } = params2.extraParams;
|
|
34486
34486
|
let tableRowProperties = {};
|
|
34487
34487
|
const tPr = row.elements.find((el) => el.name === "w:trPr");
|
|
34488
34488
|
if (tPr) {
|
|
34489
|
-
({ attributes: tableRowProperties } = translator$
|
|
34489
|
+
({ attributes: tableRowProperties } = translator$H.encode({
|
|
34490
34490
|
...params2,
|
|
34491
34491
|
nodes: [tPr]
|
|
34492
34492
|
}));
|
|
@@ -34499,7 +34499,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34499
34499
|
let currentColumnIndex = 0;
|
|
34500
34500
|
const content = cellNodes?.map((n) => {
|
|
34501
34501
|
let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
|
|
34502
|
-
const result = translator$
|
|
34502
|
+
const result = translator$8.encode({
|
|
34503
34503
|
...params2,
|
|
34504
34504
|
extraParams: {
|
|
34505
34505
|
...params2.extraParams,
|
|
@@ -34521,7 +34521,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34521
34521
|
};
|
|
34522
34522
|
return newNode;
|
|
34523
34523
|
};
|
|
34524
|
-
const decode$
|
|
34524
|
+
const decode$l = (params2, decodedAttrs) => {
|
|
34525
34525
|
const { node } = params2;
|
|
34526
34526
|
const elements = translateChildNodes(params2);
|
|
34527
34527
|
if (node.attrs?.tableRowProperties) {
|
|
@@ -34533,7 +34533,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34533
34533
|
}
|
|
34534
34534
|
}
|
|
34535
34535
|
tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
|
|
34536
|
-
const trPr = translator$
|
|
34536
|
+
const trPr = translator$H.decode({
|
|
34537
34537
|
...params2,
|
|
34538
34538
|
node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
|
|
34539
34539
|
});
|
|
@@ -34545,22 +34545,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34545
34545
|
elements
|
|
34546
34546
|
};
|
|
34547
34547
|
};
|
|
34548
|
-
const config$
|
|
34549
|
-
xmlName: XML_NODE_NAME$
|
|
34550
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
34548
|
+
const config$c = {
|
|
34549
|
+
xmlName: XML_NODE_NAME$e,
|
|
34550
|
+
sdNodeOrKeyName: SD_NODE_NAME$a,
|
|
34551
34551
|
type: NodeTranslator.translatorTypes.NODE,
|
|
34552
|
-
encode: encode$
|
|
34553
|
-
decode: decode$
|
|
34554
|
-
attributes: validXmlAttributes$
|
|
34552
|
+
encode: encode$l,
|
|
34553
|
+
decode: decode$l,
|
|
34554
|
+
attributes: validXmlAttributes$9
|
|
34555
34555
|
};
|
|
34556
|
-
const translator$
|
|
34557
|
-
const translator$
|
|
34556
|
+
const translator$G = NodeTranslator.from(config$c);
|
|
34557
|
+
const translator$F = NodeTranslator.from({
|
|
34558
34558
|
xmlName: "w:bidiVisual",
|
|
34559
34559
|
sdNodeOrKeyName: "rightToLeft",
|
|
34560
34560
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
34561
34561
|
decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
|
|
34562
34562
|
});
|
|
34563
|
-
const translator$
|
|
34563
|
+
const translator$E = NodeTranslator.from({
|
|
34564
34564
|
xmlName: "w:shd",
|
|
34565
34565
|
sdNodeOrKeyName: "shading",
|
|
34566
34566
|
attributes: [
|
|
@@ -34582,11 +34582,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34582
34582
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
34583
34583
|
}
|
|
34584
34584
|
});
|
|
34585
|
-
const translator$
|
|
34586
|
-
const translator$
|
|
34587
|
-
const translator$
|
|
34588
|
-
const translator$
|
|
34589
|
-
const translator$
|
|
34585
|
+
const translator$D = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
34586
|
+
const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
34587
|
+
const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
34588
|
+
const translator$A = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
|
|
34589
|
+
const translator$z = NodeTranslator.from({
|
|
34590
34590
|
xmlName: "w:tblLook",
|
|
34591
34591
|
sdNodeOrKeyName: "tblLook",
|
|
34592
34592
|
attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
|
|
@@ -34598,16 +34598,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34598
34598
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
34599
34599
|
}
|
|
34600
34600
|
});
|
|
34601
|
-
const translator$
|
|
34602
|
-
const translator$
|
|
34603
|
-
const translator$
|
|
34601
|
+
const translator$y = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
|
|
34602
|
+
const translator$x = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
|
|
34603
|
+
const translator$w = NodeTranslator.from(
|
|
34604
34604
|
createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
|
|
34605
34605
|
);
|
|
34606
|
-
const translator$
|
|
34606
|
+
const translator$v = NodeTranslator.from(
|
|
34607
34607
|
createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
|
|
34608
34608
|
);
|
|
34609
|
-
const translator$
|
|
34610
|
-
const translator$
|
|
34609
|
+
const translator$u = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
|
|
34610
|
+
const translator$t = NodeTranslator.from({
|
|
34611
34611
|
xmlName: "w:tblpPr",
|
|
34612
34612
|
sdNodeOrKeyName: "floatingTableProperties",
|
|
34613
34613
|
attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
|
|
@@ -34619,29 +34619,29 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34619
34619
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
34620
34620
|
}
|
|
34621
34621
|
});
|
|
34622
|
-
const translator$
|
|
34623
|
-
const translator$
|
|
34624
|
-
const translator$
|
|
34625
|
-
const translator$
|
|
34626
|
-
const translator$
|
|
34627
|
-
const translator$
|
|
34628
|
-
const translator$
|
|
34629
|
-
const translator$
|
|
34630
|
-
const translator$
|
|
34631
|
-
const translator$
|
|
34632
|
-
const translator$
|
|
34633
|
-
const translator$
|
|
34634
|
-
const translator$
|
|
34635
|
-
const translator$
|
|
34636
|
-
const XML_NODE_NAME$
|
|
34622
|
+
const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
34623
|
+
const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
34624
|
+
const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:end"));
|
|
34625
|
+
const translator$p = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
|
|
34626
|
+
const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
|
|
34627
|
+
const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
|
|
34628
|
+
const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
34629
|
+
const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
34630
|
+
const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
34631
|
+
const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
34632
|
+
const translator$i = NodeTranslator.from(createBorderPropertyHandler("w:start"));
|
|
34633
|
+
const translator$h = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
|
|
34634
|
+
const translator$g = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
34635
|
+
const translator$f = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
34636
|
+
const XML_NODE_NAME$d = "w:tblBorders";
|
|
34637
34637
|
const SD_ATTR_KEY$3 = "borders";
|
|
34638
|
-
const encode$
|
|
34638
|
+
const encode$k = (params2) => {
|
|
34639
34639
|
const { nodes } = params2;
|
|
34640
34640
|
const node = nodes[0];
|
|
34641
34641
|
const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
|
|
34642
34642
|
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
34643
34643
|
};
|
|
34644
|
-
const decode$
|
|
34644
|
+
const decode$k = (params2) => {
|
|
34645
34645
|
const { borders = {} } = params2.node.attrs || {};
|
|
34646
34646
|
const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
|
|
34647
34647
|
const newNode = {
|
|
@@ -34653,14 +34653,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34653
34653
|
return newNode;
|
|
34654
34654
|
};
|
|
34655
34655
|
const propertyTranslators$2 = [
|
|
34656
|
-
translator$
|
|
34657
|
-
translator$
|
|
34656
|
+
translator$s,
|
|
34657
|
+
translator$q,
|
|
34658
|
+
translator$o,
|
|
34658
34659
|
translator$n,
|
|
34659
34660
|
translator$m,
|
|
34660
|
-
translator$
|
|
34661
|
-
translator$
|
|
34662
|
-
translator$
|
|
34663
|
-
translator$f
|
|
34661
|
+
translator$k,
|
|
34662
|
+
translator$i,
|
|
34663
|
+
translator$g
|
|
34664
34664
|
];
|
|
34665
34665
|
const tblBordersTranslatorsByXmlName = {};
|
|
34666
34666
|
const tblBordersTranslatorsBySdName = {};
|
|
@@ -34668,27 +34668,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34668
34668
|
tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
34669
34669
|
tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
34670
34670
|
});
|
|
34671
|
-
const translator$
|
|
34672
|
-
xmlName: XML_NODE_NAME$
|
|
34671
|
+
const translator$e = NodeTranslator.from({
|
|
34672
|
+
xmlName: XML_NODE_NAME$d,
|
|
34673
34673
|
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
34674
34674
|
type: NodeTranslator.translatorTypes.NODE,
|
|
34675
34675
|
attributes: [],
|
|
34676
|
-
encode: encode$
|
|
34677
|
-
decode: decode$
|
|
34676
|
+
encode: encode$k,
|
|
34677
|
+
decode: decode$k
|
|
34678
34678
|
});
|
|
34679
|
-
const XML_NODE_NAME$
|
|
34679
|
+
const XML_NODE_NAME$c = "w:tblCellMar";
|
|
34680
34680
|
const SD_ATTR_KEY$2 = "cellMargins";
|
|
34681
|
-
const encode$
|
|
34681
|
+
const encode$j = (params2) => {
|
|
34682
34682
|
const { nodes } = params2;
|
|
34683
34683
|
const node = nodes[0];
|
|
34684
34684
|
const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
|
|
34685
34685
|
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
34686
34686
|
};
|
|
34687
|
-
const decode$
|
|
34687
|
+
const decode$j = (params2) => {
|
|
34688
34688
|
const { cellMargins = {} } = params2.node.attrs || {};
|
|
34689
34689
|
const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
|
|
34690
34690
|
const newNode = {
|
|
34691
|
-
name: XML_NODE_NAME$
|
|
34691
|
+
name: XML_NODE_NAME$c,
|
|
34692
34692
|
type: "element",
|
|
34693
34693
|
attributes: {},
|
|
34694
34694
|
elements
|
|
@@ -34696,12 +34696,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34696
34696
|
return newNode;
|
|
34697
34697
|
};
|
|
34698
34698
|
const propertyTranslators$1 = [
|
|
34699
|
-
translator$
|
|
34700
|
-
translator$
|
|
34701
|
-
translator$
|
|
34702
|
-
translator$
|
|
34703
|
-
translator$
|
|
34704
|
-
translator$
|
|
34699
|
+
translator$r,
|
|
34700
|
+
translator$p,
|
|
34701
|
+
translator$l,
|
|
34702
|
+
translator$j,
|
|
34703
|
+
translator$h,
|
|
34704
|
+
translator$f
|
|
34705
34705
|
];
|
|
34706
34706
|
const propertyTranslatorsByXmlName$1 = {};
|
|
34707
34707
|
const propertyTranslatorsBySdName$1 = {};
|
|
@@ -34709,27 +34709,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34709
34709
|
propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
|
|
34710
34710
|
propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
|
|
34711
34711
|
});
|
|
34712
|
-
const translator$
|
|
34713
|
-
xmlName: XML_NODE_NAME$
|
|
34712
|
+
const translator$d = NodeTranslator.from({
|
|
34713
|
+
xmlName: XML_NODE_NAME$c,
|
|
34714
34714
|
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
34715
34715
|
type: NodeTranslator.translatorTypes.NODE,
|
|
34716
34716
|
attributes: [],
|
|
34717
|
-
encode: encode$
|
|
34718
|
-
decode: decode$
|
|
34717
|
+
encode: encode$j,
|
|
34718
|
+
decode: decode$j
|
|
34719
34719
|
});
|
|
34720
|
-
const XML_NODE_NAME$
|
|
34720
|
+
const XML_NODE_NAME$b = "w:tblPr";
|
|
34721
34721
|
const SD_ATTR_KEY$1 = "tableProperties";
|
|
34722
|
-
const encode$
|
|
34722
|
+
const encode$i = (params2) => {
|
|
34723
34723
|
const { nodes } = params2;
|
|
34724
34724
|
const node = nodes[0];
|
|
34725
34725
|
const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
|
|
34726
34726
|
return {
|
|
34727
|
-
xmlName: XML_NODE_NAME$
|
|
34727
|
+
xmlName: XML_NODE_NAME$b,
|
|
34728
34728
|
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
34729
34729
|
attributes
|
|
34730
34730
|
};
|
|
34731
34731
|
};
|
|
34732
|
-
const decode$
|
|
34732
|
+
const decode$i = (params2) => {
|
|
34733
34733
|
const { tableProperties = {} } = params2.node.attrs || {};
|
|
34734
34734
|
const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
|
|
34735
34735
|
const newNode = {
|
|
@@ -34741,11 +34741,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34741
34741
|
return newNode;
|
|
34742
34742
|
};
|
|
34743
34743
|
const propertyTranslators = [
|
|
34744
|
+
translator$F,
|
|
34745
|
+
translator$N,
|
|
34744
34746
|
translator$E,
|
|
34745
|
-
translator$M,
|
|
34746
34747
|
translator$D,
|
|
34748
|
+
translator$M,
|
|
34747
34749
|
translator$C,
|
|
34748
|
-
translator$L,
|
|
34749
34750
|
translator$B,
|
|
34750
34751
|
translator$A,
|
|
34751
34752
|
translator$z,
|
|
@@ -34755,9 +34756,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34755
34756
|
translator$v,
|
|
34756
34757
|
translator$u,
|
|
34757
34758
|
translator$t,
|
|
34758
|
-
translator$
|
|
34759
|
-
translator$d
|
|
34760
|
-
translator$c
|
|
34759
|
+
translator$e,
|
|
34760
|
+
translator$d
|
|
34761
34761
|
];
|
|
34762
34762
|
const propertyTranslatorsByXmlName = {};
|
|
34763
34763
|
const propertyTranslatorsBySdName = {};
|
|
@@ -34765,14 +34765,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34765
34765
|
propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
34766
34766
|
propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
34767
34767
|
});
|
|
34768
|
-
const config$
|
|
34769
|
-
xmlName: XML_NODE_NAME$
|
|
34768
|
+
const config$b = {
|
|
34769
|
+
xmlName: XML_NODE_NAME$b,
|
|
34770
34770
|
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
34771
|
-
encode: encode$
|
|
34772
|
-
decode: decode$
|
|
34771
|
+
encode: encode$i,
|
|
34772
|
+
decode: decode$i
|
|
34773
34773
|
};
|
|
34774
|
-
const translator$
|
|
34775
|
-
const translator$
|
|
34774
|
+
const translator$c = NodeTranslator.from(config$b);
|
|
34775
|
+
const translator$b = NodeTranslator.from(
|
|
34776
34776
|
createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
|
|
34777
34777
|
);
|
|
34778
34778
|
const DEFAULT_COLUMN_WIDTH_PX = 100;
|
|
@@ -34822,20 +34822,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34822
34822
|
}
|
|
34823
34823
|
return Math.max(fallbackWidthTwips, cellMinWidthTwips);
|
|
34824
34824
|
};
|
|
34825
|
-
const XML_NODE_NAME$
|
|
34825
|
+
const XML_NODE_NAME$a = "w:tblGrid";
|
|
34826
34826
|
const SD_ATTR_KEY = "grid";
|
|
34827
34827
|
const cellMinWidth = pixelsToTwips(10);
|
|
34828
|
-
const encode$
|
|
34828
|
+
const encode$h = (params2) => {
|
|
34829
34829
|
const { nodes } = params2;
|
|
34830
34830
|
const node = nodes[0];
|
|
34831
|
-
const attributes = encodeProperties(node, { [translator$
|
|
34831
|
+
const attributes = encodeProperties(node, { [translator$b.xmlName]: translator$b }, true);
|
|
34832
34832
|
return {
|
|
34833
|
-
xmlName: XML_NODE_NAME$
|
|
34833
|
+
xmlName: XML_NODE_NAME$a,
|
|
34834
34834
|
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
34835
34835
|
attributes
|
|
34836
34836
|
};
|
|
34837
34837
|
};
|
|
34838
|
-
const decode$
|
|
34838
|
+
const decode$h = (params2) => {
|
|
34839
34839
|
const { grid: rawGrid } = params2.node.attrs || {};
|
|
34840
34840
|
const grid = Array.isArray(rawGrid) ? rawGrid : [];
|
|
34841
34841
|
const { firstRow = {} } = params2.extraParams || {};
|
|
@@ -34854,10 +34854,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34854
34854
|
numericWidth = fallbackColumnWidthTwips;
|
|
34855
34855
|
}
|
|
34856
34856
|
numericWidth = Math.max(numericWidth, cellMinWidth);
|
|
34857
|
-
const decoded = translator$
|
|
34857
|
+
const decoded = translator$b.decode({
|
|
34858
34858
|
node: { type: (
|
|
34859
34859
|
/** @type {string} */
|
|
34860
|
-
translator$
|
|
34860
|
+
translator$b.sdNodeOrKeyName
|
|
34861
34861
|
), attrs: { col: numericWidth } }
|
|
34862
34862
|
});
|
|
34863
34863
|
if (decoded) elements.push(decoded);
|
|
@@ -34892,32 +34892,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34892
34892
|
columnIndex++;
|
|
34893
34893
|
}
|
|
34894
34894
|
const newNode = {
|
|
34895
|
-
name: XML_NODE_NAME$
|
|
34895
|
+
name: XML_NODE_NAME$a,
|
|
34896
34896
|
attributes: {},
|
|
34897
34897
|
elements
|
|
34898
34898
|
};
|
|
34899
34899
|
return newNode;
|
|
34900
34900
|
};
|
|
34901
|
-
const config$
|
|
34902
|
-
xmlName: XML_NODE_NAME$
|
|
34901
|
+
const config$a = {
|
|
34902
|
+
xmlName: XML_NODE_NAME$a,
|
|
34903
34903
|
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
34904
|
-
encode: encode$
|
|
34905
|
-
decode: decode$
|
|
34904
|
+
encode: encode$h,
|
|
34905
|
+
decode: decode$h
|
|
34906
34906
|
};
|
|
34907
|
-
const translator$
|
|
34908
|
-
const XML_NODE_NAME$
|
|
34909
|
-
const SD_NODE_NAME$
|
|
34910
|
-
const encode$
|
|
34907
|
+
const translator$a = NodeTranslator.from(config$a);
|
|
34908
|
+
const XML_NODE_NAME$9 = "w:tbl";
|
|
34909
|
+
const SD_NODE_NAME$9 = "table";
|
|
34910
|
+
const encode$g = (params2, encodedAttrs) => {
|
|
34911
34911
|
const { nodes } = params2;
|
|
34912
34912
|
const node = nodes[0];
|
|
34913
34913
|
const tblPr = node.elements.find((el) => el.name === "w:tblPr");
|
|
34914
34914
|
if (tblPr) {
|
|
34915
|
-
const encodedProperties = translator$
|
|
34915
|
+
const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
|
|
34916
34916
|
encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
|
|
34917
34917
|
}
|
|
34918
34918
|
const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
|
|
34919
34919
|
if (tblGrid) {
|
|
34920
|
-
encodedAttrs["grid"] = translator$
|
|
34920
|
+
encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
|
|
34921
34921
|
}
|
|
34922
34922
|
[
|
|
34923
34923
|
"tableStyleId",
|
|
@@ -34958,7 +34958,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34958
34958
|
const columnWidths = (encodedAttrs["grid"] ?? []).map((item) => twipsToPixels(item.col));
|
|
34959
34959
|
const content = [];
|
|
34960
34960
|
rows.forEach((row) => {
|
|
34961
|
-
const result = translator$
|
|
34961
|
+
const result = translator$G.encode({
|
|
34962
34962
|
...params2,
|
|
34963
34963
|
nodes: [row],
|
|
34964
34964
|
extraParams: {
|
|
@@ -34977,13 +34977,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34977
34977
|
attrs: encodedAttrs
|
|
34978
34978
|
};
|
|
34979
34979
|
};
|
|
34980
|
-
const decode$
|
|
34980
|
+
const decode$g = (params2, decodedAttrs) => {
|
|
34981
34981
|
params2.node = preProcessVerticalMergeCells(params2.node, params2);
|
|
34982
34982
|
const { node } = params2;
|
|
34983
34983
|
const elements = translateChildNodes(params2);
|
|
34984
34984
|
const firstRow = node.content?.find((n) => n.type === "tableRow");
|
|
34985
34985
|
const properties = node.attrs.grid;
|
|
34986
|
-
const element = translator$
|
|
34986
|
+
const element = translator$a.decode({
|
|
34987
34987
|
...params2,
|
|
34988
34988
|
node: { ...node, attrs: { ...node.attrs, grid: properties } },
|
|
34989
34989
|
extraParams: {
|
|
@@ -34993,7 +34993,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
34993
34993
|
if (element) elements.unshift(element);
|
|
34994
34994
|
if (node.attrs?.tableProperties) {
|
|
34995
34995
|
const properties2 = { ...node.attrs.tableProperties };
|
|
34996
|
-
const element2 = translator$
|
|
34996
|
+
const element2 = translator$c.decode({
|
|
34997
34997
|
...params2,
|
|
34998
34998
|
node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
|
|
34999
34999
|
});
|
|
@@ -35059,7 +35059,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35059
35059
|
if (baseTblPr && baseTblPr.elements) {
|
|
35060
35060
|
tblPr.elements.push(...baseTblPr.elements);
|
|
35061
35061
|
}
|
|
35062
|
-
const tableProperties = translator$
|
|
35062
|
+
const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] }).attributes;
|
|
35063
35063
|
const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
|
|
35064
35064
|
if (borders) stylesToReturn.borders = borders;
|
|
35065
35065
|
if (rowBorders) stylesToReturn.rowBorders = rowBorders;
|
|
@@ -35076,16 +35076,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35076
35076
|
}
|
|
35077
35077
|
return stylesToReturn;
|
|
35078
35078
|
}
|
|
35079
|
-
const config$
|
|
35080
|
-
xmlName: XML_NODE_NAME$
|
|
35081
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
35079
|
+
const config$9 = {
|
|
35080
|
+
xmlName: XML_NODE_NAME$9,
|
|
35081
|
+
sdNodeOrKeyName: SD_NODE_NAME$9,
|
|
35082
35082
|
type: NodeTranslator.translatorTypes.NODE,
|
|
35083
|
-
encode: encode$
|
|
35084
|
-
decode: decode$
|
|
35083
|
+
encode: encode$g,
|
|
35084
|
+
decode: decode$g,
|
|
35085
35085
|
attributes: []
|
|
35086
35086
|
};
|
|
35087
|
-
const translator$
|
|
35088
|
-
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$
|
|
35087
|
+
const translator$9 = NodeTranslator.from(config$9);
|
|
35088
|
+
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
|
|
35089
35089
|
function getReferencedTableStyles(tblStyleTag, docx) {
|
|
35090
35090
|
if (!tblStyleTag) return null;
|
|
35091
35091
|
const stylesToReturn = {};
|
|
@@ -35447,10 +35447,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35447
35447
|
if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
|
|
35448
35448
|
return elements;
|
|
35449
35449
|
}
|
|
35450
|
-
const XML_NODE_NAME$
|
|
35451
|
-
const SD_NODE_NAME$
|
|
35452
|
-
const validXmlAttributes$
|
|
35453
|
-
function encode$
|
|
35450
|
+
const XML_NODE_NAME$8 = "w:tc";
|
|
35451
|
+
const SD_NODE_NAME$8 = "tableCell";
|
|
35452
|
+
const validXmlAttributes$8 = [];
|
|
35453
|
+
function encode$f(params2, encodedAttrs) {
|
|
35454
35454
|
const {
|
|
35455
35455
|
node,
|
|
35456
35456
|
table,
|
|
@@ -35477,31 +35477,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35477
35477
|
}
|
|
35478
35478
|
return schemaNode;
|
|
35479
35479
|
}
|
|
35480
|
-
function decode$
|
|
35480
|
+
function decode$f(params2, decodedAttrs) {
|
|
35481
35481
|
const translated = translateTableCell(params2);
|
|
35482
35482
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
35483
35483
|
translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
|
|
35484
35484
|
}
|
|
35485
35485
|
return translated;
|
|
35486
35486
|
}
|
|
35487
|
-
const config$
|
|
35488
|
-
xmlName: XML_NODE_NAME$
|
|
35489
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
35487
|
+
const config$8 = {
|
|
35488
|
+
xmlName: XML_NODE_NAME$8,
|
|
35489
|
+
sdNodeOrKeyName: SD_NODE_NAME$8,
|
|
35490
35490
|
type: NodeTranslator.translatorTypes.NODE,
|
|
35491
|
-
encode: encode$
|
|
35492
|
-
decode: decode$
|
|
35493
|
-
attributes: validXmlAttributes$
|
|
35491
|
+
encode: encode$f,
|
|
35492
|
+
decode: decode$f,
|
|
35493
|
+
attributes: validXmlAttributes$8
|
|
35494
35494
|
};
|
|
35495
|
-
const translator$
|
|
35496
|
-
const XML_NODE_NAME$
|
|
35497
|
-
const SD_NODE_NAME$
|
|
35495
|
+
const translator$8 = NodeTranslator.from(config$8);
|
|
35496
|
+
const XML_NODE_NAME$7 = "w:hyperlink";
|
|
35497
|
+
const SD_NODE_NAME$7 = "link";
|
|
35498
35498
|
const _createAttributeHandler = (xmlName, sdName) => ({
|
|
35499
35499
|
xmlName,
|
|
35500
35500
|
sdName,
|
|
35501
35501
|
encode: (attributes) => attributes[xmlName],
|
|
35502
35502
|
decode: (attributes) => attributes[sdName]
|
|
35503
35503
|
});
|
|
35504
|
-
const validXmlAttributes$
|
|
35504
|
+
const validXmlAttributes$7 = [
|
|
35505
35505
|
_createAttributeHandler("w:anchor", "anchor"),
|
|
35506
35506
|
_createAttributeHandler("w:docLocation", "docLocation"),
|
|
35507
35507
|
{
|
|
@@ -35514,7 +35514,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35514
35514
|
_createAttributeHandler("r:id", "rId"),
|
|
35515
35515
|
_createAttributeHandler("w:tgtFrame", "target")
|
|
35516
35516
|
];
|
|
35517
|
-
const encode$
|
|
35517
|
+
const encode$e = (params2, encodedAttrs) => {
|
|
35518
35518
|
const { nodes, docx, nodeListHandler } = params2;
|
|
35519
35519
|
const node = nodes[0];
|
|
35520
35520
|
let href = _resolveHref(docx, encodedAttrs);
|
|
@@ -35580,7 +35580,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35580
35580
|
}
|
|
35581
35581
|
return href;
|
|
35582
35582
|
};
|
|
35583
|
-
function decode$
|
|
35583
|
+
function decode$e(params2) {
|
|
35584
35584
|
const { node } = params2;
|
|
35585
35585
|
const linkMark = node.marks.find((m2) => m2.type === "link");
|
|
35586
35586
|
const linkAttrs = this.decodeAttributes({ ...params2, node: linkMark });
|
|
@@ -35624,15 +35624,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35624
35624
|
});
|
|
35625
35625
|
return rId;
|
|
35626
35626
|
}
|
|
35627
|
-
const config$
|
|
35628
|
-
xmlName: XML_NODE_NAME$
|
|
35629
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
35627
|
+
const config$7 = {
|
|
35628
|
+
xmlName: XML_NODE_NAME$7,
|
|
35629
|
+
sdNodeOrKeyName: SD_NODE_NAME$7,
|
|
35630
35630
|
type: NodeTranslator.translatorTypes.NODE,
|
|
35631
|
-
encode: encode$
|
|
35632
|
-
decode: decode$
|
|
35633
|
-
attributes: validXmlAttributes$
|
|
35631
|
+
encode: encode$e,
|
|
35632
|
+
decode: decode$e,
|
|
35633
|
+
attributes: validXmlAttributes$7
|
|
35634
35634
|
};
|
|
35635
|
-
const translator$
|
|
35635
|
+
const translator$7 = NodeTranslator.from(config$7);
|
|
35636
35636
|
function parseTagValueJSON(json) {
|
|
35637
35637
|
if (typeof json !== "string") {
|
|
35638
35638
|
return {};
|
|
@@ -36427,32 +36427,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36427
36427
|
elements: [...anchorElements, ...elementsWithWrap]
|
|
36428
36428
|
};
|
|
36429
36429
|
}
|
|
36430
|
-
const XML_NODE_NAME$
|
|
36431
|
-
const SD_NODE_NAME$
|
|
36432
|
-
const validXmlAttributes$
|
|
36433
|
-
function encode$
|
|
36430
|
+
const XML_NODE_NAME$6 = "wp:anchor";
|
|
36431
|
+
const SD_NODE_NAME$6 = ["image"];
|
|
36432
|
+
const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
36433
|
+
function encode$d(params2) {
|
|
36434
36434
|
const { node } = params2.extraParams;
|
|
36435
36435
|
if (!node || !node.type) {
|
|
36436
36436
|
return null;
|
|
36437
36437
|
}
|
|
36438
36438
|
return handleAnchorNode(params2);
|
|
36439
36439
|
}
|
|
36440
|
-
function decode$
|
|
36440
|
+
function decode$d(params2) {
|
|
36441
36441
|
const { node } = params2;
|
|
36442
36442
|
if (!node || !node.type) {
|
|
36443
36443
|
return null;
|
|
36444
36444
|
}
|
|
36445
36445
|
return translateAnchorNode(params2);
|
|
36446
36446
|
}
|
|
36447
|
-
const config$
|
|
36448
|
-
xmlName: XML_NODE_NAME$
|
|
36449
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
36447
|
+
const config$6 = {
|
|
36448
|
+
xmlName: XML_NODE_NAME$6,
|
|
36449
|
+
sdNodeOrKeyName: SD_NODE_NAME$6,
|
|
36450
36450
|
type: NodeTranslator.translatorTypes.NODE,
|
|
36451
|
-
encode: encode$
|
|
36452
|
-
decode: decode$
|
|
36453
|
-
attributes: validXmlAttributes$
|
|
36451
|
+
encode: encode$d,
|
|
36452
|
+
decode: decode$d,
|
|
36453
|
+
attributes: validXmlAttributes$6
|
|
36454
36454
|
};
|
|
36455
|
-
const translator$
|
|
36455
|
+
const translator$6 = NodeTranslator.from(config$6);
|
|
36456
36456
|
function handleInlineNode(params2) {
|
|
36457
36457
|
const { node } = params2.extraParams;
|
|
36458
36458
|
if (node.name !== "wp:inline") {
|
|
@@ -36468,41 +36468,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36468
36468
|
elements: nodeElements.elements
|
|
36469
36469
|
};
|
|
36470
36470
|
}
|
|
36471
|
-
const XML_NODE_NAME$
|
|
36472
|
-
const SD_NODE_NAME$
|
|
36473
|
-
const validXmlAttributes$
|
|
36474
|
-
function encode$
|
|
36471
|
+
const XML_NODE_NAME$5 = "wp:inline";
|
|
36472
|
+
const SD_NODE_NAME$5 = ["image"];
|
|
36473
|
+
const validXmlAttributes$5 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
36474
|
+
function encode$c(params2) {
|
|
36475
36475
|
const { node } = params2.extraParams;
|
|
36476
36476
|
if (!node || !node.type) {
|
|
36477
36477
|
return null;
|
|
36478
36478
|
}
|
|
36479
36479
|
return handleInlineNode(params2);
|
|
36480
36480
|
}
|
|
36481
|
-
function decode$
|
|
36481
|
+
function decode$c(params2) {
|
|
36482
36482
|
const { node } = params2;
|
|
36483
36483
|
if (!node || !node.type) {
|
|
36484
36484
|
return null;
|
|
36485
36485
|
}
|
|
36486
36486
|
return translateInlineNode(params2);
|
|
36487
36487
|
}
|
|
36488
|
-
const config$
|
|
36489
|
-
xmlName: XML_NODE_NAME$
|
|
36490
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
36488
|
+
const config$5 = {
|
|
36489
|
+
xmlName: XML_NODE_NAME$5,
|
|
36490
|
+
sdNodeOrKeyName: SD_NODE_NAME$5,
|
|
36491
36491
|
type: NodeTranslator.translatorTypes.NODE,
|
|
36492
|
-
encode: encode$
|
|
36493
|
-
decode: decode$
|
|
36494
|
-
attributes: validXmlAttributes$
|
|
36492
|
+
encode: encode$c,
|
|
36493
|
+
decode: decode$c,
|
|
36494
|
+
attributes: validXmlAttributes$5
|
|
36495
36495
|
};
|
|
36496
|
-
const translator$
|
|
36497
|
-
const XML_NODE_NAME$
|
|
36498
|
-
const SD_NODE_NAME$
|
|
36499
|
-
const validXmlAttributes$
|
|
36500
|
-
function encode$
|
|
36496
|
+
const translator$5 = NodeTranslator.from(config$5);
|
|
36497
|
+
const XML_NODE_NAME$4 = "w:drawing";
|
|
36498
|
+
const SD_NODE_NAME$4 = [];
|
|
36499
|
+
const validXmlAttributes$4 = [];
|
|
36500
|
+
function encode$b(params2) {
|
|
36501
36501
|
const nodes = params2.nodes;
|
|
36502
36502
|
const node = nodes[0];
|
|
36503
36503
|
const translatorByChildName = {
|
|
36504
|
-
"wp:anchor": translator$
|
|
36505
|
-
"wp:inline": translator$
|
|
36504
|
+
"wp:anchor": translator$6,
|
|
36505
|
+
"wp:inline": translator$5
|
|
36506
36506
|
};
|
|
36507
36507
|
return node.elements.reduce((acc, child) => {
|
|
36508
36508
|
if (acc) return acc;
|
|
@@ -36511,12 +36511,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36511
36511
|
return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
|
|
36512
36512
|
}, null);
|
|
36513
36513
|
}
|
|
36514
|
-
function decode$
|
|
36514
|
+
function decode$b(params2) {
|
|
36515
36515
|
const { node } = params2;
|
|
36516
36516
|
if (!node || !node.type) {
|
|
36517
36517
|
return null;
|
|
36518
36518
|
}
|
|
36519
|
-
const childTranslator = node.attrs.isAnchor ? translator$
|
|
36519
|
+
const childTranslator = node.attrs.isAnchor ? translator$6 : translator$5;
|
|
36520
36520
|
const resultNode = childTranslator.decode(params2);
|
|
36521
36521
|
return wrapTextInRun(
|
|
36522
36522
|
{
|
|
@@ -36526,15 +36526,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
36526
36526
|
[]
|
|
36527
36527
|
);
|
|
36528
36528
|
}
|
|
36529
|
-
const config$
|
|
36530
|
-
xmlName: XML_NODE_NAME$
|
|
36531
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
36529
|
+
const config$4 = {
|
|
36530
|
+
xmlName: XML_NODE_NAME$4,
|
|
36531
|
+
sdNodeOrKeyName: SD_NODE_NAME$4,
|
|
36532
36532
|
type: NodeTranslator.translatorTypes.NODE,
|
|
36533
|
-
encode: encode$
|
|
36534
|
-
decode: decode$
|
|
36535
|
-
attributes: validXmlAttributes$
|
|
36533
|
+
encode: encode$b,
|
|
36534
|
+
decode: decode$b,
|
|
36535
|
+
attributes: validXmlAttributes$4
|
|
36536
36536
|
};
|
|
36537
|
-
const translator$
|
|
36537
|
+
const translator$4 = NodeTranslator.from(config$4);
|
|
36538
36538
|
class CommandService {
|
|
36539
36539
|
/**
|
|
36540
36540
|
* @param {import('./commands/types/index.js').CommandServiceOptions} props
|
|
@@ -37872,7 +37872,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
37872
37872
|
return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
|
|
37873
37873
|
}
|
|
37874
37874
|
function prepareImageAnnotation(params2, imageSize) {
|
|
37875
|
-
return translator$
|
|
37875
|
+
return translator$4.decode({
|
|
37876
37876
|
...params2,
|
|
37877
37877
|
imageSize
|
|
37878
37878
|
});
|
|
@@ -38109,10 +38109,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38109
38109
|
};
|
|
38110
38110
|
return result;
|
|
38111
38111
|
}
|
|
38112
|
-
const XML_NODE_NAME$
|
|
38113
|
-
const SD_NODE_NAME$
|
|
38114
|
-
const validXmlAttributes$
|
|
38115
|
-
function encode$
|
|
38112
|
+
const XML_NODE_NAME$3 = "w:sdt";
|
|
38113
|
+
const SD_NODE_NAME$3 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
|
|
38114
|
+
const validXmlAttributes$3 = [];
|
|
38115
|
+
function encode$a(params2) {
|
|
38116
38116
|
const nodes = params2.nodes;
|
|
38117
38117
|
const node = nodes[0];
|
|
38118
38118
|
const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
|
|
@@ -38122,7 +38122,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38122
38122
|
const result = handler2(params2);
|
|
38123
38123
|
return result;
|
|
38124
38124
|
}
|
|
38125
|
-
function decode$
|
|
38125
|
+
function decode$a(params2) {
|
|
38126
38126
|
const { node } = params2;
|
|
38127
38127
|
if (!node || !node.type) {
|
|
38128
38128
|
return null;
|
|
@@ -38138,85 +38138,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38138
38138
|
const result = decoder();
|
|
38139
38139
|
return result;
|
|
38140
38140
|
}
|
|
38141
|
-
const config$
|
|
38142
|
-
xmlName: XML_NODE_NAME$
|
|
38143
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
38141
|
+
const config$3 = {
|
|
38142
|
+
xmlName: XML_NODE_NAME$3,
|
|
38143
|
+
sdNodeOrKeyName: SD_NODE_NAME$3,
|
|
38144
38144
|
type: NodeTranslator.translatorTypes.NODE,
|
|
38145
|
-
encode: encode$
|
|
38146
|
-
decode: decode$
|
|
38147
|
-
attributes: validXmlAttributes$
|
|
38145
|
+
encode: encode$a,
|
|
38146
|
+
decode: decode$a,
|
|
38147
|
+
attributes: validXmlAttributes$3
|
|
38148
38148
|
};
|
|
38149
|
-
const translator$
|
|
38150
|
-
const encode$
|
|
38149
|
+
const translator$3 = NodeTranslator.from(config$3);
|
|
38150
|
+
const encode$9 = (attributes) => {
|
|
38151
38151
|
return attributes["w:id"];
|
|
38152
38152
|
};
|
|
38153
|
-
const decode$
|
|
38153
|
+
const decode$9 = (attrs) => {
|
|
38154
38154
|
return attrs.id;
|
|
38155
38155
|
};
|
|
38156
38156
|
const attrConfig$6 = Object.freeze({
|
|
38157
38157
|
xmlName: "w:id",
|
|
38158
38158
|
sdName: "id",
|
|
38159
|
-
encode: encode$
|
|
38160
|
-
decode: decode$
|
|
38159
|
+
encode: encode$9,
|
|
38160
|
+
decode: decode$9
|
|
38161
38161
|
});
|
|
38162
|
-
const encode$
|
|
38162
|
+
const encode$8 = (attributes) => {
|
|
38163
38163
|
return attributes["w:name"];
|
|
38164
38164
|
};
|
|
38165
|
-
const decode$
|
|
38165
|
+
const decode$8 = (attrs) => {
|
|
38166
38166
|
return attrs.name;
|
|
38167
38167
|
};
|
|
38168
38168
|
const attrConfig$5 = Object.freeze({
|
|
38169
38169
|
xmlName: "w:name",
|
|
38170
38170
|
sdName: "name",
|
|
38171
|
-
encode: encode$
|
|
38172
|
-
decode: decode$
|
|
38171
|
+
encode: encode$8,
|
|
38172
|
+
decode: decode$8
|
|
38173
38173
|
});
|
|
38174
|
-
const encode$
|
|
38174
|
+
const encode$7 = (attributes) => {
|
|
38175
38175
|
return attributes["w:colFirst"];
|
|
38176
38176
|
};
|
|
38177
|
-
const decode$
|
|
38177
|
+
const decode$7 = (attrs) => {
|
|
38178
38178
|
return attrs.colFirst;
|
|
38179
38179
|
};
|
|
38180
38180
|
const attrConfig$4 = Object.freeze({
|
|
38181
38181
|
xmlName: "w:colFirst",
|
|
38182
38182
|
sdName: "colFirst",
|
|
38183
|
-
encode: encode$
|
|
38184
|
-
decode: decode$
|
|
38183
|
+
encode: encode$7,
|
|
38184
|
+
decode: decode$7
|
|
38185
38185
|
});
|
|
38186
|
-
const encode$
|
|
38186
|
+
const encode$6 = (attributes) => {
|
|
38187
38187
|
return attributes["w:colLast"];
|
|
38188
38188
|
};
|
|
38189
|
-
const decode$
|
|
38189
|
+
const decode$6 = (attrs) => {
|
|
38190
38190
|
return attrs.colLast;
|
|
38191
38191
|
};
|
|
38192
38192
|
const attrConfig$3 = Object.freeze({
|
|
38193
38193
|
xmlName: "w:colLast",
|
|
38194
38194
|
sdName: "colLast",
|
|
38195
|
-
encode: encode$
|
|
38196
|
-
decode: decode$
|
|
38195
|
+
encode: encode$6,
|
|
38196
|
+
decode: decode$6
|
|
38197
38197
|
});
|
|
38198
|
-
const encode$
|
|
38198
|
+
const encode$5 = (attributes) => {
|
|
38199
38199
|
return attributes["w:displacedByCustomXml"];
|
|
38200
38200
|
};
|
|
38201
|
-
const decode$
|
|
38201
|
+
const decode$5 = (attrs) => {
|
|
38202
38202
|
return attrs.displacedByCustomXml;
|
|
38203
38203
|
};
|
|
38204
38204
|
const attrConfig$2 = Object.freeze({
|
|
38205
38205
|
xmlName: "w:displacedByCustomXml",
|
|
38206
38206
|
sdName: "displacedByCustomXml",
|
|
38207
|
-
encode: encode$
|
|
38208
|
-
decode: decode$
|
|
38207
|
+
encode: encode$5,
|
|
38208
|
+
decode: decode$5
|
|
38209
38209
|
});
|
|
38210
|
-
const validXmlAttributes$
|
|
38211
|
-
const XML_NODE_NAME$
|
|
38212
|
-
const SD_NODE_NAME$
|
|
38213
|
-
const encode$
|
|
38210
|
+
const validXmlAttributes$2 = [attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3, attrConfig$2];
|
|
38211
|
+
const XML_NODE_NAME$2 = "w:bookmarkStart";
|
|
38212
|
+
const SD_NODE_NAME$2 = "bookmarkStart";
|
|
38213
|
+
const encode$4 = (params2, encodedAttrs = {}) => {
|
|
38214
38214
|
return {
|
|
38215
38215
|
type: "bookmarkStart",
|
|
38216
38216
|
attrs: encodedAttrs
|
|
38217
38217
|
};
|
|
38218
38218
|
};
|
|
38219
|
-
const decode$
|
|
38219
|
+
const decode$4 = (params2, decodedAttrs = {}) => {
|
|
38220
38220
|
const result = {
|
|
38221
38221
|
name: "w:bookmarkStart",
|
|
38222
38222
|
elements: []
|
|
@@ -38226,49 +38226,49 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38226
38226
|
}
|
|
38227
38227
|
return result;
|
|
38228
38228
|
};
|
|
38229
|
-
const config$
|
|
38230
|
-
xmlName: XML_NODE_NAME$
|
|
38231
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
38229
|
+
const config$2 = {
|
|
38230
|
+
xmlName: XML_NODE_NAME$2,
|
|
38231
|
+
sdNodeOrKeyName: SD_NODE_NAME$2,
|
|
38232
38232
|
type: NodeTranslator.translatorTypes.NODE,
|
|
38233
|
-
encode: encode$
|
|
38234
|
-
decode: decode$
|
|
38235
|
-
attributes: validXmlAttributes$
|
|
38233
|
+
encode: encode$4,
|
|
38234
|
+
decode: decode$4,
|
|
38235
|
+
attributes: validXmlAttributes$2
|
|
38236
38236
|
};
|
|
38237
|
-
const translator$
|
|
38238
|
-
const encode$
|
|
38237
|
+
const translator$2 = NodeTranslator.from(config$2);
|
|
38238
|
+
const encode$3 = (attributes) => {
|
|
38239
38239
|
return attributes["w:id"];
|
|
38240
38240
|
};
|
|
38241
|
-
const decode$
|
|
38241
|
+
const decode$3 = (attrs) => {
|
|
38242
38242
|
return attrs.id;
|
|
38243
38243
|
};
|
|
38244
38244
|
const attrConfig$1 = Object.freeze({
|
|
38245
38245
|
xmlName: "w:id",
|
|
38246
38246
|
sdName: "id",
|
|
38247
|
-
encode: encode$
|
|
38248
|
-
decode: decode$
|
|
38247
|
+
encode: encode$3,
|
|
38248
|
+
decode: decode$3
|
|
38249
38249
|
});
|
|
38250
|
-
const encode$
|
|
38250
|
+
const encode$2 = (attributes) => {
|
|
38251
38251
|
return attributes["w:displacedByCustomXml"];
|
|
38252
38252
|
};
|
|
38253
|
-
const decode$
|
|
38253
|
+
const decode$2 = (attrs) => {
|
|
38254
38254
|
return attrs.displacedByCustomXml;
|
|
38255
38255
|
};
|
|
38256
38256
|
const attrConfig = Object.freeze({
|
|
38257
38257
|
xmlName: "w:displacedByCustomXml",
|
|
38258
38258
|
sdName: "displacedByCustomXml",
|
|
38259
|
-
encode: encode$
|
|
38260
|
-
decode: decode$
|
|
38259
|
+
encode: encode$2,
|
|
38260
|
+
decode: decode$2
|
|
38261
38261
|
});
|
|
38262
|
-
const validXmlAttributes = [attrConfig$1, attrConfig];
|
|
38263
|
-
const XML_NODE_NAME = "w:bookmarkEnd";
|
|
38264
|
-
const SD_NODE_NAME = "bookmarkEnd";
|
|
38265
|
-
const encode$
|
|
38262
|
+
const validXmlAttributes$1 = [attrConfig$1, attrConfig];
|
|
38263
|
+
const XML_NODE_NAME$1 = "w:bookmarkEnd";
|
|
38264
|
+
const SD_NODE_NAME$1 = "bookmarkEnd";
|
|
38265
|
+
const encode$1 = (params2, encodedAttrs = {}) => {
|
|
38266
38266
|
return {
|
|
38267
38267
|
type: "bookmarkEnd",
|
|
38268
38268
|
attrs: encodedAttrs
|
|
38269
38269
|
};
|
|
38270
38270
|
};
|
|
38271
|
-
const decode = (params2, decodedAttrs = {}) => {
|
|
38271
|
+
const decode$1 = (params2, decodedAttrs = {}) => {
|
|
38272
38272
|
const result = {
|
|
38273
38273
|
name: "w:bookmarkEnd",
|
|
38274
38274
|
elements: []
|
|
@@ -38278,11 +38278,60 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38278
38278
|
}
|
|
38279
38279
|
return result;
|
|
38280
38280
|
};
|
|
38281
|
+
const config$1 = {
|
|
38282
|
+
xmlName: XML_NODE_NAME$1,
|
|
38283
|
+
sdNodeOrKeyName: SD_NODE_NAME$1,
|
|
38284
|
+
type: NodeTranslator.translatorTypes.NODE,
|
|
38285
|
+
encode: encode$1,
|
|
38286
|
+
decode: decode$1,
|
|
38287
|
+
attributes: validXmlAttributes$1
|
|
38288
|
+
};
|
|
38289
|
+
const translator$1 = NodeTranslator.from(config$1);
|
|
38290
|
+
const XML_NODE_NAME = "mc:AlternateContent";
|
|
38291
|
+
const SD_NODE_NAME = [];
|
|
38292
|
+
const validXmlAttributes = [];
|
|
38293
|
+
function encode$19(params2) {
|
|
38294
|
+
const { nodeListHandler } = params2;
|
|
38295
|
+
const { node } = params2.extraParams;
|
|
38296
|
+
if (!node || !node.type) {
|
|
38297
|
+
return null;
|
|
38298
|
+
}
|
|
38299
|
+
const allowedNamespaces = ["wps", "wp14", "w14", "w15"];
|
|
38300
|
+
const wpsNode = node.elements.find(
|
|
38301
|
+
(el) => el.name === "mc:Choice" && allowedNamespaces.includes(el.attributes["Requires"])
|
|
38302
|
+
);
|
|
38303
|
+
if (!wpsNode) {
|
|
38304
|
+
return null;
|
|
38305
|
+
}
|
|
38306
|
+
const contents = wpsNode.elements;
|
|
38307
|
+
return nodeListHandler.handler({
|
|
38308
|
+
...params2,
|
|
38309
|
+
nodes: contents,
|
|
38310
|
+
path: [...params2.path || [], wpsNode]
|
|
38311
|
+
});
|
|
38312
|
+
}
|
|
38313
|
+
function decode(params2) {
|
|
38314
|
+
const { node } = params2;
|
|
38315
|
+
const { drawingContent } = node.attrs;
|
|
38316
|
+
const drawing = {
|
|
38317
|
+
name: "w:drawing",
|
|
38318
|
+
elements: [...drawingContent ? [...drawingContent.elements || []] : []]
|
|
38319
|
+
};
|
|
38320
|
+
const choice = {
|
|
38321
|
+
name: "mc:Choice",
|
|
38322
|
+
attributes: { Requires: "wps" },
|
|
38323
|
+
elements: [drawing]
|
|
38324
|
+
};
|
|
38325
|
+
return {
|
|
38326
|
+
name: "mc:AlternateContent",
|
|
38327
|
+
elements: [choice]
|
|
38328
|
+
};
|
|
38329
|
+
}
|
|
38281
38330
|
const config = {
|
|
38282
38331
|
xmlName: XML_NODE_NAME,
|
|
38283
38332
|
sdNodeOrKeyName: SD_NODE_NAME,
|
|
38284
38333
|
type: NodeTranslator.translatorTypes.NODE,
|
|
38285
|
-
encode: encode$
|
|
38334
|
+
encode: encode$19,
|
|
38286
38335
|
decode,
|
|
38287
38336
|
attributes: validXmlAttributes
|
|
38288
38337
|
};
|
|
@@ -38301,30 +38350,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38301
38350
|
doc: translateDocumentNode,
|
|
38302
38351
|
body: translateBodyNode,
|
|
38303
38352
|
heading: translateHeadingNode,
|
|
38304
|
-
paragraph: translator$
|
|
38305
|
-
run: translator$
|
|
38353
|
+
paragraph: translator$13,
|
|
38354
|
+
run: translator$U,
|
|
38306
38355
|
text: translateTextNode,
|
|
38307
38356
|
bulletList: translateList,
|
|
38308
38357
|
orderedList: translateList,
|
|
38309
|
-
lineBreak: translator$
|
|
38310
|
-
table: translator$
|
|
38311
|
-
tableRow: translator$
|
|
38312
|
-
tableCell: translator$
|
|
38313
|
-
bookmarkStart: translator$
|
|
38314
|
-
bookmarkEnd: translator,
|
|
38315
|
-
fieldAnnotation: translator$
|
|
38316
|
-
tab: translator$
|
|
38317
|
-
image: translator$
|
|
38318
|
-
hardBreak: translator$
|
|
38358
|
+
lineBreak: translator$16,
|
|
38359
|
+
table: translator$9,
|
|
38360
|
+
tableRow: translator$G,
|
|
38361
|
+
tableCell: translator$8,
|
|
38362
|
+
bookmarkStart: translator$2,
|
|
38363
|
+
bookmarkEnd: translator$1,
|
|
38364
|
+
fieldAnnotation: translator$3,
|
|
38365
|
+
tab: translator$14,
|
|
38366
|
+
image: translator$4,
|
|
38367
|
+
hardBreak: translator$16,
|
|
38319
38368
|
commentRangeStart: () => translateCommentNode(params2, "Start"),
|
|
38320
38369
|
commentRangeEnd: () => translateCommentNode(params2, "End"),
|
|
38321
38370
|
commentReference: () => null,
|
|
38322
38371
|
shapeContainer: translateShapeContainer,
|
|
38323
38372
|
shapeTextbox: translateShapeTextbox,
|
|
38324
38373
|
contentBlock: translateContentBlock,
|
|
38325
|
-
structuredContent: translator$
|
|
38326
|
-
structuredContentBlock: translator$
|
|
38327
|
-
documentSection: translator$
|
|
38374
|
+
structuredContent: translator$3,
|
|
38375
|
+
structuredContentBlock: translator$3,
|
|
38376
|
+
documentSection: translator$3,
|
|
38328
38377
|
"page-number": translatePageNumberNode,
|
|
38329
38378
|
"total-page-number": translateTotalPageNumberNode
|
|
38330
38379
|
};
|
|
@@ -38663,7 +38712,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38663
38712
|
const isTrackedNode = node.marks?.some((m2) => trackedMarks.includes(m2.type));
|
|
38664
38713
|
if (isTrackedNode) return translateTrackedNode(params2);
|
|
38665
38714
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
38666
|
-
if (isLinkNode) return translator$
|
|
38715
|
+
if (isLinkNode) return translator$7.decode(params2);
|
|
38667
38716
|
const { text, marks = [] } = node;
|
|
38668
38717
|
return getTextNodeForExport(text, marks, params2);
|
|
38669
38718
|
}
|
|
@@ -38969,7 +39018,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
38969
39018
|
markElement.type = "element";
|
|
38970
39019
|
break;
|
|
38971
39020
|
case "underline": {
|
|
38972
|
-
const translated = translator
|
|
39021
|
+
const translated = translator$10.decode({
|
|
38973
39022
|
node: {
|
|
38974
39023
|
attrs: {
|
|
38975
39024
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -39033,7 +39082,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39033
39082
|
break;
|
|
39034
39083
|
case "highlight": {
|
|
39035
39084
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
39036
|
-
const translated = translator$
|
|
39085
|
+
const translated = translator$15.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
39037
39086
|
return translated || {};
|
|
39038
39087
|
}
|
|
39039
39088
|
}
|
|
@@ -39089,23 +39138,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39089
39138
|
}
|
|
39090
39139
|
function translateContentBlock(params2) {
|
|
39091
39140
|
const { node } = params2;
|
|
39092
|
-
const {
|
|
39141
|
+
const { vmlAttributes, horizontalRule } = node.attrs;
|
|
39093
39142
|
if (vmlAttributes || horizontalRule) {
|
|
39094
39143
|
return translateVRectContentBlock(params2);
|
|
39095
39144
|
}
|
|
39096
|
-
const
|
|
39097
|
-
name: "w:drawing",
|
|
39098
|
-
elements: [...drawingContent ? [...drawingContent.elements || []] : []]
|
|
39099
|
-
};
|
|
39100
|
-
const choice = {
|
|
39101
|
-
name: "mc:Choice",
|
|
39102
|
-
attributes: { Requires: "wps" },
|
|
39103
|
-
elements: [drawing]
|
|
39104
|
-
};
|
|
39105
|
-
const alternateContent = {
|
|
39106
|
-
name: "mc:AlternateContent",
|
|
39107
|
-
elements: [choice]
|
|
39108
|
-
};
|
|
39145
|
+
const alternateContent = translator.decode(params2);
|
|
39109
39146
|
return wrapTextInRun(alternateContent);
|
|
39110
39147
|
}
|
|
39111
39148
|
function translateVRectContentBlock(params2) {
|
|
@@ -39309,7 +39346,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39309
39346
|
if (mainNode.name === "w:drawing") node = mainNode;
|
|
39310
39347
|
else node = mainNode.elements.find((el) => el.name === "w:drawing");
|
|
39311
39348
|
if (!node) return { nodes: [], consumed: 0 };
|
|
39312
|
-
const schemaNode = translator$
|
|
39349
|
+
const schemaNode = translator$4.encode(params2);
|
|
39313
39350
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
39314
39351
|
return { nodes: newNodes, consumed: 1 };
|
|
39315
39352
|
};
|
|
@@ -39411,8 +39448,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39411
39448
|
handlerName: "trackChangeNodeHandler",
|
|
39412
39449
|
handler: handleTrackChangeNode
|
|
39413
39450
|
};
|
|
39414
|
-
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$
|
|
39415
|
-
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$
|
|
39451
|
+
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$7);
|
|
39452
|
+
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$U);
|
|
39416
39453
|
const handleTextNode = (params2) => {
|
|
39417
39454
|
const { nodes, insideTrackChange } = params2;
|
|
39418
39455
|
if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
|
|
@@ -39453,7 +39490,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39453
39490
|
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
39454
39491
|
return { nodes: [], consumed: 0 };
|
|
39455
39492
|
}
|
|
39456
|
-
const schemaNode = translator$
|
|
39493
|
+
const schemaNode = translator$13.encode(params2);
|
|
39457
39494
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
39458
39495
|
return { nodes: newNodes, consumed: 1 };
|
|
39459
39496
|
};
|
|
@@ -39466,7 +39503,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39466
39503
|
if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
|
|
39467
39504
|
return { nodes: [], consumed: 0 };
|
|
39468
39505
|
}
|
|
39469
|
-
const result = translator$
|
|
39506
|
+
const result = translator$3.encode(params2);
|
|
39470
39507
|
if (!result) {
|
|
39471
39508
|
return { nodes: [], consumed: 0 };
|
|
39472
39509
|
}
|
|
@@ -39556,7 +39593,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39556
39593
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
39557
39594
|
return { nodes: [], consumed: 0 };
|
|
39558
39595
|
}
|
|
39559
|
-
const result = translator$
|
|
39596
|
+
const result = translator$16.encode(params2);
|
|
39560
39597
|
if (!result) return { nodes: [], consumed: 0 };
|
|
39561
39598
|
return {
|
|
39562
39599
|
nodes: [result],
|
|
@@ -39628,7 +39665,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39628
39665
|
if (isCustomMarkBookmark(nodes[0], params2.editor)) {
|
|
39629
39666
|
return handleBookmarkNode(params2);
|
|
39630
39667
|
}
|
|
39631
|
-
const node = translator$
|
|
39668
|
+
const node = translator$2.encode(params2);
|
|
39632
39669
|
if (!node) return { nodes: [], consumed: 0 };
|
|
39633
39670
|
return { nodes: [node], consumed: 1 };
|
|
39634
39671
|
};
|
|
@@ -39660,7 +39697,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39660
39697
|
if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
|
|
39661
39698
|
return { nodes: [], consumed: 0 };
|
|
39662
39699
|
}
|
|
39663
|
-
const node = translator.encode(params2);
|
|
39700
|
+
const node = translator$1.encode(params2);
|
|
39664
39701
|
if (!node) return { nodes: [], consumed: 0 };
|
|
39665
39702
|
return { nodes: [node], consumed: 1 };
|
|
39666
39703
|
};
|
|
@@ -39668,32 +39705,86 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
39668
39705
|
handlerName: "w:bookmarkEndTranslator",
|
|
39669
39706
|
handler: handleBookmarkEndNode
|
|
39670
39707
|
};
|
|
39708
|
+
const ALTERNATE_CONTENT_NODE = "mc:AlternateContent";
|
|
39709
|
+
const SUPPORTED_REQUIRES = /* @__PURE__ */ new Set([
|
|
39710
|
+
"wps",
|
|
39711
|
+
"wp14",
|
|
39712
|
+
"w14",
|
|
39713
|
+
"w15",
|
|
39714
|
+
"w16",
|
|
39715
|
+
"w16cex",
|
|
39716
|
+
"w16cid",
|
|
39717
|
+
"w16du",
|
|
39718
|
+
"w16sdtdh",
|
|
39719
|
+
"w16sdtfl",
|
|
39720
|
+
"w16se"
|
|
39721
|
+
]);
|
|
39722
|
+
const skipHandlerResponse = { nodes: [], consumed: 0 };
|
|
39723
|
+
const isAlternateContentNode = (node) => node?.name === ALTERNATE_CONTENT_NODE;
|
|
39724
|
+
const isSupportedChoice = (choice) => {
|
|
39725
|
+
if (!choice?.attributes) return false;
|
|
39726
|
+
const requires = choice.attributes.Requires || choice.attributes.requires;
|
|
39727
|
+
if (!requires) return false;
|
|
39728
|
+
return requires.split(/\s+/).filter(Boolean).some((namespace2) => SUPPORTED_REQUIRES.has(namespace2));
|
|
39729
|
+
};
|
|
39730
|
+
const resolveAlternateContentElements = (alternateContent) => {
|
|
39731
|
+
if (!alternateContent?.elements?.length) return null;
|
|
39732
|
+
const choices = alternateContent.elements.filter((el) => el.name === "mc:Choice");
|
|
39733
|
+
const fallback = alternateContent.elements.find((el) => el.name === "mc:Fallback");
|
|
39734
|
+
const supportedChoice = choices.find(isSupportedChoice);
|
|
39735
|
+
const selectedElements = supportedChoice?.elements || fallback?.elements || choices[0]?.elements;
|
|
39736
|
+
if (!selectedElements) return null;
|
|
39737
|
+
return carbonCopy(selectedElements);
|
|
39738
|
+
};
|
|
39739
|
+
const buildNodeWithoutAlternateContent = (node) => {
|
|
39740
|
+
const { elements } = node || {};
|
|
39741
|
+
if (!elements?.length) return null;
|
|
39742
|
+
let replaced = false;
|
|
39743
|
+
const updatedElements = [];
|
|
39744
|
+
elements.forEach((element) => {
|
|
39745
|
+
if (isAlternateContentNode(element)) {
|
|
39746
|
+
const resolved = resolveAlternateContentElements(element);
|
|
39747
|
+
if (resolved) {
|
|
39748
|
+
updatedElements.push(...resolved);
|
|
39749
|
+
replaced = true;
|
|
39750
|
+
return;
|
|
39751
|
+
}
|
|
39752
|
+
updatedElements.push(carbonCopy(element));
|
|
39753
|
+
return;
|
|
39754
|
+
}
|
|
39755
|
+
updatedElements.push(carbonCopy(element));
|
|
39756
|
+
});
|
|
39757
|
+
if (!replaced) return null;
|
|
39758
|
+
const clone = carbonCopy(node);
|
|
39759
|
+
clone.elements = updatedElements;
|
|
39760
|
+
return clone;
|
|
39761
|
+
};
|
|
39671
39762
|
const handleAlternateChoice = (params2) => {
|
|
39672
|
-
const skipHandlerResponse = { nodes: [], consumed: 0 };
|
|
39673
39763
|
const { nodes, nodeListHandler } = params2;
|
|
39674
|
-
if (nodes
|
|
39764
|
+
if (!nodes?.length) {
|
|
39675
39765
|
return skipHandlerResponse;
|
|
39676
39766
|
}
|
|
39677
|
-
const
|
|
39678
|
-
|
|
39679
|
-
|
|
39680
|
-
|
|
39681
|
-
|
|
39767
|
+
const [currentNode] = nodes;
|
|
39768
|
+
if (isAlternateContentNode(currentNode)) {
|
|
39769
|
+
const resolvedElements = resolveAlternateContentElements(currentNode);
|
|
39770
|
+
if (!resolvedElements) {
|
|
39771
|
+
return skipHandlerResponse;
|
|
39772
|
+
}
|
|
39773
|
+
const result2 = nodeListHandler.handler({
|
|
39774
|
+
...params2,
|
|
39775
|
+
nodes: resolvedElements,
|
|
39776
|
+
path: [...params2.path || [], currentNode]
|
|
39777
|
+
});
|
|
39778
|
+
return { nodes: result2, consumed: 1 };
|
|
39682
39779
|
}
|
|
39683
|
-
const
|
|
39684
|
-
|
|
39685
|
-
const allowedNamespaces = ["wps", "wp14", "w14", "w15"];
|
|
39686
|
-
const wpsNode = altChoiceNode.elements.find(
|
|
39687
|
-
(el) => el.name === "mc:Choice" && allowedNamespaces.includes(el.attributes["Requires"])
|
|
39688
|
-
);
|
|
39689
|
-
if (!wpsNode) {
|
|
39780
|
+
const sanitizedNode = buildNodeWithoutAlternateContent(currentNode);
|
|
39781
|
+
if (!sanitizedNode) {
|
|
39690
39782
|
return skipHandlerResponse;
|
|
39691
39783
|
}
|
|
39692
|
-
const contents = wpsNode.elements;
|
|
39693
39784
|
const result = nodeListHandler.handler({
|
|
39694
39785
|
...params2,
|
|
39695
|
-
nodes:
|
|
39696
|
-
path: [...params2.path || [],
|
|
39786
|
+
nodes: [sanitizedNode],
|
|
39787
|
+
path: [...params2.path || [], sanitizedNode]
|
|
39697
39788
|
});
|
|
39698
39789
|
return { nodes: result, consumed: 1 };
|
|
39699
39790
|
};
|
|
@@ -40272,7 +40363,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
40272
40363
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
40273
40364
|
return { nodes: [], consumed: 0 };
|
|
40274
40365
|
}
|
|
40275
|
-
const node = translator$
|
|
40366
|
+
const node = translator$14.encode(params2);
|
|
40276
40367
|
return { nodes: [node], consumed: 1 };
|
|
40277
40368
|
};
|
|
40278
40369
|
const tabNodeEntityHandler = {
|
|
@@ -55553,9 +55644,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
55553
55644
|
item.editor.view.dom.setAttribute("documentmode", documentMode);
|
|
55554
55645
|
});
|
|
55555
55646
|
if (isEditMode) {
|
|
55556
|
-
const pm =
|
|
55557
|
-
pm
|
|
55558
|
-
|
|
55647
|
+
const pm = editor.view?.dom;
|
|
55648
|
+
if (pm) {
|
|
55649
|
+
pm.classList.add("header-footer-edit");
|
|
55650
|
+
pm.setAttribute("aria-readonly", true);
|
|
55651
|
+
}
|
|
55559
55652
|
}
|
|
55560
55653
|
if (focusedSectionEditor) {
|
|
55561
55654
|
focusedSectionEditor.view.focus();
|
|
@@ -58167,7 +58260,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58167
58260
|
setDocumentMode(documentMode) {
|
|
58168
58261
|
let cleanedMode = documentMode?.toLowerCase() || "editing";
|
|
58169
58262
|
if (!this.extensionService || !this.state) return;
|
|
58170
|
-
const pm =
|
|
58263
|
+
const pm = this.view?.dom;
|
|
58171
58264
|
if (this.options.role === "viewer") cleanedMode = "viewing";
|
|
58172
58265
|
if (this.options.role === "suggester" && cleanedMode === "editing") cleanedMode = "suggesting";
|
|
58173
58266
|
if (cleanedMode === "viewing") {
|
|
@@ -59139,9 +59232,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
59139
59232
|
isEditMode: false,
|
|
59140
59233
|
documentMode: this.options.documentMode
|
|
59141
59234
|
});
|
|
59142
|
-
const pm =
|
|
59143
|
-
pm
|
|
59144
|
-
|
|
59235
|
+
const pm = this.view?.dom;
|
|
59236
|
+
if (pm) {
|
|
59237
|
+
pm.classList.remove("header-footer-edit");
|
|
59238
|
+
pm.setAttribute("aria-readonly", false);
|
|
59239
|
+
}
|
|
59145
59240
|
}
|
|
59146
59241
|
setWordSelection(view, pos);
|
|
59147
59242
|
}
|
|
@@ -77076,6 +77171,45 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77076
77171
|
};
|
|
77077
77172
|
}
|
|
77078
77173
|
});
|
|
77174
|
+
let cachedShadowRootCtor;
|
|
77175
|
+
const getShadowRootCtor = () => {
|
|
77176
|
+
if (cachedShadowRootCtor === void 0) {
|
|
77177
|
+
const ctor = globalThis.ShadowRoot;
|
|
77178
|
+
cachedShadowRootCtor = typeof ctor === "function" ? ctor : null;
|
|
77179
|
+
}
|
|
77180
|
+
return cachedShadowRootCtor;
|
|
77181
|
+
};
|
|
77182
|
+
let cachedElementCtor;
|
|
77183
|
+
const getElementCtor = () => {
|
|
77184
|
+
if (cachedElementCtor === void 0) {
|
|
77185
|
+
const ctor = globalThis.Element;
|
|
77186
|
+
cachedElementCtor = typeof ctor === "function" ? ctor : null;
|
|
77187
|
+
}
|
|
77188
|
+
return cachedElementCtor;
|
|
77189
|
+
};
|
|
77190
|
+
const queryWithinRoot = (domNode, selector) => {
|
|
77191
|
+
const shadowRoot = domNode?.shadowRoot;
|
|
77192
|
+
if (shadowRoot && typeof shadowRoot.querySelector === "function") {
|
|
77193
|
+
return shadowRoot.querySelector(selector);
|
|
77194
|
+
}
|
|
77195
|
+
const rawRoot = domNode?.getRootNode?.();
|
|
77196
|
+
const ShadowRootCtor = getShadowRootCtor();
|
|
77197
|
+
const isShadowRoot2 = !!ShadowRootCtor && rawRoot instanceof ShadowRootCtor;
|
|
77198
|
+
if (isShadowRoot2 && typeof rawRoot.querySelector === "function") {
|
|
77199
|
+
return rawRoot.querySelector(selector);
|
|
77200
|
+
}
|
|
77201
|
+
if (domNode && typeof domNode.querySelector === "function") {
|
|
77202
|
+
const localMatch = domNode.querySelector(selector);
|
|
77203
|
+
if (localMatch) return localMatch;
|
|
77204
|
+
}
|
|
77205
|
+
return typeof document !== "undefined" ? document.querySelector(selector) : null;
|
|
77206
|
+
};
|
|
77207
|
+
const findInEventPath = (event, selector) => {
|
|
77208
|
+
if (!event || !selector) return void 0;
|
|
77209
|
+
const path = typeof event.composedPath === "function" ? event.composedPath() : [];
|
|
77210
|
+
const ElementCtor = getElementCtor();
|
|
77211
|
+
return path.find((node) => ElementCtor && node instanceof ElementCtor && node.matches(selector));
|
|
77212
|
+
};
|
|
77079
77213
|
const NodeResizerKey = new PluginKey("node-resizer");
|
|
77080
77214
|
const nodeResizer = (nodeNames = ["image"], editor) => {
|
|
77081
77215
|
let resizeState = {
|
|
@@ -77130,16 +77264,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77130
77264
|
view(view) {
|
|
77131
77265
|
editorView = view;
|
|
77132
77266
|
globalClickHandler = (event) => {
|
|
77133
|
-
|
|
77267
|
+
const wrapperInPath = findInEventPath(event, ".sd-editor-resizable-wrapper");
|
|
77268
|
+
const containerInPath = findInEventPath(event, ".sd-editor-resize-container");
|
|
77269
|
+
if (!wrapperInPath && !containerInPath) {
|
|
77134
77270
|
hideResizeHandles();
|
|
77135
77271
|
}
|
|
77136
77272
|
};
|
|
77137
77273
|
document.addEventListener("click", globalClickHandler);
|
|
77138
77274
|
globalMousedownHandler = (event) => {
|
|
77139
|
-
|
|
77275
|
+
const handle = findInEventPath(event, ".sd-editor-resize-handle");
|
|
77276
|
+
if (handle) {
|
|
77140
77277
|
event.preventDefault();
|
|
77141
77278
|
event.stopPropagation();
|
|
77142
|
-
startResize(editorView, event,
|
|
77279
|
+
startResize(editorView, event, handle);
|
|
77143
77280
|
return true;
|
|
77144
77281
|
}
|
|
77145
77282
|
};
|
|
@@ -77156,7 +77293,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
77156
77293
|
const prevSelection = prevState.selection;
|
|
77157
77294
|
if (selection.from !== prevSelection.from || selection.to !== prevSelection.to) {
|
|
77158
77295
|
setTimeout(() => {
|
|
77159
|
-
const selectedResizableWrapper =
|
|
77296
|
+
const selectedResizableWrapper = queryWithinRoot(editorView?.dom, ".sd-editor-resizable-wrapper");
|
|
77160
77297
|
if (selectedResizableWrapper) {
|
|
77161
77298
|
showResizeHandles(view2, selectedResizableWrapper);
|
|
77162
77299
|
} else {
|
|
@@ -87269,6 +87406,7 @@ ${style2}
|
|
|
87269
87406
|
const toolbarItemRefs = ref$1([]);
|
|
87270
87407
|
const props = __props;
|
|
87271
87408
|
const currentItem = ref$1(null);
|
|
87409
|
+
const { proxy } = getCurrentInstance();
|
|
87272
87410
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode$1();
|
|
87273
87411
|
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
87274
87412
|
const styleMap = {
|
|
@@ -87367,10 +87505,8 @@ ${style2}
|
|
|
87367
87505
|
nextButtonGroup.setAttribute("tabindex", "0");
|
|
87368
87506
|
nextButtonGroup.focus();
|
|
87369
87507
|
} else {
|
|
87370
|
-
const
|
|
87371
|
-
|
|
87372
|
-
editor.focus();
|
|
87373
|
-
}
|
|
87508
|
+
const editorDom = proxy?.$toolbar?.activeEditor?.view?.dom;
|
|
87509
|
+
editorDom?.focus();
|
|
87374
87510
|
}
|
|
87375
87511
|
};
|
|
87376
87512
|
const moveToPreviousButtonGroup = (e) => {
|
|
@@ -87516,7 +87652,7 @@ ${style2}
|
|
|
87516
87652
|
};
|
|
87517
87653
|
}
|
|
87518
87654
|
};
|
|
87519
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$2, [["__scopeId", "data-v-
|
|
87655
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$2, [["__scopeId", "data-v-c1b3551b"]]);
|
|
87520
87656
|
const _sfc_main$k = {
|
|
87521
87657
|
__name: "Toolbar",
|
|
87522
87658
|
emits: ["command", "toggle", "select"],
|
|
@@ -91267,6 +91403,115 @@ ${style2}
|
|
|
91267
91403
|
this.updateToolbarState();
|
|
91268
91404
|
}
|
|
91269
91405
|
};
|
|
91406
|
+
const onMarginClickCursorChange = (event, editor) => {
|
|
91407
|
+
const y2 = event.clientY;
|
|
91408
|
+
const x = event.clientX;
|
|
91409
|
+
const { view } = editor;
|
|
91410
|
+
const editorRect = view.dom.getBoundingClientRect();
|
|
91411
|
+
let coords = {
|
|
91412
|
+
left: 0,
|
|
91413
|
+
top: y2
|
|
91414
|
+
};
|
|
91415
|
+
let isRightMargin = false;
|
|
91416
|
+
if (x > editorRect.right) {
|
|
91417
|
+
coords.left = editorRect.left + editorRect.width - 1;
|
|
91418
|
+
isRightMargin = true;
|
|
91419
|
+
} else if (x < editorRect.left) {
|
|
91420
|
+
coords.left = editorRect.left;
|
|
91421
|
+
}
|
|
91422
|
+
const pos = view.posAtCoords(coords)?.pos;
|
|
91423
|
+
if (pos) {
|
|
91424
|
+
let cursorPos = pos;
|
|
91425
|
+
if (isRightMargin) {
|
|
91426
|
+
const $pos = view.state.doc.resolve(pos);
|
|
91427
|
+
const charOffset = $pos.textOffset;
|
|
91428
|
+
const node = view.state.doc.nodeAt(pos);
|
|
91429
|
+
const text = node?.text;
|
|
91430
|
+
const charAtPos = text?.charAt(charOffset);
|
|
91431
|
+
cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
|
|
91432
|
+
}
|
|
91433
|
+
const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
|
|
91434
|
+
view.dispatch(transaction);
|
|
91435
|
+
view.focus();
|
|
91436
|
+
}
|
|
91437
|
+
};
|
|
91438
|
+
const checkNodeSpecificClicks = (editor, event, popoverControls) => {
|
|
91439
|
+
if (!editor) return;
|
|
91440
|
+
if (selectionHasNodeOrMark(editor.view.state, "link", { requireEnds: true })) {
|
|
91441
|
+
popoverControls.component = LinkInput;
|
|
91442
|
+
popoverControls.position = {
|
|
91443
|
+
left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
|
|
91444
|
+
top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
|
|
91445
|
+
};
|
|
91446
|
+
popoverControls.props = {
|
|
91447
|
+
showInput: true
|
|
91448
|
+
};
|
|
91449
|
+
popoverControls.visible = true;
|
|
91450
|
+
}
|
|
91451
|
+
};
|
|
91452
|
+
function selectionHasNodeOrMark(state2, name, options = {}) {
|
|
91453
|
+
const { requireEnds = false } = options;
|
|
91454
|
+
const $from = state2.selection.$from;
|
|
91455
|
+
const $to = state2.selection.$to;
|
|
91456
|
+
if (requireEnds) {
|
|
91457
|
+
for (let d2 = $from.depth; d2 > 0; d2--) {
|
|
91458
|
+
if ($from.node(d2).type.name === name) {
|
|
91459
|
+
return true;
|
|
91460
|
+
}
|
|
91461
|
+
}
|
|
91462
|
+
for (let d2 = $to.depth; d2 > 0; d2--) {
|
|
91463
|
+
if ($to.node(d2).type.name === name) {
|
|
91464
|
+
return true;
|
|
91465
|
+
}
|
|
91466
|
+
}
|
|
91467
|
+
} else {
|
|
91468
|
+
for (let d2 = $from.depth; d2 > 0; d2--) {
|
|
91469
|
+
if ($from.node(d2).type.name === name) {
|
|
91470
|
+
return true;
|
|
91471
|
+
}
|
|
91472
|
+
}
|
|
91473
|
+
}
|
|
91474
|
+
const markType = state2.schema.marks[name];
|
|
91475
|
+
if (markType) {
|
|
91476
|
+
const { from: from2, to, empty: empty2 } = state2.selection;
|
|
91477
|
+
if (requireEnds) {
|
|
91478
|
+
const fromMarks = markType.isInSet($from.marks());
|
|
91479
|
+
const toMarks = markType.isInSet($to.marks());
|
|
91480
|
+
if (fromMarks || toMarks) {
|
|
91481
|
+
return true;
|
|
91482
|
+
}
|
|
91483
|
+
if (empty2 && markType.isInSet(state2.storedMarks || $from.marks())) {
|
|
91484
|
+
return true;
|
|
91485
|
+
}
|
|
91486
|
+
} else {
|
|
91487
|
+
if (empty2) {
|
|
91488
|
+
if (markType.isInSet(state2.storedMarks || $from.marks())) {
|
|
91489
|
+
return true;
|
|
91490
|
+
}
|
|
91491
|
+
} else {
|
|
91492
|
+
let hasMark = false;
|
|
91493
|
+
state2.doc.nodesBetween(from2, to, (node) => {
|
|
91494
|
+
if (markType.isInSet(node.marks)) {
|
|
91495
|
+
hasMark = true;
|
|
91496
|
+
return false;
|
|
91497
|
+
}
|
|
91498
|
+
});
|
|
91499
|
+
if (hasMark) return true;
|
|
91500
|
+
}
|
|
91501
|
+
}
|
|
91502
|
+
}
|
|
91503
|
+
return false;
|
|
91504
|
+
}
|
|
91505
|
+
function moveCursorToMouseEvent(event, editor) {
|
|
91506
|
+
const { view } = editor;
|
|
91507
|
+
const coords = { left: event.clientX, top: event.clientY };
|
|
91508
|
+
const pos = view.posAtCoords(coords)?.pos;
|
|
91509
|
+
if (typeof pos === "number") {
|
|
91510
|
+
const tr = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, pos));
|
|
91511
|
+
view.dispatch(tr);
|
|
91512
|
+
view.focus();
|
|
91513
|
+
}
|
|
91514
|
+
}
|
|
91270
91515
|
const ICONS = {
|
|
91271
91516
|
addRowBefore: plusIconSvg,
|
|
91272
91517
|
addRowAfter: plusIconSvg,
|
|
@@ -91466,6 +91711,30 @@ ${style2}
|
|
|
91466
91711
|
return baseProps;
|
|
91467
91712
|
}
|
|
91468
91713
|
};
|
|
91714
|
+
function normalizeClipboardContent(rawClipboardContent) {
|
|
91715
|
+
if (!rawClipboardContent) {
|
|
91716
|
+
return {
|
|
91717
|
+
html: null,
|
|
91718
|
+
text: null,
|
|
91719
|
+
hasContent: false,
|
|
91720
|
+
raw: null
|
|
91721
|
+
};
|
|
91722
|
+
}
|
|
91723
|
+
const html = typeof rawClipboardContent.html === "string" ? rawClipboardContent.html : null;
|
|
91724
|
+
const text = typeof rawClipboardContent.text === "string" ? rawClipboardContent.text : null;
|
|
91725
|
+
const hasHtml = !!html && html.trim().length > 0;
|
|
91726
|
+
const hasText = !!text && text.length > 0;
|
|
91727
|
+
const isObject2 = typeof rawClipboardContent === "object" && rawClipboardContent !== null;
|
|
91728
|
+
const fragmentSize = typeof rawClipboardContent.size === "number" ? rawClipboardContent.size : null;
|
|
91729
|
+
const nestedSize = isObject2 && rawClipboardContent.content && typeof rawClipboardContent.content.size === "number" ? rawClipboardContent.content.size : null;
|
|
91730
|
+
const hasFragmentContent = (fragmentSize ?? nestedSize ?? 0) > 0;
|
|
91731
|
+
return {
|
|
91732
|
+
html,
|
|
91733
|
+
text,
|
|
91734
|
+
hasContent: hasHtml || hasText || hasFragmentContent,
|
|
91735
|
+
raw: rawClipboardContent
|
|
91736
|
+
};
|
|
91737
|
+
}
|
|
91469
91738
|
async function getEditorContext(editor, event) {
|
|
91470
91739
|
const { view } = editor;
|
|
91471
91740
|
const { state: state2 } = view;
|
|
@@ -91481,123 +91750,144 @@ ${style2}
|
|
|
91481
91750
|
pos = from2;
|
|
91482
91751
|
node = state2.doc.nodeAt(pos);
|
|
91483
91752
|
}
|
|
91484
|
-
const
|
|
91753
|
+
const rawClipboardContent = await readFromClipboard(state2);
|
|
91754
|
+
const clipboardContent = normalizeClipboardContent(rawClipboardContent);
|
|
91755
|
+
const structureFromResolvedPos = pos !== null ? getStructureFromResolvedPos(state2, pos) : null;
|
|
91756
|
+
const isInTable2 = structureFromResolvedPos?.isInTable ?? selectionHasNodeOrMark(state2, "table", { requireEnds: true });
|
|
91757
|
+
const isInList = structureFromResolvedPos?.isInList ?? (selectionHasNodeOrMark(state2, "bulletList", { requireEnds: false }) || selectionHasNodeOrMark(state2, "orderedList", { requireEnds: false }));
|
|
91758
|
+
const isInSectionNode = structureFromResolvedPos?.isInSectionNode ?? selectionHasNodeOrMark(state2, "documentSection", { requireEnds: true });
|
|
91759
|
+
const currentNodeType = node?.type?.name || null;
|
|
91760
|
+
const activeMarks = [];
|
|
91761
|
+
if (event && pos !== null) {
|
|
91762
|
+
const $pos = state2.doc.resolve(pos);
|
|
91763
|
+
if ($pos.marks && typeof $pos.marks === "function") {
|
|
91764
|
+
$pos.marks().forEach((mark) => activeMarks.push(mark.type.name));
|
|
91765
|
+
}
|
|
91766
|
+
if (node && node.marks) {
|
|
91767
|
+
node.marks.forEach((mark) => activeMarks.push(mark.type.name));
|
|
91768
|
+
}
|
|
91769
|
+
} else {
|
|
91770
|
+
state2.storedMarks?.forEach((mark) => activeMarks.push(mark.type.name));
|
|
91771
|
+
state2.selection.$head.marks().forEach((mark) => activeMarks.push(mark.type.name));
|
|
91772
|
+
}
|
|
91773
|
+
const isTrackedChange = activeMarks.includes("trackInsert") || activeMarks.includes("trackDelete");
|
|
91774
|
+
let trackedChangeId = null;
|
|
91775
|
+
if (isTrackedChange && event && pos !== null) {
|
|
91776
|
+
const $pos = state2.doc.resolve(pos);
|
|
91777
|
+
const marksAtPos = $pos.marks();
|
|
91778
|
+
const trackedMark = marksAtPos.find((mark) => mark.type.name === "trackInsert" || mark.type.name === "trackDelete");
|
|
91779
|
+
if (trackedMark) {
|
|
91780
|
+
trackedChangeId = trackedMark.attrs.id;
|
|
91781
|
+
}
|
|
91782
|
+
}
|
|
91783
|
+
const cursorCoords = pos ? view.coordsAtPos(pos) : null;
|
|
91784
|
+
const cursorPosition = cursorCoords ? {
|
|
91785
|
+
x: cursorCoords.left,
|
|
91786
|
+
y: cursorCoords.top
|
|
91787
|
+
} : null;
|
|
91485
91788
|
return {
|
|
91486
|
-
|
|
91789
|
+
// Selection info
|
|
91487
91790
|
selectedText,
|
|
91791
|
+
hasSelection: !empty2,
|
|
91792
|
+
selectionStart: from2,
|
|
91793
|
+
selectionEnd: to,
|
|
91794
|
+
// Document structure
|
|
91795
|
+
isInTable: isInTable2,
|
|
91796
|
+
isInList,
|
|
91797
|
+
isInSectionNode,
|
|
91798
|
+
currentNodeType,
|
|
91799
|
+
activeMarks,
|
|
91800
|
+
// Document state
|
|
91801
|
+
isTrackedChange,
|
|
91802
|
+
trackedChangeId,
|
|
91803
|
+
documentMode: editor.options?.documentMode || "editing",
|
|
91804
|
+
canUndo: computeCanUndo(editor, state2),
|
|
91805
|
+
canRedo: computeCanRedo(editor, state2),
|
|
91806
|
+
isEditable: editor.isEditable,
|
|
91807
|
+
// Clipboard
|
|
91808
|
+
clipboardContent,
|
|
91809
|
+
// Position and trigger info
|
|
91810
|
+
cursorPosition,
|
|
91488
91811
|
pos,
|
|
91489
91812
|
node,
|
|
91490
91813
|
event,
|
|
91491
|
-
|
|
91814
|
+
// Editor reference for advanced use cases
|
|
91815
|
+
editor
|
|
91492
91816
|
};
|
|
91493
91817
|
}
|
|
91494
|
-
|
|
91495
|
-
|
|
91496
|
-
|
|
91497
|
-
|
|
91498
|
-
|
|
91499
|
-
|
|
91500
|
-
|
|
91501
|
-
|
|
91502
|
-
|
|
91503
|
-
|
|
91504
|
-
if (x > editorRect.right) {
|
|
91505
|
-
coords.left = editorRect.left + editorRect.width - 1;
|
|
91506
|
-
isRightMargin = true;
|
|
91507
|
-
} else if (x < editorRect.left) {
|
|
91508
|
-
coords.left = editorRect.left;
|
|
91818
|
+
function computeCanUndo(editor, state2) {
|
|
91819
|
+
if (typeof editor?.can === "function") {
|
|
91820
|
+
try {
|
|
91821
|
+
const can = editor.can();
|
|
91822
|
+
if (can && typeof can.undo === "function") {
|
|
91823
|
+
return !!can.undo();
|
|
91824
|
+
}
|
|
91825
|
+
} catch (error) {
|
|
91826
|
+
console.warn("[SlashMenu] Unable to determine undo availability via editor.can():", error);
|
|
91827
|
+
}
|
|
91509
91828
|
}
|
|
91510
|
-
|
|
91511
|
-
|
|
91512
|
-
|
|
91513
|
-
|
|
91514
|
-
|
|
91515
|
-
|
|
91516
|
-
const node = view.state.doc.nodeAt(pos);
|
|
91517
|
-
const text = node?.text;
|
|
91518
|
-
const charAtPos = text?.charAt(charOffset);
|
|
91519
|
-
cursorPos = node?.isText && charAtPos !== " " ? pos - 1 : pos;
|
|
91829
|
+
if (isCollaborationEnabled(editor)) {
|
|
91830
|
+
try {
|
|
91831
|
+
const undoManager = yUndoPluginKey.getState(state2)?.undoManager;
|
|
91832
|
+
return !!undoManager && undoManager.undoStack.length > 0;
|
|
91833
|
+
} catch (error) {
|
|
91834
|
+
console.warn("[SlashMenu] Unable to determine undo availability via y-prosemirror:", error);
|
|
91520
91835
|
}
|
|
91521
|
-
const transaction = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, cursorPos));
|
|
91522
|
-
view.dispatch(transaction);
|
|
91523
|
-
view.focus();
|
|
91524
91836
|
}
|
|
91525
|
-
|
|
91526
|
-
|
|
91527
|
-
|
|
91528
|
-
|
|
91529
|
-
|
|
91530
|
-
popoverControls.position = {
|
|
91531
|
-
left: `${event.clientX - editor.element.getBoundingClientRect().left}px`,
|
|
91532
|
-
top: `${event.clientY - editor.element.getBoundingClientRect().top + 15}px`
|
|
91533
|
-
};
|
|
91534
|
-
popoverControls.props = {
|
|
91535
|
-
showInput: true
|
|
91536
|
-
};
|
|
91537
|
-
popoverControls.visible = true;
|
|
91837
|
+
try {
|
|
91838
|
+
return undoDepth(state2) > 0;
|
|
91839
|
+
} catch (error) {
|
|
91840
|
+
console.warn("[SlashMenu] Unable to determine undo availability via history plugin:", error);
|
|
91841
|
+
return false;
|
|
91538
91842
|
}
|
|
91539
|
-
}
|
|
91540
|
-
function
|
|
91541
|
-
|
|
91542
|
-
|
|
91543
|
-
|
|
91544
|
-
|
|
91545
|
-
|
|
91546
|
-
if ($from.node(d2).type.name === name) {
|
|
91547
|
-
return true;
|
|
91548
|
-
}
|
|
91549
|
-
}
|
|
91550
|
-
for (let d2 = $to.depth; d2 > 0; d2--) {
|
|
91551
|
-
if ($to.node(d2).type.name === name) {
|
|
91552
|
-
return true;
|
|
91553
|
-
}
|
|
91554
|
-
}
|
|
91555
|
-
} else {
|
|
91556
|
-
for (let d2 = $from.depth; d2 > 0; d2--) {
|
|
91557
|
-
if ($from.node(d2).type.name === name) {
|
|
91558
|
-
return true;
|
|
91843
|
+
}
|
|
91844
|
+
function computeCanRedo(editor, state2) {
|
|
91845
|
+
if (typeof editor?.can === "function") {
|
|
91846
|
+
try {
|
|
91847
|
+
const can = editor.can();
|
|
91848
|
+
if (can && typeof can.redo === "function") {
|
|
91849
|
+
return !!can.redo();
|
|
91559
91850
|
}
|
|
91851
|
+
} catch (error) {
|
|
91852
|
+
console.warn("[SlashMenu] Unable to determine redo availability via editor.can():", error);
|
|
91560
91853
|
}
|
|
91561
91854
|
}
|
|
91562
|
-
|
|
91563
|
-
|
|
91564
|
-
|
|
91565
|
-
|
|
91566
|
-
|
|
91567
|
-
|
|
91568
|
-
if (fromMarks || toMarks) {
|
|
91569
|
-
return true;
|
|
91570
|
-
}
|
|
91571
|
-
if (empty2 && markType.isInSet(state2.storedMarks || $from.marks())) {
|
|
91572
|
-
return true;
|
|
91573
|
-
}
|
|
91574
|
-
} else {
|
|
91575
|
-
if (empty2) {
|
|
91576
|
-
if (markType.isInSet(state2.storedMarks || $from.marks())) {
|
|
91577
|
-
return true;
|
|
91578
|
-
}
|
|
91579
|
-
} else {
|
|
91580
|
-
let hasMark = false;
|
|
91581
|
-
state2.doc.nodesBetween(from2, to, (node) => {
|
|
91582
|
-
if (markType.isInSet(node.marks)) {
|
|
91583
|
-
hasMark = true;
|
|
91584
|
-
return false;
|
|
91585
|
-
}
|
|
91586
|
-
});
|
|
91587
|
-
if (hasMark) return true;
|
|
91588
|
-
}
|
|
91855
|
+
if (isCollaborationEnabled(editor)) {
|
|
91856
|
+
try {
|
|
91857
|
+
const undoManager = yUndoPluginKey.getState(state2)?.undoManager;
|
|
91858
|
+
return !!undoManager && undoManager.redoStack.length > 0;
|
|
91859
|
+
} catch (error) {
|
|
91860
|
+
console.warn("[SlashMenu] Unable to determine redo availability via y-prosemirror:", error);
|
|
91589
91861
|
}
|
|
91590
91862
|
}
|
|
91591
|
-
|
|
91863
|
+
try {
|
|
91864
|
+
return redoDepth(state2) > 0;
|
|
91865
|
+
} catch (error) {
|
|
91866
|
+
console.warn("[SlashMenu] Unable to determine redo availability via history plugin:", error);
|
|
91867
|
+
return false;
|
|
91868
|
+
}
|
|
91592
91869
|
}
|
|
91593
|
-
function
|
|
91594
|
-
|
|
91595
|
-
|
|
91596
|
-
|
|
91597
|
-
|
|
91598
|
-
const
|
|
91599
|
-
|
|
91600
|
-
|
|
91870
|
+
function isCollaborationEnabled(editor) {
|
|
91871
|
+
return Boolean(editor?.options?.collaborationProvider && editor?.options?.ydoc);
|
|
91872
|
+
}
|
|
91873
|
+
function getStructureFromResolvedPos(state2, pos) {
|
|
91874
|
+
try {
|
|
91875
|
+
const $pos = state2.doc.resolve(pos);
|
|
91876
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
91877
|
+
for (let depth = $pos.depth; depth > 0; depth--) {
|
|
91878
|
+
ancestors.add($pos.node(depth).type.name);
|
|
91879
|
+
}
|
|
91880
|
+
const isInList = ancestors.has("bulletList") || ancestors.has("orderedList");
|
|
91881
|
+
const isInTable2 = ancestors.has("table") || ancestors.has("tableRow") || ancestors.has("tableCell") || ancestors.has("tableHeader");
|
|
91882
|
+
const isInSectionNode = ancestors.has("documentSection");
|
|
91883
|
+
return {
|
|
91884
|
+
isInTable: isInTable2,
|
|
91885
|
+
isInList,
|
|
91886
|
+
isInSectionNode
|
|
91887
|
+
};
|
|
91888
|
+
} catch (error) {
|
|
91889
|
+
console.warn("[SlashMenu] Unable to resolve position for structural context:", error);
|
|
91890
|
+
return null;
|
|
91601
91891
|
}
|
|
91602
91892
|
}
|
|
91603
91893
|
const isModuleEnabled = (editorOptions, moduleName) => {
|
|
@@ -91611,8 +91901,52 @@ ${style2}
|
|
|
91611
91901
|
return true;
|
|
91612
91902
|
}
|
|
91613
91903
|
};
|
|
91904
|
+
function applyCustomMenuConfiguration(defaultSections, context) {
|
|
91905
|
+
const { editor } = context;
|
|
91906
|
+
const slashMenuConfig = editor.options?.slashMenuConfig;
|
|
91907
|
+
if (!slashMenuConfig) {
|
|
91908
|
+
return defaultSections;
|
|
91909
|
+
}
|
|
91910
|
+
let sections = [];
|
|
91911
|
+
if (slashMenuConfig.includeDefaultItems !== false) {
|
|
91912
|
+
sections = [...defaultSections];
|
|
91913
|
+
}
|
|
91914
|
+
if (slashMenuConfig.customItems && Array.isArray(slashMenuConfig.customItems)) {
|
|
91915
|
+
sections = [...sections, ...slashMenuConfig.customItems];
|
|
91916
|
+
}
|
|
91917
|
+
if (typeof slashMenuConfig.menuProvider === "function") {
|
|
91918
|
+
try {
|
|
91919
|
+
sections = slashMenuConfig.menuProvider(context, sections) || sections;
|
|
91920
|
+
} catch (error) {
|
|
91921
|
+
console.warn("[SlashMenu] Error in custom menuProvider:", error);
|
|
91922
|
+
}
|
|
91923
|
+
}
|
|
91924
|
+
return sections;
|
|
91925
|
+
}
|
|
91926
|
+
function filterCustomItems(sections, context) {
|
|
91927
|
+
return sections.map((section) => {
|
|
91928
|
+
const filteredItems = section.items.filter((item) => {
|
|
91929
|
+
if (typeof item.showWhen === "function") {
|
|
91930
|
+
try {
|
|
91931
|
+
return item.showWhen(context);
|
|
91932
|
+
} catch (error) {
|
|
91933
|
+
console.warn(`[SlashMenu] Error in showWhen for item ${item.id}:`, error);
|
|
91934
|
+
return false;
|
|
91935
|
+
}
|
|
91936
|
+
}
|
|
91937
|
+
return true;
|
|
91938
|
+
});
|
|
91939
|
+
return {
|
|
91940
|
+
...section,
|
|
91941
|
+
items: filteredItems
|
|
91942
|
+
};
|
|
91943
|
+
}).filter((section) => section.items.length > 0);
|
|
91944
|
+
}
|
|
91614
91945
|
function getItems(context) {
|
|
91615
91946
|
const { editor, selectedText, trigger: trigger2, clipboardContent } = context;
|
|
91947
|
+
const clipboardHasContent = Boolean(
|
|
91948
|
+
clipboardContent?.hasContent || clipboardContent?.html || clipboardContent?.text || typeof clipboardContent?.size === "number" && clipboardContent.size > 0 || clipboardContent && typeof clipboardContent?.content?.size === "number" && clipboardContent.content.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw.size === "number" && clipboardContent.raw.size > 0 || clipboardContent?.raw && typeof clipboardContent.raw?.content?.size === "number" && clipboardContent.raw.content.size > 0
|
|
91949
|
+
);
|
|
91616
91950
|
const isInTable2 = selectionHasNodeOrMark(editor.view.state, "table", { requireEnds: true });
|
|
91617
91951
|
const isInSectionNode = selectionHasNodeOrMark(editor.view.state, "documentSection", { requireEnds: true });
|
|
91618
91952
|
const sections = [
|
|
@@ -91749,12 +92083,13 @@ ${style2}
|
|
|
91749
92083
|
]
|
|
91750
92084
|
}
|
|
91751
92085
|
];
|
|
91752
|
-
|
|
92086
|
+
let allSections = applyCustomMenuConfiguration(sections, context);
|
|
92087
|
+
const filteredSections = allSections.map((section) => {
|
|
91753
92088
|
const filteredItems = section.items.filter((item) => {
|
|
91754
92089
|
if (item.requiresModule && !isModuleEnabled(editor?.options, item.requiresModule)) return false;
|
|
91755
92090
|
if (item.requiresSelection && !selectedText) return false;
|
|
91756
92091
|
if (!item.allowedTriggers.includes(trigger2)) return false;
|
|
91757
|
-
if (item.requiresClipboard && !
|
|
92092
|
+
if (item.requiresClipboard && !clipboardHasContent) return false;
|
|
91758
92093
|
if (item.requiresTableParent && !isInTable2 || item.id === "insert-table" && isInTable2) return false;
|
|
91759
92094
|
if (item.requiresSectionParent && !isInSectionNode) return false;
|
|
91760
92095
|
return true;
|
|
@@ -91764,7 +92099,8 @@ ${style2}
|
|
|
91764
92099
|
items: filteredItems
|
|
91765
92100
|
};
|
|
91766
92101
|
}).filter((section) => section.items.length > 0);
|
|
91767
|
-
|
|
92102
|
+
const finalSections = filterCustomItems(filteredSections, context);
|
|
92103
|
+
return finalSections;
|
|
91768
92104
|
}
|
|
91769
92105
|
const _hoisted_1$3$1 = { class: "slash-menu-items" };
|
|
91770
92106
|
const _hoisted_2$1$1 = {
|
|
@@ -91799,6 +92135,7 @@ ${style2}
|
|
|
91799
92135
|
const menuRef = ref$1(null);
|
|
91800
92136
|
const sections = ref$1([]);
|
|
91801
92137
|
const selectedId = ref$1(null);
|
|
92138
|
+
const currentContext = ref$1(null);
|
|
91802
92139
|
const handleEditorUpdate = () => {
|
|
91803
92140
|
if (!props.editor?.isEditable && isOpen.value) {
|
|
91804
92141
|
closeMenu({ restoreCursor: false });
|
|
@@ -91844,6 +92181,44 @@ ${style2}
|
|
|
91844
92181
|
selectedId.value = newItems[0].id;
|
|
91845
92182
|
}
|
|
91846
92183
|
});
|
|
92184
|
+
const customItemRefs = /* @__PURE__ */ new Map();
|
|
92185
|
+
const setCustomItemRef = (el, item) => {
|
|
92186
|
+
if (el && item.render) {
|
|
92187
|
+
customItemRefs.set(item.id, { element: el, item });
|
|
92188
|
+
nextTick(() => {
|
|
92189
|
+
renderCustomItem(item.id);
|
|
92190
|
+
});
|
|
92191
|
+
}
|
|
92192
|
+
};
|
|
92193
|
+
const renderCustomItem = async (itemId) => {
|
|
92194
|
+
const refData = customItemRefs.get(itemId);
|
|
92195
|
+
if (!refData || refData.element.hasCustomContent) return;
|
|
92196
|
+
const { element, item } = refData;
|
|
92197
|
+
try {
|
|
92198
|
+
if (!currentContext.value) {
|
|
92199
|
+
currentContext.value = await getEditorContext(props.editor);
|
|
92200
|
+
}
|
|
92201
|
+
const context = currentContext.value;
|
|
92202
|
+
const customElement = item.render(context);
|
|
92203
|
+
if (customElement instanceof HTMLElement) {
|
|
92204
|
+
element.innerHTML = "";
|
|
92205
|
+
element.appendChild(customElement);
|
|
92206
|
+
element.hasCustomContent = true;
|
|
92207
|
+
}
|
|
92208
|
+
} catch (error) {
|
|
92209
|
+
console.warn(`[SlashMenu] Error rendering custom item ${itemId}:`, error);
|
|
92210
|
+
element.innerHTML = `<span>${item.label || "Custom Item"}</span>`;
|
|
92211
|
+
element.hasCustomContent = true;
|
|
92212
|
+
}
|
|
92213
|
+
};
|
|
92214
|
+
const cleanupCustomItems = () => {
|
|
92215
|
+
customItemRefs.forEach((refData) => {
|
|
92216
|
+
if (refData.element) {
|
|
92217
|
+
refData.element.hasCustomContent = false;
|
|
92218
|
+
}
|
|
92219
|
+
});
|
|
92220
|
+
customItemRefs.clear();
|
|
92221
|
+
};
|
|
91847
92222
|
const handleGlobalKeyDown = (event) => {
|
|
91848
92223
|
if (event.key === "Escape") {
|
|
91849
92224
|
event.preventDefault();
|
|
@@ -91894,22 +92269,23 @@ ${style2}
|
|
|
91894
92269
|
return;
|
|
91895
92270
|
}
|
|
91896
92271
|
event.preventDefault();
|
|
92272
|
+
const context = await getEditorContext(props.editor, event);
|
|
92273
|
+
currentContext.value = context;
|
|
92274
|
+
sections.value = getItems({ ...context, trigger: "click" });
|
|
92275
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
92276
|
+
searchQuery.value = "";
|
|
91897
92277
|
props.editor.view.dispatch(
|
|
91898
92278
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
91899
92279
|
type: "open",
|
|
91900
|
-
pos: props.editor.view.state.selection.from,
|
|
92280
|
+
pos: context?.pos ?? props.editor.view.state.selection.from,
|
|
91901
92281
|
clientX: event.clientX,
|
|
91902
92282
|
clientY: event.clientY
|
|
91903
92283
|
})
|
|
91904
92284
|
);
|
|
91905
|
-
searchQuery.value = "";
|
|
91906
|
-
const context = await getEditorContext(props.editor, event);
|
|
91907
|
-
sections.value = getItems({ ...context, trigger: "click" });
|
|
91908
|
-
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
91909
92285
|
};
|
|
91910
92286
|
const executeCommand = async (item) => {
|
|
91911
92287
|
if (props.editor) {
|
|
91912
|
-
item.action ? await item.action(props.editor) : null;
|
|
92288
|
+
item.action ? await item.action(props.editor, currentContext.value) : null;
|
|
91913
92289
|
if (item.component) {
|
|
91914
92290
|
menuRef.value;
|
|
91915
92291
|
const componentProps = getPropsByItemId(item.id, props);
|
|
@@ -91927,7 +92303,7 @@ ${style2}
|
|
|
91927
92303
|
const closeMenu = (options = { restoreCursor: true }) => {
|
|
91928
92304
|
if (props.editor?.view) {
|
|
91929
92305
|
const pluginState = SlashMenuPluginKey.getState(props.editor.view.state);
|
|
91930
|
-
const
|
|
92306
|
+
const anchorPos = pluginState?.anchorPos;
|
|
91931
92307
|
props.editor.view.dispatch(
|
|
91932
92308
|
props.editor.view.state.tr.setMeta(SlashMenuPluginKey, {
|
|
91933
92309
|
type: "close"
|
|
@@ -91940,6 +92316,8 @@ ${style2}
|
|
|
91940
92316
|
props.editor.view.dispatch(tr);
|
|
91941
92317
|
props.editor.view.focus();
|
|
91942
92318
|
}
|
|
92319
|
+
cleanupCustomItems();
|
|
92320
|
+
currentContext.value = null;
|
|
91943
92321
|
isOpen.value = false;
|
|
91944
92322
|
searchQuery.value = "";
|
|
91945
92323
|
sections.value = [];
|
|
@@ -91956,19 +92334,29 @@ ${style2}
|
|
|
91956
92334
|
isOpen.value = true;
|
|
91957
92335
|
menuPosition.value = event.menuPosition;
|
|
91958
92336
|
searchQuery.value = "";
|
|
91959
|
-
|
|
91960
|
-
|
|
91961
|
-
|
|
92337
|
+
if (!currentContext.value) {
|
|
92338
|
+
const context = await getEditorContext(props.editor);
|
|
92339
|
+
currentContext.value = context;
|
|
92340
|
+
sections.value = getItems({ ...context, trigger: "slash" });
|
|
92341
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
92342
|
+
} else if (sections.value.length === 0) {
|
|
92343
|
+
const trigger2 = currentContext.value.event?.type === "contextmenu" ? "click" : "slash";
|
|
92344
|
+
sections.value = getItems({ ...currentContext.value, trigger: trigger2 });
|
|
92345
|
+
selectedId.value = flattenedItems.value[0]?.id || null;
|
|
92346
|
+
}
|
|
91962
92347
|
});
|
|
91963
92348
|
props.editor.view.dom.addEventListener("contextmenu", handleRightClick);
|
|
91964
92349
|
props.editor.on("slashMenu:close", () => {
|
|
92350
|
+
cleanupCustomItems();
|
|
91965
92351
|
isOpen.value = false;
|
|
91966
92352
|
searchQuery.value = "";
|
|
92353
|
+
currentContext.value = null;
|
|
91967
92354
|
});
|
|
91968
92355
|
});
|
|
91969
92356
|
onBeforeUnmount(() => {
|
|
91970
92357
|
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
91971
92358
|
document.removeEventListener("mousedown", handleGlobalOutsideClick);
|
|
92359
|
+
cleanupCustomItems();
|
|
91972
92360
|
if (props.editor) {
|
|
91973
92361
|
try {
|
|
91974
92362
|
props.editor.off("slashMenu:open");
|
|
@@ -92015,12 +92403,19 @@ ${style2}
|
|
|
92015
92403
|
class: normalizeClass(["slash-menu-item", { "is-selected": item.id === selectedId.value }]),
|
|
92016
92404
|
onClick: ($event) => executeCommand(item)
|
|
92017
92405
|
}, [
|
|
92018
|
-
item.
|
|
92406
|
+
item.render ? (openBlock(), createElementBlock("div", {
|
|
92019
92407
|
key: 0,
|
|
92020
|
-
|
|
92021
|
-
|
|
92022
|
-
|
|
92023
|
-
|
|
92408
|
+
ref_for: true,
|
|
92409
|
+
ref: (el) => setCustomItemRef(el, item),
|
|
92410
|
+
class: "slash-menu-custom-item"
|
|
92411
|
+
}, null, 512)) : (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
92412
|
+
item.icon ? (openBlock(), createElementBlock("span", {
|
|
92413
|
+
key: 0,
|
|
92414
|
+
class: "slash-menu-item-icon",
|
|
92415
|
+
innerHTML: item.icon
|
|
92416
|
+
}, null, 8, _hoisted_4$5)) : createCommentVNode("", true),
|
|
92417
|
+
createBaseVNode("span", null, toDisplayString(item.label), 1)
|
|
92418
|
+
], 64))
|
|
92024
92419
|
], 10, _hoisted_3$1$1);
|
|
92025
92420
|
}), 128))
|
|
92026
92421
|
], 64);
|
|
@@ -92031,10 +92426,12 @@ ${style2}
|
|
|
92031
92426
|
}
|
|
92032
92427
|
};
|
|
92033
92428
|
function adjustPaginationBreaks(editorElem, editor) {
|
|
92034
|
-
|
|
92429
|
+
const hostElement = editorElem.value;
|
|
92430
|
+
if (!hostElement || !editor?.value?.options?.scale) return;
|
|
92035
92431
|
const zoom = editor.value.options.scale;
|
|
92036
|
-
const bounds =
|
|
92037
|
-
const
|
|
92432
|
+
const bounds = hostElement.getBoundingClientRect();
|
|
92433
|
+
const searchRoot = hostElement.shadowRoot || hostElement;
|
|
92434
|
+
const breakNodes = searchRoot.querySelectorAll(".pagination-break-wrapper");
|
|
92038
92435
|
let firstLeft;
|
|
92039
92436
|
breakNodes.forEach((node) => {
|
|
92040
92437
|
const nodeBounds = node.getBoundingClientRect();
|
|
@@ -92325,6 +92722,821 @@ ${style2}
|
|
|
92325
92722
|
};
|
|
92326
92723
|
const GenericPopover = /* @__PURE__ */ _export_sfc$1(_sfc_main$2$1, [["__scopeId", "data-v-cbddcc0f"]]);
|
|
92327
92724
|
const BlankDOCX$1 = "data:application/octet-stream;base64,UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtqwzAQRfeF/oPRtthKuiilxMmij2UbaPoBijRORPVCo7z+vuM4MaUkMTTJxiDP3HvPCDGD0dqabAkRtXcl6xc9loGTXmk3K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AAUAAAAAAAAAAAAAAAAAG0sAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQC6dnA8swIAANgLAAASAAAAAAAAAAAAAAAAAP0tAAB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEACvOn+GwBAADtAgAAEQAAAAAAAAAAAAAAAADgMAAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAIRivWWsBAADFAgAAEAAAAAAAAAAAAAAAAACDMwAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAEDAAAkNgAAAAA=";
|
|
92725
|
+
const editorStyles = `:root {
|
|
92726
|
+
/* CSS variables */
|
|
92727
|
+
}
|
|
92728
|
+
.sd-input-active {
|
|
92729
|
+
border: 1px solid #1355ff !important;
|
|
92730
|
+
}
|
|
92731
|
+
.sd-super-editor-html .ProseMirror {
|
|
92732
|
+
border: 1px solid #d9d9d9;
|
|
92733
|
+
outline: none;
|
|
92734
|
+
border-radius: 8px;
|
|
92735
|
+
height: 100%;
|
|
92736
|
+
width: 100%;
|
|
92737
|
+
outline: none;
|
|
92738
|
+
}
|
|
92739
|
+
a {
|
|
92740
|
+
text-decoration: auto;
|
|
92741
|
+
}
|
|
92742
|
+
/**
|
|
92743
|
+
* Basic ProseMirror styles.
|
|
92744
|
+
* https://github.com/ProseMirror/prosemirror-view/blob/master/style/prosemirror.css
|
|
92745
|
+
*/
|
|
92746
|
+
.ProseMirror {
|
|
92747
|
+
position: relative;
|
|
92748
|
+
}
|
|
92749
|
+
.ProseMirror {
|
|
92750
|
+
word-wrap: break-word;
|
|
92751
|
+
white-space: pre-wrap;
|
|
92752
|
+
white-space: break-spaces;
|
|
92753
|
+
-webkit-font-variant-ligatures: none;
|
|
92754
|
+
font-variant-ligatures: none;
|
|
92755
|
+
font-feature-settings: 'liga' 0; /* the above doesn't seem to work in Edge */
|
|
92756
|
+
}
|
|
92757
|
+
.ProseMirror pre {
|
|
92758
|
+
white-space: pre-wrap;
|
|
92759
|
+
}
|
|
92760
|
+
.ProseMirror ol,
|
|
92761
|
+
.ProseMirror ul {
|
|
92762
|
+
margin-block-start: 0;
|
|
92763
|
+
margin-block-end: 0;
|
|
92764
|
+
margin-inline-start: 0;
|
|
92765
|
+
margin-inline-end: 0;
|
|
92766
|
+
}
|
|
92767
|
+
.ProseMirror ol,
|
|
92768
|
+
.ProseMirror ul {
|
|
92769
|
+
padding-inline-start: 0;
|
|
92770
|
+
padding-left: 0;
|
|
92771
|
+
list-style: none;
|
|
92772
|
+
}
|
|
92773
|
+
.ProseMirror li::marker {
|
|
92774
|
+
content: none;
|
|
92775
|
+
}
|
|
92776
|
+
.ProseMirror li::marker {
|
|
92777
|
+
padding: 0;
|
|
92778
|
+
margin: 0;
|
|
92779
|
+
}
|
|
92780
|
+
.ProseMirror li > p {
|
|
92781
|
+
margin: 0;
|
|
92782
|
+
padding: 0;
|
|
92783
|
+
display: inline-block;
|
|
92784
|
+
}
|
|
92785
|
+
.ProseMirror.header-footer-edit > p img,
|
|
92786
|
+
.ProseMirror.header-footer-edit > p a,
|
|
92787
|
+
.ProseMirror.header-footer-edit li img,
|
|
92788
|
+
.ProseMirror.header-footer-edit li a,
|
|
92789
|
+
.ProseMirror.header-footer-edit span img,
|
|
92790
|
+
.ProseMirror.header-footer-edit span a {
|
|
92791
|
+
opacity: 1;
|
|
92792
|
+
}
|
|
92793
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper {
|
|
92794
|
+
color: initial !important;
|
|
92795
|
+
}
|
|
92796
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper span {
|
|
92797
|
+
color: initial !important;
|
|
92798
|
+
}
|
|
92799
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper img,
|
|
92800
|
+
.ProseMirror.header-footer-edit .pagination-break-wrapper a {
|
|
92801
|
+
opacity: 1;
|
|
92802
|
+
}
|
|
92803
|
+
.pagination-section-header div[contenteditable='false'] {
|
|
92804
|
+
user-select: none;
|
|
92805
|
+
}
|
|
92806
|
+
/**
|
|
92807
|
+
* Hide marker for indented lists.
|
|
92808
|
+
* If a list-item contains a list but doesn't contain a "p" tag with text.
|
|
92809
|
+
*/
|
|
92810
|
+
.ProseMirror ol {
|
|
92811
|
+
margin: 0;
|
|
92812
|
+
}
|
|
92813
|
+
.ProseMirror li:has(> ul:first-child, > ol:first-child):not(:has(> p)) {
|
|
92814
|
+
list-style-type: none;
|
|
92815
|
+
}
|
|
92816
|
+
.ProseMirror li:has(> ul:first-child, > ol:first-child):not(:has(> p))::marker {
|
|
92817
|
+
content: '';
|
|
92818
|
+
}
|
|
92819
|
+
.ProseMirror-hideselection *::selection {
|
|
92820
|
+
background: transparent;
|
|
92821
|
+
}
|
|
92822
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
92823
|
+
background: transparent;
|
|
92824
|
+
}
|
|
92825
|
+
.ProseMirror-hideselection * {
|
|
92826
|
+
caret-color: transparent;
|
|
92827
|
+
}
|
|
92828
|
+
/* See https://github.com/ProseMirror/prosemirror/issues/1421#issuecomment-1759320191 */
|
|
92829
|
+
.ProseMirror [draggable][contenteditable='false'] {
|
|
92830
|
+
user-select: text;
|
|
92831
|
+
}
|
|
92832
|
+
.ProseMirror-selectednode {
|
|
92833
|
+
outline: 2px solid #8cf;
|
|
92834
|
+
}
|
|
92835
|
+
/* Make sure li selections wrap around markers */
|
|
92836
|
+
li.ProseMirror-selectednode {
|
|
92837
|
+
outline: none;
|
|
92838
|
+
}
|
|
92839
|
+
li.ProseMirror-selectednode:after {
|
|
92840
|
+
content: '';
|
|
92841
|
+
position: absolute;
|
|
92842
|
+
left: -32px;
|
|
92843
|
+
right: -2px;
|
|
92844
|
+
top: -2px;
|
|
92845
|
+
bottom: -2px;
|
|
92846
|
+
border: 2px solid #8cf;
|
|
92847
|
+
pointer-events: none;
|
|
92848
|
+
}
|
|
92849
|
+
.ProseMirror img {
|
|
92850
|
+
height: auto;
|
|
92851
|
+
max-width: 100%;
|
|
92852
|
+
}
|
|
92853
|
+
/* Protect against generic img rules */
|
|
92854
|
+
img.ProseMirror-separator {
|
|
92855
|
+
display: inline !important;
|
|
92856
|
+
border: none !important;
|
|
92857
|
+
margin: 0 !important;
|
|
92858
|
+
}
|
|
92859
|
+
.ProseMirror .sd-editor-tab {
|
|
92860
|
+
display: inline-block;
|
|
92861
|
+
vertical-align: text-bottom;
|
|
92862
|
+
}
|
|
92863
|
+
.ProseMirror u .sd-editor-tab:not(.pagination-inner .sd-editor-tab) {
|
|
92864
|
+
white-space: pre;
|
|
92865
|
+
border-bottom: 1px solid #000;
|
|
92866
|
+
margin-bottom: 1.5px;
|
|
92867
|
+
}
|
|
92868
|
+
/*
|
|
92869
|
+
Tables
|
|
92870
|
+
https://github.com/ProseMirror/prosemirror-tables/blob/master/style/tables.css
|
|
92871
|
+
https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
92872
|
+
*/
|
|
92873
|
+
.ProseMirror.resize-cursor {
|
|
92874
|
+
cursor: ew-resize;
|
|
92875
|
+
cursor: col-resize;
|
|
92876
|
+
}
|
|
92877
|
+
.ProseMirror .tableWrapper {
|
|
92878
|
+
--table-border-width: 1px;
|
|
92879
|
+
--offset: 2px;
|
|
92880
|
+
|
|
92881
|
+
overflow-x: auto;
|
|
92882
|
+
scrollbar-width: thin;
|
|
92883
|
+
overflow: hidden;
|
|
92884
|
+
|
|
92885
|
+
/*
|
|
92886
|
+
The border width does not need to be multiplied by two,
|
|
92887
|
+
for tables it works differently. */
|
|
92888
|
+
width: calc(100% + (var(--table-border-width) + var(--offset)));
|
|
92889
|
+
}
|
|
92890
|
+
.ProseMirror table {
|
|
92891
|
+
border-collapse: collapse;
|
|
92892
|
+
border-spacing: 0;
|
|
92893
|
+
table-layout: fixed;
|
|
92894
|
+
margin: 0;
|
|
92895
|
+
/* width: 100%; */
|
|
92896
|
+
}
|
|
92897
|
+
.ProseMirror tr {
|
|
92898
|
+
position: relative;
|
|
92899
|
+
}
|
|
92900
|
+
.ProseMirror td,
|
|
92901
|
+
.ProseMirror th {
|
|
92902
|
+
min-width: 1em;
|
|
92903
|
+
position: relative;
|
|
92904
|
+
vertical-align: top;
|
|
92905
|
+
box-sizing: border-box;
|
|
92906
|
+
overflow-wrap: anywhere;
|
|
92907
|
+
}
|
|
92908
|
+
.ProseMirror th {
|
|
92909
|
+
font-weight: bold;
|
|
92910
|
+
text-align: left;
|
|
92911
|
+
}
|
|
92912
|
+
.ProseMirror table .column-resize-handle {
|
|
92913
|
+
position: absolute;
|
|
92914
|
+
right: -2px;
|
|
92915
|
+
top: 0;
|
|
92916
|
+
bottom: -2px; /* 0 */
|
|
92917
|
+
width: 4px;
|
|
92918
|
+
z-index: 20;
|
|
92919
|
+
background-color: #adf;
|
|
92920
|
+
pointer-events: none;
|
|
92921
|
+
}
|
|
92922
|
+
.ProseMirror table .selectedCell:after {
|
|
92923
|
+
position: absolute;
|
|
92924
|
+
content: '';
|
|
92925
|
+
left: 0;
|
|
92926
|
+
right: 0;
|
|
92927
|
+
top: 0;
|
|
92928
|
+
bottom: 0;
|
|
92929
|
+
background: rgba(200, 200, 255, 0.4);
|
|
92930
|
+
pointer-events: none;
|
|
92931
|
+
z-index: 2;
|
|
92932
|
+
}
|
|
92933
|
+
/* Tables - end */
|
|
92934
|
+
/* Track changes */
|
|
92935
|
+
.ProseMirror .track-insert-dec,
|
|
92936
|
+
.ProseMirror .track-delete-dec,
|
|
92937
|
+
.ProseMirror .track-format-dec {
|
|
92938
|
+
pointer-events: none;
|
|
92939
|
+
}
|
|
92940
|
+
.ProseMirror .track-insert-dec.hidden,
|
|
92941
|
+
.ProseMirror .track-delete-dec.hidden {
|
|
92942
|
+
display: none;
|
|
92943
|
+
}
|
|
92944
|
+
.ProseMirror .track-insert-dec.highlighted {
|
|
92945
|
+
border-top: 1px dashed #00853d;
|
|
92946
|
+
border-bottom: 1px dashed #00853d;
|
|
92947
|
+
background-color: #399c7222;
|
|
92948
|
+
}
|
|
92949
|
+
.ProseMirror .track-delete-dec.highlighted {
|
|
92950
|
+
border-top: 1px dashed #cb0e47;
|
|
92951
|
+
border-bottom: 1px dashed #cb0e47;
|
|
92952
|
+
background-color: #cb0e4722;
|
|
92953
|
+
text-decoration: line-through;
|
|
92954
|
+
text-decoration-thickness: 2px;
|
|
92955
|
+
}
|
|
92956
|
+
.ProseMirror .track-format-dec.highlighted {
|
|
92957
|
+
border-bottom: 2px solid gold;
|
|
92958
|
+
}
|
|
92959
|
+
.ProseMirror .track-delete-widget {
|
|
92960
|
+
visibility: hidden;
|
|
92961
|
+
}
|
|
92962
|
+
/* Track changes - end */
|
|
92963
|
+
/* Collaboration cursors */
|
|
92964
|
+
.ProseMirror > .ProseMirror-yjs-cursor:first-child {
|
|
92965
|
+
margin-top: 16px;
|
|
92966
|
+
}
|
|
92967
|
+
.ProseMirror-yjs-cursor {
|
|
92968
|
+
position: relative;
|
|
92969
|
+
margin-left: -1px;
|
|
92970
|
+
margin-right: -1px;
|
|
92971
|
+
border-left: 1px solid black;
|
|
92972
|
+
border-right: 1px solid black;
|
|
92973
|
+
border-color: orange;
|
|
92974
|
+
word-break: normal;
|
|
92975
|
+
pointer-events: none;
|
|
92976
|
+
}
|
|
92977
|
+
.ProseMirror-yjs-cursor > div {
|
|
92978
|
+
position: absolute;
|
|
92979
|
+
top: -1.05em;
|
|
92980
|
+
left: -1px;
|
|
92981
|
+
font-size: 13px;
|
|
92982
|
+
background-color: rgb(250, 129, 0);
|
|
92983
|
+
font-family: serif;
|
|
92984
|
+
font-style: normal;
|
|
92985
|
+
font-weight: normal;
|
|
92986
|
+
line-height: normal;
|
|
92987
|
+
user-select: none;
|
|
92988
|
+
color: white;
|
|
92989
|
+
padding-left: 2px;
|
|
92990
|
+
padding-right: 2px;
|
|
92991
|
+
white-space: nowrap;
|
|
92992
|
+
}
|
|
92993
|
+
/* Collaboration cursors - end */
|
|
92994
|
+
/* Image placeholder */
|
|
92995
|
+
.ProseMirror placeholder {
|
|
92996
|
+
display: inline;
|
|
92997
|
+
border: 1px solid #ccc;
|
|
92998
|
+
color: #ccc;
|
|
92999
|
+
}
|
|
93000
|
+
.ProseMirror placeholder:after {
|
|
93001
|
+
content: '☁';
|
|
93002
|
+
font-size: 200%;
|
|
93003
|
+
line-height: 0.1;
|
|
93004
|
+
font-weight: bold;
|
|
93005
|
+
}
|
|
93006
|
+
/* Gapcursor */
|
|
93007
|
+
.ProseMirror-gapcursor {
|
|
93008
|
+
display: none;
|
|
93009
|
+
pointer-events: none;
|
|
93010
|
+
position: absolute;
|
|
93011
|
+
margin: 0;
|
|
93012
|
+
}
|
|
93013
|
+
.ProseMirror-gapcursor:after {
|
|
93014
|
+
content: '';
|
|
93015
|
+
display: block;
|
|
93016
|
+
position: absolute;
|
|
93017
|
+
top: -2px;
|
|
93018
|
+
width: 20px;
|
|
93019
|
+
border-top: 1px solid black;
|
|
93020
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
93021
|
+
}
|
|
93022
|
+
@keyframes ProseMirror-cursor-blink {
|
|
93023
|
+
to {
|
|
93024
|
+
visibility: hidden;
|
|
93025
|
+
}
|
|
93026
|
+
}
|
|
93027
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
93028
|
+
display: block;
|
|
93029
|
+
}
|
|
93030
|
+
.ProseMirror div[data-type='contentBlock'] {
|
|
93031
|
+
position: absolute;
|
|
93032
|
+
outline: none;
|
|
93033
|
+
user-select: none;
|
|
93034
|
+
z-index: -1;
|
|
93035
|
+
}
|
|
93036
|
+
.ProseMirror div[data-horizontal-rule='true'] {
|
|
93037
|
+
margin-top: auto;
|
|
93038
|
+
align-self: flex-end;
|
|
93039
|
+
}
|
|
93040
|
+
.sd-editor-dropcap {
|
|
93041
|
+
float: left;
|
|
93042
|
+
display: flex;
|
|
93043
|
+
align-items: baseline;
|
|
93044
|
+
margin-top: -5px;
|
|
93045
|
+
}
|
|
93046
|
+
.ProseMirror-search-match {
|
|
93047
|
+
background-color: #ffff0054;
|
|
93048
|
+
}
|
|
93049
|
+
.ProseMirror-active-search-match {
|
|
93050
|
+
background-color: #ff6a0054;
|
|
93051
|
+
}
|
|
93052
|
+
.ProseMirror span.sd-custom-selection::selection {
|
|
93053
|
+
background: transparent;
|
|
93054
|
+
}
|
|
93055
|
+
.sd-custom-selection {
|
|
93056
|
+
background-color: #d9d9d9;
|
|
93057
|
+
border-radius: 0.1em;
|
|
93058
|
+
}
|
|
93059
|
+
.superdoc-toolbar svg {
|
|
93060
|
+
width: 100%;
|
|
93061
|
+
height: 100%;
|
|
93062
|
+
display: block;
|
|
93063
|
+
fill: currentColor;
|
|
93064
|
+
}
|
|
93065
|
+
.superdoc-toolbar svg path {
|
|
93066
|
+
stroke: currentColor;
|
|
93067
|
+
}
|
|
93068
|
+
.sd-editor-toolbar-dropdown .n-dropdown-option .dropdown-select-icon {
|
|
93069
|
+
display: flex;
|
|
93070
|
+
width: 12px;
|
|
93071
|
+
height: 12px;
|
|
93072
|
+
}
|
|
93073
|
+
/* Custom toolbar styling */
|
|
93074
|
+
/* AI button icon styling with gradient */
|
|
93075
|
+
.toolbar-icon__icon--ai {
|
|
93076
|
+
position: relative;
|
|
93077
|
+
z-index: 1;
|
|
93078
|
+
}
|
|
93079
|
+
.toolbar-icon__icon--ai svg {
|
|
93080
|
+
fill: transparent;
|
|
93081
|
+
}
|
|
93082
|
+
.toolbar-icon__icon--ai::before {
|
|
93083
|
+
content: '';
|
|
93084
|
+
position: absolute;
|
|
93085
|
+
top: 0;
|
|
93086
|
+
left: 0;
|
|
93087
|
+
right: 0;
|
|
93088
|
+
bottom: 0;
|
|
93089
|
+
z-index: -1;
|
|
93090
|
+
background: linear-gradient(
|
|
93091
|
+
270deg,
|
|
93092
|
+
rgba(218, 215, 118, 0.5) -20%,
|
|
93093
|
+
rgba(191, 100, 100, 1) 30%,
|
|
93094
|
+
rgba(77, 82, 217, 1) 60%,
|
|
93095
|
+
rgb(255, 219, 102) 150%
|
|
93096
|
+
);
|
|
93097
|
+
-webkit-mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>")
|
|
93098
|
+
center / contain no-repeat;
|
|
93099
|
+
mask: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z'/></svg>")
|
|
93100
|
+
center / contain no-repeat;
|
|
93101
|
+
filter: brightness(1.2);
|
|
93102
|
+
transition: filter 0.2s ease;
|
|
93103
|
+
}
|
|
93104
|
+
.toolbar-icon__icon--ai:hover::before {
|
|
93105
|
+
filter: brightness(1.3);
|
|
93106
|
+
}
|
|
93107
|
+
/* AI text appear animation */
|
|
93108
|
+
@keyframes aiTextAppear {
|
|
93109
|
+
from {
|
|
93110
|
+
opacity: 0;
|
|
93111
|
+
transform: translateY(5px);
|
|
93112
|
+
}
|
|
93113
|
+
to {
|
|
93114
|
+
opacity: 1;
|
|
93115
|
+
transform: translateY(0);
|
|
93116
|
+
}
|
|
93117
|
+
}
|
|
93118
|
+
.sd-ai-text-appear {
|
|
93119
|
+
display: inline;
|
|
93120
|
+
opacity: 0;
|
|
93121
|
+
animation: aiTextAppear 0.7s ease-out forwards;
|
|
93122
|
+
animation-fill-mode: both;
|
|
93123
|
+
will-change: opacity, transform;
|
|
93124
|
+
/* Ensure each mark is treated as a separate animation context */
|
|
93125
|
+
contain: content;
|
|
93126
|
+
}
|
|
93127
|
+
.sd-ai-loader {
|
|
93128
|
+
display: flex;
|
|
93129
|
+
justify-content: flex-start;
|
|
93130
|
+
}
|
|
93131
|
+
.sd-ai-loader > img {
|
|
93132
|
+
width: fit-content;
|
|
93133
|
+
height: 40px;
|
|
93134
|
+
}
|
|
93135
|
+
@keyframes ai-pulse {
|
|
93136
|
+
0% {
|
|
93137
|
+
background-color: rgba(99, 102, 241, 0.1);
|
|
93138
|
+
}
|
|
93139
|
+
50% {
|
|
93140
|
+
background-color: rgba(99, 102, 241, 0.375);
|
|
93141
|
+
}
|
|
93142
|
+
100% {
|
|
93143
|
+
background-color: rgba(99, 102, 241, 0.1);
|
|
93144
|
+
}
|
|
93145
|
+
}
|
|
93146
|
+
.sd-ai-highlight-pulse {
|
|
93147
|
+
animation: ai-pulse 1.5s ease-in-out infinite;
|
|
93148
|
+
}
|
|
93149
|
+
.sd-editor-auto-page-number,
|
|
93150
|
+
.sd-editor-auto-total-pages {
|
|
93151
|
+
transition: all 250ms ease;
|
|
93152
|
+
border-bottom: 1px solid #9a9a9a;
|
|
93153
|
+
cursor: not-allowed;
|
|
93154
|
+
}
|
|
93155
|
+
.sd-editor-auto-page-number:hover,
|
|
93156
|
+
.sd-editor-auto-total-pages:hover {
|
|
93157
|
+
border-bottom-color: #4f4f4f;
|
|
93158
|
+
}
|
|
93159
|
+
.sd-editor-auto-page-number-content {
|
|
93160
|
+
pointer-events: none;
|
|
93161
|
+
}
|
|
93162
|
+
.ProseMirror.view-mode .sd-editor-auto-page-number,
|
|
93163
|
+
.ProseMirror.view-mode .sd-editor-auto-total-pages {
|
|
93164
|
+
border: none;
|
|
93165
|
+
}
|
|
93166
|
+
:root {
|
|
93167
|
+
--sd-editor-separator-height: 18px;
|
|
93168
|
+
}
|
|
93169
|
+
.pagination-section-header {
|
|
93170
|
+
cursor: default;
|
|
93171
|
+
}
|
|
93172
|
+
/* To not inherit styles from the wrapper paragraph */
|
|
93173
|
+
.pagination-section-header p {
|
|
93174
|
+
text-align: initial;
|
|
93175
|
+
}
|
|
93176
|
+
.pagination-section-footer {
|
|
93177
|
+
position: relative;
|
|
93178
|
+
width: 100%;
|
|
93179
|
+
min-width: 100%;
|
|
93180
|
+
display: flex;
|
|
93181
|
+
flex-direction: column;
|
|
93182
|
+
justify-content: flex-end;
|
|
93183
|
+
cursor: default;
|
|
93184
|
+
}
|
|
93185
|
+
/* To not inherit styles from the wrapper paragraph */
|
|
93186
|
+
.pagination-section-footer p {
|
|
93187
|
+
text-align: initial;
|
|
93188
|
+
}
|
|
93189
|
+
.pagination-break-wrapper {
|
|
93190
|
+
width: 100%;
|
|
93191
|
+
margin: 0;
|
|
93192
|
+
padding: 0;
|
|
93193
|
+
cursor: default;
|
|
93194
|
+
position: relative;
|
|
93195
|
+
}
|
|
93196
|
+
.pagination-separator {
|
|
93197
|
+
position: relative;
|
|
93198
|
+
display: block;
|
|
93199
|
+
height: var(--sd-editor-separator-height);
|
|
93200
|
+
min-height: var(--sd-editor-separator-height);
|
|
93201
|
+
min-width: 100%;
|
|
93202
|
+
width: 100%;
|
|
93203
|
+
border-top: 1px solid #dbdbdb;
|
|
93204
|
+
border-bottom: 1px solid #dbdbdb;
|
|
93205
|
+
cursor: default;
|
|
93206
|
+
}
|
|
93207
|
+
.pagination-separator--table {
|
|
93208
|
+
border: 0;
|
|
93209
|
+
}
|
|
93210
|
+
.pagination-separator-floating {
|
|
93211
|
+
position: absolute;
|
|
93212
|
+
height: var(--sd-editor-separator-height);
|
|
93213
|
+
border-top: 1px solid #dbdbdb;
|
|
93214
|
+
border-bottom: 1px solid #dbdbdb;
|
|
93215
|
+
pointer-events: none;
|
|
93216
|
+
}
|
|
93217
|
+
.pagination-inner {
|
|
93218
|
+
position: absolute;
|
|
93219
|
+
top: 0;
|
|
93220
|
+
left: 0;
|
|
93221
|
+
display: flex;
|
|
93222
|
+
flex-direction: column;
|
|
93223
|
+
background-color: white;
|
|
93224
|
+
}
|
|
93225
|
+
/**
|
|
93226
|
+
Workaround to display pagination in footer
|
|
93227
|
+
on the right if it is inside shape textbox.
|
|
93228
|
+
*/
|
|
93229
|
+
.pagination-section-footer .sd-editor-shape-container:has([data-id='auto-page-number'], [data-id='auto-total-pages']) {
|
|
93230
|
+
margin-left: auto;
|
|
93231
|
+
}
|
|
93232
|
+
.pagination-section-header img[contenteditable='false'],
|
|
93233
|
+
.pagination-section-footer img[contenteditable='false'] {
|
|
93234
|
+
pointer-events: none;
|
|
93235
|
+
}
|
|
93236
|
+
.pagination-break-wrapper {
|
|
93237
|
+
font-weight: normal;
|
|
93238
|
+
font-style: normal;
|
|
93239
|
+
color: initial;
|
|
93240
|
+
}
|
|
93241
|
+
/* TODO: This is going to be enabled again */
|
|
93242
|
+
/* .pagination-section-header div[contenteditable="false"]:not([documentmode="viewing"]),
|
|
93243
|
+
.pagination-section-footer div[contenteditable="false"]:not([documentmode="viewing"]) {
|
|
93244
|
+
opacity: 0.5;
|
|
93245
|
+
} */
|
|
93246
|
+
.sd-editor-popover {
|
|
93247
|
+
background-color: #fff;
|
|
93248
|
+
border-radius: 8px;
|
|
93249
|
+
-webkit-box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
93250
|
+
-moz-box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
93251
|
+
box-shadow: 0px 4px 12px 0px rgba(50, 50, 50, 0.15);
|
|
93252
|
+
padding: 0;
|
|
93253
|
+
width: auto;
|
|
93254
|
+
height: auto;
|
|
93255
|
+
font-size: 14px;
|
|
93256
|
+
color: #333;
|
|
93257
|
+
z-index: 1000;
|
|
93258
|
+
}
|
|
93259
|
+
.sd-editor-popover .popover-header {
|
|
93260
|
+
font-weight: bold;
|
|
93261
|
+
margin-bottom: 8px;
|
|
93262
|
+
}
|
|
93263
|
+
.tippy-box[data-theme~='sd-editor-popover'] {
|
|
93264
|
+
background-color: #fff;
|
|
93265
|
+
border-radius: 8px;
|
|
93266
|
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
|
93267
|
+
border: none !important;
|
|
93268
|
+
padding: 0 !important;
|
|
93269
|
+
}
|
|
93270
|
+
.tippy-box[data-theme~='sd-editor-popover'] .tippy-arrow {
|
|
93271
|
+
color: #fff;
|
|
93272
|
+
border: 1px solid #dbdbdb;
|
|
93273
|
+
}
|
|
93274
|
+
.tippy-box[data-theme~='sd-editor-popover'] .tippy-content {
|
|
93275
|
+
padding: 0;
|
|
93276
|
+
}
|
|
93277
|
+
.sd-editor-placeholder::before {
|
|
93278
|
+
content: attr(data-placeholder);
|
|
93279
|
+
color: #aaa;
|
|
93280
|
+
pointer-events: none;
|
|
93281
|
+
display: block;
|
|
93282
|
+
height: 0;
|
|
93283
|
+
}
|
|
93284
|
+
.sd-editor-mention {
|
|
93285
|
+
background-color: #1355ff15;
|
|
93286
|
+
color: #222;
|
|
93287
|
+
font-weight: 400;
|
|
93288
|
+
border-radius: 3px;
|
|
93289
|
+
padding: 0 5px;
|
|
93290
|
+
cursor: default;
|
|
93291
|
+
display: inline-block;
|
|
93292
|
+
box-sizing: border-box;
|
|
93293
|
+
}
|
|
93294
|
+
.sd-editor-comment-highlight {
|
|
93295
|
+
transition: background-color 250ms ease;
|
|
93296
|
+
}
|
|
93297
|
+
.sd-editor-comment-highlight:hover {
|
|
93298
|
+
background-color: #1354ff55;
|
|
93299
|
+
}
|
|
93300
|
+
.sd-editor-comment-highlight.sd-custom-selection {
|
|
93301
|
+
background-color: #d6c0c6 !important;
|
|
93302
|
+
}
|
|
93303
|
+
.sd-editor-list-item-node-view {
|
|
93304
|
+
position: relative;
|
|
93305
|
+
width: 100%;
|
|
93306
|
+
}
|
|
93307
|
+
.sd-editor-list-item-numbering {
|
|
93308
|
+
position: absolute;
|
|
93309
|
+
top: 0;
|
|
93310
|
+
white-space: nowrap;
|
|
93311
|
+
user-select: none;
|
|
93312
|
+
pointer-events: auto;
|
|
93313
|
+
text-align: right;
|
|
93314
|
+
z-index: 1;
|
|
93315
|
+
}
|
|
93316
|
+
.sd-editor-list-item-content-dom {
|
|
93317
|
+
position: relative;
|
|
93318
|
+
min-height: inherit;
|
|
93319
|
+
word-wrap: break-word;
|
|
93320
|
+
}
|
|
93321
|
+
/* temporary fix */
|
|
93322
|
+
.sd-editor-list-item-node-view .sd-custom-selection {
|
|
93323
|
+
font-size: inherit !important;
|
|
93324
|
+
}
|
|
93325
|
+
/* Resize handles container */
|
|
93326
|
+
.sd-editor-resize-container {
|
|
93327
|
+
position: absolute;
|
|
93328
|
+
pointer-events: none;
|
|
93329
|
+
z-index: 11;
|
|
93330
|
+
}
|
|
93331
|
+
/* Resize handles */
|
|
93332
|
+
.sd-editor-resize-handle {
|
|
93333
|
+
position: absolute;
|
|
93334
|
+
width: 12px;
|
|
93335
|
+
height: 12px;
|
|
93336
|
+
background-color: #4dabf7;
|
|
93337
|
+
border: 2px solid #fff;
|
|
93338
|
+
border-radius: 50%;
|
|
93339
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
|
93340
|
+
pointer-events: auto;
|
|
93341
|
+
transition: all 0.1s ease;
|
|
93342
|
+
}
|
|
93343
|
+
.sd-editor-resize-handle:hover {
|
|
93344
|
+
background-color: #228be6;
|
|
93345
|
+
transform: scale(1.1);
|
|
93346
|
+
box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
|
|
93347
|
+
}
|
|
93348
|
+
/* Handle positions */
|
|
93349
|
+
.sd-editor-resize-handle-nw {
|
|
93350
|
+
top: -6px;
|
|
93351
|
+
left: -6px;
|
|
93352
|
+
cursor: nwse-resize;
|
|
93353
|
+
}
|
|
93354
|
+
.sd-editor-resize-handle-ne {
|
|
93355
|
+
top: -6px;
|
|
93356
|
+
right: -6px;
|
|
93357
|
+
cursor: nesw-resize;
|
|
93358
|
+
}
|
|
93359
|
+
.sd-editor-resize-handle-sw {
|
|
93360
|
+
bottom: -6px;
|
|
93361
|
+
left: -6px;
|
|
93362
|
+
cursor: nesw-resize;
|
|
93363
|
+
}
|
|
93364
|
+
.sd-editor-resize-handle-se {
|
|
93365
|
+
bottom: -6px;
|
|
93366
|
+
right: -6px;
|
|
93367
|
+
cursor: nwse-resize;
|
|
93368
|
+
}
|
|
93369
|
+
/* Hide handles when editor loses focus */
|
|
93370
|
+
.ProseMirror:not(.ProseMirror-focused) .sd-editor-resize-container {
|
|
93371
|
+
display: none;
|
|
93372
|
+
}
|
|
93373
|
+
/* Smooth transitions for resizing */
|
|
93374
|
+
.sd-editor-resizable-wrapper * {
|
|
93375
|
+
transition: none;
|
|
93376
|
+
}
|
|
93377
|
+
.sd-editor-resizable-wrapper *:not([style*='width']) {
|
|
93378
|
+
transition: all 0.2s ease;
|
|
93379
|
+
}
|
|
93380
|
+
/* Resize feedback indicator */
|
|
93381
|
+
.sd-editor-resizable-wrapper::after {
|
|
93382
|
+
content: 'Drag corners to resize';
|
|
93383
|
+
position: absolute;
|
|
93384
|
+
bottom: -25px;
|
|
93385
|
+
left: 50%;
|
|
93386
|
+
transform: translateX(-50%);
|
|
93387
|
+
background-color: rgba(77, 171, 247, 0.9);
|
|
93388
|
+
color: white;
|
|
93389
|
+
font-size: 11px;
|
|
93390
|
+
padding: 4px 8px;
|
|
93391
|
+
border-radius: 4px;
|
|
93392
|
+
white-space: nowrap;
|
|
93393
|
+
pointer-events: none;
|
|
93394
|
+
opacity: 0;
|
|
93395
|
+
transition: opacity 0.3s ease;
|
|
93396
|
+
z-index: 12;
|
|
93397
|
+
}
|
|
93398
|
+
.sd-editor-resizable-wrapper:hover::after {
|
|
93399
|
+
opacity: 1;
|
|
93400
|
+
}
|
|
93401
|
+
.sd-document-section-block {
|
|
93402
|
+
background-color: #fafafa;
|
|
93403
|
+
border: 1px solid #ababab;
|
|
93404
|
+
border-radius: 4px;
|
|
93405
|
+
position: relative;
|
|
93406
|
+
}
|
|
93407
|
+
.sd-document-section-block-info {
|
|
93408
|
+
position: absolute;
|
|
93409
|
+
top: -19px;
|
|
93410
|
+
left: -1px;
|
|
93411
|
+
max-width: 100px;
|
|
93412
|
+
min-width: 0;
|
|
93413
|
+
height: 18px;
|
|
93414
|
+
border: 1px solid #ababab;
|
|
93415
|
+
border-bottom: none;
|
|
93416
|
+
border-radius: 6px 6px 0 0;
|
|
93417
|
+
padding: 0 8px;
|
|
93418
|
+
align-items: center;
|
|
93419
|
+
font-size: 10px;
|
|
93420
|
+
display: none;
|
|
93421
|
+
z-index: 100;
|
|
93422
|
+
background-color: #fafafa;
|
|
93423
|
+
}
|
|
93424
|
+
.sd-document-section-block:hover {
|
|
93425
|
+
border-radius: 0 4px 4px 4px;
|
|
93426
|
+
}
|
|
93427
|
+
.sd-document-section-block:hover .sd-document-section-block-info {
|
|
93428
|
+
display: flex;
|
|
93429
|
+
align-items: center;
|
|
93430
|
+
}
|
|
93431
|
+
.sd-document-section-block-info span {
|
|
93432
|
+
max-width: 100%;
|
|
93433
|
+
overflow: hidden;
|
|
93434
|
+
white-space: nowrap;
|
|
93435
|
+
text-overflow: ellipsis;
|
|
93436
|
+
}
|
|
93437
|
+
.sd-structured-content,
|
|
93438
|
+
.sd-structured-content-block {
|
|
93439
|
+
padding: 1px;
|
|
93440
|
+
box-sizing: border-box;
|
|
93441
|
+
border-radius: 4px;
|
|
93442
|
+
border: 1px solid #629be7;
|
|
93443
|
+
position: relative;
|
|
93444
|
+
}
|
|
93445
|
+
.sd-structured-content-draggable {
|
|
93446
|
+
font-size: 10px;
|
|
93447
|
+
align-items: center;
|
|
93448
|
+
justify-content: center;
|
|
93449
|
+
position: absolute;
|
|
93450
|
+
left: 2px;
|
|
93451
|
+
bottom: 100%;
|
|
93452
|
+
width: calc(100% - 4px);
|
|
93453
|
+
max-width: 110px;
|
|
93454
|
+
min-width: 0;
|
|
93455
|
+
height: 18px;
|
|
93456
|
+
padding: 0 4px;
|
|
93457
|
+
border: 1px solid #629be7;
|
|
93458
|
+
border-bottom: none;
|
|
93459
|
+
border-radius: 6px 6px 0 0;
|
|
93460
|
+
background-color: #629be7dd;
|
|
93461
|
+
z-index: 10;
|
|
93462
|
+
cursor: grab;
|
|
93463
|
+
display: none;
|
|
93464
|
+
}
|
|
93465
|
+
.sd-structured-content-draggable span {
|
|
93466
|
+
max-width: 100%;
|
|
93467
|
+
overflow: hidden;
|
|
93468
|
+
white-space: nowrap;
|
|
93469
|
+
text-overflow: ellipsis;
|
|
93470
|
+
}
|
|
93471
|
+
.sd-structured-content:hover .sd-structured-content-draggable,
|
|
93472
|
+
.sd-structured-content-block:hover .sd-structured-content-draggable {
|
|
93473
|
+
display: inline-flex;
|
|
93474
|
+
}
|
|
93475
|
+
`;
|
|
93476
|
+
let cachedStyleSheet = null;
|
|
93477
|
+
const defaultEditorStyles = editorStyles;
|
|
93478
|
+
let shadowEditorStyles = defaultEditorStyles;
|
|
93479
|
+
const supportsConstructableStylesheets = () => {
|
|
93480
|
+
const DocumentCtor = (
|
|
93481
|
+
/** @type {typeof Document | undefined} */
|
|
93482
|
+
globalThis.Document
|
|
93483
|
+
);
|
|
93484
|
+
const CSSStyleSheetCtor = (
|
|
93485
|
+
/** @type {typeof CSSStyleSheet | undefined} */
|
|
93486
|
+
globalThis.CSSStyleSheet
|
|
93487
|
+
);
|
|
93488
|
+
if (!DocumentCtor || !CSSStyleSheetCtor) return false;
|
|
93489
|
+
const documentPrototype = DocumentCtor.prototype;
|
|
93490
|
+
const styleSheetPrototype = CSSStyleSheetCtor.prototype;
|
|
93491
|
+
return !!documentPrototype && "adoptedStyleSheets" in documentPrototype && !!styleSheetPrototype && typeof styleSheetPrototype.replaceSync === "function";
|
|
93492
|
+
};
|
|
93493
|
+
const ensureStyleSheet = (root2) => {
|
|
93494
|
+
if (!root2 || !shadowEditorStyles) return;
|
|
93495
|
+
if (supportsConstructableStylesheets()) {
|
|
93496
|
+
if (!cachedStyleSheet) {
|
|
93497
|
+
const CSSStyleSheetCtor = (
|
|
93498
|
+
/** @type {typeof CSSStyleSheet} */
|
|
93499
|
+
globalThis.CSSStyleSheet
|
|
93500
|
+
);
|
|
93501
|
+
cachedStyleSheet = new CSSStyleSheetCtor();
|
|
93502
|
+
cachedStyleSheet.replaceSync(shadowEditorStyles);
|
|
93503
|
+
}
|
|
93504
|
+
const sheets = Array.isArray(root2.adoptedStyleSheets) ? root2.adoptedStyleSheets : [];
|
|
93505
|
+
if (!sheets.includes(cachedStyleSheet)) {
|
|
93506
|
+
root2.adoptedStyleSheets = [...sheets, cachedStyleSheet];
|
|
93507
|
+
}
|
|
93508
|
+
return;
|
|
93509
|
+
}
|
|
93510
|
+
const doc2 = (
|
|
93511
|
+
/** @type {Document | undefined} */
|
|
93512
|
+
globalThis.document
|
|
93513
|
+
);
|
|
93514
|
+
if (!doc2 || typeof root2.querySelector !== "function") return;
|
|
93515
|
+
if (!root2.querySelector("style[data-super-editor-styles]")) {
|
|
93516
|
+
const styleEl = doc2.createElement("style");
|
|
93517
|
+
styleEl.setAttribute("data-super-editor-styles", "");
|
|
93518
|
+
styleEl.textContent = shadowEditorStyles;
|
|
93519
|
+
root2.appendChild(styleEl);
|
|
93520
|
+
}
|
|
93521
|
+
};
|
|
93522
|
+
const ensureEditorShadowRoot = (hostElement) => {
|
|
93523
|
+
const doc2 = (
|
|
93524
|
+
/** @type {Document | undefined} */
|
|
93525
|
+
globalThis.document
|
|
93526
|
+
);
|
|
93527
|
+
if (!hostElement || !doc2 || typeof hostElement.attachShadow !== "function") {
|
|
93528
|
+
return { root: null, mount: null };
|
|
93529
|
+
}
|
|
93530
|
+
const root2 = hostElement.shadowRoot || hostElement.attachShadow({ mode: "open" });
|
|
93531
|
+
ensureStyleSheet(root2);
|
|
93532
|
+
let mount2 = root2.querySelector(".sd-editor-mount");
|
|
93533
|
+
if (!mount2) {
|
|
93534
|
+
mount2 = doc2.createElement("div");
|
|
93535
|
+
mount2.className = "sd-editor-mount";
|
|
93536
|
+
root2.appendChild(mount2);
|
|
93537
|
+
}
|
|
93538
|
+
return { root: root2, mount: mount2 };
|
|
93539
|
+
};
|
|
92328
93540
|
const _hoisted_1$1$1 = { class: "super-editor-container" };
|
|
92329
93541
|
const _hoisted_2$a = {
|
|
92330
93542
|
key: 1,
|
|
@@ -92363,6 +93575,7 @@ ${style2}
|
|
|
92363
93575
|
const message = useMessage();
|
|
92364
93576
|
const editorWrapper = ref$1(null);
|
|
92365
93577
|
const editorElem = ref$1(null);
|
|
93578
|
+
const editorMountPoint = shallowRef(null);
|
|
92366
93579
|
const fileSource = ref$1(null);
|
|
92367
93580
|
const popoverControls = reactive({
|
|
92368
93581
|
visible: false,
|
|
@@ -92451,9 +93664,15 @@ ${style2}
|
|
|
92451
93664
|
return extensions;
|
|
92452
93665
|
};
|
|
92453
93666
|
const initEditor = async ({ content, media = {}, mediaFiles = {}, fonts = {} } = {}) => {
|
|
93667
|
+
if (!editorElem.value) return;
|
|
93668
|
+
const { mount: mount2 } = ensureEditorShadowRoot(editorElem.value);
|
|
93669
|
+
editorMountPoint.value = mount2;
|
|
93670
|
+
if (editorMountPoint.value) {
|
|
93671
|
+
editorMountPoint.value.innerHTML = "";
|
|
93672
|
+
}
|
|
92454
93673
|
editor.value = new Editor({
|
|
92455
93674
|
mode: "docx",
|
|
92456
|
-
element: editorElem.value,
|
|
93675
|
+
element: editorMountPoint.value || editorElem.value,
|
|
92457
93676
|
fileSource: fileSource.value,
|
|
92458
93677
|
extensions: getExtensions(),
|
|
92459
93678
|
externalExtensions: props.options.externalExtensions,
|
|
@@ -92500,11 +93719,12 @@ ${style2}
|
|
|
92500
93719
|
};
|
|
92501
93720
|
const handleSuperEditorClick = (event) => {
|
|
92502
93721
|
emit2("editor-click", { editor: editor.value });
|
|
92503
|
-
|
|
93722
|
+
const pmElement = editor.value?.view?.dom;
|
|
92504
93723
|
if (!pmElement || !editor.value) {
|
|
92505
93724
|
return;
|
|
92506
93725
|
}
|
|
92507
|
-
|
|
93726
|
+
const eventPath = event.composedPath?.() || [];
|
|
93727
|
+
const isInsideEditor = eventPath.includes(pmElement);
|
|
92508
93728
|
if (!isInsideEditor && editor.value.isEditable) {
|
|
92509
93729
|
editor.value.view?.focus();
|
|
92510
93730
|
}
|
|
@@ -92517,7 +93737,9 @@ ${style2}
|
|
|
92517
93737
|
if (props.options?.suppressSkeletonLoader || !props.options?.collaborationProvider) editorReady.value = true;
|
|
92518
93738
|
});
|
|
92519
93739
|
const handleMarginClick = (event) => {
|
|
92520
|
-
|
|
93740
|
+
const pmElement = editor.value?.view?.dom;
|
|
93741
|
+
const eventPath = event.composedPath?.() || [];
|
|
93742
|
+
if (pmElement && eventPath.includes(pmElement)) return;
|
|
92521
93743
|
onMarginClickCursorChange(event, editor.value);
|
|
92522
93744
|
};
|
|
92523
93745
|
const handleMarginChange = ({ side, value }) => {
|
|
@@ -92623,7 +93845,7 @@ ${style2}
|
|
|
92623
93845
|
};
|
|
92624
93846
|
}
|
|
92625
93847
|
};
|
|
92626
|
-
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
93848
|
+
const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-3d49a1a6"]]);
|
|
92627
93849
|
const _hoisted_1$h = ["innerHTML"];
|
|
92628
93850
|
const _sfc_main$i = {
|
|
92629
93851
|
__name: "SuperInput",
|
|
@@ -92653,6 +93875,7 @@ ${style2}
|
|
|
92653
93875
|
const props = __props;
|
|
92654
93876
|
const editor = shallowRef();
|
|
92655
93877
|
const editorElem = ref$1(null);
|
|
93878
|
+
const editorMountPoint = shallowRef(null);
|
|
92656
93879
|
const isFocused = ref$1(false);
|
|
92657
93880
|
const onTransaction = ({ editor: editor2, transaction }) => {
|
|
92658
93881
|
const contents = editor2.getHTML();
|
|
@@ -92672,10 +93895,15 @@ ${style2}
|
|
|
92672
93895
|
props.options.onTransaction = onTransaction;
|
|
92673
93896
|
props.options.onFocus = onFocus;
|
|
92674
93897
|
props.options.onBlur = onBlur;
|
|
93898
|
+
const { mount: mount2 } = ensureEditorShadowRoot(editorElem.value);
|
|
93899
|
+
editorMountPoint.value = mount2;
|
|
93900
|
+
if (editorMountPoint.value) {
|
|
93901
|
+
editorMountPoint.value.innerHTML = "";
|
|
93902
|
+
}
|
|
92675
93903
|
editor.value = new Editor({
|
|
92676
93904
|
mode: "text",
|
|
92677
93905
|
content: document.getElementById("currentContent"),
|
|
92678
|
-
element: editorElem.value,
|
|
93906
|
+
element: editorMountPoint.value || editorElem.value,
|
|
92679
93907
|
extensions: getRichTextExtensions(),
|
|
92680
93908
|
users: props.users,
|
|
92681
93909
|
...props.options
|
|
@@ -92714,35 +93942,35 @@ ${style2}
|
|
|
92714
93942
|
};
|
|
92715
93943
|
}
|
|
92716
93944
|
};
|
|
92717
|
-
const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-
|
|
93945
|
+
const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-23a4e794"]]);
|
|
92718
93946
|
const baseHandlers = {
|
|
92719
93947
|
...runPropertyTranslators,
|
|
92720
|
-
"w:br": translator$
|
|
92721
|
-
"w:cantSplit": translator$
|
|
92722
|
-
"w:cnfStyle": translator$
|
|
92723
|
-
"w:divId": translator$
|
|
92724
|
-
"w:gridAfter": translator$
|
|
92725
|
-
"w:gridBefore": translator$
|
|
92726
|
-
"w:hidden": translator$
|
|
92727
|
-
"w:hyperlink": translator$
|
|
92728
|
-
"w:jc": translator$
|
|
92729
|
-
"w:p": translator$
|
|
92730
|
-
"w:r": translator$
|
|
92731
|
-
"w:rPr": translator$
|
|
92732
|
-
"w:sdt": translator$
|
|
92733
|
-
"w:tab": translator$
|
|
92734
|
-
"w:tblCellSpacing": translator$
|
|
92735
|
-
"w:tblHeader": translator$
|
|
92736
|
-
"w:tc": translator$
|
|
92737
|
-
"w:tr": translator$
|
|
92738
|
-
"w:trHeight": translator$
|
|
92739
|
-
"w:trPr": translator$
|
|
92740
|
-
"w:wAfter": translator$
|
|
92741
|
-
"w:wBefore": translator$
|
|
92742
|
-
"wp:anchor": translator$
|
|
92743
|
-
"wp:inline": translator$
|
|
92744
|
-
"w:bookmarkStart": translator$
|
|
92745
|
-
"w:bookmarkEnd": translator
|
|
93948
|
+
"w:br": translator$16,
|
|
93949
|
+
"w:cantSplit": translator$T,
|
|
93950
|
+
"w:cnfStyle": translator$S,
|
|
93951
|
+
"w:divId": translator$R,
|
|
93952
|
+
"w:gridAfter": translator$Q,
|
|
93953
|
+
"w:gridBefore": translator$P,
|
|
93954
|
+
"w:hidden": translator$O,
|
|
93955
|
+
"w:hyperlink": translator$7,
|
|
93956
|
+
"w:jc": translator$N,
|
|
93957
|
+
"w:p": translator$13,
|
|
93958
|
+
"w:r": translator$U,
|
|
93959
|
+
"w:rPr": translator$V,
|
|
93960
|
+
"w:sdt": translator$3,
|
|
93961
|
+
"w:tab": translator$14,
|
|
93962
|
+
"w:tblCellSpacing": translator$M,
|
|
93963
|
+
"w:tblHeader": translator$L,
|
|
93964
|
+
"w:tc": translator$8,
|
|
93965
|
+
"w:tr": translator$G,
|
|
93966
|
+
"w:trHeight": translator$K,
|
|
93967
|
+
"w:trPr": translator$H,
|
|
93968
|
+
"w:wAfter": translator$J,
|
|
93969
|
+
"w:wBefore": translator$I,
|
|
93970
|
+
"wp:anchor": translator$6,
|
|
93971
|
+
"wp:inline": translator$5,
|
|
93972
|
+
"w:bookmarkStart": translator$2,
|
|
93973
|
+
"w:bookmarkEnd": translator$1
|
|
92746
93974
|
};
|
|
92747
93975
|
const registeredHandlers = Object.freeze(baseHandlers);
|
|
92748
93976
|
const Extensions = {
|
|
@@ -109582,6 +110810,7 @@ ${style2}
|
|
|
109582
110810
|
annotations: proxy.$superdoc.config.annotations,
|
|
109583
110811
|
isCommentsEnabled: proxy.$superdoc.config.modules?.comments,
|
|
109584
110812
|
isAiEnabled: proxy.$superdoc.config.modules?.ai,
|
|
110813
|
+
slashMenuConfig: proxy.$superdoc.config.modules?.slashMenu,
|
|
109585
110814
|
onBeforeCreate: onEditorBeforeCreate,
|
|
109586
110815
|
onCreate: onEditorCreate,
|
|
109587
110816
|
onDestroy: onEditorDestroy,
|
|
@@ -109943,7 +111172,7 @@ ${style2}
|
|
|
109943
111172
|
};
|
|
109944
111173
|
}
|
|
109945
111174
|
};
|
|
109946
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
111175
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-dbfba5b9"]]);
|
|
109947
111176
|
const createSuperdocVueApp = () => {
|
|
109948
111177
|
const app = createApp(App);
|
|
109949
111178
|
const pinia = createPinia();
|