superdoc 2.6.0-next.2 → 2.6.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.6.0-next.2",
22
+ superdocVersion: "2.6.0-next.4",
23
23
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
24
24
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
25
25
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
18
18
  var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
19
19
  var ENGINE_INFO = Object.freeze({
20
20
  ...PRIVATE_ENGINE_INFO,
21
- superdocVersion: "2.6.0-next.2",
21
+ superdocVersion: "2.6.0-next.4",
22
22
  roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
23
23
  supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
24
24
  supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
@@ -59,11 +59,13 @@ export type MeasureCacheStats = {
59
59
  * Performance characteristics:
60
60
  * - get(): O(1) - Map lookup + delete + re-insert for LRU tracking
61
61
  * - set(): O(1) - eviction (delete first key) + insert
62
- * - invalidate(): O(n) - where n = number of keys matching blockId prefix
62
+ * - invalidate(): O(k) - where k = cached variants for the requested block IDs
63
63
  * - Memory: Bounded at 10K entries ~= 50-100MB
64
64
  */
65
65
  export declare class MeasureCache<T> {
66
66
  private cache;
67
+ private keysByBlockId;
68
+ private blockIdByKey;
67
69
  private stats;
68
70
  /**
69
71
  * Retrieve a cached measure for the given block and dimensions.
@@ -130,6 +132,7 @@ export declare class MeasureCache<T> {
130
132
  * Update size statistics
131
133
  */
132
134
  private updateSizeStats;
135
+ private deleteKey;
133
136
  /**
134
137
  * Composes a cache key from block properties and dimensions.
135
138
  * Validates and clamps dimensions to prevent memory exhaustion.
@@ -1,4 +1,4 @@
1
- import { NonFlowingPageRelativeAnchorDependencyProof, PageCheckpointDependencyClass, FlowBlock, Layout, Measure, HeaderFooterLayout, ColumnLayout } from '../../contracts/src/index.js';
1
+ import { NonFlowingPageRelativeAnchorDependencyProof, PageCheckpointDependencyClass, FlowBlock, Layout, LayoutBlockResumeCheckpoint, Measure, HeaderFooterLayout, ColumnLayout } from '../../contracts/src/index.js';
2
2
  import { 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';
@@ -353,6 +353,11 @@ export declare function incrementalLayout(previousBlocks: FlowBlock[], _previous
353
353
  measures: Measure[];
354
354
  };
355
355
  }, layoutReuse?: IncrementalLayoutReuseOptions, measureReuseProof?: IncrementalMeasureReuseProof, execution?: IncrementalLayoutExecutionControl): Promise<IncrementalLayoutResult>;
356
+ export declare function __test_only_splicedCheckpointStats(map: ReadonlyMap<string, LayoutBlockResumeCheckpoint> | undefined): {
357
+ pieceCount: number;
358
+ sourceCount: number;
359
+ maximumTransformTreeDepth: number;
360
+ } | null;
356
361
  /**
357
362
  * Normalizes a margin value, using a fallback for undefined or non-finite values.
358
363
  * Prevents NaN content sizes when margin properties are partially defined.
@@ -5,6 +5,7 @@ export type FootnoteAnchorIndexInput = {
5
5
  refs?: Array<{
6
6
  id: string;
7
7
  pos: number;
8
+ blockId?: string;
8
9
  }>;
9
10
  bodyHeightById?: Map<string, number>;
10
11
  firstLineHeightById?: Map<string, number>;
@@ -229,9 +229,14 @@ export type PaintSnapshot = {
229
229
  pages: PaintSnapshotPage[];
230
230
  entities: PaintSnapshotEntities;
231
231
  };
232
+ type PainterFragmentFailure = {
233
+ readonly blockId: string;
234
+ readonly code: 'painter-fragment-unavailable';
235
+ };
232
236
  type PersistentPagePainterTransaction = {
233
237
  commit(): void;
234
238
  rollback(): void;
239
+ readFragmentFailures(): readonly PainterFragmentFailure[];
235
240
  };
236
241
  /**
237
242
  * DOM-based document painter that renders layout fragments to HTML elements.
@@ -478,14 +483,6 @@ export declare class DomPainter {
478
483
  * @returns HTMLElement containing the rendered fragment or error placeholder
479
484
  */
480
485
  private renderParagraphFragment;
481
- /**
482
- * Creates an error placeholder element for failed fragment renders.
483
- * Prevents entire paint operation from failing due to single fragment error.
484
- *
485
- * @param blockId - The block ID that failed to render
486
- * @param error - The error that occurred
487
- * @returns HTMLElement showing the error
488
- */
489
486
  private createErrorPlaceholder;
490
487
  private renderImageFragment;
491
488
  /**
@@ -628,6 +625,7 @@ export declare class DomPainter {
628
625
  * Selects the wrapper's section-scoped identity and legacy PM attributes.
629
626
  */
630
627
  private updateFragmentElement;
628
+ private applyRenderDiagnosticFragmentFrame;
631
629
  /**
632
630
  * Applies fragment positioning, dimensions, and metadata to an HTML element.
633
631
  *