@docx-editor.dev/core 2.6.1 → 2.8.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.
Files changed (96) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.js +1 -1
  3. package/dist/binding.cjs +1 -1
  4. package/dist/binding.d.cts +8 -7
  5. package/dist/binding.d.ts +8 -7
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-2WIXJ7CW.js +10 -0
  8. package/dist/chunk-42PRWWVE.js +2 -0
  9. package/dist/chunk-5XKD3VFP.js +18 -0
  10. package/dist/{chunk-SFMAIFEN.cjs → chunk-HCSWWXS2.cjs} +2 -2
  11. package/dist/chunk-HTJLSGBH.cjs +18 -0
  12. package/dist/chunk-JEHWQPXS.cjs +1 -0
  13. package/dist/chunk-KCJLRAKT.js +5 -0
  14. package/dist/chunk-KTL3UMPK.js +2 -0
  15. package/dist/chunk-M6ZIVJUA.cjs +2 -0
  16. package/dist/chunk-NU57YOQE.js +15 -0
  17. package/dist/chunk-RUS2YBWU.cjs +10 -0
  18. package/dist/chunk-TJEWP7MX.cjs +15 -0
  19. package/dist/chunk-UGUPVZDY.cjs +5 -0
  20. package/dist/chunk-XJRMFS6O.js +1 -0
  21. package/dist/chunk-XN634HAC.js +2 -0
  22. package/dist/chunk-XRDTD4X3.cjs +2 -0
  23. package/dist/contracts/document.d.cts +25 -3
  24. package/dist/contracts/document.d.ts +25 -3
  25. package/dist/contracts/editor.d.cts +7 -7
  26. package/dist/contracts/editor.d.ts +7 -7
  27. package/dist/contracts/interaction.d.cts +6 -6
  28. package/dist/contracts/interaction.d.ts +6 -6
  29. package/dist/contracts/modules.d.cts +4 -3
  30. package/dist/contracts/modules.d.ts +4 -3
  31. package/dist/contracts/types.d.cts +110 -2
  32. package/dist/contracts/types.d.ts +110 -2
  33. package/dist/{custom-node-writes-tJw8U9MO.d.ts → custom-node-writes-BdVl-LAC.d.ts} +19 -10
  34. package/dist/{custom-node-writes-D9G3GKQ7.d.cts → custom-node-writes-Bu8JIqfA.d.cts} +19 -10
  35. package/dist/{editor-BZEJL3vv.d.cts → editor-CWlj33GH.d.cts} +80 -69
  36. package/dist/{editor-D2zOJztO.d.ts → editor-D52SD4jG.d.ts} +80 -69
  37. package/dist/editor.cjs +1 -1
  38. package/dist/editor.d.cts +63 -31
  39. package/dist/editor.d.ts +63 -31
  40. package/dist/editor.js +1 -1
  41. package/dist/{image-resources-BaHz4QAd.d.cts → image-resources-BveffuKp.d.cts} +1 -1
  42. package/dist/{image-resources-Cl5_cNi9.d.ts → image-resources-D63k8w5f.d.ts} +1 -1
  43. package/dist/{index-_xF7n_z0.d.cts → index-39yzaZO_.d.cts} +1573 -1429
  44. package/dist/{index-D8L8WrNF.d.ts → index-ZuqIj0b9.d.ts} +1573 -1429
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.d.cts +14 -14
  47. package/dist/index.d.ts +14 -14
  48. package/dist/index.js +1 -1
  49. package/dist/layout.cjs +1 -1
  50. package/dist/layout.d.cts +220 -23
  51. package/dist/layout.d.ts +220 -23
  52. package/dist/layout.js +1 -1
  53. package/dist/output.cjs +1 -1
  54. package/dist/output.d.cts +6 -5
  55. package/dist/output.d.ts +6 -5
  56. package/dist/output.js +1 -1
  57. package/dist/{review-reads-HDvoQXK2.d.ts → review-reads-B_pXe43J.d.ts} +1 -1
  58. package/dist/{review-reads-Dr0CpW6u.d.cts → review-reads-Bn7aZU4u.d.cts} +1 -1
  59. package/dist/{review-support-D4ZBdUXa.d.ts → review-support--I4ChuzF.d.ts} +1 -1
  60. package/dist/{review-support-T-riLz4Y.d.cts → review-support-CG7aVSPh.d.cts} +1 -1
  61. package/dist/{semantic-cell-selection-BTQFpN0S.d.cts → semantic-cell-selection-C45Gn4K-.d.cts} +14 -2
  62. package/dist/{semantic-cell-selection-B5vfPz4Q.d.ts → semantic-cell-selection-I-uAmi0q.d.ts} +14 -2
  63. package/dist/{semantic-interaction-CDNEU_Tx.d.cts → semantic-interaction-Bu_3IPaV.d.ts} +14 -2
  64. package/dist/{semantic-interaction-lvpzZRpA.d.ts → semantic-interaction-DVUqu_47.d.cts} +14 -2
  65. package/dist/{semantic-paint-BBPL3u5w.d.ts → semantic-paint-BKiiDJol.d.ts} +8 -2
  66. package/dist/{semantic-paint-IjbL-4CT.d.cts → semantic-paint-COQY0Lnq.d.cts} +8 -2
  67. package/dist/{semantic-records-CdQvpUj1.d.ts → semantic-records-DHcMZM2-.d.ts} +35 -36
  68. package/dist/{semantic-records-DEOs3_tE.d.cts → semantic-records-rAKWaD-1.d.cts} +35 -36
  69. package/dist/{shaped-measurer-C2SJAjV0.d.cts → shaped-measurer-BRL__nm2.d.cts} +1 -1
  70. package/dist/{shaped-measurer-l4o5ITJ0.d.ts → shaped-measurer-Cw45Nu5R.d.ts} +1 -1
  71. package/dist/store.cjs +1 -1
  72. package/dist/store.d.cts +55 -9
  73. package/dist/store.d.ts +55 -9
  74. package/dist/store.js +1 -1
  75. package/dist/{tree-op-types-CUCwPWjT.d.cts → tree-op-types-A-SLSKzK.d.cts} +62 -9
  76. package/dist/{tree-op-types-D0fTNBVW.d.ts → tree-op-types-BbzrA-kg.d.ts} +62 -9
  77. package/dist/{tree-session-b7bggR-S.d.cts → tree-session-C2NsEgfW.d.cts} +41 -6
  78. package/dist/{tree-session-CH1oA75f.d.ts → tree-session-DeNJa86l.d.ts} +41 -6
  79. package/dist/{tree-store-CIKASRHk.d.ts → tree-store-CKswbQl3.d.ts} +13 -1
  80. package/dist/{tree-store-BqgeCa1Q.d.cts → tree-store-Dob9Us6Y.d.cts} +13 -1
  81. package/package.json +2 -2
  82. package/dist/chunk-4GQXAXTZ.js +0 -5
  83. package/dist/chunk-DGUHCJPF.cjs +0 -18
  84. package/dist/chunk-DY3QVCWC.cjs +0 -10
  85. package/dist/chunk-E7BXJ4BF.js +0 -1
  86. package/dist/chunk-F7Z6PWAZ.cjs +0 -2
  87. package/dist/chunk-IJ4V3LGV.cjs +0 -2
  88. package/dist/chunk-JEMP5YI5.cjs +0 -15
  89. package/dist/chunk-JZXK4DKV.cjs +0 -1
  90. package/dist/chunk-NIGGABAA.js +0 -15
  91. package/dist/chunk-OPKOTVQQ.js +0 -18
  92. package/dist/chunk-R75OLPL6.js +0 -10
  93. package/dist/chunk-SKWYEZCO.cjs +0 -5
  94. package/dist/chunk-SMRD66T5.js +0 -2
  95. package/dist/chunk-UVIUNAQ6.js +0 -2
  96. package/dist/chunk-WAVN7MAT.js +0 -2
