superdoc 2.24.0-next.1 → 2.24.0-next.2

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.
@@ -5938,6 +5938,7 @@ function buildTableCommandInput(action, context) {
5938
5938
  };
5939
5939
  case "delete-table": return { nodeId };
5940
5940
  case "merge-cells": {
5941
+ if (!context.canMerge) return null;
5941
5942
  const range = mergeRange ?? {
5942
5943
  start: {
5943
5944
  rowIndex,
@@ -6244,7 +6245,7 @@ function createSuperDocUI(options) {
6244
6245
  };
6245
6246
  const resolveTableContext = () => {
6246
6247
  const snapshot = readHostTableContext();
6247
- if (!snapshot || snapshot.inTable !== true) return null;
6248
+ if (!snapshot || snapshot.inTable !== true || snapshot.status && snapshot.status !== "ready") return null;
6248
6249
  const table = snapshot.table;
6249
6250
  const tableNodeId = typeof table?.nodeId === "string" && table.nodeId.length > 0 ? table.nodeId : null;
6250
6251
  if (!tableNodeId) return null;
@@ -6256,12 +6257,15 @@ function createSuperDocUI(options) {
6256
6257
  if (rowIndex == null || columnIndex == null) return null;
6257
6258
  const cellNodeId = typeof cell?.nodeId === "string" && cell.nodeId.length > 0 ? cell.nodeId : null;
6258
6259
  const range = snapshot.cellRange;
6260
+ const mergeRange = readMergeRange(range);
6261
+ const metadata = snapshot.tableSelection;
6259
6262
  return {
6260
6263
  tableNodeId,
6261
6264
  rowIndex,
6262
6265
  columnIndex,
6263
6266
  cellNodeId,
6264
- mergeRange: readMergeRange(range)
6267
+ mergeRange,
6268
+ canMerge: metadata == null || metadata.selectionMode === "cells" && metadata.isRectangular === true
6265
6269
  };
6266
6270
  };
6267
6271
  const customCommands = /* @__PURE__ */ new Map();
@@ -9155,7 +9159,7 @@ function createSuperDocUI(options) {
9155
9159
  reason: SUPERDOC_UI_REASONS.documentReadonly
9156
9160
  }, "builtin");
9157
9161
  const context = resolveTableContext();
9158
- if (!(context != null && (!descriptor.table.requiresCell || context.cellNodeId != null))) return normalizeCommandState({
9162
+ if (!(context != null && (!descriptor.table.requiresCell || context.cellNodeId != null) && (descriptor.table.action !== "merge-cells" || context.canMerge))) return normalizeCommandState({
9159
9163
  enabled: false,
9160
9164
  active: false,
9161
9165
  supported: true,
@@ -13060,7 +13064,13 @@ function createSuperDocUI(options) {
13060
13064
  return {
13061
13065
  point,
13062
13066
  entities: validInput ? entityAt(point) : [],
13063
- selection: state.selection,
13067
+ selection: (() => {
13068
+ const current = computeSelection();
13069
+ return current.status === "ready" ? current : {
13070
+ ...current,
13071
+ tableSelection: null
13072
+ };
13073
+ })(),
13064
13074
  position: null,
13065
13075
  insideSelection: false
13066
13076
  };
@@ -13277,21 +13287,67 @@ function createSuperDocUI(options) {
13277
13287
  columnIndex: null,
13278
13288
  cellNodeId: null,
13279
13289
  rows: null,
13280
- columns: null
13290
+ columns: null,
13291
+ status: "ready",
13292
+ cellRange: null,
13293
+ tableSelection: null
13294
+ };
13295
+ const publicTableContext = (snapshot) => {
13296
+ const status = snapshot?.status === "pending" || snapshot?.status === "stale" ? snapshot.status : "ready";
13297
+ if (!snapshot || snapshot.inTable !== true || status !== "ready") return {
13298
+ ...EMPTY_TABLE_CONTEXT,
13299
+ status
13300
+ };
13301
+ const table = snapshot.table;
13302
+ const row = snapshot.row;
13303
+ const column = snapshot.column;
13304
+ const cell = snapshot.cell;
13305
+ if (typeof table?.nodeId !== "string") return {
13306
+ ...EMPTY_TABLE_CONTEXT,
13307
+ status
13308
+ };
13309
+ return {
13310
+ inTable: true,
13311
+ status,
13312
+ tableNodeId: table.nodeId,
13313
+ rowIndex: typeof row?.index === "number" ? row.index : null,
13314
+ columnIndex: typeof column?.index === "number" ? column.index : null,
13315
+ cellNodeId: typeof cell?.nodeId === "string" ? cell.nodeId : null,
13316
+ rows: typeof table.rows === "number" ? table.rows : null,
13317
+ columns: typeof table.columns === "number" ? table.columns : null,
13318
+ cellRange: readMergeRange(snapshot.cellRange),
13319
+ tableSelection: snapshot.tableSelection ?? null
13320
+ };
13281
13321
  };
13282
13322
  const tables = {
13283
- getContext: () => {
13284
- const context = resolveTableContext();
13285
- if (!context) return { ...EMPTY_TABLE_CONTEXT };
13286
- const table = readHostTableContext()?.table;
13323
+ getContext: () => publicTableContext(readHostTableContext()),
13324
+ getContextAsync: async () => {
13325
+ for (let attempt = 0; attempt < 2; attempt += 1) {
13326
+ const token = selectionReadToken();
13327
+ const host = getHost();
13328
+ const read = host?.getTableContextAsync;
13329
+ if (typeof read !== "function") return publicTableContext(readHostTableContext());
13330
+ let snapshot = null;
13331
+ try {
13332
+ snapshot = await read.call(host);
13333
+ } catch {
13334
+ return {
13335
+ ...EMPTY_TABLE_CONTEXT,
13336
+ status: "pending"
13337
+ };
13338
+ }
13339
+ if (disposed) return {
13340
+ ...EMPTY_TABLE_CONTEXT,
13341
+ status: "pending"
13342
+ };
13343
+ if (token !== selectionReadToken() || host !== getHost()) continue;
13344
+ const context = publicTableContext(snapshot);
13345
+ if (context.status === "stale") continue;
13346
+ return context;
13347
+ }
13287
13348
  return {
13288
- inTable: true,
13289
- tableNodeId: context.tableNodeId,
13290
- rowIndex: context.rowIndex,
13291
- columnIndex: context.columnIndex,
13292
- cellNodeId: context.cellNodeId,
13293
- rows: typeof table?.rows === "number" ? table.rows : null,
13294
- columns: typeof table?.columns === "number" ? table.columns : null
13349
+ ...EMPTY_TABLE_CONTEXT,
13350
+ status: "stale"
13295
13351
  };
13296
13352
  },
13297
13353
  isInTable: () => resolveTableContext() != null
@@ -5939,6 +5939,7 @@ function buildTableCommandInput(action, context) {
5939
5939
  };
5940
5940
  case "delete-table": return { nodeId };
5941
5941
  case "merge-cells": {
5942
+ if (!context.canMerge) return null;
5942
5943
  const range = mergeRange ?? {
5943
5944
  start: {
5944
5945
  rowIndex,
@@ -6245,7 +6246,7 @@ function createSuperDocUI(options) {
6245
6246
  };
6246
6247
  const resolveTableContext = () => {
6247
6248
  const snapshot = readHostTableContext();
6248
- if (!snapshot || snapshot.inTable !== true) return null;
6249
+ if (!snapshot || snapshot.inTable !== true || snapshot.status && snapshot.status !== "ready") return null;
6249
6250
  const table = snapshot.table;
6250
6251
  const tableNodeId = typeof table?.nodeId === "string" && table.nodeId.length > 0 ? table.nodeId : null;
6251
6252
  if (!tableNodeId) return null;
@@ -6257,12 +6258,15 @@ function createSuperDocUI(options) {
6257
6258
  if (rowIndex == null || columnIndex == null) return null;
6258
6259
  const cellNodeId = typeof cell?.nodeId === "string" && cell.nodeId.length > 0 ? cell.nodeId : null;
6259
6260
  const range = snapshot.cellRange;
6261
+ const mergeRange = readMergeRange(range);
6262
+ const metadata = snapshot.tableSelection;
6260
6263
  return {
6261
6264
  tableNodeId,
6262
6265
  rowIndex,
6263
6266
  columnIndex,
6264
6267
  cellNodeId,
6265
- mergeRange: readMergeRange(range)
6268
+ mergeRange,
6269
+ canMerge: metadata == null || metadata.selectionMode === "cells" && metadata.isRectangular === true
6266
6270
  };
6267
6271
  };
6268
6272
  const customCommands = /* @__PURE__ */ new Map();
@@ -9156,7 +9160,7 @@ function createSuperDocUI(options) {
9156
9160
  reason: SUPERDOC_UI_REASONS.documentReadonly
9157
9161
  }, "builtin");
9158
9162
  const context = resolveTableContext();
9159
- if (!(context != null && (!descriptor.table.requiresCell || context.cellNodeId != null))) return normalizeCommandState({
9163
+ if (!(context != null && (!descriptor.table.requiresCell || context.cellNodeId != null) && (descriptor.table.action !== "merge-cells" || context.canMerge))) return normalizeCommandState({
9160
9164
  enabled: false,
9161
9165
  active: false,
9162
9166
  supported: true,
@@ -13061,7 +13065,13 @@ function createSuperDocUI(options) {
13061
13065
  return {
13062
13066
  point,
13063
13067
  entities: validInput ? entityAt(point) : [],
13064
- selection: state.selection,
13068
+ selection: (() => {
13069
+ const current = computeSelection();
13070
+ return current.status === "ready" ? current : {
13071
+ ...current,
13072
+ tableSelection: null
13073
+ };
13074
+ })(),
13065
13075
  position: null,
13066
13076
  insideSelection: false
13067
13077
  };
@@ -13278,21 +13288,67 @@ function createSuperDocUI(options) {
13278
13288
  columnIndex: null,
13279
13289
  cellNodeId: null,
13280
13290
  rows: null,
13281
- columns: null
13291
+ columns: null,
13292
+ status: "ready",
13293
+ cellRange: null,
13294
+ tableSelection: null
13295
+ };
13296
+ const publicTableContext = (snapshot) => {
13297
+ const status = snapshot?.status === "pending" || snapshot?.status === "stale" ? snapshot.status : "ready";
13298
+ if (!snapshot || snapshot.inTable !== true || status !== "ready") return {
13299
+ ...EMPTY_TABLE_CONTEXT,
13300
+ status
13301
+ };
13302
+ const table = snapshot.table;
13303
+ const row = snapshot.row;
13304
+ const column = snapshot.column;
13305
+ const cell = snapshot.cell;
13306
+ if (typeof table?.nodeId !== "string") return {
13307
+ ...EMPTY_TABLE_CONTEXT,
13308
+ status
13309
+ };
13310
+ return {
13311
+ inTable: true,
13312
+ status,
13313
+ tableNodeId: table.nodeId,
13314
+ rowIndex: typeof row?.index === "number" ? row.index : null,
13315
+ columnIndex: typeof column?.index === "number" ? column.index : null,
13316
+ cellNodeId: typeof cell?.nodeId === "string" ? cell.nodeId : null,
13317
+ rows: typeof table.rows === "number" ? table.rows : null,
13318
+ columns: typeof table.columns === "number" ? table.columns : null,
13319
+ cellRange: readMergeRange(snapshot.cellRange),
13320
+ tableSelection: snapshot.tableSelection ?? null
13321
+ };
13282
13322
  };
13283
13323
  const tables = {
13284
- getContext: () => {
13285
- const context = resolveTableContext();
13286
- if (!context) return { ...EMPTY_TABLE_CONTEXT };
13287
- const table = readHostTableContext()?.table;
13324
+ getContext: () => publicTableContext(readHostTableContext()),
13325
+ getContextAsync: async () => {
13326
+ for (let attempt = 0; attempt < 2; attempt += 1) {
13327
+ const token = selectionReadToken();
13328
+ const host = getHost();
13329
+ const read = host?.getTableContextAsync;
13330
+ if (typeof read !== "function") return publicTableContext(readHostTableContext());
13331
+ let snapshot = null;
13332
+ try {
13333
+ snapshot = await read.call(host);
13334
+ } catch {
13335
+ return {
13336
+ ...EMPTY_TABLE_CONTEXT,
13337
+ status: "pending"
13338
+ };
13339
+ }
13340
+ if (disposed) return {
13341
+ ...EMPTY_TABLE_CONTEXT,
13342
+ status: "pending"
13343
+ };
13344
+ if (token !== selectionReadToken() || host !== getHost()) continue;
13345
+ const context = publicTableContext(snapshot);
13346
+ if (context.status === "stale") continue;
13347
+ return context;
13348
+ }
13288
13349
  return {
13289
- inTable: true,
13290
- tableNodeId: context.tableNodeId,
13291
- rowIndex: context.rowIndex,
13292
- columnIndex: context.columnIndex,
13293
- cellNodeId: context.cellNodeId,
13294
- rows: typeof table?.rows === "number" ? table.rows : null,
13295
- columns: typeof table?.columns === "number" ? table.columns : null
13350
+ ...EMPTY_TABLE_CONTEXT,
13351
+ status: "stale"
13296
13352
  };
13297
13353
  },
13298
13354
  isInTable: () => resolveTableContext() != null
@@ -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.1",
22
+ superdocVersion: "2.24.0-next.2",
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.1",
21
+ superdocVersion: "2.24.0-next.2",
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
@@ -1,6 +1,8 @@
1
1
  import { SelectionTarget, TextTarget } from '../types/address.js';
2
2
  export interface SelectionTableCellsTarget {
3
3
  kind: 'tableCells';
4
+ selectionMode?: 'cells';
5
+ isRectangular?: true;
4
6
  tableId: string;
5
7
  start: {
6
8
  rowIndex: number;
@@ -12,15 +14,33 @@ export interface SelectionTableCellsTarget {
12
14
  };
13
15
  story?: SelectionTarget['story'];
14
16
  }
15
- /** Table identity for a caret, rectangular cell selection, or whole-grid selection. */
16
- export interface TableSelectionInfo extends SelectionTableCellsTarget {
17
- /** `cell` includes a caret or text range contained in one cell. */
17
+ /** Table/cell context for the selection; bounds alone are not an editing target. */
18
+ export interface TableSelectionInfo {
19
+ kind: 'tableCells';
20
+ tableId: string;
21
+ story?: SelectionTarget['story'];
22
+ /** Inclusive logical bounds, including each selected owner's span. */
23
+ start: {
24
+ rowIndex: number;
25
+ columnIndex: number;
26
+ };
27
+ end: {
28
+ rowIndex: number;
29
+ columnIndex: number;
30
+ };
31
+ /** Whole-table identity requires whole-cell selection intent. */
18
32
  type: 'table' | 'cell' | 'cells';
19
- /** Selected cells in row-major order, using opaque Document API node IDs. */
33
+ /** Text context preserves exact character targets; cells denotes whole-cell intent. */
34
+ selectionMode: 'text' | 'cells';
35
+ /** Whether the exact cells fill the bounding rectangle without holes. */
36
+ isRectangular: boolean;
37
+ /** Exact logical owners in row-major order; vertical continuations are deduplicated. */
20
38
  cells: {
21
39
  nodeId: string;
22
40
  rowIndex: number;
23
41
  columnIndex: number;
42
+ rowspan: number;
43
+ colspan: number;
24
44
  }[];
25
45
  }
26
46
  export type SelectionExtractOoxmlInput = {
@@ -132,10 +152,11 @@ export interface SelectionInfo {
132
152
  */
133
153
  selectionTarget?: SelectionTarget | null;
134
154
  /**
135
- * V2 browser table selection with inclusive, zero-based grid coordinates.
136
- * Rectangles in unmerged tables clear `target` and `selectionTarget`.
137
- * Rectangles in tables containing merged cells return null and empty text.
138
- * A single-cell caret/text range preserves its text targets and `empty` value.
155
+ * V2 browser cell context with inclusive, zero-based logical bounds.
156
+ * Whole-cell selections clear text targets. Character selections preserve
157
+ * their targets and include the containing cells, including endpoint cells.
158
+ * Exact cell IDs and spans describe merged or nonrectangular selections;
159
+ * only rectangular whole-cell metadata can become a table-cells target.
139
160
  */
140
161
  tableSelection?: TableSelectionInfo | null;
141
162
  /**
@@ -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-D_FbXpOQ.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-tJenv7pA.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-DFNXiKvQ.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-BOrgnNVV.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
@@ -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-D_FbXpOQ.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-tJenv7pA.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
@@ -1,4 +1,4 @@
1
- import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-DFNXiKvQ.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-BOrgnNVV.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
@@ -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-D_FbXpOQ.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-tJenv7pA.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;
@@ -1,2 +1,2 @@
1
- import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-DFNXiKvQ.es.js";
1
+ import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-BOrgnNVV.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
@@ -1270,6 +1270,20 @@ export interface MetadataHandle {
1270
1270
  * through; custom UIs read it to enable / label their own table controls.
1271
1271
  */
1272
1272
  export interface TableContextInfo {
1273
+ /** Runtime always supplies status; stale/pending snapshots carry no previous cell IDs. */
1274
+ status?: SliceStatus;
1275
+ /** Inclusive logical bounding geometry; use tableSelection for exact membership. */
1276
+ cellRange?: {
1277
+ start: {
1278
+ rowIndex: number;
1279
+ columnIndex: number;
1280
+ };
1281
+ end: {
1282
+ rowIndex: number;
1283
+ columnIndex: number;
1284
+ };
1285
+ } | null;
1286
+ tableSelection?: SelectionInfo['tableSelection'];
1273
1287
  /** Whether the current selection is inside a table. */
1274
1288
  inTable: boolean;
1275
1289
  /** Stable node id of the enclosing table, when resolved. */
@@ -1289,6 +1303,8 @@ export interface TableContextInfo {
1289
1303
  export interface TablesHandle {
1290
1304
  /** Read the current table context snapshot. */
1291
1305
  getContext(): TableContextInfo;
1306
+ /** Resolve fresh, bounded table context for immediate context-menu callbacks. */
1307
+ getContextAsync(): Promise<TableContextInfo>;
1292
1308
  /** Convenience: whether the current selection is inside a table. */
1293
1309
  isInTable(): boolean;
1294
1310
  }
@@ -89,6 +89,8 @@ import type { SuperDocUIOptions as __Cjs_SuperDocUIOptions } from './ui.js' with
89
89
  import type { SuperDocUIReason as __Cjs_SuperDocUIReason } from './ui.js' with { "resolution-mode": "import" };
90
90
  import type { SuperDocUIScope as __Cjs_SuperDocUIScope } from './ui.js' with { "resolution-mode": "import" };
91
91
  import type { SuperDocUIState as __Cjs_SuperDocUIState } from './ui.js' with { "resolution-mode": "import" };
92
+ import type { TableContextInfo as __Cjs_TableContextInfo } from './ui.js' with { "resolution-mode": "import" };
93
+ import type { TablesHandle as __Cjs_TablesHandle } from './ui.js' with { "resolution-mode": "import" };
92
94
  import type { TextAddress as __Cjs_TextAddress } from './ui.js' with { "resolution-mode": "import" };
93
95
  import type { TextTarget as __Cjs_TextTarget } from './ui.js' with { "resolution-mode": "import" };
94
96
  import type { TextWatermark as __Cjs_TextWatermark } from './ui.js' with { "resolution-mode": "import" };
@@ -214,6 +216,8 @@ export type { __Cjs_SuperDocUIOptions as SuperDocUIOptions };
214
216
  export type { __Cjs_SuperDocUIReason as SuperDocUIReason };
215
217
  export type { __Cjs_SuperDocUIScope as SuperDocUIScope };
216
218
  export type { __Cjs_SuperDocUIState as SuperDocUIState };
219
+ export type { __Cjs_TableContextInfo as TableContextInfo };
220
+ export type { __Cjs_TablesHandle as TablesHandle };
217
221
  export type { __Cjs_TextAddress as TextAddress };
218
222
  export type { __Cjs_TextTarget as TextTarget };
219
223
  export type { __Cjs_TextWatermark as TextWatermark };
@@ -26,4 +26,4 @@
26
26
  export { createSuperDocUI } from './ui/create-super-doc-ui.js';
27
27
  export { shallowEqual } from './ui/equality.js';
28
28
  export { BUILT_IN_COMMAND_IDS } from './ui/commands.js';
29
- export type { EqualityFn, SelectorFn, Subscribable, SuperDocUI, BorrowedSuperDocUI, SuperDocUIOptions, SuperDocUIState, SuperDocUIScope, SuperDocLike, SuperDocEditorLike, CommandHandle, CommandState, CommandExecutionResult, WorkflowReceipt, WorkflowActionResult, WorkflowScrollResult, SelectionRestoreResult, SuperDocUIReason, CommandId, CommandsHandle, ContextMenuItem, ContextMenuHandle, WatermarkHandle, SearchController, SearchHandle, SearchQueryOptions, CustomCommandContext, CustomCommandHandle, CustomCommandHandleState, CustomCommandRegistration, CustomCommandRegistrationResult, MetadataHandle, SelectionHandle, ToolbarHandle, BuiltInCommandId, ToolbarCommandId, CommentsHandle, TrackChangesHandle, ContentControlsHandle, BookmarksHandle, BookmarkAddress, ContentControlFocusResult, ContentControlHighlightResult, FontsHandle, ZoomHandle, DocumentHandle, DocumentReplacementResult, ViewportHandle, StylesHandle, ActiveParagraphStyle, SliceStatus, SelectionSlice, SelectionCapture, CommentAnchorCapture, ToolbarSnapshotSlice, CommentsSlice, TrackChangesSlice, ContentControlsSlice, FontsSlice, ZoomSlice, DocumentSlice, StylesSlice, SearchSnapshot, SearchSlice, StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, CommentInfo, CommentsListQuery, TrackChangeInfo, TrackChangePointHit, TrackChangesItem, FontFamilyOption, FontSizeOption, CommentAddress, TrackedChangeAddress, ContentControlViewportAddress, ViewportEntityAddress, ViewportEntityHit, ViewportContext, ViewportRect, ViewportGetRectInput, ViewportRectResult, BrowserDocumentApi, PartialBrowserDocumentApi, DocumentApi, Receipt, SelectionInfo, SelectionTarget, SelectionPoint, TextTarget, TextAddress, ScrollIntoViewInput, ScrollIntoViewOutput, EntityAddress, CommentsListResult, TrackChangesListResult, ContentControlsListResult, ContentControlInfo, ContentControlTarget, RichContentInsertInput, OperationCapabilityResolveResult, SDHtmlMarkdownSupportCheckResult, PictureWatermarkInput, RetainedPictureWatermarkInput, TextWatermark, WatermarkInfo, WatermarkTarget, WatermarksApplyInput, WatermarksApplyResult, WatermarksApplySuccess, WatermarksApplyTarget, } from './ui/types.js';
29
+ export type { EqualityFn, SelectorFn, Subscribable, SuperDocUI, BorrowedSuperDocUI, SuperDocUIOptions, SuperDocUIState, SuperDocUIScope, SuperDocLike, SuperDocEditorLike, CommandHandle, CommandState, CommandExecutionResult, WorkflowReceipt, WorkflowActionResult, WorkflowScrollResult, SelectionRestoreResult, SuperDocUIReason, CommandId, CommandsHandle, ContextMenuItem, ContextMenuHandle, WatermarkHandle, SearchController, SearchHandle, SearchQueryOptions, CustomCommandContext, CustomCommandHandle, CustomCommandHandleState, CustomCommandRegistration, CustomCommandRegistrationResult, MetadataHandle, SelectionHandle, TablesHandle, TableContextInfo, ToolbarHandle, BuiltInCommandId, ToolbarCommandId, CommentsHandle, TrackChangesHandle, ContentControlsHandle, BookmarksHandle, BookmarkAddress, ContentControlFocusResult, ContentControlHighlightResult, FontsHandle, ZoomHandle, DocumentHandle, DocumentReplacementResult, ViewportHandle, StylesHandle, ActiveParagraphStyle, SliceStatus, SelectionSlice, SelectionCapture, CommentAnchorCapture, ToolbarSnapshotSlice, CommentsSlice, TrackChangesSlice, ContentControlsSlice, FontsSlice, ZoomSlice, DocumentSlice, StylesSlice, SearchSnapshot, SearchSlice, StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, CommentInfo, CommentsListQuery, TrackChangeInfo, TrackChangePointHit, TrackChangesItem, FontFamilyOption, FontSizeOption, CommentAddress, TrackedChangeAddress, ContentControlViewportAddress, ViewportEntityAddress, ViewportEntityHit, ViewportContext, ViewportRect, ViewportGetRectInput, ViewportRectResult, BrowserDocumentApi, PartialBrowserDocumentApi, DocumentApi, Receipt, SelectionInfo, SelectionTarget, SelectionPoint, TextTarget, TextAddress, ScrollIntoViewInput, ScrollIntoViewOutput, EntityAddress, CommentsListResult, TrackChangesListResult, ContentControlsListResult, ContentControlInfo, ContentControlTarget, RichContentInsertInput, OperationCapabilityResolveResult, SDHtmlMarkdownSupportCheckResult, PictureWatermarkInput, RetainedPictureWatermarkInput, TextWatermark, WatermarkInfo, WatermarkTarget, WatermarksApplyInput, WatermarksApplyResult, WatermarksApplySuccess, WatermarksApplyTarget, } from './ui/types.js';
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-D_FbXpOQ.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-tJenv7pA.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.1";
307
+ return "2.24.0-next.2";
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.1";
46567
+ this.version = "2.24.0-next.2";
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 ?? [];
@@ -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-DFNXiKvQ.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-BOrgnNVV.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.1";
305
+ return "2.24.0-next.2";
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.1";
46496
+ this.version = "2.24.0-next.2";
46497
46497
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
46498
46498
  this.superdocId = config.superdocId || v4();
46499
46499
  this.colors = this.config.colors ?? [];