superdoc 2.19.0-next.3 → 2.19.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.19.0-next.3",
22
+ superdocVersion: "2.19.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.19.0-next.3",
21
+ superdocVersion: "2.19.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
@@ -1455,6 +1455,18 @@ export type DrawingBlock = VectorShapeDrawing | TextboxDrawing | ShapeGroupDrawi
1455
1455
  * Maps to OOXML w:vAlign values in sectPr.
1456
1456
  */
1457
1457
  export type SectionVerticalAlign = 'top' | 'center' | 'bottom' | 'both';
1458
+ export type SectionPageBorderSide = {
1459
+ width: number;
1460
+ space: number;
1461
+ color: string;
1462
+ };
1463
+ export type SectionPageBorders = {
1464
+ offsetFrom: 'page';
1465
+ top?: SectionPageBorderSide;
1466
+ right?: SectionPageBorderSide;
1467
+ bottom?: SectionPageBorderSide;
1468
+ left?: SectionPageBorderSide;
1469
+ };
1458
1470
  export type SectionBreakBlock = {
1459
1471
  kind: 'sectionBreak';
1460
1472
  id: BlockId;
@@ -1471,6 +1483,7 @@ export type SectionBreakBlock = {
1471
1483
  h: number;
1472
1484
  };
1473
1485
  orientation?: 'portrait' | 'landscape';
1486
+ pageBorders?: SectionPageBorders;
1474
1487
  margins: {
1475
1488
  /** Header margin (distance from top of page to header content) */
1476
1489
  header?: number;
@@ -2464,6 +2477,8 @@ export type Page = {
2464
2477
  */
2465
2478
  suppressHeaderFooter?: boolean;
2466
2479
  margins?: PageMargins;
2480
+ /** Section-owned frame outside the page's body margins. */
2481
+ pageBorders?: SectionPageBorders;
2467
2482
  /**
2468
2483
  * Extra bottom space reserved on this page for footnotes (in px).
2469
2484
  * Used by consumers (e.g. editors/painters) to keep footer hit regions and
@@ -1,4 +1,4 @@
1
- import { ColumnLayout, ColumnRegion, DocumentBackground, DrawingBlock, FlowMode, Fragment, ImageBlock, ImageFragmentMetadata, Line, ListBlock, ListMeasure, PageMargins, PageNumberChapterSeparator, PageNumberFormat, ParagraphBlock, ParagraphBorders, ParagraphMeasure, SectionVerticalAlign, MarkerTrackedChange, SourceAnchor, TableBlock, TableMeasure } from './index.js';
1
+ import { ColumnLayout, ColumnRegion, DocumentBackground, DrawingBlock, FlowMode, Fragment, ImageBlock, ImageFragmentMetadata, Line, ListBlock, ListMeasure, PageMargins, PageNumberChapterSeparator, PageNumberFormat, ParagraphBlock, ParagraphBorders, ParagraphMeasure, SectionVerticalAlign, SectionPageBorders, MarkerTrackedChange, SourceAnchor, TableBlock, TableMeasure } from './index.js';
2
2
  import { LayoutSourceIdentity } from './layout-identity.js';
3
3
  /** A fully resolved layout ready for the next-generation paint pipeline. */
4
4
  export type ResolvedLayout = {
@@ -47,6 +47,8 @@ export type ResolvedPage = {
47
47
  pageCountFieldsExact?: boolean;
48
48
  /** Page margins from the source page. Used for ruler rendering and header/footer positioning. */
49
49
  margins?: PageMargins;
50
+ /** Page frame resolved from the owning section. */
51
+ pageBorders?: SectionPageBorders;
50
52
  /** Extra bottom space reserved for footnotes (px). Used for footer space calculation. */
51
53
  footnoteReserved?: number;
52
54
  /** Numeric page number after section numbering restart/offset. Used for OOXML odd/even parity. */
@@ -62,5 +62,5 @@ export declare const renderPositionedTabRun: (run: Extract<Run, {
62
62
  * scales with font size (capped by the descent). This is geometry derived from
63
63
  * the resolved line metrics. The painter never measures the DOM (SD-2957).
64
64
  */
65
- export declare const underlineOffsetFromLineTop: (line: Line) => number;
65
+ export declare const underlineOffsetFromLineTop: (line: Line, fallbackFontSize?: number) => number;
66
66
  export {};
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.19.0-next.3";
319
+ return "2.19.0-next.4";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -45686,7 +45686,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45686
45686
  this.config.colors = shuffleArray(this.config.colors);
45687
45687
  this.userColorMap = /* @__PURE__ */ new Map();
45688
45688
  this.colorIndex = 0;
45689
- this.version = "2.19.0-next.3";
45689
+ this.version = "2.19.0-next.4";
45690
45690
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45691
45691
  this.superdocId = config.superdocId || require_uuid.v4();
45692
45692
  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.19.0-next.3";
318
+ return "2.19.0-next.4";
319
319
  } catch {
320
320
  return "unknown";
321
321
  }
@@ -45617,7 +45617,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45617
45617
  this.config.colors = shuffleArray(this.config.colors);
45618
45618
  this.userColorMap = /* @__PURE__ */ new Map();
45619
45619
  this.colorIndex = 0;
45620
- this.version = "2.19.0-next.3";
45620
+ this.version = "2.19.0-next.4";
45621
45621
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45622
45622
  this.superdocId = config.superdocId || v4();
45623
45623
  this.colors = this.config.colors ?? [];