superdoc 2.12.0-next.13 → 2.12.0-next.14
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/chunks/{create-super-doc-ui-C-AuEM9F.es.js → create-super-doc-ui-D3_JSfLV.es.js} +49 -12
- package/dist/chunks/{create-super-doc-ui-CBFGggZ2.cjs → create-super-doc-ui-D8QSZN4i.cjs} +49 -12
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/layout-engine/painters/dom/src/derived-run-text-plane.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +3 -1
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +3 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/superdoc/src/public/ui/types.d.ts +25 -4
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist-cdn/superdoc.min.js +35 -35
- package/package.json +2 -2
package/dist/chunks/{create-super-doc-ui-C-AuEM9F.es.js → create-super-doc-ui-D3_JSfLV.es.js}
RENAMED
|
@@ -7453,11 +7453,8 @@ function createSuperDocUI(options) {
|
|
|
7453
7453
|
return false;
|
|
7454
7454
|
}
|
|
7455
7455
|
}
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
target: { kind: "all" },
|
|
7459
|
-
changeId: null
|
|
7460
|
-
};
|
|
7456
|
+
/** A decision target carried by the payload itself, independent of the selection. */
|
|
7457
|
+
function explicitTrackDecisionTarget(payload) {
|
|
7461
7458
|
if (typeof payload === "string" && payload.length > 0) return {
|
|
7462
7459
|
target: {
|
|
7463
7460
|
kind: "id",
|
|
@@ -7482,6 +7479,15 @@ function createSuperDocUI(options) {
|
|
|
7482
7479
|
story: record.story
|
|
7483
7480
|
};
|
|
7484
7481
|
}
|
|
7482
|
+
return null;
|
|
7483
|
+
}
|
|
7484
|
+
function resolveTrackDecisionTarget(command, payload) {
|
|
7485
|
+
if (command.scope === "all") return {
|
|
7486
|
+
target: { kind: "all" },
|
|
7487
|
+
changeId: null
|
|
7488
|
+
};
|
|
7489
|
+
const explicit = explicitTrackDecisionTarget(payload);
|
|
7490
|
+
if (explicit) return explicit;
|
|
7485
7491
|
const selectedId = state.selection.activeChangeIds[0];
|
|
7486
7492
|
const story = nonBodySelectionStoryLocator(state.selection);
|
|
7487
7493
|
return selectedId ? {
|
|
@@ -8435,6 +8441,7 @@ function createSuperDocUI(options) {
|
|
|
8435
8441
|
const commandNeedsFreshSelection = (id, payload) => {
|
|
8436
8442
|
const trackCommand = trackDecisionCommand(id);
|
|
8437
8443
|
const descriptor = getCommandDescriptor(id);
|
|
8444
|
+
if (trackCommand?.scope === "id" && explicitTrackDecisionTarget(payload)) return false;
|
|
8438
8445
|
if (trackCommand?.scope !== "id" && !descriptorNeedsFreshSelection(descriptor)) return false;
|
|
8439
8446
|
return !commandSelectionIsReady(id, descriptor, payload);
|
|
8440
8447
|
};
|
|
@@ -9212,6 +9219,7 @@ function createSuperDocUI(options) {
|
|
|
9212
9219
|
*/
|
|
9213
9220
|
const resolveEntityTarget = async (namespace, id, loaded, request) => {
|
|
9214
9221
|
const requestedStory = namespace === "trackChanges" ? request?.story : void 0;
|
|
9222
|
+
const rowStory = namespace === "trackChanges" ? request?.matchStory ?? requestedStory : void 0;
|
|
9215
9223
|
const withRequestedStory = (target) => {
|
|
9216
9224
|
if (!requestedStory || !target || typeof target !== "object") return target;
|
|
9217
9225
|
const record = target;
|
|
@@ -9223,7 +9231,7 @@ function createSuperDocUI(options) {
|
|
|
9223
9231
|
};
|
|
9224
9232
|
};
|
|
9225
9233
|
const readTarget = namespace === "trackChanges" ? readTrackedChangeNavigationTarget : readEntityTarget;
|
|
9226
|
-
const loadedRow = loaded.find((row) => entityRowMatchesRequest(row, id,
|
|
9234
|
+
const loadedRow = loaded.find((row) => entityRowMatchesRequest(row, id, rowStory));
|
|
9227
9235
|
const loadedRecord = loadedRow && typeof loadedRow === "object" ? loadedRow : null;
|
|
9228
9236
|
const moveSide = namespace === "trackChanges" && loadedRecord?.type === "move" && (loadedRecord.subtype === "move-to" || loadedRecord.subtype === "move-from") ? loadedRecord.subtype : null;
|
|
9229
9237
|
const trackedChangeLookupId = moveSide && typeof loadedRecord?.trackedChangeCanonicalId === "string" ? loadedRecord.trackedChangeCanonicalId : id;
|
|
@@ -9517,9 +9525,13 @@ function createSuperDocUI(options) {
|
|
|
9517
9525
|
});
|
|
9518
9526
|
},
|
|
9519
9527
|
accept: (changeId) => executeTrackDecision("accept", changeId),
|
|
9528
|
+
acceptAsync: (changeId) => settleTrackDecision(() => executeTrackDecision("accept", changeId)),
|
|
9520
9529
|
reject: (changeId) => executeTrackDecision("reject", changeId),
|
|
9530
|
+
rejectAsync: (changeId) => settleTrackDecision(() => executeTrackDecision("reject", changeId)),
|
|
9521
9531
|
acceptAll: () => executeTrackDecisionTarget("accept", { kind: "all" }, null),
|
|
9532
|
+
acceptAllAsync: () => settleTrackDecision(() => executeTrackDecisionTarget("accept", { kind: "all" }, null)),
|
|
9522
9533
|
rejectAll: () => executeTrackDecisionTarget("reject", { kind: "all" }, null),
|
|
9534
|
+
rejectAllAsync: () => settleTrackDecision(() => executeTrackDecisionTarget("reject", { kind: "all" }, null)),
|
|
9523
9535
|
next: () => navigateTrackChange(1),
|
|
9524
9536
|
previous: () => navigateTrackChange(-1),
|
|
9525
9537
|
navigateNext: () => navigateAndScroll(1),
|
|
@@ -9584,19 +9596,27 @@ function createSuperDocUI(options) {
|
|
|
9584
9596
|
recompute();
|
|
9585
9597
|
return true;
|
|
9586
9598
|
},
|
|
9587
|
-
scrollTo: async (
|
|
9599
|
+
scrollTo: async (input) => {
|
|
9588
9600
|
if (!getDoc()) return {
|
|
9589
9601
|
success: false,
|
|
9590
9602
|
ok: false,
|
|
9591
9603
|
reason: getEditor() ? SUPERDOC_UI_REASONS.documentApiUnavailable : SUPERDOC_UI_REASONS.notReady
|
|
9592
9604
|
};
|
|
9605
|
+
const changeId = typeof input === "string" ? input : input.id;
|
|
9606
|
+
const matchStory = typeof input === "string" || !input.story || typeof input.story !== "object" ? void 0 : input.story;
|
|
9607
|
+
const requestedStory = matchStory ? readEntityRequestStory({ address: { story: matchStory } }) : void 0;
|
|
9608
|
+
if (typeof changeId !== "string" || changeId.length === 0) return {
|
|
9609
|
+
success: false,
|
|
9610
|
+
ok: false,
|
|
9611
|
+
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
9612
|
+
};
|
|
9593
9613
|
queuedTrackChangeNavigationInvalidation += 1;
|
|
9594
9614
|
trackChangeRevealInvalidation += 1;
|
|
9595
9615
|
const requestedAtInvalidation = trackChangeRevealInvalidation;
|
|
9596
|
-
const loadedItems = trackChangesSub.get().items;
|
|
9597
|
-
const publicId = buildTrackedChangeIdContext(loadedItems).toPublicId(changeId) ?? changeId;
|
|
9598
|
-
const matchingRow = loadedItems.find((item) => readEntityId(item) === publicId);
|
|
9599
|
-
const story = readEntityRequestStory(matchingRow);
|
|
9616
|
+
const loadedItems = matchStory ? readAllStoryTrackChanges() ?? trackChangesSub.get().items : trackChangesSub.get().items;
|
|
9617
|
+
const publicId = matchStory ? buildStoryScopedTrackedChangeIdContext(loadedItems, matchStory).toPublicId(changeId) ?? changeId : buildTrackedChangeIdContext(loadedItems).toPublicId(changeId) ?? changeId;
|
|
9618
|
+
const matchingRow = matchStory ? loadedItems.find((item) => entityRowMatchesRequest(item, publicId, matchStory)) : loadedItems.find((item) => readEntityId(item) === publicId);
|
|
9619
|
+
const story = matchStory ? requestedStory : readEntityRequestStory(matchingRow);
|
|
9600
9620
|
const importedId = deriveTrackedChangeImportedId(matchingRow);
|
|
9601
9621
|
const previousActiveChange = explicitActiveChange;
|
|
9602
9622
|
const requestedActiveChange = {
|
|
@@ -9606,7 +9626,10 @@ function createSuperDocUI(options) {
|
|
|
9606
9626
|
};
|
|
9607
9627
|
pendingTrackChangeRevealFocuses.add(requestedActiveChange);
|
|
9608
9628
|
try {
|
|
9609
|
-
const target = await resolveEntityTarget("trackChanges", publicId, loadedItems, story ? {
|
|
9629
|
+
const target = await resolveEntityTarget("trackChanges", publicId, loadedItems, story || matchStory ? {
|
|
9630
|
+
story,
|
|
9631
|
+
matchStory
|
|
9632
|
+
} : void 0);
|
|
9610
9633
|
if (trackChangeRevealInvalidation !== requestedAtInvalidation) return {
|
|
9611
9634
|
success: false,
|
|
9612
9635
|
ok: false
|
|
@@ -9666,6 +9689,7 @@ function createSuperDocUI(options) {
|
|
|
9666
9689
|
id: input,
|
|
9667
9690
|
story: void 0
|
|
9668
9691
|
} : input;
|
|
9692
|
+
if (typeof id !== "string" || id.length === 0) return false;
|
|
9669
9693
|
const target = {
|
|
9670
9694
|
kind: "id",
|
|
9671
9695
|
id,
|
|
@@ -9673,6 +9697,19 @@ function createSuperDocUI(options) {
|
|
|
9673
9697
|
};
|
|
9674
9698
|
return executeTrackDecisionTarget(kind, target, id, story);
|
|
9675
9699
|
};
|
|
9700
|
+
/**
|
|
9701
|
+
* Run a domain decision and resolve with its settled result. The domain
|
|
9702
|
+
* helpers call the decision route directly so an application command that
|
|
9703
|
+
* reuses a built-in tracked-change id cannot intercept them; only the command
|
|
9704
|
+
* registry (`commands.execute*`) honours those overrides.
|
|
9705
|
+
*/
|
|
9706
|
+
const settleTrackDecision = (run) => {
|
|
9707
|
+
pendingCommandSettlement = null;
|
|
9708
|
+
lastCommandSettlement = Promise.resolve(false);
|
|
9709
|
+
if (disposed) return Promise.resolve(false);
|
|
9710
|
+
if (run() === false) return Promise.resolve(false);
|
|
9711
|
+
return lastCommandSettlement;
|
|
9712
|
+
};
|
|
9676
9713
|
const executeTrackDecisionTarget = (kind, target, changeId, story) => {
|
|
9677
9714
|
try {
|
|
9678
9715
|
return settleCommandExecution(callTrackDecisionTarget(kind, target, changeId, story));
|
|
@@ -7453,11 +7453,8 @@ function createSuperDocUI(options) {
|
|
|
7453
7453
|
return false;
|
|
7454
7454
|
}
|
|
7455
7455
|
}
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
target: { kind: "all" },
|
|
7459
|
-
changeId: null
|
|
7460
|
-
};
|
|
7456
|
+
/** A decision target carried by the payload itself, independent of the selection. */
|
|
7457
|
+
function explicitTrackDecisionTarget(payload) {
|
|
7461
7458
|
if (typeof payload === "string" && payload.length > 0) return {
|
|
7462
7459
|
target: {
|
|
7463
7460
|
kind: "id",
|
|
@@ -7482,6 +7479,15 @@ function createSuperDocUI(options) {
|
|
|
7482
7479
|
story: record.story
|
|
7483
7480
|
};
|
|
7484
7481
|
}
|
|
7482
|
+
return null;
|
|
7483
|
+
}
|
|
7484
|
+
function resolveTrackDecisionTarget(command, payload) {
|
|
7485
|
+
if (command.scope === "all") return {
|
|
7486
|
+
target: { kind: "all" },
|
|
7487
|
+
changeId: null
|
|
7488
|
+
};
|
|
7489
|
+
const explicit = explicitTrackDecisionTarget(payload);
|
|
7490
|
+
if (explicit) return explicit;
|
|
7485
7491
|
const selectedId = state.selection.activeChangeIds[0];
|
|
7486
7492
|
const story = nonBodySelectionStoryLocator(state.selection);
|
|
7487
7493
|
return selectedId ? {
|
|
@@ -8435,6 +8441,7 @@ function createSuperDocUI(options) {
|
|
|
8435
8441
|
const commandNeedsFreshSelection = (id, payload) => {
|
|
8436
8442
|
const trackCommand = trackDecisionCommand(id);
|
|
8437
8443
|
const descriptor = getCommandDescriptor(id);
|
|
8444
|
+
if (trackCommand?.scope === "id" && explicitTrackDecisionTarget(payload)) return false;
|
|
8438
8445
|
if (trackCommand?.scope !== "id" && !descriptorNeedsFreshSelection(descriptor)) return false;
|
|
8439
8446
|
return !commandSelectionIsReady(id, descriptor, payload);
|
|
8440
8447
|
};
|
|
@@ -9212,6 +9219,7 @@ function createSuperDocUI(options) {
|
|
|
9212
9219
|
*/
|
|
9213
9220
|
const resolveEntityTarget = async (namespace, id, loaded, request) => {
|
|
9214
9221
|
const requestedStory = namespace === "trackChanges" ? request?.story : void 0;
|
|
9222
|
+
const rowStory = namespace === "trackChanges" ? request?.matchStory ?? requestedStory : void 0;
|
|
9215
9223
|
const withRequestedStory = (target) => {
|
|
9216
9224
|
if (!requestedStory || !target || typeof target !== "object") return target;
|
|
9217
9225
|
const record = target;
|
|
@@ -9223,7 +9231,7 @@ function createSuperDocUI(options) {
|
|
|
9223
9231
|
};
|
|
9224
9232
|
};
|
|
9225
9233
|
const readTarget = namespace === "trackChanges" ? readTrackedChangeNavigationTarget : readEntityTarget;
|
|
9226
|
-
const loadedRow = loaded.find((row) => entityRowMatchesRequest(row, id,
|
|
9234
|
+
const loadedRow = loaded.find((row) => entityRowMatchesRequest(row, id, rowStory));
|
|
9227
9235
|
const loadedRecord = loadedRow && typeof loadedRow === "object" ? loadedRow : null;
|
|
9228
9236
|
const moveSide = namespace === "trackChanges" && loadedRecord?.type === "move" && (loadedRecord.subtype === "move-to" || loadedRecord.subtype === "move-from") ? loadedRecord.subtype : null;
|
|
9229
9237
|
const trackedChangeLookupId = moveSide && typeof loadedRecord?.trackedChangeCanonicalId === "string" ? loadedRecord.trackedChangeCanonicalId : id;
|
|
@@ -9517,9 +9525,13 @@ function createSuperDocUI(options) {
|
|
|
9517
9525
|
});
|
|
9518
9526
|
},
|
|
9519
9527
|
accept: (changeId) => executeTrackDecision("accept", changeId),
|
|
9528
|
+
acceptAsync: (changeId) => settleTrackDecision(() => executeTrackDecision("accept", changeId)),
|
|
9520
9529
|
reject: (changeId) => executeTrackDecision("reject", changeId),
|
|
9530
|
+
rejectAsync: (changeId) => settleTrackDecision(() => executeTrackDecision("reject", changeId)),
|
|
9521
9531
|
acceptAll: () => executeTrackDecisionTarget("accept", { kind: "all" }, null),
|
|
9532
|
+
acceptAllAsync: () => settleTrackDecision(() => executeTrackDecisionTarget("accept", { kind: "all" }, null)),
|
|
9522
9533
|
rejectAll: () => executeTrackDecisionTarget("reject", { kind: "all" }, null),
|
|
9534
|
+
rejectAllAsync: () => settleTrackDecision(() => executeTrackDecisionTarget("reject", { kind: "all" }, null)),
|
|
9523
9535
|
next: () => navigateTrackChange(1),
|
|
9524
9536
|
previous: () => navigateTrackChange(-1),
|
|
9525
9537
|
navigateNext: () => navigateAndScroll(1),
|
|
@@ -9584,19 +9596,27 @@ function createSuperDocUI(options) {
|
|
|
9584
9596
|
recompute();
|
|
9585
9597
|
return true;
|
|
9586
9598
|
},
|
|
9587
|
-
scrollTo: async (
|
|
9599
|
+
scrollTo: async (input) => {
|
|
9588
9600
|
if (!getDoc()) return {
|
|
9589
9601
|
success: false,
|
|
9590
9602
|
ok: false,
|
|
9591
9603
|
reason: getEditor() ? SUPERDOC_UI_REASONS.documentApiUnavailable : SUPERDOC_UI_REASONS.notReady
|
|
9592
9604
|
};
|
|
9605
|
+
const changeId = typeof input === "string" ? input : input.id;
|
|
9606
|
+
const matchStory = typeof input === "string" || !input.story || typeof input.story !== "object" ? void 0 : input.story;
|
|
9607
|
+
const requestedStory = matchStory ? readEntityRequestStory({ address: { story: matchStory } }) : void 0;
|
|
9608
|
+
if (typeof changeId !== "string" || changeId.length === 0) return {
|
|
9609
|
+
success: false,
|
|
9610
|
+
ok: false,
|
|
9611
|
+
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
9612
|
+
};
|
|
9593
9613
|
queuedTrackChangeNavigationInvalidation += 1;
|
|
9594
9614
|
trackChangeRevealInvalidation += 1;
|
|
9595
9615
|
const requestedAtInvalidation = trackChangeRevealInvalidation;
|
|
9596
|
-
const loadedItems = trackChangesSub.get().items;
|
|
9597
|
-
const publicId = buildTrackedChangeIdContext(loadedItems).toPublicId(changeId) ?? changeId;
|
|
9598
|
-
const matchingRow = loadedItems.find((item) => readEntityId(item) === publicId);
|
|
9599
|
-
const story = readEntityRequestStory(matchingRow);
|
|
9616
|
+
const loadedItems = matchStory ? readAllStoryTrackChanges() ?? trackChangesSub.get().items : trackChangesSub.get().items;
|
|
9617
|
+
const publicId = matchStory ? buildStoryScopedTrackedChangeIdContext(loadedItems, matchStory).toPublicId(changeId) ?? changeId : buildTrackedChangeIdContext(loadedItems).toPublicId(changeId) ?? changeId;
|
|
9618
|
+
const matchingRow = matchStory ? loadedItems.find((item) => entityRowMatchesRequest(item, publicId, matchStory)) : loadedItems.find((item) => readEntityId(item) === publicId);
|
|
9619
|
+
const story = matchStory ? requestedStory : readEntityRequestStory(matchingRow);
|
|
9600
9620
|
const importedId = deriveTrackedChangeImportedId(matchingRow);
|
|
9601
9621
|
const previousActiveChange = explicitActiveChange;
|
|
9602
9622
|
const requestedActiveChange = {
|
|
@@ -9606,7 +9626,10 @@ function createSuperDocUI(options) {
|
|
|
9606
9626
|
};
|
|
9607
9627
|
pendingTrackChangeRevealFocuses.add(requestedActiveChange);
|
|
9608
9628
|
try {
|
|
9609
|
-
const target = await resolveEntityTarget("trackChanges", publicId, loadedItems, story ? {
|
|
9629
|
+
const target = await resolveEntityTarget("trackChanges", publicId, loadedItems, story || matchStory ? {
|
|
9630
|
+
story,
|
|
9631
|
+
matchStory
|
|
9632
|
+
} : void 0);
|
|
9610
9633
|
if (trackChangeRevealInvalidation !== requestedAtInvalidation) return {
|
|
9611
9634
|
success: false,
|
|
9612
9635
|
ok: false
|
|
@@ -9666,6 +9689,7 @@ function createSuperDocUI(options) {
|
|
|
9666
9689
|
id: input,
|
|
9667
9690
|
story: void 0
|
|
9668
9691
|
} : input;
|
|
9692
|
+
if (typeof id !== "string" || id.length === 0) return false;
|
|
9669
9693
|
const target = {
|
|
9670
9694
|
kind: "id",
|
|
9671
9695
|
id,
|
|
@@ -9673,6 +9697,19 @@ function createSuperDocUI(options) {
|
|
|
9673
9697
|
};
|
|
9674
9698
|
return executeTrackDecisionTarget(kind, target, id, story);
|
|
9675
9699
|
};
|
|
9700
|
+
/**
|
|
9701
|
+
* Run a domain decision and resolve with its settled result. The domain
|
|
9702
|
+
* helpers call the decision route directly so an application command that
|
|
9703
|
+
* reuses a built-in tracked-change id cannot intercept them; only the command
|
|
9704
|
+
* registry (`commands.execute*`) honours those overrides.
|
|
9705
|
+
*/
|
|
9706
|
+
const settleTrackDecision = (run) => {
|
|
9707
|
+
pendingCommandSettlement = null;
|
|
9708
|
+
lastCommandSettlement = Promise.resolve(false);
|
|
9709
|
+
if (disposed) return Promise.resolve(false);
|
|
9710
|
+
if (run() === false) return Promise.resolve(false);
|
|
9711
|
+
return lastCommandSettlement;
|
|
9712
|
+
};
|
|
9676
9713
|
const executeTrackDecisionTarget = (kind, target, changeId, story) => {
|
|
9677
9714
|
try {
|
|
9678
9715
|
return settleCommandExecution(callTrackDecisionTarget(kind, target, changeId, story));
|
|
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
19
19
|
var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
20
20
|
var ENGINE_INFO = Object.freeze({
|
|
21
21
|
...PRIVATE_ENGINE_INFO,
|
|
22
|
-
superdocVersion: "2.12.0-next.
|
|
22
|
+
superdocVersion: "2.12.0-next.14",
|
|
23
23
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
24
24
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
25
25
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
18
18
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
19
19
|
var ENGINE_INFO = Object.freeze({
|
|
20
20
|
...PRIVATE_ENGINE_INFO,
|
|
21
|
-
superdocVersion: "2.12.0-next.
|
|
21
|
+
superdocVersion: "2.12.0-next.14",
|
|
22
22
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
23
23
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
24
24
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlowBlock, Run } from '../../../contracts/src/index.js';
|
|
2
|
+
export type DerivedRunTextPlane = {
|
|
3
|
+
generation: number;
|
|
4
|
+
revision: string;
|
|
5
|
+
valuesByDataAttribute: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
6
|
+
};
|
|
7
|
+
export declare function validateDerivedRunTextPlane(plane: DerivedRunTextPlane | null | undefined, generation: number): void;
|
|
8
|
+
export declare function resolveDerivedRunText(run: Run, plane: DerivedRunTextPlane | null | undefined): string | undefined;
|
|
9
|
+
export declare function blockUsesDerivedRunTextPlane(block: FlowBlock | undefined, plane: DerivedRunTextPlane | null | undefined): boolean;
|
|
@@ -15,6 +15,7 @@ export type { RulerDefinition, RulerConfig, RulerConfigPx, RulerTick, CreateRule
|
|
|
15
15
|
export type { PaintSnapshot, PaintSnapshotAnnotationEntity, PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity, PaintSnapshotImageEntity, PaintSnapshotEntities, } from './renderer.js';
|
|
16
16
|
export type { DomPainterInput, PositionMapping } from './renderer.js';
|
|
17
17
|
export type { DomPainterPersistentPacketSource, DomPainterPersistentPageInput, DomPainterPersistentScaffold, DomPainterPersistentScaffoldPage, } from './persistent-page-surface.js';
|
|
18
|
+
export type { DerivedRunTextPlane } from './derived-run-text-plane.js';
|
|
18
19
|
export type { PaintWorkSummary } from './page-content.js';
|
|
19
20
|
export type { RenderedLineInfo } from './runs/index.js';
|
|
20
21
|
export { sanitizeUrl, linkMetrics, applyRunDataAttributes } from './runs/index.js';
|
|
@@ -3,6 +3,7 @@ import { FragmentRenderContext, PositionMapping } from './renderer.js';
|
|
|
3
3
|
import { SdtBoundaryOptions } from './sdt/container.js';
|
|
4
4
|
import { BetweenBorderInfo } from './paragraph/borders/index.js';
|
|
5
5
|
import { PageStyles } from './styles.js';
|
|
6
|
+
import { DerivedRunTextPlane } from './derived-run-text-plane.js';
|
|
6
7
|
export type FragmentDomState = {
|
|
7
8
|
key: string;
|
|
8
9
|
signature: string;
|
|
@@ -116,7 +117,7 @@ export declare function createEmptyPaintWorkSummary(): PaintWorkSummary;
|
|
|
116
117
|
* attribute-for-attribute — that exactness is the proof, never normalize it
|
|
117
118
|
* away at the pass level (only the §7.7 unit tests use the normalized form).
|
|
118
119
|
*/
|
|
119
|
-
export declare function persistentPageVersionKey(page: ResolvedPage, totalPages: number, sectionPageCount: number): string | null;
|
|
120
|
+
export declare function persistentPageVersionKey(page: ResolvedPage, totalPages: number, sectionPageCount: number, derivedRunTextPlane?: DerivedRunTextPlane | null): string | null;
|
|
120
121
|
/**
|
|
121
122
|
* The class state `renderPage`/`patchPage` consume, made explicit. The
|
|
122
123
|
* DomPainter builds one per call (values like `totalPages`, `layoutEpoch`,
|
|
@@ -130,6 +131,7 @@ export interface PageContentContext {
|
|
|
130
131
|
totalPages: number;
|
|
131
132
|
currentMapping: PositionMapping | null;
|
|
132
133
|
changedBlocks: ReadonlySet<string>;
|
|
134
|
+
derivedRunTextPlane?: DerivedRunTextPlane | null;
|
|
133
135
|
/** Record the smallest newly painted subtree for transaction finalization. */
|
|
134
136
|
recordChangedRoot?(root: HTMLElement): void;
|
|
135
137
|
sdtLabelsRendered: Set<string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DocumentBackground, ResolvedPage } from '../../../contracts/src/index.js';
|
|
2
|
+
import { DerivedRunTextPlane } from './derived-run-text-plane.js';
|
|
2
3
|
import { PageContentContext, PageDomState, PaintWorkSummary } from './page-content.js';
|
|
3
4
|
/**
|
|
4
5
|
* One exact page band of the committed scaffold (numbers-only,
|
|
@@ -69,6 +70,7 @@ export type DomPainterPersistentPageInput = {
|
|
|
69
70
|
packetsByPageIndex: DomPainterPersistentPacketSource;
|
|
70
71
|
sectionPageCounts?: Readonly<Record<string, number>>;
|
|
71
72
|
documentBackground?: DocumentBackground | null;
|
|
73
|
+
derivedRunTextPlane?: DerivedRunTextPlane | null;
|
|
72
74
|
captureSnapshot?: boolean;
|
|
73
75
|
};
|
|
74
76
|
/** Shell registry entry: the persistent page root and its geometry/style reuse key. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FlowMode, Fragment, PageMargins, PageNumberChapterSeparator, PageNumberFormat, SourceAnchor, ResolvedLayout, ResolvedPage, ResolvedPaintItem, LayoutSourceIdentity, LayoutStoryLocator } from '../../../contracts/src/index.js';
|
|
2
2
|
import { PaintWorkSummary } from './page-content.js';
|
|
3
3
|
import { DomPainterPersistentPageInput } from './persistent-page-surface.js';
|
|
4
|
+
import { DerivedRunTextPlane } from './derived-run-text-plane.js';
|
|
4
5
|
import { PageStyles } from './styles.js';
|
|
5
6
|
import { PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity } from './sdt/snapshot.js';
|
|
6
7
|
import { PositionValidationOptions, PositionValidationSummary } from './pm-position-validation.js';
|
|
@@ -143,6 +144,7 @@ export type FragmentRenderContext = {
|
|
|
143
144
|
* `totalPages` / `sectionPageCount`. Absent/`true` = exact (default).
|
|
144
145
|
*/
|
|
145
146
|
pageCountFieldsExact?: boolean;
|
|
147
|
+
derivedRunTextPlane?: DerivedRunTextPlane | null;
|
|
146
148
|
};
|
|
147
149
|
export type PaintSnapshotLineStyle = {
|
|
148
150
|
paddingLeftPx?: number;
|
|
@@ -305,6 +307,7 @@ export declare class DomPainter {
|
|
|
305
307
|
* `dispose()` so a stale window value can never leak across modes/mounts.
|
|
306
308
|
*/
|
|
307
309
|
private persistentDocumentBackground;
|
|
310
|
+
private persistentDerivedRunTextPlane;
|
|
308
311
|
private paintWork;
|
|
309
312
|
/**
|
|
310
313
|
* P5 §4.6 (review fix): per-page attribution arrays are opt-in. Counters
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D8QSZN4i.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
//#region src/public/ui/react.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-D3_JSfLV.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
4
4
|
//#region src/public/ui/react.ts
|
package/dist/public/ui-vue.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D8QSZN4i.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
//#region src/public/ui/vue.ts
|
package/dist/public/ui-vue.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-D3_JSfLV.es.js";
|
|
2
2
|
import { t as toSliceSource } from "../chunks/slice-source-gfOhG2MW.es.js";
|
|
3
3
|
import { computed, inject, onScopeDispose, provide, shallowRef, toRaw, toValue, watch } from "vue";
|
|
4
4
|
//#region src/public/ui/vue.ts
|
package/dist/public/ui.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
2
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-D8QSZN4i.cjs");
|
|
3
3
|
exports.BUILT_IN_COMMAND_IDS = require_create_super_doc_ui.BUILT_IN_COMMAND_IDS;
|
|
4
4
|
exports.createSuperDocUI = require_create_super_doc_ui.createSuperDocUI;
|
|
5
5
|
exports.shallowEqual = require_create_super_doc_ui.shallowEqual;
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as shallowEqual, r as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-D3_JSfLV.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
|
@@ -920,33 +920,49 @@ export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSli
|
|
|
920
920
|
* already identifies one occurrence, anywhere in the document). A
|
|
921
921
|
* `{ id, story }` record (e.g. a {@link getAt}/{@link setActive} hit) is
|
|
922
922
|
* also accepted for convenience, so a hit can be passed straight through.
|
|
923
|
-
*
|
|
923
|
+
* Returns the immediate routed result. Use {@link acceptAsync} when later UI
|
|
924
|
+
* depends on the settled document operation.
|
|
924
925
|
*/
|
|
925
926
|
accept(changeId: string | {
|
|
926
927
|
id: string;
|
|
927
928
|
story?: unknown;
|
|
928
929
|
}): CommandExecutionResult;
|
|
930
|
+
/** Accept a change and resolve after the document operation settles. */
|
|
931
|
+
acceptAsync(changeId: string | {
|
|
932
|
+
id: string;
|
|
933
|
+
story?: unknown;
|
|
934
|
+
}): Promise<CommandExecutionResult>;
|
|
929
935
|
/**
|
|
930
936
|
* Reject a change. The id is sufficient on its own (a tracked-change id
|
|
931
937
|
* already identifies one occurrence, anywhere in the document). A
|
|
932
938
|
* `{ id, story }` record (e.g. a {@link getAt}/{@link setActive} hit) is
|
|
933
939
|
* also accepted for convenience, so a hit can be passed straight through.
|
|
934
|
-
*
|
|
940
|
+
* Returns the immediate routed result. Use {@link rejectAsync} when later UI
|
|
941
|
+
* depends on the settled document operation.
|
|
935
942
|
*/
|
|
936
943
|
reject(changeId: string | {
|
|
937
944
|
id: string;
|
|
938
945
|
story?: unknown;
|
|
939
946
|
}): CommandExecutionResult;
|
|
947
|
+
/** Reject a change and resolve after the document operation settles. */
|
|
948
|
+
rejectAsync(changeId: string | {
|
|
949
|
+
id: string;
|
|
950
|
+
story?: unknown;
|
|
951
|
+
}): Promise<CommandExecutionResult>;
|
|
940
952
|
/**
|
|
941
953
|
* Accept every active tracked change. Returns the Document API receipt, or
|
|
942
954
|
* `false` when bulk decisions are unavailable / disabled on the host.
|
|
943
955
|
*/
|
|
944
956
|
acceptAll(): CommandExecutionResult;
|
|
957
|
+
/** Accept every active tracked change and resolve after the operation settles. */
|
|
958
|
+
acceptAllAsync(): Promise<CommandExecutionResult>;
|
|
945
959
|
/**
|
|
946
960
|
* Reject every active tracked change. Returns the Document API receipt, or
|
|
947
961
|
* `false` when bulk decisions are unavailable / disabled on the host.
|
|
948
962
|
*/
|
|
949
963
|
rejectAll(): CommandExecutionResult;
|
|
964
|
+
/** Reject every active tracked change and resolve after the operation settles. */
|
|
965
|
+
rejectAllAsync(): Promise<CommandExecutionResult>;
|
|
950
966
|
/**
|
|
951
967
|
* Move focus to the next tracked change in document order (relative to the
|
|
952
968
|
* active change). Returns the id that became active, or `null` when there are
|
|
@@ -1005,9 +1021,14 @@ export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSli
|
|
|
1005
1021
|
/**
|
|
1006
1022
|
* Scroll the tracked-change anchor into view through the host navigation
|
|
1007
1023
|
* surface. Resolves with both v1/main `{ success }` and v2 `{ ok, reason? }`
|
|
1008
|
-
* fields.
|
|
1024
|
+
* fields. A bare id resolves its story from the loaded rows; a
|
|
1025
|
+
* `{ id, story }` record pins the occurrence when the same id repeats across
|
|
1026
|
+
* the body and a footnote, header, or footer.
|
|
1009
1027
|
*/
|
|
1010
|
-
scrollTo(
|
|
1028
|
+
scrollTo(input: string | {
|
|
1029
|
+
id: string;
|
|
1030
|
+
story?: unknown;
|
|
1031
|
+
}): Promise<WorkflowScrollResult>;
|
|
1011
1032
|
}
|
|
1012
1033
|
/** Content-controls handle. */
|
|
1013
1034
|
export interface ContentControlsHandle extends SnapshotSubscribable<ContentControlsSlice> {
|
package/dist/superdoc.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
|
4
4
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
5
5
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
6
6
|
const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
|
|
7
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
7
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-D8QSZN4i.cjs");
|
|
8
8
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-SDR04tiH.cjs");
|
|
9
9
|
const require_constants = require("./chunks/constants-DpXuDx_g.cjs");
|
|
10
10
|
let vue = require("vue");
|
|
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
|
|
|
316
316
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
317
317
|
function getSuperdocVersion() {
|
|
318
318
|
try {
|
|
319
|
-
return "2.12.0-next.
|
|
319
|
+
return "2.12.0-next.14";
|
|
320
320
|
} catch {
|
|
321
321
|
return "unknown";
|
|
322
322
|
}
|
|
@@ -45328,7 +45328,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45328
45328
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45329
45329
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45330
45330
|
this.colorIndex = 0;
|
|
45331
|
-
this.version = "2.12.0-next.
|
|
45331
|
+
this.version = "2.12.0-next.14";
|
|
45332
45332
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45333
45333
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45334
45334
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
|
3
3
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
4
4
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
5
5
|
import { a as init_dist$1, i as global, n as init_dist$2, o as Buffer, r as process$1, s as init_dist, t as require_jszip_min } from "./chunks/jszip-BzJ3CyxR.es.js";
|
|
6
|
-
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
6
|
+
import { a as DOM_CLASS_NAMES, i as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-D3_JSfLV.es.js";
|
|
7
7
|
import { t as _plugin_vue_export_helper_default } from "./chunks/_plugin-vue_export-helper-BOaGB7Aw.es.js";
|
|
8
8
|
import { t as PDF_TO_CSS_UNITS } from "./chunks/constants-B6VBlmKp.es.js";
|
|
9
9
|
import * as Vue from "vue";
|
|
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
|
|
|
315
315
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
316
316
|
function getSuperdocVersion() {
|
|
317
317
|
try {
|
|
318
|
-
return "2.12.0-next.
|
|
318
|
+
return "2.12.0-next.14";
|
|
319
319
|
} catch {
|
|
320
320
|
return "unknown";
|
|
321
321
|
}
|
|
@@ -45259,7 +45259,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
45259
45259
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45260
45260
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45261
45261
|
this.colorIndex = 0;
|
|
45262
|
-
this.version = "2.12.0-next.
|
|
45262
|
+
this.version = "2.12.0-next.14";
|
|
45263
45263
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45264
45264
|
this.superdocId = config.superdocId || v4();
|
|
45265
45265
|
this.colors = this.config.colors ?? [];
|