docx 9.10.0 → 9.11.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.
package/dist/index.d.cts CHANGED
@@ -3617,8 +3617,33 @@ export declare class EndnoteReference extends EmptyElement {
3617
3617
  constructor();
3618
3618
  }
3619
3619
 
3620
+ /**
3621
+ * A run with an endnote's reference mark, its number, in the document's text.
3622
+ *
3623
+ * It refers to one of the document's `endnotes` by its id, or is given its endnote's content, for an endnote of its
3624
+ * own, which is added to the document's endnotes when the run is written.
3625
+ *
3626
+ * @publicApi
3627
+ *
3628
+ * @example
3629
+ * ```typescript
3630
+ * new Paragraph({
3631
+ * children: [new TextRun("A claim"), new EndnoteReferenceRun({ children: [new Paragraph("Its source.")] })],
3632
+ * });
3633
+ * ```
3634
+ */
3620
3635
  export declare class EndnoteReferenceRun extends Run {
3621
- constructor(id: number);
3636
+ private readonly endnote?;
3637
+ /**
3638
+ * @param endnote - The id of one of the document's `endnotes`, or the endnote's content, for an endnote of the run's
3639
+ * own. Word has endnotes only in a document's body, so a run with its endnote's content is left out of headers,
3640
+ * footers, comments and notes
3641
+ */
3642
+ constructor(endnote: number | NoteContent);
3643
+ /**
3644
+ * Formats the run, with its own endnote added to the document's endnotes, and referred to by the id it has there.
3645
+ */
3646
+ prepForXml(context: IContext): IXmlableObject | undefined;
3622
3647
  }
3623
3648
 
3624
3649
  export declare class EndnoteReferenceRunAttributes extends XmlAttributeComponent<{
@@ -3630,8 +3655,22 @@ export declare class EndnoteReferenceRunAttributes extends XmlAttributeComponent
3630
3655
  }
3631
3656
 
