superdoc 2.12.0 → 2.12.1-next.2

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",
22
+ superdocVersion: "2.12.1-next.2",
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",
21
+ superdocVersion: "2.12.1-next.2",
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
@@ -2,6 +2,7 @@ import { BlockNodeAddress, NodeKind } from '../types/base.js';
2
2
  import { SelectionTarget } from '../types/address.js';
3
3
  import { SDFragment } from '../types/fragment.js';
4
4
  import { ReceiptFailure, ReceiptInsert } from '../types/receipt.js';
5
+ import { StoryLocator } from '../types/story.types.js';
5
6
  /**
6
7
  * Semantic SDT subtype derived from `w:sdtPr` children.
7
8
  *
@@ -108,6 +109,8 @@ export interface ContentControlTarget {
108
109
  kind: NodeKind;
109
110
  nodeType: 'sdt';
110
111
  nodeId: string;
112
+ /** Story containing this content control. Omit for body (backward compatible). */
113
+ story?: StoryLocator;
111
114
  }
112
115
  export type ContentControlMoveDestination = ContentControlTarget | {
113
116
  kind: 'documentStart';
@@ -25,7 +25,7 @@ export interface BlockListEntry {
25
25
  color?: string;
26
26
  /** Paragraph alignment. */
27
27
  alignment?: string;
28
- /** Heading level (1-6). Only for headings. */
28
+ /** Heading level (1-9). Only for headings. */
29
29
  headingLevel?: number;
30
30
  /**
31
31
  * Numbering reference (`numId` + `level`) for numbered blocks, sourced from the
@@ -89,7 +89,7 @@ export interface ExtractBlock {
89
89
  * tracked change. When concatenated, span text equals `text`.
90
90
  */
91
91
  textSpans?: ExtractTextSpan[];
92
- /** Heading level (1-6). Only present for headings. */
92
+ /** Heading level (1-9). Only present for headings. */
93
93
  headingLevel?: number;
94
94
  /** Table coordinates. Only present for blocks inside a table cell. */
95
95
  tableContext?: ExtractTableContext;
@@ -82,7 +82,7 @@ export interface DocumentSnapshotBlock {
82
82
  bold?: boolean;
83
83
  /** Paragraph alignment: left, center, right, justify. */
84
84
  alignment?: string;
85
- /** Heading level (1-6). Only present for headings. */
85
+ /** Heading level (1-9). Only present for headings. */
86
86
  headingLevel?: number;
87
87
  }
88
88
  /** Full document snapshot: structure, blocks with formatting, and defaults. */
@@ -1,4 +1,5 @@
1
1
  import { BaseNodeInfo } from './base.js';
2
+ export type SemanticHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
2
3
  export interface ParagraphNodeInfo extends BaseNodeInfo {
3
4
  nodeType: 'paragraph';
4
5
  kind: 'block';
@@ -50,7 +51,7 @@ export interface HeadingProperties extends ParagraphProperties {
50
51
  /**
51
52
  * Headings are paragraphs with a heading style.
52
53
  */
53
- headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
54
+ headingLevel: SemanticHeadingLevel;
54
55
  }
55
56
  export interface ListItemProperties extends ParagraphProperties {
56
57
  /**
@@ -1,6 +1,7 @@
1
1
  import { SDRunProps, SDParagraphProps, SDListProps, SDTableProps, SDRowProps, SDCellProps, SDImageProps, SDDrawingProps } from './sd-props.js';
2
2
  import { SDObjectLayout, SDObjectGeometry, SDObjectMediaRef, SDObjectCompat, SDAccessibilityInfo, SDDrawingSource, SDResolvedProvenance, SDResolvedTableLayout } from './sd-objects.js';
3
3
  import { SDSection } from './sd-sections.js';
4
+ import { SemanticHeadingLevel } from './paragraph.types.js';
4
5
  export interface SDNodeBase {
5
6
  id?: string;
6
7
  ext?: Record<string, unknown>;
@@ -28,7 +29,7 @@ export interface SDParagraph extends SDParagraphLikeBase {
28
29
  export interface SDHeading extends SDParagraphLikeBase {
29
30
  kind: 'heading';
30
31
  heading: {
31
- level: 1 | 2 | 3 | 4 | 5 | 6;
32
+ level: SemanticHeadingLevel;
32
33
  inlines: SDInlineNode[];
33
34
  styleRef?: string;
34
35
  props?: SDParagraphProps;
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";
319
+ return "2.12.1-next.2";
320
320
  } catch {
321
321
  return "unknown";
322
322
  }
@@ -45340,7 +45340,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45340
45340
  this.config.colors = shuffleArray(this.config.colors);
45341
45341
  this.userColorMap = /* @__PURE__ */ new Map();
45342
45342
  this.colorIndex = 0;
45343
- this.version = "2.12.0";
45343
+ this.version = "2.12.1-next.2";
45344
45344
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45345
45345
  this.superdocId = config.superdocId || require_uuid.v4();
45346
45346
  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";
318
+ return "2.12.1-next.2";
319
319
  } catch {
320
320
  return "unknown";
321
321
  }
@@ -45271,7 +45271,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45271
45271
  this.config.colors = shuffleArray(this.config.colors);
45272
45272
  this.userColorMap = /* @__PURE__ */ new Map();
45273
45273
  this.colorIndex = 0;
45274
- this.version = "2.12.0";
45274
+ this.version = "2.12.1-next.2";
45275
45275
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45276
45276
  this.superdocId = config.superdocId || v4();
45277
45277
  this.colors = this.config.colors ?? [];