superdoc 2.22.0-next.1 → 2.22.0-next.10

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.
@@ -7214,6 +7214,7 @@ function createSuperDocUI(options) {
7214
7214
  empty: info.empty === true,
7215
7215
  target,
7216
7216
  selectionTarget: info.selectionTarget ?? null,
7217
+ tableSelection: info.tableSelection ?? null,
7217
7218
  activeMarks: Array.isArray(info.activeMarks) ? info.activeMarks : [],
7218
7219
  activeCommentIds: Array.isArray(info.activeCommentIds) ? info.activeCommentIds : [],
7219
7220
  activeChangeIds: Array.isArray(info.activeChangeIds) ? info.activeChangeIds : [],
@@ -7213,6 +7213,7 @@ function createSuperDocUI(options) {
7213
7213
  empty: info.empty === true,
7214
7214
  target,
7215
7215
  selectionTarget: info.selectionTarget ?? null,
7216
+ tableSelection: info.tableSelection ?? null,
7216
7217
  activeMarks: Array.isArray(info.activeMarks) ? info.activeMarks : [],
7217
7218
  activeCommentIds: Array.isArray(info.activeCommentIds) ? info.activeCommentIds : [],
7218
7219
  activeChangeIds: Array.isArray(info.activeChangeIds) ? info.activeChangeIds : [],
@@ -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.22.0-next.1",
22
+ superdocVersion: "2.22.0-next.10",
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.22.0-next.1",
21
+ superdocVersion: "2.22.0-next.10",
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
@@ -1024,8 +1024,8 @@ export declare const OPERATION_DEFINITIONS: {
1024
1024
  };
1025
1025
  readonly 'selection.current': {
1026
1026
  readonly memberPath: "selection.current";
1027
- readonly description: "Read the editor's current selection as a portable SelectionInfo with a text-anchored TextTarget. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals.";
1028
- readonly expectedResult: "Returns a SelectionInfo with `empty`, `target` (TextTarget or null), optional `selectionTarget`, `activeMarks`, and optionally `text` when `includeText: true`.";
1027
+ readonly description: "Read the editor's current selection as a portable SelectionInfo with text targets or V2 browser table/cell metadata. Primitive for building custom comments UIs, floating toolbars, and other selection-driven components without reaching into ProseMirror internals.";
1028
+ readonly expectedResult: "Returns a SelectionInfo with `empty`, `target` (TextTarget or null), optional `selectionTarget` and `tableSelection`, `activeMarks`, and optionally `text` when `includeText: true`.";
1029
1029
  readonly requiresDocumentContext: true;
1030
1030
  readonly metadata: CommandStaticMetadata;
1031
1031
  readonly referenceDocPath: "selection/current.mdx";
@@ -105,14 +105,23 @@ export interface DiffApplyResult {
105
105
  coverage: DiffCoverage;
106
106
  summary: DiffSummary;
107
107
  diagnostics: string[];
108
+ /** Style definitions applied directly; these changes remain when body revisions are rejected. */
109
+ styleChanges?: {
110
+ changeMode: 'direct';
111
+ partUris: string[];
112
+ };
108
113
  }
109
114
  /** Input for `diff.compare`. */
110
115
  export interface DiffCompareInput {
111
116
  targetSnapshot: DiffSnapshot;
117
+ /** Assess tracked eligibility with explicit consent to apply style definitions directly. */
118
+ styleChangeMode?: 'direct';
112
119
  }
113
120
  /** Input for `diff.apply`. */
114
121
  export interface DiffApplyInput {
115
122
  diff: DiffPayload;
123
+ /** Apply target style definitions directly, even when body changes are tracked. */
124
+ styleChangeMode?: 'direct';
116
125
  }
117
126
  /** How body content changes are applied. */
118
127
  export type DiffChangeMode = 'direct' | 'tracked';
@@ -76,7 +76,7 @@ export * from './export/export.types.js';
76
76
  export type { SelectionMutationAdapter, SelectionMutationRequest, SelectionInsertRequest, } from './selection-mutation.js';
77
77
  export type { RangeAnchor, DocumentEdgeAnchor, PointAnchor, RefBoundaryAnchor, ResolveRangeInput, ResolveRangeOutput, RangeBlockPreview, RangePreview, RangeResolverAdapter, ScrollIntoViewInput, ScrollIntoViewOutput, } from './ranges/index.js';
78
78
  export { executeResolveRange } from './ranges/index.js';
79
- export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection/selection.js';
79
+ export type { SelectionApi, SelectionAdapter, SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, TableSelectionInfo, SelectionInfo, } from './selection/selection.js';
80
80
  export { executeSelectionCurrent, executeSelectionExtractOoxml } from './selection/selection.js';
81
81
  export type { HeaderFootersAdapter, HeaderFootersApi } from './header-footers/header-footers.js';
82
82
  export * from './header-footers/header-footers.types.js';
@@ -1,5 +1,5 @@
1
1
  import { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionInfo } from './selection.types.js';
2
- export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, SelectionInfo, } from './selection.types.js';
2
+ export type { SelectionCurrentInput, SelectionExtractOoxmlInput, SelectionExtractOoxmlResult, SelectionOoxmlDependency, SelectionTableCellsTarget, TableSelectionInfo, SelectionInfo, } from './selection.types.js';
3
3
  /**
4
4
  * Engine-specific adapter for the selection API.
5
5
  */
@@ -12,6 +12,17 @@ export interface SelectionTableCellsTarget {
12
12
  };
13
13
  story?: SelectionTarget['story'];
14
14
  }
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. */
18
+ type: 'table' | 'cell' | 'cells';
19
+ /** Selected cells in row-major order, using opaque Document API node IDs. */
20
+ cells: {
21
+ nodeId: string;
22
+ rowIndex: number;
23
+ columnIndex: number;
24
+ }[];
25
+ }
15
26
  export type SelectionExtractOoxmlInput = {
16
27
  at: SelectionTarget | SelectionTableCellsTarget;
17
28
  selection?: never;
@@ -93,7 +104,7 @@ export interface SelectionCurrentInput {
93
104
  }
94
105
  /**
95
106
  * Canonical shape of the editor's current selection, projected into the
96
- * Document API's text-address model. This is the primitive consumers use
107
+ * Document API's text and table-address models. This is the primitive consumers use
97
108
  * to build custom comments UIs, floating toolbars, mention popovers, etc.
98
109
  *
99
110
  * Unlike PM's `Selection` (positional and private), `SelectionInfo` is
@@ -120,6 +131,13 @@ export interface SelectionInfo {
120
131
  * selection-target model the write APIs consume directly.
121
132
  */
122
133
  selectionTarget?: SelectionTarget | null;
134
+ /**
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.
139
+ */
140
+ tableSelection?: TableSelectionInfo | null;
123
141
  /**
124
142
  * Active marks at the caret or across the selection. Names are
125
143
  * ProseMirror mark type names (e.g. `'bold'`, `'italic'`, `'link'`).
@@ -469,6 +469,10 @@ export type TabRun = RunMarks & {
469
469
  pmEnd?: number;
470
470
  /** SDT metadata if tab is inside a structured document tag. */
471
471
  sdt?: SdtMetadata;
472
+ /** Tracked-change identity of the wrapper owning this tab. */
473
+ trackedChange?: TrackedChangeMeta;
474
+ /** Ordered tracked-change layers when wrappers overlap. */
475
+ trackedChanges?: TrackedChangeMeta[];
472
476
  };
