@superdoc-dev/cli 0.5.0-next.56 → 0.5.0-next.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +102 -38
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -65262,7 +65262,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
65262
65262
|
emptyOptions2 = {};
|
|
65263
65263
|
});
|
|
65264
65264
|
|
|
65265
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
65265
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CE_qGNRx.es.js
|
|
65266
65266
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
65267
65267
|
const fieldValue = extension$1.config[field];
|
|
65268
65268
|
if (typeof fieldValue === "function")
|
|
@@ -91264,6 +91264,30 @@ function updateDOMAttributes(dom, attrs = {}, options = {}) {
|
|
|
91264
91264
|
dom.removeAttribute(key);
|
|
91265
91265
|
});
|
|
91266
91266
|
}
|
|
91267
|
+
function findEnclosingStructuredContentPosition($pos) {
|
|
91268
|
+
for (let depth = $pos.depth;depth > 0; depth--) {
|
|
91269
|
+
const node3 = $pos.node(depth);
|
|
91270
|
+
if (STRUCTURED_CONTENT_NODE_TYPES.has(node3.type.name))
|
|
91271
|
+
return $pos.before(depth);
|
|
91272
|
+
}
|
|
91273
|
+
return null;
|
|
91274
|
+
}
|
|
91275
|
+
function getViewModeSelectionWithoutStructuredContent(state) {
|
|
91276
|
+
const { selection, doc: doc$2 } = state;
|
|
91277
|
+
if (selection instanceof NodeSelection && STRUCTURED_CONTENT_NODE_TYPES.has(selection.node.type.name)) {
|
|
91278
|
+
const candidate = Selection.near(doc$2.resolve(selection.from), -1);
|
|
91279
|
+
if (findEnclosingStructuredContentPosition(candidate.$from) !== null)
|
|
91280
|
+
return null;
|
|
91281
|
+
return candidate;
|
|
91282
|
+
}
|
|
91283
|
+
if (selection.empty)
|
|
91284
|
+
return null;
|
|
91285
|
+
const startPos = findEnclosingStructuredContentPosition(selection.$from);
|
|
91286
|
+
const endPos = findEnclosingStructuredContentPosition(selection.$to);
|
|
91287
|
+
if (startPos === null || endPos === null || startPos !== endPos)
|
|
91288
|
+
return null;
|
|
91289
|
+
return Selection.near(doc$2.resolve(startPos), -1);
|
|
91290
|
+
}
|
|
91267
91291
|
function resolveHyperlinkRId(attrs, params3) {
|
|
91268
91292
|
if (!attrs.hyperlink?.url || !params3)
|
|
91269
91293
|
return null;
|
|
@@ -112663,7 +112687,7 @@ var isRegExp = (value) => {
|
|
|
112663
112687
|
tr,
|
|
112664
112688
|
changed: true
|
|
112665
112689
|
};
|
|
112666
|
-
}, helpers_exports, DECORATIVE_EXT_URI = "{C183D7F6-B498-43B3-948B-1728B52AA6E4}", DECORATIVE_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2017/decorative", HYPERLINK_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", translateImageNode = (params3) => {
|
|
112690
|
+
}, STRUCTURED_CONTENT_NODE_TYPES, helpers_exports, DECORATIVE_EXT_URI = "{C183D7F6-B498-43B3-948B-1728B52AA6E4}", DECORATIVE_NAMESPACE = "http://schemas.microsoft.com/office/drawing/2017/decorative", HYPERLINK_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", translateImageNode = (params3) => {
|
|
112667
112691
|
const { node: { attrs = {} }, tableCell, imageSize } = params3;
|
|
112668
112692
|
let imageId = attrs.rId;
|
|
112669
112693
|
const src = attrs.originalSrc || attrs.src || attrs.imageSrc;
|
|
@@ -116833,7 +116857,7 @@ var isRegExp = (value) => {
|
|
|
116833
116857
|
state.kern = kernNode.attributes["w:val"];
|
|
116834
116858
|
}
|
|
116835
116859
|
}, SuperConverter;
|
|
116836
|
-
var
|
|
116860
|
+
var init_SuperConverter_CE_qGNRx_es = __esm(() => {
|
|
116837
116861
|
init_rolldown_runtime_Bg48TavK_es();
|
|
116838
116862
|
init_jszip_C49i9kUs_es();
|
|
116839
116863
|
init_xml_js_CqGKpaft_es();
|
|
@@ -147211,6 +147235,7 @@ var init_SuperConverter_wNq3qezj_es = __esm(() => {
|
|
|
147211
147235
|
getMarksAtPosition,
|
|
147212
147236
|
buildTextNodes
|
|
147213
147237
|
};
|
|
147238
|
+
STRUCTURED_CONTENT_NODE_TYPES = new Set(["structuredContent", "structuredContentBlock"]);
|
|
147214
147239
|
helpers_exports = /* @__PURE__ */ __export3({
|
|
147215
147240
|
_testInternals: () => _testInternals,
|
|
147216
147241
|
applyPatch: () => applyPatch,
|
|
@@ -147240,6 +147265,7 @@ var init_SuperConverter_wNq3qezj_es = __esm(() => {
|
|
|
147240
147265
|
getSchemaTypeByName: () => getSchemaTypeByName,
|
|
147241
147266
|
getSchemaTypeNameByName: () => getSchemaTypeNameByName,
|
|
147242
147267
|
getSelectionFormattingState: () => getSelectionFormattingState,
|
|
147268
|
+
getViewModeSelectionWithoutStructuredContent: () => getViewModeSelectionWithoutStructuredContent,
|
|
147243
147269
|
isActive: () => isActive,
|
|
147244
147270
|
isInTable: () => isInTable,
|
|
147245
147271
|
isList: () => isList$1,
|
|
@@ -153904,7 +153930,7 @@ var init_SuperConverter_wNq3qezj_es = __esm(() => {
|
|
|
153904
153930
|
};
|
|
153905
153931
|
});
|
|
153906
153932
|
|
|
153907
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
153933
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-oHAjbd4d.es.js
|
|
153908
153934
|
function parseSizeUnit(val = "0") {
|
|
153909
153935
|
const length3 = val.toString() || "0";
|
|
153910
153936
|
const value = Number.parseFloat(length3);
|
|
@@ -155440,8 +155466,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
|
|
|
155440
155466
|
return false;
|
|
155441
155467
|
return Boolean(checker(attrs));
|
|
155442
155468
|
};
|
|
155443
|
-
var
|
|
155444
|
-
|
|
155469
|
+
var init_create_headless_toolbar_oHAjbd4d_es = __esm(() => {
|
|
155470
|
+
init_SuperConverter_CE_qGNRx_es();
|
|
155445
155471
|
init_constants_5yyN6FZg_es();
|
|
155446
155472
|
init_dist_B8HfvhaK_es();
|
|
155447
155473
|
CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
|
|
@@ -203879,7 +203905,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
203879
203905
|
init_remark_gfm_BhnWr3yf_es();
|
|
203880
203906
|
});
|
|
203881
203907
|
|
|
203882
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
203908
|
+
// ../../packages/superdoc/dist/chunks/src-iEokMYE4.es.js
|
|
203883
203909
|
function deleteProps(obj, propOrProps) {
|
|
203884
203910
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
203885
203911
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -205613,8 +205639,10 @@ function createStructuredContentLockPlugin() {
|
|
|
205613
205639
|
}
|
|
205614
205640
|
});
|
|
205615
205641
|
}
|
|
205616
|
-
function createStructuredContentSelectPlugin() {
|
|
205642
|
+
function createStructuredContentSelectPlugin(editor) {
|
|
205617
205643
|
return new Plugin({ appendTransaction(transactions, oldState, newState) {
|
|
205644
|
+
if (editor?.options?.documentMode === "viewing")
|
|
205645
|
+
return null;
|
|
205618
205646
|
const { selection } = newState;
|
|
205619
205647
|
if (!selection.empty)
|
|
205620
205648
|
return null;
|
|
@@ -249287,7 +249315,7 @@ function sliceRunsForLine(block, line) {
|
|
|
249287
249315
|
function measureCharacterX(block, line, charOffset, availableWidthOverride, alignmentOverride) {
|
|
249288
249316
|
const ctx$1 = getMeasurementContext();
|
|
249289
249317
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
249290
|
-
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride);
|
|
249318
|
+
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
|
|
249291
249319
|
const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
|
|
249292
249320
|
const renderedLineWidth = alignment$1 === "justify" && justify.extraPerSpace !== 0 ? availableWidth : line.width;
|
|
249293
249321
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
@@ -249416,7 +249444,7 @@ function charOffsetToPm(block, line, charOffset, fallbackPmStart) {
|
|
|
249416
249444
|
function findCharacterAtX(block, line, x, pmStart, availableWidthOverride, alignmentOverride) {
|
|
249417
249445
|
const ctx$1 = getMeasurementContext();
|
|
249418
249446
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
249419
|
-
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride);
|
|
249447
|
+
const justify = getJustifyAdjustment(block, line, availableWidth, alignmentOverride, undefined, undefined, lineContainsManualTabWithoutSegments(block, line));
|
|
249420
249448
|
const alignment$1 = alignmentOverride ?? (block.kind === "paragraph" ? block.attrs?.alignment : undefined);
|
|
249421
249449
|
const renderedLineWidth = alignment$1 === "justify" ? line.width + Math.max(0, availableWidth - line.width) : line.width;
|
|
249422
249450
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
@@ -262110,12 +262138,15 @@ var Node$13 = class Node$14 {
|
|
|
262110
262138
|
const isPasteEvent = event.type === "paste";
|
|
262111
262139
|
const isCutEvent = event.type === "cut";
|
|
262112
262140
|
const isClickEvent = event.type === "mousedown";
|
|
262141
|
+
const isViewingMode = this.editor?.options?.documentMode === "viewing";
|
|
262113
262142
|
if (!isDraggable && isSelectable && isDragEvent && event.target === this.dom)
|
|
262114
262143
|
event.preventDefault();
|
|
262115
262144
|
if (isDraggable && isDragEvent && !isDragging && event.target === this.dom) {
|
|
262116
262145
|
event.preventDefault();
|
|
262117
262146
|
return false;
|
|
262118
262147
|
}
|
|
262148
|
+
if (isViewingMode && isClickEvent && isSelectable)
|
|
262149
|
+
return true;
|
|
262119
262150
|
if (isDraggable && isEditable && !isDragging && isClickEvent) {
|
|
262120
262151
|
const dragHandle = target.closest("[data-drag-handle]");
|
|
262121
262152
|
if (dragHandle && (this.dom === dragHandle || this.dom.contains(dragHandle))) {
|
|
@@ -275990,7 +276021,7 @@ var Node$13 = class Node$14 {
|
|
|
275990
276021
|
}
|
|
275991
276022
|
element3.style.textAlign = resolveTextAlign(attrs?.alignment, rtl);
|
|
275992
276023
|
return rtl;
|
|
275993
|
-
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$
|
|
276024
|
+
}, shouldUseSegmentPositioning = (hasExplicitPositioning, hasSegments, isRtl) => hasExplicitPositioning && hasSegments && !isRtl, MATHML_NS$6 = "http://www.w3.org/1998/Math/MathML", OPERATOR_CHARS, convertMathRun = (node3, doc$12) => {
|
|
275994
276025
|
const elements = node3.elements ?? [];
|
|
275995
276026
|
let text5 = "";
|
|
275996
276027
|
for (const child of elements)
|
|
@@ -276004,61 +276035,77 @@ var Node$13 = class Node$14 {
|
|
|
276004
276035
|
return null;
|
|
276005
276036
|
const isNormalText = elements.find((el$1) => el$1.name === "m:rPr")?.elements?.some((el$1) => el$1.name === "m:nor") ?? false;
|
|
276006
276037
|
const tag = classifyMathText(text5);
|
|
276007
|
-
const el = doc$12.createElementNS(MATHML_NS$
|
|
276038
|
+
const el = doc$12.createElementNS(MATHML_NS$6, tag);
|
|
276008
276039
|
el.textContent = text5;
|
|
276009
276040
|
if (tag === "mi" && isNormalText)
|
|
276010
276041
|
el.setAttribute("mathvariant", "normal");
|
|
276011
276042
|
return el;
|
|
276012
|
-
}, MATHML_NS$
|
|
276043
|
+
}, MATHML_NS$5 = "http://www.w3.org/1998/Math/MathML", convertFraction = (node3, doc$12, convertChildren) => {
|
|
276013
276044
|
const elements = node3.elements ?? [];
|
|
276014
276045
|
const num = elements.find((e) => e.name === "m:num");
|
|
276015
276046
|
const den = elements.find((e) => e.name === "m:den");
|
|
276016
|
-
const frac = doc$12.createElementNS(MATHML_NS$
|
|
276017
|
-
const numRow = doc$12.createElementNS(MATHML_NS$
|
|
276047
|
+
const frac = doc$12.createElementNS(MATHML_NS$5, "mfrac");
|
|
276048
|
+
const numRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
276018
276049
|
numRow.appendChild(convertChildren(num?.elements ?? []));
|
|
276019
276050
|
frac.appendChild(numRow);
|
|
276020
|
-
const denRow = doc$12.createElementNS(MATHML_NS$
|
|
276051
|
+
const denRow = doc$12.createElementNS(MATHML_NS$5, "mrow");
|
|
276021
276052
|
denRow.appendChild(convertChildren(den?.elements ?? []));
|
|
276022
276053
|
frac.appendChild(denRow);
|
|
276023
276054
|
return frac;
|
|
276024
|
-
}, MATHML_NS$
|
|
276055
|
+
}, MATHML_NS$4 = "http://www.w3.org/1998/Math/MathML", convertBar = (node3, doc$12, convertChildren) => {
|
|
276025
276056
|
const elements = node3.elements ?? [];
|
|
276026
276057
|
const isUnder = elements.find((e) => e.name === "m:barPr")?.elements?.find((e) => e.name === "m:pos")?.attributes?.["m:val"] !== "top";
|
|
276027
276058
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276028
|
-
const wrapper = doc$12.createElementNS(MATHML_NS$
|
|
276059
|
+
const wrapper = doc$12.createElementNS(MATHML_NS$4, isUnder ? "munder" : "mover");
|
|
276029
276060
|
const baseContent = convertChildren(base5?.elements ?? []);
|
|
276030
|
-
const mrow = doc$12.createElementNS(MATHML_NS$
|
|
276061
|
+
const mrow = doc$12.createElementNS(MATHML_NS$4, "mrow");
|
|
276031
276062
|
mrow.appendChild(baseContent);
|
|
276032
276063
|
wrapper.appendChild(mrow);
|
|
276033
|
-
const accent = doc$12.createElementNS(MATHML_NS$
|
|
276064
|
+
const accent = doc$12.createElementNS(MATHML_NS$4, "mo");
|
|
276034
276065
|
accent.setAttribute("stretchy", "true");
|
|
276035
276066
|
accent.textContent = "‾";
|
|
276036
276067
|
wrapper.appendChild(accent);
|
|
276037
276068
|
return wrapper;
|
|
276038
|
-
}, MATHML_NS$
|
|
276069
|
+
}, MATHML_NS$3 = "http://www.w3.org/1998/Math/MathML", convertSubscript = (node3, doc$12, convertChildren) => {
|
|
276039
276070
|
const elements = node3.elements ?? [];
|
|
276040
276071
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276041
276072
|
const sub = elements.find((e) => e.name === "m:sub");
|
|
276042
|
-
const msub = doc$12.createElementNS(MATHML_NS$
|
|
276043
|
-
const baseRow = doc$12.createElementNS(MATHML_NS$
|
|
276073
|
+
const msub = doc$12.createElementNS(MATHML_NS$3, "msub");
|
|
276074
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
|
|
276044
276075
|
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276045
276076
|
msub.appendChild(baseRow);
|
|
276046
|
-
const subRow = doc$12.createElementNS(MATHML_NS$
|
|
276077
|
+
const subRow = doc$12.createElementNS(MATHML_NS$3, "mrow");
|
|
276047
276078
|
subRow.appendChild(convertChildren(sub?.elements ?? []));
|
|
276048
276079
|
msub.appendChild(subRow);
|
|
276049
276080
|
return msub;
|
|
276050
|
-
}, MATHML_NS$
|
|
276081
|
+
}, MATHML_NS$2 = "http://www.w3.org/1998/Math/MathML", convertSuperscript = (node3, doc$12, convertChildren) => {
|
|
276051
276082
|
const elements = node3.elements ?? [];
|
|
276052
276083
|
const base5 = elements.find((e) => e.name === "m:e");
|
|
276053
276084
|
const sup = elements.find((e) => e.name === "m:sup");
|
|
276054
|
-
const msup = doc$12.createElementNS(MATHML_NS$
|
|
276055
|
-
const baseRow = doc$12.createElementNS(MATHML_NS$
|
|
276085
|
+
const msup = doc$12.createElementNS(MATHML_NS$2, "msup");
|
|
276086
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
|
|
276056
276087
|
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276057
276088
|
msup.appendChild(baseRow);
|
|
276058
|
-
const supRow = doc$12.createElementNS(MATHML_NS$
|
|
276089
|
+
const supRow = doc$12.createElementNS(MATHML_NS$2, "mrow");
|
|
276059
276090
|
supRow.appendChild(convertChildren(sup?.elements ?? []));
|
|
276060
276091
|
msup.appendChild(supRow);
|
|
276061
276092
|
return msup;
|
|
276093
|
+
}, MATHML_NS$1 = "http://www.w3.org/1998/Math/MathML", convertSubSuperscript = (node3, doc$12, convertChildren) => {
|
|
276094
|
+
const elements = node3.elements ?? [];
|
|
276095
|
+
const base5 = elements.find((e) => e.name === "m:e");
|
|
276096
|
+
const sub = elements.find((e) => e.name === "m:sub");
|
|
276097
|
+
const sup = elements.find((e) => e.name === "m:sup");
|
|
276098
|
+
const msubsup = doc$12.createElementNS(MATHML_NS$1, "msubsup");
|
|
276099
|
+
const baseRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276100
|
+
baseRow.appendChild(convertChildren(base5?.elements ?? []));
|
|
276101
|
+
msubsup.appendChild(baseRow);
|
|
276102
|
+
const subRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276103
|
+
subRow.appendChild(convertChildren(sub?.elements ?? []));
|
|
276104
|
+
msubsup.appendChild(subRow);
|
|
276105
|
+
const supRow = doc$12.createElementNS(MATHML_NS$1, "mrow");
|
|
276106
|
+
supRow.appendChild(convertChildren(sup?.elements ?? []));
|
|
276107
|
+
msubsup.appendChild(supRow);
|
|
276108
|
+
return msubsup;
|
|
276062
276109
|
}, MATHML_NS = "http://www.w3.org/1998/Math/MathML", MATH_OBJECT_REGISTRY, ARGUMENT_ELEMENTS, LIST_MARKER_GAP$1 = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor$1 = (value) => {
|
|
276063
276110
|
if (typeof value !== "string")
|
|
276064
276111
|
return null;
|
|
@@ -277157,6 +277204,19 @@ var Node$13 = class Node$14 {
|
|
|
277157
277204
|
return false;
|
|
277158
277205
|
const code7 = char.charCodeAt(0);
|
|
277159
277206
|
return code7 >= 48 && code7 <= 57 || code7 >= 65 && code7 <= 90 || code7 >= 97 && code7 <= 122 || char === "'";
|
|
277207
|
+
}, lineContainsManualTabWithoutSegments = (block, line) => {
|
|
277208
|
+
if (block.kind !== "paragraph")
|
|
277209
|
+
return false;
|
|
277210
|
+
if (line.segments?.some((seg) => seg.x !== undefined))
|
|
277211
|
+
return false;
|
|
277212
|
+
const fromRun = line.fromRun ?? 0;
|
|
277213
|
+
const toRun = line.toRun ?? fromRun;
|
|
277214
|
+
for (let runIndex = fromRun;runIndex <= toRun; runIndex += 1) {
|
|
277215
|
+
const run2 = block.runs[runIndex];
|
|
277216
|
+
if (run2 && isTabRun$1(run2))
|
|
277217
|
+
return true;
|
|
277218
|
+
}
|
|
277219
|
+
return false;
|
|
277160
277220
|
}, capitalizeText$2 = (text5) => {
|
|
277161
277221
|
if (!text5)
|
|
277162
277222
|
return text5;
|
|
@@ -286131,12 +286191,12 @@ var Node$13 = class Node$14 {
|
|
|
286131
286191
|
return;
|
|
286132
286192
|
console.log(...args$1);
|
|
286133
286193
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
|
|
286134
|
-
var
|
|
286194
|
+
var init_src_iEokMYE4_es = __esm(() => {
|
|
286135
286195
|
init_rolldown_runtime_Bg48TavK_es();
|
|
286136
|
-
|
|
286196
|
+
init_SuperConverter_CE_qGNRx_es();
|
|
286137
286197
|
init_jszip_C49i9kUs_es();
|
|
286138
286198
|
init_uuid_qzgm05fK_es();
|
|
286139
|
-
|
|
286199
|
+
init_create_headless_toolbar_oHAjbd4d_es();
|
|
286140
286200
|
init_constants_5yyN6FZg_es();
|
|
286141
286201
|
init_dist_B8HfvhaK_es();
|
|
286142
286202
|
init_unified_Dsuw2be5_es();
|
|
@@ -287946,7 +288006,7 @@ ${err.toString()}`);
|
|
|
287946
288006
|
];
|
|
287947
288007
|
},
|
|
287948
288008
|
addPmPlugins() {
|
|
287949
|
-
return [createStructuredContentLockPlugin(), createStructuredContentSelectPlugin()];
|
|
288009
|
+
return [createStructuredContentLockPlugin(), createStructuredContentSelectPlugin(this.editor)];
|
|
287950
288010
|
},
|
|
287951
288011
|
addNodeView() {
|
|
287952
288012
|
return (props) => {
|
|
@@ -310195,6 +310255,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
310195
310255
|
cleanedMode = "suggesting";
|
|
310196
310256
|
if (cleanedMode === "viewing") {
|
|
310197
310257
|
this.commands.toggleTrackChangesShowOriginal?.();
|
|
310258
|
+
const normalizedSelection = getViewModeSelectionWithoutStructuredContent(this.state);
|
|
310259
|
+
if (normalizedSelection)
|
|
310260
|
+
this.view?.dispatch(this.state.tr.setSelection(normalizedSelection));
|
|
310198
310261
|
this.setEditable(false, false);
|
|
310199
310262
|
this.setOptions({ documentMode: "viewing" });
|
|
310200
310263
|
if (pm)
|
|
@@ -311789,6 +311852,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311789
311852
|
"m:f": convertFraction,
|
|
311790
311853
|
"m:sSub": convertSubscript,
|
|
311791
311854
|
"m:sSup": convertSuperscript,
|
|
311855
|
+
"m:sSubSup": convertSubSuperscript,
|
|
311792
311856
|
"m:acc": null,
|
|
311793
311857
|
"m:borderBox": null,
|
|
311794
311858
|
"m:box": null,
|
|
@@ -311802,8 +311866,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311802
311866
|
"m:nary": null,
|
|
311803
311867
|
"m:phant": null,
|
|
311804
311868
|
"m:rad": null,
|
|
311805
|
-
"m:sPre": null
|
|
311806
|
-
"m:sSubSup": null
|
|
311869
|
+
"m:sPre": null
|
|
311807
311870
|
};
|
|
311808
311871
|
ARGUMENT_ELEMENTS = new Set([
|
|
311809
311872
|
"m:e",
|
|
@@ -314784,13 +314847,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
314784
314847
|
el.appendChild(barEl);
|
|
314785
314848
|
});
|
|
314786
314849
|
const hasExplicitPositioning = line.segments?.some((seg) => seg.x !== undefined);
|
|
314850
|
+
const manualTabWithoutSegments = runsForLine.some((run2) => run2.kind === "tab") && !hasExplicitPositioning;
|
|
314787
314851
|
const availableWidth = availableWidthOverride ?? line.maxWidth ?? line.width;
|
|
314788
314852
|
const justifyShouldApply = shouldApplyJustify({
|
|
314789
314853
|
alignment: block.attrs?.alignment,
|
|
314790
314854
|
hasExplicitPositioning: hasExplicitPositioning ?? false,
|
|
314791
314855
|
isLastLineOfParagraph: false,
|
|
314792
314856
|
paragraphEndsWithLineBreak: false,
|
|
314793
|
-
skipJustifyOverride: skipJustify
|
|
314857
|
+
skipJustifyOverride: skipJustify || manualTabWithoutSegments
|
|
314794
314858
|
});
|
|
314795
314859
|
const countSpaces$1 = (text5) => {
|
|
314796
314860
|
let count2 = 0;
|
|
@@ -320591,11 +320655,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
320591
320655
|
|
|
320592
320656
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
320593
320657
|
var init_super_editor_es = __esm(() => {
|
|
320594
|
-
|
|
320595
|
-
|
|
320658
|
+
init_src_iEokMYE4_es();
|
|
320659
|
+
init_SuperConverter_CE_qGNRx_es();
|
|
320596
320660
|
init_jszip_C49i9kUs_es();
|
|
320597
320661
|
init_xml_js_CqGKpaft_es();
|
|
320598
|
-
|
|
320662
|
+
init_create_headless_toolbar_oHAjbd4d_es();
|
|
320599
320663
|
init_constants_5yyN6FZg_es();
|
|
320600
320664
|
init_dist_B8HfvhaK_es();
|
|
320601
320665
|
init_unified_Dsuw2be5_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.5.0-next.
|
|
3
|
+
"version": "0.5.0-next.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
28
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "
|
|
30
|
-
"
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.24.0"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-
|
|
40
|
-
"@superdoc-dev/cli-windows-x64": "0.5.0-next.
|
|
41
|
-
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.5.0-next.58",
|
|
38
|
+
"@superdoc-dev/cli-linux-x64": "0.5.0-next.58",
|
|
39
|
+
"@superdoc-dev/cli-darwin-x64": "0.5.0-next.58",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.5.0-next.58",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.5.0-next.58"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|