@office-open/core 0.9.7 → 0.9.8
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/chart/index.d.mts +1 -1
- package/dist/descriptor/index.d.mts +2 -2
- package/dist/descriptor/index.mjs +2 -2
- package/dist/descriptor-TtMXoZgS.mjs +443 -0
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{index-DMw7eid7.d.mts → index-BEQ12eyX.d.mts} +42 -42
- package/dist/{index-CDYC3mxJ.d.mts → index-CeVhA1an.d.mts} +871 -262
- package/dist/{index-eu1aFQCm.d.mts → index-CsQP7Cl4.d.mts} +36 -36
- package/dist/{index-DmPBJwSk.d.mts → index-DYy8l709.d.mts} +34 -34
- package/dist/index-L82O3q6V.d.mts +170 -0
- package/dist/{index-4hjRdzMU.d.mts → index-vEeWkbm5.d.mts} +20 -20
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +3 -3
- package/dist/patch/index.d.mts +1 -1
- package/dist/smartart/index.d.mts +1 -1
- package/dist/{src-DlZssiRY.mjs → src-CSka9ln4.mjs} +985 -145
- package/dist/theme/index.d.mts +1 -1
- package/package.json +2 -2
- package/dist/descriptor-DcQm32dg.mjs +0 -71
- package/dist/index-C4r2WLEy.d.mts +0 -73
package/dist/chart/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as ChartCollection, a as ChartSpaceOptions, c as DataLabelsOptions, d as ErrorBarType, f as ErrorValueType, g as View3DOptions, h as TrendlineType, i as ChartSeriesData, l as ErrorBarDirection, m as TrendlineOptions, n as AxisChartType, o as ChartType, p as TimeUnit, r as BubbleSeriesData, s as DataLabelPosition, t as chartSpaceDesc, u as ErrorBarOptions, v as ChartData } from "../index-
|
|
1
|
+
import { _ as ChartCollection, a as ChartSpaceOptions, c as DataLabelsOptions, d as ErrorBarType, f as ErrorValueType, g as View3DOptions, h as TrendlineType, i as ChartSeriesData, l as ErrorBarDirection, m as TrendlineOptions, n as AxisChartType, o as ChartType, p as TimeUnit, r as BubbleSeriesData, s as DataLabelPosition, t as chartSpaceDesc, u as ErrorBarOptions, v as ChartData } from "../index-BEQ12eyX.mjs";
|
|
2
2
|
export { AxisChartType, BubbleSeriesData, ChartCollection, ChartData, ChartSeriesData, ChartSpaceOptions, ChartType, DataLabelPosition, DataLabelsOptions, ErrorBarDirection, ErrorBarOptions, ErrorBarType, ErrorValueType, TimeUnit, TrendlineOptions, TrendlineType, View3DOptions, chartSpaceDesc };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { type CustomDescriptor, type Descriptor, DescriptorRegistry, type ReadContext, type WriteContext, boolDecode, boolEncode, enumDecode, enumEncode, parse, stringify };
|
|
1
|
+
import { _ as CustomDescriptor, a as diffTagSets, b as WriteContext, c as FIELD_SPECS, d as boolDecode, f as boolEncode, g as stringify, h as parse, i as checkOrder, l as findFieldSpec, m as enumEncode, n as OrderViolation, o as roundTripFields, p as enumDecode, r as RoundTripResult, s as DescriptorFieldSpec, t as FieldConsistencyReport, u as DescriptorRegistry, v as Descriptor, y as ReadContext } from "../index-L82O3q6V.mjs";
|
|
2
|
+
export { type CustomDescriptor, type Descriptor, type DescriptorFieldSpec, DescriptorRegistry, FIELD_SPECS, type FieldConsistencyReport, type OrderViolation, type ReadContext, type RoundTripResult, type WriteContext, boolDecode, boolEncode, checkOrder, diffTagSets, enumDecode, enumEncode, findFieldSpec, parse, roundTripFields, stringify };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { DescriptorRegistry, boolDecode, boolEncode, enumDecode, enumEncode, parse, stringify };
|
|
1
|
+
import { a as roundTripFields, c as boolEncode, d as parse, f as stringify, i as diffTagSets, l as enumDecode, n as findFieldSpec, o as DescriptorRegistry, r as checkOrder, s as boolDecode, t as FIELD_SPECS, u as enumEncode } from "../descriptor-TtMXoZgS.mjs";
|
|
2
|
+
export { DescriptorRegistry, FIELD_SPECS, boolDecode, boolEncode, checkOrder, diffTagSets, enumDecode, enumEncode, findFieldSpec, parse, roundTripFields, stringify };
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { parse } from "@office-open/xml";
|
|
2
|
+
//#region src/descriptor/runtime.ts
|
|
3
|
+
/**
|
|
4
|
+
* Serialize an Options object to an XML string using its descriptor.
|
|
5
|
+
* Returns `undefined` when an optional element should be omitted.
|
|
6
|
+
*/
|
|
7
|
+
function stringify$1(desc, value, ctx) {
|
|
8
|
+
return desc.stringify(value, ctx);
|
|
9
|
+
}
|
|
10
|
+
/** Parse an XML Element into an Options object using its descriptor. */
|
|
11
|
+
function parse$1(desc, el, ctx) {
|
|
12
|
+
return desc.parse(el, ctx);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/descriptor/helpers.ts
|
|
16
|
+
/**
|
|
17
|
+
* OOXML-specific encode/decode helpers for descriptors.
|
|
18
|
+
*
|
|
19
|
+
* XML traversal helpers (findChild, etc.) are in @office-open/xml utils.
|
|
20
|
+
* This file only contains OOXML value encoding/decoding.
|
|
21
|
+
*
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
/** Encode boolean for CT_OnOff: true → omit val, false → "0". */
|
|
25
|
+
const boolEncode = (v) => {
|
|
26
|
+
if (v === void 0) return void 0;
|
|
27
|
+
return v ? void 0 : "0";
|
|
28
|
+
};
|
|
29
|
+
/** Decode CT_OnOff: absent or "true"/"1" → true, "0"/"false" → false. */
|
|
30
|
+
const boolDecode = (raw) => raw !== "0" && raw !== "false";
|
|
31
|
+
/** Create an enum encoder from a JS↔XML mapping. */
|
|
32
|
+
const enumEncode = (map) => (v) => {
|
|
33
|
+
if (v === void 0) return void 0;
|
|
34
|
+
return map[v] ?? v;
|
|
35
|
+
};
|
|
36
|
+
/** Create an enum decoder from a JS↔XML mapping (inverted). */
|
|
37
|
+
const enumDecode = (map) => {
|
|
38
|
+
const inv = invertRecord(map);
|
|
39
|
+
return (raw) => inv[raw] ?? raw;
|
|
40
|
+
};
|
|
41
|
+
function invertRecord(map) {
|
|
42
|
+
const result = {};
|
|
43
|
+
for (const key of Object.keys(map)) result[map[key]] = key;
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/descriptor/registry.ts
|
|
48
|
+
var DescriptorRegistry = class DescriptorRegistry {
|
|
49
|
+
static _map = /* @__PURE__ */ new Map();
|
|
50
|
+
/** Register a descriptor with its XML tag. */
|
|
51
|
+
static register(tag, desc) {
|
|
52
|
+
DescriptorRegistry._map.set(tag, desc);
|
|
53
|
+
}
|
|
54
|
+
/** Look up a descriptor by XML tag. */
|
|
55
|
+
static get(tag) {
|
|
56
|
+
return DescriptorRegistry._map.get(tag);
|
|
57
|
+
}
|
|
58
|
+
/** Get all registered tags. */
|
|
59
|
+
static tags() {
|
|
60
|
+
return new Set(DescriptorRegistry._map.keys());
|
|
61
|
+
}
|
|
62
|
+
/** Check if a tag is registered. */
|
|
63
|
+
static has(tag) {
|
|
64
|
+
return DescriptorRegistry._map.has(tag);
|
|
65
|
+
}
|
|
66
|
+
/** Get the number of registered descriptors. */
|
|
67
|
+
static get size() {
|
|
68
|
+
return DescriptorRegistry._map.size;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/descriptor/field-consistency.ts
|
|
73
|
+
/**
|
|
74
|
+
* Field-consistency helpers for descriptor round-trip auditing.
|
|
75
|
+
*
|
|
76
|
+
* Pairs with {@link DescriptorFieldSpec}: {@link diffTagSets} flags the static
|
|
77
|
+
* asymmetries between the interface / write / parse field sets (F1/F2/F3/F5),
|
|
78
|
+
* and {@link roundTripFields} runs an actual stringify→parse cycle and reports
|
|
79
|
+
* which fields were lost, gained, or mutated (F4).
|
|
80
|
+
*
|
|
81
|
+
* @module
|
|
82
|
+
*/
|
|
83
|
+
/** Diff the interface / write / parse field sets declared on a spec. */
|
|
84
|
+
function diffTagSets(spec) {
|
|
85
|
+
const interfaceSet = new Set(spec.interfaceFields);
|
|
86
|
+
const writeSet = new Set(spec.writeFields);
|
|
87
|
+
const parseSet = new Set(spec.parseFields);
|
|
88
|
+
return {
|
|
89
|
+
f1WriteLoss: spec.interfaceFields.filter((f) => !writeSet.has(f)),
|
|
90
|
+
f2WriteOnly: spec.writeFields.filter((f) => !interfaceSet.has(f)),
|
|
91
|
+
f3ParseLoss: spec.writeFields.filter((f) => !parseSet.has(f)),
|
|
92
|
+
f5ParseOnly: spec.parseFields.filter((f) => !writeSet.has(f))
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Run a stringify→parse cycle over a sample and diff the result field set.
|
|
97
|
+
* Returns the F4 round-trip drift. The caller supplies the descriptor's own
|
|
98
|
+
* stringify/parse (a `CustomDescriptor` pair or a function pair).
|
|
99
|
+
*/
|
|
100
|
+
function roundTripFields(stringifyFn, parseFn, sample, writeCtx, readCtx) {
|
|
101
|
+
const xml = stringifyFn(sample, writeCtx);
|
|
102
|
+
if (xml === void 0) throw new Error("roundTripFields: stringify returned undefined for the sample");
|
|
103
|
+
const root = parse(xml).elements?.find((e) => e.type === "element");
|
|
104
|
+
if (!root) throw new Error("roundTripFields: stringify produced no root element");
|
|
105
|
+
return diffObjects(sample, parseFn(root, readCtx));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Verify the child element order of a stringified container against an XSD
|
|
109
|
+
* sequence — the F6 check. Namespace prefixes are normalized, so `expected`
|
|
110
|
+
* entries may be qualified (`w:pStyle`) or local (`pStyle`); both match a
|
|
111
|
+
* `<w:pStyle>` child. Elements absent from `expected` are flagged "unexpected";
|
|
112
|
+
* a child whose expected position precedes the previous child's is
|
|
113
|
+
* "out-of-order".
|
|
114
|
+
*/
|
|
115
|
+
function checkOrder(xml, expected) {
|
|
116
|
+
const root = parse(xml).elements?.find((e) => e.type === "element");
|
|
117
|
+
if (!root) return [];
|
|
118
|
+
const expectedLocal = expected.map(localName);
|
|
119
|
+
const violations = [];
|
|
120
|
+
let lastIdx = -1;
|
|
121
|
+
(root.elements ?? []).filter((e) => e.type === "element").forEach((child, i) => {
|
|
122
|
+
const tag = localName(child.name);
|
|
123
|
+
const idx = expectedLocal.indexOf(tag);
|
|
124
|
+
if (idx === -1) {
|
|
125
|
+
violations.push({
|
|
126
|
+
index: i,
|
|
127
|
+
tag,
|
|
128
|
+
reason: "unexpected"
|
|
129
|
+
});
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (idx < lastIdx) violations.push({
|
|
133
|
+
index: i,
|
|
134
|
+
tag,
|
|
135
|
+
reason: "out-of-order"
|
|
136
|
+
});
|
|
137
|
+
lastIdx = idx;
|
|
138
|
+
});
|
|
139
|
+
return violations;
|
|
140
|
+
}
|
|
141
|
+
function localName(name) {
|
|
142
|
+
if (name === void 0) return "";
|
|
143
|
+
const colon = name.lastIndexOf(":");
|
|
144
|
+
return colon === -1 ? name : name.slice(colon + 1);
|
|
145
|
+
}
|
|
146
|
+
function diffObjects(sample, result) {
|
|
147
|
+
const sampleKeys = enumerableKeys(sample);
|
|
148
|
+
const resultKeys = enumerableKeys(result);
|
|
149
|
+
return {
|
|
150
|
+
lost: sampleKeys.filter((k) => !(k in result)),
|
|
151
|
+
gained: resultKeys.filter((k) => !(k in sample)),
|
|
152
|
+
mutated: sampleKeys.filter((k) => k in result && !deepEqual(fieldValue(sample, k), fieldValue(result, k)))
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function enumerableKeys(value) {
|
|
156
|
+
return Object.keys(value).filter((k) => fieldValue(value, k) !== void 0);
|
|
157
|
+
}
|
|
158
|
+
function fieldValue(value, key) {
|
|
159
|
+
return value[key];
|
|
160
|
+
}
|
|
161
|
+
/** Structural deep equality (objects, arrays, primitives); no special-case classes. */
|
|
162
|
+
function deepEqual(a, b) {
|
|
163
|
+
if (a === b) return true;
|
|
164
|
+
if (typeof a !== typeof b) return false;
|
|
165
|
+
if (a === null || b === null) return a === b;
|
|
166
|
+
if (typeof a !== "object") return a === b;
|
|
167
|
+
const aArr = Array.isArray(a);
|
|
168
|
+
const bArr = Array.isArray(b);
|
|
169
|
+
if (aArr || bArr) {
|
|
170
|
+
if (!aArr || !bArr) return false;
|
|
171
|
+
const aa = a;
|
|
172
|
+
const bb = b;
|
|
173
|
+
if (aa.length !== bb.length) return false;
|
|
174
|
+
return aa.every((v, i) => deepEqual(v, bb[i]));
|
|
175
|
+
}
|
|
176
|
+
const ao = a;
|
|
177
|
+
const bo = b;
|
|
178
|
+
const keys = new Set([...Object.keys(ao), ...Object.keys(bo)]);
|
|
179
|
+
for (const k of keys) if (!deepEqual(ao[k], bo[k])) return false;
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/descriptor/field-spec.ts
|
|
184
|
+
/**
|
|
185
|
+
* Curated high-value targets — each maps to a known historical drift.
|
|
186
|
+
* `settings` is intentionally absent: its round-trip is rawXml-based (byte
|
|
187
|
+
* passthrough), so field-level diff would mislabel every field as F2.
|
|
188
|
+
*/
|
|
189
|
+
const FIELD_SPECS = [{
|
|
190
|
+
id: "core-properties",
|
|
191
|
+
optionsInterface: "CorePropertiesInput",
|
|
192
|
+
interfaceFields: [
|
|
193
|
+
"title",
|
|
194
|
+
"subject",
|
|
195
|
+
"creator",
|
|
196
|
+
"keywords",
|
|
197
|
+
"description",
|
|
198
|
+
"lastModifiedBy",
|
|
199
|
+
"revision",
|
|
200
|
+
"lastPrinted",
|
|
201
|
+
"created",
|
|
202
|
+
"modified"
|
|
203
|
+
],
|
|
204
|
+
writeFields: [
|
|
205
|
+
"title",
|
|
206
|
+
"subject",
|
|
207
|
+
"creator",
|
|
208
|
+
"keywords",
|
|
209
|
+
"description",
|
|
210
|
+
"lastModifiedBy",
|
|
211
|
+
"revision",
|
|
212
|
+
"lastPrinted",
|
|
213
|
+
"created",
|
|
214
|
+
"modified"
|
|
215
|
+
],
|
|
216
|
+
parseFields: [
|
|
217
|
+
"title",
|
|
218
|
+
"subject",
|
|
219
|
+
"creator",
|
|
220
|
+
"keywords",
|
|
221
|
+
"description",
|
|
222
|
+
"lastModifiedBy",
|
|
223
|
+
"revision",
|
|
224
|
+
"lastPrinted",
|
|
225
|
+
"created",
|
|
226
|
+
"modified"
|
|
227
|
+
],
|
|
228
|
+
sampleOptions: {
|
|
229
|
+
title: "T",
|
|
230
|
+
subject: "S",
|
|
231
|
+
creator: "C",
|
|
232
|
+
keywords: "k1,k2",
|
|
233
|
+
description: "D",
|
|
234
|
+
lastModifiedBy: "LMB",
|
|
235
|
+
revision: 3,
|
|
236
|
+
lastPrinted: "2024-01-02T03:04:05Z",
|
|
237
|
+
created: "2018-05-11T07:02:00Z",
|
|
238
|
+
modified: "2026-04-10T02:02:36Z"
|
|
239
|
+
},
|
|
240
|
+
notes: "created/modified round-tripped verbatim from dcterms:created/modified."
|
|
241
|
+
}, {
|
|
242
|
+
id: "paragraph-properties",
|
|
243
|
+
optionsInterface: "ParagraphPropertiesOptions",
|
|
244
|
+
interfaceFields: [
|
|
245
|
+
"heading",
|
|
246
|
+
"style",
|
|
247
|
+
"bullet",
|
|
248
|
+
"run",
|
|
249
|
+
"border",
|
|
250
|
+
"shading",
|
|
251
|
+
"numbering",
|
|
252
|
+
"alignment",
|
|
253
|
+
"bidirectional",
|
|
254
|
+
"pageBreakBefore",
|
|
255
|
+
"tabStops",
|
|
256
|
+
"widowControl",
|
|
257
|
+
"contextualSpacing",
|
|
258
|
+
"indent",
|
|
259
|
+
"spacing",
|
|
260
|
+
"keepNext",
|
|
261
|
+
"keepLines",
|
|
262
|
+
"frame",
|
|
263
|
+
"suppressLineNumbers",
|
|
264
|
+
"wordWrap",
|
|
265
|
+
"overflowPunctuation",
|
|
266
|
+
"autoSpaceEastAsianText",
|
|
267
|
+
"suppressOverlap",
|
|
268
|
+
"suppressAutoHyphens",
|
|
269
|
+
"adjustRightInd",
|
|
270
|
+
"snapToGrid",
|
|
271
|
+
"mirrorIndents",
|
|
272
|
+
"kinsoku",
|
|
273
|
+
"topLinePunct",
|
|
274
|
+
"autoSpaceDE",
|
|
275
|
+
"textAlignment",
|
|
276
|
+
"textboxTightWrap",
|
|
277
|
+
"textDirection",
|
|
278
|
+
"outlineLevel",
|
|
279
|
+
"divId",
|
|
280
|
+
"cnfStyle",
|
|
281
|
+
"revision"
|
|
282
|
+
],
|
|
283
|
+
writeFields: [
|
|
284
|
+
"heading",
|
|
285
|
+
"style",
|
|
286
|
+
"bullet",
|
|
287
|
+
"run",
|
|
288
|
+
"border",
|
|
289
|
+
"shading",
|
|
290
|
+
"numbering",
|
|
291
|
+
"alignment",
|
|
292
|
+
"bidirectional",
|
|
293
|
+
"pageBreakBefore",
|
|
294
|
+
"tabStops",
|
|
295
|
+
"widowControl",
|
|
296
|
+
"contextualSpacing",
|
|
297
|
+
"indent",
|
|
298
|
+
"spacing",
|
|
299
|
+
"keepNext",
|
|
300
|
+
"keepLines",
|
|
301
|
+
"frame",
|
|
302
|
+
"suppressLineNumbers",
|
|
303
|
+
"wordWrap",
|
|
304
|
+
"overflowPunctuation",
|
|
305
|
+
"autoSpaceEastAsianText",
|
|
306
|
+
"suppressOverlap",
|
|
307
|
+
"suppressAutoHyphens",
|
|
308
|
+
"adjustRightInd",
|
|
309
|
+
"snapToGrid",
|
|
310
|
+
"mirrorIndents",
|
|
311
|
+
"kinsoku",
|
|
312
|
+
"topLinePunct",
|
|
313
|
+
"autoSpaceDE",
|
|
314
|
+
"textAlignment",
|
|
315
|
+
"textboxTightWrap",
|
|
316
|
+
"textDirection",
|
|
317
|
+
"outlineLevel",
|
|
318
|
+
"divId",
|
|
319
|
+
"cnfStyle",
|
|
320
|
+
"revision"
|
|
321
|
+
],
|
|
322
|
+
parseFields: [
|
|
323
|
+
"heading",
|
|
324
|
+
"style",
|
|
325
|
+
"bullet",
|
|
326
|
+
"run",
|
|
327
|
+
"border",
|
|
328
|
+
"shading",
|
|
329
|
+
"numbering",
|
|
330
|
+
"alignment",
|
|
331
|
+
"bidirectional",
|
|
332
|
+
"pageBreakBefore",
|
|
333
|
+
"tabStops",
|
|
334
|
+
"widowControl",
|
|
335
|
+
"contextualSpacing",
|
|
336
|
+
"indent",
|
|
337
|
+
"spacing",
|
|
338
|
+
"keepNext",
|
|
339
|
+
"keepLines",
|
|
340
|
+
"frame",
|
|
341
|
+
"suppressLineNumbers",
|
|
342
|
+
"wordWrap",
|
|
343
|
+
"overflowPunctuation",
|
|
344
|
+
"autoSpaceEastAsianText",
|
|
345
|
+
"suppressOverlap",
|
|
346
|
+
"suppressAutoHyphens",
|
|
347
|
+
"adjustRightInd",
|
|
348
|
+
"snapToGrid",
|
|
349
|
+
"mirrorIndents",
|
|
350
|
+
"kinsoku",
|
|
351
|
+
"topLinePunct",
|
|
352
|
+
"autoSpaceDE",
|
|
353
|
+
"textAlignment",
|
|
354
|
+
"outlineLevel"
|
|
355
|
+
],
|
|
356
|
+
order: [
|
|
357
|
+
"pStyle",
|
|
358
|
+
"keepNext",
|
|
359
|
+
"keepLines",
|
|
360
|
+
"pageBreakBefore",
|
|
361
|
+
"framePr",
|
|
362
|
+
"widowControl",
|
|
363
|
+
"numPr",
|
|
364
|
+
"suppressLineNumbers",
|
|
365
|
+
"pBdr",
|
|
366
|
+
"shd",
|
|
367
|
+
"tabs",
|
|
368
|
+
"suppressAutoHyphens",
|
|
369
|
+
"kinsoku",
|
|
370
|
+
"wordWrap",
|
|
371
|
+
"overflowPunct",
|
|
372
|
+
"topLinePunct",
|
|
373
|
+
"autoSpaceDE",
|
|
374
|
+
"autoSpaceDN",
|
|
375
|
+
"bidi",
|
|
376
|
+
"adjustRightInd",
|
|
377
|
+
"snapToGrid",
|
|
378
|
+
"spacing",
|
|
379
|
+
"ind",
|
|
380
|
+
"contextualSpacing",
|
|
381
|
+
"mirrorIndents",
|
|
382
|
+
"suppressOverlap",
|
|
383
|
+
"jc",
|
|
384
|
+
"textDirection",
|
|
385
|
+
"textAlignment",
|
|
386
|
+
"textboxTightWrap",
|
|
387
|
+
"outlineLvl",
|
|
388
|
+
"divId",
|
|
389
|
+
"cnfStyle",
|
|
390
|
+
"rPr",
|
|
391
|
+
"pPrChange"
|
|
392
|
+
],
|
|
393
|
+
sampleOptions: {
|
|
394
|
+
heading: "Heading1",
|
|
395
|
+
alignment: "center",
|
|
396
|
+
spacing: {
|
|
397
|
+
before: 240,
|
|
398
|
+
after: 120,
|
|
399
|
+
line: 278,
|
|
400
|
+
lineRule: "auto"
|
|
401
|
+
},
|
|
402
|
+
indent: {
|
|
403
|
+
left: 720,
|
|
404
|
+
firstLine: 360
|
|
405
|
+
},
|
|
406
|
+
keepNext: true,
|
|
407
|
+
keepLines: true,
|
|
408
|
+
widowControl: true,
|
|
409
|
+
contextualSpacing: true,
|
|
410
|
+
border: { bottom: {
|
|
411
|
+
style: "single",
|
|
412
|
+
color: "FF0000",
|
|
413
|
+
size: 6,
|
|
414
|
+
space: 1
|
|
415
|
+
} },
|
|
416
|
+
shading: {
|
|
417
|
+
fill: "FFFF00",
|
|
418
|
+
type: "clear"
|
|
419
|
+
},
|
|
420
|
+
tabStops: [{
|
|
421
|
+
position: 720,
|
|
422
|
+
type: "left"
|
|
423
|
+
}],
|
|
424
|
+
numbering: {
|
|
425
|
+
reference: "list_1",
|
|
426
|
+
level: 0
|
|
427
|
+
},
|
|
428
|
+
outlineLevel: 1,
|
|
429
|
+
textAlignment: "center"
|
|
430
|
+
},
|
|
431
|
+
excludeFields: [
|
|
432
|
+
"thematicBreak",
|
|
433
|
+
"rightTabStop",
|
|
434
|
+
"leftTabStop",
|
|
435
|
+
"includeIfEmpty"
|
|
436
|
+
],
|
|
437
|
+
notes: "F3 parse-loss: textDirection, textboxTightWrap, divId, cnfStyle, revision written but never parsed. Input-side sugar excluded from the field sets: thematicBreak (→pBdr/border), rightTabStop/leftTabStop (→tabs/tabStops), includeIfEmpty (control flag) — these map field→XML but XML→a different field, breaking the 1:1 round-trip assumption."
|
|
438
|
+
}];
|
|
439
|
+
function findFieldSpec(id) {
|
|
440
|
+
return FIELD_SPECS.find((s) => s.id === id);
|
|
441
|
+
}
|
|
442
|
+
//#endregion
|
|
443
|
+
export { roundTripFields as a, boolEncode as c, parse$1 as d, stringify$1 as f, diffTagSets as i, enumDecode as l, findFieldSpec as n, DescriptorRegistry as o, checkOrder as r, boolDecode as s, FIELD_SPECS as t, enumEncode as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { type
|
|
1
|
+
import { $ as createLineColorList, $n as calculateEffectExtent, $t as TableStyleListOptions, A as rgbColorDesc, Aa as TileFlipMode, An as stringifyAdjustmentValues, Ar as createCustomDash, At as PresentationLayoutVariablesOptions, B as createDiagramTextProperties, Bn as LightRigOptions, Bt as GraphicFrameLockingOptions, C as fillDesc, Ca as GradientFillOptions, Cn as PathCommand, Co as PresetColor, Cr as createOutline, Ct as AnimationLevelOptions, D as hslColorDesc, Da as PathShadeOptions, Dn as PresetGeometryOptions, Do as createHslColor, Dr as LineEndWidth, Dt as MaxChildrenOptions, E as getColorDescriptor, Ea as LinearShadeOptions, En as createCustomGeometry, Eo as HslColorOptions, Er as LineEndType, Et as HierBranchStyle, F as DiagramExtensionListOptions, Fa as createTileInfo, Fn as BevelPresetType, Ft as createHierBranch, G as DiagramStyleLabelOptions, Gn as createScene3D, Gt as createGroupLocking, H as createDiagramRelationshipIds, Hn as Scene3DOptions, Ht as PictureLockingOptions, I as DiagramExtensionOptions, Ia as SourceRectangleOptions, In as createBevel, It as createMaxChildren, J as HueDirection, Jn as EffectDagOptions, Jt as OnOffStyleType, K as DiagramStyleOptions, Kn as createSoftEdgeEffect, Kt as createPictureLocking, L as DiagramTextPropertiesOptions, La as createSourceRectangle, Ln as createBottomBevel, Lt as createOrgChart, M as schemeColorDesc, Ma as createGradientStop, Mn as Shape3DOptions, Mt as createAdjustList, N as solidFillDesc, Na as TileAlignment, Nn as createShape3D, Nt as createAnimateOneByOne, O as parseColorChoice, Oa as PathShadeType, On as stringifyPresetGeometry, Oo as ColorTransformOptions, Or as createLineEnd, Ot as OrgChartOptions, P as systemColorDesc, Pa as TileOptions, Pn as BevelOptions, Pt as createAnimationLevel, Q as createFillColorList, Qn as EffectListOptions, Qt as TablePartStyleOptions, R as createDiagramExtensionList, Ra as BlipEffectsOptions, Rn as BackdropOptions, Rt as createPreferredChildren, S as outlineDesc, Sa as extractBlipFillMedia, Sn as GeomRect, So as createRgbColor, Sr as PresetDash, St as AnimateOneByOneValue, T as patternFillDesc, Ta as GradientStop, Tn as PathOptions, To as createPresetColor, Tr as LineEndOptions, Tt as HierBranchOptions, U as ColorListOptions, Un as SphereCoords, Ut as ShapeLockingOptions, V as DiagramRelationshipIdsOptions, Vn as Point3D, Vt as GroupLockingOptions, W as ColorMethod, Wn as Vector3D, Wt as createGraphicFrameLocking, X as createDiagramStyle, Xn as BlurEffectOptions, Xt as TableCellBorderOptions, Y as StyleMatrixIndex, Yn as createEffectDag, Yt as StyleMatrixReferenceOptions, Z as createEffectColorList, Zn as EffectExtent, Zt as TableCellStyleOptions, _ as graphicFrameLockingDesc, _a as BlipFillConfigOptions, _n as createBlipFill, _o as SchemeColorOptions, _r as LineCap, _t as createStyleDefinitionHeader, a as blipDesc, an as createTableStyleList, ar as createPresetShadowEffect, at as ColorsDefinitionHeaderOptions, b as shapeLockingDesc, ba as GradientStopOptions, bn as ConnectionSite, bo as createScRgbColor, br as OutlineOptions, bt as AdjustOptions, c as stretchDesc, cn as MediaTransformation, cr as createOuterShadowEffect, ct as DiagramNameOptions, d as scene3DDesc, dn as Transform2DOptions, do as createColorElement, dr as GlowEffectOptions, dt as StyleDefinitionHeaderListOptions, en as TableStyleOptions, er as createEffectList, et as createStyleLabel, f as shape3DDesc, fa as createGroupFill, fn as createGroupTransform2D, fo as createSolidFill, fr as createGlowEffect, ft as StyleDefinitionHeaderOptions, g as presetGeometryDesc, ga as createNoFill, gn as BlipFillOptions, go as SchemeColor, gr as CompoundLine, gt as createLayoutDefinitionHeaderList, h as customGeometryDesc, ha as createPatternFill, hn as createExtentionList, ho as createSystemColor, hr as createFillOverlayEffect, ht as createLayoutDefinitionHeader, i as presentationLayoutVariablesDesc, in as createTableStyle, ir as PresetShadowVal, it as ColorsDefinitionHeaderListOptions, j as scRgbColorDesc, ja as createGradientFill, jn as PresetMaterialType, jt as createAdjust, k as presetColorDesc, ka as RelativeRect, kn as GeometryGuide, ko as createColorTransforms, kr as DashStop, kt as PreferredChildrenOptions, l as tileDesc, ln as createTransformation, lr as InnerShadowEffectOptions, lt as LayoutDefinitionHeaderListOptions, m as transform2DDesc, ma as PresetPattern, mn as stringifyStretch, mo as SystemColorOptions, mr as FillOverlayEffectOptions, mt as createColorsDefinitionHeaderList, n as diagramRelationshipIdsDesc, nn as TableTextStyleOptions, nr as createReflectionEffect, nt as createTextFillColorList, o as blipFillDesc, on as parseTableStyleList, or as OuterShadowEffectOptions, ot as DiagramCategoryOptions, p as groupTransform2DDesc, pa as PatternFillOptions, pn as createTransform2D, po as SystemColor, pr as BlendMode, pt as createColorsDefinitionHeader, q as FontCollectionIndex, qn as EffectContainerType, qt as createShapeLocking, r as diagramStyleDesc, rn as ThemeableLineStyleOptions, rr as PresetShadowEffectOptions, rt as createTextLineColorList, s as sourceRectangleDesc, sn as MediaDataTransformation, sr as RectAlignment, st as DiagramDescriptionOptions, t as diagramExtensionListDesc, tn as TableStyleRegion, tr as ReflectionEffectOptions, tt as createTextEffectColorList, u as bevelDesc, un as GroupTransform2DOptions, uo as SolidFillOptions, ur as createInnerShadowEffect, ut as LayoutDefinitionHeaderOptions, v as groupLockingDesc, va as BlipFillMediaData, vn as BlipOptions, vo as createSchemeColor, vr as LineJoin, vt as createStyleDefinitionHeaderList, w as gradientFillDesc, wa as GradientShadeOptions, wn as PathFillMode, wo as PresetColorOptions, wr as LineEndLength, wt as AnimationLevelValue, x as effectListDesc, xa as buildFill, xn as CustomGeometryOptions, xo as RgbColorOptions, xr as PenAlignment, xt as AnimateOneByOneOptions, y as pictureLockingDesc, ya as FillOptions, yn as createBlip, yo as ScRgbColorOptions, yr as OutlineFillProperties, yt as AdjustListOptions, z as createDiagramShape3D, za as createBlipEffects, zn as CameraOptions, zt as createPresentationLayoutVariables } from "../index-CeVhA1an.mjs";
|
|
2
|
+
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type BackdropOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, type CameraOptions, type ColorListOptions, ColorMethod, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, CompoundLine, type ConnectionSite, type CustomGeometryOptions, type DashStop, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtensionListOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelationshipIdsOptions, type DiagramStyleLabelOptions, type DiagramStyleOptions, type DiagramTextPropertiesOptions, type EffectContainerType, type EffectDagOptions, type EffectExtent, type EffectListOptions, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type GeomRect, type GeometryGuide, type GlowEffectOptions, type GradientFillOptions, type GradientShadeOptions, type GradientStop, type GradientStopOptions, type GraphicFrameLockingOptions, type GroupLockingOptions, type GroupTransform2DOptions, type HierBranchOptions, HierBranchStyle, type HslColorOptions, HueDirection, type InnerShadowEffectOptions, type LayoutDefinitionHeaderListOptions, type LayoutDefinitionHeaderOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MaxChildrenOptions, type MediaDataTransformation, type MediaTransformation, type OnOffStyleType, type OrgChartOptions, type OuterShadowEffectOptions, type OutlineFillProperties, type OutlineOptions, type PathCommand, type PathFillMode, type PathOptions, type PathShadeOptions, PathShadeType, type PatternFillOptions, PenAlignment, type PictureLockingOptions, type Point3D, type PreferredChildrenOptions, type PresentationLayoutVariablesOptions, PresetColor, type PresetColorOptions, PresetDash, type PresetGeometryOptions, PresetMaterialType, PresetPattern, type PresetShadowEffectOptions, PresetShadowVal, RectAlignment, type ReflectionEffectOptions, type RelativeRect, type RgbColorOptions, type ScRgbColorOptions, type Scene3DOptions, SchemeColor, type SchemeColorOptions, type Shape3DOptions, type ShapeLockingOptions, type SolidFillOptions, type SourceRectangleOptions, type SphereCoords, type StyleDefinitionHeaderListOptions, type StyleDefinitionHeaderOptions, StyleMatrixIndex, type StyleMatrixReferenceOptions, SystemColor, type SystemColorOptions, type TableCellBorderOptions, type TableCellStyleOptions, type TablePartStyleOptions, type TableStyleListOptions, type TableStyleOptions, type TableStyleRegion, type TableTextStyleOptions, type ThemeableLineStyleOptions, TileAlignment, TileFlipMode, type TileOptions, type Transform2DOptions, type Vector3D, bevelDesc, blipDesc, blipFillDesc, buildFill, calculateEffectExtent, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextFillColorList, createTextLineColorList, createTileInfo, createTransform2D, createTransformation, customGeometryDesc, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, getColorDescriptor, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, parseColorChoice, parseTableStyleList, patternFillDesc, pictureLockingDesc, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, rgbColorDesc, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, solidFillDesc, sourceRectangleDesc, stretchDesc, stringifyAdjustmentValues, stringifyPresetGeometry, stringifyStretch, systemColorDesc, tileDesc, transform2DDesc };
|
package/dist/drawingml/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as solidFillDesc, $n as createTileInfo, A as bevelDesc, An as createFillOverlayEffect, Ar as createScRgbColor, At as
|
|
2
|
-
export {
|
|
1
|
+
import { $ as solidFillDesc, $n as createTileInfo, A as bevelDesc, An as createFillOverlayEffect, Ar as createScRgbColor, At as createHierBranch, B as shapeLockingDesc, Bn as createLineEnd, Bt as createTableStyleList, C as diagramStyleDesc, Cn as PresetShadowVal, Ct as AnimateOneByOneValue, D as sourceRectangleDesc, Dn as createInnerShadowEffect, Dr as createSystemColor, Dt as createAdjustList, E as blipFillDesc, En as createOuterShadowEffect, Er as SystemColor, Et as createAdjust, F as customGeometryDesc, Fn as PresetDash, Fr as createColorTransforms, Ft as createGraphicFrameLocking, G as patternFillDesc, Gn as extractBlipFillMedia, H as outlineDesc, Hn as createGroupFill, Ht as createTransformation, I as presetGeometryDesc, In as createOutline, It as createGroupLocking, J as parseColorChoice, Jn as PathShadeType, K as getColorDescriptor, Kn as PresetPattern, L as graphicFrameLockingDesc, Ln as LineEndLength, Lt as createPictureLocking, M as shape3DDesc, Mn as LineCap, Mr as PresetColor, Mt as createOrgChart, N as groupTransform2DDesc, Nn as LineJoin, Nr as createPresetColor, Nt as createPreferredChildren, O as stretchDesc, On as createGlowEffect, Or as SchemeColor, Ot as createAnimateOneByOne, P as transform2DDesc, Pn as PenAlignment, Pr as createHslColor, Pt as createPresentationLayoutVariables, Q as schemeColorDesc, Qn as TileAlignment, R as groupLockingDesc, Rn as LineEndType, Rt as createShapeLocking, S as diagramRelationshipIdsDesc, Sn as createReflectionEffect, St as createStyleDefinitionHeaderList, T as blipDesc, Tn as RectAlignment, Tr as createSolidFill, Tt as HierBranchStyle, U as fillDesc, Un as createNoFill, V as effectListDesc, Vn as createCustomDash, Vt as parseTableStyleList, W as gradientFillDesc, Wn as buildFill, X as rgbColorDesc, Xn as createGradientFill, Y as presetColorDesc, Yn as TileFlipMode, Z as scRgbColorDesc, Zn as createGradientStop, _n as createScene3D, _t as createColorsDefinitionHeader, an as stringifyStretch, at as ColorMethod, bn as createEffectList, bt as createLayoutDefinitionHeaderList, cn as createExtentionList, ct as StyleMatrixIndex, dn as stringifyAdjustmentValues, dt as createFillColorList, et as systemColorDesc, fn as PresetMaterialType, ft as createLineColorList, gn as createBottomBevel, gt as createTextLineColorList, hn as createBevel, ht as createTextFillColorList, in as createTransform2D, it as createDiagramRelationshipIds, j as scene3DDesc, jn as CompoundLine, jr as createRgbColor, jt as createMaxChildren, k as tileDesc, kn as BlendMode, kr as createSchemeColor, kt as createAnimationLevel, ln as createCustomGeometry, lt as createDiagramStyle, mn as BevelPresetType, mt as createTextEffectColorList, nt as createDiagramShape3D, on as createBlipFill, ot as FontCollectionIndex, pn as createShape3D, pt as createStyleLabel, q as hslColorDesc, qn as createPatternFill, rn as createGroupTransform2D, rt as createDiagramTextProperties, sn as createBlip, st as HueDirection, tt as createDiagramExtensionList, un as stringifyPresetGeometry, ut as createEffectColorList, vn as createEffectDag, vr as createSourceRectangle, vt as createColorsDefinitionHeaderList, w as presentationLayoutVariablesDesc, wn as createPresetShadowEffect, wr as createColorElement, wt as AnimationLevelValue, x as diagramExtensionListDesc, xn as createSoftEdgeEffect, xt as createStyleDefinitionHeader, yn as calculateEffectExtent, yr as createBlipEffects, yt as createLayoutDefinitionHeader, z as pictureLockingDesc, zn as LineEndWidth, zt as createTableStyle } from "../src-CSka9ln4.mjs";
|
|
2
|
+
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, ColorMethod, CompoundLine, FontCollectionIndex, HierBranchStyle, HueDirection, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, SchemeColor, StyleMatrixIndex, SystemColor, TileAlignment, TileFlipMode, bevelDesc, blipDesc, blipFillDesc, buildFill, calculateEffectExtent, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextFillColorList, createTextLineColorList, createTileInfo, createTransform2D, createTransformation, customGeometryDesc, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, getColorDescriptor, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, parseColorChoice, parseTableStyleList, patternFillDesc, pictureLockingDesc, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, rgbColorDesc, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, solidFillDesc, sourceRectangleDesc, stretchDesc, stringifyAdjustmentValues, stringifyPresetGeometry, stringifyStretch, systemColorDesc, tileDesc, transform2DDesc };
|