@docx-editor.dev/core 2.10.0 → 2.12.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 (136) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +14 -5
  3. package/dist/automation.d.ts +14 -5
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +12 -11
  7. package/dist/binding.d.ts +12 -11
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-3JON7JMD.cjs +1 -0
  10. package/dist/chunk-5V6FNKBE.cjs +2 -0
  11. package/dist/chunk-6JIJOZDW.js +1 -0
  12. package/dist/chunk-BTQKU64Q.cjs +1 -0
  13. package/dist/chunk-BXRVGHTY.cjs +18 -0
  14. package/dist/chunk-BXTTPJSH.js +5 -0
  15. package/dist/chunk-D5EHDHYV.js +1 -0
  16. package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
  17. package/dist/chunk-ILTZTY3K.cjs +10 -0
  18. package/dist/chunk-IUM7FZPA.js +2 -0
  19. package/dist/chunk-JWZG4QJ5.cjs +2 -0
  20. package/dist/chunk-JXZYDBKU.cjs +19 -0
  21. package/dist/chunk-KBOOIC2Q.js +19 -0
  22. package/dist/chunk-L6XZTLPS.js +10 -0
  23. package/dist/chunk-L7OR5TJK.cjs +5 -0
  24. package/dist/chunk-MHQNR2OU.js +2 -0
  25. package/dist/chunk-MLGPISGH.js +1 -0
  26. package/dist/chunk-NJXQABQU.js +18 -0
  27. package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
  28. package/dist/chunk-TKEGK4GQ.cjs +2 -0
  29. package/dist/chunk-VGFMPWND.js +2 -0
  30. package/dist/chunk-W77HJGYX.js +1 -0
  31. package/dist/chunk-XCFM3G5L.cjs +1 -0
  32. package/dist/chunk-ZKWRCLT2.cjs +1 -0
  33. package/dist/collaboration/replication.cjs +1 -0
  34. package/dist/collaboration/replication.d.cts +216 -0
  35. package/dist/collaboration/replication.d.ts +216 -0
  36. package/dist/collaboration/replication.js +1 -0
  37. package/dist/collaboration.cjs +1 -0
  38. package/dist/collaboration.d.cts +176 -0
  39. package/dist/collaboration.d.ts +176 -0
  40. package/dist/collaboration.js +1 -0
  41. package/dist/contracts/editor.cjs +1 -1
  42. package/dist/contracts/editor.d.cts +8 -9
  43. package/dist/contracts/editor.d.ts +8 -9
  44. package/dist/contracts/editor.js +1 -1
  45. package/dist/contracts/interaction.d.cts +8 -9
  46. package/dist/contracts/interaction.d.ts +8 -9
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.cts +21 -8
  49. package/dist/contracts/modules.d.ts +21 -8
  50. package/dist/contracts/modules.js +1 -1
  51. package/dist/custom-node-writes-CcNeHH5C.d.ts +310 -0
  52. package/dist/custom-node-writes-D4rMJIES.d.cts +310 -0
  53. package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
  54. package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
  55. package/dist/{editor-CwzY2Hcg.d.cts → editor-B76SEMZw.d.cts} +145 -49
  56. package/dist/{editor-C0my6Uta.d.ts → editor-BcdsPdbY.d.ts} +145 -49
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +1 -7299
  59. package/dist/editor.d.cts +60 -26
  60. package/dist/editor.d.ts +60 -26
  61. package/dist/editor.js +1 -1
  62. package/dist/failure-BnGjoXf0.d.cts +64 -0
  63. package/dist/failure-BnGjoXf0.d.ts +64 -0
  64. package/dist/{index-kID8Ymkp.d.ts → index-BYTvklN5.d.ts} +262 -81
  65. package/dist/{index-nLFwo_17.d.cts → index-CDGhPib1.d.cts} +262 -81
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.cts +19 -18
  68. package/dist/index.d.ts +19 -18
  69. package/dist/index.js +1 -1
  70. package/dist/layout.cjs +1 -1
  71. package/dist/layout.d.cts +82 -53
  72. package/dist/layout.d.ts +82 -53
  73. package/dist/layout.js +1 -1
  74. package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-Bx7rXruA.d.ts} +1 -1
  75. package/dist/{note-properties-CQlxjic_.d.cts → note-properties-zQ8w04en.d.cts} +1 -1
  76. package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-69O1Pd8G.d.ts} +1 -1
  77. package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-BmV51rim.d.cts} +1 -1
  78. package/dist/output.cjs +1 -1
  79. package/dist/output.d.cts +6 -8
  80. package/dist/output.d.ts +6 -8
  81. package/dist/output.js +1 -1
  82. package/dist/{protocol-C7ahrdUx.d.ts → protocol-DC7ueVuo.d.ts} +2 -2
  83. package/dist/{protocol-UuZOcOp7.d.cts → protocol-FTXtrAIT.d.cts} +2 -2
  84. package/dist/{review-items-Dw-8a6Ie.d.ts → review-items-B78OsJU2.d.ts} +1 -2
  85. package/dist/{review-items-CwixiHNe.d.cts → review-items-C-2WQdEb.d.cts} +1 -2
  86. package/dist/{review-reads-BqkiJTeR.d.cts → review-reads-CbBQlb-n.d.cts} +2 -2
  87. package/dist/{review-reads-C0u-IKEA.d.ts → review-reads-UexYBp-m.d.ts} +2 -2
  88. package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-6u8lae9J.d.cts} +1 -1
  89. package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-B2v9U3qx.d.ts} +1 -1
  90. package/dist/{semantic-cell-selection-Utrf0lz7.d.ts → semantic-cell-selection-DsYz2Vg3.d.ts} +4 -4
  91. package/dist/{semantic-cell-selection-DT9x9WLf.d.cts → semantic-cell-selection-nEE7E3Z8.d.cts} +4 -4
  92. package/dist/{semantic-interaction-B6hFRQLy.d.ts → semantic-interaction-C00BpIyC.d.ts} +1 -1
  93. package/dist/{semantic-interaction-Z0xKQcB4.d.cts → semantic-interaction-DiOX0FIH.d.cts} +1 -1
  94. package/dist/{semantic-paint-CQEOC0Od.d.cts → semantic-paint-Cc11nrDL.d.cts} +2 -2
  95. package/dist/{semantic-paint-quke354p.d.ts → semantic-paint-ofuoBsYo.d.ts} +2 -2
  96. package/dist/{semantic-records-Do3-i5oB.d.ts → semantic-records-CRG1r6-a.d.cts} +5 -4
  97. package/dist/{semantic-records-CMakzQ1X.d.cts → semantic-records-CzI0ZEuR.d.ts} +5 -4
  98. package/dist/{shaped-measurer-BxwTUluj.d.ts → shaped-measurer-CkOGZQn9.d.ts} +1 -1
  99. package/dist/{shaped-measurer-DzRwWrL5.d.cts → shaped-measurer-CneACGcP.d.cts} +1 -1
  100. package/dist/store.cjs +1 -1
  101. package/dist/store.d.cts +81 -17
  102. package/dist/store.d.ts +81 -17
  103. package/dist/store.js +1 -1
  104. package/dist/{tree-op-types-DSJYmf5b.d.cts → tree-op-types-CA7qgAUF.d.cts} +1288 -18
  105. package/dist/{tree-op-types-BuOfCrkp.d.ts → tree-op-types-HKfUzt_-.d.ts} +1288 -18
  106. package/dist/{custom-node-writes-BvpWCnW8.d.ts → tree-package-fragment-Cz-v-0B3.d.cts} +107 -322
  107. package/dist/{custom-node-writes-Db8H6Z3n.d.cts → tree-package-fragment-oJZX_5iN.d.ts} +107 -322
  108. package/dist/{tree-session-contract-ByWx8eew.d.cts → tree-session-contract-BPDLrEPX.d.ts} +16 -10
  109. package/dist/{tree-session-contract-C1dfE9hy.d.ts → tree-session-contract-Cbl87xa8.d.cts} +16 -10
  110. package/dist/{tree-store-ASBtz7UB.d.ts → tree-store-B7hd6cEa.d.ts} +130 -25
  111. package/dist/{tree-store-CWOUMGN8.d.cts → tree-store-BenW0Mg_.d.cts} +130 -25
  112. package/package.json +14 -3
  113. package/dist/chunk-27APDXY2.js +0 -2
  114. package/dist/chunk-35MI6K7M.cjs +0 -10
  115. package/dist/chunk-4XL7SOWQ.cjs +0 -2
  116. package/dist/chunk-6K6QQVAZ.cjs +0 -18
  117. package/dist/chunk-7VQ7YLW3.cjs +0 -1
  118. package/dist/chunk-7ZJL5AEY.cjs +0 -1
  119. package/dist/chunk-C6LK2BYA.cjs +0 -2
  120. package/dist/chunk-GQQOL4PV.js +0 -1
  121. package/dist/chunk-HBEBUCRM.cjs +0 -5
  122. package/dist/chunk-LG5K46OM.js +0 -2
  123. package/dist/chunk-LWADHMVV.js +0 -5
  124. package/dist/chunk-N725IUO7.js +0 -18
  125. package/dist/chunk-N7DBENH4.js +0 -10
  126. package/dist/chunk-NVGFWMCO.js +0 -1
  127. package/dist/chunk-SYTWKJPJ.cjs +0 -18
  128. package/dist/chunk-YI6JXF7U.js +0 -18
  129. package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
  130. package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
  131. package/dist/note-nodes-BNCANoGN.d.ts +0 -108
  132. package/dist/note-nodes-DL-Au22P.d.cts +0 -108
  133. package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
  134. package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
  135. package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +0 -24
  136. package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +0 -24
