@superdoc-dev/cli 0.3.1-next.1 → 0.4.0-next.2
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 +30 -10
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -154303,7 +154303,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
|
|
|
154303
154303
|
init_remark_gfm_z_sDF4ss_es();
|
|
154304
154304
|
});
|
|
154305
154305
|
|
|
154306
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
154306
|
+
// ../../packages/superdoc/dist/chunks/src-D3H7T1qq.es.js
|
|
154307
154307
|
function deleteProps(obj, propOrProps) {
|
|
154308
154308
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
154309
154309
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -156061,6 +156061,8 @@ function createStructuredContentLockPlugin() {
|
|
|
156061
156061
|
filterTransaction(tr, state) {
|
|
156062
156062
|
if (!tr.docChanged)
|
|
156063
156063
|
return true;
|
|
156064
|
+
if (tr.getMeta?.(ySyncPluginKey))
|
|
156065
|
+
return true;
|
|
156064
156066
|
const sdtNodes = STRUCTURED_CONTENT_LOCK_KEY.getState(state);
|
|
156065
156067
|
if (sdtNodes.length === 0)
|
|
156066
156068
|
return true;
|
|
@@ -160067,13 +160069,20 @@ function createChartImmutabilityPlugin() {
|
|
|
160067
160069
|
init(_$1, state) {
|
|
160068
160070
|
return countChartNodes(state.doc);
|
|
160069
160071
|
},
|
|
160070
|
-
apply(
|
|
160072
|
+
apply(tr, oldCount, _oldState, newState) {
|
|
160073
|
+
if (tr.docChanged && tr.getMeta?.(ySyncPluginKey)) {
|
|
160074
|
+
if (oldCount === 0 && !transactionInsertsChart(tr))
|
|
160075
|
+
return 0;
|
|
160076
|
+
return countChartNodes(newState.doc);
|
|
160077
|
+
}
|
|
160071
160078
|
return oldCount;
|
|
160072
160079
|
}
|
|
160073
160080
|
},
|
|
160074
160081
|
filterTransaction(tr, state) {
|
|
160075
160082
|
if (!tr.docChanged)
|
|
160076
160083
|
return true;
|
|
160084
|
+
if (tr.getMeta?.(ySyncPluginKey))
|
|
160085
|
+
return true;
|
|
160077
160086
|
if ((CHART_IMMUTABILITY_KEY.getState(state) ?? 0) === 0)
|
|
160078
160087
|
return !transactionInsertsChart(tr);
|
|
160079
160088
|
return !isChartMutation(tr, state.doc);
|
|
@@ -197672,7 +197681,8 @@ function findAllBibliographies(doc$12) {
|
|
|
197672
197681
|
let occurrenceIndex = 0;
|
|
197673
197682
|
doc$12.descendants((node3, pos) => {
|
|
197674
197683
|
if (node3.type.name === "bibliography") {
|
|
197675
|
-
const
|
|
197684
|
+
const rawBlockId = node3.attrs?.sdBlockId;
|
|
197685
|
+
const commandNodeId = rawBlockId != null ? String(rawBlockId) : undefined;
|
|
197676
197686
|
const nodeId = resolvePublicReferenceBlockNodeId(node3, occurrenceIndex);
|
|
197677
197687
|
occurrenceIndex += 1;
|
|
197678
197688
|
results.push({
|
|
@@ -197745,9 +197755,9 @@ function resolveSourceTarget(editor, target) {
|
|
|
197745
197755
|
function resolveParentBlockId$1(doc$12, pos) {
|
|
197746
197756
|
const resolved = doc$12.resolve(pos);
|
|
197747
197757
|
for (let depth = resolved.depth;depth >= 0; depth--) {
|
|
197748
|
-
const
|
|
197749
|
-
if (
|
|
197750
|
-
return
|
|
197758
|
+
const rawBlockId = resolved.node(depth).attrs?.sdBlockId;
|
|
197759
|
+
if (rawBlockId != null)
|
|
197760
|
+
return String(rawBlockId);
|
|
197751
197761
|
}
|
|
197752
197762
|
return "";
|
|
197753
197763
|
}
|
|
@@ -198095,10 +198105,11 @@ function bibliographyInsertWrapper(editor, input2, options) {
|
|
|
198095
198105
|
function bibliographyConfigureWrapper(editor, input2, options) {
|
|
198096
198106
|
rejectTrackedMode("citations.bibliography.configure", options);
|
|
198097
198107
|
const resolved = resolveBibliographyTarget(editor.state.doc, input2.target);
|
|
198108
|
+
const stableNodeId = resolved.commandNodeId ?? resolved.nodeId;
|
|
198098
198109
|
const address2 = {
|
|
198099
198110
|
kind: "block",
|
|
198100
198111
|
nodeType: "bibliography",
|
|
198101
|
-
nodeId:
|
|
198112
|
+
nodeId: stableNodeId
|
|
198102
198113
|
};
|
|
198103
198114
|
if (options?.dryRun)
|
|
198104
198115
|
return bibSuccess(address2);
|
|
@@ -198116,7 +198127,12 @@ function bibliographyConfigureWrapper(editor, input2, options) {
|
|
|
198116
198127
|
}, { expectedRevision: options?.expectedRevision })))
|
|
198117
198128
|
return bibFailure("NO_OP", "Configure produced no change.");
|
|
198118
198129
|
syncBibliographyStyleToConverter(editor, input2.style);
|
|
198119
|
-
|
|
198130
|
+
const bibliographies = findAllBibliographies(editor.state.doc);
|
|
198131
|
+
return bibSuccess({
|
|
198132
|
+
kind: "block",
|
|
198133
|
+
nodeType: "bibliography",
|
|
198134
|
+
nodeId: (bibliographies.find((bibliography) => bibliography.pos === resolved.pos) ?? bibliographies.find((bibliography) => bibliography.commandNodeId === stableNodeId))?.nodeId ?? resolvePostMutationBibliographyId(editor.state.doc, stableNodeId)
|
|
198135
|
+
});
|
|
198120
198136
|
}
|
|
198121
198137
|
function bibliographyRebuildWrapper(editor, input2, options) {
|
|
198122
198138
|
rejectTrackedMode("citations.bibliography.rebuild", options);
|
|
@@ -233856,7 +233872,7 @@ var Node$13 = class Node$14 {
|
|
|
233856
233872
|
return;
|
|
233857
233873
|
console.log(...args$1);
|
|
233858
233874
|
}, 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;
|
|
233859
|
-
var
|
|
233875
|
+
var init_src_D3H7T1qq_es = __esm(() => {
|
|
233860
233876
|
init_rolldown_runtime_B2q5OVn9_es();
|
|
233861
233877
|
init_SuperConverter_V_8WDjnK_es();
|
|
233862
233878
|
init_jszip_ChlR43oI_es();
|
|
@@ -251379,6 +251395,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
251379
251395
|
appendTransaction(transactions, oldState, newState) {
|
|
251380
251396
|
if (!transactions.some((tr$1) => tr$1.docChanged))
|
|
251381
251397
|
return null;
|
|
251398
|
+
if (transactions.some((tr$1) => tr$1.getMeta?.(ySyncPluginKey)))
|
|
251399
|
+
return null;
|
|
251382
251400
|
const permTypes = getPermissionTypeInfo(newState.schema);
|
|
251383
251401
|
if (!permTypes.startTypes.length || !permTypes.endTypes.length)
|
|
251384
251402
|
return null;
|
|
@@ -251434,6 +251452,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
251434
251452
|
filterTransaction(tr, state) {
|
|
251435
251453
|
if (!tr.docChanged)
|
|
251436
251454
|
return true;
|
|
251455
|
+
if (tr.getMeta?.(ySyncPluginKey))
|
|
251456
|
+
return true;
|
|
251437
251457
|
if (!editor || editor.options.documentMode !== "viewing")
|
|
251438
251458
|
return true;
|
|
251439
251459
|
const pluginState = PERMISSION_PLUGIN_KEY.getState(state);
|
|
@@ -267174,7 +267194,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
|
|
|
267174
267194
|
|
|
267175
267195
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
267176
267196
|
var init_super_editor_es = __esm(() => {
|
|
267177
|
-
|
|
267197
|
+
init_src_D3H7T1qq_es();
|
|
267178
267198
|
init_SuperConverter_V_8WDjnK_es();
|
|
267179
267199
|
init_jszip_ChlR43oI_es();
|
|
267180
267200
|
init_xml_js_DLE8mr0n_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-next.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@superdoc-dev/cli-darwin-arm64": "0.
|
|
34
|
-
"@superdoc-dev/cli-
|
|
35
|
-
"@superdoc-dev/cli-linux-
|
|
36
|
-
"@superdoc-dev/cli-
|
|
37
|
-
"@superdoc-dev/cli-windows-x64": "0.
|
|
33
|
+
"@superdoc-dev/cli-darwin-arm64": "0.4.0-next.2",
|
|
34
|
+
"@superdoc-dev/cli-linux-x64": "0.4.0-next.2",
|
|
35
|
+
"@superdoc-dev/cli-linux-arm64": "0.4.0-next.2",
|
|
36
|
+
"@superdoc-dev/cli-darwin-x64": "0.4.0-next.2",
|
|
37
|
+
"@superdoc-dev/cli-windows-x64": "0.4.0-next.2"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"predev": "node scripts/ensure-superdoc-build.js",
|