superdoc 2.17.0-next.1 → 2.17.0

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.17.0-next.1",
22
+ superdocVersion: "2.17.0",
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.17.0-next.1",
21
+ superdocVersion: "2.17.0",
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
@@ -42,6 +42,8 @@ export type AnchoredTableCollection = {
42
42
  */
43
43
  export declare function collectPreRegisteredAnchorsSteps(blocks: FlowBlock[], measures: Measure[], checkpointEveryBlocks?: number | null): Generator<LayoutWorkCheckpoint, AnchoredDrawing[], void>;
44
44
  export declare function collectPreRegisteredAnchors(blocks: FlowBlock[], measures: Measure[]): AnchoredDrawing[];
45
+ /** Collect page- or margin-relative floating tables before paragraph layout. */
46
+ export declare function collectPreRegisteredTablesSteps(blocks: FlowBlock[], measures: Measure[], checkpointEveryBlocks?: number | null): Generator<LayoutWorkCheckpoint, AnchoredTable[], void>;
45
47
  /**
46
48
  * Collect anchored drawings (images/drawings) mapped to their anchor paragraph index.
47
49
  * Map of paragraph block index -> anchored images/drawings associated with that paragraph.
@@ -11,11 +11,16 @@ export type FloatingTableAnchorResolution = {
11
11
  };
12
12
  /** Width ratio for inline (paginated) layout vs single float fragment. */
13
13
  export declare const ANCHORED_TABLE_FULL_WIDTH_RATIO = 0.99;
14
+ /**
15
+ * Word pins page-relative floating tables to the physical page instead of
16
+ * allowing a negative tblpY to clip the table above the page canvas.
17
+ */
18
+ export declare function clampPageRelativeFloatingTableY(block: TableBlock, y: number): number;
14
19
  /**
15
20
  * True when an anchored table should paginate inline instead of as one float fragment.
16
21
  * Uses tbl width, flow-affecting wrap distances from w:tblpPr, and table indent — not a fixed px fudge factor.
17
22
  */
18
- export declare function isAnchoredTableFullWidth(block: TableBlock, measure: TableMeasure, columnWidth: number): boolean;
23
+ export declare function isAnchoredTableFullWidth(block: TableBlock, measure: TableMeasure, columnWidth: number, pageHeight?: number): boolean;
19
24
  /**
20
25
  * Resolve anchor paragraph + vertical offset for a block-level floating table.
21
26
  */
@@ -39,6 +39,8 @@ export type LayoutOptions = {
39
39
  remeasureParagraph?: (block: ParagraphBlock, maxWidth: number, firstLineIndent?: number, lineRegions?: readonly (readonly ParagraphLineRegion[])[]) => ParagraphMeasure;
40
40
  /** @internal Positioned paragraph frames that render without advancing the story cursor. */
41
41
  nonFlowPositionedParagraphFrameIds?: ReadonlySet<string>;
42
+ /** @internal Physical page height used for page-relative tables laid out on a synthetic region canvas. */
43
+ pagePositionedTableFitHeight?: number;
42
44
  sectionMetadata?: SectionMetadata[];
43
45
  /**
44
46
  * Extra bottom margin per page index (0-based) reserved for non-body content
@@ -102,6 +102,7 @@ export type ParagraphAnchorsContext = {
102
102
  columnWidth: number;
103
103
  pageWidth: number;
104
104
  pageMargins: PageMargins;
105
+ pagePositionedTableFitHeight?: number;
105
106
  columns: ColumnLayoutForAnchor;
106
107
  placedAnchoredIds: Set<string>;
107
108
  };
@@ -5,6 +5,7 @@ export type TableLayoutContext = {
5
5
  block: TableBlock;
6
6
  measure: TableMeasure;
7
7
  columnWidth: number;
8
+ pagePositionedTableFitHeight?: number;
8
9
  ensurePage: () => PageState;
9
10
  advanceColumn: (state: PageState) => PageState;
10
11
  columnX: (state: PageState, columnIndex?: number) => number;
@@ -90,7 +91,7 @@ export declare function generateFragmentMetadata(measure: TableMeasure, block: T
90
91
  * @param context - Table layout context
91
92
 
92
93
  */
93
- export declare function layoutTableBlockSteps({ block, measure, columnWidth, ensurePage, advanceColumn, columnX, resumeCursor, onFragmentStart, }: TableLayoutContext): Generator<TableLayoutStep, void, void>;
94
+ export declare function layoutTableBlockSteps({ block, measure, columnWidth, pagePositionedTableFitHeight, ensurePage, advanceColumn, columnX, resumeCursor, onFragmentStart, }: TableLayoutContext): Generator<TableLayoutStep, void, void>;
94
95
  export declare function layoutTableBlock(context: TableLayoutContext): void;
95
96
  /**
96
97
  * Create a table fragment for an anchored/floating table at its computed position.
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.17.0-next.1";
319
+ return "2.17.0";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -45726,7 +45726,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45726
45726
  this.config.colors = shuffleArray(this.config.colors);
45727
45727
  this.userColorMap = /* @__PURE__ */ new Map();
45728
45728
  this.colorIndex = 0;
45729
- this.version = "2.17.0-next.1";
45729
+ this.version = "2.17.0";
45730
45730
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45731
45731
  this.superdocId = config.superdocId || require_uuid.v4();
45732
45732
  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.17.0-next.1";
318
+ return "2.17.0";
319
319
  } catch {
320
320
  return "unknown";
321
321
  }
@@ -45657,7 +45657,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45657
45657
  this.config.colors = shuffleArray(this.config.colors);
45658
45658
  this.userColorMap = /* @__PURE__ */ new Map();
45659
45659
  this.colorIndex = 0;
45660
- this.version = "2.17.0-next.1";
45660
+ this.version = "2.17.0";
45661
45661
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45662
45662
  this.superdocId = config.superdocId || v4();
45663
45663
  this.colors = this.config.colors ?? [];