@@ -1,11 +1,11 @@
1
- export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-BZEJL3vv.cjs';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-CWlj33GH.cjs';
2
2
  import './document.cjs';
3
3
  import './types.cjs';
4
- import '../review-support-T-riLz4Y.cjs';
4
+ import '../review-support-CG7aVSPh.cjs';
5
5
  import '../ooxml-tree-BU0e3DVi.cjs';
6
- import '../tree-op-types-CUCwPWjT.cjs';
7
- import '../semantic-interaction-CDNEU_Tx.cjs';
8
- import '../semantic-records-DEOs3_tE.cjs';
9
- import '../image-resources-BaHz4QAd.cjs';
6
+ import '../tree-op-types-A-SLSKzK.cjs';
7
+ import '../semantic-interaction-DVUqu_47.cjs';
8
+ import '../semantic-records-rAKWaD-1.cjs';
9
+ import '../image-resources-BveffuKp.cjs';
10
10
  import '../ooxml-package-CR5us6ad.cjs';
11
11
  import '../revision-projection-WzlQGBJx.cjs';
@@ -1,11 +1,11 @@
1
- export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-D2zOJztO.js';
1
+ export { M as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a9 as SemanticIdentity, aa as SemanticTarget, V as ViewScope } from '../editor-D52SD4jG.js';
2
2
  import './document.js';
