@superdoc-dev/cli 0.2.0-next.34 → 0.2.0-next.35
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 -13
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -101805,9 +101805,9 @@ var init_remark_gfm_CQ3Jg4PR_es = __esm(() => {
|
|
|
101805
101805
|
init_remark_gfm_z_sDF4ss_es();
|
|
101806
101806
|
});
|
|
101807
101807
|
|
|
101808
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
101809
|
-
var
|
|
101810
|
-
__export(
|
|
101808
|
+
// ../../packages/superdoc/dist/chunks/src-dG-lytW9.es.js
|
|
101809
|
+
var exports_src_dG_lytW9_es = {};
|
|
101810
|
+
__export(exports_src_dG_lytW9_es, {
|
|
101811
101811
|
zt: () => defineMark,
|
|
101812
101812
|
z: () => cM,
|
|
101813
101813
|
yt: () => removeAwarenessStates,
|
|
@@ -115851,6 +115851,16 @@ function insertRowAtIndex({ tr, tablePos, tableNode, sourceRowIndex, insertIndex
|
|
|
115851
115851
|
function generateParaId() {
|
|
115852
115852
|
return Array.from({ length: 8 }, () => Math.floor(Math.random() * 16).toString(16)).join("").toUpperCase();
|
|
115853
115853
|
}
|
|
115854
|
+
function createSeparatorParagraph(schema) {
|
|
115855
|
+
const paragraphType = schema.nodes.paragraph;
|
|
115856
|
+
if (!paragraphType)
|
|
115857
|
+
return null;
|
|
115858
|
+
const separatorAttrs = {
|
|
115859
|
+
sdBlockId: v4_default(),
|
|
115860
|
+
paraId: generateParaId()
|
|
115861
|
+
};
|
|
115862
|
+
return paragraphType.createAndFill(separatorAttrs) ?? paragraphType.createAndFill();
|
|
115863
|
+
}
|
|
115854
115864
|
function buildTableSuccess(tableAddress, trackedChangeRefs) {
|
|
115855
115865
|
return {
|
|
115856
115866
|
success: true,
|
|
@@ -116840,8 +116850,12 @@ function tablesSplitAdapter(editor, input2, options) {
|
|
|
116840
116850
|
delete newTableAttrs.paraId;
|
|
116841
116851
|
delete newTableAttrs.textId;
|
|
116842
116852
|
const newTable = schema.nodes.table.create(newTableAttrs, secondTableRows);
|
|
116853
|
+
const separatorParagraph = createSeparatorParagraph(schema);
|
|
116854
|
+
if (!separatorParagraph)
|
|
116855
|
+
return toTableFailure("INVALID_TARGET", "Table split could not create a separator paragraph.");
|
|
116843
116856
|
const insertPos = tr.mapping.slice(mapFrom).map(tablePos + tableNode.nodeSize);
|
|
116844
|
-
tr.insert(insertPos,
|
|
116857
|
+
tr.insert(insertPos, separatorParagraph);
|
|
116858
|
+
tr.insert(insertPos + separatorParagraph.nodeSize, newTable);
|
|
116845
116859
|
applyDirectMutationMeta(tr);
|
|
116846
116860
|
editor.dispatch(tr);
|
|
116847
116861
|
clearIndexCache(editor);
|
|
@@ -117601,6 +117615,38 @@ function tablesSetShadingAdapter(editor, input2, options) {
|
|
|
117601
117615
|
[propsKey]: currentProps,
|
|
117602
117616
|
...syncAttrs
|
|
117603
117617
|
});
|
|
117618
|
+
if (resolved.scope === "table") {
|
|
117619
|
+
const tableNode = resolved.node;
|
|
117620
|
+
const tableStart = resolved.pos + 1;
|
|
117621
|
+
const map$22 = TableMap.get(tableNode);
|
|
117622
|
+
const seen = /* @__PURE__ */ new Set;
|
|
117623
|
+
const mapFrom = tr.mapping.maps.length;
|
|
117624
|
+
for (let i$1 = 0;i$1 < map$22.map.length; i$1++) {
|
|
117625
|
+
const relPos = map$22.map[i$1];
|
|
117626
|
+
if (seen.has(relPos))
|
|
117627
|
+
continue;
|
|
117628
|
+
seen.add(relPos);
|
|
117629
|
+
const cellNode = tableNode.nodeAt(relPos);
|
|
117630
|
+
if (!cellNode)
|
|
117631
|
+
continue;
|
|
117632
|
+
const cellAttrs = cellNode.attrs;
|
|
117633
|
+
const cellProps = { ...cellAttrs.tableCellProperties ?? {} };
|
|
117634
|
+
cellProps.shading = {
|
|
117635
|
+
fill: input2.color,
|
|
117636
|
+
val: "clear",
|
|
117637
|
+
color: "auto"
|
|
117638
|
+
};
|
|
117639
|
+
const nextCellAttrs = {
|
|
117640
|
+
...cellAttrs,
|
|
117641
|
+
tableCellProperties: cellProps
|
|
117642
|
+
};
|
|
117643
|
+
if (input2.color === "auto")
|
|
117644
|
+
delete nextCellAttrs.background;
|
|
117645
|
+
else
|
|
117646
|
+
nextCellAttrs.background = { color: input2.color };
|
|
117647
|
+
tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(tableStart + relPos), null, nextCellAttrs);
|
|
117648
|
+
}
|
|
117649
|
+
}
|
|
117604
117650
|
applyDirectMutationMeta(tr);
|
|
117605
117651
|
editor.dispatch(tr);
|
|
117606
117652
|
clearIndexCache(editor);
|
|
@@ -173086,7 +173132,7 @@ var Node$13 = class Node$14 {
|
|
|
173086
173132
|
trackedChanges: context.trackedChanges ?? []
|
|
173087
173133
|
});
|
|
173088
173134
|
}, _hoisted_1$6, _hoisted_2$1, _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, RESIZE_HANDLE_WIDTH_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, 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;
|
|
173089
|
-
var
|
|
173135
|
+
var init_src_dG_lytW9_es = __esm(() => {
|
|
173090
173136
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
173091
173137
|
init_SuperConverter_BSZgN87C_es();
|
|
173092
173138
|
init_jszip_ChlR43oI_es();
|
|
@@ -203979,8 +204025,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
203979
204025
|
return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
203980
204026
|
};
|
|
203981
204027
|
stubFalse_default = stubFalse;
|
|
203982
|
-
freeExports$2 = typeof
|
|
203983
|
-
freeModule$2 = freeExports$2 && typeof
|
|
204028
|
+
freeExports$2 = typeof exports_src_dG_lytW9_es == "object" && exports_src_dG_lytW9_es && !exports_src_dG_lytW9_es.nodeType && exports_src_dG_lytW9_es;
|
|
204029
|
+
freeModule$2 = freeExports$2 && typeof module_src_dG_lytW9_es == "object" && module_src_dG_lytW9_es && !module_src_dG_lytW9_es.nodeType && module_src_dG_lytW9_es;
|
|
203984
204030
|
Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
|
|
203985
204031
|
isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
|
|
203986
204032
|
typedArrayTags = {};
|
|
@@ -203988,8 +204034,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
203988
204034
|
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;
|
|
203989
204035
|
_baseIsTypedArray_default = baseIsTypedArray;
|
|
203990
204036
|
_baseUnary_default = baseUnary;
|
|
203991
|
-
freeExports$1 = typeof
|
|
203992
|
-
freeModule$1 = freeExports$1 && typeof
|
|
204037
|
+
freeExports$1 = typeof exports_src_dG_lytW9_es == "object" && exports_src_dG_lytW9_es && !exports_src_dG_lytW9_es.nodeType && exports_src_dG_lytW9_es;
|
|
204038
|
+
freeModule$1 = freeExports$1 && typeof module_src_dG_lytW9_es == "object" && module_src_dG_lytW9_es && !module_src_dG_lytW9_es.nodeType && module_src_dG_lytW9_es;
|
|
203993
204039
|
freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
|
|
203994
204040
|
_nodeUtil_default = function() {
|
|
203995
204041
|
try {
|
|
@@ -204094,8 +204140,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
204094
204140
|
Stack.prototype.has = _stackHas_default;
|
|
204095
204141
|
Stack.prototype.set = _stackSet_default;
|
|
204096
204142
|
_Stack_default = Stack;
|
|
204097
|
-
freeExports = typeof
|
|
204098
|
-
freeModule = freeExports && typeof
|
|
204143
|
+
freeExports = typeof exports_src_dG_lytW9_es == "object" && exports_src_dG_lytW9_es && !exports_src_dG_lytW9_es.nodeType && exports_src_dG_lytW9_es;
|
|
204144
|
+
freeModule = freeExports && typeof module_src_dG_lytW9_es == "object" && module_src_dG_lytW9_es && !module_src_dG_lytW9_es.nodeType && module_src_dG_lytW9_es;
|
|
204099
204145
|
Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
|
|
204100
204146
|
allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
|
|
204101
204147
|
_cloneBuffer_default = cloneBuffer;
|
|
@@ -211747,7 +211793,7 @@ var init_zipper_Cnk_HjM2_es = __esm(() => {
|
|
|
211747
211793
|
|
|
211748
211794
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
211749
211795
|
var init_super_editor_es = __esm(() => {
|
|
211750
|
-
|
|
211796
|
+
init_src_dG_lytW9_es();
|
|
211751
211797
|
init_SuperConverter_BSZgN87C_es();
|
|
211752
211798
|
init_jszip_ChlR43oI_es();
|
|
211753
211799
|
init_xml_js_DLE8mr0n_es();
|
|
@@ -271393,6 +271439,16 @@ var init_appendRows = __esm(() => {
|
|
|
271393
271439
|
function generateParaId2() {
|
|
271394
271440
|
return Array.from({ length: 8 }, () => Math.floor(Math.random() * 16).toString(16)).join("").toUpperCase();
|
|
271395
271441
|
}
|
|
271442
|
+
function createSeparatorParagraph2(schema) {
|
|
271443
|
+
const paragraphType = schema.nodes.paragraph;
|
|
271444
|
+
if (!paragraphType)
|
|
271445
|
+
return null;
|
|
271446
|
+
const separatorAttrs = {
|
|
271447
|
+
sdBlockId: v42(),
|
|
271448
|
+
paraId: generateParaId2()
|
|
271449
|
+
};
|
|
271450
|
+
return paragraphType.createAndFill(separatorAttrs) ?? paragraphType.createAndFill();
|
|
271451
|
+
}
|
|
271396
271452
|
function buildTableSuccess2(tableAddress, trackedChangeRefs) {
|
|
271397
271453
|
return {
|
|
271398
271454
|
success: true,
|
|
@@ -272367,8 +272423,13 @@ function tablesSplitAdapter2(editor, input2, options) {
|
|
|
272367
272423
|
delete newTableAttrs.paraId;
|
|
272368
272424
|
delete newTableAttrs.textId;
|
|
272369
272425
|
const newTable = schema.nodes.table.create(newTableAttrs, secondTableRows);
|
|
272426
|
+
const separatorParagraph = createSeparatorParagraph2(schema);
|
|
272427
|
+
if (!separatorParagraph) {
|
|
272428
|
+
return toTableFailure2("INVALID_TARGET", "Table split could not create a separator paragraph.");
|
|
272429
|
+
}
|
|
272370
272430
|
const insertPos = tr.mapping.slice(mapFrom).map(tablePos + tableNode.nodeSize);
|
|
272371
|
-
tr.insert(insertPos,
|
|
272431
|
+
tr.insert(insertPos, separatorParagraph);
|
|
272432
|
+
tr.insert(insertPos + separatorParagraph.nodeSize, newTable);
|
|
272372
272433
|
applyDirectMutationMeta2(tr);
|
|
272373
272434
|
editor.dispatch(tr);
|
|
272374
272435
|
clearIndexCache2(editor);
|
|
@@ -273134,6 +273195,34 @@ function tablesSetShadingAdapter2(editor, input2, options) {
|
|
|
273134
273195
|
currentProps.shading = { fill: input2.color, val: "clear", color: "auto" };
|
|
273135
273196
|
const syncAttrs = resolved.scope === "table" ? syncExtractedTableAttrs2(currentProps) : {};
|
|
273136
273197
|
tr.setNodeMarkup(resolved.pos, null, { ...currentAttrs, [propsKey]: currentProps, ...syncAttrs });
|
|
273198
|
+
if (resolved.scope === "table") {
|
|
273199
|
+
const tableNode = resolved.node;
|
|
273200
|
+
const tableStart = resolved.pos + 1;
|
|
273201
|
+
const map8 = TableMap2.get(tableNode);
|
|
273202
|
+
const seen = new Set;
|
|
273203
|
+
const mapFrom = tr.mapping.maps.length;
|
|
273204
|
+
for (let i5 = 0;i5 < map8.map.length; i5++) {
|
|
273205
|
+
const relPos = map8.map[i5];
|
|
273206
|
+
if (seen.has(relPos))
|
|
273207
|
+
continue;
|
|
273208
|
+
seen.add(relPos);
|
|
273209
|
+
const cellNode = tableNode.nodeAt(relPos);
|
|
273210
|
+
if (!cellNode)
|
|
273211
|
+
continue;
|
|
273212
|
+
const cellAttrs = cellNode.attrs;
|
|
273213
|
+
const cellProps = { ...cellAttrs.tableCellProperties ?? {} };
|
|
273214
|
+
cellProps.shading = { fill: input2.color, val: "clear", color: "auto" };
|
|
273215
|
+
const nextCellAttrs = {
|
|
273216
|
+
...cellAttrs,
|
|
273217
|
+
tableCellProperties: cellProps
|
|
273218
|
+
};
|
|
273219
|
+
if (input2.color === "auto")
|
|
273220
|
+
delete nextCellAttrs.background;
|
|
273221
|
+
else
|
|
273222
|
+
nextCellAttrs.background = { color: input2.color };
|
|
273223
|
+
tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(tableStart + relPos), null, nextCellAttrs);
|
|
273224
|
+
}
|
|
273225
|
+
}
|
|
273137
273226
|
applyDirectMutationMeta2(tr);
|
|
273138
273227
|
editor.dispatch(tr);
|
|
273139
273228
|
clearIndexCache2(editor);
|
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.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.
|
|
33
|
-
"@superdoc-dev/cli-
|
|
34
|
-
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.
|
|
35
|
-
"@superdoc-dev/cli-
|
|
36
|
-
"@superdoc-dev/cli-windows-x64": "0.2.0-next.
|
|
32
|
+
"@superdoc-dev/cli-darwin-arm64": "0.2.0-next.35",
|
|
33
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.35",
|
|
34
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.35",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.35",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.35"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "bun run src/index.ts",
|