@@ -1,70 +0,0 @@
1
- import { O as OoxmlPart, a as OoxmlNode, b as OoxmlElement, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.cjs';
2
-
3
- /** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
4
- type HeaderFooterVariant = 'default' | 'first' | 'even';
5
- /** Header vs footer region kind for chrome and lifecycle ops. */
6
- type HeaderFooterKind = 'header' | 'footer';
7
- /**
8
- * A section's resolved header and footer parts, by variant.
9
- *
10
- * The `even` variant is only honoured when `w:evenAndOddHeaders` is set in settings.xml —
11
- * without it Word ignores an authored even header, and so does this.
12
- */
13
- interface HeaderFooterParts {
14
- readonly headers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
15
- readonly footers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
16
- /** `w:evenAndOddHeaders` in settings.xml — without it the `even` variant is ignored. */
17
- readonly evenAndOddHeaders: boolean;
18
- /** Whether this section enables first-page header/footer furniture (`w:titlePg`). */
19
- readonly titlePage: boolean;
20
- }
21
- /**
22
- * One resolved furniture slot with enough metadata for "Same as previous" chrome.
23
- *
24
- * `inherited: true` means this section has no declared reference for the slot and the
25
- * part comes from a predecessor. The first section never reports inherited — omitting a
26
- * ref there is blank furniture, not inheritance from a later section.
27
- */
28
- interface HeaderFooterSlotMeta {
29
- readonly part: OoxmlPart;
30
- readonly partName: string;
31
- readonly rId: string;
32
- readonly inherited: boolean;
33
- }
34
- /** Per-section resolution including declared-vs-inherited metadata. */
35
- interface HeaderFooterSectionResolution {
36
- readonly headers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
37
- readonly footers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
38
- readonly evenAndOddHeaders: boolean;
39
- readonly titlePage: boolean;
40
- }
41
- /**
42
- * `w:sectPr` nodes in section order, aligned with layout's `enumerateDocumentSections`.
43
- *
44
- * `null` means a section with no `w:sectPr` node (Word defaults, inherits HF from previous).
45
- * Paragraph-level breaks first; the final entry covers remaining blocks (body-level or null).
46
- */
47
- declare function collectSectionPropertyNodes(root: OoxmlNode): Array<OoxmlElement | null>;
48
- /**
49
- * Resolve header/footer parts for every section with declared-vs-inherited metadata.
50
- *
51
- * Index aligns with `enumerateDocumentSections` in the layout package. Existing merged
52
- * maps stay available via {@link resolveHeaderFooterPartsBySection}.
53
- */
54
- declare function resolveHeaderFooterResolutionBySection(pkg: OoxmlPackage): readonly HeaderFooterSectionResolution[];
55
- /**
56
- * Resolve header/footer parts for every section, applying OOXML inheritance.
57
- *
58
- * Index aligns with `enumerateDocumentSections` in the layout package.
59
- */
60
- declare function resolveHeaderFooterPartsBySection(pkg: OoxmlPackage): readonly HeaderFooterParts[];
61
- /**
62
- * Resolve the main-document header/footer references to their parts, gated by the
63
- * settings the section actually declares.
64
- *
65
- * Returns the FINAL section's effective parts (after inheritance). Multi-section hosts
66
- * should prefer `resolveHeaderFooterPartsBySection`.
67
- */
68
- declare function resolveHeaderFooterParts(pkg: OoxmlPackage): HeaderFooterParts;
69
-
70
- export { type HeaderFooterVariant as H, type HeaderFooterParts as a, type HeaderFooterSectionResolution as b, type HeaderFooterKind as c, type HeaderFooterSlotMeta as d, collectSectionPropertyNodes as e, resolveHeaderFooterPartsBySection as f, resolveHeaderFooterResolutionBySection as g, resolveHeaderFooterParts as r };
@@ -1,70 +0,0 @@
1
- import { O as OoxmlPart, a as OoxmlNode, b as OoxmlElement, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.js';
2
-
3
- /** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
4
- type HeaderFooterVariant = 'default' | 'first' | 'even';
5
- /** Header vs footer region kind for chrome and lifecycle ops. */
6
- type HeaderFooterKind = 'header' | 'footer';
7
- /**
8
- * A section's resolved header and footer parts, by variant.
9
- *
10
- * The `even` variant is only honoured when `w:evenAndOddHeaders` is set in settings.xml —
11
- * without it Word ignores an authored even header, and so does this.
12
- */
13
- interface HeaderFooterParts {
14
- readonly headers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
15
- readonly footers: ReadonlyMap<HeaderFooterVariant, OoxmlPart>;
16
- /** `w:evenAndOddHeaders` in settings.xml — without it the `even` variant is ignored. */
17
- readonly evenAndOddHeaders: boolean;
18
- /** Whether this section enables first-page header/footer furniture (`w:titlePg`). */
19
- readonly titlePage: boolean;
20
- }
21
- /**
22
- * One resolved furniture slot with enough metadata for "Same as previous" chrome.
23
- *
24
- * `inherited: true` means this section has no declared reference for the slot and the
25
- * part comes from a predecessor. The first section never reports inherited — omitting a
26
- * ref there is blank furniture, not inheritance from a later section.
27
- */
28
- interface HeaderFooterSlotMeta {
29
- readonly part: OoxmlPart;
30
- readonly partName: string;
31
- readonly rId: string;
32
- readonly inherited: boolean;
33
- }
34
- /** Per-section resolution including declared-vs-inherited metadata. */
35
- interface HeaderFooterSectionResolution {
36
- readonly headers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
37
- readonly footers: ReadonlyMap<HeaderFooterVariant, HeaderFooterSlotMeta>;
38
- readonly evenAndOddHeaders: boolean;
39
- readonly titlePage: boolean;
40
- }
41
- /**
42
- * `w:sectPr` nodes in section order, aligned with layout's `enumerateDocumentSections`.
43
- *
44
- * `null` means a section with no `w:sectPr` node (Word defaults, inherits HF from previous).
45
- * Paragraph-level breaks first; the final entry covers remaining blocks (body-level or null).
46
- */
47
- declare function collectSectionPropertyNodes(root: OoxmlNode): Array<OoxmlElement | null>;
48
- /**
49
- * Resolve header/footer parts for every section with declared-vs-inherited metadata.
50
- *
51
- * Index aligns with `enumerateDocumentSections` in the layout package. Existing merged
52
- * maps stay available via {@link resolveHeaderFooterPartsBySection}.
53
- */
54
- declare function resolveHeaderFooterResolutionBySection(pkg: OoxmlPackage): readonly HeaderFooterSectionResolution[];
55
- /**
56
- * Resolve header/footer parts for every section, applying OOXML inheritance.
57
- *
58
- * Index aligns with `enumerateDocumentSections` in the layout package.
59
- */
60
- declare function resolveHeaderFooterPartsBySection(pkg: OoxmlPackage): readonly HeaderFooterParts[];
61
- /**
62
- * Resolve the main-document header/footer references to their parts, gated by the
63
- * settings the section actually declares.
64
- *
65
- * Returns the FINAL section's effective parts (after inheritance). Multi-section hosts
66
- * should prefer `resolveHeaderFooterPartsBySection`.
67
- */
68
- declare function resolveHeaderFooterParts(pkg: OoxmlPackage): HeaderFooterParts;
69
-
70
- export { type HeaderFooterVariant as H, type HeaderFooterParts as a, type HeaderFooterSectionResolution as b, type HeaderFooterKind as c, type HeaderFooterSlotMeta as d, collectSectionPropertyNodes as e, resolveHeaderFooterPartsBySection as f, resolveHeaderFooterResolutionBySection as g, resolveHeaderFooterParts as r };
@@ -1,108 +0,0 @@
1
- import { a as OoxmlNode, d as OoxmlParagraphNode, e as OoxmlNoteNode, f as OoxmlContinuationSeparatorNode, g as OoxmlEndnotesNode, h as OoxmlFootnotesNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, k as OoxmlSeparatorNode } from './ooxml-package-CdEy9ufK.js';
2
-
3
- /** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
4
- declare const NOTE_ATOM_CHAR = "\uFFFC";
5
- /** Signed 32-bit Word-compatible note id range (positive allocation only). */
6
- declare const NOTE_ID_MIN = 1;
7
- /** Largest note id Word accepts — signed 32-bit. */
8
- declare const NOTE_ID_MAX = 2147483647;
9
- /** Reserved separator / continuation ids — never allocated for normal notes. */
10
- declare const NOTE_SEPARATOR_ID = -1;
11
- /** Reserved id of the continuation-separator entry. Never allocated to a real note. */
12
- declare const NOTE_CONTINUATION_SEPARATOR_ID = 0;
13
- /** Which notes part a note lives in. Decides both placement and numbering rules. */
14
- type NoteKind = 'footnote' | 'endnote';
15
- /** Authored `ST_FtnEdn` including explicit `normal`. Absent means Word default (normal). */
16
- /**
17
- * What a note entry IS.
18
- *
19
- * Only `normal` is a note a reader sees. The others are the furniture Word stores in the same
20
- * part — the rules and notices drawn around the note area — reached by reserved ids.
21
- */
22
- type NoteType = 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
23
- /** Parse a signed decimal note id; reject non-integers and out-of-int32 values. */
24
- declare function parseNoteId(raw: string | undefined): number | null;
25
- /**
26
- * Canonical `EditorScope { kind: 'note'; id }` encoding.
27
- *
28
- * Footnote id `1` and endnote id `1` coexist, so the kind is part of the string:
29
- * `footnote:2` / `endnote:-1`. Do not invent a parallel scope union arm.
30
- */
31
- declare function formatNoteScopeId(noteKind: NoteKind, noteId: number): string;
32
- /**
33
- * Parse {@link formatNoteScopeId}. Returns `null` for malformed / out-of-range ids.
34
- */
35
- declare function parseNoteScopeId(id: string): {
36
- readonly noteKind: NoteKind;
37
- readonly noteId: number;
38
- } | null;
39
- /** Whether a node is a `w:footnotes` part root. */
40
- declare function isFootnotesNode(node: OoxmlNode): node is OoxmlFootnotesNode;
41
- /** Whether a node is a `w:endnotes` part root. */
42
- declare function isEndnotesNode(node: OoxmlNode): node is OoxmlEndnotesNode;
43
- /** Whether a node is a `w:footnote` or `w:endnote` body. */
44
- declare function isNoteNode(node: OoxmlNode): node is OoxmlNoteNode;
45
- /** Whether a node is a body-side `w:footnoteReference` / `w:endnoteReference`. */
46
- declare function isNoteReferenceNode(node: OoxmlNode): node is OoxmlNoteReferenceNode;
47
- /** Whether a node is the `w:footnoteRef` / `w:endnoteRef` mark inside a note's own body. */
48
- declare function isNoteRefNode(node: OoxmlNode): node is OoxmlNoteRefNode;
49
- /** Whether a node is the `w:separator` rule drawn above the note area. */
50
- declare function isSeparatorNode(node: OoxmlNode): node is OoxmlSeparatorNode;
51
- /** Whether a node is the `w:continuationSeparator` rule used on continuation pages. */
52
- declare function isContinuationSeparatorNode(node: OoxmlNode): node is OoxmlContinuationSeparatorNode;
53
- /** Typed or generic `w:footnote` / `w:endnote`. */
54
- declare function noteKindOf(node: OoxmlNode): NoteKind | null;
55
- /** Authored `@w:id` on a note or noteReference when parseable. */
56
- declare function noteIdOf(node: OoxmlNode): number | null;
57
- /** Authored `@w:type` (`ST_FtnEdn`) when present and schema-legal; else `undefined`. */
58
- declare function noteTypeOf(node: OoxmlNode): NoteType | undefined;
59
- /** Whether a note is a normal (body) note — absent type and explicit `normal` both count. */
60
- declare function isNormalNote(node: OoxmlNode): boolean;
61
- /** Typed or generic footnote/endnote reference kind. */
62
- declare function noteReferenceKindOf(node: OoxmlNode): NoteKind | null;
63
- /** Typed or generic `w:footnoteRef` / `w:endnoteRef`. */
64
- declare function noteRefKindOf(node: OoxmlNode): NoteKind | null;
65
- /**
66
- * Read `@w:customMarkFollows` on a note reference.
67
- * Returns `undefined` when absent; otherwise the OOXML on/off interpretation.
68
- */
69
- declare function customMarkFollows(node: OoxmlNode): boolean | undefined;
70
- /** Model text contributed by one atomic note unit. */
71
- declare function noteAtomText(): typeof NOTE_ATOM_CHAR;
72
- /**
73
- * True when a run-inner node is a typed note atom that contributes one UTF-16 unit.
74
- * Demoted/malformed known locals stay generic and contribute nothing.
75
- */
76
- declare function isNoteAtomNode(node: OoxmlNode): boolean;
77
- /**
78
- * One atomic note span inside a paragraph for caret / delete / selection.
79
- *
80
- * Each typed note atom is a single-node span (`removeNodeIds` = that node).
81
- */
82
- interface AtomicNoteSpan {
83
- readonly kind: 'noteReference' | 'noteRef' | 'separator' | 'continuationSeparator';
84
- readonly node: OoxmlNode;
85
- readonly runId: string;
86
- readonly removeNodeIds: readonly string[];
87
- }
88
- /**
89
- * Collect typed note atoms in document order (one segment each).
90
- *
91
- * Walks the same paragraph-inline surface as `segmentsOf` / `walkParagraphInline`:
92
- * hyperlinks and content controls flatten; only direct run children contribute atoms.
93
- * A demoted run-inner SDT husk stays opaque — no phantom addressable hit.
94
- */
95
- declare function atomicNoteSpansOf(paragraph: OoxmlParagraphNode): readonly AtomicNoteSpan[];
96
- /** Cap on notes scanned when allocating / indexing a notes part. */
97
- declare const MAX_NOTES_PER_PART = 10000;
98
- /**
99
- * Allocate the next positive signed 32-bit note id for a notes-part root.
100
- * Seeds from `max(existing)+1`; never returns ≤0; `null` on exhaustion.
101
- */
102
- declare function allocateNoteId(notesRoot: OoxmlNode): number | null;
103
- /** Collect note bodies from a footnotes/endnotes root, bounded. */
104
- declare function notesOf(root: OoxmlNode): readonly OoxmlNoteNode[];
105
- /** Find a typed note by id inside a notes-part root. */
106
- declare function findNoteById(root: OoxmlNode, noteId: number): OoxmlNoteNode | undefined;
107
-
108
- export { type AtomicNoteSpan as A, notesOf as B, parseNoteId as C, parseNoteScopeId as D, MAX_NOTES_PER_PART as M, type NoteKind as N, NOTE_ATOM_CHAR as a, NOTE_CONTINUATION_SEPARATOR_ID as b, NOTE_ID_MAX as c, NOTE_ID_MIN as d, NOTE_SEPARATOR_ID as e, type NoteType as f, allocateNoteId as g, atomicNoteSpansOf as h, customMarkFollows as i, findNoteById as j, formatNoteScopeId as k, isContinuationSeparatorNode as l, isEndnotesNode as m, noteTypeOf as n, isFootnotesNode as o, isNormalNote as p, isNoteAtomNode as q, isNoteNode as r, isNoteRefNode as s, isNoteReferenceNode as t, isSeparatorNode as u, noteAtomText as v, noteIdOf as w, noteKindOf as x, noteRefKindOf as y, noteReferenceKindOf as z };
@@ -1,108 +0,0 @@
1
- import { a as OoxmlNode, d as OoxmlParagraphNode, e as OoxmlNoteNode, f as OoxmlContinuationSeparatorNode, g as OoxmlEndnotesNode, h as OoxmlFootnotesNode, i as OoxmlNoteRefNode, j as OoxmlNoteReferenceNode, k as OoxmlSeparatorNode } from './ooxml-package-CdEy9ufK.cjs';
2
-
3
- /** UTF-16 placeholder for one atomic note unit in `paragraphTextOf` / segments. */
4
- declare const NOTE_ATOM_CHAR = "\uFFFC";
5
- /** Signed 32-bit Word-compatible note id range (positive allocation only). */
6
- declare const NOTE_ID_MIN = 1;
7
- /** Largest note id Word accepts — signed 32-bit. */
8
- declare const NOTE_ID_MAX = 2147483647;
9
- /** Reserved separator / continuation ids — never allocated for normal notes. */
10
- declare const NOTE_SEPARATOR_ID = -1;
11
- /** Reserved id of the continuation-separator entry. Never allocated to a real note. */
12
- declare const NOTE_CONTINUATION_SEPARATOR_ID = 0;
13
- /** Which notes part a note lives in. Decides both placement and numbering rules. */
14
- type NoteKind = 'footnote' | 'endnote';
15
- /** Authored `ST_FtnEdn` including explicit `normal`. Absent means Word default (normal). */
16
- /**
17
- * What a note entry IS.
18
- *
19
- * Only `normal` is a note a reader sees. The others are the furniture Word stores in the same
20
- * part — the rules and notices drawn around the note area — reached by reserved ids.
21
- */
22
- type NoteType = 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
23
- /** Parse a signed decimal note id; reject non-integers and out-of-int32 values. */
24
- declare function parseNoteId(raw: string | undefined): number | null;
25
- /**
26
- * Canonical `EditorScope { kind: 'note'; id }` encoding.
27
- *
28
- * Footnote id `1` and endnote id `1` coexist, so the kind is part of the string:
29
- * `footnote:2` / `endnote:-1`. Do not invent a parallel scope union arm.
30
- */
31
- declare function formatNoteScopeId(noteKind: NoteKind, noteId: number): string;
32
- /**
33
- * Parse {@link formatNoteScopeId}. Returns `null` for malformed / out-of-range ids.
34
- */
35
- declare function parseNoteScopeId(id: string): {
36
- readonly noteKind: NoteKind;
37
- readonly noteId: number;
38
- } | null;
39
- /** Whether a node is a `w:footnotes` part root. */
40
- declare function isFootnotesNode(node: OoxmlNode): node is OoxmlFootnotesNode;
41
- /** Whether a node is a `w:endnotes` part root. */
42
- declare function isEndnotesNode(node: OoxmlNode): node is OoxmlEndnotesNode;
43
- /** Whether a node is a `w:footnote` or `w:endnote` body. */
44
- declare function isNoteNode(node: OoxmlNode): node is OoxmlNoteNode;
45
- /** Whether a node is a body-side `w:footnoteReference` / `w:endnoteReference`. */
46
- declare function isNoteReferenceNode(node: OoxmlNode): node is OoxmlNoteReferenceNode;
47
- /** Whether a node is the `w:footnoteRef` / `w:endnoteRef` mark inside a note's own body. */
48
- declare function isNoteRefNode(node: OoxmlNode): node is OoxmlNoteRefNode;
49
- /** Whether a node is the `w:separator` rule drawn above the note area. */
50
- declare function isSeparatorNode(node: OoxmlNode): node is OoxmlSeparatorNode;
51
- /** Whether a node is the `w:continuationSeparator` rule used on continuation pages. */
52
- declare function isContinuationSeparatorNode(node: OoxmlNode): node is OoxmlContinuationSeparatorNode;
53
- /** Typed or generic `w:footnote` / `w:endnote`. */
54
- declare function noteKindOf(node: OoxmlNode): NoteKind | null;
55
- /** Authored `@w:id` on a note or noteReference when parseable. */
56
- declare function noteIdOf(node: OoxmlNode): number | null;
57
- /** Authored `@w:type` (`ST_FtnEdn`) when present and schema-legal; else `undefined`. */
58
- declare function noteTypeOf(node: OoxmlNode): NoteType | undefined;
59
- /** Whether a note is a normal (body) note — absent type and explicit `normal` both count. */
60
- declare function isNormalNote(node: OoxmlNode): boolean;
61
- /** Typed or generic footnote/endnote reference kind. */
62
- declare function noteReferenceKindOf(node: OoxmlNode): NoteKind | null;
63
- /** Typed or generic `w:footnoteRef` / `w:endnoteRef`. */
64
- declare function noteRefKindOf(node: OoxmlNode): NoteKind | null;
65
- /**
66
- * Read `@w:customMarkFollows` on a note reference.
67
- * Returns `undefined` when absent; otherwise the OOXML on/off interpretation.
68
- */
69
- declare function customMarkFollows(node: OoxmlNode): boolean | undefined;
70
- /** Model text contributed by one atomic note unit. */
71
- declare function noteAtomText(): typeof NOTE_ATOM_CHAR;
72
- /**
73
- * True when a run-inner node is a typed note atom that contributes one UTF-16 unit.
74
- * Demoted/malformed known locals stay generic and contribute nothing.
75
- */
76
- declare function isNoteAtomNode(node: OoxmlNode): boolean;
77
- /**
78
- * One atomic note span inside a paragraph for caret / delete / selection.
79
- *
80
- * Each typed note atom is a single-node span (`removeNodeIds` = that node).
81
- */
82
- interface AtomicNoteSpan {
83
- readonly kind: 'noteReference' | 'noteRef' | 'separator' | 'continuationSeparator';
84
- readonly node: OoxmlNode;
85
- readonly runId: string;
86
- readonly removeNodeIds: readonly string[];
87
- }
88
- /**
89
- * Collect typed note atoms in document order (one segment each).
90
- *
91
- * Walks the same paragraph-inline surface as `segmentsOf` / `walkParagraphInline`:
92
- * hyperlinks and content controls flatten; only direct run children contribute atoms.
93
- * A demoted run-inner SDT husk stays opaque — no phantom addressable hit.
94
- */
95
- declare function atomicNoteSpansOf(paragraph: OoxmlParagraphNode): readonly AtomicNoteSpan[];
96
- /** Cap on notes scanned when allocating / indexing a notes part. */
97
- declare const MAX_NOTES_PER_PART = 10000;
98
- /**
99
- * Allocate the next positive signed 32-bit note id for a notes-part root.
100
- * Seeds from `max(existing)+1`; never returns ≤0; `null` on exhaustion.
101
- */
102
- declare function allocateNoteId(notesRoot: OoxmlNode): number | null;
103
- /** Collect note bodies from a footnotes/endnotes root, bounded. */
104
- declare function notesOf(root: OoxmlNode): readonly OoxmlNoteNode[];
105
- /** Find a typed note by id inside a notes-part root. */
106
- declare function findNoteById(root: OoxmlNode, noteId: number): OoxmlNoteNode | undefined;
107
-
108
- export { type AtomicNoteSpan as A, notesOf as B, parseNoteId as C, parseNoteScopeId as D, MAX_NOTES_PER_PART as M, type NoteKind as N, NOTE_ATOM_CHAR as a, NOTE_CONTINUATION_SEPARATOR_ID as b, NOTE_ID_MAX as c, NOTE_ID_MIN as d, NOTE_SEPARATOR_ID as e, type NoteType as f, allocateNoteId as g, atomicNoteSpansOf as h, customMarkFollows as i, findNoteById as j, formatNoteScopeId as k, isContinuationSeparatorNode as l, isEndnotesNode as m, noteTypeOf as n, isFootnotesNode as o, isNormalNote as p, isNoteAtomNode as q, isNoteNode as r, isNoteRefNode as s, isNoteReferenceNode as t, isSeparatorNode as u, noteAtomText as v, noteIdOf as w, noteKindOf as x, noteRefKindOf as y, noteReferenceKindOf as z };