3
3
  import './types.js';
4
- import '../review-support-D4ZBdUXa.js';
4
+ import '../review-support--I4ChuzF.js';
5
5
  import '../ooxml-tree-BU0e3DVi.js';
6
- import '../tree-op-types-D0fTNBVW.js';
7
- import '../semantic-interaction-lvpzZRpA.js';
8
- import '../semantic-records-CdQvpUj1.js';
9
- import '../image-resources-Cl5_cNi9.js';
6
+ import '../tree-op-types-BbzrA-kg.js';
7
+ import '../semantic-interaction-Bu_3IPaV.js';
8
+ import '../semantic-records-DHcMZM2-.js';
9
+ import '../image-resources-D63k8w5f.js';
10
10
  import '../ooxml-package-D_CtywTW.js';
11
11
  import '../revision-projection-UKqvPa4-.js';
@@ -1,8 +1,9 @@
1
1
  import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.cjs';
2
- export { R as RevisionAddress } from '../tree-op-types-CUCwPWjT.cjs';
2
+ export { R as RevisionAddress } from '../tree-op-types-A-SLSKzK.cjs';
3
3
  import { R as RevisionDisplayMode } from '../revision-projection-WzlQGBJx.cjs';
4
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-T-riLz4Y.cjs';
5
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-T-riLz4Y.cjs';
4
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-CG7aVSPh.cjs';
5
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-CG7aVSPh.cjs';
6
+ import './types.cjs';
6
7
 
7
8
  /**
8
9
  * `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
@@ -1,8 +1,9 @@
1
1
  import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.js';
2
- export { R as RevisionAddress } from '../tree-op-types-D0fTNBVW.js';
2
+ export { R as RevisionAddress } from '../tree-op-types-BbzrA-kg.js';
3
3
  import { R as RevisionDisplayMode } from '../revision-projection-UKqvPa4-.js';
4
- import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-D4ZBdUXa.js';
5
- export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-D4ZBdUXa.js';
4
+ import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support--I4ChuzF.js';
5
+ export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support--I4ChuzF.js';
6
+ import './types.js';
6
7
 
7
8
  /**
8
9
  * `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
@@ -4,6 +4,66 @@
4
4
  * `@docx-editor.dev/core/contracts/types` re-exports this module verbatim, through
5
5
  * `types-barrel.ts`. There is no `@docx-editor.dev/core/types` subpath.
6
6
  */
