@office-open/core 0.10.12 → 0.10.13
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/README.md +10 -9
- package/dist/chart/index.d.mts +1 -1
- package/dist/chart/index.mjs +1 -1
- package/dist/{chart-DwE8FCFk.mjs → chart-DOO1st0K.mjs} +3 -1
- package/dist/chart-DOO1st0K.mjs.map +1 -0
- package/dist/converters-C_Y2QX1w.mjs +1789 -0
- package/dist/converters-C_Y2QX1w.mjs.map +1 -0
- package/dist/data-type-CZMKVaaT.d.mts +10 -0
- package/dist/data-type-CZMKVaaT.d.mts.map +1 -0
- package/dist/descriptor/index.d.mts +2 -2
- package/dist/descriptor/index.mjs +2 -2
- package/dist/{descriptor-DAER86Rt.mjs → descriptor-BjNkn5jo.mjs} +3 -33
- package/dist/descriptor-BjNkn5jo.mjs.map +1 -0
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{src-bVqU5Bh3.mjs → drawingml-sj1J3lb0.mjs} +22 -3728
- package/dist/drawingml-sj1J3lb0.mjs.map +1 -0
- package/dist/index-BVK2dv6C.d.mts +63 -0
- package/dist/index-BVK2dv6C.d.mts.map +1 -0
- package/dist/index-BfHfKuKy.d.mts +275 -0
- package/dist/index-BfHfKuKy.d.mts.map +1 -0
- package/dist/index-CE53SwpZ.d.mts +1463 -0
- package/dist/index-CE53SwpZ.d.mts.map +1 -0
- package/dist/{index-3STznXzZ.d.mts → index-D6VE-MnJ.d.mts} +3 -15
- package/dist/index-D6VE-MnJ.d.mts.map +1 -0
- package/dist/{index-CN0YjNSx.d.mts → index-DDyd2ErZ.d.mts} +3 -15
- package/dist/index-DDyd2ErZ.d.mts.map +1 -0
- package/dist/{index-CsQP7Cl4.d.mts → index-DlPA26cw.d.mts} +2 -47
- package/dist/index-DlPA26cw.d.mts.map +1 -0
- package/dist/index-k8WKLXnA.d.mts +150 -0
- package/dist/index-k8WKLXnA.d.mts.map +1 -0
- package/dist/index.d.mts +650 -8
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1271 -7
- package/dist/index.mjs.map +1 -0
- package/dist/output-D_G_JR_8.d.mts +24 -0
- package/dist/output-D_G_JR_8.d.mts.map +1 -0
- package/dist/patch/index.d.mts +2 -2
- package/dist/patch/index.mjs +1 -1
- package/dist/{patch-OSbQIQAi.mjs → patch-BmRfghOo.mjs} +65 -84
- package/dist/patch-BmRfghOo.mjs.map +1 -0
- package/dist/smartart/index.d.mts +1 -1
- package/dist/smartart/index.mjs +1 -1
- package/dist/{smartart-DCY-Vdv7.mjs → smartart-B7ukZ-Tw.mjs} +5 -3
- package/dist/smartart-B7ukZ-Tw.mjs.map +1 -0
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme-CiNzdl-9.mjs +2 -0
- package/dist/theme-CiNzdl-9.mjs.map +1 -0
- package/dist/util/index.d.mts +4 -0
- package/dist/util/index.mjs +3 -0
- package/dist/util-Tq9PSjK0.mjs +1113 -0
- package/dist/util-Tq9PSjK0.mjs.map +1 -0
- package/dist/values-8di32lIe.d.mts +56 -0
- package/dist/values-8di32lIe.d.mts.map +1 -0
- package/package.json +7 -6
- package/dist/index-CHGFwCCQ.d.mts +0 -266
- package/dist/index-CpNwAcem.d.mts +0 -169
- package/dist/index-DdXU1_sq.d.mts +0 -5029
- package/dist/util/values.d.mts +0 -2
- package/dist/util/values.mjs +0 -2
- package/dist/values-CVIZcTRw.mjs +0 -371
- package/dist/values-DQfI1FSg.d.mts +0 -426
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
//#region src/util/values.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Runtime validation and type conversion functions for OOXML specification values.
|
|
4
|
-
*
|
|
5
|
-
* This module provides runtime checks and cleanup for value types in the OOXML spec
|
|
6
|
-
* that aren't easily expressed through the TypeScript type system alone. These
|
|
7
|
-
* validators help prevent silent failures and corrupted documents by enforcing
|
|
8
|
-
* spec-compliant values at runtime.
|
|
9
|
-
*
|
|
10
|
-
* @module
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* A measurement value with optional sign and unit suffix.
|
|
14
|
-
*
|
|
15
|
-
* Supports units: mm (millimeters), cm (centimeters), in (inches), pt (points),
|
|
16
|
-
* pc (picas), pi (picas), and a project-only px (96 DPI pixels).
|
|
17
|
-
*
|
|
18
|
-
* px is NOT part of OOXML's ST_UniversalMeasure (whose pattern is
|
|
19
|
-
* `-?[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)`); it is a project extension so
|
|
20
|
-
* geometry APIs can accept `"200px"` alongside `"5cm"`. px is converted to EMU
|
|
21
|
-
* (or TWIP) on input and never written to XML verbatim. Note: Word line spacing
|
|
22
|
-
* with lineRule="auto" uses a bare multiple (240ths of a line), not a measure,
|
|
23
|
-
* so px is irrelevant there; spacing before/after and indents accept px and
|
|
24
|
-
* convert it to twips (1px = 15twip).
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```typescript
|
|
28
|
-
* const measure: UniversalMeasure = "10.5mm";
|
|
29
|
-
* const px: UniversalMeasure = "200px";
|
|
30
|
-
* const negative: UniversalMeasure = "-5pt";
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi" | "px"}`;
|
|
34
|
-
/**
|
|
35
|
-
* A positive measurement value with unit suffix.
|
|
36
|
-
*
|
|
37
|
-
* Same as UniversalMeasure but restricted to positive values only.
|
|
38
|
-
*
|
|
39
|
-
* Reference: ST_PositiveUniversalMeasure in OOXML specification
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const measure: PositiveUniversalMeasure = "10.5mm";
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
type PositiveUniversalMeasure = `${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
|
|
47
|
-
/**
|
|
48
|
-
* A percentage value with optional sign.
|
|
49
|
-
*
|
|
50
|
-
* Pattern: `-?[0-9]+(\.[0-9]+)?%`
|
|
51
|
-
*
|
|
52
|
-
* Reference: ST_Percentage in OOXML specification
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```typescript
|
|
56
|
-
* const percent: Percentage = "50%";
|
|
57
|
-
* const negative: Percentage = "-10.5%";
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
type Percentage = `${"-" | ""}${number}%`;
|
|
61
|
-
/**
|
|
62
|
-
* A positive percentage value.
|
|
63
|
-
*
|
|
64
|
-
* Same as Percentage but restricted to positive values only.
|
|
65
|
-
*
|
|
66
|
-
* Reference: ST_PositivePercentage in OOXML specification
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* const percent: PositivePercentage = "50%";
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
type PositivePercentage = `${number}%`;
|
|
74
|
-
/**
|
|
75
|
-
* A relative measurement value using em or ex units.
|
|
76
|
-
*
|
|
77
|
-
* Used in VML text boxes for font-relative measurements.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```typescript
|
|
81
|
-
* const measure: RelativeMeasure = "2em";
|
|
82
|
-
* const negative: RelativeMeasure = "-0.5ex";
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
type RelativeMeasure = `${"-" | ""}${number}${"em" | "ex"}`;
|
|
86
|
-
/**
|
|
87
|
-
* Validates and converts a number to an integer (decimal number).
|
|
88
|
-
*
|
|
89
|
-
* Reference: ST_DecimalNumber in OOXML specification
|
|
90
|
-
*
|
|
91
|
-
* @param val - The number to validate and convert
|
|
92
|
-
* @returns The floored integer value
|
|
93
|
-
* @throws Error if the value is NaN
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* const num = decimalNumber(10.7); // Returns 10
|
|
98
|
-
* const negative = decimalNumber(-5.3); // Returns -5
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
declare const decimalNumber: (val: number) => number;
|
|
102
|
-
/**
|
|
103
|
-
* Validates and converts a number to a positive integer (unsigned decimal number).
|
|
104
|
-
*
|
|
105
|
-
* Reference: ST_UnsignedDecimalNumber in OOXML specification
|
|
106
|
-
*
|
|
107
|
-
* @param val - The number to validate and convert
|
|
108
|
-
* @returns The floored positive integer value
|
|
109
|
-
* @throws Error if the value is NaN or negative
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* ```typescript
|
|
113
|
-
* const num = unsignedDecimalNumber(10.7); // Returns 10
|
|
114
|
-
* const invalid = unsignedDecimalNumber(-5); // Throws Error
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
declare const unsignedDecimalNumber: (val: number) => number;
|
|
118
|
-
/**
|
|
119
|
-
* Validates and normalizes a hexadecimal binary value.
|
|
120
|
-
*
|
|
121
|
-
* The xsd:hexBinary type represents binary data as a sequence of binary octets
|
|
122
|
-
* using hexadecimal encoding, where each binary octet is a two-character
|
|
123
|
-
* hexadecimal number. Both lowercase and uppercase letters A-F are permitted.
|
|
124
|
-
*
|
|
125
|
-
* @param val - The hexadecimal string to validate
|
|
126
|
-
* @param length - The expected length in bytes (not characters)
|
|
127
|
-
* @returns The validated hexadecimal string
|
|
128
|
-
* @throws Error if the value is not a valid hex string of the expected length
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```typescript
|
|
132
|
-
* hexBinary("0FB8", 2); // Valid: 2 bytes = 4 characters
|
|
133
|
-
* hexBinary("ABC", 2); // Invalid: wrong length
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
declare const hexBinary: (val: string, length: number) => string;
|
|
137
|
-
/**
|
|
138
|
-
* Validates a long hexadecimal number (4 bytes / 8 characters).
|
|
139
|
-
*
|
|
140
|
-
* Reference: ST_LongHexNumber in OOXML specification
|
|
141
|
-
*
|
|
142
|
-
* @param val - The hexadecimal string to validate
|
|
143
|
-
* @returns The validated hexadecimal string
|
|
144
|
-
* @throws Error if the value is not a valid 8-character hex string
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```typescript
|
|
148
|
-
* const hex = longHexNumber("ABCD1234"); // Valid
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
declare const longHexNumber: (val: string) => string;
|
|
152
|
-
/**
|
|
153
|
-
* Validates a short hexadecimal number (2 bytes / 4 characters).
|
|
154
|
-
*
|
|
155
|
-
* Reference: ST_ShortHexNumber in OOXML specification
|
|
156
|
-
*
|
|
157
|
-
* @param val - The hexadecimal string to validate
|
|
158
|
-
* @returns The validated hexadecimal string
|
|
159
|
-
* @throws Error if the value is not a valid 4-character hex string
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```typescript
|
|
163
|
-
* const hex = shortHexNumber("AB12"); // Valid
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
declare const shortHexNumber: (val: string) => string;
|
|
167
|
-
/**
|
|
168
|
-
* Validates a single-byte hexadecimal number (1 byte / 2 characters).
|
|
169
|
-
*
|
|
170
|
-
* Reference: ST_UcharHexNumber in OOXML specification
|
|
171
|
-
*
|
|
172
|
-
* @param val - The hexadecimal string to validate
|
|
173
|
-
* @returns The validated hexadecimal string
|
|
174
|
-
* @throws Error if the value is not a valid 2-character hex string
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* ```typescript
|
|
178
|
-
* const hex = uCharHexNumber("FF"); // Valid
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
declare const uCharHexNumber: (val: string) => string;
|
|
182
|
-
/**
|
|
183
|
-
* Normalizes a universal measure value by parsing and reformatting.
|
|
184
|
-
*
|
|
185
|
-
* Ensures the numeric portion is properly formatted while preserving the unit.
|
|
186
|
-
*
|
|
187
|
-
* Reference: ST_UniversalMeasure in OOXML specification
|
|
188
|
-
*
|
|
189
|
-
* @param val - The universal measure string to normalize
|
|
190
|
-
* @returns The normalized universal measure
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
* ```typescript
|
|
194
|
-
* const measure = universalMeasureValue("10.500mm"); // Returns "10.5mm"
|
|
195
|
-
* ```
|
|
196
|
-
*/
|
|
197
|
-
declare const universalMeasureValue: (val: UniversalMeasure) => UniversalMeasure;
|
|
198
|
-
/**
|
|
199
|
-
* Validates and normalizes a positive universal measure value.
|
|
200
|
-
*
|
|
201
|
-
* Reference: ST_PositiveUniversalMeasure in OOXML specification
|
|
202
|
-
*
|
|
203
|
-
* @param val - The positive universal measure string to validate
|
|
204
|
-
* @returns The normalized positive universal measure
|
|
205
|
-
* @throws Error if the value is negative
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```typescript
|
|
209
|
-
* const measure = positiveUniversalMeasureValue("10.5mm"); // Valid
|
|
210
|
-
* const invalid = positiveUniversalMeasureValue("-5mm"); // Throws Error
|
|
211
|
-
* ```
|
|
212
|
-
*/
|
|
213
|
-
declare const positiveUniversalMeasureValue: (val: PositiveUniversalMeasure) => PositiveUniversalMeasure;
|
|
214
|
-
/**
|
|
215
|
-
* Validates and normalizes a hexadecimal color value.
|
|
216
|
-
*
|
|
217
|
-
* Accepts either "auto" or a 6-character RGB hex value (with or without # prefix).
|
|
218
|
-
* The # prefix is commonly used but technically invalid in OOXML, so it is stripped
|
|
219
|
-
* for strict compliance.
|
|
220
|
-
*
|
|
221
|
-
* Reference: ST_HexColor in OOXML specification
|
|
222
|
-
*
|
|
223
|
-
* @param val - The color value to validate ("auto" or hex color)
|
|
224
|
-
* @returns The normalized color value
|
|
225
|
-
* @throws Error if the hex color is invalid
|
|
226
|
-
*
|
|
227
|
-
* @example
|
|
228
|
-
* ```typescript
|
|
229
|
-
* const color1 = hexColorValue("auto"); // Returns "auto"
|
|
230
|
-
* const color2 = hexColorValue("FF0000"); // Returns "FF0000"
|
|
231
|
-
* const color3 = hexColorValue("#00FF00"); // Returns "00FF00" (# stripped)
|
|
232
|
-
* ```
|
|
233
|
-
*/
|
|
234
|
-
declare const hexColorValue: (val: string) => string;
|
|
235
|
-
/**
|
|
236
|
-
* Validates a signed TWIP measurement value.
|
|
237
|
-
*
|
|
238
|
-
* Accepts either a universal measure string or a numeric TWIP value.
|
|
239
|
-
*
|
|
240
|
-
* Reference: ST_SignedTwipsMeasure in OOXML specification
|
|
241
|
-
*
|
|
242
|
-
* @param val - The measurement value (universal measure or number)
|
|
243
|
-
* @returns The normalized measurement value
|
|
244
|
-
*
|
|
245
|
-
* @example
|
|
246
|
-
* ```typescript
|
|
247
|
-
* const measure1 = signedTwipsMeasureValue("10mm");
|
|
248
|
-
* const measure2 = signedTwipsMeasureValue(1440); // 1 inch in TWIP
|
|
249
|
-
* ```
|
|
250
|
-
*/
|
|
251
|
-
declare const signedTwipsMeasureValue: (val: UniversalMeasure | number) => UniversalMeasure | number;
|
|
252
|
-
/**
|
|
253
|
-
* Validates a half-point (HPS) measurement value.
|
|
254
|
-
*
|
|
255
|
-
* Accepts either a positive universal measure string or a positive number.
|
|
256
|
-
* HPS (half-points) are commonly used for font sizes.
|
|
257
|
-
*
|
|
258
|
-
* Reference: ST_HpsMeasure in OOXML specification
|
|
259
|
-
*
|
|
260
|
-
* @param val - The measurement value (positive universal measure or number)
|
|
261
|
-
* @returns The normalized measurement value
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
* ```typescript
|
|
265
|
-
* const fontSize1 = hpsMeasureValue("12pt");
|
|
266
|
-
* const fontSize2 = hpsMeasureValue(24); // 12pt in half-points
|
|
267
|
-
* ```
|
|
268
|
-
*/
|
|
269
|
-
declare const hpsMeasureValue: (val: PositiveUniversalMeasure | number) => string | number;
|
|
270
|
-
/**
|
|
271
|
-
* Validates a signed half-point (HPS) measurement value.
|
|
272
|
-
*
|
|
273
|
-
* Accepts either a universal measure string or a numeric value.
|
|
274
|
-
*
|
|
275
|
-
* Reference: ST_SignedHpsMeasure in OOXML specification
|
|
276
|
-
*
|
|
277
|
-
* @param val - The measurement value (universal measure or number)
|
|
278
|
-
* @returns The normalized measurement value
|
|
279
|
-
*
|
|
280
|
-
* @example
|
|
281
|
-
* ```typescript
|
|
282
|
-
* const spacing1 = signedHpsMeasureValue("6pt");
|
|
283
|
-
* const spacing2 = signedHpsMeasureValue(-12); // Negative spacing
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
|
-
declare const signedHpsMeasureValue: (val: UniversalMeasure | number) => string | number;
|
|
287
|
-
/**
|
|
288
|
-
* Validates a positive TWIP measurement value.
|
|
289
|
-
*
|
|
290
|
-
* Accepts either a positive universal measure string or a positive number.
|
|
291
|
-
*
|
|
292
|
-
* Reference: ST_TwipsMeasure in OOXML specification
|
|
293
|
-
*
|
|
294
|
-
* @param val - The measurement value (positive universal measure or number)
|
|
295
|
-
* @returns The normalized measurement value
|
|
296
|
-
*
|
|
297
|
-
* @example
|
|
298
|
-
* ```typescript
|
|
299
|
-
* const width1 = twipsMeasureValue("25.4mm");
|
|
300
|
-
* const width2 = twipsMeasureValue(1440); // 1 inch in TWIP
|
|
301
|
-
* ```
|
|
302
|
-
*/
|
|
303
|
-
declare const twipsMeasureValue: (val: PositiveUniversalMeasure | number) => PositiveUniversalMeasure | number;
|
|
304
|
-
/**
|
|
305
|
-
* Normalizes a percentage value by parsing and reformatting.
|
|
306
|
-
*
|
|
307
|
-
* Reference: ST_Percentage in OOXML specification
|
|
308
|
-
*
|
|
309
|
-
* @param val - The percentage string to normalize
|
|
310
|
-
* @returns The normalized percentage
|
|
311
|
-
*
|
|
312
|
-
* @example
|
|
313
|
-
* ```typescript
|
|
314
|
-
* const percent = percentageValue("50.000%"); // Returns "50%"
|
|
315
|
-
* ```
|
|
316
|
-
*/
|
|
317
|
-
declare const percentageValue: (val: Percentage) => Percentage;
|
|
318
|
-
/**
|
|
319
|
-
* Validates a measurement value that can be expressed as a number, percentage, or universal measure.
|
|
320
|
-
*
|
|
321
|
-
* Reference: ST_MeasurementOrPercent in OOXML specification
|
|
322
|
-
*
|
|
323
|
-
* @param val - The measurement value (number, percentage, or universal measure)
|
|
324
|
-
* @returns The normalized measurement value
|
|
325
|
-
*
|
|
326
|
-
* @example
|
|
327
|
-
* ```typescript
|
|
328
|
-
* const measure1 = measurementOrPercentValue(100); // Unqualified number
|
|
329
|
-
* const measure2 = measurementOrPercentValue("50%"); // Percentage
|
|
330
|
-
* const measure3 = measurementOrPercentValue("10mm"); // Universal measure
|
|
331
|
-
* ```
|
|
332
|
-
*/
|
|
333
|
-
declare const measurementOrPercentValue: (val: number | Percentage | UniversalMeasure) => number | UniversalMeasure | Percentage;
|
|
334
|
-
/**
|
|
335
|
-
* Validates an eighth-point measurement value.
|
|
336
|
-
*
|
|
337
|
-
* Eighth-points are used for fine-grained measurements in text formatting.
|
|
338
|
-
*
|
|
339
|
-
* Reference: ST_EighthPointMeasure in OOXML specification
|
|
340
|
-
*
|
|
341
|
-
* @param val - The measurement value in eighth-points
|
|
342
|
-
* @returns The validated positive integer value
|
|
343
|
-
*
|
|
344
|
-
* @example
|
|
345
|
-
* ```typescript
|
|
346
|
-
* const measure = eighthPointMeasureValue(16); // 2 points
|
|
347
|
-
* ```
|
|
348
|
-
*/
|
|
349
|
-
declare const eighthPointMeasureValue: (val: number) => number;
|
|
350
|
-
/**
|
|
351
|
-
* Validates a point measurement value.
|
|
352
|
-
*
|
|
353
|
-
* Reference: ST_PointMeasure in OOXML specification
|
|
354
|
-
*
|
|
355
|
-
* @param val - The measurement value in points
|
|
356
|
-
* @returns The validated positive integer value
|
|
357
|
-
*
|
|
358
|
-
* @example
|
|
359
|
-
* ```typescript
|
|
360
|
-
* const fontSize = pointMeasureValue(12); // 12pt
|
|
361
|
-
* ```
|
|
362
|
-
*/
|
|
363
|
-
declare const pointMeasureValue: (val: number) => number;
|
|
364
|
-
/**
|
|
365
|
-
* Converts a JavaScript Date object to an ISO 8601 date-time string.
|
|
366
|
-
*
|
|
367
|
-
* The format is CCYY-MM-DDThh:mm:ss.sssZ where T is a literal and Z indicates UTC.
|
|
368
|
-
* This matches the xsd:dateTime format required by OOXML.
|
|
369
|
-
*
|
|
370
|
-
* Reference: ST_DateTime in OOXML specification
|
|
371
|
-
*
|
|
372
|
-
* @param val - The Date object to convert
|
|
373
|
-
* @returns An ISO 8601 formatted date-time string
|
|
374
|
-
*
|
|
375
|
-
* @example
|
|
376
|
-
* ```typescript
|
|
377
|
-
* const now = new Date();
|
|
378
|
-
* const timestamp = dateTimeValue(now); // Returns "2024-01-15T10:30:00.000Z"
|
|
379
|
-
* ```
|
|
380
|
-
*/
|
|
381
|
-
declare const dateTimeValue: (val: Date) => string;
|
|
382
|
-
/**
|
|
383
|
-
* Theme color values used throughout OOXML for referencing document theme colors.
|
|
384
|
-
*
|
|
385
|
-
* Reference: ST_ThemeColor in OOXML specification
|
|
386
|
-
*
|
|
387
|
-
* @publicApi
|
|
388
|
-
*/
|
|
389
|
-
declare const ThemeColor: {
|
|
390
|
-
readonly DARK1: "dark1";
|
|
391
|
-
readonly LIGHT1: "light1";
|
|
392
|
-
readonly DARK2: "dark2";
|
|
393
|
-
readonly LIGHT2: "light2";
|
|
394
|
-
readonly ACCENT1: "accent1";
|
|
395
|
-
readonly ACCENT2: "accent2";
|
|
396
|
-
readonly ACCENT3: "accent3";
|
|
397
|
-
readonly ACCENT4: "accent4";
|
|
398
|
-
readonly ACCENT5: "accent5";
|
|
399
|
-
readonly ACCENT6: "accent6";
|
|
400
|
-
readonly HYPERLINK: "hyperlink";
|
|
401
|
-
readonly FOLLOWED_HYPERLINK: "followedHyperlink";
|
|
402
|
-
readonly NONE: "none";
|
|
403
|
-
readonly BACKGROUND1: "background1";
|
|
404
|
-
readonly TEXT1: "text1";
|
|
405
|
-
readonly BACKGROUND2: "background2";
|
|
406
|
-
readonly TEXT2: "text2";
|
|
407
|
-
};
|
|
408
|
-
/**
|
|
409
|
-
* Theme font values used for referencing document theme fonts.
|
|
410
|
-
*
|
|
411
|
-
* Reference: ST_Theme in OOXML specification
|
|
412
|
-
*
|
|
413
|
-
* @publicApi
|
|
414
|
-
*/
|
|
415
|
-
declare const ThemeFont: {
|
|
416
|
-
readonly MAJOR_EAST_ASIA: "majorEastAsia";
|
|
417
|
-
readonly MAJOR_BIDI: "majorBidi";
|
|
418
|
-
readonly MAJOR_ASCII: "majorAscii";
|
|
419
|
-
readonly MAJOR_H_ANSI: "majorHAnsi";
|
|
420
|
-
readonly MINOR_EAST_ASIA: "minorEastAsia";
|
|
421
|
-
readonly MINOR_BIDI: "minorBidi";
|
|
422
|
-
readonly MINOR_ASCII: "minorAscii";
|
|
423
|
-
readonly MINOR_H_ANSI: "minorHAnsi";
|
|
424
|
-
};
|
|
425
|
-
//#endregion
|
|
426
|
-
export { uCharHexNumber as C, twipsMeasureValue as S, unsignedDecimalNumber as T, pointMeasureValue as _, ThemeColor as a, signedHpsMeasureValue as b, dateTimeValue as c, hexBinary as d, hexColorValue as f, percentageValue as g, measurementOrPercentValue as h, RelativeMeasure as i, decimalNumber as l, longHexNumber as m, PositivePercentage as n, ThemeFont as o, hpsMeasureValue as p, PositiveUniversalMeasure as r, UniversalMeasure as s, Percentage as t, eighthPointMeasureValue as u, positiveUniversalMeasureValue as v, universalMeasureValue as w, signedTwipsMeasureValue as x, shortHexNumber as y };
|