@superdoc-dev/cli 0.2.0-next.125 → 0.2.0-next.126
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 +35 -6
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -135072,7 +135072,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
135072
135072
|
init_remark_gfm_z_sDF4ss_es();
|
|
135073
135073
|
});
|
|
135074
135074
|
|
|
135075
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
135075
|
+
// ../../packages/superdoc/dist/chunks/src-CfMc8y28.es.js
|
|
135076
135076
|
function deleteProps(obj, propOrProps) {
|
|
135077
135077
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
135078
135078
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -197545,10 +197545,29 @@ var Node$13 = class Node$14 {
|
|
|
197545
197545
|
newTr.setMeta(CommentsPluginKey, { type: "force" });
|
|
197546
197546
|
}, require_lodash, import_lodash$1, normalizeAttrs = (attrs = {}) => {
|
|
197547
197547
|
return Object.fromEntries(Object.entries(attrs).filter(([, value]) => value !== null && value !== undefined));
|
|
197548
|
-
},
|
|
197549
|
-
|
|
197548
|
+
}, IDENTITY_ATTR_VALUES, ATTRIBUTE_ONLY_MARKS, normalizeSnapshotAttrs = (attrs = {}) => {
|
|
197549
|
+
const base$1 = normalizeAttrs(attrs);
|
|
197550
|
+
return Object.fromEntries(Object.entries(base$1).filter(([key$1, value]) => IDENTITY_ATTR_VALUES[key$1] !== value));
|
|
197550
197551
|
}, getTypeName = (markLike) => {
|
|
197551
197552
|
return markLike?.type?.name ?? markLike?.type;
|
|
197553
|
+
}, isTrackFormatNoOp = (before, after) => {
|
|
197554
|
+
const normalize$1 = (entries) => entries.map((s2) => ({
|
|
197555
|
+
type: getTypeName(s2),
|
|
197556
|
+
attrs: normalizeSnapshotAttrs(s2.attrs || {})
|
|
197557
|
+
})).filter((s2) => {
|
|
197558
|
+
if (ATTRIBUTE_ONLY_MARKS.includes(s2.type) && Object.keys(s2.attrs).length === 0)
|
|
197559
|
+
return false;
|
|
197560
|
+
return true;
|
|
197561
|
+
});
|
|
197562
|
+
const normBefore = normalize$1(before);
|
|
197563
|
+
const normAfter = normalize$1(after);
|
|
197564
|
+
if (normBefore.length === 0 && normAfter.length === 0)
|
|
197565
|
+
return true;
|
|
197566
|
+
if (normBefore.length !== normAfter.length)
|
|
197567
|
+
return false;
|
|
197568
|
+
return normBefore.every((b$1) => normAfter.some((a2) => a2.type === b$1.type && (0, import_lodash$1.isEqual)(a2.attrs, b$1.attrs))) && normAfter.every((a2) => normBefore.some((b$1) => b$1.type === a2.type && (0, import_lodash$1.isEqual)(b$1.attrs, a2.attrs)));
|
|
197569
|
+
}, attrsExactlyMatch = (left$1 = {}, right$1 = {}) => {
|
|
197570
|
+
return (0, import_lodash$1.isEqual)(normalizeAttrs(left$1), normalizeAttrs(right$1));
|
|
197552
197571
|
}, marksMatch = (left$1, right$1, exact = true) => {
|
|
197553
197572
|
if (!left$1 || !right$1 || getTypeName(left$1) !== getTypeName(right$1))
|
|
197554
197573
|
return false;
|
|
@@ -197651,7 +197670,7 @@ var Node$13 = class Node$14 {
|
|
|
197651
197670
|
if (formatChangeMark)
|
|
197652
197671
|
if (formatChangeMark.attrs.before.find((mark2) => markSnapshotMatchesStepMark(mark2, step3.mark, true))) {
|
|
197653
197672
|
before = [...formatChangeMark.attrs.before.filter((mark2) => !markSnapshotMatchesStepMark(mark2, step3.mark, true))];
|
|
197654
|
-
after =
|
|
197673
|
+
after = formatChangeMark.attrs.after.filter((mark2) => getTypeName(mark2) !== step3.mark.type.name);
|
|
197655
197674
|
} else {
|
|
197656
197675
|
before = [...formatChangeMark.attrs.before];
|
|
197657
197676
|
after = upsertMarkSnapshotByType(formatChangeMark.attrs.after, {
|
|
@@ -197670,6 +197689,11 @@ var Node$13 = class Node$14 {
|
|
|
197670
197689
|
attrs: { ...step3.mark.attrs }
|
|
197671
197690
|
}];
|
|
197672
197691
|
}
|
|
197692
|
+
if (isTrackFormatNoOp(before, after)) {
|
|
197693
|
+
if (formatChangeMark)
|
|
197694
|
+
newTr.removeMark(Math.max(step3.from, pos), Math.min(step3.to, pos + node3.nodeSize), formatChangeMark);
|
|
197695
|
+
return;
|
|
197696
|
+
}
|
|
197673
197697
|
if (after.length || before.length) {
|
|
197674
197698
|
const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
|
|
197675
197699
|
id: wid,
|
|
@@ -217791,7 +217815,7 @@ var Node$13 = class Node$14 {
|
|
|
217791
217815
|
return false;
|
|
217792
217816
|
return Boolean(checker(attrs));
|
|
217793
217817
|
}, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
|
|
217794
|
-
var
|
|
217818
|
+
var init_src_CfMc8y28_es = __esm(() => {
|
|
217795
217819
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
217796
217820
|
init_SuperConverter_Cw5CEerM_es();
|
|
217797
217821
|
init_jszip_ChlR43oI_es();
|
|
@@ -225419,6 +225443,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
225419
225443
|
}).call(exports);
|
|
225420
225444
|
});
|
|
225421
225445
|
import_lodash$1 = require_lodash();
|
|
225446
|
+
IDENTITY_ATTR_VALUES = {
|
|
225447
|
+
vertAlign: "baseline",
|
|
225448
|
+
position: "0pt"
|
|
225449
|
+
};
|
|
225450
|
+
ATTRIBUTE_ONLY_MARKS = ["textStyle"];
|
|
225422
225451
|
DOCUMENT_MIGRATIONS = { initial: migration_after_0_4_14 };
|
|
225423
225452
|
AnnotatorHelpers = {
|
|
225424
225453
|
getFieldAttrs,
|
|
@@ -251392,7 +251421,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
251392
251421
|
|
|
251393
251422
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
251394
251423
|
var init_super_editor_es = __esm(() => {
|
|
251395
|
-
|
|
251424
|
+
init_src_CfMc8y28_es();
|
|
251396
251425
|
init_SuperConverter_Cw5CEerM_es();
|
|
251397
251426
|
init_jszip_ChlR43oI_es();
|
|
251398
251427
|
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.126",
|
|
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/
|
|
23
|
+
"@superdoc/document-api": "0.0.1",
|
|
24
24
|
"@superdoc/super-editor": "0.0.1",
|
|
25
|
-
"superdoc": "
|
|
26
|
-
"
|
|
25
|
+
"@superdoc/pm-adapter": "0.0.0",
|
|
26
|
+
"superdoc": "1.18.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.126",
|
|
34
|
+
"@superdoc-dev/cli-darwin-x64": "0.2.0-next.126",
|
|
35
|
+
"@superdoc-dev/cli-linux-x64": "0.2.0-next.126",
|
|
36
|
+
"@superdoc-dev/cli-windows-x64": "0.2.0-next.126",
|
|
37
|
+
"@superdoc-dev/cli-linux-arm64": "0.2.0-next.126"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"dev": "bun run src/index.ts",
|