rocx-docx 0.0.0-stage → 0.4.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/LICENSE +504 -0
- package/README.md +106 -2
- package/authoring.js +51 -0
- package/boundary.js +314 -0
- package/browser.js +10 -0
- package/file-io.js +88 -0
- package/generate.js +36 -0
- package/index.d.ts +106 -0
- package/node.js +14 -0
- package/package.json +50 -4
- package/pkg/rocx.js +945 -0
- package/pkg/rocx_bg.wasm +0 -0
- package/rocx-source.tar.gz +0 -0
- package/types/authoring.d.ts +120 -0
- package/types/boundary.d.ts +27 -0
- package/types/drawings.d.ts +202 -0
- package/types/editor.d.ts +316 -0
- package/types/file-io.d.ts +31 -0
- package/types/inspection.d.ts +457 -0
- package/types/resolution.d.ts +73 -0
- package/types/structured.d.ts +228 -0
- package/types/styles.d.ts +175 -0
- package/types/tables.d.ts +132 -0
- package/types/template.d.ts +45 -0
- package/types/text-layout.d.ts +348 -0
package/pkg/rocx_bg.wasm
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BreakDeclaration, ColumnChartRunDeclaration, ImageRunDeclaration, InlineFractionDeclaration,
|
|
3
|
+
ShapeRunDeclaration, TabDeclaration,
|
|
4
|
+
} from "./drawings.js";
|
|
5
|
+
import type {
|
|
6
|
+
BlockContentControlDeclaration, CommentDeclaration, FieldDeclaration, HyperlinkDeclaration,
|
|
7
|
+
InlineContentControlDeclaration, NoteDeclaration, NoteReferenceDeclaration, RangeEndDeclaration,
|
|
8
|
+
RangeStartDeclaration,
|
|
9
|
+
} from "./structured.js";
|
|
10
|
+
import type {
|
|
11
|
+
CharacterStyleDefinition, NumberingStyleDefinition, ParagraphStyleDefinition, TableStyleDefinition,
|
|
12
|
+
} from "./styles.js";
|
|
13
|
+
import type { TableCellDeclaration, TableDeclaration, TableRowDeclaration } from "./tables.js";
|
|
14
|
+
import type {
|
|
15
|
+
DocumentProgram, FooterDeclaration, HeaderDeclaration, InlineChildren, ParagraphDeclaration,
|
|
16
|
+
SectionDeclaration, TextRunDeclaration,
|
|
17
|
+
} from "./text-layout.js";
|
|
18
|
+
import type { V } from "./resolution.js";
|
|
19
|
+
|
|
20
|
+
type Options<D, Positional extends keyof D = never> = Omit<D, "kind" | Positional>;
|
|
21
|
+
type ParagraphOptions = Options<ParagraphDeclaration, "text" | "runs">;
|
|
22
|
+
type TextParagraph = Extract<ParagraphDeclaration, { readonly runs?: never }> & { readonly text: V<string> };
|
|
23
|
+
type RunsParagraph = Extract<ParagraphDeclaration, { readonly runs: V<InlineChildren> }>;
|
|
24
|
+
|
|
25
|
+
interface ParagraphFactory {
|
|
26
|
+
(text: string, options?: ParagraphOptions): TextParagraph;
|
|
27
|
+
(runs: InlineChildren, options?: ParagraphOptions): RunsParagraph;
|
|
28
|
+
(textOrRuns: string | InlineChildren, options?: ParagraphOptions): TextParagraph | RunsParagraph;
|
|
29
|
+
/** Select the text field explicitly, including for a deferred value. */
|
|
30
|
+
readonly Text: (text: V<string>, options?: ParagraphOptions) => TextParagraph;
|
|
31
|
+
/** Select the runs field explicitly, including for a deferred list. */
|
|
32
|
+
readonly Runs: (runs: V<InlineChildren>, options?: ParagraphOptions) => RunsParagraph;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Synchronous factories for ordinary declarations; evaluation happens in the resolver. */
|
|
36
|
+
export declare const declarative: {
|
|
37
|
+
readonly Document: (
|
|
38
|
+
sections: DocumentProgram["sections"], options?: Options<DocumentProgram, "sections">,
|
|
39
|
+
) => DocumentProgram;
|
|
40
|
+
readonly Section: (
|
|
41
|
+
children: NonNullable<SectionDeclaration["children"]>, options?: Options<SectionDeclaration, "children">,
|
|
42
|
+
) => SectionDeclaration;
|
|
43
|
+
readonly Header: (
|
|
44
|
+
children: HeaderDeclaration["children"], options?: Options<HeaderDeclaration, "children">,
|
|
45
|
+
) => HeaderDeclaration;
|
|
46
|
+
readonly Footer: (
|
|
47
|
+
children: FooterDeclaration["children"], options?: Options<FooterDeclaration, "children">,
|
|
48
|
+
) => FooterDeclaration;
|
|
49
|
+
readonly Paragraph: ParagraphFactory;
|
|
50
|
+
readonly TextRun: (
|
|
51
|
+
text: TextRunDeclaration["text"], options?: Options<TextRunDeclaration, "text">,
|
|
52
|
+
) => TextRunDeclaration;
|
|
53
|
+
readonly Table: (
|
|
54
|
+
rows: TableDeclaration["rows"], options?: Options<TableDeclaration, "rows">,
|
|
55
|
+
) => TableDeclaration;
|
|
56
|
+
readonly TableRow: (
|
|
57
|
+
cells: TableRowDeclaration["children"], options?: Options<TableRowDeclaration, "children">,
|
|
58
|
+
) => TableRowDeclaration;
|
|
59
|
+
readonly TableCell: (
|
|
60
|
+
children: TableCellDeclaration["children"], options?: Options<TableCellDeclaration, "children">,
|
|
61
|
+
) => TableCellDeclaration;
|
|
62
|
+
readonly ImageRun: (
|
|
63
|
+
data: ImageRunDeclaration["data"], options?: Options<ImageRunDeclaration, "data">,
|
|
64
|
+
) => ImageRunDeclaration;
|
|
65
|
+
readonly ShapeRun: (
|
|
66
|
+
properties: ShapeRunDeclaration["properties"], options?: Options<ShapeRunDeclaration, "properties">,
|
|
67
|
+
) => ShapeRunDeclaration;
|
|
68
|
+
readonly ColumnChartRun: (
|
|
69
|
+
properties: ColumnChartRunDeclaration["properties"], options?: Options<ColumnChartRunDeclaration, "properties">,
|
|
70
|
+
) => ColumnChartRunDeclaration;
|
|
71
|
+
readonly InlineFraction: (
|
|
72
|
+
numerator: InlineFractionDeclaration["numerator"], denominator: InlineFractionDeclaration["denominator"],
|
|
73
|
+
options?: Options<InlineFractionDeclaration, "numerator" | "denominator">,
|
|
74
|
+
) => InlineFractionDeclaration;
|
|
75
|
+
readonly Tab: (options?: Options<TabDeclaration>) => TabDeclaration;
|
|
76
|
+
readonly Break: (options?: Options<BreakDeclaration>) => BreakDeclaration;
|
|
77
|
+
readonly Hyperlink: (
|
|
78
|
+
target: HyperlinkDeclaration["target"], children: HyperlinkDeclaration["children"],
|
|
79
|
+
options?: Options<HyperlinkDeclaration, "target" | "children">,
|
|
80
|
+
) => HyperlinkDeclaration;
|
|
81
|
+
readonly Field: (
|
|
82
|
+
instruction: FieldDeclaration["instruction"], children: FieldDeclaration["children"],
|
|
83
|
+
options?: Options<FieldDeclaration, "instruction" | "children">,
|
|
84
|
+
) => FieldDeclaration;
|
|
85
|
+
readonly Note: (
|
|
86
|
+
target: NoteDeclaration["target"], children: NoteDeclaration["children"],
|
|
87
|
+
options?: Options<NoteDeclaration, "target" | "children">,
|
|
88
|
+
) => NoteDeclaration;
|
|
89
|
+
readonly NoteReference: (
|
|
90
|
+
target: NoteReferenceDeclaration["target"], options?: Options<NoteReferenceDeclaration, "target">,
|
|
91
|
+
) => NoteReferenceDeclaration;
|
|
92
|
+
readonly Comment: (
|
|
93
|
+
children: CommentDeclaration["children"], options?: Options<CommentDeclaration, "children">,
|
|
94
|
+
) => CommentDeclaration;
|
|
95
|
+
readonly RangeStart: (
|
|
96
|
+
id: RangeStartDeclaration["id"], range: RangeStartDeclaration["range"],
|
|
97
|
+
options?: Options<RangeStartDeclaration, "id" | "range">,
|
|
98
|
+
) => RangeStartDeclaration;
|
|
99
|
+
readonly RangeEnd: (
|
|
100
|
+
id: RangeEndDeclaration["id"], options?: Options<RangeEndDeclaration, "id">,
|
|
101
|
+
) => RangeEndDeclaration;
|
|
102
|
+
readonly InlineContentControl: (
|
|
103
|
+
children: InlineContentControlDeclaration["children"], options?: Options<InlineContentControlDeclaration, "children">,
|
|
104
|
+
) => InlineContentControlDeclaration;
|
|
105
|
+
readonly BlockContentControl: (
|
|
106
|
+
children: BlockContentControlDeclaration["children"], options?: Options<BlockContentControlDeclaration, "children">,
|
|
107
|
+
) => BlockContentControlDeclaration;
|
|
108
|
+
readonly ParagraphStyleDefinition: (
|
|
109
|
+
name: ParagraphStyleDefinition["name"], options?: Options<ParagraphStyleDefinition, "name">,
|
|
110
|
+
) => ParagraphStyleDefinition;
|
|
111
|
+
readonly CharacterStyleDefinition: (
|
|
112
|
+
name: CharacterStyleDefinition["name"], options?: Options<CharacterStyleDefinition, "name">,
|
|
113
|
+
) => CharacterStyleDefinition;
|
|
114
|
+
readonly NumberingStyleDefinition: (
|
|
115
|
+
name: NumberingStyleDefinition["name"], numberingId: NumberingStyleDefinition["numberingId"],
|
|
116
|
+
) => NumberingStyleDefinition;
|
|
117
|
+
readonly TableStyleDefinition: (
|
|
118
|
+
name: TableStyleDefinition["name"], options?: Options<TableStyleDefinition, "name">,
|
|
119
|
+
) => TableStyleDefinition;
|
|
120
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Condition = boolean | (() => boolean);
|
|
2
|
+
export type Int64 = number | bigint;
|
|
3
|
+
export type Rgb = readonly [number, number, number];
|
|
4
|
+
export interface ResolveOptions {
|
|
5
|
+
readonly signal?: AbortSignal;
|
|
6
|
+
}
|
|
7
|
+
export type OutputProfile = "transitional" | "strict";
|
|
8
|
+
export interface ReadLimits {
|
|
9
|
+
/** Non-negative safe integer within the Wasm `usize` range. */
|
|
10
|
+
readonly maxParts?: number;
|
|
11
|
+
/** Non-negative safe integer or a bigint within the `u64` range. */
|
|
12
|
+
readonly maxPartBytes?: number | bigint;
|
|
13
|
+
/** Non-negative safe integer or a bigint within the `u64` range. */
|
|
14
|
+
readonly maxExpandedBytes?: number | bigint;
|
|
15
|
+
}
|
|
16
|
+
export interface RenderOptions {
|
|
17
|
+
readonly profile?: OutputProfile;
|
|
18
|
+
/** Core-properties date text, not parsed or normalized; overrides this output only. */
|
|
19
|
+
readonly timestamp?: string;
|
|
20
|
+
readonly readLimits?: ReadLimits;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const engineHandle: unique symbol;
|
|
24
|
+
export interface ResolvedHandle<K extends string, View> {
|
|
25
|
+
readonly [engineHandle]: K;
|
|
26
|
+
readonly view: Readonly<View>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { Condition, ResolvedHandle, Rgb } from "./boundary.js";
|
|
2
|
+
import type { V } from "./resolution.js";
|
|
3
|
+
import type { ResolvedComment } from "./structured.js";
|
|
4
|
+
import type { ResolvedRunFormat, RunFormat } from "./text-layout.js";
|
|
5
|
+
|
|
6
|
+
export type ImageAnchorReference =
|
|
7
|
+
| "page" | "margin" | "column" | "character" | "paragraph" | "line"
|
|
8
|
+
| "leftMargin" | "rightMargin" | "topMargin" | "bottomMargin" | "insideMargin" | "outsideMargin";
|
|
9
|
+
export type ImageAnchorHorizontalAlignment = "left" | "center" | "right" | "inside" | "outside";
|
|
10
|
+
export type ImageAnchorVerticalAlignment = "top" | "center" | "bottom" | "inside" | "outside";
|
|
11
|
+
export type ImageWrap = "none" | "square" | "topAndBottom" | "tight" | "through";
|
|
12
|
+
export type ImageWrapSide = "bothSides" | "left" | "right" | "largest";
|
|
13
|
+
|
|
14
|
+
/** Floating placement for pictures and shapes. Offsets and wrap distances are in points. */
|
|
15
|
+
export interface ImageAnchor {
|
|
16
|
+
readonly horizontalReference?: ImageAnchorReference;
|
|
17
|
+
readonly verticalReference?: ImageAnchorReference;
|
|
18
|
+
readonly horizontalAlignment?: ImageAnchorHorizontalAlignment;
|
|
19
|
+
readonly verticalAlignment?: ImageAnchorVerticalAlignment;
|
|
20
|
+
readonly x?: number;
|
|
21
|
+
readonly y?: number;
|
|
22
|
+
readonly wrap?: ImageWrap;
|
|
23
|
+
readonly wrapSide?: ImageWrapSide;
|
|
24
|
+
/** Ordered signed DrawingML coordinates; required for tight and through wrap. */
|
|
25
|
+
readonly wrapPolygon?: readonly (readonly [x: number, y: number])[];
|
|
26
|
+
readonly distanceTop?: number;
|
|
27
|
+
readonly distanceBottom?: number;
|
|
28
|
+
readonly distanceLeft?: number;
|
|
29
|
+
readonly distanceRight?: number;
|
|
30
|
+
readonly relativeHeight?: number;
|
|
31
|
+
readonly behindText?: boolean;
|
|
32
|
+
readonly locked?: boolean;
|
|
33
|
+
readonly layoutInCell?: boolean;
|
|
34
|
+
readonly allowOverlap?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** Insets as percentages of the original image, measured from each physical edge. */
|
|
37
|
+
export interface ImageCrop {
|
|
38
|
+
readonly left?: number;
|
|
39
|
+
readonly top?: number;
|
|
40
|
+
readonly right?: number;
|
|
41
|
+
readonly bottom?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ImageTransformation {
|
|
44
|
+
readonly anchor?: ImageAnchor;
|
|
45
|
+
readonly crop?: ImageCrop;
|
|
46
|
+
/** Clockwise degrees. */
|
|
47
|
+
readonly rotation?: number;
|
|
48
|
+
readonly flipHorizontal?: boolean;
|
|
49
|
+
readonly flipVertical?: boolean;
|
|
50
|
+
/** Width in points. Omit one dimension to retain the image's physical aspect ratio. */
|
|
51
|
+
readonly width?: number;
|
|
52
|
+
/** Height in points. */
|
|
53
|
+
readonly height?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface AltText {
|
|
56
|
+
readonly title?: string;
|
|
57
|
+
readonly description?: string;
|
|
58
|
+
readonly name?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Host-loaded encoded image bytes with a source name, never a filesystem path. */
|
|
61
|
+
export interface NamedImageData {
|
|
62
|
+
readonly bytes: Uint8Array;
|
|
63
|
+
readonly sourceName: string;
|
|
64
|
+
}
|
|
65
|
+
/** Plain bytes use a format-derived name; Node's `imageFile` supplies named bytes lazily. */
|
|
66
|
+
export type ImageData = Uint8Array | NamedImageData;
|
|
67
|
+
|
|
68
|
+
interface ConditionalDrawing {
|
|
69
|
+
readonly condition?: Condition;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ImageRunDeclaration extends ConditionalDrawing {
|
|
73
|
+
readonly kind: "image";
|
|
74
|
+
readonly data: V<ImageData>;
|
|
75
|
+
readonly transformation?: V<ImageTransformation | undefined>;
|
|
76
|
+
readonly altText?: V<AltText | undefined>;
|
|
77
|
+
/** Ignored hint; Rust always detects the format from the bytes. */
|
|
78
|
+
readonly type?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ShapeGeometry = "rectangle" | "ellipse" | "textBox";
|
|
82
|
+
export type ShapeTextAlignment = "left" | "center" | "right";
|
|
83
|
+
export type ShapeTextVerticalAlignment = "top" | "center" | "bottom";
|
|
84
|
+
export interface ShapeOutline {
|
|
85
|
+
/** Width in points. */
|
|
86
|
+
readonly width: number;
|
|
87
|
+
readonly color: Rgb;
|
|
88
|
+
}
|
|
89
|
+
export interface ShapeTextFormat {
|
|
90
|
+
readonly fontSize?: number;
|
|
91
|
+
readonly bold?: boolean;
|
|
92
|
+
readonly color?: Rgb;
|
|
93
|
+
readonly alignment?: ShapeTextAlignment;
|
|
94
|
+
readonly verticalAlignment?: ShapeTextVerticalAlignment;
|
|
95
|
+
readonly italic?: boolean;
|
|
96
|
+
readonly font?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ShapeProperties {
|
|
99
|
+
/** Width in points; Rust defaults to 72. */
|
|
100
|
+
readonly width?: number;
|
|
101
|
+
/** Height in points; Rust defaults to 72. */
|
|
102
|
+
readonly height?: number;
|
|
103
|
+
readonly geometry?: ShapeGeometry;
|
|
104
|
+
readonly fill?: Rgb;
|
|
105
|
+
readonly text?: string;
|
|
106
|
+
readonly outline?: ShapeOutline;
|
|
107
|
+
readonly textFormat?: ShapeTextFormat;
|
|
108
|
+
readonly anchor?: ImageAnchor;
|
|
109
|
+
}
|
|
110
|
+
export interface ShapeRunDeclaration extends ConditionalDrawing {
|
|
111
|
+
readonly kind: "shape";
|
|
112
|
+
readonly properties: V<ShapeProperties>;
|
|
113
|
+
}
|
|
114
|
+
export interface ColumnChartProperties {
|
|
115
|
+
/** Width in points. */
|
|
116
|
+
readonly width: number;
|
|
117
|
+
/** Height in points. */
|
|
118
|
+
readonly height: number;
|
|
119
|
+
readonly categories: readonly string[];
|
|
120
|
+
readonly values: readonly number[];
|
|
121
|
+
}
|
|
122
|
+
export interface ColumnChartRunDeclaration extends ConditionalDrawing {
|
|
123
|
+
readonly kind: "columnChart";
|
|
124
|
+
readonly properties: V<ColumnChartProperties>;
|
|
125
|
+
}
|
|
126
|
+
export interface InlineFractionDeclaration extends ConditionalDrawing {
|
|
127
|
+
readonly kind: "fraction";
|
|
128
|
+
readonly numerator: V<string>;
|
|
129
|
+
readonly denominator: V<string>;
|
|
130
|
+
}
|
|
131
|
+
export interface TabDeclaration extends ConditionalDrawing {
|
|
132
|
+
readonly kind: "tab";
|
|
133
|
+
}
|
|
134
|
+
export type BreakType = "line" | "textWrapping" | "page" | "column";
|
|
135
|
+
export interface BreakDeclaration extends ConditionalDrawing {
|
|
136
|
+
readonly kind: "break";
|
|
137
|
+
/** Defaults to Rust's line break, not an OOXML break without a type. */
|
|
138
|
+
readonly breakType?: BreakType;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface ResolvedImageView {
|
|
142
|
+
readonly name: string;
|
|
143
|
+
readonly altText?: AltText;
|
|
144
|
+
/** A fresh copy on each read. */
|
|
145
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
146
|
+
readonly dimensionsEmu: readonly [width: number, height: number];
|
|
147
|
+
readonly contentType: string;
|
|
148
|
+
}
|
|
149
|
+
export type ResolvedImage = ResolvedHandle<"image", ResolvedImageView>;
|
|
150
|
+
|
|
151
|
+
interface Display {
|
|
152
|
+
readonly displayText: string;
|
|
153
|
+
}
|
|
154
|
+
interface Formatted {
|
|
155
|
+
readonly format: ResolvedRunFormat;
|
|
156
|
+
readonly comment?: ResolvedComment;
|
|
157
|
+
}
|
|
158
|
+
type ResolvedAnchor = ImageAnchor & Required<Pick<ImageAnchor,
|
|
159
|
+
"horizontalReference" | "verticalReference" | "x" | "y" | "wrap" | "wrapPolygon" |
|
|
160
|
+
"relativeHeight" | "behindText">>;
|
|
161
|
+
type ResolvedShapeProperties = Omit<ShapeProperties, "anchor"> &
|
|
162
|
+
Required<Pick<ShapeProperties, "width" | "height" | "geometry">> & { readonly anchor?: ResolvedAnchor };
|
|
163
|
+
export type ResolvedImageRunView = Display & Formatted & { readonly kind: "image"; readonly image: ResolvedImage };
|
|
164
|
+
export type ResolvedShapeRunView = Display & { readonly kind: "shape"; readonly properties: ResolvedShapeProperties };
|
|
165
|
+
export type ResolvedColumnChartRunView = Display & { readonly kind: "columnChart"; readonly properties: ColumnChartProperties };
|
|
166
|
+
export type ResolvedInlineFractionView = Display & {
|
|
167
|
+
readonly kind: "fraction";
|
|
168
|
+
readonly numerator: string;
|
|
169
|
+
readonly denominator: string;
|
|
170
|
+
};
|
|
171
|
+
export type ResolvedTabView = Display & Formatted & { readonly kind: "tab" };
|
|
172
|
+
export type ResolvedBreakView = Display & Formatted & { readonly kind: "break"; readonly breakType: BreakType };
|
|
173
|
+
export type ResolvedImageRun = ResolvedHandle<"inline", ResolvedImageRunView>;
|
|
174
|
+
export type ResolvedShapeRun = ResolvedHandle<"inline", ResolvedShapeRunView>;
|
|
175
|
+
export type ResolvedColumnChartRun = ResolvedHandle<"inline", ResolvedColumnChartRunView>;
|
|
176
|
+
export type ResolvedInlineFraction = ResolvedHandle<"inline", ResolvedInlineFractionView>;
|
|
177
|
+
export type ResolvedTab = ResolvedHandle<"inline", ResolvedTabView>;
|
|
178
|
+
export type ResolvedBreak = ResolvedHandle<"inline", ResolvedBreakView>;
|
|
179
|
+
|
|
180
|
+
export interface DrawingComponents {
|
|
181
|
+
readonly image: { readonly declaration: ImageRunDeclaration; readonly resolved: ResolvedImageRun };
|
|
182
|
+
readonly shape: { readonly declaration: ShapeRunDeclaration; readonly resolved: ResolvedShapeRun };
|
|
183
|
+
readonly columnChart: { readonly declaration: ColumnChartRunDeclaration; readonly resolved: ResolvedColumnChartRun };
|
|
184
|
+
readonly fraction: { readonly declaration: InlineFractionDeclaration; readonly resolved: ResolvedInlineFraction };
|
|
185
|
+
readonly tab: { readonly declaration: TabDeclaration; readonly resolved: ResolvedTab };
|
|
186
|
+
readonly break: { readonly declaration: BreakDeclaration; readonly resolved: ResolvedBreak };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Input arms supplied to the shared resolved-inline constructor. */
|
|
190
|
+
type RunProperties = { readonly format?: RunFormat; readonly comment?: ResolvedComment };
|
|
191
|
+
export type DrawingResolvedInlineInput =
|
|
192
|
+
| ({ readonly kind: "image"; readonly image: ResolvedImage } & RunProperties)
|
|
193
|
+
| ({ readonly kind: "tab" } & RunProperties)
|
|
194
|
+
| ({ readonly kind: "break"; readonly breakType?: BreakType } & RunProperties)
|
|
195
|
+
| { readonly kind: "shape"; readonly properties: ShapeProperties }
|
|
196
|
+
| { readonly kind: "columnChart"; readonly properties: ColumnChartProperties }
|
|
197
|
+
| { readonly kind: "fraction"; readonly numerator: string; readonly denominator: string };
|
|
198
|
+
|
|
199
|
+
export type DrawingValidationInput = {
|
|
200
|
+
readonly kind: "imageTransformation";
|
|
201
|
+
readonly value: ImageTransformation;
|
|
202
|
+
};
|