superdoc 2.12.0-next.5 → 2.12.0-next.7

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.
@@ -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.5",
22
+ superdocVersion: "2.12.0-next.7",
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.5",
21
+ superdocVersion: "2.12.0-next.7",
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,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, FontMeasureContext, 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,6 +209,7 @@ 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
  }
212
215
  /**
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { toSliceSource, SliceSource } from './slice-source.js';
3
- import { BorrowedSuperDocUI, CommandState, CommentsSlice, ContentControlsSlice, DocumentSlice, FontFamilyOption, FontSizeOption, SelectionSlice, Subscribable, SuperDocLike, ToolbarSnapshotSlice, TrackChangesSlice, ZoomSlice } from './types.js';
3
+ import { BorrowedSuperDocUI, CommandExecutionResult, CommandId, CommandState, CommentsSlice, ContentControlsSlice, DocumentSlice, FontFamilyOption, FontSizeOption, SelectionSlice, Subscribable, SuperDocLike, ToolbarSnapshotSlice, TrackChangesSlice, ZoomSlice } from './types.js';
4
4
  /** The raw SuperDoc instance (or host stub) handed to the provider. */
5
5
  export type SuperDocHost = SuperDocLike;
6
6
  /** Props accepted by {@link SuperDocUIProvider}. */
@@ -50,8 +50,15 @@ export declare function useSuperDocContentControls(): ContentControlsSlice;
50
50
  export declare function useSuperDocTrackChanges(): TrackChangesSlice;
51
51
  /** Subscribe to the toolbar snapshot slice. */
52
52
  export declare function useSuperDocToolbar(): ToolbarSnapshotSlice;
53
- /** Subscribe to a single command's enable/active state. */
54
- export declare function useSuperDocCommand(id: string): CommandState;
53
+ /** Reactive state and execution methods for one SuperDoc command. */
54
+ export interface UseSuperDocCommandResult extends CommandState {
55
+ /** Run the command against the currently bound Editor. */
56
+ execute(payload?: unknown): CommandExecutionResult;
57
+ /** Run the command and await the routed operation's settled result. */
58
+ executeAsync(payload?: unknown): Promise<CommandExecutionResult>;
59
+ }
60
+ /** Subscribe to and execute one SuperDoc command. */
61
+ export declare function useSuperDocCommand(id: CommandId): UseSuperDocCommandResult;
55
62
  /** Subscribe to the document slice. */
56
63
  export declare function useSuperDocDocument(): DocumentSlice;
57
64
  /** Subscribe to available font-family options. */
@@ -184,6 +184,10 @@ export interface CommandState {
184
184
  */
185
185
  reason?: SuperDocUIReason;
186
186
  }
187
+ /** A built-in command id, or an application id registered through `ui.commands.register()`. */
188
+ export type CommandId = BuiltInCommandId | (string & {});
189
+ /** Command id accepted by toolbar APIs. Equivalent to {@link CommandId}. */
190
+ export type ToolbarCommandId = CommandId;
187
191
  /**
188
192
  * Failure code carried by a receipt that the UI controller mints itself
189
193
  * (rather than relaying from the Document API). Extends the Document API's
@@ -317,7 +321,7 @@ export type SelectionRestoreResult = {
317
321
  * Document API / SuperDoc instance; `getState` reflects the live enable/active
318
322
  * snapshot; `observe` notifies on state change.
319
323
  */