7
+ /** Which paragraph-level reads the selection disagrees about. @public */
8
+ interface ParagraphDisagreements {
9
+ readonly alignment: boolean;
10
+ readonly spaceBeforePt: boolean;
11
+ readonly spaceAfterPt: boolean;
12
+ readonly lineSpacing: boolean;
13
+ readonly tabStops: boolean;
14
+ }
15
+ /**
16
+ * The five paragraph flags a Paragraph dialog shows as checkboxes.
17
+ *
18
+ * `contextualSpacing` is Word's "Don't add space between paragraphs of the same style";
19
+ * the rest are its Pagination block. `null` means the selection disagrees.
20
+ *
21
+ * @public
22
+ */
23
+ interface ParagraphFlags {
24
+ readonly contextualSpacing: boolean | null;
25
+ readonly keepNext: boolean | null;
26
+ readonly keepLines: boolean | null;
27
+ readonly widowControl: boolean | null;
28
+ readonly pageBreakBefore: boolean | null;
29
+ }
30
+ /**
31
+ * Every field of the Paragraph dialog, as `setParagraphFormat` takes it.
32
+ *
33
+ * An omitted field is left as authored. `null` REMOVES a setting so the style supplies it
34
+ * again — not the same as a zero, which blocks the cascade.
35
+ *
36
+ * @public
37
+ */
38
+ interface ParagraphFormatCommand {
39
+ alignment?: 'left' | 'center' | 'right' | 'justify';
40
+ spaceBeforePt?: number | null;
41
+ spaceAfterPt?: number | null;
42
+ lineSpacing?: {
43
+ rule: 'multiple' | 'exact' | 'atLeast';
44
+ value: number;
45
+ } | null;
46
+ indentLeftTwips?: number | null;
47
+ indentRightTwips?: number | null;
48
+ /** ONE signed first-line offset: negative is a hanging indent. */
49
+ indentFirstLineTwips?: number | null;
50
+ contextualSpacing?: boolean;
51
+ keepNext?: boolean;
52
+ keepLines?: boolean;
53
+ widowControl?: boolean;
54
+ pageBreakBefore?: boolean;
55
+ /**
56
+ * Replace the paragraph's custom tab stops. An empty list CLEARS them, which is what
57
+ * "Clear All" does; omit the field to leave them as authored.
58
+ */
59
+ tabStops?: readonly ParagraphTabStop[];
60
+ }
61
+ /** One custom tab stop, as a command states it. @public */
62
+ interface ParagraphTabStop {
63
+ readonly positionTwips: number;
64
+ readonly alignment: 'left' | 'center' | 'right' | 'decimal' | 'bar';
65
+ readonly leader?: 'none' | 'dot' | 'hyphen' | 'underscore' | 'heavy' | 'middleDot';
66
+ }
7
67
  /** Ownership token for one retained selection highlight. @public */
8
68
  type SelectionPin = symbol;
9
69
  /**
@@ -174,9 +234,41 @@ interface RunFormatting {
174
234
  readonly rule: 'multiple' | 'exact' | 'atLeast';
175
235
  readonly value: number;
176
236
  };
177
- /** Space above and below the paragraph at the selection, in points. */
237
+ /**
238
+ * Space above and below the paragraph at the selection, in points.
239
+ *
240
+ * The measurement the cascade STATES — `w:docDefaults`, the style chain and direct
241
+ * formatting resolved together — not the gap the page finally draws. The two differ for a
242
+ * paragraph carrying `w:beforeAutospacing`, where Word substitutes its own value and
243
+ * ignores the measurement, and again where two paragraphs collapse their adjacent spacing.
244
+ * Absent when the selection's paragraphs disagree or no level states it.
245
+ */
178
246
  readonly spaceBeforePt?: number;
179
247
  readonly spaceAfterPt?: number;
248
+ /**
249
+ * The paragraph flags the Paragraph dialog shows as checkboxes.
250
+ *
251
+ * Each is `true`, `false`, or `null` when the selection's paragraphs disagree — a
252
+ * checkbox needs all three. Read through the cascade, so a flag a STYLE sets reads as on,
253
+ * which is what the box has to show over a paragraph the page is visibly keeping with the
254
+ * next. Absent on a `Run`, like every other selection-level field here.
255
+ */
256
+ readonly paragraphFlags?: ParagraphFlags;
257
+ /**
258
+ * Which paragraph-level fields above are absent because the selection DISAGREES, as
259
+ * opposed to because nothing states them.
260
+ *
261
+ * A `null`/absent value alone cannot tell those apart, and both readings have shipped as
262
+ * bugs: a disagreement rendered as a concrete value is uncorrectable, because the value
263
+ * that would fix it is the one already on screen; an absent value rendered as "mixed"
264
+ * tells a single paragraph it disagrees with itself.
265
+ */
266
+ readonly disagrees?: ParagraphDisagreements;
267
+ /**
268
+ * The paragraph's custom tab stops at the selection, cascade included. Absent when the
269
+ * selection disagrees or the paragraphs have none.
270
+ */
271
+ readonly tabStops?: readonly ParagraphTabStop[];
180
272
  /**
181
273
  * The EFFECTIVE paragraph indent at the selection — cascade and numbering merge
182
274
  * included, so a numbered item that authors no `w:ind` reports the indent its list
@@ -250,6 +342,22 @@ interface ContentControl {
250
342
  }
251
343
  /** Which kind of control a `w:sdt` is, and therefore what a value written into it must be. */
