superdoc 2.24.0-next.2 → 2.24.0-next.3
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-BOrgnNVV.es.js → create-super-doc-ui-8UTu16Lw.es.js} +157 -66
- package/dist/chunks/{create-super-doc-ui-tJenv7pA.cjs → create-super-doc-ui-bTFGKVRb.cjs} +157 -66
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/selection/selection.types.d.ts +6 -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 +6 -0
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
|
@@ -6075,6 +6075,18 @@ function createSuperDocUI(options) {
|
|
|
6075
6075
|
const host = getEditor()?.host;
|
|
6076
6076
|
return host && typeof host === "object" ? host : null;
|
|
6077
6077
|
};
|
|
6078
|
+
/**
|
|
6079
|
+
* The host selection snapshot a selection read, slice, or capture was
|
|
6080
|
+
* resolved from. The host replaces its snapshot object on every selection
|
|
6081
|
+
* change, so an identical object means the selection has not moved since.
|
|
6082
|
+
*/
|
|
6083
|
+
const selectionHostSnapshots = /* @__PURE__ */ new WeakMap();
|
|
6084
|
+
const readHostSelectionSnapshot = () => {
|
|
6085
|
+
const selectionHandle = (safeCall(() => getHost()?.getHandles?.() ?? null, null)?.editing)?.selection;
|
|
6086
|
+
if (typeof selectionHandle?.getSnapshot !== "function") return null;
|
|
6087
|
+
const snapshot = safeCall(() => selectionHandle.getSnapshot(), null);
|
|
6088
|
+
return snapshot && typeof snapshot === "object" ? snapshot : null;
|
|
6089
|
+
};
|
|
6078
6090
|
const createFirstPartyCommandDoc = () => {
|
|
6079
6091
|
const editor = getEditor();
|
|
6080
6092
|
const doc = editor?.doc;
|
|
@@ -7282,12 +7294,21 @@ function createSuperDocUI(options) {
|
|
|
7282
7294
|
...EMPTY_SELECTION,
|
|
7283
7295
|
status
|
|
7284
7296
|
};
|
|
7297
|
+
const slice = buildSelectionSlice(info, status);
|
|
7298
|
+
const hostSelection = selectionHostSnapshots.get(info);
|
|
7299
|
+
if (hostSelection) selectionHostSnapshots.set(slice, hostSelection);
|
|
7300
|
+
return slice;
|
|
7301
|
+
};
|
|
7302
|
+
const buildSelectionSlice = (info, status) => {
|
|
7285
7303
|
const target = info.target ?? null;
|
|
7286
7304
|
const quotedText = typeof info.text === "string" ? info.text : "";
|
|
7287
7305
|
return {
|
|
7288
7306
|
status,
|
|
7289
7307
|
empty: info.empty === true,
|
|
7290
7308
|
target,
|
|
7309
|
+
trackedTarget: info.trackedTarget ?? null,
|
|
7310
|
+
trackedChangeRangeDecisionSupported: info.trackedChangeRangeDecisionSupported,
|
|
7311
|
+
trackedChangesWhollySelected: info.trackedChangesWhollySelected,
|
|
7291
7312
|
selectionTarget: info.selectionTarget ?? null,
|
|
7292
7313
|
tableSelection: info.tableSelection ?? null,
|
|
7293
7314
|
activeMarks: Array.isArray(info.activeMarks) ? info.activeMarks : [],
|
|
@@ -7296,18 +7317,22 @@ function createSuperDocUI(options) {
|
|
|
7296
7317
|
quotedText
|
|
7297
7318
|
};
|
|
7298
7319
|
};
|
|
7299
|
-
const readSelectionInfoLive = () =>
|
|
7300
|
-
const selectionApi = getDoc()?.selection;
|
|
7301
|
-
return readAsync("selection", selectionReadToken(), () => selectionApi?.current ? selectionApi.current({ includeText: true }) : void 0, normalizeSelectionInfo);
|
|
7302
|
-
};
|
|
7320
|
+
const readSelectionInfoLive = () => readAsync("selection", selectionReadToken(), selectionCurrentRun, normalizeSelectionInfo);
|
|
7303
7321
|
const computeSelection = () => {
|
|
7304
7322
|
const { value: info, status } = readSelectionInfoLive();
|
|
7305
7323
|
return selectionSliceFromInfo(info, status);
|
|
7306
7324
|
};
|
|
7307
|
-
|
|
7325
|
+
function selectionCurrentRun() {
|
|
7308
7326
|
const selectionApi = getDoc()?.selection;
|
|
7309
|
-
|
|
7310
|
-
|
|
7327
|
+
if (!selectionApi?.current) return void 0;
|
|
7328
|
+
const hostSelection = readHostSelectionSnapshot();
|
|
7329
|
+
const tag = (info) => {
|
|
7330
|
+
if (hostSelection && info && typeof info === "object") selectionHostSnapshots.set(info, hostSelection);
|
|
7331
|
+
return info;
|
|
7332
|
+
};
|
|
7333
|
+
const result = selectionApi.current({ includeText: true });
|
|
7334
|
+
return isPromiseLike(result) ? Promise.resolve(result).then(tag) : tag(result);
|
|
7335
|
+
}
|
|
7311
7336
|
/** True when a host sync snapshot is a resolved collapsed caret (not a range). */
|
|
7312
7337
|
const isCollapsedCaretSnapshot = (info) => {
|
|
7313
7338
|
if (info.empty !== true) return false;
|
|
@@ -8287,6 +8312,10 @@ function createSuperDocUI(options) {
|
|
|
8287
8312
|
if (!supported) return command.scope === "all" ? SUPERDOC_UI_REASONS.bulkDecisionsDisabled : unavailableRouteReason(doc);
|
|
8288
8313
|
if (disabledReason) return disabledReason;
|
|
8289
8314
|
if (command.scope !== "all" && selection.activeChangeIds.length === 0) return SUPERDOC_UI_REASONS.selectionRequired;
|
|
8315
|
+
if (command.scope !== "all") {
|
|
8316
|
+
const plan = planSelectionTrackDecision(selection, true);
|
|
8317
|
+
if (plan?.kind === "blocked") return plan.reason;
|
|
8318
|
+
}
|
|
8290
8319
|
};
|
|
8291
8320
|
const findTrackChangeForPermission = (id) => {
|
|
8292
8321
|
syncCoordinatorEditor();
|
|
@@ -8306,20 +8335,22 @@ function createSuperDocUI(options) {
|
|
|
8306
8335
|
if (typeof canPerform !== "function" || ids.length === 0) return void 0;
|
|
8307
8336
|
const currentUser = superdoc.config && typeof superdoc.config === "object" ? superdoc.config.user : null;
|
|
8308
8337
|
for (const id of ids) {
|
|
8309
|
-
const trackedChange = findTrackChangeForPermission(id)
|
|
8310
|
-
const isOwn = trackedChangeOwnedByCurrentUser(trackedChange, currentUser);
|
|
8311
|
-
const
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8338
|
+
const trackedChange = findTrackChangeForPermission(id);
|
|
8339
|
+
const isOwn = trackedChange ? trackedChangeOwnedByCurrentUser(trackedChange, currentUser) : false;
|
|
8340
|
+
const permissions = trackedChange ? [kind === "accept" ? isOwn ? "RESOLVE_OWN" : "RESOLVE_OTHER" : isOwn ? "REJECT_OWN" : "REJECT_OTHER"] : kind === "accept" ? ["RESOLVE_OWN", "RESOLVE_OTHER"] : ["REJECT_OWN", "REJECT_OTHER"];
|
|
8341
|
+
for (const candidate of permissions) {
|
|
8342
|
+
let allowed;
|
|
8343
|
+
try {
|
|
8344
|
+
allowed = canPerform.call(superdoc, {
|
|
8345
|
+
permission: candidate,
|
|
8346
|
+
trackedChange: trackedChange ?? { id },
|
|
8347
|
+
comment: null
|
|
8348
|
+
});
|
|
8349
|
+
} catch {
|
|
8350
|
+
return trackedChange ? void 0 : SUPERDOC_UI_REASONS.permissionDenied;
|
|
8351
|
+
}
|
|
8352
|
+
if (allowed === false || !trackedChange && allowed !== true) return SUPERDOC_UI_REASONS.permissionDenied;
|
|
8321
8353
|
}
|
|
8322
|
-
if (allowed === false) return SUPERDOC_UI_REASONS.permissionDenied;
|
|
8323
8354
|
}
|
|
8324
8355
|
};
|
|
8325
8356
|
const hostCommandSupport = (command) => {
|
|
@@ -9999,14 +10030,22 @@ function createSuperDocUI(options) {
|
|
|
9999
10030
|
* ordinary/insertion selections are visible-space, while a selection that
|
|
10000
10031
|
* reaches painted deleted text is projected in tracked space by the host.
|
|
10001
10032
|
*
|
|
10002
|
-
*
|
|
10003
|
-
*
|
|
10033
|
+
* Cross-block coverage must come from the model-backed tracked target;
|
|
10034
|
+
* intermediate block lengths cannot be inferred from the endpoints.
|
|
10004
10035
|
*/
|
|
10005
10036
|
function trackDecisionRangeFromSelection(selection) {
|
|
10006
10037
|
if (selection.empty) return null;
|
|
10007
10038
|
const explicit = selection.selectionTarget;
|
|
10008
10039
|
const start = explicit?.start;
|
|
10009
10040
|
const end = explicit?.end;
|
|
10041
|
+
if (start?.kind === "text" && end?.kind === "text" && start.blockId !== end.blockId) {
|
|
10042
|
+
const range = selection.trackedTarget;
|
|
10043
|
+
return range ? {
|
|
10044
|
+
kind: "range",
|
|
10045
|
+
coordinateSpace: "tracked",
|
|
10046
|
+
range
|
|
10047
|
+
} : null;
|
|
10048
|
+
}
|
|
10010
10049
|
if (explicit?.kind !== "selection" || start?.kind !== "text" || end?.kind !== "text" || typeof start.blockId !== "string" || start.blockId !== end.blockId || !Number.isInteger(start.offset) || !Number.isInteger(end.offset) || start.offset < 0 || end.offset < 0 || start.offset === end.offset) return null;
|
|
10011
10050
|
const rangeStart = Math.min(start.offset, end.offset);
|
|
10012
10051
|
const rangeEnd = Math.max(start.offset, end.offset);
|
|
@@ -10051,32 +10090,20 @@ function createSuperDocUI(options) {
|
|
|
10051
10090
|
function normalizeTrackDecisionText(value) {
|
|
10052
10091
|
return typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "";
|
|
10053
10092
|
}
|
|
10054
|
-
function activeChangePartialDecisionRoute() {
|
|
10055
|
-
const activeId =
|
|
10093
|
+
function activeChangePartialDecisionRoute(selection = state.selection) {
|
|
10094
|
+
const activeId = selection.activeChangeIds[0];
|
|
10056
10095
|
if (!activeId) return "unavailable";
|
|
10057
|
-
const story = selectionStoryLocator(
|
|
10058
|
-
const
|
|
10096
|
+
const story = selectionStoryLocator(selection);
|
|
10097
|
+
const trackChanges = state?.trackChanges;
|
|
10098
|
+
const item = (trackChanges?.status === "ready" ? trackChanges.items.find((candidate) => entityRowMatchesRequest(candidate, activeId, story)) : void 0) ?? readBodyTrackChangeForDecision(activeId, story) ?? readAllStoryTrackChanges()?.find((candidate) => entityRowMatchesRequest(candidate, activeId, story));
|
|
10059
10099
|
if (!item) return "unavailable";
|
|
10060
10100
|
const change = trackChangesItemPayload(item);
|
|
10061
10101
|
const type = change.type;
|
|
10062
10102
|
const grouping = change.grouping;
|
|
10063
|
-
if (selectedTextCoversTrackChangeText(
|
|
10103
|
+
if (selectedTextCoversTrackChangeText(selection, item)) return "id";
|
|
10064
10104
|
if (type === "replacement" && grouping === "replacement-pair") return "range";
|
|
10065
10105
|
return (type === "insertion" || type === "deletion" || type === "insert" || type === "delete") && grouping === "standalone" ? "range" : "id";
|
|
10066
10106
|
}
|
|
10067
|
-
function executeTrackDecisionRangeWithIdFallback(kind, rangeTarget, changeId, story) {
|
|
10068
|
-
const fallback = () => callTrackDecisionTarget(kind, trackDecisionIdTarget(changeId, story), changeId, story);
|
|
10069
|
-
try {
|
|
10070
|
-
const result = callTrackDecisionTarget(kind, rangeTarget, changeId, story);
|
|
10071
|
-
if (isPromiseLike(result)) return settleCommandExecution(Promise.resolve(result).then((settled) => {
|
|
10072
|
-
return commandResultSucceeded(commandResultFromOperationResult(settled)) ? settled : fallback();
|
|
10073
|
-
}));
|
|
10074
|
-
const commandResult = commandResultFromOperationResult(result);
|
|
10075
|
-
return settleCommandExecution(commandResultSucceeded(commandResult) ? result : fallback());
|
|
10076
|
-
} catch {
|
|
10077
|
-
return false;
|
|
10078
|
-
}
|
|
10079
|
-
}
|
|
10080
10107
|
/** A decision target carried by the payload itself, independent of the selection. */
|
|
10081
10108
|
function explicitTrackDecisionTarget(payload) {
|
|
10082
10109
|
if (typeof payload === "string" && payload.length > 0) return {
|
|
@@ -10120,29 +10147,88 @@ function createSuperDocUI(options) {
|
|
|
10120
10147
|
story
|
|
10121
10148
|
} : null;
|
|
10122
10149
|
}
|
|
10150
|
+
/**
|
|
10151
|
+
* The selection-derived decision for a review command. The command gate and
|
|
10152
|
+
* execution share these rules so an enabled command always has a target.
|
|
10153
|
+
* `null` means the selection does not drive the decision (no active change
|
|
10154
|
+
* or a collapsed caret) and the caller falls back to the active change id.
|
|
10155
|
+
* `gateOnly` stops after the blocking rules and returns only a block or null.
|
|
10156
|
+
*/
|
|
10157
|
+
function planSelectionTrackDecision(selection, gateOnly = false) {
|
|
10158
|
+
if (selection.tableSelection?.kind === "tableCells" && (selection.tableSelection.type === "cells" || selection.tableSelection.type === "table")) return {
|
|
10159
|
+
kind: "blocked",
|
|
10160
|
+
reason: SUPERDOC_UI_REASONS.operationUnavailable
|
|
10161
|
+
};
|
|
10162
|
+
const ids = selection.activeChangeIds;
|
|
10163
|
+
if (ids.length > 1) {
|
|
10164
|
+
if (selection.empty || selection.trackedChangesWhollySelected === true) return {
|
|
10165
|
+
kind: "ids",
|
|
10166
|
+
ids
|
|
10167
|
+
};
|
|
10168
|
+
if (selection.trackedChangeRangeDecisionSupported === false) return {
|
|
10169
|
+
kind: "blocked",
|
|
10170
|
+
reason: SUPERDOC_UI_REASONS.operationUnavailable
|
|
10171
|
+
};
|
|
10172
|
+
const target = trackDecisionRangeFromSelection(selection);
|
|
10173
|
+
return target ? {
|
|
10174
|
+
kind: "range",
|
|
10175
|
+
target,
|
|
10176
|
+
changeId: null,
|
|
10177
|
+
permissionIds: ids
|
|
10178
|
+
} : {
|
|
10179
|
+
kind: "blocked",
|
|
10180
|
+
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
10181
|
+
};
|
|
10182
|
+
}
|
|
10183
|
+
if (ids.length !== 1 || selection.empty) return null;
|
|
10184
|
+
const activeId = ids[0];
|
|
10185
|
+
let routeValue;
|
|
10186
|
+
const route = () => routeValue ??= selection.trackedChangesWhollySelected === true ? "id" : activeChangePartialDecisionRoute(selection);
|
|
10187
|
+
if (selection.trackedChangeRangeDecisionSupported === false && route() !== "id") return {
|
|
10188
|
+
kind: "blocked",
|
|
10189
|
+
reason: SUPERDOC_UI_REASONS.operationUnavailable
|
|
10190
|
+
};
|
|
10191
|
+
if (!selection.selectionTarget) return null;
|
|
10192
|
+
const target = trackDecisionRangeFromSelection(selection);
|
|
10193
|
+
if (!target && route() !== "id") return {
|
|
10194
|
+
kind: "blocked",
|
|
10195
|
+
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
10196
|
+
};
|
|
10197
|
+
if (gateOnly) return null;
|
|
10198
|
+
if (route() === "id") {
|
|
10199
|
+
const selectedStory = selectionStoryLocator(selection);
|
|
10200
|
+
return {
|
|
10201
|
+
kind: "id",
|
|
10202
|
+
id: activeId,
|
|
10203
|
+
story: selectedStory && storyLocatorSignature(selectedStory) !== storyLocatorSignature(null) ? selectedStory : void 0
|
|
10204
|
+
};
|
|
10205
|
+
}
|
|
10206
|
+
if (route() === "unavailable" && !selection.trackedTarget) return { kind: "unavailable" };
|
|
10207
|
+
return target ? {
|
|
10208
|
+
kind: "range",
|
|
10209
|
+
target,
|
|
10210
|
+
changeId: activeId,
|
|
10211
|
+
story: nonBodySelectionStoryLocator(selection)
|
|
10212
|
+
} : {
|
|
10213
|
+
kind: "blocked",
|
|
10214
|
+
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
10215
|
+
};
|
|
10216
|
+
}
|
|
10123
10217
|
function executeTrackDecisionCommand(command, payload) {
|
|
10124
10218
|
if (command.scope === "id" && payload == null) {
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
const activeId = state.selection.activeChangeIds[0];
|
|
10139
|
-
const selectedStory = selectionStoryLocator(state.selection);
|
|
10140
|
-
const story = selectedStory && storyLocatorSignature(selectedStory) !== storyLocatorSignature(null) ? selectedStory : void 0;
|
|
10141
|
-
return executeTrackDecision(command.kind, story ? {
|
|
10142
|
-
id: activeId,
|
|
10143
|
-
story
|
|
10144
|
-
} : activeId);
|
|
10145
|
-
}
|
|
10219
|
+
const plan = planSelectionTrackDecision(state.selection);
|
|
10220
|
+
switch (plan?.kind) {
|
|
10221
|
+
case "blocked":
|
|
10222
|
+
case "unavailable": return false;
|
|
10223
|
+
case "ids": return executeTrackDecisionTarget(command.kind, {
|
|
10224
|
+
kind: "ids",
|
|
10225
|
+
ids: plan.ids
|
|
10226
|
+
}, null, void 0, plan.ids);
|
|
10227
|
+
case "range": return executeTrackDecisionTarget(command.kind, plan.target, plan.changeId, plan.story, plan.permissionIds);
|
|
10228
|
+
case "id": return executeTrackDecision(command.kind, plan.story ? {
|
|
10229
|
+
id: plan.id,
|
|
10230
|
+
story: plan.story
|
|
10231
|
+
} : plan.id);
|
|
10146
10232
|
}
|
|
10147
10233
|
}
|
|
10148
10234
|
const resolved = resolveTrackDecisionTarget(command, payload);
|
|
@@ -11811,11 +11897,14 @@ function createSuperDocUI(options) {
|
|
|
11811
11897
|
if (snapshot.empty) return null;
|
|
11812
11898
|
const cells = currentCellSelectionTarget();
|
|
11813
11899
|
if (!snapshot.target && !snapshot.selectionTarget && !cells) return null;
|
|
11814
|
-
|
|
11900
|
+
const capture = {
|
|
11815
11901
|
...snapshot,
|
|
11816
11902
|
capturedAt: Date.now(),
|
|
11817
11903
|
...cells ? { _tableCellSelectionTarget: cells } : {}
|
|
11818
11904
|
};
|
|
11905
|
+
const hostSelection = selectionHostSnapshots.get(snapshot);
|
|
11906
|
+
if (hostSelection) selectionHostSnapshots.set(capture, hostSelection);
|
|
11907
|
+
return capture;
|
|
11819
11908
|
},
|
|
11820
11909
|
restore: (capture) => {
|
|
11821
11910
|
const done = (result) => {
|
|
@@ -11844,6 +11933,8 @@ function createSuperDocUI(options) {
|
|
|
11844
11933
|
ok: false,
|
|
11845
11934
|
reason: SUPERDOC_UI_REASONS.targetUnresolved
|
|
11846
11935
|
});
|
|
11936
|
+
const heldHostSelection = selectionHostSnapshots.get(capture);
|
|
11937
|
+
if (!hasCellTarget && target.coordinateSpace === "tracked" && heldHostSelection !== void 0 && readHostSelectionSnapshot() === heldHostSelection) return done({ ok: true });
|
|
11847
11938
|
const resolved = getSelectionApplyHelper();
|
|
11848
11939
|
if (!("helper" in resolved)) return done({
|
|
11849
11940
|
ok: false,
|
|
@@ -12680,20 +12771,20 @@ function createSuperDocUI(options) {
|
|
|
12680
12771
|
if (run() === false) return Promise.resolve(false);
|
|
12681
12772
|
return lastCommandSettlement;
|
|
12682
12773
|
};
|
|
12683
|
-
const executeTrackDecisionTarget = (kind, target, changeId, story) => {
|
|
12774
|
+
const executeTrackDecisionTarget = (kind, target, changeId, story, selectionChangeIds) => {
|
|
12684
12775
|
try {
|
|
12685
|
-
return settleCommandExecution(callTrackDecisionTarget(kind, target, changeId, story));
|
|
12776
|
+
return settleCommandExecution(callTrackDecisionTarget(kind, target, changeId, story, selectionChangeIds));
|
|
12686
12777
|
} catch {
|
|
12687
12778
|
return false;
|
|
12688
12779
|
}
|
|
12689
12780
|
};
|
|
12690
|
-
const callTrackDecisionTarget = (kind, target, changeId, story) => {
|
|
12781
|
+
const callTrackDecisionTarget = (kind, target, changeId, story, selectionChangeIds) => {
|
|
12691
12782
|
if (trackedChangeDecisionsAreDisabled()) return false;
|
|
12692
12783
|
const tcApi = getDoc()?.trackChanges;
|
|
12693
12784
|
const isAllTarget = target.kind === "all" || target.scope === "all";
|
|
12694
12785
|
const isRangeTarget = target.kind === "range";
|
|
12695
12786
|
const isMultiIdTarget = target.kind === "ids";
|
|
12696
|
-
const permissionIds = isAllTarget ? [] : isMultiIdTarget && Array.isArray(target.ids) ? target.ids.filter((id) => typeof id === "string" && id.length > 0) : changeId ? [changeId] : [];
|
|
12787
|
+
const permissionIds = isAllTarget ? [] : selectionChangeIds ?? (isMultiIdTarget && Array.isArray(target.ids) ? target.ids.filter((id) => typeof id === "string" && id.length > 0) : changeId ? [changeId] : []);
|
|
12697
12788
|
if (permissionIds.length > 0 && trackedChangeDecisionPermissionReason(kind, permissionIds)) return false;
|
|
12698
12789
|
if (bulkTrackDecisionBlockedReason({
|
|
12699
12790
|
kind,
|
|
@@ -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.24.0-next.
|
|
22
|
+
superdocVersion: "2.24.0-next.3",
|
|
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.24.0-next.
|
|
21
|
+
superdocVersion: "2.24.0-next.3",
|
|
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
|
|
@@ -143,6 +143,12 @@ export interface SelectionInfo {
|
|
|
143
143
|
* full selection.
|
|
144
144
|
*/
|
|
145
145
|
target: TextTarget | null;
|
|
146
|
+
/** Deletion-inclusive multi-block text coverage for range review decisions, when resolvable. */
|
|
147
|
+
trackedTarget?: TextTarget | null;
|
|
148
|
+
/** Whether this exact text range supports tracked-change decisions; excludes permissions. */
|
|
149
|
+
trackedChangeRangeDecisionSupported?: boolean;
|
|
150
|
+
/** Whether the selection covers every tracked-text fragment of each active change. */
|
|
151
|
+
trackedChangesWhollySelected?: boolean;
|
|
146
152
|
/**
|
|
147
153
|
* Explicit selection envelope for the current live selection, or `null` when
|
|
148
154
|
* the runtime cannot project one truthfully.
|
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-bTFGKVRb.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-8UTu16Lw.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-bTFGKVRb.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-8UTu16Lw.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-bTFGKVRb.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 { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-8UTu16Lw.es.js";
|
|
2
2
|
export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
|
|
@@ -551,6 +551,12 @@ export interface SelectionSlice {
|
|
|
551
551
|
empty: boolean;
|
|
552
552
|
/** Resolved text target for the selection, when available. */
|
|
553
553
|
target: TextTarget | null;
|
|
554
|
+
/** Deletion-inclusive multi-block coverage for range review decisions, when available. */
|
|
555
|
+
trackedTarget?: TextTarget | null;
|
|
556
|
+
/** Whether this exact text range supports tracked-change decisions; excludes permissions. */
|
|
557
|
+
trackedChangeRangeDecisionSupported?: boolean;
|
|
558
|
+
/** Whether the selection covers every tracked-text fragment of each active change. */
|
|
559
|
+
trackedChangesWhollySelected?: boolean;
|
|
554
560
|
/** Explicit start/end selection target, when available. */
|
|
555
561
|
selectionTarget: SelectionTarget | null;
|
|
556
562
|
/** Table/cell identities from the settled public selection read, when supported. */
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-bTFGKVRb.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-CYxINHh_.cjs");
|
|
@@ -304,7 +304,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
304
304
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
305
305
|
function getSuperdocVersion() {
|
|
306
306
|
try {
|
|
307
|
-
return "2.24.0-next.
|
|
307
|
+
return "2.24.0-next.3";
|
|
308
308
|
} catch {
|
|
309
309
|
return "unknown";
|
|
310
310
|
}
|
|
@@ -46564,7 +46564,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46564
46564
|
}
|
|
46565
46565
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46566
46566
|
this.colorIndex = 0;
|
|
46567
|
-
this.version = "2.24.0-next.
|
|
46567
|
+
this.version = "2.24.0-next.3";
|
|
46568
46568
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46569
46569
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46570
46570
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
|
|
2
2
|
import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
3
|
-
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
3
|
+
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-8UTu16Lw.es.js";
|
|
4
4
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
5
5
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
6
6
|
import { $ as watch$1, A as onActivated, B as resolveDirective, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRef, H as shallowRef$1, I as reactive, J as useAttrs, K as toRefs, L as ref, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelText, R as renderList, S as isReactive$1, T as mergeProps, U as toDisplayString, V as resolveDynamicComponent, W as toRaw$2, X as vModelCheckbox, Y as useSlots, Z as vModelSelect, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as withCtx, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withKeys, o as createApp, p as createVNode, q as unref, r as Teleport, rt as withModifiers, s as createBlock, t as _plugin_vue_export_helper_default, tt as withDirectives, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderSlot } from "./chunks/_plugin-vue_export-helper-DHiJKCsy.es.js";
|
|
@@ -302,7 +302,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
302
302
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
303
303
|
function getSuperdocVersion() {
|
|
304
304
|
try {
|
|
305
|
-
return "2.24.0-next.
|
|
305
|
+
return "2.24.0-next.3";
|
|
306
306
|
} catch {
|
|
307
307
|
return "unknown";
|
|
308
308
|
}
|
|
@@ -46493,7 +46493,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46493
46493
|
}
|
|
46494
46494
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46495
46495
|
this.colorIndex = 0;
|
|
46496
|
-
this.version = "2.24.0-next.
|
|
46496
|
+
this.version = "2.24.0-next.3";
|
|
46497
46497
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46498
46498
|
this.superdocId = config.superdocId || v4();
|
|
46499
46499
|
this.colors = this.config.colors ?? [];
|