320
- export interface CommandHandle<Id extends string = string> {
324
+ export interface CommandHandle<Id extends CommandId = CommandId> {
321
325
  /** The command id this handle wraps. */
322
326
  readonly id: Id;
323
327
  /** Current enable/active state. */
@@ -437,9 +441,9 @@ export interface CustomCommandContext<TPayload = unknown> {
437
441
  */
438
442
  ui: BorrowedSuperDocUI;
439
443
  /** Run a catalog command id through the shared controller. */
440
- execute(id: string, payload?: unknown): CommandExecutionResult;
444
+ execute(id: CommandId, payload?: unknown): CommandExecutionResult;
441
445
  /** Run a catalog command id and await its settled result. */
442
- executeAsync(id: string, payload?: unknown): Promise<CommandExecutionResult>;
446
+ executeAsync(id: CommandId, payload?: unknown): Promise<CommandExecutionResult>;
443
447
  /**
444
448
  * The host's browser Document API facade (read-only-guarded, async-capable),
445
449
  * or `null` when unavailable.
@@ -469,7 +473,7 @@ export interface CustomCommandContext<TPayload = unknown> {
469
473
  }
470
474
  export interface CustomCommandRegistration<TPayload = unknown, TValue = unknown> {
471
475
  /** Unique command id. */
472
- id: string;
476
+ id: CommandId;
473
477
  /** Implementation invoked when the command runs. */
474
478
  execute(context: CustomCommandContext<TPayload>): unknown;
475
479
  /** Optional live-state provider. */
@@ -484,7 +488,7 @@ export interface CustomCommandRegistration<TPayload = unknown, TValue = unknown>
484
488
  when?(context: ViewportContext): boolean;
485
489
  };
486
490
  }
487
- export interface CustomCommandHandle<TPayload = unknown, TValue = unknown> extends Omit<CommandHandle<string>, 'execute' | 'executeAsync' | 'getState' | 'observe'> {
491
+ export interface CustomCommandHandle<TPayload = unknown, TValue = unknown> extends Omit<CommandHandle<CommandId>, 'execute' | 'executeAsync' | 'getState' | 'observe'> {
488
492
  /** Current custom-command state. */
489
493
  getState(): CustomCommandHandleState<TValue>;
490
494
  /** Subscribe to custom-command state changes; returns an unsubscribe function. */
@@ -501,15 +505,15 @@ export type CustomCommandRegistrationResult<TPayload = unknown, TValue = unknown
501
505
  /** Aggregate command surface. */
502
506
  export interface CommandsHandle {
503
507
  /** All known command ids (built-in plus registered). */
504
- readonly ids: readonly string[];
508
+ readonly ids: readonly CommandId[];
505
509
  /** Whether a command id is known to the controller. */
506
- has(id: string): boolean;
510
+ has(id: CommandId): boolean;
507
511
  /** Resolve a handle for a command id. */
508
- get<Id extends string = string>(id: Id): CommandHandle<Id>;
512
+ get<Id extends CommandId = CommandId>(id: Id): CommandHandle<Id>;
509
513
  /** Execute a command by id. */
510
- execute(id: string, payload?: unknown): CommandExecutionResult;
514
+ execute(id: CommandId, payload?: unknown): CommandExecutionResult;
511
515
  /** Execute a command by id and resolve once the routed work has settled. */
512
- executeAsync(id: string, payload?: unknown): Promise<CommandExecutionResult>;
516
+ executeAsync(id: CommandId, payload?: unknown): Promise<CommandExecutionResult>;
513
517
  /** Register a consumer-defined command; returns an unregister function. */
514
518
  register<TPayload = unknown, TValue = unknown>(registration: CustomCommandRegistration<TPayload, TValue>): CustomCommandRegistrationResult<TPayload, TValue>;
515
519
  /** Resolve context-menu contributions for a viewport context. */
@@ -1081,8 +1085,6 @@ export interface FontsHandle extends SnapshotSubscribable<FontsSlice> {
1081
1085
  /** Available font size options. */
1082
1086
  getSizeOptions(): readonly FontSizeOption[];
1083
1087
  }
1084
- /** A built-in command id, or an id registered through `ui.commands.register()`. */
1085
- export type ToolbarCommandId = BuiltInCommandId | (string & {});
1086
1088
  /** Toolbar handle. */
1087
1089
  export interface ToolbarHandle extends SnapshotSubscribable<ToolbarSnapshotSlice> {
1088
1090
  /** Read the current toolbar snapshot. */
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef, MaybeRefOrGetter, ShallowRef } from 'vue';
2
2
  import { SliceSource } from './slice-source.js';
3
- import { BorrowedSuperDocUI, CommandExecutionResult, CommandState, CommentsSlice, ContentControlsSlice, DocumentSlice, FontFamilyOption, FontSizeOption, SelectionSlice, Subscribable, SuperDocLike, ToolbarSnapshotSlice, TrackChangesSlice, ZoomSlice } from './types.js';
3
+ import { BorrowedSuperDocUI, CommandExecutionResult, CommandId, CommandState, CommentsSlice, ContentControlsSlice, DocumentSlice, FontFamilyOption, FontSizeOption, SelectionSlice, Subscribable, SuperDocLike, ToolbarSnapshotSlice, TrackChangesSlice, ZoomSlice } from './types.js';
4
4
  /** The raw SuperDoc instance (or host stub) handed to the provider. */
5
5
  export type SuperDocHost = SuperDocLike;
6
6
  /**
@@ -111,7 +111,7 @@ export interface UseSuperDocCommandResult {
111
111
  * Subscribe to and execute a single command. Accepts a plain id, a ref, or a
112
112
  * getter; a reactive id re-subscribes and routes execution to the new command.
113
113
  */
114
- export declare function useSuperDocCommand(id: MaybeRefOrGetter<string>): UseSuperDocCommandResult;
114
+ export declare function useSuperDocCommand(id: MaybeRefOrGetter<CommandId>): UseSuperDocCommandResult;
115
115
  /** Subscribe to the document slice. */
116
116
  export declare function useSuperDocDocument(): Readonly<ShallowRef<DocumentSlice>>;
117
117
  /** Subscribe to available font-family options. */
@@ -1,11 +1,13 @@
1
1
  // Generated by scripts/ensure-types.cjs. Do not edit by hand.
2
2
  import type { SuperDocHost as __Cjs_SuperDocHost } from './ui-react.js' with { "resolution-mode": "import" };
3
3
  import type { SuperDocUIProviderProps as __Cjs_SuperDocUIProviderProps } from './ui-react.js' with { "resolution-mode": "import" };
4
+ import type { UseSuperDocCommandResult as __Cjs_UseSuperDocCommandResult } from './ui-react.js' with { "resolution-mode": "import" };
4
5
  export type { __Cjs_SuperDocHost as SuperDocHost };
5
6
  export declare const SuperDocUIProvider: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).SuperDocUIProvider;
6
7
  export type { __Cjs_SuperDocUIProviderProps as SuperDocUIProviderProps };
7
8
  export declare const useSetSuperDoc: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).useSetSuperDoc;
8
9
  export declare const useSuperDocCommand: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).useSuperDocCommand;
10
+ export type { __Cjs_UseSuperDocCommandResult as UseSuperDocCommandResult };
9
11
  export declare const useSuperDocComments: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).useSuperDocComments;
