superdoc 2.4.0-next.12 → 2.4.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-D0mNmAHJ.es.js → create-super-doc-ui-BRBwfV-s.es.js} +43 -55
- package/dist/chunks/{create-super-doc-ui-BWYOinLD.cjs → create-super-doc-ui-CTe12b19.cjs} +43 -55
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +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 +23 -23
- package/dist/style.layered.css +23 -23
- package/dist/superdoc/src/core/SuperDoc.d.ts +4 -0
- package/dist/superdoc/src/core/types/index.d.ts +380 -37
- package/dist/superdoc/src/helpers/v2-typing-review-hydration.d.ts +16 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +4 -4
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -0
- package/dist/superdoc/src/public/index.d.cts +14 -0
- package/dist/superdoc/src/public/index.d.ts +7 -0
- package/dist/superdoc.cjs +157 -103
- package/dist/superdoc.es.js +157 -103
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +35 -35
- package/package.json +2 -2
package/dist/chunks/{create-super-doc-ui-D0mNmAHJ.es.js → create-super-doc-ui-BRBwfV-s.es.js}
RENAMED
|
@@ -3348,6 +3348,18 @@ function projectionBlockMatchesId(block, id) {
|
|
|
3348
3348
|
if (block.sourceAnchor?.sourceNodeId === id) return true;
|
|
3349
3349
|
return block.id === id;
|
|
3350
3350
|
}
|
|
3351
|
+
/**
|
|
3352
|
+
* Length of a painted run in the Document API selection-offset space.
|
|
3353
|
+
*
|
|
3354
|
+
* Review mode paints deleted revision text, but that text is not part of the
|
|
3355
|
+
* editable selection stream. Counting its painted characters shifts every
|
|
3356
|
+
* later selection onto the wrong projected run (and therefore the wrong
|
|
3357
|
+
* effective formatting). Insertions remain selectable and keep their length.
|
|
3358
|
+
*/
|
|
3359
|
+
function projectionRunSelectionLength(run) {
|
|
3360
|
+
if (run.trackedChange?.kind === "delete") return 0;
|
|
3361
|
+
return typeof run.text === "string" ? run.text.length : 0;
|
|
3362
|
+
}
|
|
3351
3363
|
function combineCommandResults(results) {
|
|
3352
3364
|
let last = false;
|
|
3353
3365
|
let firstFailure = null;
|
|
@@ -4470,7 +4482,6 @@ function createSuperDocUI(options) {
|
|
|
4470
4482
|
demandHeavyDocRead("trackChanges");
|
|
4471
4483
|
};
|
|
4472
4484
|
const HEAVY_READ_IDLE_MS = 6500;
|
|
4473
|
-
const HEAVY_READ_IDLE_CEILING_MS = 8e3;
|
|
4474
4485
|
const HEAVY_READ_IDLE_POLL_MS = 250;
|
|
4475
4486
|
let lastEditableMutationAtMs = 0;
|
|
4476
4487
|
/**
|
|
@@ -4485,31 +4496,19 @@ function createSuperDocUI(options) {
|
|
|
4485
4496
|
* recompute cannot bypass the idle gate.
|
|
4486
4497
|
*/
|
|
4487
4498
|
let heavyReadsHeldUntilIdle = false;
|
|
4488
|
-
/** When the STEADY-phase typing hold began; bounds it to the same ceiling. */
|
|
4489
|
-
let heavyReadsTypingHoldSinceMs = 0;
|
|
4490
|
-
/** Lets one ceiling-triggered recompute refresh every heavy key as a group. */
|
|
4491
|
-
let heavyReadCeilingReleaseActive = false;
|
|
4492
4499
|
let heavyReadCompletionRecomputeTimer = null;
|
|
4493
4500
|
const scheduleHeavyReadCompletionRecompute = () => {
|
|
4494
4501
|
if (disposed || heavyReadCompletionRecomputeTimer) return;
|
|
4495
|
-
const startedAtMs = heavyReadsTypingHoldSinceMs || Date.now();
|
|
4496
4502
|
const attempt = () => {
|
|
4497
4503
|
heavyReadCompletionRecomputeTimer = null;
|
|
4498
4504
|
if (disposed) return;
|
|
4499
4505
|
const idleForMs = Date.now() - lastEditableMutationAtMs;
|
|
4500
|
-
|
|
4501
|
-
if (busy && Date.now() - startedAtMs < HEAVY_READ_IDLE_CEILING_MS) {
|
|
4506
|
+
if (foregroundMutationActive() || idleForMs < HEAVY_READ_IDLE_MS) {
|
|
4502
4507
|
heavyReadCompletionRecomputeTimer = setTimeout(attempt, HEAVY_READ_IDLE_POLL_MS);
|
|
4503
4508
|
return;
|
|
4504
4509
|
}
|
|
4505
4510
|
heavyReadsHeldUntilIdle = false;
|
|
4506
|
-
|
|
4507
|
-
try {
|
|
4508
|
-
recompute();
|
|
4509
|
-
} finally {
|
|
4510
|
-
heavyReadCeilingReleaseActive = false;
|
|
4511
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4512
|
-
}
|
|
4511
|
+
recompute();
|
|
4513
4512
|
};
|
|
4514
4513
|
heavyReadCompletionRecomputeTimer = setTimeout(attempt, 0);
|
|
4515
4514
|
};
|
|
@@ -4532,7 +4531,10 @@ function createSuperDocUI(options) {
|
|
|
4532
4531
|
try {
|
|
4533
4532
|
const handleLoadingSnapshot = (snapshot) => {
|
|
4534
4533
|
const stage = snapshot?.sourceStage;
|
|
4535
|
-
if (stage === "source-complete" || stage === "source-failed" || stage === "source-cancelled")
|
|
4534
|
+
if (stage === "source-complete" || stage === "source-failed" || stage === "source-cancelled") {
|
|
4535
|
+
lastEditableMutationAtMs = Math.max(lastEditableMutationAtMs, Date.now());
|
|
4536
|
+
scheduleHeavyReadCompletionRecompute();
|
|
4537
|
+
}
|
|
4536
4538
|
};
|
|
4537
4539
|
const off = subscribe.call(host, handleLoadingSnapshot);
|
|
4538
4540
|
if (typeof off === "function") detachSourceLoading = off;
|
|
@@ -4758,7 +4760,7 @@ function createSuperDocUI(options) {
|
|
|
4758
4760
|
status: "pending"
|
|
4759
4761
|
};
|
|
4760
4762
|
}
|
|
4761
|
-
if (heavyReadsHeldUntilIdle
|
|
4763
|
+
if (heavyReadsHeldUntilIdle) {
|
|
4762
4764
|
scheduleHeavyReadCompletionRecompute();
|
|
4763
4765
|
if (entry?.hasSettled) return {
|
|
4764
4766
|
value: entry.value,
|
|
@@ -4769,22 +4771,17 @@ function createSuperDocUI(options) {
|
|
|
4769
4771
|
status: "pending"
|
|
4770
4772
|
};
|
|
4771
4773
|
}
|
|
4772
|
-
if (
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
value: null,
|
|
4784
|
-
status: "pending"
|
|
4785
|
-
};
|
|
4786
|
-
}
|
|
4787
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4774
|
+
if (Date.now() - lastTypingMutationAtMs < HEAVY_READ_IDLE_MS) {
|
|
4775
|
+
heavyReadsHeldUntilIdle = true;
|
|
4776
|
+
scheduleHeavyReadCompletionRecompute();
|
|
4777
|
+
if (entry?.hasSettled) return {
|
|
4778
|
+
value: entry.value,
|
|
4779
|
+
status: "stale"
|
|
4780
|
+
};
|
|
4781
|
+
return {
|
|
4782
|
+
value: null,
|
|
4783
|
+
status: "pending"
|
|
4784
|
+
};
|
|
4788
4785
|
}
|
|
4789
4786
|
}
|
|
4790
4787
|
if (foregroundMutationActive()) {
|
|
@@ -4877,7 +4874,6 @@ function createSuperDocUI(options) {
|
|
|
4877
4874
|
coldAsyncReadDeferrals.clear();
|
|
4878
4875
|
demandedHeavyReads.clear();
|
|
4879
4876
|
heavyReadsHeldUntilIdle = false;
|
|
4880
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4881
4877
|
if (detachSourceLoading) detachSourceLoading();
|
|
4882
4878
|
detachSourceLoading = null;
|
|
4883
4879
|
sourceLoadingSubscriptionHost = null;
|
|
@@ -5354,7 +5350,7 @@ function createSuperDocUI(options) {
|
|
|
5354
5350
|
let acc = 0;
|
|
5355
5351
|
let chosen = null;
|
|
5356
5352
|
for (const run of runs) {
|
|
5357
|
-
const len =
|
|
5353
|
+
const len = projectionRunSelectionLength(run);
|
|
5358
5354
|
if (caretOffset >= acc && caretOffset < acc + len) {
|
|
5359
5355
|
chosen = run;
|
|
5360
5356
|
break;
|
|
@@ -5386,7 +5382,7 @@ function createSuperDocUI(options) {
|
|
|
5386
5382
|
}
|
|
5387
5383
|
let acc = 0;
|
|
5388
5384
|
for (const run of runs) {
|
|
5389
|
-
const len =
|
|
5385
|
+
const len = projectionRunSelectionLength(run);
|
|
5390
5386
|
const runStart = acc;
|
|
5391
5387
|
const runEnd = acc + len;
|
|
5392
5388
|
if (runStart < seg.end && runEnd > seg.start) {
|
|
@@ -5475,7 +5471,7 @@ function createSuperDocUI(options) {
|
|
|
5475
5471
|
let acc = 0;
|
|
5476
5472
|
let chosen = null;
|
|
5477
5473
|
for (const run of runs) {
|
|
5478
|
-
const len =
|
|
5474
|
+
const len = projectionRunSelectionLength(run);
|
|
5479
5475
|
if (caretOffset >= acc && caretOffset < acc + len) {
|
|
5480
5476
|
chosen = run;
|
|
5481
5477
|
break;
|
|
@@ -5511,7 +5507,7 @@ function createSuperDocUI(options) {
|
|
|
5511
5507
|
}
|
|
5512
5508
|
let acc = 0;
|
|
5513
5509
|
for (const run of runs) {
|
|
5514
|
-
const len =
|
|
5510
|
+
const len = projectionRunSelectionLength(run);
|
|
5515
5511
|
const runStart = acc;
|
|
5516
5512
|
const runEnd = acc + len;
|
|
5517
5513
|
if (runStart < seg.end && runEnd > seg.start) {
|
|
@@ -7180,7 +7176,11 @@ function createSuperDocUI(options) {
|
|
|
7180
7176
|
const loadedCommentAnchorsMayHaveChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0 && commentsCatalogMayHaveRows();
|
|
7181
7177
|
if (remoteCommentsPartChanged && !isTypingBurst) heavyReadsHeldUntilIdle = true;
|
|
7182
7178
|
invalidateDocumentContent();
|
|
7183
|
-
if (remoteCommentsPartChanged
|
|
7179
|
+
if (remoteCommentsPartChanged && !isTypingBurst) demandHeavyDocRead("comments");
|
|
7180
|
+
else if (loadedCommentAnchorsMayHaveChanged) {
|
|
7181
|
+
heavyReadsHeldUntilIdle = true;
|
|
7182
|
+
scheduleHeavyReadCompletionRecompute();
|
|
7183
|
+
}
|
|
7184
7184
|
recompute();
|
|
7185
7185
|
}
|
|
7186
7186
|
});
|
|
@@ -9379,22 +9379,10 @@ function createSuperDocUI(options) {
|
|
|
9379
9379
|
};
|
|
9380
9380
|
const trackChangesSnap = snapshotHandle(trackChangesSub);
|
|
9381
9381
|
const trackChanges = {
|
|
9382
|
-
get:
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
getSnapshot: () => {
|
|
9387
|
-
ensureTrackChangesCatalog();
|
|
9388
|
-
return trackChangesSnap.getSnapshot();
|
|
9389
|
-
},
|
|
9390
|
-
subscribe: (listener) => {
|
|
9391
|
-
ensureTrackChangesCatalog();
|
|
9392
|
-
return trackChangesSnap.subscribe(listener);
|
|
9393
|
-
},
|
|
9394
|
-
observe: (listener) => {
|
|
9395
|
-
ensureTrackChangesCatalog();
|
|
9396
|
-
return trackChangesSnap.observe(listener);
|
|
9397
|
-
},
|
|
9382
|
+
get: trackChangesSnap.get,
|
|
9383
|
+
getSnapshot: trackChangesSnap.getSnapshot,
|
|
9384
|
+
subscribe: trackChangesSnap.subscribe,
|
|
9385
|
+
observe: trackChangesSnap.observe,
|
|
9398
9386
|
list: () => {
|
|
9399
9387
|
ensureTrackChangesCatalog();
|
|
9400
9388
|
return trackChangesSub.get().items;
|
|
@@ -3348,6 +3348,18 @@ function projectionBlockMatchesId(block, id) {
|
|
|
3348
3348
|
if (block.sourceAnchor?.sourceNodeId === id) return true;
|
|
3349
3349
|
return block.id === id;
|
|
3350
3350
|
}
|
|
3351
|
+
/**
|
|
3352
|
+
* Length of a painted run in the Document API selection-offset space.
|
|
3353
|
+
*
|
|
3354
|
+
* Review mode paints deleted revision text, but that text is not part of the
|
|
3355
|
+
* editable selection stream. Counting its painted characters shifts every
|
|
3356
|
+
* later selection onto the wrong projected run (and therefore the wrong
|
|
3357
|
+
* effective formatting). Insertions remain selectable and keep their length.
|
|
3358
|
+
*/
|
|
3359
|
+
function projectionRunSelectionLength(run) {
|
|
3360
|
+
if (run.trackedChange?.kind === "delete") return 0;
|
|
3361
|
+
return typeof run.text === "string" ? run.text.length : 0;
|
|
3362
|
+
}
|
|
3351
3363
|
function combineCommandResults(results) {
|
|
3352
3364
|
let last = false;
|
|
3353
3365
|
let firstFailure = null;
|
|
@@ -4470,7 +4482,6 @@ function createSuperDocUI(options) {
|
|
|
4470
4482
|
demandHeavyDocRead("trackChanges");
|
|
4471
4483
|
};
|
|
4472
4484
|
const HEAVY_READ_IDLE_MS = 6500;
|
|
4473
|
-
const HEAVY_READ_IDLE_CEILING_MS = 8e3;
|
|
4474
4485
|
const HEAVY_READ_IDLE_POLL_MS = 250;
|
|
4475
4486
|
let lastEditableMutationAtMs = 0;
|
|
4476
4487
|
/**
|
|
@@ -4485,31 +4496,19 @@ function createSuperDocUI(options) {
|
|
|
4485
4496
|
* recompute cannot bypass the idle gate.
|
|
4486
4497
|
*/
|
|
4487
4498
|
let heavyReadsHeldUntilIdle = false;
|
|
4488
|
-
/** When the STEADY-phase typing hold began; bounds it to the same ceiling. */
|
|
4489
|
-
let heavyReadsTypingHoldSinceMs = 0;
|
|
4490
|
-
/** Lets one ceiling-triggered recompute refresh every heavy key as a group. */
|
|
4491
|
-
let heavyReadCeilingReleaseActive = false;
|
|
4492
4499
|
let heavyReadCompletionRecomputeTimer = null;
|
|
4493
4500
|
const scheduleHeavyReadCompletionRecompute = () => {
|
|
4494
4501
|
if (disposed || heavyReadCompletionRecomputeTimer) return;
|
|
4495
|
-
const startedAtMs = heavyReadsTypingHoldSinceMs || Date.now();
|
|
4496
4502
|
const attempt = () => {
|
|
4497
4503
|
heavyReadCompletionRecomputeTimer = null;
|
|
4498
4504
|
if (disposed) return;
|
|
4499
4505
|
const idleForMs = Date.now() - lastEditableMutationAtMs;
|
|
4500
|
-
|
|
4501
|
-
if (busy && Date.now() - startedAtMs < HEAVY_READ_IDLE_CEILING_MS) {
|
|
4506
|
+
if (foregroundMutationActive() || idleForMs < HEAVY_READ_IDLE_MS) {
|
|
4502
4507
|
heavyReadCompletionRecomputeTimer = setTimeout(attempt, HEAVY_READ_IDLE_POLL_MS);
|
|
4503
4508
|
return;
|
|
4504
4509
|
}
|
|
4505
4510
|
heavyReadsHeldUntilIdle = false;
|
|
4506
|
-
|
|
4507
|
-
try {
|
|
4508
|
-
recompute();
|
|
4509
|
-
} finally {
|
|
4510
|
-
heavyReadCeilingReleaseActive = false;
|
|
4511
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4512
|
-
}
|
|
4511
|
+
recompute();
|
|
4513
4512
|
};
|
|
4514
4513
|
heavyReadCompletionRecomputeTimer = setTimeout(attempt, 0);
|
|
4515
4514
|
};
|
|
@@ -4532,7 +4531,10 @@ function createSuperDocUI(options) {
|
|
|
4532
4531
|
try {
|
|
4533
4532
|
const handleLoadingSnapshot = (snapshot) => {
|
|
4534
4533
|
const stage = snapshot?.sourceStage;
|
|
4535
|
-
if (stage === "source-complete" || stage === "source-failed" || stage === "source-cancelled")
|
|
4534
|
+
if (stage === "source-complete" || stage === "source-failed" || stage === "source-cancelled") {
|
|
4535
|
+
lastEditableMutationAtMs = Math.max(lastEditableMutationAtMs, Date.now());
|
|
4536
|
+
scheduleHeavyReadCompletionRecompute();
|
|
4537
|
+
}
|
|
4536
4538
|
};
|
|
4537
4539
|
const off = subscribe.call(host, handleLoadingSnapshot);
|
|
4538
4540
|
if (typeof off === "function") detachSourceLoading = off;
|
|
@@ -4758,7 +4760,7 @@ function createSuperDocUI(options) {
|
|
|
4758
4760
|
status: "pending"
|
|
4759
4761
|
};
|
|
4760
4762
|
}
|
|
4761
|
-
if (heavyReadsHeldUntilIdle
|
|
4763
|
+
if (heavyReadsHeldUntilIdle) {
|
|
4762
4764
|
scheduleHeavyReadCompletionRecompute();
|
|
4763
4765
|
if (entry?.hasSettled) return {
|
|
4764
4766
|
value: entry.value,
|
|
@@ -4769,22 +4771,17 @@ function createSuperDocUI(options) {
|
|
|
4769
4771
|
status: "pending"
|
|
4770
4772
|
};
|
|
4771
4773
|
}
|
|
4772
|
-
if (
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
value: null,
|
|
4784
|
-
status: "pending"
|
|
4785
|
-
};
|
|
4786
|
-
}
|
|
4787
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4774
|
+
if (Date.now() - lastTypingMutationAtMs < HEAVY_READ_IDLE_MS) {
|
|
4775
|
+
heavyReadsHeldUntilIdle = true;
|
|
4776
|
+
scheduleHeavyReadCompletionRecompute();
|
|
4777
|
+
if (entry?.hasSettled) return {
|
|
4778
|
+
value: entry.value,
|
|
4779
|
+
status: "stale"
|
|
4780
|
+
};
|
|
4781
|
+
return {
|
|
4782
|
+
value: null,
|
|
4783
|
+
status: "pending"
|
|
4784
|
+
};
|
|
4788
4785
|
}
|
|
4789
4786
|
}
|
|
4790
4787
|
if (foregroundMutationActive()) {
|
|
@@ -4877,7 +4874,6 @@ function createSuperDocUI(options) {
|
|
|
4877
4874
|
coldAsyncReadDeferrals.clear();
|
|
4878
4875
|
demandedHeavyReads.clear();
|
|
4879
4876
|
heavyReadsHeldUntilIdle = false;
|
|
4880
|
-
heavyReadsTypingHoldSinceMs = 0;
|
|
4881
4877
|
if (detachSourceLoading) detachSourceLoading();
|
|
4882
4878
|
detachSourceLoading = null;
|
|
4883
4879
|
sourceLoadingSubscriptionHost = null;
|
|
@@ -5354,7 +5350,7 @@ function createSuperDocUI(options) {
|
|
|
5354
5350
|
let acc = 0;
|
|
5355
5351
|
let chosen = null;
|
|
5356
5352
|
for (const run of runs) {
|
|
5357
|
-
const len =
|
|
5353
|
+
const len = projectionRunSelectionLength(run);
|
|
5358
5354
|
if (caretOffset >= acc && caretOffset < acc + len) {
|
|
5359
5355
|
chosen = run;
|
|
5360
5356
|
break;
|
|
@@ -5386,7 +5382,7 @@ function createSuperDocUI(options) {
|
|
|
5386
5382
|
}
|
|
5387
5383
|
let acc = 0;
|
|
5388
5384
|
for (const run of runs) {
|
|
5389
|
-
const len =
|
|
5385
|
+
const len = projectionRunSelectionLength(run);
|
|
5390
5386
|
const runStart = acc;
|
|
5391
5387
|
const runEnd = acc + len;
|
|
5392
5388
|
if (runStart < seg.end && runEnd > seg.start) {
|
|
@@ -5475,7 +5471,7 @@ function createSuperDocUI(options) {
|
|
|
5475
5471
|
let acc = 0;
|
|
5476
5472
|
let chosen = null;
|
|
5477
5473
|
for (const run of runs) {
|
|
5478
|
-
const len =
|
|
5474
|
+
const len = projectionRunSelectionLength(run);
|
|
5479
5475
|
if (caretOffset >= acc && caretOffset < acc + len) {
|
|
5480
5476
|
chosen = run;
|
|
5481
5477
|
break;
|
|
@@ -5511,7 +5507,7 @@ function createSuperDocUI(options) {
|
|
|
5511
5507
|
}
|
|
5512
5508
|
let acc = 0;
|
|
5513
5509
|
for (const run of runs) {
|
|
5514
|
-
const len =
|
|
5510
|
+
const len = projectionRunSelectionLength(run);
|
|
5515
5511
|
const runStart = acc;
|
|
5516
5512
|
const runEnd = acc + len;
|
|
5517
5513
|
if (runStart < seg.end && runEnd > seg.start) {
|
|
@@ -7180,7 +7176,11 @@ function createSuperDocUI(options) {
|
|
|
7180
7176
|
const loadedCommentAnchorsMayHaveChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0 && commentsCatalogMayHaveRows();
|
|
7181
7177
|
if (remoteCommentsPartChanged && !isTypingBurst) heavyReadsHeldUntilIdle = true;
|
|
7182
7178
|
invalidateDocumentContent();
|
|
7183
|
-
if (remoteCommentsPartChanged
|
|
7179
|
+
if (remoteCommentsPartChanged && !isTypingBurst) demandHeavyDocRead("comments");
|
|
7180
|
+
else if (loadedCommentAnchorsMayHaveChanged) {
|
|
7181
|
+
heavyReadsHeldUntilIdle = true;
|
|
7182
|
+
scheduleHeavyReadCompletionRecompute();
|
|
7183
|
+
}
|
|
7184
7184
|
recompute();
|
|
7185
7185
|
}
|
|
7186
7186
|
});
|
|
@@ -9379,22 +9379,10 @@ function createSuperDocUI(options) {
|
|
|
9379
9379
|
};
|
|
9380
9380
|
const trackChangesSnap = snapshotHandle(trackChangesSub);
|
|
9381
9381
|
const trackChanges = {
|
|
9382
|
-
get:
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
getSnapshot: () => {
|
|
9387
|
-
ensureTrackChangesCatalog();
|
|
9388
|
-
return trackChangesSnap.getSnapshot();
|
|
9389
|
-
},
|
|
9390
|
-
subscribe: (listener) => {
|
|
9391
|
-
ensureTrackChangesCatalog();
|
|
9392
|
-
return trackChangesSnap.subscribe(listener);
|
|
9393
|
-
},
|
|
9394
|
-
observe: (listener) => {
|
|
9395
|
-
ensureTrackChangesCatalog();
|
|
9396
|
-
return trackChangesSnap.observe(listener);
|
|
9397
|
-
},
|
|
9382
|
+
get: trackChangesSnap.get,
|
|
9383
|
+
getSnapshot: trackChangesSnap.getSnapshot,
|
|
9384
|
+
subscribe: trackChangesSnap.subscribe,
|
|
9385
|
+
observe: trackChangesSnap.observe,
|
|
9398
9386
|
list: () => {
|
|
9399
9387
|
ensureTrackChangesCatalog();
|
|
9400
9388
|
return trackChangesSub.get().items;
|
|
@@ -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.4.0-next.
|
|
22
|
+
superdocVersion: "2.4.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.4.0-next.
|
|
21
|
+
superdocVersion: "2.4.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
|
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-CTe12b19.cjs");
|
|
3
3
|
let react = require("react");
|
|
4
4
|
//#region src/public/ui/react.ts
|
|
5
5
|
/**
|
|
@@ -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-BRBwfV-s.es.js";
|
|
2
2
|
import { createContext, createElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
//#region src/public/ui/react.ts
|
|
4
4
|
/**
|
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-CTe12b19.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-BRBwfV-s.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
package/dist/style.css
CHANGED
|
@@ -1769,11 +1769,11 @@ img[data-v-c95b2073] {
|
|
|
1769
1769
|
pointer-events: auto;
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
-
.superdoc[data-v-
|
|
1772
|
+
.superdoc[data-v-25570fd2] {
|
|
1773
1773
|
display: flex;
|
|
1774
1774
|
position: relative;
|
|
1775
1775
|
}
|
|
1776
|
-
.sd-visually-hidden[data-v-
|
|
1776
|
+
.sd-visually-hidden[data-v-25570fd2] {
|
|
1777
1777
|
position: absolute;
|
|
1778
1778
|
width: 1px;
|
|
1779
1779
|
height: 1px;
|
|
@@ -1784,30 +1784,30 @@ img[data-v-c95b2073] {
|
|
|
1784
1784
|
white-space: nowrap;
|
|
1785
1785
|
border: 0;
|
|
1786
1786
|
}
|
|
1787
|
-
.right-sidebar[data-v-
|
|
1787
|
+
.right-sidebar[data-v-25570fd2] {
|
|
1788
1788
|
min-width: 320px;
|
|
1789
1789
|
height: 100%;
|
|
1790
1790
|
}
|
|
1791
|
-
.floating-comments[data-v-
|
|
1791
|
+
.floating-comments[data-v-25570fd2] {
|
|
1792
1792
|
min-width: 300px;
|
|
1793
1793
|
width: 300px;
|
|
1794
1794
|
height: 100%;
|
|
1795
1795
|
overflow: visible;
|
|
1796
1796
|
}
|
|
1797
|
-
.superdoc__layers[data-v-
|
|
1797
|
+
.superdoc__layers[data-v-25570fd2] {
|
|
1798
1798
|
height: 100%;
|
|
1799
1799
|
position: relative;
|
|
1800
1800
|
box-sizing: border-box;
|
|
1801
1801
|
}
|
|
1802
|
-
.superdoc__document[data-v-
|
|
1802
|
+
.superdoc__document[data-v-25570fd2] {
|
|
1803
1803
|
width: 100%;
|
|
1804
1804
|
position: relative;
|
|
1805
1805
|
}
|
|
1806
|
-
.superdoc__sub-document[data-v-
|
|
1806
|
+
.superdoc__sub-document[data-v-25570fd2] {
|
|
1807
1807
|
width: 100%;
|
|
1808
1808
|
position: relative;
|
|
1809
1809
|
}
|
|
1810
|
-
.superdoc__selection-layer[data-v-
|
|
1810
|
+
.superdoc__selection-layer[data-v-25570fd2] {
|
|
1811
1811
|
position: absolute;
|
|
1812
1812
|
min-width: 100%;
|
|
1813
1813
|
min-height: 100%;
|
|
@@ -1818,13 +1818,13 @@ img[data-v-c95b2073] {
|
|
|
1818
1818
|
/* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
|
|
1819
1819
|
the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
|
|
1820
1820
|
clickable, and below the selection layer (z-index 10). */
|
|
1821
|
-
.superdoc__whiteboard-layer[data-v-
|
|
1821
|
+
.superdoc__whiteboard-layer[data-v-25570fd2] {
|
|
1822
1822
|
z-index: 4;
|
|
1823
1823
|
}
|
|
1824
|
-
.superdoc__temp-selection[data-v-
|
|
1824
|
+
.superdoc__temp-selection[data-v-25570fd2] {
|
|
1825
1825
|
position: absolute;
|
|
1826
1826
|
}
|
|
1827
|
-
.superdoc__right-sidebar[data-v-
|
|
1827
|
+
.superdoc__right-sidebar[data-v-25570fd2] {
|
|
1828
1828
|
width: 320px;
|
|
1829
1829
|
min-width: 320px;
|
|
1830
1830
|
padding: 0 10px;
|
|
@@ -1832,7 +1832,7 @@ img[data-v-c95b2073] {
|
|
|
1832
1832
|
position: relative;
|
|
1833
1833
|
z-index: 2;
|
|
1834
1834
|
}
|
|
1835
|
-
.superdoc__compact-comment-popover[data-v-
|
|
1835
|
+
.superdoc__compact-comment-popover[data-v-25570fd2] {
|
|
1836
1836
|
position: absolute;
|
|
1837
1837
|
top: 12px;
|
|
1838
1838
|
right: 12px;
|
|
@@ -1841,14 +1841,14 @@ img[data-v-c95b2073] {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
|
|
1843
1843
|
/* Tools styles */
|
|
1844
|
-
.tools[data-v-
|
|
1844
|
+
.tools[data-v-25570fd2] {
|
|
1845
1845
|
position: absolute;
|
|
1846
1846
|
z-index: 3;
|
|
1847
1847
|
display: flex;
|
|
1848
1848
|
flex-direction: column;
|
|
1849
1849
|
gap: var(--sd-ui-tools-gap, 6px);
|
|
1850
1850
|
}
|
|
1851
|
-
.tools-item[data-v-
|
|
1851
|
+
.tools-item[data-v-25570fd2] {
|
|
1852
1852
|
display: flex;
|
|
1853
1853
|
align-items: center;
|
|
1854
1854
|
justify-content: center;
|
|
@@ -1859,10 +1859,10 @@ img[data-v-c95b2073] {
|
|
|
1859
1859
|
cursor: pointer;
|
|
1860
1860
|
position: relative;
|
|
1861
1861
|
}
|
|
1862
|
-
.tools-item i[data-v-
|
|
1862
|
+
.tools-item i[data-v-25570fd2] {
|
|
1863
1863
|
cursor: pointer;
|
|
1864
1864
|
}
|
|
1865
|
-
.superdoc__tools-icon[data-v-
|
|
1865
|
+
.superdoc__tools-icon[data-v-25570fd2] {
|
|
1866
1866
|
width: var(--sd-ui-tools-icon-size, 20px);
|
|
1867
1867
|
height: var(--sd-ui-tools-icon-size, 20px);
|
|
1868
1868
|
flex-shrink: 0;
|
|
@@ -1877,22 +1877,22 @@ img[data-v-c95b2073] {
|
|
|
1877
1877
|
|
|
1878
1878
|
/* 834px is iPad screen size in portrait orientation */
|
|
1879
1879
|
@media (max-width: 834px) {
|
|
1880
|
-
.superdoc .superdoc__layers[data-v-
|
|
1880
|
+
.superdoc .superdoc__layers[data-v-25570fd2] {
|
|
1881
1881
|
margin: 0;
|
|
1882
1882
|
border: 0 !important;
|
|
1883
1883
|
box-shadow: none;
|
|
1884
1884
|
}
|
|
1885
|
-
.superdoc__sub-document[data-v-
|
|
1885
|
+
.superdoc__sub-document[data-v-25570fd2] {
|
|
1886
1886
|
max-width: 100%;
|
|
1887
1887
|
}
|
|
1888
|
-
.superdoc__right-sidebar[data-v-
|
|
1888
|
+
.superdoc__right-sidebar[data-v-25570fd2] {
|
|
1889
1889
|
padding: 10px;
|
|
1890
1890
|
position: relative;
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
|
|
1894
1894
|
/* AI Writer styles */
|
|
1895
|
-
.ai-writer-container[data-v-
|
|
1895
|
+
.ai-writer-container[data-v-25570fd2] {
|
|
1896
1896
|
position: fixed;
|
|
1897
1897
|
z-index: 1000;
|
|
1898
1898
|
background: white;
|
|
@@ -1908,10 +1908,10 @@ img[data-v-c95b2073] {
|
|
|
1908
1908
|
transform: translateY(-50%);
|
|
1909
1909
|
z-index: 50;
|
|
1910
1910
|
} */
|
|
1911
|
-
.ai-tool > svg[data-v-
|
|
1911
|
+
.ai-tool > svg[data-v-25570fd2] {
|
|
1912
1912
|
fill: transparent;
|
|
1913
1913
|
}
|
|
1914
|
-
.ai-tool[data-v-
|
|
1914
|
+
.ai-tool[data-v-25570fd2]::before {
|
|
1915
1915
|
content: '';
|
|
1916
1916
|
position: absolute;
|
|
1917
1917
|
width: 20px;
|
|
@@ -1932,7 +1932,7 @@ img[data-v-c95b2073] {
|
|
|
1932
1932
|
filter: brightness(1.2);
|
|
1933
1933
|
transition: filter 0.2s ease;
|
|
1934
1934
|
}
|
|
1935
|
-
.ai-tool[data-v-
|
|
1935
|
+
.ai-tool[data-v-25570fd2]:hover::before {
|
|
1936
1936
|
filter: brightness(1.3);
|
|
1937
1937
|
}
|
|
1938
1938
|
|