superdoc 2.0.0-next.37 → 2.0.0-next.39
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_kKiKQ4.es.js → create-super-doc-ui-BDAxgGrE.es.js} +81 -14
- package/dist/chunks/{create-super-doc-ui-DLyJzmj9.cjs → create-super-doc-ui-kkZK7Tc-.cjs} +81 -14
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/track-changes/track-changes.d.ts +5 -1
- package/dist/document-api/src/types/address.d.ts +2 -2
- package/dist/layout-engine/contracts/src/index.d.ts +2 -0
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +7 -0
- package/dist/layout-engine/layout-bridge/src/index.d.ts +1 -1
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +111 -107
- package/dist/style.layered.css +111 -107
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -1
- package/dist/superdoc.cjs +94 -24
- package/dist/superdoc.es.js +94 -24
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +36 -36
- package/package.json +2 -2
package/dist/chunks/{create-super-doc-ui-C_kKiKQ4.es.js → create-super-doc-ui-BDAxgGrE.es.js}
RENAMED
|
@@ -2605,6 +2605,11 @@ function createSuperDocUI(options) {
|
|
|
2605
2605
|
let explicitActiveChange = null;
|
|
2606
2606
|
let explicitActiveChangeRevision = 0;
|
|
2607
2607
|
let queuedTrackChangeNavigationInvalidation = 0;
|
|
2608
|
+
const explicitActiveChangesEqual = (left, right) => {
|
|
2609
|
+
if (left === right) return true;
|
|
2610
|
+
if (!left || !right) return false;
|
|
2611
|
+
return left.id === right.id && left.paintedEntityId === right.paintedEntityId && storyLocatorSignature(left.story) === storyLocatorSignature(right.story);
|
|
2612
|
+
};
|
|
2608
2613
|
const mirrorTrackedChangeFocusToHost = (next) => {
|
|
2609
2614
|
const host = getHost();
|
|
2610
2615
|
if (typeof host?.getHandles !== "function") return;
|
|
@@ -5144,6 +5149,8 @@ function createSuperDocUI(options) {
|
|
|
5144
5149
|
};
|
|
5145
5150
|
let currentHostSelectionSource = null;
|
|
5146
5151
|
let detachHostSelection = null;
|
|
5152
|
+
let currentHostReviewSource = null;
|
|
5153
|
+
let detachHostReview = null;
|
|
5147
5154
|
let currentHostEventsSource = null;
|
|
5148
5155
|
let detachHostEvents = null;
|
|
5149
5156
|
let currentDocumentSelectionSource = null;
|
|
@@ -5173,6 +5180,59 @@ function createSuperDocUI(options) {
|
|
|
5173
5180
|
currentHostSelectionSource = null;
|
|
5174
5181
|
}
|
|
5175
5182
|
};
|
|
5183
|
+
const readHostReviewSource = () => {
|
|
5184
|
+
const host = getEditor()?.host;
|
|
5185
|
+
const review = safeCall(host?.getHandles ? () => host.getHandles() : void 0, null)?.review;
|
|
5186
|
+
return review && typeof review.subscribe === "function" ? review : null;
|
|
5187
|
+
};
|
|
5188
|
+
const readHostActiveReviewTarget = (review) => {
|
|
5189
|
+
if (!review) return null;
|
|
5190
|
+
if (typeof review.getActiveReviewTarget === "function") return safeCall(() => review.getActiveReviewTarget(), null);
|
|
5191
|
+
if (typeof review.getSnapshot === "function") return safeCall(() => review.getSnapshot(), null)?.activeReviewTarget ?? null;
|
|
5192
|
+
return null;
|
|
5193
|
+
};
|
|
5194
|
+
const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget) => {
|
|
5195
|
+
const target = rawTarget && typeof rawTarget === "object" ? rawTarget : null;
|
|
5196
|
+
let next = null;
|
|
5197
|
+
if (target?.entityType === "trackedChange" && typeof target.entityId === "string" && target.entityId.length > 0) {
|
|
5198
|
+
const story = target.story && storyLocatorSignature(target.story) !== storyLocatorSignature(null) ? target.story : void 0;
|
|
5199
|
+
next = {
|
|
5200
|
+
id: target.entityId,
|
|
5201
|
+
...story ? { story } : {},
|
|
5202
|
+
...typeof target.paintedEntityId === "string" && target.paintedEntityId.length > 0 ? { paintedEntityId: target.paintedEntityId } : {}
|
|
5203
|
+
};
|
|
5204
|
+
}
|
|
5205
|
+
if (explicitActiveChangesEqual(explicitActiveChange, next)) return false;
|
|
5206
|
+
setExplicitActiveChange(next);
|
|
5207
|
+
return true;
|
|
5208
|
+
};
|
|
5209
|
+
const syncHostReviewSubscription = () => {
|
|
5210
|
+
const next = readHostReviewSource();
|
|
5211
|
+
if (next === currentHostReviewSource) return;
|
|
5212
|
+
if (detachHostReview) {
|
|
5213
|
+
detachHostReview();
|
|
5214
|
+
detachHostReview = null;
|
|
5215
|
+
}
|
|
5216
|
+
currentHostReviewSource = next;
|
|
5217
|
+
if (!next) {
|
|
5218
|
+
syncTrackedChangeFocusFromHostReviewTarget(null);
|
|
5219
|
+
return;
|
|
5220
|
+
}
|
|
5221
|
+
let attaching = true;
|
|
5222
|
+
try {
|
|
5223
|
+
const unsubscribe = next.subscribe((snapshot) => {
|
|
5224
|
+
const snapshotRecord = snapshot && typeof snapshot === "object" ? snapshot : null;
|
|
5225
|
+
if (!syncTrackedChangeFocusFromHostReviewTarget(snapshotRecord && Object.prototype.hasOwnProperty.call(snapshotRecord, "activeReviewTarget") ? snapshotRecord.activeReviewTarget : readHostActiveReviewTarget(next)) || attaching) return;
|
|
5226
|
+
recompute();
|
|
5227
|
+
});
|
|
5228
|
+
if (typeof unsubscribe === "function") detachHostReview = unsubscribe;
|
|
5229
|
+
syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(next));
|
|
5230
|
+
} catch {
|
|
5231
|
+
currentHostReviewSource = null;
|
|
5232
|
+
} finally {
|
|
5233
|
+
attaching = false;
|
|
5234
|
+
}
|
|
5235
|
+
};
|
|
5176
5236
|
const readDocumentSelectionFallbackSource = () => {
|
|
5177
5237
|
if (currentHostSelectionSource || readDocumentMode() !== "viewing") return null;
|
|
5178
5238
|
const container = (getEditor()?.mount)?.container;
|
|
@@ -5202,6 +5262,7 @@ function createSuperDocUI(options) {
|
|
|
5202
5262
|
};
|
|
5203
5263
|
};
|
|
5204
5264
|
syncCoordinatorEditor();
|
|
5265
|
+
syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(readHostReviewSource()));
|
|
5205
5266
|
let state = computeState();
|
|
5206
5267
|
lastOptimisticInlineSelectionSignature = selectionInlineValueSignature(state.selection);
|
|
5207
5268
|
const syncHostEventsSubscription = () => {
|
|
@@ -5284,6 +5345,7 @@ function createSuperDocUI(options) {
|
|
|
5284
5345
|
if (disposed) return;
|
|
5285
5346
|
syncCoordinatorEditor();
|
|
5286
5347
|
syncHostSelectionSubscription();
|
|
5348
|
+
syncHostReviewSubscription();
|
|
5287
5349
|
syncDocumentSelectionFallbackSubscription();
|
|
5288
5350
|
syncHostEventsSubscription();
|
|
5289
5351
|
const nextState = computeState();
|
|
@@ -5308,6 +5370,7 @@ function createSuperDocUI(options) {
|
|
|
5308
5370
|
};
|
|
5309
5371
|
attach(superdoc, HOST_EVENTS);
|
|
5310
5372
|
syncHostSelectionSubscription();
|
|
5373
|
+
syncHostReviewSubscription();
|
|
5311
5374
|
syncDocumentSelectionFallbackSubscription();
|
|
5312
5375
|
syncHostEventsSubscription();
|
|
5313
5376
|
const select = (selector, equality = shallowEqual) => {
|
|
@@ -5359,15 +5422,19 @@ function createSuperDocUI(options) {
|
|
|
5359
5422
|
const rangeEnd = Math.max(start.offset, end.offset);
|
|
5360
5423
|
const story = selectionStoryLocator(selection$1);
|
|
5361
5424
|
return {
|
|
5362
|
-
kind: "
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5425
|
+
kind: "range",
|
|
5426
|
+
coordinateSpace: explicit.coordinateSpace === "tracked" ? "tracked" : "visible",
|
|
5427
|
+
range: {
|
|
5428
|
+
kind: "text",
|
|
5429
|
+
...story ? { story } : {},
|
|
5430
|
+
segments: [{
|
|
5431
|
+
blockId: start.blockId,
|
|
5432
|
+
range: {
|
|
5433
|
+
start: rangeStart,
|
|
5434
|
+
end: rangeEnd
|
|
5435
|
+
}
|
|
5436
|
+
}]
|
|
5437
|
+
}
|
|
5371
5438
|
};
|
|
5372
5439
|
}
|
|
5373
5440
|
function activeChangePartialDecisionRoute() {
|
|
@@ -5428,11 +5495,8 @@ function createSuperDocUI(options) {
|
|
|
5428
5495
|
const route = activeChangePartialDecisionRoute();
|
|
5429
5496
|
if (route === "unavailable") return false;
|
|
5430
5497
|
if (route === "range") {
|
|
5431
|
-
const
|
|
5432
|
-
return
|
|
5433
|
-
kind: "range",
|
|
5434
|
-
range
|
|
5435
|
-
}, null) : false;
|
|
5498
|
+
const target = trackDecisionRangeFromSelection(state.selection);
|
|
5499
|
+
return target ? executeTrackDecisionTarget(command.kind, target, null) : false;
|
|
5436
5500
|
}
|
|
5437
5501
|
}
|
|
5438
5502
|
}
|
|
@@ -8299,6 +8363,9 @@ function createSuperDocUI(options) {
|
|
|
8299
8363
|
if (detachHostSelection) detachHostSelection();
|
|
8300
8364
|
detachHostSelection = null;
|
|
8301
8365
|
currentHostSelectionSource = null;
|
|
8366
|
+
if (detachHostReview) detachHostReview();
|
|
8367
|
+
detachHostReview = null;
|
|
8368
|
+
currentHostReviewSource = null;
|
|
8302
8369
|
if (detachHostEvents) detachHostEvents();
|
|
8303
8370
|
detachHostEvents = null;
|
|
8304
8371
|
currentHostEventsSource = null;
|
|
@@ -2824,6 +2824,11 @@ function createSuperDocUI(options) {
|
|
|
2824
2824
|
let explicitActiveChange = null;
|
|
2825
2825
|
let explicitActiveChangeRevision = 0;
|
|
2826
2826
|
let queuedTrackChangeNavigationInvalidation = 0;
|
|
2827
|
+
const explicitActiveChangesEqual = (left, right) => {
|
|
2828
|
+
if (left === right) return true;
|
|
2829
|
+
if (!left || !right) return false;
|
|
2830
|
+
return left.id === right.id && left.paintedEntityId === right.paintedEntityId && storyLocatorSignature(left.story) === storyLocatorSignature(right.story);
|
|
2831
|
+
};
|
|
2827
2832
|
const mirrorTrackedChangeFocusToHost = (next) => {
|
|
2828
2833
|
const host = getHost();
|
|
2829
2834
|
if (typeof host?.getHandles !== "function") return;
|
|
@@ -5363,6 +5368,8 @@ function createSuperDocUI(options) {
|
|
|
5363
5368
|
};
|
|
5364
5369
|
let currentHostSelectionSource = null;
|
|
5365
5370
|
let detachHostSelection = null;
|
|
5371
|
+
let currentHostReviewSource = null;
|
|
5372
|
+
let detachHostReview = null;
|
|
5366
5373
|
let currentHostEventsSource = null;
|
|
5367
5374
|
let detachHostEvents = null;
|
|
5368
5375
|
let currentDocumentSelectionSource = null;
|
|
@@ -5392,6 +5399,59 @@ function createSuperDocUI(options) {
|
|
|
5392
5399
|
currentHostSelectionSource = null;
|
|
5393
5400
|
}
|
|
5394
5401
|
};
|
|
5402
|
+
const readHostReviewSource = () => {
|
|
5403
|
+
const host = getEditor()?.host;
|
|
5404
|
+
const review = safeCall(host?.getHandles ? () => host.getHandles() : void 0, null)?.review;
|
|
5405
|
+
return review && typeof review.subscribe === "function" ? review : null;
|
|
5406
|
+
};
|
|
5407
|
+
const readHostActiveReviewTarget = (review) => {
|
|
5408
|
+
if (!review) return null;
|
|
5409
|
+
if (typeof review.getActiveReviewTarget === "function") return safeCall(() => review.getActiveReviewTarget(), null);
|
|
5410
|
+
if (typeof review.getSnapshot === "function") return safeCall(() => review.getSnapshot(), null)?.activeReviewTarget ?? null;
|
|
5411
|
+
return null;
|
|
5412
|
+
};
|
|
5413
|
+
const syncTrackedChangeFocusFromHostReviewTarget = (rawTarget) => {
|
|
5414
|
+
const target = rawTarget && typeof rawTarget === "object" ? rawTarget : null;
|
|
5415
|
+
let next = null;
|
|
5416
|
+
if (target?.entityType === "trackedChange" && typeof target.entityId === "string" && target.entityId.length > 0) {
|
|
5417
|
+
const story = target.story && storyLocatorSignature(target.story) !== storyLocatorSignature(null) ? target.story : void 0;
|
|
5418
|
+
next = {
|
|
5419
|
+
id: target.entityId,
|
|
5420
|
+
...story ? { story } : {},
|
|
5421
|
+
...typeof target.paintedEntityId === "string" && target.paintedEntityId.length > 0 ? { paintedEntityId: target.paintedEntityId } : {}
|
|
5422
|
+
};
|
|
5423
|
+
}
|
|
5424
|
+
if (explicitActiveChangesEqual(explicitActiveChange, next)) return false;
|
|
5425
|
+
setExplicitActiveChange(next);
|
|
5426
|
+
return true;
|
|
5427
|
+
};
|
|
5428
|
+
const syncHostReviewSubscription = () => {
|
|
5429
|
+
const next = readHostReviewSource();
|
|
5430
|
+
if (next === currentHostReviewSource) return;
|
|
5431
|
+
if (detachHostReview) {
|
|
5432
|
+
detachHostReview();
|
|
5433
|
+
detachHostReview = null;
|
|
5434
|
+
}
|
|
5435
|
+
currentHostReviewSource = next;
|
|
5436
|
+
if (!next) {
|
|
5437
|
+
syncTrackedChangeFocusFromHostReviewTarget(null);
|
|
5438
|
+
return;
|
|
5439
|
+
}
|
|
5440
|
+
let attaching = true;
|
|
5441
|
+
try {
|
|
5442
|
+
const unsubscribe = next.subscribe((snapshot) => {
|
|
5443
|
+
const snapshotRecord = snapshot && typeof snapshot === "object" ? snapshot : null;
|
|
5444
|
+
if (!syncTrackedChangeFocusFromHostReviewTarget(snapshotRecord && Object.prototype.hasOwnProperty.call(snapshotRecord, "activeReviewTarget") ? snapshotRecord.activeReviewTarget : readHostActiveReviewTarget(next)) || attaching) return;
|
|
5445
|
+
recompute();
|
|
5446
|
+
});
|
|
5447
|
+
if (typeof unsubscribe === "function") detachHostReview = unsubscribe;
|
|
5448
|
+
syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(next));
|
|
5449
|
+
} catch {
|
|
5450
|
+
currentHostReviewSource = null;
|
|
5451
|
+
} finally {
|
|
5452
|
+
attaching = false;
|
|
5453
|
+
}
|
|
5454
|
+
};
|
|
5395
5455
|
const readDocumentSelectionFallbackSource = () => {
|
|
5396
5456
|
if (currentHostSelectionSource || readDocumentMode() !== "viewing") return null;
|
|
5397
5457
|
const container = (getEditor()?.mount)?.container;
|
|
@@ -5421,6 +5481,7 @@ function createSuperDocUI(options) {
|
|
|
5421
5481
|
};
|
|
5422
5482
|
};
|
|
5423
5483
|
syncCoordinatorEditor();
|
|
5484
|
+
syncTrackedChangeFocusFromHostReviewTarget(readHostActiveReviewTarget(readHostReviewSource()));
|
|
5424
5485
|
let state = computeState();
|
|
5425
5486
|
lastOptimisticInlineSelectionSignature = selectionInlineValueSignature(state.selection);
|
|
5426
5487
|
const syncHostEventsSubscription = () => {
|
|
@@ -5503,6 +5564,7 @@ function createSuperDocUI(options) {
|
|
|
5503
5564
|
if (disposed) return;
|
|
5504
5565
|
syncCoordinatorEditor();
|
|
5505
5566
|
syncHostSelectionSubscription();
|
|
5567
|
+
syncHostReviewSubscription();
|
|
5506
5568
|
syncDocumentSelectionFallbackSubscription();
|
|
5507
5569
|
syncHostEventsSubscription();
|
|
5508
5570
|
const nextState = computeState();
|
|
@@ -5527,6 +5589,7 @@ function createSuperDocUI(options) {
|
|
|
5527
5589
|
};
|
|
5528
5590
|
attach(superdoc, HOST_EVENTS);
|
|
5529
5591
|
syncHostSelectionSubscription();
|
|
5592
|
+
syncHostReviewSubscription();
|
|
5530
5593
|
syncDocumentSelectionFallbackSubscription();
|
|
5531
5594
|
syncHostEventsSubscription();
|
|
5532
5595
|
const select = (selector, equality = shallowEqual) => {
|
|
@@ -5578,15 +5641,19 @@ function createSuperDocUI(options) {
|
|
|
5578
5641
|
const rangeEnd = Math.max(start.offset, end.offset);
|
|
5579
5642
|
const story = selectionStoryLocator(selection$1);
|
|
5580
5643
|
return {
|
|
5581
|
-
kind: "
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5644
|
+
kind: "range",
|
|
5645
|
+
coordinateSpace: explicit.coordinateSpace === "tracked" ? "tracked" : "visible",
|
|
5646
|
+
range: {
|
|
5647
|
+
kind: "text",
|
|
5648
|
+
...story ? { story } : {},
|
|
5649
|
+
segments: [{
|
|
5650
|
+
blockId: start.blockId,
|
|
5651
|
+
range: {
|
|
5652
|
+
start: rangeStart,
|
|
5653
|
+
end: rangeEnd
|
|
5654
|
+
}
|
|
5655
|
+
}]
|
|
5656
|
+
}
|
|
5590
5657
|
};
|
|
5591
5658
|
}
|
|
5592
5659
|
function activeChangePartialDecisionRoute() {
|
|
@@ -5647,11 +5714,8 @@ function createSuperDocUI(options) {
|
|
|
5647
5714
|
const route = activeChangePartialDecisionRoute();
|
|
5648
5715
|
if (route === "unavailable") return false;
|
|
5649
5716
|
if (route === "range") {
|
|
5650
|
-
const
|
|
5651
|
-
return
|
|
5652
|
-
kind: "range",
|
|
5653
|
-
range
|
|
5654
|
-
}, null) : false;
|
|
5717
|
+
const target = trackDecisionRangeFromSelection(state.selection);
|
|
5718
|
+
return target ? executeTrackDecisionTarget(command.kind, target, null) : false;
|
|
5655
5719
|
}
|
|
5656
5720
|
}
|
|
5657
5721
|
}
|
|
@@ -8518,6 +8582,9 @@ function createSuperDocUI(options) {
|
|
|
8518
8582
|
if (detachHostSelection) detachHostSelection();
|
|
8519
8583
|
detachHostSelection = null;
|
|
8520
8584
|
currentHostSelectionSource = null;
|
|
8585
|
+
if (detachHostReview) detachHostReview();
|
|
8586
|
+
detachHostReview = null;
|
|
8587
|
+
currentHostReviewSource = null;
|
|
8521
8588
|
if (detachHostEvents) detachHostEvents();
|
|
8522
8589
|
detachHostEvents = null;
|
|
8523
8590
|
currentHostEventsSource = null;
|
|
@@ -7,7 +7,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
7
7
|
var PRIVATE_ENGINE_INFO = (0, __superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
8
8
|
var ENGINE_INFO = Object.freeze({
|
|
9
9
|
...PRIVATE_ENGINE_INFO,
|
|
10
|
-
superdocVersion: "2.0.0-next.
|
|
10
|
+
superdocVersion: "2.0.0-next.39",
|
|
11
11
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
12
12
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
13
13
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -6,7 +6,7 @@ const COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
6
6
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
7
7
|
var ENGINE_INFO = Object.freeze({
|
|
8
8
|
...PRIVATE_ENGINE_INFO,
|
|
9
|
-
superdocVersion: "2.0.0-next.
|
|
9
|
+
superdocVersion: "2.0.0-next.39",
|
|
10
10
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
11
11
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
12
12
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Receipt, TrackChangeInfo, TrackChangesListQuery, TrackChangesListResult } from '../types/index.js';
|
|
2
2
|
import { StoryLocator } from '../types/story.types.js';
|
|
3
|
-
import { TextTarget } from '../types/address.js';
|
|
3
|
+
import { TextCoordinateSpace, TextTarget } from '../types/address.js';
|
|
4
4
|
import { RevisionGuardOptions } from '../write/write.js';
|
|
5
5
|
export type TrackChangesListInput = TrackChangesListQuery;
|
|
6
6
|
export interface TrackChangesGetInput {
|
|
@@ -27,6 +27,8 @@ export interface TrackChangesRejectAllInput {
|
|
|
27
27
|
export interface TrackChangesRangeInput {
|
|
28
28
|
range: TextTarget;
|
|
29
29
|
story?: StoryLocator;
|
|
30
|
+
/** Coordinate space of the TextTarget offsets. Omitted preserves legacy tracked-space behavior. */
|
|
31
|
+
coordinateSpace?: TextCoordinateSpace;
|
|
30
32
|
}
|
|
31
33
|
export type ReviewDecideTargetSide = 'insert' | 'inserted' | 'delete' | 'deleted' | 'source' | 'destination';
|
|
32
34
|
export type ReviewDecideIdTargetSide = 'insert' | 'inserted' | 'delete' | 'deleted';
|
|
@@ -56,6 +58,8 @@ export interface ReviewDecideRangeTargetOptions {
|
|
|
56
58
|
export type ReviewDecideTextRangeTarget = ReviewDecideRangeTargetOptions & {
|
|
57
59
|
kind: 'range';
|
|
58
60
|
range: TextTarget;
|
|
61
|
+
/** Coordinate space of `range`. Omitted preserves legacy tracked-space behavior. */
|
|
62
|
+
coordinateSpace?: TextCoordinateSpace;
|
|
59
63
|
};
|
|
60
64
|
export type ReviewDecideLogicalRangeTarget = ReviewDecideRangeTargetOptions & {
|
|
61
65
|
kind: 'range';
|
|
@@ -98,8 +98,8 @@ export type SelectionTarget = {
|
|
|
98
98
|
story?: StoryLocator;
|
|
99
99
|
/**
|
|
100
100
|
* Coordinate space for text endpoint offsets. Omitted means `visible`.
|
|
101
|
-
* Present as `tracked`
|
|
102
|
-
*
|
|
101
|
+
* Present as `tracked` for targets that include deletion-side tracked text,
|
|
102
|
+
* including additive search matches and live review selections.
|
|
103
103
|
*/
|
|
104
104
|
coordinateSpace?: TextCoordinateSpace;
|
|
105
105
|
};
|
|
@@ -2099,6 +2099,8 @@ export type Page = {
|
|
|
2099
2099
|
numberText?: string;
|
|
2100
2100
|
/** Numeric page number after section page numbering settings are applied. */
|
|
2101
2101
|
effectivePageNumber?: number;
|
|
2102
|
+
/** One-based physical position within the owning section. */
|
|
2103
|
+
sectionPageNumber?: number;
|
|
2102
2104
|
/** Section PAGE number format before any run-local PAGE switch is applied. */
|
|
2103
2105
|
pageNumberFormat?: PageNumberFormat;
|
|
2104
2106
|
/** MVP chapter prefix text derived from the nearest numbered Heading N marker. */
|
|
@@ -55,6 +55,8 @@ export type ResolvedPage = {
|
|
|
55
55
|
numberText?: string;
|
|
56
56
|
/** Numeric page number after section page numbering settings are applied. */
|
|
57
57
|
effectivePageNumber?: number;
|
|
58
|
+
/** One-based physical position within the owning section. */
|
|
59
|
+
sectionPageNumber?: number;
|
|
58
60
|
/** Section PAGE number format before any run-local PAGE switch is applied. */
|
|
59
61
|
pageNumberFormat?: PageNumberFormat;
|
|
60
62
|
/** MVP chapter prefix text derived from the nearest numbered Heading N marker. */
|
|
@@ -162,12 +162,19 @@ export type LayoutPositionTransform = {
|
|
|
162
162
|
atChar: number;
|
|
163
163
|
delta: number;
|
|
164
164
|
};
|
|
165
|
+
export type IncrementalSectionPageNumberTransform = {
|
|
166
|
+
/** Section whose retained pages need rebasing before its next boundary. */
|
|
167
|
+
sectionIndex: number;
|
|
168
|
+
/** Difference between target and source section-relative page positions. */
|
|
169
|
+
delta: number;
|
|
170
|
+
};
|
|
165
171
|
export type IncrementalLayoutTailAdoption = {
|
|
166
172
|
startPageIndex: number;
|
|
167
173
|
endPageIndexExclusive: number;
|
|
168
174
|
sourcePageStartIndex: number;
|
|
169
175
|
sourcePageEndIndexExclusive: number;
|
|
170
176
|
pageIndexDelta: number;
|
|
177
|
+
sectionPageNumberTransform: IncrementalSectionPageNumberTransform | null;
|
|
171
178
|
sourceLayoutEpoch: number | null;
|
|
172
179
|
positionTransforms: readonly LayoutPositionTransform[];
|
|
173
180
|
/** Lazy old->current block-id rekeys for an ordinal-changing structural splice. */
|
|
@@ -12,7 +12,7 @@ export type { BoundaryRange } from './text-boundaries.js';
|
|
|
12
12
|
export { buildSectionAwareHeaderFooterLayoutKey, buildSectionContentWidth, buildEffectiveHeaderFooterRefsBySection, collectReferencedHeaderFooterRIds, buildSectionAwareHeaderFooterMeasurementGroups, } from './sectionAwareHeaderFooter.js';
|
|
13
13
|
export type { HeaderFooterSectionKind, HeaderFooterRefs, SectionAwareHeaderFooterMeasurementGroup, } from './sectionAwareHeaderFooter.js';
|
|
14
14
|
export { clearIncrementalModuleState, incrementalLayout, measureCache, normalizeMargin, hydrateTableTextboxMeasures, } from './incrementalLayout.js';
|
|
15
|
-
export type { HeaderFooterLayoutResult, IncrementalLayoutBridgeTiming, IncrementalLayoutResult, IncrementalMeasureReuseProof, IncrementalLayoutReuseOptions, IncrementalLayoutReuseSummary, IncrementalLayoutTailAdoption, IncrementalLayoutTailDisposition, IncrementalPaginationProof, LayoutPositionTransform, FootnoteReserveSeed, } from './incrementalLayout.js';
|
|
15
|
+
export type { HeaderFooterLayoutResult, IncrementalLayoutBridgeTiming, IncrementalLayoutResult, IncrementalMeasureReuseProof, IncrementalLayoutReuseOptions, IncrementalLayoutReuseSummary, IncrementalSectionPageNumberTransform, IncrementalLayoutTailAdoption, IncrementalLayoutTailDisposition, IncrementalPaginationProof, LayoutPositionTransform, FootnoteReserveSeed, } from './incrementalLayout.js';
|
|
16
16
|
export { collectFootnoteLedgers, getPreferredReserveCandidates, getPreferredReserveTrialTargets, isMandatoryOnlyFootnotePage, scoreFootnoteWindow, summarizeFootnoteWindow, } from './footnote-scorer.js';
|
|
17
17
|
export type { FootnotePreferredReserveCandidate, FootnoteWindowScoreInput, FootnoteWindowScoreReason, FootnoteWindowScoreResult, FootnoteWindowStats, } from './footnote-scorer.js';
|
|
18
18
|
export { computeDisplayPageNumber } from '../../layout-engine/src/index.js';
|
package/dist/public/ui-react.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("../chunks/rolldown-runtime-_dR15c8t.cjs");
|
|
3
|
-
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-
|
|
3
|
+
const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-kkZK7Tc-.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
var SuperDocUIContext = (0, react.createContext)(null);
|
|
6
6
|
function SuperDocUIProvider(props) {
|
|
@@ -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-BDAxgGrE.es.js";
|
|
2
2
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
var SuperDocUIContext = createContext(null);
|
|
4
4
|
function SuperDocUIProvider(props) {
|
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-kkZK7Tc-.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 BUILT_IN_COMMAND_IDS, r as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { n as BUILT_IN_COMMAND_IDS, r as shallowEqual, t as createSuperDocUI } from "../chunks/create-super-doc-ui-BDAxgGrE.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|