10
12
  export declare const useSuperDocContentControls: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).useSuperDocContentControls;
11
13
  export declare const useSuperDocDocument: typeof import('./ui-react.js', { with: { "resolution-mode": "import" } }).useSuperDocDocument;
@@ -17,4 +17,4 @@
17
17
  * the emitted declarations expose exactly these named exports.
18
18
  */
19
19
  export { SuperDocUIProvider, useSuperDocUI, useSuperDocHost, useSetSuperDoc, useSuperDocSlice, useSuperDocSelection, useSuperDocComments, useSuperDocContentControls, useSuperDocTrackChanges, useSuperDocToolbar, useSuperDocCommand, useSuperDocDocument, useSuperDocFontOptions, useSuperDocFontSizeOptions, useSuperDocZoom, } from './ui/react.js';
20
- export type { SuperDocHost, SuperDocUIProviderProps } from './ui/react.js';
20
+ export type { SuperDocHost, SuperDocUIProviderProps, UseSuperDocCommandResult } from './ui/react.js';
@@ -5,6 +5,7 @@ import type { BrowserDocumentApi as __Cjs_BrowserDocumentApi } from './ui.js' wi
5
5
  import type { BuiltInCommandId as __Cjs_BuiltInCommandId } from './ui.js' with { "resolution-mode": "import" };
