superdoc 2.28.0-next.16 → 2.28.0-next.18
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-DfSPIhxs.cjs → create-super-doc-ui-DOnTWcx7.cjs} +55 -17
- package/dist/chunks/{create-super-doc-ui-J7aMU_wd.es.js → create-super-doc-ui-gI3fiM_P.es.js} +50 -18
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
- package/dist/document-api/src/types/receipt.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-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +3 -2
- package/dist/public/ui.es.js +3 -2
- package/dist/shared/font-system/src/resolver.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +0 -5
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +2 -0
- package/dist/superdoc/src/public/ui/types.d.ts +11 -0
- package/dist/superdoc/src/public/ui.d.cts +4 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +4 -37
- package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -111
- package/dist/superdoc.cjs +62 -139
- package/dist/superdoc.es.js +62 -139
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
- package/dist/superdoc/src/core/collaboration/collaboration.d.ts +0 -18
|
@@ -2651,6 +2651,16 @@ function isPlainObject(value) {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
//#endregion
|
|
2653
2653
|
//#region src/helpers/v2-review-mutation-impact.ts
|
|
2654
|
+
function mutationCommittedEventChangedVisibleContent(event) {
|
|
2655
|
+
if (event.dryRun === true) return false;
|
|
2656
|
+
if (isPlainObject(event.result) && event.result.noop === true) return false;
|
|
2657
|
+
const receipt = isPlainObject(event.receipt) ? event.receipt : null;
|
|
2658
|
+
if (receipt?.changed === false || receipt?.noop === true || receipt?.status === "NO_OP") return false;
|
|
2659
|
+
return true;
|
|
2660
|
+
}
|
|
2661
|
+
function mutationCommittedEventChangedDocument(event) {
|
|
2662
|
+
return event.cause !== "preview" && mutationCommittedEventChangedVisibleContent(event);
|
|
2663
|
+
}
|
|
2654
2664
|
/**
|
|
2655
2665
|
* Classify the tracked-change identities carried by a v2 mutation event.
|
|
2656
2666
|
*
|
|
@@ -5763,18 +5773,6 @@ function commandResultFromOperationResult(result) {
|
|
|
5763
5773
|
function isSuccessfulReceipt(result) {
|
|
5764
5774
|
return Boolean(result) && typeof result === "object" && result.success === true;
|
|
5765
5775
|
}
|
|
5766
|
-
/**
|
|
5767
|
-
* The host also emits `mutation:committed` for previews and no-op receipts;
|
|
5768
|
-
* those events must not mark the document as having unsaved edits.
|
|
5769
|
-
*/
|
|
5770
|
-
function mutationCommittedEventChangedDocument(event) {
|
|
5771
|
-
if (event.dryRun === true) return false;
|
|
5772
|
-
const receipt = event.receipt;
|
|
5773
|
-
if (receipt && typeof receipt === "object" && receipt.changed === false) return false;
|
|
5774
|
-
if (receipt && typeof receipt === "object" && receipt.noop === true) return false;
|
|
5775
|
-
if (receipt && typeof receipt === "object" && receipt.status === "NO_OP") return false;
|
|
5776
|
-
return true;
|
|
5777
|
-
}
|
|
5778
5776
|
function readTxId(value) {
|
|
5779
5777
|
return typeof value === "string" && value.length > 0 ? value : null;
|
|
5780
5778
|
}
|
|
@@ -6719,9 +6717,19 @@ function createSuperDocUI(options) {
|
|
|
6719
6717
|
if (seeded > 0) dirtyHosts.add(host);
|
|
6720
6718
|
else if (revision === 0) dirtyHosts.delete(host);
|
|
6721
6719
|
};
|
|
6722
|
-
const
|
|
6720
|
+
const savedPoint = () => {
|
|
6723
6721
|
const host = getHost();
|
|
6722
|
+
return {
|
|
6723
|
+
host,
|
|
6724
|
+
isDirty: hostMethod(host, "isDirty"),
|
|
6725
|
+
getDocumentVersion: hostMethod(host, "getDocumentVersion"),
|
|
6726
|
+
markSaved: hostMethod(host, "markSaved")
|
|
6727
|
+
};
|
|
6728
|
+
};
|
|
6729
|
+
const hasLocalDocumentMutation = () => {
|
|
6730
|
+
const { host, isDirty } = savedPoint();
|
|
6724
6731
|
if (!host) return false;
|
|
6732
|
+
if (isDirty) return Boolean(safeCall(() => isDirty(), false));
|
|
6725
6733
|
seedLocalDocumentMutation(host);
|
|
6726
6734
|
return dirtyHosts.has(host);
|
|
6727
6735
|
};
|
|
@@ -10288,14 +10296,17 @@ function createSuperDocUI(options) {
|
|
|
10288
10296
|
const type = event?.type;
|
|
10289
10297
|
if (host) publishDocumentChange(host, event);
|
|
10290
10298
|
const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
|
|
10291
|
-
if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" &&
|
|
10299
|
+
if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedVisibleContent(event) || type === "collaboration:remote-changed") {
|
|
10292
10300
|
for (const [commandId, optimistic] of optimisticInlineToggles) if (optimistic.settled || type === "collaboration:document-replaced") optimisticInlineToggles.delete(commandId);
|
|
10293
10301
|
}
|
|
10294
|
-
if (isStandaloneDocumentMutation || type === "mutation:committed" &&
|
|
10295
|
-
|
|
10302
|
+
if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedVisibleContent(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
|
|
10303
|
+
const documentEdited = type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event);
|
|
10304
|
+
if (documentEdited && host && hostMethod(host, "isDirty")) recompute("document-dirty");
|
|
10305
|
+
else if (documentEdited && host && !dirtyHosts.has(host)) {
|
|
10296
10306
|
dirtyHosts.add(host);
|
|
10297
10307
|
recompute("document-dirty");
|
|
10298
10308
|
}
|
|
10309
|
+
if (type === "document:saved-point-changed") recompute("document-dirty");
|
|
10299
10310
|
if (type === "collaboration:document-replaced" && host) {
|
|
10300
10311
|
dirtyHosts.delete(host);
|
|
10301
10312
|
hostSeededMutationRevision.delete(host);
|
|
@@ -10327,6 +10338,7 @@ function createSuperDocUI(options) {
|
|
|
10327
10338
|
if (impact?.allResolved) {
|
|
10328
10339
|
replaceTrackedChangeItemsInCache([]);
|
|
10329
10340
|
publishAllTrackedChangesResolved(event.receipt);
|
|
10341
|
+
if (event.cause === "preview") invalidateDocumentContent();
|
|
10330
10342
|
return;
|
|
10331
10343
|
}
|
|
10332
10344
|
if (impact?.removedIds.size) markPostDecisionTrackChanges(new Set(impact.removedIds), event.receipt);
|
|
@@ -10336,7 +10348,10 @@ function createSuperDocUI(options) {
|
|
|
10336
10348
|
scheduleTypingDocumentContentInvalidation();
|
|
10337
10349
|
return;
|
|
10338
10350
|
}
|
|
10339
|
-
if (impact?.removedIds.size && impact.upsertIds.size === 0)
|
|
10351
|
+
if (impact?.removedIds.size && impact.upsertIds.size === 0) {
|
|
10352
|
+
if (event.cause === "preview") invalidateDocumentContent();
|
|
10353
|
+
return;
|
|
10354
|
+
}
|
|
10340
10355
|
if (isStandaloneDocumentMutation || type === "collaboration:remote-changed" || type === "mutation:committed" && !isTypingBurst) schedulePostPaintContentRefresh();
|
|
10341
10356
|
const remoteCommentsPartChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedPartUris) && event.changedPartUris.some((partUri) => typeof partUri === "string" && COMMENTS_CATALOG_PART_URIS.has(partUri));
|
|
10342
10357
|
const loadedCommentAnchorsMayHaveChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0 && commentsCatalogMayHaveRows();
|
|
@@ -13843,6 +13858,23 @@ function createSuperDocUI(options) {
|
|
|
13843
13858
|
if (disposed) return () => {};
|
|
13844
13859
|
documentChangeListeners.add(listener);
|
|
13845
13860
|
return () => documentChangeListeners.delete(listener);
|
|
13861
|
+
},
|
|
13862
|
+
getVersion: () => {
|
|
13863
|
+
const { getDocumentVersion } = savedPoint();
|
|
13864
|
+
const version = getDocumentVersion ? safeCall(() => getDocumentVersion(), null) : null;
|
|
13865
|
+
return typeof version === "string" ? version : null;
|
|
13866
|
+
},
|
|
13867
|
+
markClean: (version) => {
|
|
13868
|
+
const { markSaved } = savedPoint();
|
|
13869
|
+
if (!markSaved) return {
|
|
13870
|
+
ok: false,
|
|
13871
|
+
reason: "unavailable"
|
|
13872
|
+
};
|
|
13873
|
+
const result = safeCall(() => markSaved(version), null);
|
|
13874
|
+
return isPlainObject(result) && result.ok === true ? { ok: true } : {
|
|
13875
|
+
ok: false,
|
|
13876
|
+
reason: isPlainObject(result) && result.reason === "document-changed" ? "document-changed" : "unavailable"
|
|
13877
|
+
};
|
|
13846
13878
|
}
|
|
13847
13879
|
};
|
|
13848
13880
|
const resolveVisibleHost = () => {
|
|
@@ -15745,6 +15777,12 @@ Object.defineProperty(exports, "isWorkflowRecordingEnabled", {
|
|
|
15745
15777
|
return isWorkflowRecordingEnabled;
|
|
15746
15778
|
}
|
|
15747
15779
|
});
|
|
15780
|
+
Object.defineProperty(exports, "mutationCommittedEventChangedDocument", {
|
|
15781
|
+
enumerable: true,
|
|
15782
|
+
get: function() {
|
|
15783
|
+
return mutationCommittedEventChangedDocument;
|
|
15784
|
+
}
|
|
15785
|
+
});
|
|
15748
15786
|
Object.defineProperty(exports, "readFirstPartyPageNumbers", {
|
|
15749
15787
|
enumerable: true,
|
|
15750
15788
|
get: function() {
|
package/dist/chunks/{create-super-doc-ui-J7aMU_wd.es.js → create-super-doc-ui-gI3fiM_P.es.js}
RENAMED
|
@@ -2650,6 +2650,16 @@ function isPlainObject(value) {
|
|
|
2650
2650
|
}
|
|
2651
2651
|
//#endregion
|
|
2652
2652
|
//#region src/helpers/v2-review-mutation-impact.ts
|
|
2653
|
+
function mutationCommittedEventChangedVisibleContent(event) {
|
|
2654
|
+
if (event.dryRun === true) return false;
|
|
2655
|
+
if (isPlainObject(event.result) && event.result.noop === true) return false;
|
|
2656
|
+
const receipt = isPlainObject(event.receipt) ? event.receipt : null;
|
|
2657
|
+
if (receipt?.changed === false || receipt?.noop === true || receipt?.status === "NO_OP") return false;
|
|
2658
|
+
return true;
|
|
2659
|
+
}
|
|
2660
|
+
function mutationCommittedEventChangedDocument(event) {
|
|
2661
|
+
return event.cause !== "preview" && mutationCommittedEventChangedVisibleContent(event);
|
|
2662
|
+
}
|
|
2653
2663
|
/**
|
|
2654
2664
|
* Classify the tracked-change identities carried by a v2 mutation event.
|
|
2655
2665
|
*
|
|
@@ -5762,18 +5772,6 @@ function commandResultFromOperationResult(result) {
|
|
|
5762
5772
|
function isSuccessfulReceipt(result) {
|
|
5763
5773
|
return Boolean(result) && typeof result === "object" && result.success === true;
|
|
5764
5774
|
}
|
|
5765
|
-
/**
|
|
5766
|
-
* The host also emits `mutation:committed` for previews and no-op receipts;
|
|
5767
|
-
* those events must not mark the document as having unsaved edits.
|
|
5768
|
-
*/
|
|
5769
|
-
function mutationCommittedEventChangedDocument(event) {
|
|
5770
|
-
if (event.dryRun === true) return false;
|
|
5771
|
-
const receipt = event.receipt;
|
|
5772
|
-
if (receipt && typeof receipt === "object" && receipt.changed === false) return false;
|
|
5773
|
-
if (receipt && typeof receipt === "object" && receipt.noop === true) return false;
|
|
5774
|
-
if (receipt && typeof receipt === "object" && receipt.status === "NO_OP") return false;
|
|
5775
|
-
return true;
|
|
5776
|
-
}
|
|
5777
5775
|
function readTxId(value) {
|
|
5778
5776
|
return typeof value === "string" && value.length > 0 ? value : null;
|
|
5779
5777
|
}
|
|
@@ -6718,9 +6716,19 @@ function createSuperDocUI(options) {
|
|
|
6718
6716
|
if (seeded > 0) dirtyHosts.add(host);
|
|
6719
6717
|
else if (revision === 0) dirtyHosts.delete(host);
|
|
6720
6718
|
};
|
|
6721
|
-
const
|
|
6719
|
+
const savedPoint = () => {
|
|
6722
6720
|
const host = getHost();
|
|
6721
|
+
return {
|
|
6722
|
+
host,
|
|
6723
|
+
isDirty: hostMethod(host, "isDirty"),
|
|
6724
|
+
getDocumentVersion: hostMethod(host, "getDocumentVersion"),
|
|
6725
|
+
markSaved: hostMethod(host, "markSaved")
|
|
6726
|
+
};
|
|
6727
|
+
};
|
|
6728
|
+
const hasLocalDocumentMutation = () => {
|
|
6729
|
+
const { host, isDirty } = savedPoint();
|
|
6723
6730
|
if (!host) return false;
|
|
6731
|
+
if (isDirty) return Boolean(safeCall(() => isDirty(), false));
|
|
6724
6732
|
seedLocalDocumentMutation(host);
|
|
6725
6733
|
return dirtyHosts.has(host);
|
|
6726
6734
|
};
|
|
@@ -10287,14 +10295,17 @@ function createSuperDocUI(options) {
|
|
|
10287
10295
|
const type = event?.type;
|
|
10288
10296
|
if (host) publishDocumentChange(host, event);
|
|
10289
10297
|
const isStandaloneDocumentMutation = type === "document:mutated" && event.hasCommitEvent !== true;
|
|
10290
|
-
if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" &&
|
|
10298
|
+
if (type === "collaboration:document-replaced" || isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedVisibleContent(event) || type === "collaboration:remote-changed") {
|
|
10291
10299
|
for (const [commandId, optimistic] of optimisticInlineToggles) if (optimistic.settled || type === "collaboration:document-replaced") optimisticInlineToggles.delete(commandId);
|
|
10292
10300
|
}
|
|
10293
|
-
if (isStandaloneDocumentMutation || type === "mutation:committed" &&
|
|
10294
|
-
|
|
10301
|
+
if (isStandaloneDocumentMutation || type === "mutation:committed" && mutationCommittedEventChangedVisibleContent(event) || type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0) scheduleActiveSearchRefresh();
|
|
10302
|
+
const documentEdited = type === "document:mutated" || type === "mutation:committed" && mutationCommittedEventChangedDocument(event);
|
|
10303
|
+
if (documentEdited && host && hostMethod(host, "isDirty")) recompute("document-dirty");
|
|
10304
|
+
else if (documentEdited && host && !dirtyHosts.has(host)) {
|
|
10295
10305
|
dirtyHosts.add(host);
|
|
10296
10306
|
recompute("document-dirty");
|
|
10297
10307
|
}
|
|
10308
|
+
if (type === "document:saved-point-changed") recompute("document-dirty");
|
|
10298
10309
|
if (type === "collaboration:document-replaced" && host) {
|
|
10299
10310
|
dirtyHosts.delete(host);
|
|
10300
10311
|
hostSeededMutationRevision.delete(host);
|
|
@@ -10326,6 +10337,7 @@ function createSuperDocUI(options) {
|
|
|
10326
10337
|
if (impact?.allResolved) {
|
|
10327
10338
|
replaceTrackedChangeItemsInCache([]);
|
|
10328
10339
|
publishAllTrackedChangesResolved(event.receipt);
|
|
10340
|
+
if (event.cause === "preview") invalidateDocumentContent();
|
|
10329
10341
|
return;
|
|
10330
10342
|
}
|
|
10331
10343
|
if (impact?.removedIds.size) markPostDecisionTrackChanges(new Set(impact.removedIds), event.receipt);
|
|
@@ -10335,7 +10347,10 @@ function createSuperDocUI(options) {
|
|
|
10335
10347
|
scheduleTypingDocumentContentInvalidation();
|
|
10336
10348
|
return;
|
|
10337
10349
|
}
|
|
10338
|
-
if (impact?.removedIds.size && impact.upsertIds.size === 0)
|
|
10350
|
+
if (impact?.removedIds.size && impact.upsertIds.size === 0) {
|
|
10351
|
+
if (event.cause === "preview") invalidateDocumentContent();
|
|
10352
|
+
return;
|
|
10353
|
+
}
|
|
10339
10354
|
if (isStandaloneDocumentMutation || type === "collaboration:remote-changed" || type === "mutation:committed" && !isTypingBurst) schedulePostPaintContentRefresh();
|
|
10340
10355
|
const remoteCommentsPartChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedPartUris) && event.changedPartUris.some((partUri) => typeof partUri === "string" && COMMENTS_CATALOG_PART_URIS.has(partUri));
|
|
10341
10356
|
const loadedCommentAnchorsMayHaveChanged = type === "collaboration:remote-changed" && Array.isArray(event.changedStoryIds) && event.changedStoryIds.length > 0 && commentsCatalogMayHaveRows();
|
|
@@ -13842,6 +13857,23 @@ function createSuperDocUI(options) {
|
|
|
13842
13857
|
if (disposed) return () => {};
|
|
13843
13858
|
documentChangeListeners.add(listener);
|
|
13844
13859
|
return () => documentChangeListeners.delete(listener);
|
|
13860
|
+
},
|
|
13861
|
+
getVersion: () => {
|
|
13862
|
+
const { getDocumentVersion } = savedPoint();
|
|
13863
|
+
const version = getDocumentVersion ? safeCall(() => getDocumentVersion(), null) : null;
|
|
13864
|
+
return typeof version === "string" ? version : null;
|
|
13865
|
+
},
|
|
13866
|
+
markClean: (version) => {
|
|
13867
|
+
const { markSaved } = savedPoint();
|
|
13868
|
+
if (!markSaved) return {
|
|
13869
|
+
ok: false,
|
|
13870
|
+
reason: "unavailable"
|
|
13871
|
+
};
|
|
13872
|
+
const result = safeCall(() => markSaved(version), null);
|
|
13873
|
+
return isPlainObject(result) && result.ok === true ? { ok: true } : {
|
|
13874
|
+
ok: false,
|
|
13875
|
+
reason: isPlainObject(result) && result.reason === "document-changed" ? "document-changed" : "unavailable"
|
|
13876
|
+
};
|
|
13845
13877
|
}
|
|
13846
13878
|
};
|
|
13847
13879
|
const resolveVisibleHost = () => {
|
|
@@ -15654,4 +15686,4 @@ function commandIsActive(descriptor, selection) {
|
|
|
15654
15686
|
return descriptor.activeMark ? selection.activeMarks.includes(descriptor.activeMark) : false;
|
|
15655
15687
|
}
|
|
15656
15688
|
//#endregion
|
|
15657
|
-
export {
|
|
15689
|
+
export { closeInteractionHistory as _, registerFirstPartyCommandMutation as a, isWorkflowRecordingEnabled as b, applyV2CommentInvalidationFromMutation as c, isPlainObject as d, createImageFilePicker as f, DOM_CLASS_NAMES as g, isSyntheticTrackedChangeCommentLaneItem as h, readFirstPartyPageNumbers as i, getV2TrackedChangeMutationImpact as l, shallowEqual as m, executeFirstPartyCommandAsync as n, isRecord as o, resolveImageSrc as p, executeFirstPartyShortcutAsync as r, BUILT_IN_COMMAND_IDS as s, createSuperDocUI as t, mutationCommittedEventChangedDocument as u, createInteractionHistory as v, recordInteraction as x, getWorkflowRecording as y };
|
|
@@ -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.28.0-next.
|
|
22
|
+
superdocVersion: "2.28.0-next.18",
|
|
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.28.0-next.
|
|
21
|
+
superdocVersion: "2.28.0-next.18",
|
|
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
|
|
@@ -2829,7 +2829,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
2829
2829
|
readonly 'footnotes.insert': {
|
|
2830
2830
|
readonly memberPath: "footnotes.insert";
|
|
2831
2831
|
readonly description: "Insert a new footnote or endnote at a target location or the current selection.";
|
|
2832
|
-
readonly expectedResult:
|
|
2832
|
+
readonly expectedResult: string;
|
|
2833
2833
|
readonly requiresDocumentContext: true;
|
|
2834
2834
|
readonly metadata: CommandStaticMetadata;
|
|
2835
2835
|
readonly referenceDocPath: "footnotes/insert.mdx";
|
|
@@ -3726,7 +3726,7 @@ export declare const OPERATION_DEFINITIONS: {
|
|
|
3726
3726
|
readonly find: {
|
|
3727
3727
|
readonly memberPath: "find";
|
|
3728
3728
|
readonly description: "Search the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.";
|
|
3729
|
-
readonly expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }). Text hits contain only the matched text; use getNode or getNodeById for the full containing node. Node selectors return full node projections.";
|
|
3729
|
+
readonly expectedResult: "Returns an SDFindResult envelope ({ total, limit, offset, items }). Each item is an SDNodeResult ({ node, address }). Text hits contain only the matched text; use getNode or getNodeById for the full containing node. Node selectors return full node projections. Bookmark selectors return the bookmarks of the searched story in document order: each address is an inline bookmark address whose anchor spans the bookmark range, and each node is an ext.bookmark node whose bookmark.address resolves through bookmarks.get.";
|
|
3730
3730
|
readonly requiresDocumentContext: true;
|
|
3731
3731
|
readonly metadata: CommandStaticMetadata;
|
|
3732
3732
|
readonly referenceDocPath: "find.mdx";
|
|
@@ -15,7 +15,7 @@ export type ReceiptFailureCode = 'NO_OP' | 'INVALID_TARGET' | 'TARGET_NOT_FOUND'
|
|
|
15
15
|
export type TextRangeRejectionReason = 'text-range-in-sdt' | 'text-range-in-field' | 'text-range-in-unsupported-tracked-wrapper';
|
|
16
16
|
/** Content-control creation keeps its existing top-level failure code. */
|
|
17
17
|
export type ContentControlCreationRejectionReason = 'content-control-unsupported-inline-structure' | 'content-control-shared-run-boundary';
|
|
18
|
-
export type DocumentApiRejectionReason = TextRangeRejectionReason | ContentControlCreationRejectionReason;
|
|
18
|
+
export type DocumentApiRejectionReason = TextRangeRejectionReason | ContentControlCreationRejectionReason | 'paragraph-mark-already-deleted';
|
|
19
19
|
export interface DocumentApiRejectionDetails extends Record<string, unknown> {
|
|
20
20
|
reason: DocumentApiRejectionReason;
|
|
21
21
|
}
|
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-DOnTWcx7.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let use_sync_external_store_shim = require("use-sync-external-store/shim");
|
|
@@ -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-gI3fiM_P.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
|
import { useSyncExternalStore } from "use-sync-external-store/shim";
|
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-DOnTWcx7.cjs");
|
|
3
3
|
const require_slice_source = require("../chunks/slice-source-CFaqq0Vo.cjs");
|
|
4
4
|
let superdoc_entry_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-gI3fiM_P.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-DOnTWcx7.cjs");
|
|
3
3
|
//#region ../document-api/src/types/receipt.ts
|
|
4
4
|
/** Read a known failure.details.reason without assuming every failure has one. */
|
|
5
5
|
function getDocumentApiRejectionReason(details) {
|
|
@@ -9,7 +9,8 @@ function getDocumentApiRejectionReason(details) {
|
|
|
9
9
|
case "text-range-in-field":
|
|
10
10
|
case "text-range-in-unsupported-tracked-wrapper":
|
|
11
11
|
case "content-control-unsupported-inline-structure":
|
|
12
|
-
case "content-control-shared-run-boundary":
|
|
12
|
+
case "content-control-shared-run-boundary":
|
|
13
|
+
case "paragraph-mark-already-deleted": return details.reason;
|
|
13
14
|
default: return;
|
|
14
15
|
}
|
|
15
16
|
}
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as shallowEqual, s as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-gI3fiM_P.es.js";
|
|
2
2
|
//#region ../document-api/src/types/receipt.ts
|
|
3
3
|
/** Read a known failure.details.reason without assuming every failure has one. */
|
|
4
4
|
function getDocumentApiRejectionReason(details) {
|
|
@@ -8,7 +8,8 @@ function getDocumentApiRejectionReason(details) {
|
|
|
8
8
|
case "text-range-in-field":
|
|
9
9
|
case "text-range-in-unsupported-tracked-wrapper":
|
|
10
10
|
case "content-control-unsupported-inline-structure":
|
|
11
|
-
case "content-control-shared-run-boundary":
|
|
11
|
+
case "content-control-shared-run-boundary":
|
|
12
|
+
case "paragraph-mark-already-deleted": return details.reason;
|
|
12
13
|
default: return;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -146,7 +146,7 @@ export declare class FontResolver {
|
|
|
146
146
|
/**
|
|
147
147
|
* Resolve a CSS font-family value for MEASURE and PAINT: swap the primary family to its
|
|
148
148
|
* physical substitute and keep the original fallbacks. "Calibri, sans-serif" ->
|
|
149
|
-
* "Carlito, sans-serif"; "Calibri" -> "Carlito".
|
|
149
|
+
* "Carlito, sans-serif"; "Calibri" -> "Carlito". Quotes primary names when required by CSS syntax.
|
|
150
150
|
*/
|
|
151
151
|
resolvePhysicalFamily(cssFontFamily: string): string;
|
|
152
152
|
/**
|
|
@@ -160,8 +160,8 @@ export declare class FontResolver {
|
|
|
160
160
|
/**
|
|
161
161
|
* Face-aware CSS-stack variant for MEASURE and PAINT - the face-scoped counterpart of
|
|
162
162
|
* {@link resolvePhysicalFamily}. Swaps the primary family to its substitute when this exact face is
|
|
163
|
-
* real or docfonts authorizes a synthetic source face. Otherwise
|
|
164
|
-
*
|
|
163
|
+
* real or docfonts authorizes a synthetic source face. Otherwise keeps the logical family and its
|
|
164
|
+
* fallbacks, quoting primary names when required by CSS syntax. Measure and
|
|
165
165
|
* paint MUST call this with the same face key, or text is measured in one face and painted in another.
|
|
166
166
|
*/
|
|
167
167
|
resolvePhysicalFamilyForFace(cssFontFamily: string, face: FaceKey, hasFace: HasFace): string;
|