superdoc 2.12.0-next.1 → 2.12.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.
Files changed (31) hide show
  1. package/dist/collaboration-upgrade-engine.cjs +1 -1
  2. package/dist/collaboration-upgrade-engine.es.js +1 -1
  3. package/dist/layout-engine/contracts/src/index.d.ts +1 -1
  4. package/dist/layout-engine/contracts/src/run-helpers.d.ts +8 -0
  5. package/dist/layout-engine/layout-bridge/src/cache.d.ts +5 -4
  6. package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +4 -1
  7. package/dist/layout-engine/layout-bridge/src/note-marker-measure-key.d.ts +3 -0
  8. package/dist/layout-engine/layout-bridge/src/remeasure.d.ts +2 -1
  9. package/dist/public/ui-react.cjs +38 -9
  10. package/dist/public/ui-react.es.js +38 -9
  11. package/dist/shared/font-system/src/index.d.ts +3 -1
  12. package/dist/shared/font-system/src/natural-line-metrics.d.ts +11 -0
  13. package/dist/shared/font-system/src/resolver.d.ts +14 -0
  14. package/dist/style.css +25 -25
  15. package/dist/style.layered.css +25 -25
  16. package/dist/superdoc/src/core/types/index.d.ts +15 -0
  17. package/dist/superdoc/src/public/index.d.cts +2 -0
  18. package/dist/superdoc/src/public/index.d.ts +1 -0
  19. package/dist/superdoc/src/public/ui/react.d.ts +10 -3
  20. package/dist/superdoc/src/public/ui/types.d.ts +14 -12
  21. package/dist/superdoc/src/public/ui/vue.d.ts +2 -2
  22. package/dist/superdoc/src/public/ui-react.d.cts +2 -0
  23. package/dist/superdoc/src/public/ui-react.d.ts +1 -1
  24. package/dist/superdoc/src/public/ui.d.cts +2 -0
  25. package/dist/superdoc/src/public/ui.d.ts +1 -1
  26. package/dist/superdoc.cjs +149 -9
  27. package/dist/superdoc.es.js +149 -9
  28. package/dist-cdn/style.layered.css +1 -1
  29. package/dist-cdn/superdoc.min.css +1 -1
  30. package/dist-cdn/superdoc.min.js +21 -21
  31. package/package.json +2 -2
@@ -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.12.0-next.1",
22
+ superdocVersion: "2.12.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.12.0-next.1",
21
+ superdocVersion: "2.12.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
@@ -2836,7 +2836,7 @@ export declare const extractHeaderFooterSpace: (margins?: PageMargins | null) =>
2836
2836
  };
2837
2837
  export type { ResolvedLayout, ResolvedPage, ResolvedPaintItem, ResolvedGroupItem, ResolvedFragmentItem, ResolvedParagraphContent, ResolvedTextLineItem, ResolvedDropCapItem, ResolvedListMarkerItem, ResolvedTableItem, ResolvedImageItem, ResolvedDrawingItem, ResolvedHeaderFooterPage, ResolvedHeaderFooterLayout, } from './resolved-layout.js';
2838
2838
  export { isResolvedTableItem, isResolvedImageItem, isResolvedDrawingItem } from './resolved-layout.js';
