postext 0.3.16 → 0.3.18
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/__tests__/columnBalancing.test.d.ts +2 -0
- package/dist/__tests__/columnBalancing.test.d.ts.map +1 -0
- package/dist/__tests__/columnBalancing.test.js +194 -0
- package/dist/__tests__/columnBalancing.test.js.map +1 -0
- package/dist/__tests__/createLayout.test.js +12 -13
- package/dist/__tests__/createLayout.test.js.map +1 -1
- package/dist/__tests__/defaults/resourceTypes.test.d.ts +2 -0
- package/dist/__tests__/defaults/resourceTypes.test.d.ts.map +1 -0
- package/dist/__tests__/defaults/resourceTypes.test.js +69 -0
- package/dist/__tests__/defaults/resourceTypes.test.js.map +1 -0
- package/dist/__tests__/exports.test.js +60 -0
- package/dist/__tests__/exports.test.js.map +1 -1
- package/dist/__tests__/parse/inlineRef.test.d.ts +2 -0
- package/dist/__tests__/parse/inlineRef.test.d.ts.map +1 -0
- package/dist/__tests__/parse/inlineRef.test.js +83 -0
- package/dist/__tests__/parse/inlineRef.test.js.map +1 -0
- package/dist/__tests__/parse/resourceDirective.test.d.ts +2 -0
- package/dist/__tests__/parse/resourceDirective.test.d.ts.map +1 -0
- package/dist/__tests__/parse/resourceDirective.test.js +55 -0
- package/dist/__tests__/parse/resourceDirective.test.js.map +1 -0
- package/dist/__tests__/pipeline/floatPlacement.test.d.ts +2 -0
- package/dist/__tests__/pipeline/floatPlacement.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/floatPlacement.test.js +262 -0
- package/dist/__tests__/pipeline/floatPlacement.test.js.map +1 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.d.ts +2 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.js +107 -0
- package/dist/__tests__/pipeline/inlineRefRender.test.js.map +1 -0
- package/dist/__tests__/pipeline/resourceNumbering.test.d.ts +2 -0
- package/dist/__tests__/pipeline/resourceNumbering.test.d.ts.map +1 -0
- package/dist/__tests__/pipeline/resourceNumbering.test.js +186 -0
- package/dist/__tests__/pipeline/resourceNumbering.test.js.map +1 -0
- package/dist/__tests__/singleInk.test.d.ts +2 -0
- package/dist/__tests__/singleInk.test.d.ts.map +1 -0
- package/dist/__tests__/singleInk.test.js +42 -0
- package/dist/__tests__/singleInk.test.js.map +1 -0
- package/dist/__tests__/table/model.test.d.ts +2 -0
- package/dist/__tests__/table/model.test.d.ts.map +1 -0
- package/dist/__tests__/table/model.test.js +187 -0
- package/dist/__tests__/table/model.test.js.map +1 -0
- package/dist/canvas-backend/blockRender.d.ts.map +1 -1
- package/dist/canvas-backend/blockRender.js +103 -66
- package/dist/canvas-backend/blockRender.js.map +1 -1
- package/dist/canvas-backend/decorations.d.ts +4 -1
- package/dist/canvas-backend/decorations.d.ts.map +1 -1
- package/dist/canvas-backend/decorations.js +14 -6
- package/dist/canvas-backend/decorations.js.map +1 -1
- package/dist/canvas-backend/headerFooter.d.ts +2 -2
- package/dist/canvas-backend/headerFooter.d.ts.map +1 -1
- package/dist/canvas-backend/headerFooter.js +62 -2
- package/dist/canvas-backend/headerFooter.js.map +1 -1
- package/dist/canvas-backend/index.d.ts +2 -0
- package/dist/canvas-backend/index.d.ts.map +1 -1
- package/dist/canvas-backend/index.js +20 -10
- package/dist/canvas-backend/index.js.map +1 -1
- package/dist/canvas-backend/renderResourceBlock.d.ts +28 -0
- package/dist/canvas-backend/renderResourceBlock.d.ts.map +1 -0
- package/dist/canvas-backend/renderResourceBlock.js +146 -0
- package/dist/canvas-backend/renderResourceBlock.js.map +1 -0
- package/dist/defaults/bodyText.d.ts.map +1 -1
- package/dist/defaults/bodyText.js +30 -0
- package/dist/defaults/bodyText.js.map +1 -1
- package/dist/defaults/captionStyle.d.ts +9 -0
- package/dist/defaults/captionStyle.d.ts.map +1 -0
- package/dist/defaults/captionStyle.js +74 -0
- package/dist/defaults/captionStyle.js.map +1 -0
- package/dist/defaults/debug.d.ts.map +1 -1
- package/dist/defaults/debug.js +6 -0
- package/dist/defaults/debug.js.map +1 -1
- package/dist/defaults/diagramStyle.d.ts +5 -0
- package/dist/defaults/diagramStyle.d.ts.map +1 -0
- package/dist/defaults/diagramStyle.js +29 -0
- package/dist/defaults/diagramStyle.js.map +1 -0
- package/dist/defaults/headerFooter.d.ts +20 -18
- package/dist/defaults/headerFooter.d.ts.map +1 -1
- package/dist/defaults/headerFooter.js +269 -165
- package/dist/defaults/headerFooter.js.map +1 -1
- package/dist/defaults/headings.d.ts +4 -0
- package/dist/defaults/headings.d.ts.map +1 -1
- package/dist/defaults/headings.js +65 -9
- package/dist/defaults/headings.js.map +1 -1
- package/dist/defaults/index.d.ts +5 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +29 -1
- package/dist/defaults/index.js.map +1 -1
- package/dist/defaults/resourceTypes.d.ts +8 -0
- package/dist/defaults/resourceTypes.d.ts.map +1 -0
- package/dist/defaults/resourceTypes.js +43 -0
- package/dist/defaults/resourceTypes.js.map +1 -0
- package/dist/defaults/shared.d.ts.map +1 -1
- package/dist/defaults/shared.js +40 -0
- package/dist/defaults/shared.js.map +1 -1
- package/dist/defaults/tableStyle.d.ts +11 -0
- package/dist/defaults/tableStyle.d.ts.map +1 -0
- package/dist/defaults/tableStyle.js +114 -0
- package/dist/defaults/tableStyle.js.map +1 -0
- package/dist/design/layout.d.ts +94 -0
- package/dist/design/layout.d.ts.map +1 -0
- package/dist/design/layout.js +642 -0
- package/dist/design/layout.js.map +1 -0
- package/dist/design/placeholders.d.ts +29 -0
- package/dist/design/placeholders.d.ts.map +1 -0
- package/dist/design/placeholders.js +126 -0
- package/dist/design/placeholders.js.map +1 -0
- package/dist/html-backend.d.ts +6 -0
- package/dist/html-backend.d.ts.map +1 -1
- package/dist/html-backend.js +274 -10
- package/dist/html-backend.js.map +1 -1
- package/dist/index.d.ts +14 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/knuthPlass/breakpoints.d.ts.map +1 -1
- package/dist/knuthPlass/breakpoints.js +41 -98
- package/dist/knuthPlass/breakpoints.js.map +1 -1
- package/dist/knuthPlass/richAdapter.d.ts +1 -0
- package/dist/knuthPlass/richAdapter.d.ts.map +1 -1
- package/dist/knuthPlass/richAdapter.js +2 -1
- package/dist/knuthPlass/richAdapter.js.map +1 -1
- package/dist/measure/cache.js +1 -1
- package/dist/measure/cache.js.map +1 -1
- package/dist/measure/canvas.d.ts +3 -0
- package/dist/measure/canvas.d.ts.map +1 -1
- package/dist/measure/canvas.js +40 -2
- package/dist/measure/canvas.js.map +1 -1
- package/dist/measure/font.d.ts +3 -2
- package/dist/measure/font.d.ts.map +1 -1
- package/dist/measure/font.js +5 -2
- package/dist/measure/font.js.map +1 -1
- package/dist/measure/plain.d.ts.map +1 -1
- package/dist/measure/plain.js +14 -7
- package/dist/measure/plain.js.map +1 -1
- package/dist/measure/rich.d.ts +7 -0
- package/dist/measure/rich.d.ts.map +1 -1
- package/dist/measure/rich.js +34 -7
- package/dist/measure/rich.js.map +1 -1
- package/dist/numbering.d.ts +16 -0
- package/dist/numbering.d.ts.map +1 -1
- package/dist/numbering.js +28 -18
- package/dist/numbering.js.map +1 -1
- package/dist/parse/blockParser.d.ts.map +1 -1
- package/dist/parse/blockParser.js +37 -9
- package/dist/parse/blockParser.js.map +1 -1
- package/dist/parse/injectSpans.d.ts +9 -0
- package/dist/parse/injectSpans.d.ts.map +1 -0
- package/dist/parse/injectSpans.js +35 -0
- package/dist/parse/injectSpans.js.map +1 -0
- package/dist/parse/inlineFormatting.d.ts +38 -0
- package/dist/parse/inlineFormatting.d.ts.map +1 -1
- package/dist/parse/inlineFormatting.js +58 -0
- package/dist/parse/inlineFormatting.js.map +1 -1
- package/dist/parse/inlineMath.d.ts.map +1 -1
- package/dist/parse/inlineMath.js +26 -43
- package/dist/parse/inlineMath.js.map +1 -1
- package/dist/parse/sourceMapping.d.ts.map +1 -1
- package/dist/parse/sourceMapping.js +34 -7
- package/dist/parse/sourceMapping.js.map +1 -1
- package/dist/parse/types.d.ts +20 -1
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/pipeline/build.d.ts.map +1 -1
- package/dist/pipeline/build.js +521 -28
- package/dist/pipeline/build.js.map +1 -1
- package/dist/pipeline/buildBlockKind.d.ts +14 -0
- package/dist/pipeline/buildBlockKind.d.ts.map +1 -1
- package/dist/pipeline/buildBlockKind.js +16 -1
- package/dist/pipeline/buildBlockKind.js.map +1 -1
- package/dist/pipeline/buildHelpers.d.ts.map +1 -1
- package/dist/pipeline/buildHelpers.js +7 -1
- package/dist/pipeline/buildHelpers.js.map +1 -1
- package/dist/pipeline/buildMeasurement.d.ts +17 -1
- package/dist/pipeline/buildMeasurement.d.ts.map +1 -1
- package/dist/pipeline/buildMeasurement.js +32 -0
- package/dist/pipeline/buildMeasurement.js.map +1 -1
- package/dist/pipeline/columnBalancing.d.ts +75 -0
- package/dist/pipeline/columnBalancing.d.ts.map +1 -0
- package/dist/pipeline/columnBalancing.js +125 -0
- package/dist/pipeline/columnBalancing.js.map +1 -0
- package/dist/pipeline/config.d.ts +4 -1
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js +12 -1
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/floatPlacement.d.ts +45 -0
- package/dist/pipeline/floatPlacement.d.ts.map +1 -0
- package/dist/pipeline/floatPlacement.js +68 -0
- package/dist/pipeline/floatPlacement.js.map +1 -0
- package/dist/pipeline/headerFooter.d.ts +23 -7
- package/dist/pipeline/headerFooter.d.ts.map +1 -1
- package/dist/pipeline/headerFooter.js +260 -100
- package/dist/pipeline/headerFooter.js.map +1 -1
- package/dist/pipeline/lists.d.ts +4 -9
- package/dist/pipeline/lists.d.ts.map +1 -1
- package/dist/pipeline/lists.js +24 -42
- package/dist/pipeline/lists.js.map +1 -1
- package/dist/pipeline/placeholders.d.ts +6 -0
- package/dist/pipeline/placeholders.d.ts.map +1 -1
- package/dist/pipeline/placeholders.js +18 -5
- package/dist/pipeline/placeholders.js.map +1 -1
- package/dist/pipeline/placement.d.ts +15 -2
- package/dist/pipeline/placement.d.ts.map +1 -1
- package/dist/pipeline/placement.js +38 -3
- package/dist/pipeline/placement.js.map +1 -1
- package/dist/pipeline/resourceLayout.d.ts +58 -0
- package/dist/pipeline/resourceLayout.d.ts.map +1 -0
- package/dist/pipeline/resourceLayout.js +338 -0
- package/dist/pipeline/resourceLayout.js.map +1 -0
- package/dist/pipeline/resourceNumbering.d.ts +54 -0
- package/dist/pipeline/resourceNumbering.d.ts.map +1 -0
- package/dist/pipeline/resourceNumbering.js +218 -0
- package/dist/pipeline/resourceNumbering.js.map +1 -0
- package/dist/pipeline/styles.d.ts +6 -0
- package/dist/pipeline/styles.d.ts.map +1 -1
- package/dist/pipeline/styles.js +1 -1
- package/dist/pipeline/styles.js.map +1 -1
- package/dist/svg/singleInk.d.ts +10 -0
- package/dist/svg/singleInk.d.ts.map +1 -0
- package/dist/svg/singleInk.js +86 -0
- package/dist/svg/singleInk.js.map +1 -0
- package/dist/table/model.d.ts +53 -0
- package/dist/table/model.d.ts.map +1 -0
- package/dist/table/model.js +253 -0
- package/dist/table/model.js.map +1 -0
- package/dist/types.d.ts +429 -41
- package/dist/types.d.ts.map +1 -1
- package/dist/vdt.d.ts +181 -18
- package/dist/vdt.d.ts.map +1 -1
- package/dist/vdt.js +34 -0
- package/dist/vdt.js.map +1 -1
- package/package.json +6 -6
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @deprecated Legacy content-model resource used by the VDT renderer
|
|
2
|
+
* (`VDTBlock.resource`). The Resources-panel feature uses the newer
|
|
3
|
+
* `Resource` / `ResourceType` model below. Retained until the renderer
|
|
4
|
+
* migrates off it. */
|
|
1
5
|
export interface PostextResource {
|
|
2
6
|
id: string;
|
|
3
7
|
type: 'image' | 'table' | 'figure' | 'pullQuote';
|
|
@@ -8,6 +12,132 @@ export interface PostextResource {
|
|
|
8
12
|
width?: number;
|
|
9
13
|
height?: number;
|
|
10
14
|
}
|
|
15
|
+
/** How a counter renders for a given resource type. */
|
|
16
|
+
export type ResourceCounterFormat = 'decimal' | 'roman-lower' | 'roman-upper' | 'alpha-lower' | 'alpha-upper';
|
|
17
|
+
/** When the per-type counter resets back to its starting value. `'never'`
|
|
18
|
+
* yields a single document-wide running count; `'h1'..'h6'` resets the
|
|
19
|
+
* counter whenever a heading of that level is encountered. */
|
|
20
|
+
export type ResourceCounterReset = 'never' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
21
|
+
/** Where a resource floats on the page. `'top'` / `'bottom'` detach the
|
|
22
|
+
* resource from the running text and reserve a band at the top or bottom of
|
|
23
|
+
* the next available page near its first reference (the standard editorial
|
|
24
|
+
* figure-float behaviour). `'here'` opts out of floating and embeds the
|
|
25
|
+
* resource inline at the exact `::resource` directive position. */
|
|
26
|
+
export type ResourceFloatPosition = 'top' | 'bottom' | 'here';
|
|
27
|
+
/** How wide a floated resource is. `'column'` keeps it within a single column;
|
|
28
|
+
* `'page'` spans the full content width across all columns (a full-width
|
|
29
|
+
* float that breaks the column flow). In a single-column layout the two are
|
|
30
|
+
* equivalent. */
|
|
31
|
+
export type ResourceFloatSpan = 'column' | 'page';
|
|
32
|
+
/** Placement of a resource on the page. Resolved per resource, falling back to
|
|
33
|
+
* its {@link ResourceType.defaultPlacement} and then the built-in default
|
|
34
|
+
* (`top` / `column`). See {@link resolveResourcePlacement}. */
|
|
35
|
+
export interface ResourcePlacement {
|
|
36
|
+
position?: ResourceFloatPosition;
|
|
37
|
+
span?: ResourceFloatSpan;
|
|
38
|
+
}
|
|
39
|
+
/** A user-definable category of resource (e.g. "Figure", "Table"). Drives
|
|
40
|
+
* numbering, caption prefixes, and inline-reference labels. */
|
|
41
|
+
export interface ResourceType {
|
|
42
|
+
/** Stable identifier, referenced by `Resource.typeId`. */
|
|
43
|
+
id: string;
|
|
44
|
+
/** Display name, singular (e.g. "Figure"). */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Optional plural display name (e.g. "Figures"). */
|
|
47
|
+
namePlural?: string;
|
|
48
|
+
/** Compact label used in inline references (e.g. "Fig."). */
|
|
49
|
+
shortLabel: string;
|
|
50
|
+
/** Template for the computed number. Placeholders: `{n}` (the counter),
|
|
51
|
+
* `{h1}`..`{h6}` (current heading numbers). E.g. `'{h1}.{n}'`. */
|
|
52
|
+
numberingTemplate: string;
|
|
53
|
+
/** When the counter resets. */
|
|
54
|
+
resetOn: ResourceCounterReset;
|
|
55
|
+
/** How the `{n}` counter is formatted. */
|
|
56
|
+
counterFormat: ResourceCounterFormat;
|
|
57
|
+
/** Prefix prepended to the caption (e.g. "Figure"). The computed number
|
|
58
|
+
* follows this prefix. */
|
|
59
|
+
captionPrefix: string;
|
|
60
|
+
/** Default placement for resources of this type, used when a resource does
|
|
61
|
+
* not specify its own `placement`. Falls back to `top` / `column`. */
|
|
62
|
+
defaultPlacement?: ResourcePlacement;
|
|
63
|
+
}
|
|
64
|
+
/** The concrete payload kind a `Resource` carries. */
|
|
65
|
+
export type ResourceKind = 'bitmap' | 'svg' | 'table';
|
|
66
|
+
/** Horizontal alignment of a table cell's content. */
|
|
67
|
+
export type TableCellAlign = 'left' | 'center' | 'right';
|
|
68
|
+
/** Vertical alignment of a table cell's content. */
|
|
69
|
+
export type TableCellVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
70
|
+
/** Position of a cell within a {@link TableModel} grid (zero-based). */
|
|
71
|
+
export interface TableCellPos {
|
|
72
|
+
row: number;
|
|
73
|
+
col: number;
|
|
74
|
+
}
|
|
75
|
+
export interface TableCell {
|
|
76
|
+
/** Cell content (plain text / inline markdown). */
|
|
77
|
+
content: string;
|
|
78
|
+
/** Number of columns this cell spans. Default 1. */
|
|
79
|
+
colSpan?: number;
|
|
80
|
+
/** Number of rows this cell spans. Default 1. */
|
|
81
|
+
rowSpan?: number;
|
|
82
|
+
/** When true, render as a header cell (`<th>`). */
|
|
83
|
+
isHeader?: boolean;
|
|
84
|
+
align?: TableCellAlign;
|
|
85
|
+
verticalAlign?: TableCellVerticalAlign;
|
|
86
|
+
/** When set, this cell is covered by a merge whose primary (top-left) cell
|
|
87
|
+
* is at the referenced position. Hidden cells are skipped during rendering
|
|
88
|
+
* and restored on unmerge. */
|
|
89
|
+
hiddenBy?: TableCellPos;
|
|
90
|
+
}
|
|
91
|
+
export interface TableModel {
|
|
92
|
+
/** Row-major grid of cells. */
|
|
93
|
+
rows: TableCell[][];
|
|
94
|
+
/** Number of leading rows that form the table header. Default 0. */
|
|
95
|
+
headerRowCount?: number;
|
|
96
|
+
}
|
|
97
|
+
/** A user-managed resource instance. Binary payloads (bitmaps, SVGs) are
|
|
98
|
+
* stored out-of-band (IndexedDB in the sandbox) and referenced by
|
|
99
|
+
* `fileId`; table resources carry their model inline. */
|
|
100
|
+
export interface Resource {
|
|
101
|
+
/** Stable identifier, referenced by inline `ref`s. */
|
|
102
|
+
id: string;
|
|
103
|
+
/** The `ResourceType.id` this resource belongs to. */
|
|
104
|
+
typeId: string;
|
|
105
|
+
kind: ResourceKind;
|
|
106
|
+
/** Optional caption text (the type prefix + number are computed). */
|
|
107
|
+
caption?: string;
|
|
108
|
+
/** Accessibility alt text. */
|
|
109
|
+
altText?: string;
|
|
110
|
+
/** Creation timestamp (ms since epoch). */
|
|
111
|
+
createdAt: number;
|
|
112
|
+
/** Last-modified timestamp (ms since epoch). */
|
|
113
|
+
updatedAt: number;
|
|
114
|
+
/** Present when `kind === 'bitmap'`. */
|
|
115
|
+
bitmap?: {
|
|
116
|
+
fileId: string;
|
|
117
|
+
format: string;
|
|
118
|
+
width: number;
|
|
119
|
+
height: number;
|
|
120
|
+
};
|
|
121
|
+
/** Present when `kind === 'svg'`. */
|
|
122
|
+
svg?: {
|
|
123
|
+
fileId: string;
|
|
124
|
+
/** Intrinsic width in px (from the SVG's `width`/`height` or `viewBox`),
|
|
125
|
+
* used to preserve aspect ratio on layout. Absent for SVGs with no
|
|
126
|
+
* declared size. */
|
|
127
|
+
width?: number;
|
|
128
|
+
/** Intrinsic height in px; see `width`. */
|
|
129
|
+
height?: number;
|
|
130
|
+
};
|
|
131
|
+
/** Present when `kind === 'table'`. */
|
|
132
|
+
table?: {
|
|
133
|
+
model: TableModel;
|
|
134
|
+
};
|
|
135
|
+
/** Optional per-resource placement override. When unset, the resource's
|
|
136
|
+
* type default (then `top` / `column`) applies. A `position` of `'top'` or
|
|
137
|
+
* `'bottom'` floats the resource to a band on the page near its first
|
|
138
|
+
* reference; `'here'` embeds it inline at its `::resource` directive. */
|
|
139
|
+
placement?: ResourcePlacement;
|
|
140
|
+
}
|
|
11
141
|
export interface PostextNote {
|
|
12
142
|
id: string;
|
|
13
143
|
type: 'footnote' | 'endnote' | 'marginNote';
|
|
@@ -24,7 +154,11 @@ export interface DocumentMetadata {
|
|
|
24
154
|
export interface PostextContent {
|
|
25
155
|
markdown: string;
|
|
26
156
|
metadata?: DocumentMetadata;
|
|
27
|
-
resources
|
|
157
|
+
/** User-managed resources (issue #49) embedded via `::resource{id=…}` and
|
|
158
|
+
* referenced inline via `:ref{id=…}`. Binary payloads (bitmaps, SVGs) are
|
|
159
|
+
* resolved out-of-band by the renderer; table resources carry their model
|
|
160
|
+
* inline. */
|
|
161
|
+
resources?: Resource[];
|
|
28
162
|
notes?: PostextNote[];
|
|
29
163
|
}
|
|
30
164
|
export type PlacementStrategy = 'topOfColumn' | 'inline' | 'floatLeft' | 'floatRight' | 'fullWidthBreak' | 'margin';
|
|
@@ -192,12 +326,24 @@ export interface BodyTextConfig {
|
|
|
192
326
|
color?: ColorValue;
|
|
193
327
|
boldColor?: ColorValue;
|
|
194
328
|
italicColor?: ColorValue;
|
|
329
|
+
/** Colour of inline `:ref` reference labels (e.g. "Fig. 1.7"). Defaults to
|
|
330
|
+
* {@link boldColor} (the emphasis colour). */
|
|
331
|
+
referenceColor?: ColorValue;
|
|
332
|
+
/** Whether reference labels are rendered in the bold font. Default `true`. */
|
|
333
|
+
referenceBold?: boolean;
|
|
334
|
+
/** Whether reference labels are rendered italic. Default `false`. */
|
|
335
|
+
referenceItalic?: boolean;
|
|
195
336
|
textAlign?: TextAlign;
|
|
196
337
|
fontWeight?: number;
|
|
197
338
|
boldFontWeight?: number;
|
|
198
339
|
hyphenation?: HyphenationConfig;
|
|
199
340
|
firstLineIndent?: Dimension;
|
|
200
341
|
hangingIndent?: boolean;
|
|
342
|
+
/** When `false`, the first paragraph immediately following a heading is
|
|
343
|
+
* rendered without first-line indent. A common typographic convention in
|
|
344
|
+
* scientific publications and many book styles ("indent run-in" style).
|
|
345
|
+
* Default `true` — every paragraph receives the indent. */
|
|
346
|
+
indentAfterHeading?: boolean;
|
|
201
347
|
/** Max word-spacing when justifying, as a multiplier of the normal space width.
|
|
202
348
|
* Lines that would exceed this trigger extra hyphenation/reflow attempts. */
|
|
203
349
|
maxWordSpacing?: number;
|
|
@@ -267,12 +413,19 @@ export interface ResolvedBodyTextConfig {
|
|
|
267
413
|
color: ColorValue;
|
|
268
414
|
boldColor?: ColorValue;
|
|
269
415
|
italicColor?: ColorValue;
|
|
416
|
+
/** Resolved colour for inline `:ref` labels (defaults to the bold colour). */
|
|
417
|
+
referenceColor: ColorValue;
|
|
418
|
+
/** Whether reference labels use the bold font. */
|
|
419
|
+
referenceBold: boolean;
|
|
420
|
+
/** Whether reference labels are italic. */
|
|
421
|
+
referenceItalic: boolean;
|
|
270
422
|
textAlign: TextAlign;
|
|
271
423
|
fontWeight: number;
|
|
272
424
|
boldFontWeight: number;
|
|
273
425
|
hyphenation: ResolvedHyphenationConfig;
|
|
274
426
|
firstLineIndent: Dimension;
|
|
275
427
|
hangingIndent: boolean;
|
|
428
|
+
indentAfterHeading: boolean;
|
|
276
429
|
maxWordSpacing: number;
|
|
277
430
|
minWordSpacing: number;
|
|
278
431
|
optimalLineBreaking: boolean;
|
|
@@ -291,6 +444,113 @@ export interface ResolvedBodyTextConfig {
|
|
|
291
444
|
avoidRuntsInLists: boolean;
|
|
292
445
|
keepColonWithList: boolean;
|
|
293
446
|
}
|
|
447
|
+
/** User-facing styling for embedded `kind: 'table'` resources. Every field is
|
|
448
|
+
* optional; unset fields inherit body-text defaults (font family, size,
|
|
449
|
+
* colour) so a document with no table config looks the same as before this
|
|
450
|
+
* config existed. See {@link ResolvedTableStyleConfig}. */
|
|
451
|
+
export interface TableStyleConfig {
|
|
452
|
+
/** Body-cell font family. Defaults to the body-text family. */
|
|
453
|
+
bodyFontFamily?: string;
|
|
454
|
+
/** Body-cell font size. Defaults to the body-text size. */
|
|
455
|
+
bodyFontSize?: Dimension;
|
|
456
|
+
/** Body-cell text colour. Defaults to the body-text colour. */
|
|
457
|
+
bodyColor?: ColorValue;
|
|
458
|
+
/** Header-cell font family. Defaults to the body-text family. */
|
|
459
|
+
headerFontFamily?: string;
|
|
460
|
+
/** Header-cell font size. Defaults to the body-text size. */
|
|
461
|
+
headerFontSize?: Dimension;
|
|
462
|
+
/** Header-cell text colour. Defaults to the body-text colour. */
|
|
463
|
+
headerColor?: ColorValue;
|
|
464
|
+
/** Render header cells bold. Default `true`. */
|
|
465
|
+
headerBold?: boolean;
|
|
466
|
+
/** Render header cells italic. Default `false`. */
|
|
467
|
+
headerItalic?: boolean;
|
|
468
|
+
/** Fill header cells with {@link headerBackground}. Default `true`. */
|
|
469
|
+
headerBackgroundEnabled?: boolean;
|
|
470
|
+
/** Header-cell fill colour. Default light grey. */
|
|
471
|
+
headerBackground?: ColorValue;
|
|
472
|
+
/** Fill body cells with {@link bodyBackground}. Default `false`. */
|
|
473
|
+
bodyBackgroundEnabled?: boolean;
|
|
474
|
+
/** Body-cell fill colour. Default white. */
|
|
475
|
+
bodyBackground?: ColorValue;
|
|
476
|
+
/** Draw cell borders. Default `true`. */
|
|
477
|
+
borders?: boolean;
|
|
478
|
+
/** Border colour. Defaults to the body-text colour. */
|
|
479
|
+
borderColor?: ColorValue;
|
|
480
|
+
/** Border thickness. Default `0.75pt` (≈1px at 96dpi). */
|
|
481
|
+
borderWidth?: Dimension;
|
|
482
|
+
/** Inner padding inside each cell. Default `0.375em`. */
|
|
483
|
+
cellPadding?: Dimension;
|
|
484
|
+
}
|
|
485
|
+
export interface ResolvedTableStyleConfig {
|
|
486
|
+
bodyFontFamily: string;
|
|
487
|
+
bodyFontSize: Dimension;
|
|
488
|
+
bodyColor: ColorValue;
|
|
489
|
+
headerFontFamily: string;
|
|
490
|
+
headerFontSize: Dimension;
|
|
491
|
+
headerColor: ColorValue;
|
|
492
|
+
headerBold: boolean;
|
|
493
|
+
headerItalic: boolean;
|
|
494
|
+
headerBackgroundEnabled: boolean;
|
|
495
|
+
headerBackground: ColorValue;
|
|
496
|
+
bodyBackgroundEnabled: boolean;
|
|
497
|
+
bodyBackground: ColorValue;
|
|
498
|
+
borders: boolean;
|
|
499
|
+
borderColor: ColorValue;
|
|
500
|
+
borderWidth: Dimension;
|
|
501
|
+
cellPadding: Dimension;
|
|
502
|
+
}
|
|
503
|
+
/** User-facing styling for resource captions (the numbered label such as
|
|
504
|
+
* "Figure 1." plus the description text). The label and description share one
|
|
505
|
+
* typeface and size (the caption is measured as a single wrapped run); they
|
|
506
|
+
* differ in weight, slant, and colour. Every field is optional and inherits
|
|
507
|
+
* body-text defaults. See {@link ResolvedCaptionStyleConfig}. */
|
|
508
|
+
export interface CaptionStyleConfig {
|
|
509
|
+
/** Caption font family (label + description). Defaults to the body family. */
|
|
510
|
+
fontFamily?: string;
|
|
511
|
+
/** Caption font size (label + description). Defaults to the body size. */
|
|
512
|
+
fontSize?: Dimension;
|
|
513
|
+
/** Description text colour. Defaults to the body-text colour. */
|
|
514
|
+
color?: ColorValue;
|
|
515
|
+
/** Horizontal alignment of caption text. Default `'left'`. */
|
|
516
|
+
align?: TextAlign;
|
|
517
|
+
/** Gap between the figure body and the caption. Default `0.75em`. */
|
|
518
|
+
gap?: Dimension;
|
|
519
|
+
/** Render the numbered label bold. Default `true`. */
|
|
520
|
+
labelBold?: boolean;
|
|
521
|
+
/** Render the numbered label italic. Default `false`. */
|
|
522
|
+
labelItalic?: boolean;
|
|
523
|
+
/** Numbered-label colour. Defaults to {@link color}. */
|
|
524
|
+
labelColor?: ColorValue;
|
|
525
|
+
/** Render the description italic. Default `false`. */
|
|
526
|
+
descriptionItalic?: boolean;
|
|
527
|
+
}
|
|
528
|
+
export interface ResolvedCaptionStyleConfig {
|
|
529
|
+
fontFamily: string;
|
|
530
|
+
fontSize: Dimension;
|
|
531
|
+
color: ColorValue;
|
|
532
|
+
align: TextAlign;
|
|
533
|
+
gap: Dimension;
|
|
534
|
+
labelBold: boolean;
|
|
535
|
+
labelItalic: boolean;
|
|
536
|
+
labelColor: ColorValue;
|
|
537
|
+
descriptionItalic: boolean;
|
|
538
|
+
}
|
|
539
|
+
/** Styling for embedded SVG diagrams (`kind: 'svg'` resources). When
|
|
540
|
+
* {@link singleInk} is on, every colour in the SVG is remapped to a tint of
|
|
541
|
+
* {@link inkColor} by luminance — light fills become light tints, dark
|
|
542
|
+
* strokes and text approach the full ink — so figures reproduce faithfully
|
|
543
|
+
* when a document is printed with a single spot colour. */
|
|
544
|
+
export interface DiagramStyleConfig {
|
|
545
|
+
/** Recolour diagrams to tints of a single ink. Default `false`. */
|
|
546
|
+
singleInk?: boolean;
|
|
547
|
+
/** The ink. Defaults to the document's main palette colour. */
|
|
548
|
+
inkColor?: ColorValue;
|
|
549
|
+
}
|
|
550
|
+
export interface ResolvedDiagramStyleConfig {
|
|
551
|
+
singleInk: boolean;
|
|
552
|
+
inkColor: ColorValue;
|
|
553
|
+
}
|
|
294
554
|
/** Parity constraint for a forced page break.
|
|
295
555
|
*
|
|
296
556
|
* - `'any'` — no constraint; the break just opens a new page.
|
|
@@ -315,6 +575,23 @@ export interface ResolvedHeadingBreakBeforeConfig {
|
|
|
315
575
|
enabled: boolean;
|
|
316
576
|
parity: HeadingBreakParity;
|
|
317
577
|
}
|
|
578
|
+
/** Whether a heading occupies the single column it sits in, or spans the
|
|
579
|
+
* full page content width. `'page'` only takes effect on headings that
|
|
580
|
+
* start a new page (via `breakBefore.enabled`). */
|
|
581
|
+
export type HeadingSpan = 'column' | 'page';
|
|
582
|
+
/** Advanced design configuration for a heading level. When `enabled: true`
|
|
583
|
+
* the heading is rendered from `slot` and the inline typography fields
|
|
584
|
+
* (`fontFamily`, `fontSize`, `fontWeight`, `color`, `italic`,
|
|
585
|
+
* `numberingTemplate`-as-prefix) on `HeadingLevelConfig` are ignored. The
|
|
586
|
+
* heading's own text is carried via the `{titleText}` placeholder. */
|
|
587
|
+
export interface HeadingAdvancedDesignConfig {
|
|
588
|
+
enabled: boolean;
|
|
589
|
+
slot: DesignSlot;
|
|
590
|
+
}
|
|
591
|
+
export interface ResolvedHeadingAdvancedDesignConfig {
|
|
592
|
+
enabled: boolean;
|
|
593
|
+
slot: ResolvedDesignSlot;
|
|
594
|
+
}
|
|
318
595
|
export interface HeadingLevelConfig {
|
|
319
596
|
level: number;
|
|
320
597
|
fontSize?: Dimension;
|
|
@@ -327,6 +604,10 @@ export interface HeadingLevelConfig {
|
|
|
327
604
|
numberingTemplate?: string;
|
|
328
605
|
italic?: boolean;
|
|
329
606
|
breakBefore?: HeadingBreakBeforeConfig;
|
|
607
|
+
/** Column vs full-page span. Default `'column'`. */
|
|
608
|
+
span?: HeadingSpan;
|
|
609
|
+
/** When enabled, the heading renders as a design slot. */
|
|
610
|
+
advancedDesign?: HeadingAdvancedDesignConfig;
|
|
330
611
|
}
|
|
331
612
|
export interface ResolvedHeadingLevelConfig {
|
|
332
613
|
level: number;
|
|
@@ -340,6 +621,8 @@ export interface ResolvedHeadingLevelConfig {
|
|
|
340
621
|
numberingTemplate: string;
|
|
341
622
|
italic: boolean;
|
|
342
623
|
breakBefore: ResolvedHeadingBreakBeforeConfig;
|
|
624
|
+
span: HeadingSpan;
|
|
625
|
+
advancedDesign: ResolvedHeadingAdvancedDesignConfig;
|
|
343
626
|
}
|
|
344
627
|
export interface HeadingsConfig {
|
|
345
628
|
fontFamily?: string;
|
|
@@ -354,8 +637,19 @@ export interface HeadingsConfig {
|
|
|
354
637
|
* heading, the heading is pushed to the next column/page so it stays joined
|
|
355
638
|
* to its text. Default true. */
|
|
356
639
|
keepWithNext?: boolean;
|
|
640
|
+
/** Vertical column balancing — editorial bottom alignment. When a column
|
|
641
|
+
* ends short of its bottom, extra baseline-grid lines are added above the
|
|
642
|
+
* column's headings so every column ends flush with the page bottom.
|
|
643
|
+
* Extra lines are distributed across the column's headings, favouring the
|
|
644
|
+
* most important (lowest-level) heading. Default enabled. */
|
|
645
|
+
balancing?: ColumnBalancingConfig;
|
|
357
646
|
levels?: HeadingLevelConfig[];
|
|
358
647
|
}
|
|
648
|
+
export interface ColumnBalancingConfig {
|
|
649
|
+
enabled?: boolean;
|
|
650
|
+
/** Maximum extra grid lines that may be added above a single heading. */
|
|
651
|
+
maxLinesPerHeading?: number;
|
|
652
|
+
}
|
|
359
653
|
export interface ResolvedHeadingsConfig {
|
|
360
654
|
fontFamily: string;
|
|
361
655
|
lineHeight: Dimension;
|
|
@@ -365,6 +659,10 @@ export interface ResolvedHeadingsConfig {
|
|
|
365
659
|
marginTop: Dimension;
|
|
366
660
|
marginBottom: Dimension;
|
|
367
661
|
keepWithNext: boolean;
|
|
662
|
+
balancing: {
|
|
663
|
+
enabled: boolean;
|
|
664
|
+
maxLinesPerHeading: number;
|
|
665
|
+
};
|
|
368
666
|
levels: ResolvedHeadingLevelConfig[];
|
|
369
667
|
}
|
|
370
668
|
export interface UnorderedListLevelConfig {
|
|
@@ -514,6 +812,7 @@ export interface WarningsToggleConfig {
|
|
|
514
812
|
headingHierarchy?: boolean;
|
|
515
813
|
consecutiveHeadings?: boolean;
|
|
516
814
|
listAfterHeading?: boolean;
|
|
815
|
+
designIssues?: boolean;
|
|
517
816
|
}
|
|
518
817
|
export interface ResolvedWarningsToggleConfig {
|
|
519
818
|
missingFont: boolean;
|
|
@@ -521,6 +820,7 @@ export interface ResolvedWarningsToggleConfig {
|
|
|
521
820
|
headingHierarchy: boolean;
|
|
522
821
|
consecutiveHeadings: boolean;
|
|
523
822
|
listAfterHeading: boolean;
|
|
823
|
+
designIssues: boolean;
|
|
524
824
|
}
|
|
525
825
|
export interface DebugConfig {
|
|
526
826
|
cursorSync?: SyncIndicatorConfig;
|
|
@@ -631,13 +931,115 @@ export interface CustomFontFamily {
|
|
|
631
931
|
}
|
|
632
932
|
export type PageParity = 'all' | 'odd' | 'even';
|
|
633
933
|
export type HeaderFooterHAlign = 'left' | 'center' | 'right';
|
|
634
|
-
export
|
|
934
|
+
export type HAlign = 'left' | 'center' | 'right';
|
|
935
|
+
export type VAlign = 'top' | 'middle' | 'bottom';
|
|
936
|
+
export type AnchorEdge = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right' | 'right-of' | 'left-of' | 'below' | 'above' | 'align-top' | 'align-bottom' | 'align-left' | 'align-right';
|
|
937
|
+
export interface ElementAnchor {
|
|
938
|
+
/** `'container'` or `'#elementId'` reference to another element in the slot. */
|
|
939
|
+
to: 'container' | `#${string}`;
|
|
940
|
+
edge: AnchorEdge;
|
|
941
|
+
}
|
|
942
|
+
export type ElementSize = 'auto' | 'fill' | Dimension;
|
|
943
|
+
export interface ElementPlacement {
|
|
944
|
+
anchor: ElementAnchor;
|
|
945
|
+
offset?: {
|
|
946
|
+
x?: Dimension;
|
|
947
|
+
y?: Dimension;
|
|
948
|
+
};
|
|
949
|
+
size?: {
|
|
950
|
+
width?: ElementSize;
|
|
951
|
+
height?: ElementSize;
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
export interface ElementBoxStyle {
|
|
955
|
+
backgroundColor?: ColorValue;
|
|
956
|
+
borderColor?: ColorValue;
|
|
957
|
+
borderWidth?: Dimension;
|
|
958
|
+
borderRadius?: Dimension;
|
|
959
|
+
padding?: {
|
|
960
|
+
top?: Dimension;
|
|
961
|
+
right?: Dimension;
|
|
962
|
+
bottom?: Dimension;
|
|
963
|
+
left?: Dimension;
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
export type TextOverflow = 'wrap' | 'ellipsis-start' | 'ellipsis-end' | 'ellipsis-middle' | 'clip';
|
|
967
|
+
export interface DesignTextElement {
|
|
635
968
|
kind: 'text';
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
969
|
+
/** Stable, unique within the slot. Anchors reference elements by `#id`. */
|
|
970
|
+
id: string;
|
|
971
|
+
/** Header/footer only; ignored by heading designs. */
|
|
972
|
+
parity?: PageParity;
|
|
973
|
+
placement: ElementPlacement;
|
|
974
|
+
/** Template with placeholders (see design/placeholders.ts). Use `{{`/`}}`
|
|
639
975
|
* for literal braces. */
|
|
640
976
|
content: string;
|
|
977
|
+
fontFamily?: string;
|
|
978
|
+
fontSize: Dimension;
|
|
979
|
+
fontWeight?: number;
|
|
980
|
+
italic?: boolean;
|
|
981
|
+
color?: ColorValue;
|
|
982
|
+
/** Horizontal alignment within the element's box. */
|
|
983
|
+
align?: HAlign;
|
|
984
|
+
/** Vertical alignment within the element's box. */
|
|
985
|
+
verticalAlign?: VAlign;
|
|
986
|
+
lineHeight?: number;
|
|
987
|
+
letterSpacing?: Dimension;
|
|
988
|
+
overflow: TextOverflow;
|
|
989
|
+
/** When true, break long words at syllable boundaries while wrapping.
|
|
990
|
+
* Uses the document's active hyphenation locale. */
|
|
991
|
+
hyphenate?: boolean;
|
|
992
|
+
box?: ElementBoxStyle;
|
|
993
|
+
}
|
|
994
|
+
export interface DesignRuleElement {
|
|
995
|
+
kind: 'rule';
|
|
996
|
+
id: string;
|
|
997
|
+
parity?: PageParity;
|
|
998
|
+
placement: ElementPlacement;
|
|
999
|
+
direction: 'horizontal' | 'vertical';
|
|
1000
|
+
color: ColorValue;
|
|
1001
|
+
thickness: Dimension;
|
|
1002
|
+
}
|
|
1003
|
+
export interface DesignBoxElement {
|
|
1004
|
+
kind: 'box';
|
|
1005
|
+
id: string;
|
|
1006
|
+
parity?: PageParity;
|
|
1007
|
+
placement: ElementPlacement;
|
|
1008
|
+
style: ElementBoxStyle;
|
|
1009
|
+
}
|
|
1010
|
+
export type DesignElement = DesignTextElement | DesignRuleElement | DesignBoxElement;
|
|
1011
|
+
export interface DesignSlot {
|
|
1012
|
+
/** Array order = paint order: first = back, last = front. */
|
|
1013
|
+
elements: DesignElement[];
|
|
1014
|
+
}
|
|
1015
|
+
export interface ResolvedDesignTextElement extends Omit<DesignTextElement, 'fontFamily' | 'fontWeight' | 'italic' | 'color' | 'align' | 'verticalAlign' | 'lineHeight' | 'parity'> {
|
|
1016
|
+
parity: PageParity;
|
|
1017
|
+
fontFamily: string;
|
|
1018
|
+
fontWeight: number;
|
|
1019
|
+
italic: boolean;
|
|
1020
|
+
color: ColorValue;
|
|
1021
|
+
align: HAlign;
|
|
1022
|
+
verticalAlign: VAlign;
|
|
1023
|
+
lineHeight: number;
|
|
1024
|
+
}
|
|
1025
|
+
export interface ResolvedDesignRuleElement extends Omit<DesignRuleElement, 'parity'> {
|
|
1026
|
+
parity: PageParity;
|
|
1027
|
+
}
|
|
1028
|
+
export interface ResolvedDesignBoxElement extends Omit<DesignBoxElement, 'parity'> {
|
|
1029
|
+
parity: PageParity;
|
|
1030
|
+
}
|
|
1031
|
+
export type ResolvedDesignElement = ResolvedDesignTextElement | ResolvedDesignRuleElement | ResolvedDesignBoxElement;
|
|
1032
|
+
export interface ResolvedDesignSlot {
|
|
1033
|
+
elements: ResolvedDesignElement[];
|
|
1034
|
+
}
|
|
1035
|
+
export type HeaderFooterElement = DesignElement;
|
|
1036
|
+
export type HeaderFooterSlot = DesignSlot;
|
|
1037
|
+
export type ResolvedHeaderFooterElement = ResolvedDesignElement;
|
|
1038
|
+
export type ResolvedHeaderFooterSlot = ResolvedDesignSlot;
|
|
1039
|
+
export interface LegacyHeaderFooterTextElement {
|
|
1040
|
+
kind: 'text';
|
|
1041
|
+
align: HeaderFooterHAlign;
|
|
1042
|
+
content: string;
|
|
641
1043
|
parity: PageParity;
|
|
642
1044
|
/** Absolute distance between the element's body-facing edge and the body
|
|
643
1045
|
* edge. Elements are independent — two with the same `marginFromBody`
|
|
@@ -654,57 +1056,39 @@ export interface HeaderFooterTextElement {
|
|
|
654
1056
|
italic?: boolean;
|
|
655
1057
|
color?: ColorValue;
|
|
656
1058
|
}
|
|
657
|
-
export interface
|
|
1059
|
+
export interface LegacyHeaderFooterRuleElement {
|
|
658
1060
|
kind: 'rule';
|
|
659
1061
|
color: ColorValue;
|
|
660
1062
|
thickness: Dimension;
|
|
661
|
-
/** Rule width — a Dimension or the literal 'full' meaning full content width. */
|
|
662
1063
|
width: Dimension | 'full';
|
|
663
1064
|
align: HeaderFooterHAlign;
|
|
664
|
-
/** Absolute distance from the rule's body-facing edge to the body edge.
|
|
665
|
-
* Independent of other elements. */
|
|
666
1065
|
marginFromBody?: Dimension;
|
|
667
|
-
/** Horizontal inset from the aligned content edge. Only applies when
|
|
668
|
-
* `width` is a `Dimension` and `align` is `'left'` or `'right'`. */
|
|
669
1066
|
marginFromEdge?: Dimension;
|
|
670
1067
|
parity: PageParity;
|
|
671
1068
|
}
|
|
672
|
-
export type
|
|
673
|
-
export interface
|
|
674
|
-
elements:
|
|
675
|
-
}
|
|
676
|
-
export interface ResolvedHeaderFooterTextElement {
|
|
677
|
-
kind: 'text';
|
|
678
|
-
align: HeaderFooterHAlign;
|
|
679
|
-
content: string;
|
|
680
|
-
parity: PageParity;
|
|
681
|
-
marginFromBody: Dimension;
|
|
682
|
-
marginFromEdge: Dimension;
|
|
683
|
-
fontFamily: string;
|
|
684
|
-
fontSize: Dimension;
|
|
685
|
-
fontWeight: number;
|
|
686
|
-
italic: boolean;
|
|
687
|
-
color: ColorValue;
|
|
688
|
-
}
|
|
689
|
-
export interface ResolvedHeaderFooterRuleElement {
|
|
690
|
-
kind: 'rule';
|
|
691
|
-
color: ColorValue;
|
|
692
|
-
thickness: Dimension;
|
|
693
|
-
width: Dimension | 'full';
|
|
694
|
-
align: HeaderFooterHAlign;
|
|
695
|
-
marginFromBody: Dimension;
|
|
696
|
-
marginFromEdge: Dimension;
|
|
697
|
-
parity: PageParity;
|
|
698
|
-
}
|
|
699
|
-
export type ResolvedHeaderFooterElement = ResolvedHeaderFooterTextElement | ResolvedHeaderFooterRuleElement;
|
|
700
|
-
export interface ResolvedHeaderFooterSlot {
|
|
701
|
-
elements: ResolvedHeaderFooterElement[];
|
|
1069
|
+
export type LegacyHeaderFooterElement = LegacyHeaderFooterTextElement | LegacyHeaderFooterRuleElement;
|
|
1070
|
+
export interface LegacyHeaderFooterSlot {
|
|
1071
|
+
elements: LegacyHeaderFooterElement[];
|
|
702
1072
|
}
|
|
1073
|
+
/** @deprecated Use `DesignTextElement`. Kept as alias for legacy API exports. */
|
|
1074
|
+
export type HeaderFooterTextElement = DesignTextElement;
|
|
1075
|
+
/** @deprecated Use `DesignRuleElement`. */
|
|
1076
|
+
export type HeaderFooterRuleElement = DesignRuleElement;
|
|
1077
|
+
/** @deprecated Use `ResolvedDesignTextElement`. */
|
|
1078
|
+
export type ResolvedHeaderFooterTextElement = ResolvedDesignTextElement;
|
|
1079
|
+
/** @deprecated Use `ResolvedDesignRuleElement`. */
|
|
1080
|
+
export type ResolvedHeaderFooterRuleElement = ResolvedDesignRuleElement;
|
|
703
1081
|
export interface PostextConfig {
|
|
704
1082
|
page?: PageConfig;
|
|
705
1083
|
layout?: LayoutConfig;
|
|
706
1084
|
bodyText?: BodyTextConfig;
|
|
707
1085
|
headings?: HeadingsConfig;
|
|
1086
|
+
/** Styling for embedded table resources. */
|
|
1087
|
+
tableStyle?: TableStyleConfig;
|
|
1088
|
+
/** Styling for resource captions (numbered label + description). */
|
|
1089
|
+
captionStyle?: CaptionStyleConfig;
|
|
1090
|
+
/** Styling for embedded SVG diagrams (single-ink reproduction). */
|
|
1091
|
+
diagramStyle?: DiagramStyleConfig;
|
|
708
1092
|
unorderedLists?: UnorderedListsConfig;
|
|
709
1093
|
orderedLists?: OrderedListsConfig;
|
|
710
1094
|
math?: MathConfig;
|
|
@@ -731,5 +1115,9 @@ export interface PostextConfig {
|
|
|
731
1115
|
* Google Font. Binary data is stored out-of-band (IndexedDB in the
|
|
732
1116
|
* sandbox) and referenced by `fileId`. */
|
|
733
1117
|
customFonts?: CustomFontFamily[];
|
|
1118
|
+
/** User-definable resource categories (figures, tables, etc.) that drive
|
|
1119
|
+
* typed numbering, caption prefixes, and inline references. Defaults to
|
|
1120
|
+
* the built-in 'figure' and 'table' types when unset. */
|
|
1121
|
+
resourceTypes?: ResourceType[];
|
|
734
1122
|
}
|
|
735
1123
|
//# sourceMappingURL=types.d.ts.map
|