@superdoc-dev/cli 0.2.0-next.92 → 0.2.0-next.93
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 +42 -17
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -121884,9 +121884,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
121884
121884
|
init_remark_gfm_z_sDF4ss_es();
|
|
121885
121885
|
});
|
|
121886
121886
|
|
|
121887
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
121888
|
-
var
|
|
121889
|
-
__export(
|
|
121887
|
+
// ../../packages/superdoc/dist/chunks/src-DJwSvw2I.es.js
|
|
121888
|
+
var exports_src_DJwSvw2I_es = {};
|
|
121889
|
+
__export(exports_src_DJwSvw2I_es, {
|
|
121890
121890
|
zt: () => defineMark,
|
|
121891
121891
|
z: () => cM,
|
|
121892
121892
|
yt: () => removeAwarenessStates,
|
|
@@ -133170,6 +133170,18 @@ function editorHasDom(editor) {
|
|
|
133170
133170
|
const opts = editor.options;
|
|
133171
133171
|
return !!(opts?.document ?? opts?.mockDocument ?? (typeof document !== "undefined" ? document : null));
|
|
133172
133172
|
}
|
|
133173
|
+
function isMismatchedTransactionError(error) {
|
|
133174
|
+
return (error instanceof Error ? error.message : String(error)).includes("Applying a mismatched transaction");
|
|
133175
|
+
}
|
|
133176
|
+
function insertContentAtWithRetry(editor, range, content3) {
|
|
133177
|
+
try {
|
|
133178
|
+
return Boolean(editor.commands.insertContentAt(range, content3));
|
|
133179
|
+
} catch (error) {
|
|
133180
|
+
if (!isMismatchedTransactionError(error))
|
|
133181
|
+
throw error;
|
|
133182
|
+
return Boolean(editor.commands.insertContentAt(range, content3));
|
|
133183
|
+
}
|
|
133184
|
+
}
|
|
133173
133185
|
function isJsonObject(value) {
|
|
133174
133186
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
133175
133187
|
}
|
|
@@ -133673,10 +133685,10 @@ function insertStructuredWrapper(editor, input2, options) {
|
|
|
133673
133685
|
jsonNodes.push({ type: "paragraph" });
|
|
133674
133686
|
}
|
|
133675
133687
|
}
|
|
133676
|
-
const ok3 =
|
|
133688
|
+
const ok3 = insertContentAtWithRetry(editor, {
|
|
133677
133689
|
from: from$12,
|
|
133678
133690
|
to
|
|
133679
|
-
}, jsonNodes)
|
|
133691
|
+
}, jsonNodes);
|
|
133680
133692
|
if (!ok3)
|
|
133681
133693
|
insertFailure = {
|
|
133682
133694
|
code: "INVALID_TARGET",
|
|
@@ -133692,10 +133704,10 @@ function insertStructuredWrapper(editor, input2, options) {
|
|
|
133692
133704
|
return false;
|
|
133693
133705
|
}
|
|
133694
133706
|
try {
|
|
133695
|
-
const ok3 =
|
|
133707
|
+
const ok3 = insertContentAtWithRetry(editor, {
|
|
133696
133708
|
from: from$12,
|
|
133697
133709
|
to
|
|
133698
|
-
}, value)
|
|
133710
|
+
}, value);
|
|
133699
133711
|
if (!ok3)
|
|
133700
133712
|
insertFailure = {
|
|
133701
133713
|
code: "INVALID_TARGET",
|
|
@@ -199096,7 +199108,7 @@ var Node$13 = class Node$14 {
|
|
|
199096
199108
|
trackedChanges: context.trackedChanges ?? []
|
|
199097
199109
|
});
|
|
199098
199110
|
}, _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;
|
|
199099
|
-
var
|
|
199111
|
+
var init_src_DJwSvw2I_es = __esm(() => {
|
|
199100
199112
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
199101
199113
|
init_SuperConverter_6i_hCnOE_es();
|
|
199102
199114
|
init_jszip_ChlR43oI_es();
|
|
@@ -230833,8 +230845,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
230833
230845
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
230834
230846
|
};
|
|
230835
230847
|
stubFalse_default = stubFalse;
|
|
230836
|
-
freeExports$2 = typeof
|
|
230837
|
-
freeModule$2 = freeExports$2 && typeof
|
|
230848
|
+
freeExports$2 = typeof exports_src_DJwSvw2I_es == "object" && exports_src_DJwSvw2I_es && !exports_src_DJwSvw2I_es.nodeType && exports_src_DJwSvw2I_es;
|
|
230849
|
+
freeModule$2 = freeExports$2 && typeof module_src_DJwSvw2I_es == "object" && module_src_DJwSvw2I_es && !module_src_DJwSvw2I_es.nodeType && module_src_DJwSvw2I_es;
|
|
230838
230850
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
230839
230851
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
230840
230852
|
typedArrayTags = {};
|
|
@@ -230842,8 +230854,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
230842
230854
|
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;
|
|
230843
230855
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
230844
230856
|
_baseUnary_default = baseUnary;
|
|
230845
|
-
freeExports$1 = typeof
|
|
230846
|
-
freeModule$1 = freeExports$1 && typeof
|
|
230857
|
+
freeExports$1 = typeof exports_src_DJwSvw2I_es == "object" && exports_src_DJwSvw2I_es && !exports_src_DJwSvw2I_es.nodeType && exports_src_DJwSvw2I_es;
|
|
230858
|
+
freeModule$1 = freeExports$1 && typeof module_src_DJwSvw2I_es == "object" && module_src_DJwSvw2I_es && !module_src_DJwSvw2I_es.nodeType && module_src_DJwSvw2I_es;
|
|
230847
230859
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
230848
230860
|
_nodeUtil_default = function() {
|
|
230849
230861
|
try {
|
|
@@ -230948,8 +230960,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
230948
230960
|
Stack.prototype.has = _stackHas_default;
|
|
230949
230961
|
Stack.prototype.set = _stackSet_default;
|
|
230950
230962
|
_Stack_default = Stack;
|
|
230951
|
-
freeExports = typeof
|
|
230952
|
-
freeModule = freeExports && typeof
|
|
230963
|
+
freeExports = typeof exports_src_DJwSvw2I_es == "object" && exports_src_DJwSvw2I_es && !exports_src_DJwSvw2I_es.nodeType && exports_src_DJwSvw2I_es;
|
|
230964
|
+
freeModule = freeExports && typeof module_src_DJwSvw2I_es == "object" && module_src_DJwSvw2I_es && !module_src_DJwSvw2I_es.nodeType && module_src_DJwSvw2I_es;
|
|
230953
230965
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
230954
230966
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
230955
230967
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -239029,7 +239041,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
239029
239041
|
|
|
239030
239042
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
239031
239043
|
var init_super_editor_es = __esm(() => {
|
|
239032
|
-
|
|
239044
|
+
init_src_DJwSvw2I_es();
|
|
239033
239045
|
init_SuperConverter_6i_hCnOE_es();
|
|
239034
239046
|
init_jszip_ChlR43oI_es();
|
|
239035
239047
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -304027,6 +304039,19 @@ function editorHasDom2(editor) {
|
|
|
304027
304039
|
const opts = editor.options;
|
|
304028
304040
|
return !!(opts?.document ?? opts?.mockDocument ?? (typeof document !== "undefined" ? document : null));
|
|
304029
304041
|
}
|
|
304042
|
+
function isMismatchedTransactionError2(error) {
|
|
304043
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
304044
|
+
return message.includes("Applying a mismatched transaction");
|
|
304045
|
+
}
|
|
304046
|
+
function insertContentAtWithRetry2(editor, range, content5) {
|
|
304047
|
+
try {
|
|
304048
|
+
return Boolean(editor.commands.insertContentAt(range, content5));
|
|
304049
|
+
} catch (error) {
|
|
304050
|
+
if (!isMismatchedTransactionError2(error))
|
|
304051
|
+
throw error;
|
|
304052
|
+
return Boolean(editor.commands.insertContentAt(range, content5));
|
|
304053
|
+
}
|
|
304054
|
+
}
|
|
304030
304055
|
function isJsonObject2(value) {
|
|
304031
304056
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
304032
304057
|
}
|
|
@@ -304471,7 +304496,7 @@ function insertStructuredWrapper2(editor, input2, options) {
|
|
|
304471
304496
|
}
|
|
304472
304497
|
}
|
|
304473
304498
|
}
|
|
304474
|
-
const ok5 =
|
|
304499
|
+
const ok5 = insertContentAtWithRetry2(editor, { from: from4, to }, jsonNodes);
|
|
304475
304500
|
if (!ok5) {
|
|
304476
304501
|
insertFailure = {
|
|
304477
304502
|
code: "INVALID_TARGET",
|
|
@@ -304488,7 +304513,7 @@ function insertStructuredWrapper2(editor, input2, options) {
|
|
|
304488
304513
|
return false;
|
|
304489
304514
|
}
|
|
304490
304515
|
try {
|
|
304491
|
-
const ok5 =
|
|
304516
|
+
const ok5 = insertContentAtWithRetry2(editor, { from: from4, to }, value);
|
|
304492
304517
|
if (!ok5) {
|
|
304493
304518
|
insertFailure = {
|
|
304494
304519
|
code: "INVALID_TARGET",
|
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.93",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"@types/bun": "^1.3.8",
|
|
21
21
|
"@types/node": "22.19.2",
|
|
22
22
|
"typescript": "^5.9.2",
|
|
23
|
-
"@superdoc/pm-adapter": "0.0.0",
|
|
24
|
-
"superdoc": "1.17.0",
|
|
25
23
|
"@superdoc/document-api": "0.0.1",
|
|
26
|
-
"@superdoc/super-editor": "0.0.1"
|
|
24
|
+
"@superdoc/super-editor": "0.0.1",
|
|
25
|
+
"@superdoc/pm-adapter": "0.0.0",
|
|
26
|
+
"superdoc": "1.17.0"
|
|
27
27
|
},
|
|
28
28
|
"module": "src/index.ts",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
34
|
-
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-linux-x64": "0.2.0-next.
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.93",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.93",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.93",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.93",
|
|
37
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.93"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "bun run src/index.ts",
|