2839
- export { expandRunsForInlineNewlines, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
2839
+ export { expandRunsForInlineNewlines, isBodyNoteReferenceRun, isNoteLabelRun, isNumberedNoteMarkerRun, isEmptyInlineSdtPlaceholderRun, isEmptySdtPlaceholderRun, NOTE_LABEL_MARKER_ATTR, NOTE_REFERENCE_MARKER_ATTR, sliceRunsForLine, usesPositionedTextGeometry, } from './run-helpers.js';
2840
2840
  export { INLINE_OBJECT_REPLACEMENT_CHARACTER, flattenParagraphVisibleText, mapVisibleRangeToRunSlices, type ParagraphVisibleRunSlice, } from './paragraph-visible-text.js';
2841
2841
  export { inlineBoxStyleSignature, isFiniteNonNegativeInteger, normalizeInlineBoxLogicalSides, type InlineBoxLogicalSides, type ResolvedInlineBoxLogicalSides, } from './inline-box.js';
2842
2842
  export { INCREMENTAL_DEPENDENCY_CERTIFICATE_CLASSES, PAGE_CHECKPOINT_DEPENDENCY_CLASSES, areValidPageCheckpointDependencyClasses, isValidIncrementalDependencyOwnerVersion, isValidNonFlowingPageRelativeAnchorDependencyProof, isValidPageCheckpointDependencyCertificate, type IncrementalDependencyCertificateClass, type IncrementalDependencyOwnerVersion, type NonFlowingPageRelativeAnchorDependencyProof, type PageCheckpointDependencyCertificate, type PageCheckpointDependencyClass, } from './incremental-dependency.js';
@@ -1,4 +1,12 @@
1
1
  import { FlowBlock, Line, Run, TextRun } from './index.js';
2
+ export declare const NOTE_REFERENCE_MARKER_ATTR = "data-v2-note-ref";
3
+ export declare const NOTE_LABEL_MARKER_ATTR = "data-v2-note-label";
4
+ /** Body note markers paint text but occupy one source-coordinate unit. */
5
+ export declare function isBodyNoteReferenceRun(run: Run): boolean;
6
+ /** Synthetic note-band or appended-endnote label keyed to its source note. */
7
+ export declare function isNoteLabelRun(run: Run): boolean;
8
+ /** Numbered marker text whose measurement identity can use digit capabilities. */
9
+ export declare function isNumberedNoteMarkerRun(run: Run): boolean;
2
10
  export declare function isEmptySdtPlaceholderRun(run: Run): run is TextRun & {
3
11
  visualPlaceholder: 'emptyInlineSdt' | 'emptyBlockSdt';
4
12
  };
@@ -1,4 +1,5 @@
1
1
  import { FlowBlock } from '../../contracts/src/index.js';
2
+ import { FontMeasureCapabilities } from '../../../shared/font-system/src/index.js';
2
3
  /**
3
4
  * Generates a cache key hash from a block's content, incorporating text,
4
5
  * formatting, and embedded block data.
@@ -23,7 +24,7 @@ import { FlowBlock } from '../../contracts/src/index.js';
23
24
  * content component of that key, so adopting a previous measure on hash
24
25
  * equality is exactly as sound as a cache hit.
25
26
  */
26
- export declare const hashMeasureContent: (block: FlowBlock) => string;
27
+ export declare const hashMeasureContent: (block: FlowBlock, capabilities?: FontMeasureCapabilities) => string;
27
28
  /**
28
29
  * Cache statistics with LRU eviction tracking
29
30
  */
@@ -80,12 +81,12 @@ export declare class MeasureCache<T> {
80
81
  * @param height - The height dimension for cache key
81
82
  * @returns The cached value or undefined
82
83
  */
83
- get(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string): T | undefined;
84
+ get(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string, capabilities?: FontMeasureCapabilities): T | undefined;
84
85
  /**
85
86
  * Compose the complete content, constraint, and font key once for a cache
86
87
  * read followed by an insertion in the same measurement transaction.
87
88
  */
88
- prepareKey(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string): PreparedMeasureCacheKey | undefined;
89
+ prepareKey(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string, capabilities?: FontMeasureCapabilities): PreparedMeasureCacheKey | undefined;
89
90
  getPrepared(key: PreparedMeasureCacheKey | undefined): T | undefined;
90
91
  /**
91
92
  * Store a measure in the cache for the given block and dimensions.
@@ -96,7 +97,7 @@ export declare class MeasureCache<T> {
96
97
  * @param height - The height dimension for cache key
97
98
  * @param value - The value to cache
98
99
  */
99
- set(block: FlowBlock | null | undefined, width: number, height: number, value: T, fontSignature?: string): void;
100
+ set(block: FlowBlock | null | undefined, width: number, height: number, value: T, fontSignature?: string, capabilities?: FontMeasureCapabilities): void;
100
101
  setPrepared(key: PreparedMeasureCacheKey | undefined, blockId: string | undefined, value: T): void;
101
102
  /**
102
103
  * Invalidates cached measurements for specific block IDs.
@@ -1,5 +1,5 @@
1
1
  import { NonFlowingPageRelativeAnchorDependencyProof, PageCheckpointDependencyClass, FlowBlock, Layout, LayoutBlockResumeCheckpoint, Measure, Page, HeaderFooterLayout, ColumnLayout } from '../../contracts/src/index.js';
2
- import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
2
+ import { FontMeasureCapabilities, FontMeasureContext } from '../../../shared/font-system/src/index.js';
3
3
  import { LayoutOptions, HeaderFooterConstraints, LayoutExecutionCheckpoint } from '../../layout-engine/src/index.js';
4
4
  import { computeDirtyRegions } from './diff.js';
5
5
  import { MeasureCache } from './cache.js';
@@ -534,10 +534,13 @@ export declare function incrementalLayout(previousBlocks: FlowBlock[], _previous
534
534
  }, previousMeasures?: Measure[] | null, fontRuntime?: {
535
535
  fontContext?: FontMeasureContext;
536
536
  previousFontSignature?: string;
537
+ fontCapabilities?: FontMeasureCapabilities;
537
538
  }, warmStart?: {
538
539
  footnoteReserveSeed?: FootnoteReserveSeed | null;
539
540
  /** Host proved the authoritative note projection bundle was retained exactly. */
540
541
  noteMeasurePlaneRetainedExact?: true;
542
+ /** Host proved this seed is an exact, geometry-equivalent subset of the current note plane. */
543
+ noteMeasurePlaneRetainedSubset?: true;
541
544
  /** Extra note/decorative planes paired with the retained note bundle. */
542
545
  retainedFootnoteExtras?: {
543
546
  blocks: FlowBlock[];
@@ -0,0 +1,3 @@
1
+ import { TextRun } from '../../contracts/src/index.js';
2
+ import { FontMeasureCapabilities } from '../../../shared/font-system/src/index.js';
3
+ export declare function noteMarkerMeasureKey(run: TextRun, capabilities?: FontMeasureCapabilities): string;
@@ -1,4 +1,5 @@
1
1
  import { ParagraphBlock, ParagraphMeasure, ParagraphLineRegion } from '../../contracts/src/index.js';
2
+ import { FontMeasureContext } from '../../../shared/font-system/src/index.js';
2
3
  /** Drop cached text widths and the canvas context. Call when registered font faces may have changed. */
3
4
  export declare function clearRemeasureTextCaches(): void;
4
5
  /**
@@ -72,4 +73,4 @@ export declare function clearRemeasureTextCaches(): void;
72
73
  * // First line has only 170px available (200 - 30), subsequent lines have full 200px
73
74
  * ```
74
75
  */
75
- export declare function remeasureParagraph(block: ParagraphBlock, maxWidth: number, firstLineIndent?: number, lineRegions?: readonly (readonly ParagraphLineRegion[])[]): ParagraphMeasure;
76
+ export declare function remeasureParagraph(block: ParagraphBlock, maxWidth: number, firstLineIndent?: number, lineRegions?: readonly (readonly ParagraphLineRegion[])[], fontContext?: FontMeasureContext): ParagraphMeasure;
@@ -157,16 +157,45 @@ function useSuperDocToolbar() {
157
157
  copyFormatActive: false
158
158
  });
159
159
  }
160
- /** Subscribe to a single command's enable/active state. */
160
+ var EMPTY_COMMAND_STATE = {
161
+ enabled: false,
162
+ active: false,
163
+ supported: false
164
+ };
165
+ /** Subscribe to and execute one SuperDoc command. */
161
166
  function useSuperDocCommand(id) {
162
- return useSuperDocSlice((ui) => ({
163
- getSnapshot: () => ui.commands.get(id).getState(),
164
- observe: (cb) => ui.commands.get(id).observe(cb)
165
- }), {
166
- enabled: false,
167
- active: false,
168
- supported: false
169
- });
167
+ const ui = useSuperDocUI();
168
+ const [observed, setObserved] = (0, react.useState)(() => ({
169
+ id,
170
+ ui,
171
+ state: ui ? ui.commands.get(id).getState() : EMPTY_COMMAND_STATE
172
+ }));
173
+ (0, react.useEffect)(() => {
174
+ if (!ui) {
175
+ setObserved({
176
+ id,
177
+ ui,
178
+ state: EMPTY_COMMAND_STATE
179
+ });
180
+ return;
181
+ }
182
+ const command = ui.commands.get(id);
183
+ const publish = (state) => setObserved({
184
+ id,
185
+ ui,
186
+ state
187
+ });
188
+ publish(command.getState());
189
+ return command.observe(publish);
190
+ }, [id, ui]);
191
+ const state = observed.id === id && observed.ui === ui ? observed.state : ui ? ui.commands.get(id).getState() : EMPTY_COMMAND_STATE;
192
+ const execute = (0, react.useCallback)((payload) => ui ? ui.commands.execute(id, payload) : false, [id, ui]);
193
+ const executeAsync = (0, react.useCallback)((payload) => ui ? ui.commands.executeAsync(id, payload) : Promise.resolve(false), [id, ui]);
194
+ return {
195
+ ...state,
196
+ execute,
197
+ executeAsync
198
+ };
170
199
  }
171
200
  /** Subscribe to the document slice. */
172
201
  function useSuperDocDocument() {
@@ -156,16 +156,45 @@ function useSuperDocToolbar() {
156
156
  copyFormatActive: false
157
157
  });
158
158
  }
