@superdoc-dev/cli 0.2.0-next.60 → 0.2.0-next.62
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 +103 -21
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -105714,9 +105714,9 @@ var init_remark_gfm_CQ3Jg4PR_es = __esm(() => {
|
|
|
105714
105714
|
init_remark_gfm_z_sDF4ss_es();
|
|
105715
105715
|
});
|
|
105716
105716
|
|
|
105717
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
105718
|
-
var
|
|
105719
|
-
__export(
|
|
105717
|
+
// ../../packages/superdoc/dist/chunks/src-DarWYxL0.es.js
|
|
105718
|
+
var exports_src_DarWYxL0_es = {};
|
|
105719
|
+
__export(exports_src_DarWYxL0_es, {
|
|
105720
105720
|
zt: () => defineMark,
|
|
105721
105721
|
z: () => cM,
|
|
105722
105722
|
yt: () => removeAwarenessStates,
|
|
@@ -160090,6 +160090,75 @@ var Node$13 = class Node$14 {
|
|
|
160090
160090
|
newTr.removeMark(Math.max(step.from, pos), Math.min(step.to, pos + node3.nodeSize), formatChangeMark);
|
|
160091
160091
|
}
|
|
160092
160092
|
});
|
|
160093
|
+
}, findPreviousLiveCharPos = (doc$2, cursorPos, trackDeleteMarkType) => {
|
|
160094
|
+
const $cursor = doc$2.resolve(cursorPos);
|
|
160095
|
+
let paraDepth = $cursor.depth;
|
|
160096
|
+
while (paraDepth > 0 && $cursor.node(paraDepth).type.name !== "paragraph")
|
|
160097
|
+
paraDepth--;
|
|
160098
|
+
if (paraDepth <= 0)
|
|
160099
|
+
return null;
|
|
160100
|
+
const paraStart = $cursor.before(paraDepth) + 1;
|
|
160101
|
+
let lastLiveCharPos = null;
|
|
160102
|
+
doc$2.nodesBetween(paraStart, cursorPos, (node3, pos) => {
|
|
160103
|
+
if (!node3.isText)
|
|
160104
|
+
return;
|
|
160105
|
+
if (node3.marks.some((m$1) => m$1.type === trackDeleteMarkType))
|
|
160106
|
+
return;
|
|
160107
|
+
const nodeEnd = pos + node3.nodeSize;
|
|
160108
|
+
const relevantEnd = Math.min(nodeEnd, cursorPos);
|
|
160109
|
+
if (relevantEnd > pos)
|
|
160110
|
+
lastLiveCharPos = relevantEnd - 1;
|
|
160111
|
+
});
|
|
160112
|
+
return lastLiveCharPos;
|
|
160113
|
+
}, replaceAroundStep = ({ state, tr, step, newTr, map: map$22, doc: doc$2, user, date, originalStep, originalStepIndex }) => {
|
|
160114
|
+
if (!(tr.getMeta("inputType") === "deleteContentBackward"))
|
|
160115
|
+
return;
|
|
160116
|
+
const trackDeleteMarkType = state.schema.marks[TrackDeleteMarkName];
|
|
160117
|
+
const deleteFrom = findPreviousLiveCharPos(doc$2, state.selection.from, trackDeleteMarkType);
|
|
160118
|
+
if (deleteFrom === null)
|
|
160119
|
+
return;
|
|
160120
|
+
const charStep = new ReplaceStep(deleteFrom, deleteFrom + 1, Slice.empty);
|
|
160121
|
+
replaceStep2({
|
|
160122
|
+
state,
|
|
160123
|
+
tr,
|
|
160124
|
+
step: charStep,
|
|
160125
|
+
newTr,
|
|
160126
|
+
map: map$22,
|
|
160127
|
+
doc: doc$2,
|
|
160128
|
+
user,
|
|
160129
|
+
date,
|
|
160130
|
+
originalStep: charStep,
|
|
160131
|
+
originalStepIndex
|
|
160132
|
+
});
|
|
160133
|
+
const trackMeta = newTr.getMeta(TrackChangesBasePluginKey) || {};
|
|
160134
|
+
trackMeta.selectionPos = deleteFrom;
|
|
160135
|
+
newTr.setMeta(TrackChangesBasePluginKey, trackMeta);
|
|
160136
|
+
if (trackMeta.deletionMark) {
|
|
160137
|
+
const ourId = trackMeta.deletionMark.attrs.id;
|
|
160138
|
+
const ourEmail = trackMeta.deletionMark.attrs.authorEmail;
|
|
160139
|
+
const ourDate = trackMeta.deletionMark.attrs.date;
|
|
160140
|
+
const searchTo = Math.min(newTr.doc.content.size, deleteFrom + 20);
|
|
160141
|
+
let contiguous = true;
|
|
160142
|
+
newTr.doc.nodesBetween(deleteFrom, searchTo, (node3, pos) => {
|
|
160143
|
+
if (!contiguous)
|
|
160144
|
+
return false;
|
|
160145
|
+
if (!node3.isText)
|
|
160146
|
+
return;
|
|
160147
|
+
const delMark = node3.marks.find((m$1) => m$1.type.name === TrackDeleteMarkName);
|
|
160148
|
+
if (!delMark) {
|
|
160149
|
+
contiguous = false;
|
|
160150
|
+
return;
|
|
160151
|
+
}
|
|
160152
|
+
if (delMark.attrs.id !== ourId && delMark.attrs.authorEmail === ourEmail && delMark.attrs.date === ourDate) {
|
|
160153
|
+
const merged = state.schema.marks[TrackDeleteMarkName].create({
|
|
160154
|
+
...delMark.attrs,
|
|
160155
|
+
id: ourId
|
|
160156
|
+
});
|
|
160157
|
+
newTr.removeMark(pos, pos + node3.nodeSize, delMark);
|
|
160158
|
+
newTr.addMark(pos, pos + node3.nodeSize, merged);
|
|
160159
|
+
}
|
|
160160
|
+
});
|
|
160161
|
+
}
|
|
160093
160162
|
}, trackedTransaction = ({ tr, state, user }) => {
|
|
160094
160163
|
const onlyInputTypeMeta = [
|
|
160095
160164
|
"inputType",
|
|
@@ -160152,6 +160221,19 @@ var Node$13 = class Node$14 {
|
|
|
160152
160221
|
user,
|
|
160153
160222
|
date
|
|
160154
160223
|
});
|
|
160224
|
+
else if (step instanceof ReplaceAroundStep2)
|
|
160225
|
+
replaceAroundStep({
|
|
160226
|
+
state,
|
|
160227
|
+
tr,
|
|
160228
|
+
step,
|
|
160229
|
+
newTr,
|
|
160230
|
+
map: map$22,
|
|
160231
|
+
doc: doc$2,
|
|
160232
|
+
user,
|
|
160233
|
+
date,
|
|
160234
|
+
originalStep,
|
|
160235
|
+
originalStepIndex
|
|
160236
|
+
});
|
|
160155
160237
|
else
|
|
160156
160238
|
newTr.step(step);
|
|
160157
160239
|
});
|
|
@@ -160162,15 +160244,15 @@ var Node$13 = class Node$14 {
|
|
|
160162
160244
|
if (tr.getMeta("addToHistory") !== undefined)
|
|
160163
160245
|
newTr.setMeta("addToHistory", tr.getMeta("addToHistory"));
|
|
160164
160246
|
const trackMeta = newTr.getMeta(TrackChangesBasePluginKey);
|
|
160165
|
-
if (
|
|
160166
|
-
|
|
160167
|
-
|
|
160168
|
-
|
|
160169
|
-
|
|
160170
|
-
|
|
160171
|
-
|
|
160172
|
-
|
|
160173
|
-
|
|
160247
|
+
if (trackMeta?.selectionPos !== undefined && trackMeta?.selectionPos !== null) {
|
|
160248
|
+
const boundedPos = Math.max(0, Math.min(trackMeta.selectionPos, newTr.doc.content.size));
|
|
160249
|
+
const $pos = newTr.doc.resolve(boundedPos);
|
|
160250
|
+
if ($pos.parent.inlineContent)
|
|
160251
|
+
newTr.setSelection(TextSelection2.create(newTr.doc, boundedPos));
|
|
160252
|
+
else
|
|
160253
|
+
newTr.setSelection(TextSelection2.near($pos, -1));
|
|
160254
|
+
} else if (tr.selectionSet)
|
|
160255
|
+
if (tr.selection instanceof TextSelection2 && (tr.selection.from < state.selection.from || tr.getMeta("inputType") === "deleteContentBackward")) {
|
|
160174
160256
|
const caretPos = map$22.map(tr.selection.from, -1);
|
|
160175
160257
|
newTr.setSelection(new TextSelection2(newTr.doc.resolve(caretPos)));
|
|
160176
160258
|
} else if (trackMeta?.insertedTo !== undefined) {
|
|
@@ -177634,7 +177716,7 @@ var Node$13 = class Node$14 {
|
|
|
177634
177716
|
from: from$12,
|
|
177635
177717
|
to
|
|
177636
177718
|
};
|
|
177637
|
-
}, trackInsertClass = "track-insert", TrackInsert, trackDeleteClass = "track-delete", TrackDelete,
|
|
177719
|
+
}, trackInsertClass = "track-insert", TrackInsert, trackDeleteClass = "track-delete", TrackDelete, markWrapping = () => {}, parseFormatList = (str) => {
|
|
177638
177720
|
if (!str)
|
|
177639
177721
|
return [];
|
|
177640
177722
|
let formatList;
|
|
@@ -179933,7 +180015,7 @@ var Node$13 = class Node$14 {
|
|
|
179933
180015
|
trackedChanges: context.trackedChanges ?? []
|
|
179934
180016
|
});
|
|
179935
180017
|
}, _hoisted_1$6, _hoisted_2$2, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, POPOVER_VERTICAL_OFFSET_PX = 15, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
|
|
179936
|
-
var
|
|
180018
|
+
var init_src_DarWYxL0_es = __esm(() => {
|
|
179937
180019
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
179938
180020
|
init_SuperConverter_Ba_l6vso_es();
|
|
179939
180021
|
init_jszip_ChlR43oI_es();
|
|
@@ -211240,8 +211322,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211240
211322
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
211241
211323
|
};
|
|
211242
211324
|
stubFalse_default = stubFalse;
|
|
211243
|
-
freeExports$2 = typeof
|
|
211244
|
-
freeModule$2 = freeExports$2 && typeof
|
|
211325
|
+
freeExports$2 = typeof exports_src_DarWYxL0_es == "object" && exports_src_DarWYxL0_es && !exports_src_DarWYxL0_es.nodeType && exports_src_DarWYxL0_es;
|
|
211326
|
+
freeModule$2 = freeExports$2 && typeof module_src_DarWYxL0_es == "object" && module_src_DarWYxL0_es && !module_src_DarWYxL0_es.nodeType && module_src_DarWYxL0_es;
|
|
211245
211327
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
211246
211328
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
211247
211329
|
typedArrayTags = {};
|
|
@@ -211249,8 +211331,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211249
211331
|
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
|
|
211250
211332
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
211251
211333
|
_baseUnary_default = baseUnary;
|
|
211252
|
-
freeExports$1 = typeof
|
|
211253
|
-
freeModule$1 = freeExports$1 && typeof
|
|
211334
|
+
freeExports$1 = typeof exports_src_DarWYxL0_es == "object" && exports_src_DarWYxL0_es && !exports_src_DarWYxL0_es.nodeType && exports_src_DarWYxL0_es;
|
|
211335
|
+
freeModule$1 = freeExports$1 && typeof module_src_DarWYxL0_es == "object" && module_src_DarWYxL0_es && !module_src_DarWYxL0_es.nodeType && module_src_DarWYxL0_es;
|
|
211254
211336
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
211255
211337
|
_nodeUtil_default = function() {
|
|
211256
211338
|
try {
|
|
@@ -211355,8 +211437,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
211355
211437
|
Stack.prototype.has = _stackHas_default;
|
|
211356
211438
|
Stack.prototype.set = _stackSet_default;
|
|
211357
211439
|
_Stack_default = Stack;
|
|
211358
|
-
freeExports = typeof
|
|
211359
|
-
freeModule = freeExports && typeof
|
|
211440
|
+
freeExports = typeof exports_src_DarWYxL0_es == "object" && exports_src_DarWYxL0_es && !exports_src_DarWYxL0_es.nodeType && exports_src_DarWYxL0_es;
|
|
211441
|
+
freeModule = freeExports && typeof module_src_DarWYxL0_es == "object" && module_src_DarWYxL0_es && !module_src_DarWYxL0_es.nodeType && module_src_DarWYxL0_es;
|
|
211360
211442
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
211361
211443
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
211362
211444
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -219436,7 +219518,7 @@ var init_zipper_Cnk_HjM2_es = __esm(() => {
|
|
|
219436
219518
|
|
|
219437
219519
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
219438
219520
|
var init_super_editor_es = __esm(() => {
|
|
219439
|
-
|
|
219521
|
+
init_src_DarWYxL0_es();
|
|
219440
219522
|
init_SuperConverter_Ba_l6vso_es();
|
|
219441
219523
|
init_jszip_ChlR43oI_es();
|
|
219442
219524
|
init_xml_js_DLE8mr0n_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"@types/bun": "^1.3.8",
|
|
20
20
|
"@types/node": "22.19.2",
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
|
+
"@superdoc/document-api": "0.0.1",
|
|
22
23
|
"@superdoc/pm-adapter": "0.0.0",
|
|
23
|
-
"superdoc": "1.16.0",
|
|
24
24
|
"@superdoc/super-editor": "0.0.1",
|
|
25
|
-
"
|
|
25
|
+
"superdoc": "1.16.0"
|
|
26
26
|
},
|
|
27
27
|
"module": "src/index.ts",
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
33
|
-
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.
|
|
36
|
-
"@superdoc-dev/cli-windows-x64": "0.2.0-next.
|
|
32
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.62",
|
|
33
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.62",
|
|
34
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.62",
|
|
35
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.62",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.62"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "bun run src/index.ts",
|