252
344
  type ContentControlType = 'richText' | 'plainText' | 'checkbox' | 'dropdown' | 'comboBox' | 'date' | 'picture' | 'repeatingSection';
345
+ /**
346
+ * The control kinds an insertion can author.
347
+ *
348
+ * A NARROWING of {@link ContentControlType}, not a separate vocabulary: a kind read off an
349
+ * existing control can be handed straight back to `insertContentControl`. Three kinds are
350
+ * absent because an insertion would have to invent what they carry — a checkbox needs its two
351
+ * declared glyph states, a picture needs an image part, and a repeating section is a container
352
+ * whose items have their own verbs. Reading still answers the wider type; a document may hold
353
+ * kinds this cannot create.
354
+ *
355
+ * `dropDownList` is the same kind as `dropdown`, spelt as OOXML spells it. Both are accepted,
356
+ * so a type read off a control can be handed back without translating it — and the OOXML
357
+ * spelling is the one the automation protocol takes, so a caller who uses both surfaces can
358
+ * write that one everywhere.
359
+ */
360
+ type InsertableContentControlType = Extract<ContentControlType, 'richText' | 'plainText' | 'dropdown' | 'comboBox' | 'date'> | 'dropDownList';
253
361
  /**
254
362
  * Narrows a content-control query. Fields combine with AND; an empty filter matches every
255
363
  * control.
@@ -451,4 +559,4 @@ interface Point {
451
559
  /** What every subscription returns. Calling it twice is safe. */
452
560
  type Unsubscribe = () => void;
453
561
 
454
- export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
562
+ export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
@@ -4,6 +4,66 @@
4
4
  * `@docx-editor.dev/core/contracts/types` re-exports this module verbatim, through
5
5
  * `types-barrel.ts`. There is no `@docx-editor.dev/core/types` subpath.
6
6
  */
7
+ /** Which paragraph-level reads the selection disagrees about. @public */
8
+ interface ParagraphDisagreements {
9
+ readonly alignment: boolean;
10
+ readonly spaceBeforePt: boolean;
11
+ readonly spaceAfterPt: boolean;
12
+ readonly lineSpacing: boolean;
13
+ readonly tabStops: boolean;
14
+ }
15
+ /**
16
+ * The five paragraph flags a Paragraph dialog shows as checkboxes.
17
+ *
18
+ * `contextualSpacing` is Word's "Don't add space between paragraphs of the same style";
19
+ * the rest are its Pagination block. `null` means the selection disagrees.
20
+ *
21
+ * @public
22
+ */
23
+ interface ParagraphFlags {
24
+ readonly contextualSpacing: boolean | null;
25
+ readonly keepNext: boolean | null;
26
+ readonly keepLines: boolean | null;
27
+ readonly widowControl: boolean | null;
28
+ readonly pageBreakBefore: boolean | null;
29
+ }
30
+ /**
31
+ * Every field of the Paragraph dialog, as `setParagraphFormat` takes it.
32
+ *
33
+ * An omitted field is left as authored. `null` REMOVES a setting so the style supplies it
34
+ * again — not the same as a zero, which blocks the cascade.
35
+ *
36
+ * @public
37
+ */
38
+ interface ParagraphFormatCommand {
39
+ alignment?: 'left' | 'center' | 'right' | 'justify';
40
+ spaceBeforePt?: number | null;
41
+ spaceAfterPt?: number | null;
42
+ lineSpacing?: {
43
+ rule: 'multiple' | 'exact' | 'atLeast';
44
+ value: number;
45
+ } | null;
46
+ indentLeftTwips?: number | null;
47
+ indentRightTwips?: number | null;
48
+ /** ONE signed first-line offset: negative is a hanging indent. */
49
+ indentFirstLineTwips?: number | null;
50
+ contextualSpacing?: boolean;
51
+ keepNext?: boolean;
52
+ keepLines?: boolean;
53
+ widowControl?: boolean;
54
+ pageBreakBefore?: boolean;
55
+ /**
56
+ * Replace the paragraph's custom tab stops. An empty list CLEARS them, which is what
57
+ * "Clear All" does; omit the field to leave them as authored.
58
+ */
59
+ tabStops?: readonly ParagraphTabStop[];
60
+ }
61
+ /** One custom tab stop, as a command states it. @public */
62
+ interface ParagraphTabStop {
63
+ readonly positionTwips: number;
64
+ readonly alignment: 'left' | 'center' | 'right' | 'decimal' | 'bar';
65
+ readonly leader?: 'none' | 'dot' | 'hyphen' | 'underscore' | 'heavy' | 'middleDot';
66
+ }
7
67
  /** Ownership token for one retained selection highlight. @public */