159
- /** Subscribe to a single command's enable/active state. */
159
+ var EMPTY_COMMAND_STATE = {
160
+ enabled: false,
161
+ active: false,
162
+ supported: false
163
+ };
164
+ /** Subscribe to and execute one SuperDoc command. */
160
165
  function useSuperDocCommand(id) {
161
- return useSuperDocSlice((ui) => ({
162
- getSnapshot: () => ui.commands.get(id).getState(),
163
- observe: (cb) => ui.commands.get(id).observe(cb)
164
- }), {
165
- enabled: false,
166
- active: false,
167
- supported: false
168
- });
166
+ const ui = useSuperDocUI();
167
+ const [observed, setObserved] = useState(() => ({
168
+ id,
169
+ ui,
170
+ state: ui ? ui.commands.get(id).getState() : EMPTY_COMMAND_STATE
171
+ }));
172
+ useEffect(() => {
173
+ if (!ui) {
174
+ setObserved({
175
+ id,
176
+ ui,
177
+ state: EMPTY_COMMAND_STATE
178
+ });
179
+ return;
180
+ }
181
+ const command = ui.commands.get(id);
182
+ const publish = (state) => setObserved({
183
+ id,
184
+ ui,
185
+ state
186
+ });
187
+ publish(command.getState());
188
+ return command.observe(publish);
189
+ }, [id, ui]);
190
+ const state = observed.id === id && observed.ui === ui ? observed.state : ui ? ui.commands.get(id).getState() : EMPTY_COMMAND_STATE;
191
+ const execute = useCallback((payload) => ui ? ui.commands.execute(id, payload) : false, [id, ui]);
192
+ const executeAsync = useCallback((payload) => ui ? ui.commands.executeAsync(id, payload) : Promise.resolve(false), [id, ui]);
193
+ return {
194
+ ...state,
195
+ execute,
196
+ executeAsync
197
+ };
169
198
  }
