@superdoc-dev/cli 0.8.0-next.23 → 0.8.0-next.25
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 +50 -17
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -207171,7 +207171,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
207171
207171
|
init_remark_gfm_BhnWr3yf_es();
|
|
207172
207172
|
});
|
|
207173
207173
|
|
|
207174
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
207174
|
+
// ../../packages/superdoc/dist/chunks/src-B2eovI4l.es.js
|
|
207175
207175
|
function deleteProps(obj, propOrProps) {
|
|
207176
207176
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
207177
207177
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -258110,15 +258110,15 @@ function measureRunSliceWidth(run2, fromChar, toChar) {
|
|
|
258110
258110
|
context.font = fontString(run2);
|
|
258111
258111
|
return context.measureText(text5).width;
|
|
258112
258112
|
}
|
|
258113
|
-
function lineHeightForRuns(runs2, fromRun, toRun) {
|
|
258113
|
+
function lineHeightForRuns(runs2, fromRun, toRun, fallbackFontSize = 16) {
|
|
258114
258114
|
let maxSize$1 = 0;
|
|
258115
258115
|
for (let i4 = fromRun;i4 <= toRun; i4 += 1) {
|
|
258116
258116
|
const run2 = runs2[i4];
|
|
258117
|
-
const size$1 = (run2 && isTextRun$3(run2) ? run2 : null)?.fontSize ??
|
|
258117
|
+
const size$1 = (run2 && isTextRun$3(run2) ? run2 : null)?.fontSize ?? 0;
|
|
258118
258118
|
if (size$1 > maxSize$1)
|
|
258119
258119
|
maxSize$1 = size$1;
|
|
258120
258120
|
}
|
|
258121
|
-
return maxSize$1 * 1.2;
|
|
258121
|
+
return (maxSize$1 > 0 ? maxSize$1 : fallbackFontSize) * 1.2;
|
|
258122
258122
|
}
|
|
258123
258123
|
function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
258124
258124
|
if (!Number.isFinite(maxWidth) || maxWidth <= 0)
|
|
@@ -258163,6 +258163,7 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
|
258163
258163
|
const decimalSeparator = sanitizeDecimalSeparator$1(attrs?.decimalSeparator);
|
|
258164
258164
|
let currentRun = 0;
|
|
258165
258165
|
let currentChar = 0;
|
|
258166
|
+
let lastMeasuredFontSize = runs2.find((run2) => isTextRun$3(run2) && typeof run2.fontSize === "number")?.fontSize ?? 16;
|
|
258166
258167
|
while (currentRun < runs2.length) {
|
|
258167
258168
|
const isFirstLine = lines.length === 0;
|
|
258168
258169
|
const effectiveMaxWidth = Math.max(1, isFirstLine ? firstLineWidth : contentWidth);
|
|
@@ -258177,10 +258178,21 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
|
258177
258178
|
let endChar = currentChar;
|
|
258178
258179
|
let tabStopCursor = 0;
|
|
258179
258180
|
let didBreakInThisLine = false;
|
|
258181
|
+
let explicitLineBreakRun = -1;
|
|
258180
258182
|
let resumeRun = -1;
|
|
258181
258183
|
let resumeChar = 0;
|
|
258184
|
+
let lineMaxTextFontSize = 0;
|
|
258182
258185
|
for (let r$1 = currentRun;r$1 < runs2.length; r$1 += 1) {
|
|
258183
258186
|
const run2 = runs2[r$1];
|
|
258187
|
+
if (isLineBreakRun$1(run2)) {
|
|
258188
|
+
explicitLineBreakRun = r$1;
|
|
258189
|
+
if (startRun === r$1 && startChar === 0 && width === 0) {
|
|
258190
|
+
endRun = r$1;
|
|
258191
|
+
endChar = 0;
|
|
258192
|
+
}
|
|
258193
|
+
didBreakInThisLine = true;
|
|
258194
|
+
break;
|
|
258195
|
+
}
|
|
258184
258196
|
if (run2.kind === "tab") {
|
|
258185
258197
|
const absCurrentX = width + effectiveIndent;
|
|
258186
258198
|
const { target, nextIndex, stop } = getNextTabStopPx$1(absCurrentX, tabStops, tabStopCursor);
|
|
@@ -258232,6 +258244,8 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
|
258232
258244
|
const start$1 = r$1 === currentRun ? currentChar : r$1 === resumeRun ? resumeChar : 0;
|
|
258233
258245
|
if (r$1 === resumeRun)
|
|
258234
258246
|
resumeRun = -1;
|
|
258247
|
+
if (text5.length > 0 && isTextRun$3(run2))
|
|
258248
|
+
lineMaxTextFontSize = Math.max(lineMaxTextFontSize, run2.fontSize ?? 16);
|
|
258235
258249
|
for (let c = start$1;c < text5.length; c += 1) {
|
|
258236
258250
|
const ch = text5[c];
|
|
258237
258251
|
if (ch === "\t") {
|
|
@@ -258316,7 +258330,7 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
|
258316
258330
|
if (didBreakInThisLine)
|
|
258317
258331
|
break;
|
|
258318
258332
|
}
|
|
258319
|
-
if (startRun === endRun && startChar === endChar) {
|
|
258333
|
+
if (explicitLineBreakRun < 0 && startRun === endRun && startChar === endChar) {
|
|
258320
258334
|
endRun = startRun;
|
|
258321
258335
|
endChar = startChar + 1;
|
|
258322
258336
|
}
|
|
@@ -258328,15 +258342,29 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
|
|
|
258328
258342
|
width,
|
|
258329
258343
|
ascent: 0,
|
|
258330
258344
|
descent: 0,
|
|
258331
|
-
lineHeight: lineHeightForRuns(runs2, startRun, endRun),
|
|
258345
|
+
lineHeight: lineHeightForRuns(runs2, startRun, endRun, lastMeasuredFontSize),
|
|
258332
258346
|
maxWidth: effectiveMaxWidth
|
|
258333
258347
|
};
|
|
258334
258348
|
lines.push(line);
|
|
258335
|
-
|
|
258336
|
-
|
|
258349
|
+
if (lineMaxTextFontSize > 0)
|
|
258350
|
+
lastMeasuredFontSize = lineMaxTextFontSize;
|
|
258351
|
+
if (explicitLineBreakRun >= 0) {
|
|
258352
|
+
if (startRun === explicitLineBreakRun && startChar === 0 && endRun === explicitLineBreakRun && endChar === 0)
|
|
258353
|
+
currentRun = explicitLineBreakRun + 1;
|
|
258354
|
+
else {
|
|
258355
|
+
let nextNonBreakRun = explicitLineBreakRun + 1;
|
|
258356
|
+
while (nextNonBreakRun < runs2.length && isLineBreakRun$1(runs2[nextNonBreakRun]))
|
|
258357
|
+
nextNonBreakRun += 1;
|
|
258358
|
+
currentRun = nextNonBreakRun >= runs2.length ? explicitLineBreakRun : explicitLineBreakRun + 1;
|
|
258359
|
+
}
|
|
258360
|
+
currentChar = 0;
|
|
258361
|
+
} else {
|
|
258362
|
+
currentRun = endRun;
|
|
258363
|
+
currentChar = endChar;
|
|
258364
|
+
}
|
|
258337
258365
|
if (currentRun >= runs2.length)
|
|
258338
258366
|
break;
|
|
258339
|
-
if (currentChar >= runText(runs2[currentRun]).length) {
|
|
258367
|
+
if (!isLineBreakRun$1(runs2[currentRun]) && currentChar >= runText(runs2[currentRun]).length) {
|
|
258340
258368
|
currentRun += 1;
|
|
258341
258369
|
currentChar = 0;
|
|
258342
258370
|
}
|
|
@@ -265171,7 +265199,8 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
265171
265199
|
maxFontInfo: lineBreakFontInfo,
|
|
265172
265200
|
maxWidth: nextLineMaxWidth,
|
|
265173
265201
|
segments: [],
|
|
265174
|
-
spaceCount: 0
|
|
265202
|
+
spaceCount: 0,
|
|
265203
|
+
isLineBreakPlaceholder: true
|
|
265175
265204
|
};
|
|
265176
265205
|
tabStopCursor = 0;
|
|
265177
265206
|
pendingTabAlignment = null;
|
|
@@ -265180,6 +265209,11 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
265180
265209
|
pendingRunSpacing = 0;
|
|
265181
265210
|
continue;
|
|
265182
265211
|
}
|
|
265212
|
+
if (currentLine?.isLineBreakPlaceholder) {
|
|
265213
|
+
currentLine.fromRun = runIndex;
|
|
265214
|
+
currentLine.toRun = runIndex;
|
|
265215
|
+
currentLine.isLineBreakPlaceholder = false;
|
|
265216
|
+
}
|
|
265183
265217
|
if (isTabRun(run2)) {
|
|
265184
265218
|
activeTabGroup = null;
|
|
265185
265219
|
pendingLeader = null;
|
|
@@ -296102,7 +296136,7 @@ menclose::after {
|
|
|
296102
296136
|
return;
|
|
296103
296137
|
console.log(...args$1);
|
|
296104
296138
|
}, 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;
|
|
296105
|
-
var
|
|
296139
|
+
var init_src_B2eovI4l_es = __esm(() => {
|
|
296106
296140
|
init_rolldown_runtime_Bg48TavK_es();
|
|
296107
296141
|
init_SuperConverter_lmyr0gmB_es();
|
|
296108
296142
|
init_jszip_C49i9kUs_es();
|
|
@@ -299621,15 +299655,14 @@ ${err.toString()}`);
|
|
|
299621
299655
|
const currentTrackedChanges = pluginState.trackedChanges;
|
|
299622
299656
|
if (trackedChangeMeta)
|
|
299623
299657
|
pluginState.trackedChanges = handleTrackedChangeTransaction(trackedChangeMeta, currentTrackedChanges, newEditorState, editor);
|
|
299624
|
-
|
|
299625
|
-
if (!tr.docChanged && tr.selectionSet || trChangedActiveComment) {
|
|
299658
|
+
if (!tr.docChanged && tr.selectionSet) {
|
|
299626
299659
|
const { selection } = tr;
|
|
299627
299660
|
let currentActiveThread = getActiveCommentId(newEditorState.doc, selection);
|
|
299628
|
-
if (trChangedActiveComment)
|
|
299629
|
-
currentActiveThread = meta2.activeThreadId;
|
|
299630
299661
|
if (meta2?.type === "setCursorById" && meta2.preferredActiveThreadId && selectionContainsThread(newEditorState.doc, selection, meta2.preferredActiveThreadId))
|
|
299631
299662
|
currentActiveThread = meta2.preferredActiveThreadId;
|
|
299632
|
-
|
|
299663
|
+
const previousSelectionId = pluginState.activeThreadId;
|
|
299664
|
+
const isNonCollapsedClear = currentActiveThread == null && selection && selection.$from.pos !== selection.$to.pos;
|
|
299665
|
+
if (previousSelectionId !== currentActiveThread && !isNonCollapsedClear) {
|
|
299633
299666
|
pluginState.activeThreadId = currentActiveThread;
|
|
299634
299667
|
const update = {
|
|
299635
299668
|
type: comments_module_events.SELECTED,
|
|
@@ -333005,7 +333038,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
333005
333038
|
|
|
333006
333039
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
333007
333040
|
var init_super_editor_es = __esm(() => {
|
|
333008
|
-
|
|
333041
|
+
init_src_B2eovI4l_es();
|
|
333009
333042
|
init_SuperConverter_lmyr0gmB_es();
|
|
333010
333043
|
init_jszip_C49i9kUs_es();
|
|
333011
333044
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"@superdoc/document-api": "0.0.1",
|
|
28
27
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "
|
|
30
|
-
"@superdoc/super-editor": "0.0.1"
|
|
28
|
+
"@superdoc/document-api": "0.0.1",
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.29.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.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-linux-
|
|
41
|
-
"@superdoc-dev/cli-windows-x64": "0.8.0-next.
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.25",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.25",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.25",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.25",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.25"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|