8
68
  type SelectionPin = symbol;
9
69
  /**
@@ -174,9 +234,41 @@ interface RunFormatting {
174
234
  readonly rule: 'multiple' | 'exact' | 'atLeast';
175
235
  readonly value: number;
176
236
  };
177
- /** Space above and below the paragraph at the selection, in points. */
237
+ /**
238
+ * Space above and below the paragraph at the selection, in points.
239
+ *
240
+ * The measurement the cascade STATES — `w:docDefaults`, the style chain and direct
241
+ * formatting resolved together — not the gap the page finally draws. The two differ for a
242
+ * paragraph carrying `w:beforeAutospacing`, where Word substitutes its own value and
243
+ * ignores the measurement, and again where two paragraphs collapse their adjacent spacing.
244
+ * Absent when the selection's paragraphs disagree or no level states it.
245
+ */
178
246
  readonly spaceBeforePt?: number;
179
247
  readonly spaceAfterPt?: number;
248
+ /**
249
+ * The paragraph flags the Paragraph dialog shows as checkboxes.
250
+ *
251
+ * Each is `true`, `false`, or `null` when the selection's paragraphs disagree — a
252
+ * checkbox needs all three. Read through the cascade, so a flag a STYLE sets reads as on,
253
+ * which is what the box has to show over a paragraph the page is visibly keeping with the
254
+ * next. Absent on a `Run`, like every other selection-level field here.
255
+ */
256
+ readonly paragraphFlags?: ParagraphFlags;
257
+ /**
258
+ * Which paragraph-level fields above are absent because the selection DISAGREES, as
259
+ * opposed to because nothing states them.
260
+ *
261
+ * A `null`/absent value alone cannot tell those apart, and both readings have shipped as
262
+ * bugs: a disagreement rendered as a concrete value is uncorrectable, because the value
263
+ * that would fix it is the one already on screen; an absent value rendered as "mixed"
264
+ * tells a single paragraph it disagrees with itself.
265
+ */
266
+ readonly disagrees?: ParagraphDisagreements;
267
+ /**
268
+ * The paragraph's custom tab stops at the selection, cascade included. Absent when the
269
+ * selection disagrees or the paragraphs have none.
270
+ */
271
+ readonly tabStops?: readonly ParagraphTabStop[];
180
272
  /**
181
273
  * The EFFECTIVE paragraph indent at the selection — cascade and numbering merge
182
274
  * included, so a numbered item that authors no `w:ind` reports the indent its list
@@ -250,6 +342,22 @@ interface ContentControl {
250
342
  }
251
343
  /** Which kind of control a `w:sdt` is, and therefore what a value written into it must be. */
252
344
  type ContentControlType = 'richText' | 'plainText' | 'checkbox' | 'dropdown' | 'comboBox' | 'date' | 'picture' | 'repeatingSection';