473
477
  export type LineBreakRun = {
474
478
  kind: 'lineBreak';
@@ -784,7 +788,7 @@ export type ParagraphBlock = {
784
788
  inlineBoxes?: InlineBoxSpan[];
785
789
  };
786
790
  /** Border style (subset of OOXML ST_Border). */
787
- export type BorderStyle = 'none' | 'single' | 'double' | 'dashed' | 'dotted' | 'thick' | 'triple' | 'dotDash' | 'dotDotDash' | 'wave' | 'doubleWave';
791
+ export type BorderStyle = 'none' | 'single' | 'double' | 'dashed' | 'dashSmallGap' | 'dotted' | 'thick' | 'triple' | 'dotDash' | 'dotDotDash' | 'wave' | 'doubleWave' | 'dashDotStroked';
788
792
  /** Border specification for table and cell borders. */
789
793
  export type BorderSpec = {
790
794
  style?: BorderStyle;
@@ -822,6 +826,8 @@ export type CellBorders = {
822
826
  right?: BorderSpec;
823
827
  bottom?: BorderSpec;
824
828
  left?: BorderSpec;
829
+ tl2br?: BorderSpec;
830
+ tr2bl?: BorderSpec;
825
831
  };
826
832
  /** True when a normalized border contributes a visible edge. */
827
833
  export declare const isPresentBorder: (border?: BorderSpec) => border is BorderSpec;
@@ -53,7 +53,14 @@ export declare const applyBorder: (element: HTMLElement, side: BorderSide, borde
53
53
  * });
54
54
  * ```
55
55
  */
56
- export declare const applyCellBorders: (element: HTMLElement, borders?: CellBorders) => void;
56
+ export declare const applyCellBorders: (element: HTMLElement, borders?: CellBorders, useSvgOverlay?: boolean) => void;
57
+ /** Paints cell-only border patterns that CSS borders cannot represent. */
58
+ export declare const createCellBorderOverlay: (doc: Document, borders: CellBorders | undefined, geometry: {
59
+ left: string;
60
+ top: string;
61
+ width: number;
62
+ height: number;
63
+ }) => SVGSVGElement | null;
57
64
  /**
58
65
  * Converts a TableBorderValue to a BorderSpec for rendering.
59
66
  *
@@ -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-yKesgn9b.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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-0CZTlOvl.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dos1KQcL.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-yKesgn9b.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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-0CZTlOvl.es.js";
1
+ import { t as createSuperDocUI } from "../chunks/create-super-doc-ui-Dos1KQcL.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-yKesgn9b.cjs");
2
+ const require_create_super_doc_ui = require("../chunks/create-super-doc-ui-DTLJMJIl.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-0CZTlOvl.es.js";
1
+ import { a as BUILT_IN_COMMAND_IDS, t as createSuperDocUI, u as shallowEqual } from "../chunks/create-super-doc-ui-Dos1KQcL.es.js";
2
2
  export { BUILT_IN_COMMAND_IDS, createSuperDocUI, shallowEqual };
package/dist/style.css CHANGED
@@ -2340,34 +2340,34 @@ img[data-v-c95b2073] {
2340
2340
  pointer-events: auto;
2341
2341
  }
2342
2342
 
2343
- .superdoc[data-v-b22dc061] {
2343
+ .superdoc[data-v-99399849] {
2344
2344
  display: flex;
2345
2345
  position: relative;
2346
2346
  }
2347
- .right-sidebar[data-v-b22dc061] {
2347
+ .right-sidebar[data-v-99399849] {
2348
2348
  min-width: 320px;
2349
2349
  height: 100%;
2350
2350
  }
2351
- .floating-comments[data-v-b22dc061] {
2351
+ .floating-comments[data-v-99399849] {
2352
2352
  min-width: 300px;
2353
2353
  width: 300px;
2354
2354
  height: 100%;
2355
2355
  overflow: visible;
2356
2356
  }
2357
- .superdoc__layers[data-v-b22dc061] {
2357
+ .superdoc__layers[data-v-99399849] {
2358
2358
  height: 100%;
2359
2359
  position: relative;
2360
2360
  box-sizing: border-box;
2361
2361
  }
2362
- .superdoc__document[data-v-b22dc061] {
2362
+ .superdoc__document[data-v-99399849] {
2363
2363
  width: 100%;
2364
2364
  position: relative;
2365
2365
  }
2366
- .superdoc__sub-document[data-v-b22dc061] {
2366
+ .superdoc__sub-document[data-v-99399849] {
2367
2367
  width: 100%;
2368
2368
  position: relative;
2369
2369
  }
2370
- .superdoc__selection-layer[data-v-b22dc061] {
2370
+ .superdoc__selection-layer[data-v-99399849] {
2371
2371
  position: absolute;
2372
2372
  min-width: 100%;
2373
2373
  min-height: 100%;
@@ -2378,13 +2378,13 @@ img[data-v-c95b2073] {
2378
2378
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
2379
2379
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
2380
2380
  clickable, and below the selection layer (z-index 10). */
2381
- .superdoc__whiteboard-layer[data-v-b22dc061] {
2381
+ .superdoc__whiteboard-layer[data-v-99399849] {
2382
2382
  z-index: 4;
2383
2383
  }
2384
- .superdoc__temp-selection[data-v-b22dc061] {
2384
+ .superdoc__temp-selection[data-v-99399849] {
2385
2385
  position: absolute;
2386
2386
  }
2387
- .superdoc__right-sidebar[data-v-b22dc061] {
2387
+ .superdoc__right-sidebar[data-v-99399849] {
2388
2388
  width: 320px;
2389
2389
  min-width: 320px;
2390
2390
  padding: 0 10px;
@@ -2392,7 +2392,7 @@ img[data-v-c95b2073] {
2392
2392
  position: relative;
2393
2393
  z-index: 2;
2394
2394
  }
2395
- .superdoc__compact-comment-popover[data-v-b22dc061] {
2395
+ .superdoc__compact-comment-popover[data-v-99399849] {
2396
2396
  position: absolute;
2397
2397
  top: 12px;
2398
2398
  right: 12px;
@@ -2401,14 +2401,14 @@ img[data-v-c95b2073] {
2401
2401
  }
2402
2402
 
2403
2403
  /* Tools styles */
2404
- .tools[data-v-b22dc061] {
2404
+ .tools[data-v-99399849] {
2405
2405
  position: absolute;
2406
2406
  z-index: 3;
2407
2407
  display: flex;
2408
2408
  flex-direction: column;
2409
2409
  gap: var(--sd-ui-tools-gap, 6px);
2410
2410
  }
2411
- .tools-item[data-v-b22dc061] {
2411
+ .tools-item[data-v-99399849] {
2412
2412
  display: flex;
2413
2413
  align-items: center;
2414
2414
  justify-content: center;
@@ -2419,10 +2419,10 @@ img[data-v-c95b2073] {
2419
2419
  cursor: pointer;
2420
2420
  position: relative;
2421
2421
  }
2422
- .tools-item i[data-v-b22dc061] {
2422
+ .tools-item i[data-v-99399849] {
2423
2423
  cursor: pointer;
2424
2424
  }
2425
- .superdoc__tools-icon[data-v-b22dc061] {
2425
+ .superdoc__tools-icon[data-v-99399849] {
2426
2426
  width: var(--sd-ui-tools-icon-size, 20px);
2427
2427
  height: var(--sd-ui-tools-icon-size, 20px);
2428
2428
  flex-shrink: 0;
@@ -2437,22 +2437,22 @@ img[data-v-c95b2073] {
2437
2437
 
2438
2438
  /* 834px is iPad screen size in portrait orientation */
2439
2439
  @media (max-width: 834px) {
2440
- .superdoc .superdoc__layers[data-v-b22dc061] {
2440
+ .superdoc .superdoc__layers[data-v-99399849] {
2441
2441
  margin: 0;
2442
2442
  border: 0 !important;
2443
2443
  box-shadow: none;
2444
2444
  }
2445
- .superdoc__sub-document[data-v-b22dc061] {
2445
+ .superdoc__sub-document[data-v-99399849] {
2446
2446
  max-width: 100%;
2447
2447
  }
2448
- .superdoc__right-sidebar[data-v-b22dc061] {
2448
+ .superdoc__right-sidebar[data-v-99399849] {
2449
2449
  padding: 10px;
2450
2450
  position: relative;
2451
2451
  }
2452
2452
  }
2453
2453
 
2454
2454
  /* AI Writer styles */
2455
- .ai-writer-container[data-v-b22dc061] {
2455
+ .ai-writer-container[data-v-99399849] {
2456
2456
  position: fixed;
2457
2457
  z-index: 1000;
2458
2458
  background: white;
@@ -2468,10 +2468,10 @@ img[data-v-c95b2073] {
2468
2468
  transform: translateY(-50%);
2469
2469
  z-index: 50;
2470
2470
  } */
2471
- .ai-tool > svg[data-v-b22dc061] {
2471
+ .ai-tool > svg[data-v-99399849] {
2472
2472
  fill: transparent;
2473
2473
  }
2474
- .ai-tool[data-v-b22dc061]::before {
2474
+ .ai-tool[data-v-99399849]::before {
2475
2475
  content: '';
2476
2476
  position: absolute;
2477
2477
  width: 20px;
@@ -2492,7 +2492,7 @@ img[data-v-c95b2073] {
2492
2492
  filter: brightness(1.2);
2493
2493
  transition: filter 0.2s ease;
2494
2494
  }
2495
- .ai-tool[data-v-b22dc061]:hover::before {
2495
+ .ai-tool[data-v-99399849]:hover::before {
2496
2496
  filter: brightness(1.3);
2497
2497
  }
2498
2498
 
@@ -2340,34 +2340,34 @@ img[data-v-c95b2073] {
2340
2340
  pointer-events: auto;
2341
2341
  }
2342
2342
 
2343
- .superdoc[data-v-b22dc061] {
2343
+ .superdoc[data-v-99399849] {
2344
2344
  display: flex;
2345
2345
  position: relative;
2346
2346
  }
2347
- .right-sidebar[data-v-b22dc061] {
2347
+ .right-sidebar[data-v-99399849] {
2348
2348
  min-width: 320px;
2349
2349
  height: 100%;
2350
2350
  }
2351
- .floating-comments[data-v-b22dc061] {
2351
+ .floating-comments[data-v-99399849] {
2352
2352
  min-width: 300px;
2353
2353
  width: 300px;
2354
2354
  height: 100%;
2355
2355
  overflow: visible;
2356
2356
  }
2357
- .superdoc__layers[data-v-b22dc061] {
2357
+ .superdoc__layers[data-v-99399849] {
2358
2358
  height: 100%;
2359
2359
  position: relative;
2360
2360
  box-sizing: border-box;
2361
2361
  }
2362
- .superdoc__document[data-v-b22dc061] {
2362
+ .superdoc__document[data-v-99399849] {
2363
2363
  width: 100%;
2364
2364
  position: relative;
2365
2365
  }
2366
- .superdoc__sub-document[data-v-b22dc061] {
2366
+ .superdoc__sub-document[data-v-99399849] {
2367
2367
  width: 100%;
2368
2368
  position: relative;
2369
2369
  }
2370
- .superdoc__selection-layer[data-v-b22dc061] {
2370
+ .superdoc__selection-layer[data-v-99399849] {
2371
2371
  position: absolute;
2372
2372
  min-width: 100%;
2373
2373
  min-height: 100%;
@@ -2378,13 +2378,13 @@ img[data-v-c95b2073] {
2378
2378
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
2379
2379
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
2380
2380
  clickable, and below the selection layer (z-index 10). */
2381
- .superdoc__whiteboard-layer[data-v-b22dc061] {
2381
+ .superdoc__whiteboard-layer[data-v-99399849] {
2382
2382
  z-index: 4;
2383
2383
  }
2384
- .superdoc__temp-selection[data-v-b22dc061] {
2384
+ .superdoc__temp-selection[data-v-99399849] {
2385
2385
  position: absolute;
2386
2386
  }
2387
- .superdoc__right-sidebar[data-v-b22dc061] {
2387
+ .superdoc__right-sidebar[data-v-99399849] {
2388
2388
  width: 320px;
2389
2389
  min-width: 320px;
2390
2390
  padding: 0 10px;
@@ -2392,7 +2392,7 @@ img[data-v-c95b2073] {
2392
2392
  position: relative;
2393
2393
  z-index: 2;
2394
2394
  }
2395
- .superdoc__compact-comment-popover[data-v-b22dc061] {
2395
+ .superdoc__compact-comment-popover[data-v-99399849] {
2396
2396
  position: absolute;
2397
2397
  top: 12px;
2398
2398
  right: 12px;
@@ -2401,14 +2401,14 @@ img[data-v-c95b2073] {
2401
2401
  }
2402
2402
 
2403
2403
  /* Tools styles */
2404
- .tools[data-v-b22dc061] {
2404
+ .tools[data-v-99399849] {
2405
2405
  position: absolute;
2406
2406
  z-index: 3;
2407
2407
  display: flex;
2408
2408
  flex-direction: column;
2409
2409
  gap: var(--sd-ui-tools-gap, 6px);
2410
2410
  }
2411
- .tools-item[data-v-b22dc061] {
2411
+ .tools-item[data-v-99399849] {
2412
2412
  display: flex;
2413
2413
  align-items: center;
2414
2414
  justify-content: center;
@@ -2419,10 +2419,10 @@ img[data-v-c95b2073] {
2419
2419
  cursor: pointer;
2420
2420
  position: relative;
2421
2421
  }
2422
- .tools-item i[data-v-b22dc061] {
2422
+ .tools-item i[data-v-99399849] {
2423
2423
  cursor: pointer;
2424
2424
  }
2425
- .superdoc__tools-icon[data-v-b22dc061] {
2425
+ .superdoc__tools-icon[data-v-99399849] {
2426
2426
  width: var(--sd-ui-tools-icon-size, 20px);
2427
2427
  height: var(--sd-ui-tools-icon-size, 20px);
2428
2428
  flex-shrink: 0;
@@ -2437,22 +2437,22 @@ img[data-v-c95b2073] {
2437
2437
 
2438
2438
  /* 834px is iPad screen size in portrait orientation */
2439
2439
  @media (max-width: 834px) {
2440
- .superdoc .superdoc__layers[data-v-b22dc061] {
2440
+ .superdoc .superdoc__layers[data-v-99399849] {
2441
2441
  margin: 0;
2442
2442
  border: 0 !important;
2443
2443
  box-shadow: none;
2444
2444
  }
2445
- .superdoc__sub-document[data-v-b22dc061] {
2445
+ .superdoc__sub-document[data-v-99399849] {
2446
2446
  max-width: 100%;
2447
2447
  }
2448
- .superdoc__right-sidebar[data-v-b22dc061] {
2448
+ .superdoc__right-sidebar[data-v-99399849] {
2449
2449
  padding: 10px;
2450
2450
  position: relative;
2451
2451
  }
2452
2452
  }
2453
2453
 
2454
2454
  /* AI Writer styles */
2455
- .ai-writer-container[data-v-b22dc061] {
2455
+ .ai-writer-container[data-v-99399849] {
2456
2456
  position: fixed;
2457
2457
  z-index: 1000;
2458
2458
  background: white;
@@ -2468,10 +2468,10 @@ img[data-v-c95b2073] {
2468
2468
  transform: translateY(-50%);
2469
2469
  z-index: 50;
2470
2470
  } */
2471
- .ai-tool > svg[data-v-b22dc061] {
2471
+ .ai-tool > svg[data-v-99399849] {
2472
2472
  fill: transparent;
2473
2473
  }
2474
- .ai-tool[data-v-b22dc061]::before {
2474
+ .ai-tool[data-v-99399849]::before {
2475
2475
  content: '';
2476
2476
  position: absolute;
2477
2477
  width: 20px;
@@ -2492,7 +2492,7 @@ img[data-v-c95b2073] {
2492
2492
  filter: brightness(1.2);
2493
2493
  transition: filter 0.2s ease;
2494
2494
  }
2495
- .ai-tool[data-v-b22dc061]:hover::before {
2495
+ .ai-tool[data-v-99399849]:hover::before {
2496
2496
  filter: brightness(1.3);
2497
2497
  }
2498
2498
 
@@ -553,6 +553,8 @@ export interface SelectionSlice {
553
553
  target: TextTarget | null;
554
554
  /** Explicit start/end selection target, when available. */
555
555
  selectionTarget: SelectionTarget | null;
556
+ /** Table/cell identities from the settled public selection read, when supported. */
557
+ tableSelection?: SelectionInfo['tableSelection'];
556
558
  /** Marks currently active at the selection. */
557
559
  activeMarks: readonly string[];
558
560
  /** Comment ids overlapping the selection. */
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-yKesgn9b.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-DTLJMJIl.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");
@@ -316,7 +316,7 @@ var shuffleArray = (array) => {
316
316
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
317
317
  function getSuperdocVersion() {
318
318
  try {
319
- return "2.22.0-next.1";
319
+ return "2.22.0-next.10";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -21106,8 +21106,10 @@ function translateRenderReadinessDiagnostic(diag, ctx = {}) {
21106
21106
  const { code, reason, severity } = diag;
21107
21107
  if (severity !== "error" && severity !== "warn") return null;
21108
21108
  if (code === "render.exact-content-hydration-failed") return null;
21109
+ const unusableFurniture = code === "render.header-footer.ref-unusable" || code === "render.header-footer.part-unusable";
21109
21110
  let diagnosticCode;
21110
- if (code.includes("page-geometry.failed") || code.includes("section-metadata.failed") || code.includes("page-furniture.failed") || code === "render.provider-error") diagnosticCode = "RENDER_ERROR";
21111
+ if (unusableFurniture) diagnosticCode = "PARSE_ERROR";
21112
+ else if (code.includes("page-geometry.failed") || code.includes("section-metadata.failed") || code.includes("page-furniture.failed") || code === "render.provider-error") diagnosticCode = "RENDER_ERROR";
21111
21113
  else if (code.includes("unsupported")) diagnosticCode = "UNSUPPORTED_FEATURE";
21112
21114
  else if (code.includes("degraded")) diagnosticCode = typeof reason === "string" && (reason.includes("retained ") || reason.includes("localized resolve ")) ? "RENDER_ERROR" : "PERFORMANCE_ERROR";
21113
21115
  else if (severity === "error") diagnosticCode = "RENDER_ERROR";
@@ -21116,7 +21118,7 @@ function translateRenderReadinessDiagnostic(diag, ctx = {}) {
21116
21118
  return {
21117
21119
  error: new Error(message),
21118
21120
  diagnosticCode,
21119
- diagnosticStage: "render",
21121
+ diagnosticStage: unusableFurniture ? "parse" : "render",
21120
21122
  severity,
21121
21123
  internalCode: code,
21122
21124
  documentId: ctx.documentId ?? null,
@@ -23312,6 +23314,16 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
23312
23314
  const reason = typeof payload?.reason === "string" && payload.reason.length > 0 ? payload.reason : "open-failed";
23313
23315
  const detail = normalizeV2EditorFailureDetail(payload?.detail);
23314
23316
  const documentId = typeof payload?.documentId === "string" && payload.documentId.length > 0 ? payload.documentId : null;
23317
+ if (reason === "worker-transport-failed") {
23318
+ proxy.$superdoc.emit("exception", {
23319
+ error: /* @__PURE__ */ new Error("Worker transport failed."),
23320
+ code: reason,
23321
+ ...documentId ? { documentId } : {},
23322
+ editor: null,
23323
+ ...payload?.workerFailure ? { workerFailure: payload.workerFailure } : {}
23324
+ });
23325
+ return;
23326
+ }
23315
23327
  const collaborationException = createCollaborationException(reason, documentId);
23316
23328
  const message = collaborationException?.error.message ?? getV2EditorFailureMessage(reason);
23317
23329
  const workerFailure = payload?.workerFailure && typeof payload.workerFailure === "object" ? payload.workerFailure : null;
@@ -24553,7 +24565,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
24553
24565
  ], 38);
24554
24566
  };
24555
24567
  }
24556
- }, [["__scopeId", "data-v-b22dc061"]]);
24568
+ }, [["__scopeId", "data-v-99399849"]]);
24557
24569
  //#endregion
24558
24570
  //#region src/core/create-app.js
24559
24571
  var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
@@ -46370,7 +46382,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
46370
46382
  this.config.colors = shuffleArray(this.config.colors);
46371
46383
  this.userColorMap = /* @__PURE__ */ new Map();
46372
46384
  this.colorIndex = 0;
46373
- this.version = "2.22.0-next.1";
46385
+ this.version = "2.22.0-next.10";
46374
46386
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
46375
46387
  this.superdocId = config.superdocId || require_uuid.v4();
46376
46388
  this.colors = this.config.colors ?? [];