170
199
  /** Subscribe to the document slice. */
171
200
  function useSuperDocDocument() {
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export type { FontLoadStatus, FontFaceSource, FontFaceDescriptor, RegisteredFace, RegisterFaceResult, FontLoadResult, FontLoadSummary, FontFaceRequest, FontFaceLoadResult, FontAssetUrlContext, FontAssetUrlResolver, RequiredFace, } from './types.js';
17
17
  export { SETTLED_STATUSES, isSettled } from './types.js';
18
- export type { FontResolution, FontResolutionReason, FaceKey, HasFace, FontMeasureContext, ResolvePhysicalFamily, } from './resolver.js';
18
+ export type { FontResolution, FontResolutionReason, FaceKey, HasFace, FontMeasureCapabilities, FontMeasureContext, FontMeasureFace, ResolvePhysicalFamily, ResolveNaturalLineMultiplier, } from './resolver.js';
19
19
  export { FontResolver, createFontResolver, insertFontFamilyBeforeGeneric } from './resolver.js';
20
20
  export { resolveFontFamily, resolvePhysicalFamily, resolvePrimaryPhysicalFamily, resolvePhysicalFamilies, resolveFace, DEFAULT_FONT_MEASURE_CONTEXT, } from './resolver.js';
21
21
  export { getFontConfigVersion, bumpFontConfigVersion, __resetFontConfigVersion } from './epoch.js';
@@ -26,6 +26,8 @@ export type { FontResolutionRecord, ResolvedFontEvidence, UsedFace } from './rep
26
26
  export { buildFontReport, buildFaceReport } from './report.js';
27
27
  export type { EmbeddingPolicy } from './os2.js';
28
28
  export { parseEmbeddingPolicy } from './os2.js';
29
+ export type { SfntNaturalLineMetrics } from './natural-line-metrics.js';
30
+ export { parseSfntNaturalLineMetrics } from './natural-line-metrics.js';
29
31
  export type { UnicodeCoverage, UnicodeRange } from './unicode-coverage.js';
30
32
  export { parseUnicodeCoverage, textForUnicodeCoverage, unicodeCoverageIncludes } from './unicode-coverage.js';
31
33
  export { CORE_SYMBOL_FALLBACK_COVERAGE, CORE_SYMBOL_FALLBACK_FAMILY, installCoreSymbolFallback, textForCoreSymbolFallback, } from './core-symbol-fallback.js';
@@ -0,0 +1,11 @@
1
+ export interface SfntNaturalLineMetrics {
2
+ unitsPerEm: number;
3
+ lineHeightUnits: number;
4
+ lineHeightMultiplier: number;
5
+ source: 'os2-typo' | 'legacy-win-hhea';
6
+ }
7
+ /**
8
+ * Read a static SFNT face's design-unit baseline pitch without consulting browser font state.
9
+ * Variable fonts fail closed until their MVAR/axis instance can be applied to these metrics.
10
+ */
11
+ export declare function parseSfntNaturalLineMetrics(bytes: ArrayBuffer | ArrayBufferView): SfntNaturalLineMetrics | null;
@@ -190,6 +190,8 @@ export declare function resolveFace(logicalFamily: string, face: FaceKey, hasFac
190
190
  * never mapped onto a Bold/Italic run it cannot render unless the evidence explicitly allows it.
191
191
  */
192
192
  export type ResolvePhysicalFamily = (cssFontFamily: string, face: FaceKey) => string;
193
+ /** Resolve a loaded physical face's deterministic baseline-pitch ratio for the given run text. */
194
+ export type ResolveNaturalLineMultiplier = (cssFontFamily: string, face: FaceKey, text: string) => number | undefined;
193
195
  /**
194
196
  * The per-document font identity that every measure and paint path needs, carried as ONE value so
195
197
  * the resolver and its signature cannot travel separately and drift:
@@ -207,8 +209,20 @@ export type ResolvePhysicalFamily = (cssFontFamily: string, face: FaceKey) => st
207
209
  */
208
210
  export interface FontMeasureContext {
209
211
  resolvePhysical: ResolvePhysicalFamily;
212
+ resolveNaturalLineMultiplier?: ResolveNaturalLineMultiplier;
210
213
  fontSignature: string;
211
214
  }
215
+ /** Font face inputs whose measured digit advances can affect layout reuse. */
216
+ export interface FontMeasureFace {
217
+ family: string;
218
+ sizePx: number;
219
+ weight: FaceKey['weight'];
220
+ style: FaceKey['style'];
221
+ }
222
+ /** Immutable, invocation-scoped facts established by the active measurement surface. */
223
+ export interface FontMeasureCapabilities {
224
+ hasTabularDigits(face: FontMeasureFace): boolean;
225
+ }
212
226
  /**
213
227
  * The global-resolver / empty-signature context. The behavior-preserving default for outer entry
214
228
  * points and non-document callers (tests, the global measure path). Frozen so a stray
package/dist/style.css CHANGED
@@ -1818,11 +1818,11 @@ img[data-v-c95b2073] {
1818
1818
  pointer-events: auto;
1819
1819
  }
1820
1820
 
1821
- .superdoc[data-v-01062725] {
1821
+ .superdoc[data-v-770204b4] {
1822
1822
  display: flex;
1823
1823
  position: relative;
1824
1824
  }
1825
- .sd-visually-hidden[data-v-01062725] {
1825
+ .sd-visually-hidden[data-v-770204b4] {
1826
1826
  position: absolute;
1827
1827
  width: 1px;
1828
1828
  height: 1px;
@@ -1833,14 +1833,14 @@ img[data-v-c95b2073] {
1833
1833
  white-space: nowrap;
1834
1834
  border: 0;
1835
1835
  }
1836
- .superdoc__mutation-status[data-v-01062725] {
1836
+ .superdoc__mutation-status[data-v-770204b4] {
1837
1837
  position: sticky;
1838
1838
  z-index: 10;
1839
1839
  top: 12px;
1840
1840
  height: 0;
1841
1841
  pointer-events: none;
1842
1842
  }
1843
- .superdoc__edit-rejected-status[data-v-01062725] {
1843
+ .superdoc__edit-rejected-status[data-v-770204b4] {
1844
1844
  position: absolute;
1845
1845
  top: 0;
1846
1846
  left: 50%;
@@ -1858,30 +1858,30 @@ img[data-v-c95b2073] {
1858
1858
  line-height: 20px;
1859
1859
  pointer-events: none;
1860
1860
  }
1861
- .right-sidebar[data-v-01062725] {
1861
+ .right-sidebar[data-v-770204b4] {
1862
1862
  min-width: 320px;
1863
1863
  height: 100%;
1864
1864
  }
1865
- .floating-comments[data-v-01062725] {
1865
+ .floating-comments[data-v-770204b4] {
1866
1866
  min-width: 300px;
1867
1867
  width: 300px;
1868
1868
  height: 100%;
1869
1869
  overflow: visible;
1870
1870
  }
1871
- .superdoc__layers[data-v-01062725] {
1871
+ .superdoc__layers[data-v-770204b4] {
1872
1872
  height: 100%;
1873
1873
  position: relative;
1874
1874
  box-sizing: border-box;
1875
1875
  }
1876
- .superdoc__document[data-v-01062725] {
1876
+ .superdoc__document[data-v-770204b4] {
1877
1877
  width: 100%;
1878
1878
  position: relative;
1879
1879
  }
1880
- .superdoc__sub-document[data-v-01062725] {
1880
+ .superdoc__sub-document[data-v-770204b4] {
1881
1881
  width: 100%;
1882
1882
  position: relative;
1883
1883
  }
1884
- .superdoc__selection-layer[data-v-01062725] {
1884
+ .superdoc__selection-layer[data-v-770204b4] {
1885
1885
  position: absolute;
1886
1886
  min-width: 100%;
1887
1887
  min-height: 100%;
@@ -1892,13 +1892,13 @@ img[data-v-c95b2073] {
1892
1892
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
1893
1893
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
1894
1894
  clickable, and below the selection layer (z-index 10). */
1895
- .superdoc__whiteboard-layer[data-v-01062725] {
1895
+ .superdoc__whiteboard-layer[data-v-770204b4] {
1896
1896
  z-index: 4;
1897
1897
  }
1898
- .superdoc__temp-selection[data-v-01062725] {
1898
+ .superdoc__temp-selection[data-v-770204b4] {
1899
1899
  position: absolute;
1900
1900
  }
1901
- .superdoc__right-sidebar[data-v-01062725] {
1901
+ .superdoc__right-sidebar[data-v-770204b4] {
1902
1902
  width: 320px;
1903
1903
  min-width: 320px;
1904
1904
  padding: 0 10px;
@@ -1906,7 +1906,7 @@ img[data-v-c95b2073] {
1906
1906
  position: relative;
1907
1907
  z-index: 2;
1908
1908
  }
1909
- .superdoc__compact-comment-popover[data-v-01062725] {
1909
+ .superdoc__compact-comment-popover[data-v-770204b4] {
1910
1910
  position: absolute;
1911
1911
  top: 12px;
1912
1912
  right: 12px;
@@ -1915,14 +1915,14 @@ img[data-v-c95b2073] {
1915
1915
  }
1916
1916
 
1917
1917
  /* Tools styles */
1918
- .tools[data-v-01062725] {
1918
+ .tools[data-v-770204b4] {
1919
1919
  position: absolute;
1920
1920
  z-index: 3;
1921
1921
  display: flex;
1922
1922
  flex-direction: column;
1923
1923
  gap: var(--sd-ui-tools-gap, 6px);
1924
1924
  }
1925
- .tools-item[data-v-01062725] {
1925
+ .tools-item[data-v-770204b4] {
1926
1926
  display: flex;
1927
1927
  align-items: center;
1928
1928
  justify-content: center;
@@ -1933,10 +1933,10 @@ img[data-v-c95b2073] {
1933
1933
  cursor: pointer;
1934
1934
  position: relative;
1935
1935
  }
1936
- .tools-item i[data-v-01062725] {
1936
+ .tools-item i[data-v-770204b4] {
1937
1937
  cursor: pointer;
1938
1938
  }
1939
- .superdoc__tools-icon[data-v-01062725] {
1939
+ .superdoc__tools-icon[data-v-770204b4] {
1940
1940
  width: var(--sd-ui-tools-icon-size, 20px);
1941
1941
  height: var(--sd-ui-tools-icon-size, 20px);
1942
1942
  flex-shrink: 0;
@@ -1951,22 +1951,22 @@ img[data-v-c95b2073] {
1951
1951
 
1952
1952
  /* 834px is iPad screen size in portrait orientation */
1953
1953
  @media (max-width: 834px) {
1954
- .superdoc .superdoc__layers[data-v-01062725] {
1954
+ .superdoc .superdoc__layers[data-v-770204b4] {
1955
1955
  margin: 0;
1956
1956
  border: 0 !important;
1957
1957
  box-shadow: none;
1958
1958
  }
1959
- .superdoc__sub-document[data-v-01062725] {
1959
+ .superdoc__sub-document[data-v-770204b4] {
1960
1960
  max-width: 100%;
1961
1961
  }
1962
- .superdoc__right-sidebar[data-v-01062725] {
1962
+ .superdoc__right-sidebar[data-v-770204b4] {
1963
1963
  padding: 10px;
1964
1964
  position: relative;
1965
1965
  }
1966
1966
  }
1967
1967
 
1968
1968
  /* AI Writer styles */
1969
- .ai-writer-container[data-v-01062725] {
1969
+ .ai-writer-container[data-v-770204b4] {
1970
1970
  position: fixed;
1971
1971
  z-index: 1000;
1972
1972
  background: white;
@@ -1982,10 +1982,10 @@ img[data-v-c95b2073] {
1982
1982
  transform: translateY(-50%);
1983
1983
  z-index: 50;
1984
1984
  } */
1985
- .ai-tool > svg[data-v-01062725] {
1985
+ .ai-tool > svg[data-v-770204b4] {
1986
1986
  fill: transparent;
1987
1987
  }
1988
- .ai-tool[data-v-01062725]::before {
1988
+ .ai-tool[data-v-770204b4]::before {
1989
1989
  content: '';
1990
1990
  position: absolute;
1991
1991
  width: 20px;
@@ -2006,7 +2006,7 @@ img[data-v-c95b2073] {
2006
2006
  filter: brightness(1.2);
2007
2007
  transition: filter 0.2s ease;
2008
2008
  }
2009
- .ai-tool[data-v-01062725]:hover::before {
2009
+ .ai-tool[data-v-770204b4]:hover::before {
2010
2010
  filter: brightness(1.3);
2011
2011
  }
2012
2012
 
@@ -1818,11 +1818,11 @@ img[data-v-c95b2073] {
1818
1818
  pointer-events: auto;
1819
1819
  }
1820
1820
 
1821
- .superdoc[data-v-01062725] {
1821
+ .superdoc[data-v-770204b4] {
1822
1822
  display: flex;
1823
1823
  position: relative;
1824
1824
  }
1825
- .sd-visually-hidden[data-v-01062725] {
1825
+ .sd-visually-hidden[data-v-770204b4] {
1826
1826
  position: absolute;
1827
1827
  width: 1px;
1828
1828
  height: 1px;
@@ -1833,14 +1833,14 @@ img[data-v-c95b2073] {
1833
1833
  white-space: nowrap;
1834
1834
  border: 0;
1835
1835
  }
1836
- .superdoc__mutation-status[data-v-01062725] {
1836
+ .superdoc__mutation-status[data-v-770204b4] {
1837
1837
  position: sticky;
1838
1838
  z-index: 10;
1839
1839
  top: 12px;
1840
1840
  height: 0;
1841
1841
  pointer-events: none;
1842
1842
  }
1843
- .superdoc__edit-rejected-status[data-v-01062725] {
1843
+ .superdoc__edit-rejected-status[data-v-770204b4] {
1844
1844
  position: absolute;
1845
1845
  top: 0;
1846
1846
  left: 50%;
@@ -1858,30 +1858,30 @@ img[data-v-c95b2073] {
1858
1858
  line-height: 20px;
1859
1859
  pointer-events: none;
1860
1860
  }
1861
- .right-sidebar[data-v-01062725] {
1861
+ .right-sidebar[data-v-770204b4] {
1862
1862
  min-width: 320px;
1863
1863
  height: 100%;
1864
1864
  }
1865
- .floating-comments[data-v-01062725] {
1865
+ .floating-comments[data-v-770204b4] {
1866
1866
  min-width: 300px;
1867
1867
  width: 300px;
1868
1868
  height: 100%;
1869
1869
  overflow: visible;
1870
1870
  }
1871
- .superdoc__layers[data-v-01062725] {
1871
+ .superdoc__layers[data-v-770204b4] {
1872
1872
  height: 100%;
1873
1873
  position: relative;
1874
1874
  box-sizing: border-box;
1875
1875
  }
1876
- .superdoc__document[data-v-01062725] {
1876
+ .superdoc__document[data-v-770204b4] {
1877
1877
  width: 100%;
1878
1878
  position: relative;
1879
1879
  }
1880
- .superdoc__sub-document[data-v-01062725] {
1880
+ .superdoc__sub-document[data-v-770204b4] {
1881
1881
  width: 100%;
1882
1882
  position: relative;
1883
1883
  }
1884
- .superdoc__selection-layer[data-v-01062725] {
1884
+ .superdoc__selection-layer[data-v-770204b4] {
1885
1885
  position: absolute;
1886
1886
  min-width: 100%;
1887
1887
  min-height: 100%;
@@ -1892,13 +1892,13 @@ img[data-v-c95b2073] {
1892
1892
  /* SD-3497: PDF whiteboard overlay sits above the rendered PDF canvas but below
1893
1893
  the PDF comment anchors (z-index 6 in PdfCommentsLayer) so anchors stay
1894
1894
  clickable, and below the selection layer (z-index 10). */
1895
- .superdoc__whiteboard-layer[data-v-01062725] {
1895
+ .superdoc__whiteboard-layer[data-v-770204b4] {
1896
1896
  z-index: 4;
1897
1897
  }
1898
- .superdoc__temp-selection[data-v-01062725] {
1898
+ .superdoc__temp-selection[data-v-770204b4] {
1899
1899
  position: absolute;
1900
1900
  }
1901
- .superdoc__right-sidebar[data-v-01062725] {
1901
+ .superdoc__right-sidebar[data-v-770204b4] {
1902
1902
  width: 320px;
1903
1903
  min-width: 320px;
1904
1904
  padding: 0 10px;
@@ -1906,7 +1906,7 @@ img[data-v-c95b2073] {
1906
1906
  position: relative;
1907
1907
  z-index: 2;
1908
1908
  }
1909
- .superdoc__compact-comment-popover[data-v-01062725] {
1909
+ .superdoc__compact-comment-popover[data-v-770204b4] {
1910
1910
  position: absolute;
1911
1911
  top: 12px;
1912
1912
  right: 12px;
@@ -1915,14 +1915,14 @@ img[data-v-c95b2073] {
1915
1915
  }
1916
1916
 
1917
1917
  /* Tools styles */
1918
- .tools[data-v-01062725] {
1918
+ .tools[data-v-770204b4] {
1919
1919
  position: absolute;
1920
1920
  z-index: 3;
1921
1921
  display: flex;
1922
1922
  flex-direction: column;
1923
1923
  gap: var(--sd-ui-tools-gap, 6px);
1924
1924
  }
1925
- .tools-item[data-v-01062725] {
1925
+ .tools-item[data-v-770204b4] {
1926
1926
  display: flex;
1927
1927
  align-items: center;
1928
1928
  justify-content: center;
@@ -1933,10 +1933,10 @@ img[data-v-c95b2073] {
1933
1933
  cursor: pointer;
1934
1934
  position: relative;
1935
1935
  }
1936
- .tools-item i[data-v-01062725] {
1936
+ .tools-item i[data-v-770204b4] {
1937
1937
  cursor: pointer;
1938
1938
  }
1939
- .superdoc__tools-icon[data-v-01062725] {
1939
+ .superdoc__tools-icon[data-v-770204b4] {
1940
1940
  width: var(--sd-ui-tools-icon-size, 20px);
1941
1941
  height: var(--sd-ui-tools-icon-size, 20px);
1942
1942
  flex-shrink: 0;
@@ -1951,22 +1951,22 @@ img[data-v-c95b2073] {
1951
1951
 
1952
1952
  /* 834px is iPad screen size in portrait orientation */
1953
1953
  @media (max-width: 834px) {
1954
- .superdoc .superdoc__layers[data-v-01062725] {
1954
+ .superdoc .superdoc__layers[data-v-770204b4] {
1955
1955
  margin: 0;
1956
1956
  border: 0 !important;
1957
1957
  box-shadow: none;
1958
1958
  }
1959
- .superdoc__sub-document[data-v-01062725] {
1959
+ .superdoc__sub-document[data-v-770204b4] {
1960
1960
  max-width: 100%;
1961
1961
  }
1962
- .superdoc__right-sidebar[data-v-01062725] {
1962
+ .superdoc__right-sidebar[data-v-770204b4] {
1963
1963
  padding: 10px;
1964
1964
  position: relative;
1965
1965
  }
1966
1966
  }
1967
1967
 
1968
1968
  /* AI Writer styles */
1969
- .ai-writer-container[data-v-01062725] {
1969
+ .ai-writer-container[data-v-770204b4] {
1970
1970
  position: fixed;
1971
1971
  z-index: 1000;
1972
1972
  background: white;
@@ -1982,10 +1982,10 @@ img[data-v-c95b2073] {
1982
1982
  transform: translateY(-50%);
1983
1983
  z-index: 50;
1984
1984
  } */
1985
- .ai-tool > svg[data-v-01062725] {
1985
+ .ai-tool > svg[data-v-770204b4] {
1986
1986
  fill: transparent;
1987
1987
  }
1988
- .ai-tool[data-v-01062725]::before {
1988
+ .ai-tool[data-v-770204b4]::before {
1989
1989
  content: '';
1990
1990
  position: absolute;
1991
1991
  width: 20px;
@@ -2006,7 +2006,7 @@ img[data-v-c95b2073] {
2006
2006
  filter: brightness(1.2);
2007
2007
  transition: filter 0.2s ease;
2008
2008
  }
2009
- .ai-tool[data-v-01062725]:hover::before {
2009
+ .ai-tool[data-v-770204b4]:hover::before {
2010
2010
  filter: brightness(1.3);
2011
2011
  }
2012
2012
 
@@ -3213,11 +3213,26 @@ export interface SuperDocExceptionRestorePayload {
3213
3213
  * re-emit path forwards `originalException?.editor ?? null`, so
3214
3214
  * consumers may receive `null` (not just `undefined`).
3215
3215
  */
3216
+ export interface SuperDocWorkerFailureDetail {
3217
+ phase: string;
3218
+ reason: string;
3219
+ beforeHello: boolean;
3220
+ message: string;
3221
+ elapsedMs?: number;
3222
+ errorName?: string;
3223
+ errorMessage?: string;
3224
+ errorStack?: string;
3225
+ filename?: string;
3226
+ lineno?: number;
3227
+ colno?: number;
3228
+ }
3216
3229
  export interface SuperDocExceptionEditorPayload {
3217
3230
  error: unknown;
3218
3231
  editor?: Editor | null;
3219
3232
  code?: string;
3220
3233
  documentId?: string | null;
3234
+ /** Structured browser-worker failure detail when editor startup failed in its worker transport. */
3235
+ workerFailure?: SuperDocWorkerFailureDetail;
3221
3236
  }
3222
3237
  /**
3223
3238
  * Exception payload raised by the built-in toolbar.