345
+ /**
346
+ * The control kinds an insertion can author.
347
+ *
348
+ * A NARROWING of {@link ContentControlType}, not a separate vocabulary: a kind read off an
349
+ * existing control can be handed straight back to `insertContentControl`. Three kinds are
350
+ * absent because an insertion would have to invent what they carry — a checkbox needs its two
351
+ * declared glyph states, a picture needs an image part, and a repeating section is a container
352
+ * whose items have their own verbs. Reading still answers the wider type; a document may hold
353
+ * kinds this cannot create.
354
+ *
355
+ * `dropDownList` is the same kind as `dropdown`, spelt as OOXML spells it. Both are accepted,
356
+ * so a type read off a control can be handed back without translating it — and the OOXML
357
+ * spelling is the one the automation protocol takes, so a caller who uses both surfaces can
358
+ * write that one everywhere.
359
+ */
360
+ type InsertableContentControlType = Extract<ContentControlType, 'richText' | 'plainText' | 'dropdown' | 'comboBox' | 'date'> | 'dropDownList';
253
361
  /**
254
362
  * Narrows a content-control query. Fields combine with AND; an empty filter matches every
255
363
  * control.
@@ -451,4 +559,4 @@ interface Point {
451
559
  /** What every subscription returns. Calling it twice is safe. */
452
560
  type Unsubscribe = () => void;
453
561
 
454
- export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
562
+ export type { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark };
@@ -1,10 +1,10 @@
1
1
  import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.js';
2
2
  import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
3
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-Cl5_cNi9.js';
4
- import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-D0fTNBVW.js';
3
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-D63k8w5f.js';
4
+ import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-BbzrA-kg.js';
5
5
  import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-BdjsQNE_.js';
6
6
  import { N as NoteKind } from './note-nodes-BPSTVDMr.js';
7
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-CIKASRHk.js';
7
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-CKswbQl3.js';
8
8
 