3632
3657
  export declare class Endnotes extends XmlComponent {
3658
+ private readonly ownNotes;
3659
+ private highestId;
3633
3660
  constructor();
3634
3661
  createEndnote(id: number, paragraph: readonly Paragraph[]): void;
3662
+ /**
3663
+ * The id of the endnote that a reference run brings with it, which is added to the endnotes the first time the run
3664
+ * is written, with an id no other endnote has. Word has endnotes only in a document's body, so a run written
3665
+ * anywhere else, such as in a header, has none, and its endnote isn't added.
3666
+ *
3667
+ * @internal
3668
+ * @param reference - The run, which has the same endnote each time it is written
3669
+ * @param endnote - The endnote's content
3670
+ * @param context - The context the run is written in
3671
+ * @returns The endnote's id, or undefined outside the document's body
3672
+ */
3673
+ idOf(reference: object, endnote: NoteContent, context: IContext): number | undefined;
3635
3674
  /**
3636
3675
  * Formats the endnotes, with the page numbers worked out for their document written into their fields, when the
3637
3676
  * document's body is written with an estimate of its pages.
@@ -4162,6 +4201,10 @@ export declare class FootnoteReferenceElement extends EmptyElement {
4162
4201
  * (typically a superscript number) that appears in the main document text.
4163
4202
  * Clicking this marker navigates to the corresponding footnote content.
4164
4203
  *
4204
+ * It refers to one of the document's `footnotes` by its id, or is given its footnote's content, for a footnote of its
4205
+ * own, which is added to the document's footnotes when the run is written. Content made before the document it goes
4206
+ * in, such as by a function that makes paragraphs, then brings its footnotes with it.
4207
+ *
4165
4208
  * Reference: http://officeopenxml.com/WPfootnotes.php
4166
4209
  *
4167
4210
  * @publicApi
@@ -4175,15 +4218,30 @@ export declare class FootnoteReferenceElement extends EmptyElement {
4175
4218
  * new FootnoteReferenceRun(1),
4176
4219
  * ],
4177
4220
  * });
4221
+ *
4222
+ * // Or with the footnote's content
4223
+ * new Paragraph({
4224
+ * children: [
4225
+ * new TextRun("This text has a footnote of its own"),
4226
+ * new FootnoteReferenceRun({ children: [new Paragraph("The footnote.")] }),
4227
+ * ],
4228
+ * });
4178
4229
  * ```
4179
4230
  */
4180
4231
  export declare class FootnoteReferenceRun extends Run {
4232
+ private readonly footnote?;
4181
4233
  /**
4182
4234
  * Creates a new footnote reference run.
4183
4235
  *
4184
- * @param id - Unique identifier linking to the footnote content
4236
+ * @param footnote - The id of one of the document's `footnotes`, or the footnote's content, for a footnote of the
4237
+ * run's own. Word has footnotes only in a document's body, so a run with its footnote's content is left out of
4238
+ * headers, footers, comments and notes
4185
4239
  */
4186
- constructor(id: number);
4240
+ constructor(footnote: number | NoteContent);
4241
+ /**
4242
+ * Formats the run, with its own footnote added to the document's footnotes, and referred to by the id it has there.
4243
+ */
4244
+ prepForXml(context: IContext): IXmlableObject | undefined;
4187
4245
  }
4188
4246
 
4189
4247
  /**
@@ -4243,6 +4301,8 @@ export declare class FootNoteReferenceRunAttributes extends XmlAttributeComponen
4243
4301
  * ```
4244
4302
  */
4245
4303
  export declare class FootNotes extends XmlComponent {
4304
+ private readonly ownNotes;
4305
+ private highestId;
4246
4306
  constructor();
4247
4307
  /**
4248
4308
  * Creates and adds a new footnote to the collection.
@@ -4251,6 +4311,18 @@ export declare class FootNotes extends XmlComponent {
4251
4311
  * @param paragraph - Array of paragraphs that make up the footnote content
4252
4312
  */
4253
4313
  createFootNote(id: number, paragraph: readonly Paragraph[]): void;
4314
+ /**
4315
+ * The id of the footnote that a reference run brings with it, which is added to the footnotes the first time the
4316
+ * run is written, with an id no other footnote has. Word has footnotes only in a document's body, so a run written
4317
+ * anywhere else, such as in a header, has none, and its footnote isn't added.
4318
+ *
4319
+ * @internal
4320
+ * @param reference - The run, which has the same footnote each time it is written
4321
+ * @param footnote - The footnote's content
4322
+ * @param context - The context the run is written in
4323
+ * @returns The footnote's id, or undefined outside the document's body
4324
+ */
4325
+ idOf(reference: object, footnote: NoteContent, context: IContext): number | undefined;
4254
4326
  /**
4255
4327
  * Formats the footnotes, with the page numbers worked out for their document written into their fields, when the
4256
4328
  * document's body is written with an estimate of its pages.
@@ -6545,12 +6617,7 @@ export declare type INumberedItemReferenceOptions = {
6545
6617
  */
6546
6618
  export declare type INumberingOptions = {
6547
6619
  /** Array of numbering configurations, each with levels and a reference name. */
6548
- readonly config: readonly {
6549
- /** Array of level definitions for this numbering configuration. */
6550
- readonly levels: readonly ILevelsOptions[];
6551
- /** Unique reference name for this numbering configuration. */
6552
- readonly reference: string;
6553
- }[];
6620
+ readonly config: readonly NumberingDefinition[];
6554
6621
  };
6555
6622
 
6556
6623
  /**
@@ -6866,8 +6933,13 @@ export declare type IParagraphStylePropertiesOptions = {
6866
6933
  readonly shading?: IShadingAttributesProperties;
6867
6934
  /** Numbering configuration for lists, or false to remove numbering */
6868
6935
  readonly numbering?: {
6869
- /** Reference ID of the numbering definition to use */
6870
- readonly reference: string;
6936
+ /**
6937
+ * The list the paragraph is in: the reference of one of the document's `numbering` configs, or a list's
6938
+ * definition, its reference and its levels, for a list the document's `numbering` option doesn't have.
6939
+ * The definition is added to the document's numbering when the paragraph is written, unless it already has
6940
+ * a list with that reference, which is kept
6941
+ */
6942
+ readonly reference: string | NumberingDefinition;
6871
6943
  /** Level in the numbering hierarchy (0-8) */
6872
6944
  readonly level: number;
6873
6945
  /** Instance number for multiple lists with same reference */
@@ -7045,7 +7117,13 @@ export declare type IRunStylePropertiesOptions = {
7045
7117
  readonly language?: ILanguageOptions;
7046
7118
  readonly border?: IBorderOptions;
7047
7119
  readonly snapToGrid?: boolean;
7120
+ /** Hides the text. `false` shows text that the run's style hides. */
7048
7121
  readonly vanish?: boolean;
7122
+ /**
7123
+ * Keeps a hidden paragraph mark hidden even when hidden text is shown, so its paragraph always runs on into the next one,
7124
+ * as Word's style separator does. It is meant for a paragraph's mark, with `vanish`:
7125
+ * `new Paragraph({ run: { vanish: true, specVanish: true } })`. Without `vanish`, Word doesn't hide the mark.
7126
+ */
7049
7127
  readonly specVanish?: boolean;
7050
7128
  readonly scale?: number;
7051
7129
  readonly math?: boolean;
@@ -8500,9 +8578,9 @@ export declare const LineNumberRestartFormat: {
8500
8578
  export declare const LineRuleType: {
8501
8579
  /** Line spacing is at least the specified value */
8502
8580
  readonly AT_LEAST: "atLeast";
8503
- /** Line spacing is exactly the specified value */
8581
+ /** Writes `exactly`, which isn't a value the schema allows, so Word ignores it. Use {@link LineRuleType.EXACT} for an exact line height. */
8504
8582
  readonly EXACTLY: "exactly";
8505
- /** Line spacing is exactly the specified value (alias for EXACTLY) */
8583
+ /** Line spacing is exactly the specified value */
8506
8584
  readonly EXACT: "exact";
8507
8585
  /** Line spacing is automatically determined based on content */
8508
8586
  readonly AUTO: "auto";
@@ -9503,6 +9581,18 @@ export declare type NonVisualDrawingPropertiesOptions = DrawingLinkOptions & {
9503
9581
  readonly title?: string;
9504
9582
  };
9505
9583
 
9584
+ /**
9585
+ * A footnote's or endnote's content: its paragraphs.
9586
+ *
9587
+ * A {@link FootnoteReferenceRun} or {@link EndnoteReferenceRun} can be given its note's content, rather than the id of
9588
+ * one of the document's `footnotes` or `endnotes`, for a note of its own. The note is added to the document's notes,
9589
+ * with an id none of them has, when the run is written in the document's body.
9590
+ */
9591
+ export declare type NoteContent = {
9592
+ /** The note's paragraphs */
9593
+ readonly children: readonly Paragraph[];
9594
+ };
9595
+
9506
9596
  /**
9507
9597
  * When the footnote or endnote numbering restarts.
9508
9598
  *
@@ -9766,8 +9856,11 @@ export declare class Numbering extends XmlComponent {
9766
9856
  *
9767
9857
  * @param reference - The reference name of the abstract numbering definition
9768
9858
  * @param instance - The instance number for this concrete numbering
9859
+ * @param definition - The list's definition, for a list a paragraph gives its own definition of. It is added with
9860
+ * its reference, unless the numbering already has a list with that reference, such as one of the document's
9861
+ * `numbering` option, which is kept
9769
9862
  */
9770
- createConcreteNumberingInstance(reference: string, instance: number): void;
9863
+ createConcreteNumberingInstance(reference: string, instance: number, definition?: NumberingDefinition): void;
9771
9864
  /**
9772
9865
  * Gets all concrete numbering instances.
9773
9866
  *
@@ -9782,6 +9875,22 @@ export declare class Numbering extends XmlComponent {
9782
9875
  get ReferenceConfig(): readonly Record<string, any>[];
9783
9876
  }
9784
9877
 
9878
+ /**
9879
+ * A list's definition: its reference and its levels.
9880
+ *
9881
+ * A document's `numbering` option has a definition for each of its lists. A paragraph can also be given a list's
9882
+ * definition as its `numbering`'s `reference`, for a list the document's `numbering` option doesn't have, which is added
9883
+ * to the document's numbering when the paragraph is written.
9884
+ *
9885
+ * @see {@link Numbering}
9886
+ */
9887
+ export declare type NumberingDefinition = {
9888
+ /** Array of level definitions for this numbering configuration. */
9889
+ readonly levels: readonly ILevelsOptions[];
9890
+ /** Unique reference name for this numbering configuration. */
9891
+ readonly reference: string;
9892
+ };
9893
+
9785
9894
  /**
9786
9895
  * Represents numbering properties for a paragraph.
9787
9896
  *
@@ -10915,7 +11024,7 @@ declare type PatchDetectorOptions = {
10915
11024
  *
10916
11025
  * @publicApi
10917
11026
  */
10918
- export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDocumentOutputType>({ outputType, data, patches, keepOriginalStyles, placeholderDelimiters, recursive, footnotes, endnotes, pageNumbers, }: PatchDocumentOptions<T>) => Promise<OutputByType[T]>;
11027
+ export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDocumentOutputType>({ outputType, data, patches, keepOriginalStyles, placeholderDelimiters, recursive, footnotes, endnotes, numbering, pageNumbers, }: PatchDocumentOptions<T>) => Promise<OutputByType[T]>;
10919
11028
 
10920
11029
  /**
10921
11030
  * Options for patching a document.
@@ -10928,6 +11037,7 @@ export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDo
10928
11037
  * @property recursive - Whether to replace every occurrence of a placeholder in a paragraph, rather than only the first
10929
11038
  * @property footnotes - The footnotes that patches refer to with a `FootnoteReferenceRun`
10930
11039
  * @property endnotes - The endnotes that patches refer to with an `EndnoteReferenceRun`
11040
+ * @property numbering - The lists that the paragraphs in patches use, by their references
10931
11041
  * @property pageNumbers - Works out the page each bookmark is on, to write the page numbers of page references
10932
11042
  */
10933
11043
  export declare type PatchDocumentOptions<T extends PatchDocumentOutputType = PatchDocumentOutputType> = {
@@ -10960,6 +11070,12 @@ export declare type PatchDocumentOptions<T extends PatchDocumentOutputType = Pat
10960
11070
  readonly endnotes?: Readonly<Record<string, {
10961
11071
  readonly children: readonly Paragraph[];
10962
11072
  }>>;
11073
+ /**
11074
+ * The lists that the paragraphs in patches use, as in a `Document`. A paragraph is put in one with
11075
+ * `numbering: { reference, level }`. Each list that patches use is added to the document's numbering, with ids that
11076
+ * none of the template's lists have, and so is the bullet list of `bullet` paragraphs
11077
+ */
11078
+ readonly numbering?: INumberingOptions;
10963
11079
  /**
10964
11080
  * Works out the page each bookmark of the patched document is on, and how many pages it has, so the page numbers of
10965
11081
  * its tables of contents and page references, and its numbers of pages, are written with it, rather than left as they
package/dist/index.d.ts CHANGED
@@ -3617,8 +3617,33 @@ export declare class EndnoteReference extends EmptyElement {
3617
3617
  constructor();
3618
3618
  }
3619
3619
 
3620
+ /**
3621
+ * A run with an endnote's reference mark, its number, in the document's text.
3622
+ *
3623
+ * It refers to one of the document's `endnotes` by its id, or is given its endnote's content, for an endnote of its
3624
+ * own, which is added to the document's endnotes when the run is written.
3625
+ *
3626
+ * @publicApi
3627
+ *
3628
+ * @example
3629
+ * ```typescript
3630
+ * new Paragraph({
3631
+ * children: [new TextRun("A claim"), new EndnoteReferenceRun({ children: [new Paragraph("Its source.")] })],
3632
+ * });
3633
+ * ```
3634
+ */
3620
3635
  export declare class EndnoteReferenceRun extends Run {
3621
- constructor(id: number);
3636
+ private readonly endnote?;
3637
+ /**
3638
+ * @param endnote - The id of one of the document's `endnotes`, or the endnote's content, for an endnote of the run's
3639
+ * own. Word has endnotes only in a document's body, so a run with its endnote's content is left out of headers,
3640
+ * footers, comments and notes
3641
+ */
3642
+ constructor(endnote: number | NoteContent);
3643
+ /**
3644
+ * Formats the run, with its own endnote added to the document's endnotes, and referred to by the id it has there.
3645
+ */
3646
+ prepForXml(context: IContext): IXmlableObject | undefined;
3622
3647
  }
3623
3648
 
3624
3649
  export declare class EndnoteReferenceRunAttributes extends XmlAttributeComponent<{
@@ -3630,8 +3655,22 @@ export declare class EndnoteReferenceRunAttributes extends XmlAttributeComponent
3630
3655
  }
3631
3656
 
3632
3657
  export declare class Endnotes extends XmlComponent {
3658
+ private readonly ownNotes;
3659
+ private highestId;
3633
3660
  constructor();
3634
3661
  createEndnote(id: number, paragraph: readonly Paragraph[]): void;
3662
+ /**
3663
+ * The id of the endnote that a reference run brings with it, which is added to the endnotes the first time the run
3664
+ * is written, with an id no other endnote has. Word has endnotes only in a document's body, so a run written
3665
+ * anywhere else, such as in a header, has none, and its endnote isn't added.
3666
+ *
3667
+ * @internal
3668
+ * @param reference - The run, which has the same endnote each time it is written
3669
+ * @param endnote - The endnote's content
3670
+ * @param context - The context the run is written in
3671
+ * @returns The endnote's id, or undefined outside the document's body
3672
+ */
3673
+ idOf(reference: object, endnote: NoteContent, context: IContext): number | undefined;
3635
3674
  /**
3636
3675
  * Formats the endnotes, with the page numbers worked out for their document written into their fields, when the
3637
3676
  * document's body is written with an estimate of its pages.
@@ -4162,6 +4201,10 @@ export declare class FootnoteReferenceElement extends EmptyElement {
4162
4201
  * (typically a superscript number) that appears in the main document text.
4163
4202
  * Clicking this marker navigates to the corresponding footnote content.
4164
4203
  *
4204
+ * It refers to one of the document's `footnotes` by its id, or is given its footnote's content, for a footnote of its
4205
+ * own, which is added to the document's footnotes when the run is written. Content made before the document it goes
4206
+ * in, such as by a function that makes paragraphs, then brings its footnotes with it.
4207
+ *
4165
4208
  * Reference: http://officeopenxml.com/WPfootnotes.php
4166
4209
  *
4167
4210
  * @publicApi
@@ -4175,15 +4218,30 @@ export declare class FootnoteReferenceElement extends EmptyElement {
4175
4218
  * new FootnoteReferenceRun(1),
4176
4219
  * ],
4177
4220
  * });
4221
+ *
4222
+ * // Or with the footnote's content
4223
+ * new Paragraph({
4224
+ * children: [
4225
+ * new TextRun("This text has a footnote of its own"),
4226
+ * new FootnoteReferenceRun({ children: [new Paragraph("The footnote.")] }),
4227
+ * ],
4228
+ * });
4178
4229
  * ```
4179
4230
  */
4180
4231
  export declare class FootnoteReferenceRun extends Run {
4232
+ private readonly footnote?;
4181
4233
  /**
4182
4234
  * Creates a new footnote reference run.
4183
4235
  *
4184
- * @param id - Unique identifier linking to the footnote content
4236
+ * @param footnote - The id of one of the document's `footnotes`, or the footnote's content, for a footnote of the
4237
+ * run's own. Word has footnotes only in a document's body, so a run with its footnote's content is left out of
4238
+ * headers, footers, comments and notes
4185
4239
  */
4186
- constructor(id: number);
4240
+ constructor(footnote: number | NoteContent);
4241
+ /**
4242
+ * Formats the run, with its own footnote added to the document's footnotes, and referred to by the id it has there.
4243
+ */
4244
+ prepForXml(context: IContext): IXmlableObject | undefined;
4187
4245
  }
4188
4246
 
4189
4247
  /**
@@ -4243,6 +4301,8 @@ export declare class FootNoteReferenceRunAttributes extends XmlAttributeComponen
4243
4301
  * ```
4244
4302
  */
4245
4303
  export declare class FootNotes extends XmlComponent {
4304
+ private readonly ownNotes;
4305
+ private highestId;
4246
4306
  constructor();
4247
4307
  /**
4248
4308
  * Creates and adds a new footnote to the collection.
@@ -4251,6 +4311,18 @@ export declare class FootNotes extends XmlComponent {
4251
4311
  * @param paragraph - Array of paragraphs that make up the footnote content
4252
4312
  */
4253
4313
  createFootNote(id: number, paragraph: readonly Paragraph[]): void;
4314
+ /**
4315
+ * The id of the footnote that a reference run brings with it, which is added to the footnotes the first time the
4316
+ * run is written, with an id no other footnote has. Word has footnotes only in a document's body, so a run written
4317
+ * anywhere else, such as in a header, has none, and its footnote isn't added.
4318
+ *
4319
+ * @internal
4320
+ * @param reference - The run, which has the same footnote each time it is written
4321
+ * @param footnote - The footnote's content
4322
+ * @param context - The context the run is written in
4323
+ * @returns The footnote's id, or undefined outside the document's body
4324
+ */
4325
+ idOf(reference: object, footnote: NoteContent, context: IContext): number | undefined;
4254
4326
  /**
4255
4327
  * Formats the footnotes, with the page numbers worked out for their document written into their fields, when the
4256
4328
  * document's body is written with an estimate of its pages.
@@ -6545,12 +6617,7 @@ export declare type INumberedItemReferenceOptions = {
6545
6617
  */
6546
6618
  export declare type INumberingOptions = {
6547
6619
  /** Array of numbering configurations, each with levels and a reference name. */
6548
- readonly config: readonly {
6549
- /** Array of level definitions for this numbering configuration. */
6550
- readonly levels: readonly ILevelsOptions[];
6551
- /** Unique reference name for this numbering configuration. */
6552
- readonly reference: string;
6553
- }[];
6620
+ readonly config: readonly NumberingDefinition[];
6554
6621
  };
6555
6622
 
6556
6623
  /**
@@ -6866,8 +6933,13 @@ export declare type IParagraphStylePropertiesOptions = {
6866
6933
  readonly shading?: IShadingAttributesProperties;
6867
6934
  /** Numbering configuration for lists, or false to remove numbering */
6868
6935
  readonly numbering?: {
6869
- /** Reference ID of the numbering definition to use */
6870
- readonly reference: string;
6936
+ /**
6937
+ * The list the paragraph is in: the reference of one of the document's `numbering` configs, or a list's
6938
+ * definition, its reference and its levels, for a list the document's `numbering` option doesn't have.
6939
+ * The definition is added to the document's numbering when the paragraph is written, unless it already has
6940
+ * a list with that reference, which is kept
6941
+ */
6942
+ readonly reference: string | NumberingDefinition;
6871
6943
  /** Level in the numbering hierarchy (0-8) */
6872
6944
  readonly level: number;
6873
6945
  /** Instance number for multiple lists with same reference */
@@ -7045,7 +7117,13 @@ export declare type IRunStylePropertiesOptions = {
7045
7117
  readonly language?: ILanguageOptions;
7046
7118
  readonly border?: IBorderOptions;
7047
7119
  readonly snapToGrid?: boolean;
7120
+ /** Hides the text. `false` shows text that the run's style hides. */
7048
7121
  readonly vanish?: boolean;
7122
+ /**
7123
+ * Keeps a hidden paragraph mark hidden even when hidden text is shown, so its paragraph always runs on into the next one,
7124
+ * as Word's style separator does. It is meant for a paragraph's mark, with `vanish`:
7125
+ * `new Paragraph({ run: { vanish: true, specVanish: true } })`. Without `vanish`, Word doesn't hide the mark.
7126
+ */
7049
7127
  readonly specVanish?: boolean;
7050
7128
  readonly scale?: number;
7051
7129
  readonly math?: boolean;
@@ -8500,9 +8578,9 @@ export declare const LineNumberRestartFormat: {
8500
8578
  export declare const LineRuleType: {
8501
8579
  /** Line spacing is at least the specified value */
8502
8580
  readonly AT_LEAST: "atLeast";
8503
- /** Line spacing is exactly the specified value */
8581
+ /** Writes `exactly`, which isn't a value the schema allows, so Word ignores it. Use {@link LineRuleType.EXACT} for an exact line height. */
8504
8582
  readonly EXACTLY: "exactly";
8505
- /** Line spacing is exactly the specified value (alias for EXACTLY) */
8583
+ /** Line spacing is exactly the specified value */
8506
8584
  readonly EXACT: "exact";
8507
8585
  /** Line spacing is automatically determined based on content */
8508
8586
  readonly AUTO: "auto";
@@ -9503,6 +9581,18 @@ export declare type NonVisualDrawingPropertiesOptions = DrawingLinkOptions & {
9503
9581
  readonly title?: string;
9504
9582
  };
9505
9583
 
9584
+ /**
9585
+ * A footnote's or endnote's content: its paragraphs.
9586
+ *
9587
+ * A {@link FootnoteReferenceRun} or {@link EndnoteReferenceRun} can be given its note's content, rather than the id of
9588
+ * one of the document's `footnotes` or `endnotes`, for a note of its own. The note is added to the document's notes,
9589
+ * with an id none of them has, when the run is written in the document's body.
9590
+ */
9591
+ export declare type NoteContent = {
9592
+ /** The note's paragraphs */
9593
+ readonly children: readonly Paragraph[];
9594
+ };
9595
+
9506
9596
  /**
9507
9597
  * When the footnote or endnote numbering restarts.
9508
9598
  *
@@ -9766,8 +9856,11 @@ export declare class Numbering extends XmlComponent {
9766
9856
  *
9767
9857
  * @param reference - The reference name of the abstract numbering definition
9768
9858
  * @param instance - The instance number for this concrete numbering
9859
+ * @param definition - The list's definition, for a list a paragraph gives its own definition of. It is added with
9860
+ * its reference, unless the numbering already has a list with that reference, such as one of the document's
9861
+ * `numbering` option, which is kept
9769
9862
  */
9770
- createConcreteNumberingInstance(reference: string, instance: number): void;
9863
+ createConcreteNumberingInstance(reference: string, instance: number, definition?: NumberingDefinition): void;
9771
9864
  /**
9772
9865
  * Gets all concrete numbering instances.
9773
9866
  *
@@ -9782,6 +9875,22 @@ export declare class Numbering extends XmlComponent {
9782
9875
  get ReferenceConfig(): readonly Record<string, any>[];
9783
9876
  }
9784
9877
 
9878
+ /**
9879
+ * A list's definition: its reference and its levels.
9880
+ *
9881
+ * A document's `numbering` option has a definition for each of its lists. A paragraph can also be given a list's
9882
+ * definition as its `numbering`'s `reference`, for a list the document's `numbering` option doesn't have, which is added
9883
+ * to the document's numbering when the paragraph is written.
9884
+ *
9885
+ * @see {@link Numbering}
9886
+ */
9887
+ export declare type NumberingDefinition = {
9888
+ /** Array of level definitions for this numbering configuration. */
9889
+ readonly levels: readonly ILevelsOptions[];
9890
+ /** Unique reference name for this numbering configuration. */
9891
+ readonly reference: string;
9892
+ };
9893
+
9785
9894
  /**
9786
9895
  * Represents numbering properties for a paragraph.
9787
9896
  *
@@ -10915,7 +11024,7 @@ declare type PatchDetectorOptions = {
10915
11024
  *
10916
11025
  * @publicApi
10917
11026
  */
10918
- export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDocumentOutputType>({ outputType, data, patches, keepOriginalStyles, placeholderDelimiters, recursive, footnotes, endnotes, pageNumbers, }: PatchDocumentOptions<T>) => Promise<OutputByType[T]>;
11027
+ export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDocumentOutputType>({ outputType, data, patches, keepOriginalStyles, placeholderDelimiters, recursive, footnotes, endnotes, numbering, pageNumbers, }: PatchDocumentOptions<T>) => Promise<OutputByType[T]>;
10919
11028
 
10920
11029
  /**
10921
11030
  * Options for patching a document.
@@ -10928,6 +11037,7 @@ export declare const patchDocument: <T extends PatchDocumentOutputType = PatchDo
10928
11037
  * @property recursive - Whether to replace every occurrence of a placeholder in a paragraph, rather than only the first
10929
11038
  * @property footnotes - The footnotes that patches refer to with a `FootnoteReferenceRun`
10930
11039
  * @property endnotes - The endnotes that patches refer to with an `EndnoteReferenceRun`
11040
+ * @property numbering - The lists that the paragraphs in patches use, by their references
10931
11041
  * @property pageNumbers - Works out the page each bookmark is on, to write the page numbers of page references
10932
11042
  */
10933
11043
  export declare type PatchDocumentOptions<T extends PatchDocumentOutputType = PatchDocumentOutputType> = {
@@ -10960,6 +11070,12 @@ export declare type PatchDocumentOptions<T extends PatchDocumentOutputType = Pat
10960
11070
  readonly endnotes?: Readonly<Record<string, {
10961
11071
  readonly children: readonly Paragraph[];
10962
11072
  }>>;
11073
+ /**
11074
+ * The lists that the paragraphs in patches use, as in a `Document`. A paragraph is put in one with
11075
+ * `numbering: { reference, level }`. Each list that patches use is added to the document's numbering, with ids that
11076
+ * none of the template's lists have, and so is the bullet list of `bullet` paragraphs
11077
+ */
11078
+ readonly numbering?: INumberingOptions;
10963
11079
  /**
10964
11080
  * Works out the page each bookmark of the patched document is on, and how many pages it has, so the page numbers of
10965
11081
  * its tables of contents and page references, and its numbers of pages, are written with it, rather than left as they