6
6
  import type { CommandExecutionResult as __Cjs_CommandExecutionResult } from './ui.js' with { "resolution-mode": "import" };
7
7
  import type { CommandHandle as __Cjs_CommandHandle } from './ui.js' with { "resolution-mode": "import" };
8
+ import type { CommandId as __Cjs_CommandId } from './ui.js' with { "resolution-mode": "import" };
8
9
  import type { CommandsHandle as __Cjs_CommandsHandle } from './ui.js' with { "resolution-mode": "import" };
9
10
  import type { CommandState as __Cjs_CommandState } from './ui.js' with { "resolution-mode": "import" };
10
11
  import type { CommentAddress as __Cjs_CommentAddress } from './ui.js' with { "resolution-mode": "import" };
@@ -111,6 +112,7 @@ export declare const BUILT_IN_COMMAND_IDS: typeof import('./ui.js', { with: { "r
111
112
  export type { __Cjs_BuiltInCommandId as BuiltInCommandId };
112
113
  export type { __Cjs_CommandExecutionResult as CommandExecutionResult };
113
114
  export type { __Cjs_CommandHandle as CommandHandle };
115
+ export type { __Cjs_CommandId as CommandId };
114
116
  export type { __Cjs_CommandsHandle as CommandsHandle };
115
117
  export type { __Cjs_CommandState as CommandState };
116
118
  export type { __Cjs_CommentAddress as CommentAddress };
@@ -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, CommandsHandle, ContextMenuItem, ContextMenuHandle, SearchController, SearchHandle, SearchQueryOptions, CustomCommandContext, CustomCommandHandle, CustomCommandHandleState, CustomCommandRegistration, CustomCommandRegistrationResult, MetadataHandle, SelectionHandle, ToolbarHandle, BuiltInCommandId, ToolbarCommandId, CommentsHandle, TrackChangesHandle, ContentControlsHandle, ContentControlFocusResult, FontsHandle, ZoomHandle, DocumentHandle, 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, RichContentInsertInput, SDHtmlMarkdownSupportCheckResult, } 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, SearchController, SearchHandle, SearchQueryOptions, CustomCommandContext, CustomCommandHandle, CustomCommandHandleState, CustomCommandRegistration, CustomCommandRegistrationResult, MetadataHandle, SelectionHandle, ToolbarHandle, BuiltInCommandId, ToolbarCommandId, CommentsHandle, TrackChangesHandle, ContentControlsHandle, ContentControlFocusResult, FontsHandle, ZoomHandle, DocumentHandle, 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, RichContentInsertInput, SDHtmlMarkdownSupportCheckResult, } from './ui/types.js';
package/dist/superdoc.cjs CHANGED
@@ -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.12.0-next.5";
319
+ return "2.12.0-next.7";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -45213,7 +45213,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45213
45213
  this.config.colors = shuffleArray(this.config.colors);
45214
45214
  this.userColorMap = /* @__PURE__ */ new Map();
45215
45215
  this.colorIndex = 0;
45216
- this.version = "2.12.0-next.5";
45216
+ this.version = "2.12.0-next.7";
45217
45217
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45218
45218
  this.superdocId = config.superdocId || require_uuid.v4();
45219
45219
  this.colors = this.config.colors ?? [];
@@ -315,7 +315,7 @@ var shuffleArray = (array) => {
315
315
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
316
316
  function getSuperdocVersion() {
317
317
  try {
318
- return "2.12.0-next.5";
318
+ return "2.12.0-next.7";
319
319
  } catch {
320
320
  return "unknown";
321
321
  }
@@ -45144,7 +45144,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45144
45144
  this.config.colors = shuffleArray(this.config.colors);
45145
45145
  this.userColorMap = /* @__PURE__ */ new Map();
45146
45146
  this.colorIndex = 0;
45147
- this.version = "2.12.0-next.5";
45147
+ this.version = "2.12.0-next.7";
45148
45148
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45149
45149
  this.superdocId = config.superdocId || v4();
45150
45150
  this.colors = this.config.colors ?? [];