9
9
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
10
10
  type DrawingPropertyIdResult = {
@@ -284,12 +284,6 @@ declare function createNoteReferenceScanBudget(maxVisited?: number, maxParts?: n
284
284
  * later usable Internal notes part (same continue-past-bad pattern as settingsPartOf).
285
285
  */
286
286
  declare function resolveNotesPart(pkg: OoxmlPackage, noteKind: NoteKind): OoxmlPart | null;
287
- /**
288
- * Walk a part for addressable typed note references. Bounded by visited nodes; skips deep
289
- * hostile nesting by marking the shared budget truncated. When `budget` is supplied it is
290
- * shared and mutated in place. Hits are segment-aligned (`segmentsOf`); demoted wrappers
291
- * never invent atomOffsets.
292
- */
293
287
  declare function collectNoteReferences(part: OoxmlPart, options?: {
294
288
  readonly maxHits?: number;
295
289
  readonly budget?: NoteReferenceScanBudget;
@@ -622,8 +616,12 @@ declare class TreePackageStore {
622
616
  redo(): TreeModelChange | null;
623
617
  selectionForUndo(): SelectionMark | null;
624
618
  selectionForRedo(): SelectionMark | null;
619
+ /** See {@link openStoryPartsOf}. */
620
+ openStoryParts(): readonly OoxmlPart[];
625
621
  /** How many story stores are open (body counts as one). */
626
622
  openedStoryCount(): number;
623
+ /** See {@link openStoryTokenOf}. */
624
+ openStoryToken(): string;
627
625
  /**
628
626
  * Insert a validated raster image as one package undo unit (task 12).
629
627
  */
@@ -876,7 +874,18 @@ interface CustomNodePayloadRead {
876
874
  * Every store the story relates to, so a document carrying two definitions' payloads answers
877
875
  * for both without anyone naming a namespace.
878
876
  */
879
- declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string): ReadonlyMap<string, CustomNodePayloadRead>;
877
+ declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string,
878
+ /**
879
+ * The part that RELATES the customXml store, when it is not the story's own.
880
+ *
881
+ * Two different questions wear one name here: which part holds the CONTROLS, and which part
882
+ * relates the STORE they bind into. Word only reads a store hung off the main document part,
883
+ * so {@link writeCustomNode} already takes them separately — this read did not, and answered
884
+ * with the body's controls whatever story it was asked about. A chip in a header therefore
885
+ * read as having no payload at all, and an update that meant to keep the existing data
886
+ * dropped it.
887
+ */
888
+ dataOwnerPartName?: string): ReadonlyMap<string, CustomNodePayloadRead>;
880
889
  /** Every payload one store holds, for a caller resolving a control's `data`. */
881
890
  declare function customNodePayloadsOf(pkg: OoxmlPackage, storyPartName: string, namespaceUri: string): ReadonlyMap<string, {
882
891
  readonly label: string;
@@ -1,10 +1,10 @@
1
1
  import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.cjs';
2
2
  import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
3
- import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BaHz4QAd.cjs';
4
- import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-CUCwPWjT.cjs';
3
+ import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-BveffuKp.cjs';
4
+ import { h as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-A-SLSKzK.cjs';
5
5
  import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-CgEOSw3i.cjs';
6
6
  import { N as NoteKind } from './note-nodes-C6DLxlvj.cjs';
7
- import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-BqgeCa1Q.cjs';
7
+ import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-Dob9Us6Y.cjs';
8
8
 
9
9
  /** A freshly allocated drawing property id, or the reason one could not be minted. */
10
10
  type DrawingPropertyIdResult = {
@@ -284,12 +284,6 @@ declare function createNoteReferenceScanBudget(maxVisited?: number, maxParts?: n
284
284
  * later usable Internal notes part (same continue-past-bad pattern as settingsPartOf).
285
285
  */
286
286
  declare function resolveNotesPart(pkg: OoxmlPackage, noteKind: NoteKind): OoxmlPart | null;
287
- /**
288
- * Walk a part for addressable typed note references. Bounded by visited nodes; skips deep
289
- * hostile nesting by marking the shared budget truncated. When `budget` is supplied it is
290
- * shared and mutated in place. Hits are segment-aligned (`segmentsOf`); demoted wrappers
291
- * never invent atomOffsets.
292
- */
293
287
  declare function collectNoteReferences(part: OoxmlPart, options?: {
294
288
  readonly maxHits?: number;
295
289
  readonly budget?: NoteReferenceScanBudget;
@@ -622,8 +616,12 @@ declare class TreePackageStore {
622
616
  redo(): TreeModelChange | null;
623
617
  selectionForUndo(): SelectionMark | null;
624
618
  selectionForRedo(): SelectionMark | null;
619
+ /** See {@link openStoryPartsOf}. */
620
+ openStoryParts(): readonly OoxmlPart[];
625
621
  /** How many story stores are open (body counts as one). */
626
622
  openedStoryCount(): number;
623
+ /** See {@link openStoryTokenOf}. */
624
+ openStoryToken(): string;
627
625
  /**
628
626
  * Insert a validated raster image as one package undo unit (task 12).
629
627
  */
@@ -876,7 +874,18 @@ interface CustomNodePayloadRead {
876
874
  * Every store the story relates to, so a document carrying two definitions' payloads answers
877
875
  * for both without anyone naming a namespace.
878
876
  */
879
- declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string): ReadonlyMap<string, CustomNodePayloadRead>;
877
+ declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string,
878
+ /**
879
+ * The part that RELATES the customXml store, when it is not the story's own.
880
+ *
881
+ * Two different questions wear one name here: which part holds the CONTROLS, and which part
882
+ * relates the STORE they bind into. Word only reads a store hung off the main document part,
883
+ * so {@link writeCustomNode} already takes them separately — this read did not, and answered
884
+ * with the body's controls whatever story it was asked about. A chip in a header therefore
885
+ * read as having no payload at all, and an update that meant to keep the existing data
886
+ * dropped it.
887
+ */
888
+ dataOwnerPartName?: string): ReadonlyMap<string, CustomNodePayloadRead>;
880
889
  /** Every payload one store holds, for a caller resolving a control's `data`. */
881
890
  declare function customNodePayloadsOf(pkg: OoxmlPackage, storyPartName: string, namespaceUri: string): ReadonlyMap<string, {
882
891
  readonly label: string;