superdoc 2.27.0-next.3 → 2.27.0-next.4
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-DK14sCrT.cjs → create-super-doc-ui-BWoeA7So.cjs} +34 -2
- package/dist/chunks/{create-super-doc-ui-BCQ5RHxy.es.js → create-super-doc-ui-DqZk5WpX.es.js} +29 -3
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/history/history.types.d.ts +0 -6
- 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/core/v2-integration/v2-integration.d.ts +2 -5
- package/dist/superdoc/src/helpers/tracked-change-comment-lane.d.ts +1 -0
- package/dist/superdoc.cjs +7 -18
- package/dist/superdoc.es.js +3 -14
- package/dist-cdn/superdoc.min.js +38 -38
- package/package.json +2 -5
- package/dist/superdoc/src/components/CommentsLayer/comment-schemas.d.ts +0 -18
- package/dist/superdoc/src/components/CommentsLayer/types.d.ts +0 -3
- package/dist/superdoc/src/components/CommentsLayer/use-conversation.d.ts +0 -22
- package/dist/superdoc/src/components/CommentsLayer/use-floating-comment.d.ts +0 -11
- package/dist/superdoc/src/core/collaboration/room-overwrite.d.ts +0 -22
- package/dist/superdoc/src/core/index.d.ts +0 -1
- package/dist/superdoc/src/stores/hrbr-fields-store.d.ts +0 -43
|
@@ -1078,6 +1078,15 @@ var decodeLayoutStoryDataset = (raw) => {
|
|
|
1078
1078
|
`${DOM_CLASS_NAMES.BLOCK_SDT}${DATA_ATTRS.SDT_ID}`;
|
|
1079
1079
|
`${DATA_ATTRS.DRAGGABLE}`;
|
|
1080
1080
|
//#endregion
|
|
1081
|
+
//#region src/helpers/tracked-change-comment-lane.ts
|
|
1082
|
+
var TRACKED_CHANGE_COMMENT_LANE_ID_PREFIX = "tc-comment:";
|
|
1083
|
+
function isSyntheticTrackedChangeCommentLaneItem(item) {
|
|
1084
|
+
if (!item || typeof item !== "object") return false;
|
|
1085
|
+
const { id, commentId } = item;
|
|
1086
|
+
const itemId = id ?? commentId;
|
|
1087
|
+
return typeof itemId === "string" && itemId.startsWith(TRACKED_CHANGE_COMMENT_LANE_ID_PREFIX);
|
|
1088
|
+
}
|
|
1089
|
+
//#endregion
|
|
1081
1090
|
//#region src/public/ui/viewport-batch.ts
|
|
1082
1091
|
/** No rendering or scrolling: read only geometry already acknowledged by the host. */
|
|
1083
1092
|
async function readViewportBatch(input, read, generation, disposed) {
|
|
@@ -7607,9 +7616,26 @@ function createSuperDocUI(options) {
|
|
|
7607
7616
|
recompute();
|
|
7608
7617
|
return selection;
|
|
7609
7618
|
};
|
|
7619
|
+
const realComments = (items) => items.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item));
|
|
7620
|
+
let lastWindowComments = null;
|
|
7621
|
+
const realCommentsOfWindow = (window) => {
|
|
7622
|
+
const items = window?.commentItems;
|
|
7623
|
+
if (!Array.isArray(items)) return null;
|
|
7624
|
+
const last = lastWindowComments;
|
|
7625
|
+
if (last?.source === items && shallowEqual(last.rows, items)) return last.real;
|
|
7626
|
+
lastWindowComments = {
|
|
7627
|
+
source: items,
|
|
7628
|
+
rows: [...items],
|
|
7629
|
+
real: realComments(items)
|
|
7630
|
+
};
|
|
7631
|
+
return lastWindowComments.real;
|
|
7632
|
+
};
|
|
7610
7633
|
const readCommentsDirectory = () => {
|
|
7611
7634
|
const listComments = hostMethod(getDoc()?.comments, "list");
|
|
7612
|
-
return readAsync("comments", contentToken(), () => listComments ? listComments() : void 0, (raw) =>
|
|
7635
|
+
return readAsync("comments", contentToken(), () => listComments ? listComments() : void 0, (raw) => {
|
|
7636
|
+
const items = isPlainObject(raw) ? raw.items : void 0;
|
|
7637
|
+
return Array.isArray(items) ? realComments(items) : [];
|
|
7638
|
+
});
|
|
7613
7639
|
};
|
|
7614
7640
|
const readTrackChangesDirectory = (key = "trackChanges") => {
|
|
7615
7641
|
const token = contentToken();
|
|
@@ -7642,7 +7668,7 @@ function createSuperDocUI(options) {
|
|
|
7642
7668
|
const reviewWindow = getV2ReviewWindowSnapshot();
|
|
7643
7669
|
const hasWindowFeed = hasV2ReviewWindowFeed();
|
|
7644
7670
|
const catalog = !hasWindowFeed ? readCommentsDirectory() : null;
|
|
7645
|
-
const windowItems = hasWindowFeed
|
|
7671
|
+
const windowItems = hasWindowFeed ? realCommentsOfWindow(reviewWindow) : null;
|
|
7646
7672
|
const value = hasWindowFeed ? windowItems : catalog.value;
|
|
7647
7673
|
const listStatus = hasWindowFeed ? reviewWindowSliceStatus(reviewWindow) : catalog.status;
|
|
7648
7674
|
const items = value ?? [];
|
|
@@ -15124,6 +15150,12 @@ Object.defineProperty(exports, "isPlainObject", {
|
|
|
15124
15150
|
return isPlainObject;
|
|
15125
15151
|
}
|
|
15126
15152
|
});
|
|
15153
|
+
Object.defineProperty(exports, "isSyntheticTrackedChangeCommentLaneItem", {
|
|
15154
|
+
enumerable: true,
|
|
15155
|
+
get: function() {
|
|
15156
|
+
return isSyntheticTrackedChangeCommentLaneItem;
|
|
15157
|
+
}
|
|
15158
|
+
});
|
|
15127
15159
|
Object.defineProperty(exports, "isWorkflowRecordingEnabled", {
|
|
15128
15160
|
enumerable: true,
|
|
15129
15161
|
get: function() {
|
package/dist/chunks/{create-super-doc-ui-BCQ5RHxy.es.js → create-super-doc-ui-DqZk5WpX.es.js}
RENAMED
|
@@ -1078,6 +1078,15 @@ var decodeLayoutStoryDataset = (raw) => {
|
|
|
1078
1078
|
`${DOM_CLASS_NAMES.BLOCK_SDT}${DATA_ATTRS.SDT_ID}`;
|
|
1079
1079
|
`${DATA_ATTRS.DRAGGABLE}`;
|
|
1080
1080
|
//#endregion
|
|
1081
|
+
//#region src/helpers/tracked-change-comment-lane.ts
|
|
1082
|
+
var TRACKED_CHANGE_COMMENT_LANE_ID_PREFIX = "tc-comment:";
|
|
1083
|
+
function isSyntheticTrackedChangeCommentLaneItem(item) {
|
|
1084
|
+
if (!item || typeof item !== "object") return false;
|
|
1085
|
+
const { id, commentId } = item;
|
|
1086
|
+
const itemId = id ?? commentId;
|
|
1087
|
+
return typeof itemId === "string" && itemId.startsWith(TRACKED_CHANGE_COMMENT_LANE_ID_PREFIX);
|
|
1088
|
+
}
|
|
1089
|
+
//#endregion
|
|
1081
1090
|
//#region src/public/ui/viewport-batch.ts
|
|
1082
1091
|
/** No rendering or scrolling: read only geometry already acknowledged by the host. */
|
|
1083
1092
|
async function readViewportBatch(input, read, generation, disposed) {
|
|
@@ -7606,9 +7615,26 @@ function createSuperDocUI(options) {
|
|
|
7606
7615
|
recompute();
|
|
7607
7616
|
return selection;
|
|
7608
7617
|
};
|
|
7618
|
+
const realComments = (items) => items.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item));
|
|
7619
|
+
let lastWindowComments = null;
|
|
7620
|
+
const realCommentsOfWindow = (window) => {
|
|
7621
|
+
const items = window?.commentItems;
|
|
7622
|
+
if (!Array.isArray(items)) return null;
|
|
7623
|
+
const last = lastWindowComments;
|
|
7624
|
+
if (last?.source === items && shallowEqual(last.rows, items)) return last.real;
|
|
7625
|
+
lastWindowComments = {
|
|
7626
|
+
source: items,
|
|
7627
|
+
rows: [...items],
|
|
7628
|
+
real: realComments(items)
|
|
7629
|
+
};
|
|
7630
|
+
return lastWindowComments.real;
|
|
7631
|
+
};
|
|
7609
7632
|
const readCommentsDirectory = () => {
|
|
7610
7633
|
const listComments = hostMethod(getDoc()?.comments, "list");
|
|
7611
|
-
return readAsync("comments", contentToken(), () => listComments ? listComments() : void 0, (raw) =>
|
|
7634
|
+
return readAsync("comments", contentToken(), () => listComments ? listComments() : void 0, (raw) => {
|
|
7635
|
+
const items = isPlainObject(raw) ? raw.items : void 0;
|
|
7636
|
+
return Array.isArray(items) ? realComments(items) : [];
|
|
7637
|
+
});
|
|
7612
7638
|
};
|
|
7613
7639
|
const readTrackChangesDirectory = (key = "trackChanges") => {
|
|
7614
7640
|
const token = contentToken();
|
|
@@ -7641,7 +7667,7 @@ function createSuperDocUI(options) {
|
|
|
7641
7667
|
const reviewWindow = getV2ReviewWindowSnapshot();
|
|
7642
7668
|
const hasWindowFeed = hasV2ReviewWindowFeed();
|
|
7643
7669
|
const catalog = !hasWindowFeed ? readCommentsDirectory() : null;
|
|
7644
|
-
const windowItems = hasWindowFeed
|
|
7670
|
+
const windowItems = hasWindowFeed ? realCommentsOfWindow(reviewWindow) : null;
|
|
7645
7671
|
const value = hasWindowFeed ? windowItems : catalog.value;
|
|
7646
7672
|
const listStatus = hasWindowFeed ? reviewWindowSliceStatus(reviewWindow) : catalog.status;
|
|
7647
7673
|
const items = value ?? [];
|
|
@@ -15051,4 +15077,4 @@ function commandIsActive(descriptor, selection) {
|
|
|
15051
15077
|
return descriptor.activeMark ? selection.activeMarks.includes(descriptor.activeMark) : false;
|
|
15052
15078
|
}
|
|
15053
15079
|
//#endregion
|
|
15054
|
-
export {
|
|
15080
|
+
export { getWorkflowRecording as _, registerFirstPartyCommandMutation as a, getV2TrackedChangeMutationImpact as c, resolveImageSrc as d, shallowEqual as f, createInteractionHistory as g, closeInteractionHistory as h, readFirstPartyPageNumbers as i, isPlainObject as l, DOM_CLASS_NAMES as m, executeFirstPartyCommandAsync as n, BUILT_IN_COMMAND_IDS as o, isSyntheticTrackedChangeCommentLaneItem as p, executeFirstPartyShortcutAsync as r, applyV2CommentInvalidationFromMutation as s, createSuperDocUI as t, createImageFilePicker as u, isWorkflowRecordingEnabled as v, recordInteraction 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.27.0-next.
|
|
22
|
+
superdocVersion: "2.27.0-next.4",
|
|
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.27.0-next.
|
|
21
|
+
superdocVersion: "2.27.0-next.4",
|
|
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
|
|
@@ -43,12 +43,6 @@ export interface SDHistoryCollaborationMeta {
|
|
|
43
43
|
* Result of a history.undo or history.redo action.
|
|
44
44
|
* Mirrors PlanReceipt's revision shape for consistency.
|
|
45
45
|
*
|
|
46
|
-
* AIDEV-NOTE: this shape carries optional ref-effect
|
|
47
|
-
* fields. v1 callers leave them undefined; v2 (`V2HistoryAdapter`) populates
|
|
48
|
-
* them from the stored semantic delta of the undone/redone transaction so
|
|
49
|
-
* callers' held refs stay accurate across history actions. Never make any
|
|
50
|
-
* of the new fields required — v1 adapters MUST keep compiling unchanged.
|
|
51
|
-
*
|
|
52
46
|
* The shape also carries three optional collaboration fields:
|
|
53
47
|
* `status`, `diagnosticCode`, and `collaboration`. v1 leaves them
|
|
54
48
|
* undefined; collaborative v2 sessions populate them so callers can react
|
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-BWoeA7So.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-DqZk5WpX.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-BWoeA7So.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-DqZk5WpX.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-BWoeA7So.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) {
|
package/dist/public/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-
|
|
1
|
+
import { f as shallowEqual, o as BUILT_IN_COMMAND_IDS, t as createSuperDocUI } from "../chunks/create-super-doc-ui-DqZk5WpX.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) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isSyntheticTrackedChangeCommentLaneItem } from '../../helpers/tracked-change-comment-lane.js';
|
|
1
2
|
/**
|
|
2
3
|
* Replace the package loader before engine loading starts. The CDN entry uses
|
|
3
4
|
* this seam to fetch the exact engine version from its public package URL.
|
|
@@ -9,11 +10,6 @@ export function configureDefaultV2IntegrationLoader(loader: () => Promise<unknow
|
|
|
9
10
|
export function loadDefaultV2Integration(): Promise<void>;
|
|
10
11
|
/** Load the engine for editor startup, preserving the fail-closed stub on failure. */
|
|
11
12
|
export function loadDefaultV2IntegrationOrFallback(): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* @param {unknown} item
|
|
14
|
-
* @returns {boolean}
|
|
15
|
-
*/
|
|
16
|
-
export function isSyntheticTrackedChangeCommentLaneItem(item: unknown): boolean;
|
|
17
13
|
/**
|
|
18
14
|
* @param {{ trackedChange?: unknown, trackedChangeAnchorKey?: unknown } | null | undefined} row
|
|
19
15
|
* @returns {boolean}
|
|
@@ -61,6 +57,7 @@ export function hasRealV2Integration(integration: SuperDocV2Integration | null |
|
|
|
61
57
|
*/
|
|
62
58
|
/** Default version for the local stub integration (V1-compatible). */
|
|
63
59
|
export const SUPERDOC_V2_INTEGRATION_VERSION: 1;
|
|
60
|
+
export { isSyntheticTrackedChangeCommentLaneItem };
|
|
64
61
|
export type SuperDocV2Integration = {
|
|
65
62
|
/**
|
|
66
63
|
* Integration contract version.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSyntheticTrackedChangeCommentLaneItem(item: unknown): boolean;
|
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-BWoeA7So.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-BUdjGKyl.cjs");
|
|
@@ -260,7 +260,7 @@ var v_click_outside_default = {
|
|
|
260
260
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
261
261
|
function getSuperdocVersion() {
|
|
262
262
|
try {
|
|
263
|
-
return "2.27.0-next.
|
|
263
|
+
return "2.27.0-next.4";
|
|
264
264
|
} catch {
|
|
265
265
|
return "unknown";
|
|
266
266
|
}
|
|
@@ -7087,19 +7087,8 @@ async function loadDefaultV2IntegrationOrFallback() {
|
|
|
7087
7087
|
console.error("[SuperDoc] DOCX Engine failed to load; using the stub.", error);
|
|
7088
7088
|
}
|
|
7089
7089
|
}
|
|
7090
|
-
var V2_SYNTHETIC_TRACKED_CHANGE_COMMENT_ID_PREFIX = "tc-comment:";
|
|
7091
7090
|
var V2_BODY_TRACKED_CHANGE_ANCHOR_PREFIX = "tc::body::";
|
|
7092
7091
|
/**
|
|
7093
|
-
* @param {unknown} item
|
|
7094
|
-
* @returns {boolean}
|
|
7095
|
-
*/
|
|
7096
|
-
function isSyntheticTrackedChangeCommentLaneItem(item) {
|
|
7097
|
-
if (!item || typeof item !== "object") return false;
|
|
7098
|
-
const id = item.id ?? item.commentId;
|
|
7099
|
-
if (typeof id !== "string") return false;
|
|
7100
|
-
return id.startsWith(V2_SYNTHETIC_TRACKED_CHANGE_COMMENT_ID_PREFIX);
|
|
7101
|
-
}
|
|
7102
|
-
/**
|
|
7103
7092
|
* @param {{ trackedChange?: unknown, trackedChangeAnchorKey?: unknown } | null | undefined} row
|
|
7104
7093
|
* @returns {boolean}
|
|
7105
7094
|
*/
|
|
@@ -7165,7 +7154,7 @@ function createStubV2Integration() {
|
|
|
7165
7154
|
RulerComponent: null,
|
|
7166
7155
|
createGeometryPublisher: createStubGeometryPublisher,
|
|
7167
7156
|
createReviewWindowController: createStubReviewWindowController,
|
|
7168
|
-
isSyntheticTrackedChangeCommentLaneItem,
|
|
7157
|
+
isSyntheticTrackedChangeCommentLaneItem: require_create_super_doc_ui.isSyntheticTrackedChangeCommentLaneItem,
|
|
7169
7158
|
isV2SyntheticTrackedChangeRow
|
|
7170
7159
|
};
|
|
7171
7160
|
}
|
|
@@ -9352,7 +9341,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9352
9341
|
}
|
|
9353
9342
|
const documentId = superdoc?.activeEditor?.documentId ?? superdoc?.activeEditor?.options?.documentId ?? commentsAdapter.documentId ?? trackedChangesAdapter.documentId ?? null;
|
|
9354
9343
|
const document = documentId != null ? superdocStore.getDocument(String(documentId)) : null;
|
|
9355
|
-
const mappedCommentInputs = commentItems.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9344
|
+
const mappedCommentInputs = commentItems.filter((item) => !require_create_super_doc_ui.isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9356
9345
|
fileId: documentId,
|
|
9357
9346
|
fileType: document?.type ?? null
|
|
9358
9347
|
})).filter(Boolean);
|
|
@@ -9885,7 +9874,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9885
9874
|
...input.selection,
|
|
9886
9875
|
documentId: normalizedDocumentId
|
|
9887
9876
|
}
|
|
9888
|
-
})) : effectiveCommentItems.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9877
|
+
})) : effectiveCommentItems.filter((item) => !require_create_super_doc_ui.isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9889
9878
|
fileId: normalizedDocumentId,
|
|
9890
9879
|
fileType
|
|
9891
9880
|
})).filter(Boolean);
|
|
@@ -9990,7 +9979,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9990
9979
|
const incomingByCommentId = /* @__PURE__ */ new Map();
|
|
9991
9980
|
const trackedChangeSidecarParentByCommentId = /* @__PURE__ */ new Map();
|
|
9992
9981
|
const mappedInputs = [];
|
|
9993
|
-
const candidateInputs = Array.isArray(preparedInputs) ? preparedInputs : items.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => adapter.mapV2CommentToUseCommentInput(item, {
|
|
9982
|
+
const candidateInputs = Array.isArray(preparedInputs) ? preparedInputs : items.filter((item) => !require_create_super_doc_ui.isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => adapter.mapV2CommentToUseCommentInput(item, {
|
|
9994
9983
|
fileId: effectiveDocumentId,
|
|
9995
9984
|
fileType
|
|
9996
9985
|
})).filter(Boolean);
|
|
@@ -46242,7 +46231,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46242
46231
|
}
|
|
46243
46232
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46244
46233
|
this.colorIndex = 0;
|
|
46245
|
-
this.version = "2.27.0-next.
|
|
46234
|
+
this.version = "2.27.0-next.4";
|
|
46246
46235
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46247
46236
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46248
46237
|
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 { _ as
|
|
3
|
+
import { _ as getWorkflowRecording, a as registerFirstPartyCommandMutation, c as getV2TrackedChangeMutationImpact, d as resolveImageSrc, g as createInteractionHistory, h as closeInteractionHistory, i as readFirstPartyPageNumbers, l as isPlainObject$1, m as DOM_CLASS_NAMES, n as executeFirstPartyCommandAsync, p as isSyntheticTrackedChangeCommentLaneItem, r as executeFirstPartyShortcutAsync, s as applyV2CommentInvalidationFromMutation, t as createSuperDocUI, u as createImageFilePicker, v as isWorkflowRecordingEnabled, y as recordInteraction } from "./chunks/create-super-doc-ui-DqZk5WpX.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 vModelText, A as onActivated, B as renderSlot, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRaw$2, H as resolveDynamicComponent, I as provide$1, J as unref, K as toRef, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelSelect, R as ref, S as isReactive$1, T as mergeProps, U as shallowRef$1, V as resolveDirective, W as toDisplayString, X as useSlots, Y as useAttrs, Z as vModelCheckbox, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as watch$1, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withModifiers, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withDirectives, o as createApp, p as createVNode, q as toRefs, r as Teleport, rt as withKeys, s as createBlock, t as _plugin_vue_export_helper_default, tt as withCtx, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderList } from "./chunks/_plugin-vue_export-helper-7ZiLY07t.es.js";
|
|
@@ -258,7 +258,7 @@ var v_click_outside_default = {
|
|
|
258
258
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
259
259
|
function getSuperdocVersion() {
|
|
260
260
|
try {
|
|
261
|
-
return "2.27.0-next.
|
|
261
|
+
return "2.27.0-next.4";
|
|
262
262
|
} catch {
|
|
263
263
|
return "unknown";
|
|
264
264
|
}
|
|
@@ -7085,19 +7085,8 @@ async function loadDefaultV2IntegrationOrFallback() {
|
|
|
7085
7085
|
console.error("[SuperDoc] DOCX Engine failed to load; using the stub.", error);
|
|
7086
7086
|
}
|
|
7087
7087
|
}
|
|
7088
|
-
var V2_SYNTHETIC_TRACKED_CHANGE_COMMENT_ID_PREFIX = "tc-comment:";
|
|
7089
7088
|
var V2_BODY_TRACKED_CHANGE_ANCHOR_PREFIX = "tc::body::";
|
|
7090
7089
|
/**
|
|
7091
|
-
* @param {unknown} item
|
|
7092
|
-
* @returns {boolean}
|
|
7093
|
-
*/
|
|
7094
|
-
function isSyntheticTrackedChangeCommentLaneItem(item) {
|
|
7095
|
-
if (!item || typeof item !== "object") return false;
|
|
7096
|
-
const id = item.id ?? item.commentId;
|
|
7097
|
-
if (typeof id !== "string") return false;
|
|
7098
|
-
return id.startsWith(V2_SYNTHETIC_TRACKED_CHANGE_COMMENT_ID_PREFIX);
|
|
7099
|
-
}
|
|
7100
|
-
/**
|
|
7101
7090
|
* @param {{ trackedChange?: unknown, trackedChangeAnchorKey?: unknown } | null | undefined} row
|
|
7102
7091
|
* @returns {boolean}
|
|
7103
7092
|
*/
|
|
@@ -46172,7 +46161,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46172
46161
|
}
|
|
46173
46162
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46174
46163
|
this.colorIndex = 0;
|
|
46175
|
-
this.version = "2.27.0-next.
|
|
46164
|
+
this.version = "2.27.0-next.4";
|
|
46176
46165
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46177
46166
|
this.superdocId = config.superdocId || v4();
|
|
46178
46167
|
this.colors = this.config.colors ?? [];
|