@office-open/core 0.8.0 → 0.9.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/README.md +32 -60
- package/dist/chart/index.d.mts +2 -2
- package/dist/chart/index.mjs +2 -2
- package/dist/chart-DNpai28f.mjs +365 -0
- package/dist/descriptor/index.d.mts +2 -0
- package/dist/descriptor/index.mjs +2 -0
- package/dist/descriptor-DKmR7pw-.mjs +282 -0
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/index-BI-1SKm5.d.mts +153 -0
- package/dist/{index-Cj2Yf5mk.d.mts → index-DByjp6ug.d.mts} +10 -7
- package/dist/index-DNH2sizc.d.mts +137 -0
- package/dist/{index-C-DvIxek.d.mts → index-RWXzxibP.d.mts} +1420 -1866
- package/dist/{index-D0N5Bw2M.d.mts → index-eu1aFQCm.d.mts} +39 -28
- package/dist/index.d.mts +7 -538
- package/dist/index.mjs +7 -2077
- package/dist/smartart/index.d.mts +2 -2
- package/dist/smartart/index.mjs +2 -2
- package/dist/{smartart-BAhTD2yA.mjs → smartart-DCY-Vdv7.mjs} +120 -204
- package/dist/src-CU2AFKyt.mjs +7413 -0
- package/dist/theme/index.d.mts +2 -2
- package/dist/theme/index.mjs +2 -2
- package/dist/{theme-DmJXjgQs.mjs → theme-CiNzdl-9.mjs} +117 -22
- package/dist/{values.d.mts → util/values.d.mts} +1 -1
- package/dist/{values.mjs → util/values.mjs} +1 -1
- package/dist/{values-zMCu5EoQ.mjs → values-CVIZcTRw.mjs} +2 -2
- package/dist/{values-COjPGYkS.d.mts → values-Dqj8cbcy.d.mts} +1 -1
- package/package.json +12 -7
- package/dist/chart-BtEtdK2K.mjs +0 -1266
- package/dist/drawingml-anlfMLLZ.mjs +0 -7132
- package/dist/index-Bh6s66Up.d.mts +0 -381
- package/dist/index-CoTp4wVf.d.mts +0 -202
- package/dist/xml-components-DEU24Y1T.mjs +0 -322
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { children, escapeXml, findChild, textOf } from "@office-open/xml";
|
|
2
|
+
//#region src/descriptor/builder.ts
|
|
3
|
+
function element$1(tag) {
|
|
4
|
+
return new DescriptorBuilder(tag);
|
|
5
|
+
}
|
|
6
|
+
var DescriptorBuilder = class {
|
|
7
|
+
_tag;
|
|
8
|
+
_attrs = [];
|
|
9
|
+
_content = [];
|
|
10
|
+
constructor(tag) {
|
|
11
|
+
this._tag = tag;
|
|
12
|
+
}
|
|
13
|
+
/** Add an attribute mapping. */
|
|
14
|
+
attr(key, xmlName, opts) {
|
|
15
|
+
this._attrs.push({
|
|
16
|
+
kind: "child",
|
|
17
|
+
key,
|
|
18
|
+
xmlName,
|
|
19
|
+
...opts
|
|
20
|
+
});
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
/** Add a single child element mapping. */
|
|
24
|
+
child(key, tag, desc) {
|
|
25
|
+
this._content.push({
|
|
26
|
+
kind: "child",
|
|
27
|
+
key,
|
|
28
|
+
tag,
|
|
29
|
+
desc
|
|
30
|
+
});
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
/** Add a repeating child element mapping. */
|
|
34
|
+
children(key, tag, desc) {
|
|
35
|
+
this._content.push({
|
|
36
|
+
kind: "children",
|
|
37
|
+
key,
|
|
38
|
+
tag,
|
|
39
|
+
desc
|
|
40
|
+
});
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
/** Add a union (one-of-several) child mapping. */
|
|
44
|
+
union(key, variants) {
|
|
45
|
+
this._content.push({
|
|
46
|
+
kind: "union",
|
|
47
|
+
key,
|
|
48
|
+
variants
|
|
49
|
+
});
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
/** Add a text content mapping. */
|
|
53
|
+
text(key) {
|
|
54
|
+
this._content.push({
|
|
55
|
+
kind: "text",
|
|
56
|
+
key
|
|
57
|
+
});
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
/** Add a custom content handler. */
|
|
61
|
+
custom(spec) {
|
|
62
|
+
this._content.push(spec);
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
/** Build the immutable ElementDescriptor. */
|
|
66
|
+
build() {
|
|
67
|
+
const result = {
|
|
68
|
+
kind: "element",
|
|
69
|
+
tag: this._tag
|
|
70
|
+
};
|
|
71
|
+
if (this._attrs.length) result.attrs = Object.freeze(this._attrs);
|
|
72
|
+
if (this._content.length) result.content = Object.freeze(this._content);
|
|
73
|
+
return Object.freeze(result);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/descriptor/runtime.ts
|
|
78
|
+
/**
|
|
79
|
+
* Descriptor runtime: stringify (write) and parse (parse path) functions.
|
|
80
|
+
*
|
|
81
|
+
* Write path: Options → stringify(desc, opts, ctx) → string
|
|
82
|
+
* Parse path: Element → parse(desc, el, ctx) → Partial<Options>
|
|
83
|
+
*
|
|
84
|
+
* No intermediate representation — each path is a single step.
|
|
85
|
+
*
|
|
86
|
+
* @module
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Serialize an Options object to an XML string using its descriptor.
|
|
90
|
+
* Returns `undefined` when an optional element should be omitted.
|
|
91
|
+
*/
|
|
92
|
+
function stringify(desc, value, ctx) {
|
|
93
|
+
if (desc.kind === "custom") return desc.stringify(value, ctx);
|
|
94
|
+
return stringifyElement(desc, value, ctx);
|
|
95
|
+
}
|
|
96
|
+
function stringifyElement(desc, value, ctx) {
|
|
97
|
+
const tag = desc.tag;
|
|
98
|
+
const attrStr = stringifyAttrs(desc.attrs, value);
|
|
99
|
+
let hasContent = false;
|
|
100
|
+
const parts = [];
|
|
101
|
+
if (desc.content) for (let i = 0; i < desc.content.length; i++) {
|
|
102
|
+
const spec = desc.content[i];
|
|
103
|
+
const s = stringifyContentSpec(spec, value, ctx);
|
|
104
|
+
if (s !== void 0) {
|
|
105
|
+
hasContent = true;
|
|
106
|
+
parts.push(s);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (!hasContent) {
|
|
110
|
+
if (!attrStr) return void 0;
|
|
111
|
+
return `<${tag}${attrStr}/>`;
|
|
112
|
+
}
|
|
113
|
+
parts.unshift(`<${tag}${attrStr}>`);
|
|
114
|
+
parts.push(`</${tag}>`);
|
|
115
|
+
return parts.join("");
|
|
116
|
+
}
|
|
117
|
+
function stringifyAttrs(attrs, value) {
|
|
118
|
+
if (!attrs) return "";
|
|
119
|
+
const parts = [];
|
|
120
|
+
for (let i = 0; i < attrs.length; i++) {
|
|
121
|
+
const spec = attrs[i];
|
|
122
|
+
const raw = value[spec.key];
|
|
123
|
+
if (raw === void 0) continue;
|
|
124
|
+
if (spec.default !== void 0 && raw === spec.default) continue;
|
|
125
|
+
const encoded = spec.encode ? spec.encode(raw) : typeof raw === "string" || typeof raw === "number" || typeof raw === "boolean" ? String(raw) : String(raw);
|
|
126
|
+
if (encoded === void 0) continue;
|
|
127
|
+
parts.push(`${spec.xmlName}="${escapeXml(encoded)}"`);
|
|
128
|
+
}
|
|
129
|
+
return parts.length ? " " + parts.join(" ") : "";
|
|
130
|
+
}
|
|
131
|
+
function stringifyContentSpec(spec, value, ctx) {
|
|
132
|
+
switch (spec.kind) {
|
|
133
|
+
case "child": return stringifyChild(spec, value, ctx);
|
|
134
|
+
case "children": return stringifyChildren(spec, value, ctx);
|
|
135
|
+
case "union": return stringifyUnion(spec, value, ctx);
|
|
136
|
+
case "text": return stringifyText(spec, value);
|
|
137
|
+
case "custom": return stringifyCustom(spec, value, ctx);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function stringifyChild(spec, value, ctx) {
|
|
141
|
+
const childValue = value[spec.key];
|
|
142
|
+
if (childValue === void 0 || childValue === null) return void 0;
|
|
143
|
+
return stringify(spec.desc, childValue, ctx);
|
|
144
|
+
}
|
|
145
|
+
function stringifyChildren(spec, value, ctx) {
|
|
146
|
+
const items = value[spec.key];
|
|
147
|
+
if (!items || items.length === 0) return void 0;
|
|
148
|
+
const parts = [];
|
|
149
|
+
for (let i = 0; i < items.length; i++) {
|
|
150
|
+
const s = stringify(spec.desc, items[i], ctx);
|
|
151
|
+
if (s !== void 0) parts.push(s);
|
|
152
|
+
}
|
|
153
|
+
return parts.length ? parts.join("") : void 0;
|
|
154
|
+
}
|
|
155
|
+
function stringifyUnion(spec, value, ctx) {
|
|
156
|
+
const childValue = value[spec.key];
|
|
157
|
+
if (childValue === void 0 || childValue === null) return void 0;
|
|
158
|
+
const variants = spec.variants;
|
|
159
|
+
for (let i = 0; i < variants.length; i++) {
|
|
160
|
+
const v = variants[i];
|
|
161
|
+
if (v.match(childValue)) return stringify(v.desc, childValue, ctx);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function stringifyText(spec, value) {
|
|
165
|
+
const text = value[spec.key];
|
|
166
|
+
if (text === void 0 || text === null) return void 0;
|
|
167
|
+
return escapeXml(typeof text === "string" ? text : String(text));
|
|
168
|
+
}
|
|
169
|
+
function stringifyCustom(spec, value, ctx) {
|
|
170
|
+
return spec.stringify(value, ctx);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Parse an XML Element into a partial Options object using its descriptor.
|
|
174
|
+
*/
|
|
175
|
+
function parse(desc, el, ctx) {
|
|
176
|
+
if (desc.kind === "custom") return desc.parse(el, ctx);
|
|
177
|
+
return parseElement(desc, el, ctx);
|
|
178
|
+
}
|
|
179
|
+
function parseElement(desc, el, ctx) {
|
|
180
|
+
const result = {};
|
|
181
|
+
if (desc.attrs && el.attributes) for (let i = 0; i < desc.attrs.length; i++) {
|
|
182
|
+
const spec = desc.attrs[i];
|
|
183
|
+
const raw = el.attributes[spec.xmlName];
|
|
184
|
+
if (raw !== void 0) result[spec.key] = spec.decode ? spec.decode(String(raw)) : raw;
|
|
185
|
+
}
|
|
186
|
+
if (desc.content) for (let i = 0; i < desc.content.length; i++) {
|
|
187
|
+
const spec = desc.content[i];
|
|
188
|
+
parseContentSpec(spec, el, ctx, result);
|
|
189
|
+
}
|
|
190
|
+
return result;
|
|
191
|
+
}
|
|
192
|
+
function parseContentSpec(spec, el, ctx, result) {
|
|
193
|
+
switch (spec.kind) {
|
|
194
|
+
case "child": {
|
|
195
|
+
const child = findChild(el, spec.tag);
|
|
196
|
+
if (child) result[spec.key] = parse(spec.desc, child, ctx);
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
case "children": {
|
|
200
|
+
const items = children(el, spec.tag);
|
|
201
|
+
if (items.length) result[spec.key] = items.map((c) => parse(spec.desc, c, ctx));
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
case "union":
|
|
205
|
+
for (let i = 0; i < spec.variants.length; i++) {
|
|
206
|
+
const v = spec.variants[i];
|
|
207
|
+
const child = findChild(el, v.tag);
|
|
208
|
+
if (child) {
|
|
209
|
+
result[spec.key] = parse(v.desc, child, ctx);
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
case "text": {
|
|
215
|
+
const text = textOf(el);
|
|
216
|
+
if (text) result[spec.key] = text;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
case "custom":
|
|
220
|
+
Object.assign(result, spec.parse(el, ctx));
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/descriptor/helpers.ts
|
|
226
|
+
/**
|
|
227
|
+
* OOXML-specific encode/decode helpers for descriptors.
|
|
228
|
+
*
|
|
229
|
+
* XML traversal helpers (findChild, etc.) are in @office-open/xml utils.
|
|
230
|
+
* This file only contains OOXML value encoding/decoding.
|
|
231
|
+
*
|
|
232
|
+
* @module
|
|
233
|
+
*/
|
|
234
|
+
/** Encode boolean for CT_OnOff: true → omit val, false → "0". */
|
|
235
|
+
const boolEncode = (v) => {
|
|
236
|
+
if (v === void 0) return void 0;
|
|
237
|
+
return v ? void 0 : "0";
|
|
238
|
+
};
|
|
239
|
+
/** Decode CT_OnOff: absent or "true"/"1" → true, "0"/"false" → false. */
|
|
240
|
+
const boolDecode = (raw) => raw !== "0" && raw !== "false";
|
|
241
|
+
/** Create an enum encoder from a JS↔XML mapping. */
|
|
242
|
+
const enumEncode = (map) => (v) => {
|
|
243
|
+
if (v === void 0) return void 0;
|
|
244
|
+
return map[v] ?? v;
|
|
245
|
+
};
|
|
246
|
+
/** Create an enum decoder from a JS↔XML mapping (inverted). */
|
|
247
|
+
const enumDecode = (map) => {
|
|
248
|
+
const inv = invertRecord(map);
|
|
249
|
+
return (raw) => inv[raw] ?? raw;
|
|
250
|
+
};
|
|
251
|
+
function invertRecord(map) {
|
|
252
|
+
const result = {};
|
|
253
|
+
for (const key of Object.keys(map)) result[map[key]] = key;
|
|
254
|
+
return result;
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/descriptor/registry.ts
|
|
258
|
+
var DescriptorRegistry = class DescriptorRegistry {
|
|
259
|
+
static _map = /* @__PURE__ */ new Map();
|
|
260
|
+
/** Register a descriptor with its XML tag. */
|
|
261
|
+
static register(tag, desc) {
|
|
262
|
+
DescriptorRegistry._map.set(tag, desc);
|
|
263
|
+
}
|
|
264
|
+
/** Look up a descriptor by XML tag. */
|
|
265
|
+
static get(tag) {
|
|
266
|
+
return DescriptorRegistry._map.get(tag);
|
|
267
|
+
}
|
|
268
|
+
/** Get all registered tags. */
|
|
269
|
+
static tags() {
|
|
270
|
+
return new Set(DescriptorRegistry._map.keys());
|
|
271
|
+
}
|
|
272
|
+
/** Check if a tag is registered. */
|
|
273
|
+
static has(tag) {
|
|
274
|
+
return DescriptorRegistry._map.has(tag);
|
|
275
|
+
}
|
|
276
|
+
/** Get the number of registered descriptors. */
|
|
277
|
+
static get size() {
|
|
278
|
+
return DescriptorRegistry._map.size;
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
//#endregion
|
|
282
|
+
export { enumEncode as a, DescriptorBuilder as c, enumDecode as i, element$1 as l, boolDecode as n, parse as o, boolEncode as r, stringify as s, DescriptorRegistry as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as createSp, $a as createCdrCNvGrpSpPr, $c as RgbColorOptions, $i as createOfPieChart, $n as createWpSpPr, $o as Stretch, $r as createCustUnit, $s as CompoundLine, $t as StyleDefHdrOptions, A as createGrpSp, Aa as createSplitPos, Ac as PathShadeType, Ai as createLegacyDrawingHF, An as WpGroupOptions, Ao as createGraphicFrameLocking, Ar as createXdrSpPr, As as createScene3D, At as ColorListOptions, B as createLnDef, Ba as createUpDownBars, Bc as BlipEffectsOptions, Bi as createMax, Bn as createWpCNvGrpSpPr, Bo as TableStyleOptions, Br as createAutoUpdate, Bs as PresetShadowEffectOptions, Bt as createLinClrLst, C as createCxnSpLocks, Ca as createShowNegBubbles, Cc as buildFill, Ci as createHeaderFooter, Cn as createChPref, Co as createCdrY, Cr as createXdrNvPicPr, Cs as BackdropOptions, Ct as DiagramExtensionOptions, D as createExtraClrScheme, Da as createSize, Dc as GradientStop, Di as createLayoutTarget, Dn as WpCanvasOptions, Do as GroupLockingOptions, Dr as createXdrRow, Ds as Scene3DOptions, Dt as createDiagramTxPr, E as createEndCxn, Ea as createSideWall, Ec as GradientShadeOptions, Ei as createInvertIfNegative, En as createPresLayoutVars, Eo as GraphicFrameLockingOptions, Er as createXdrPic, Es as Point3D, Et as createDiagramSp3d, F as createHlinkMouseOver, Fa as createThickness, Fc as TileAlignment, Fi as createMajorTickMark, Fn as createWpBg, Fo as StyleMatrixReferenceOptions, Fr as PageMarginsOptions, Fs as BlurEffectOptions, Ft as HueDirection, G as createNvPicPr, Ga as createX, Gc as SystemColor, Gi as createMinorUnit, Gn as createWpExtLst, Go as createTableStyleList, Gr as createBubble3D, Gs as createOuterShadowEffect, Gt as ColorsDefHdrLstOptions, H as createNvCxnSpPr, Ha as createUserShapes, Hc as SolidFillOptions, Hi as createMinorGridlines, Hn as createWpCNvSpPr, Ho as TableTextStyleOptions, Hr as createBandFmt, Hs as createPresetShadowEffect, Ht as createTxEffectClrLst, I as createInsideH, Ia as createTickLblPos, Ic as TileOptions, Ii as createMajorTimeUnit, In as createWpBodyPr, Io as TableCellBorderOptions, Ir as PageSetupOptions, Is as EffectListOptions, It as StyleMatrixIndex, J as createPic, Ja as createYMode, Jc as SchemeColor, Ji as createMultiLvlStrRef, Jn as createWpGrpSpPr, Jo as createTransformation, Jr as createChartObject, Js as GlowEffectOptions, Jt as DiagramDescriptionOptions, K as createNvSpPr, Ka as createXMode, Kc as SystemColorOptions, Ki as createMinus, Kn as createWpGraphicFrame, Ko as MediaDataTransformation, Kr as createBubbleScale, Ks as InnerShadowEffectOptions, Kt as ColorsDefHdrOptions, L as createInsideV, La as createTickMarkSkip, Lc as createTileInfo, Li as createMajorUnit, Ln as createWpCNvCnPr, Lo as TableCellStyleOptions, Lr as createApplyToEnd, Ls as createEffectList, Lt as createDiagramStyle, M as createHeader, Ma as createStrLit, Mc as TileFlipMode, Mi as createLogBase, Mn as WpNonVisualDrawingPropsOptions, Mo as createPictureLocking, Mr as createXdrTo, Ms as EffectContainerType, Mt as DiagramStyleLblOptions, N as createHeaders, Na as createSurface3DChart, Nc as createGradientFill, Ni as createLvl, Nn as WpShapeOptions, No as createShapeLocking, Nr as createXdrTwoCellAnchor, Ns as EffectDagOptions, Nt as DiagramStyleOptions, O as createFontElement, Oa as createSizeRepresents, Oc as LinearShadeOptions, Oi as createLblAlgn, On as WpContentPartOptions, Oo as PictureLockingOptions, Or as createXdrRowOff, Os as SphereCoords, Ot as DiagramRelIdsOptions, P as createHighlight, Pa as createSymbol, Pc as createGradientStop, Pi as createMajorGridlines, Pn as WpTextboxOptions, Po as OnOffStyleType, Pr as createXdrTxBody, Ps as createEffectDag, Pt as FontCollectionIndex, Q as createSnd, Qa as createCdrCNvGraphicFramePr, Qc as createScRgbColor, Qi as createOddHeader, Qn as createWpSp, Qo as createTransform2D, Qr as createCustSplit, Qs as createFillOverlayEffect, Qt as StyleDefHdrLstOptions, R as createLeft, Ra as createTrendlineLbl, Rc as SourceRectangleOptions, Ri as createManualLayout, Rn as createWpCNvContentPartPr, Ro as TablePartStyleOptions, Rr as createApplyToFront, Rs as ReflectionEffectOptions, Rt as createEffectClrLst, S as createCxnSp, Sa as createShowLeaderLines, Sc as GradientStopOptions, Si as createHMode, Sn as createChMax, So as createCdrXfrm, Sr as createXdrNvGrpSpPr, Ss as createBottomBevel, St as DiagramExtLstOptions, T as createEnd, Ta as createShowVertBorder, Tc as GradientFillOptions, Ti as createHoleSize, Tn as createOrgChart, To as LockedCanvasOptions, Tr as createXdrOneCellAnchor, Ts as LightRigOptions, Tt as createDiagramExtLst, U as createNvGraphicFramePr, Ua as createW, Uc as createColorElement, Ui as createMinorTickMark, Un as createWpCanvas, Uo as ThemeableLineStyleOptions, Ur as createBandFmts, Us as OuterShadowEffectOptions, Ut as createTxFillClrLst, V as createLnTlToBr, Va as createUserInterface, Vc as createBlipEffects, Vi as createMin, Vn as createWpCNvPr, Vo as TableStyleRegion, Vr as createBackWall, Vs as PresetShadowVal, Vt as createStyleLbl, W as createNvGrpSpPr, Wa as createWMode, Wc as createSolidFill, Wi as createMinorTimeUnit, Wn as createWpContentPart, Wo as createTableStyle, Wr as createBaseTimeUnit, Ws as RectAlignment, Wt as createTxLinClrLst, X as createRight, Xa as createCdrBlipFill, Xc as createSchemeColor, Xi as createNumLit, Xn as createWpNestedGrpSp, Xo as Transform2DOptions, Xr as createCrossBetween, Xs as BlendMode, Xt as LayoutDefHdrLstOptions, Y as createQuickTimeFile, Ya as createCdrAbsSizeAnchor, Yc as SchemeColorOptions, Yi as createName, Yn as createWpLinkedTxbx, Yo as GroupTransform2DOptions, Yr as createClrMapOvr, Ys as createGlowEffect, Yt as DiagramNameOptions, Z as createRound, Za as createCdrCNvCxnSpPr, Zc as ScRgbColorOptions, Zi as createOddFooter, Zn as createWpNvContentPartPr, Zo as createGroupTransform2D, Zr as createCrossesAt, Zs as FillOverlayEffectOptions, Zt as LayoutDefHdrOptions, _ as createChart, _a as createSerLines, _c as createPatternFill, _i as createFmtId, _n as PresLayoutVarsOptions, _o as createCdrSpPr, _r as createXdrCxnSp, _s as Shape3DOptions, _t as createUFillTx, a as createBottom, aa as createPictureOptions, ac as PresetDash, ai as createDispUnits, al as createHslColor, an as createStyleDefHdrLst, ao as createCdrFrom, ar as XdrMarkerOptions, as as ConnectionSite, at as createSym, b as createCustClr, ba as createShowHorzBorder, bc as BlipFillMediaData, bi as createGapWidth, bn as createAnimLvl, bo as createCdrTxBody, br as createXdrGrpSpPr, bs as BevelPresetType, bt as createUseSpRect, c as createBuClrTx, ca as createPivotFmts, cc as LineEndOptions, ci as createEvenFooter, cn as AnimLevelValue, co as createCdrGrpSpPr, cr as createXdrBlipFill, cs as PathCommand, ct as createTableStyleElement, d as createBuSzTx, da as createPlus, dc as createLineEnd, di as createExt, dn as AnimOneValue, do as createCdrNvGrpSpPr, dr as createXdrCNvPicPr, ds as createCustomGeometry, dt as createTl2br, ea as createOfPieType, ec as LineCap, ei as createDLbl, el as createRgbColor, en as createColorsDefHdr, eo as createCdrCNvPicPr, er as createWpStyle, es as createExtentionList, et as createSpDef, f as createCNvCxnSpPr, fa as createPrintSettings, fc as DashStop, fi as createExtLst, fn as ChMaxOptions, fo as createCdrNvPicPr, fr as createXdrCNvPr, fs as PresetGeometry, ft as createTop, g as createCell3D, ga as createSelection, gc as PresetPattern, gi as createFloor, gn as OrgChartOptions, go as createCdrSp, gr as createXdrContentPart, gs as PresetMaterialType, gt as createUFill, h as createCNvSpPr, ha as createSecondPieSize, hc as PatternFillOptions, hi as createFirstHeader, hn as HierBranchStyle, ho as createCdrRelSizeAnchor, hr as createXdrColOff, hs as createAdjustmentValues, ht as createTxSp, i as createBldDgm, ia as createPictureFormat, ic as PenAlignment, ii as createDispBlanksAs, il as HslColorOptions, in as createStyleDefHdr, io as createCdrExt, ir as createWpXfrm, is as createBlip, it as createStyleElement, j as createGrpSpPr, ja as createSplitType, jc as RelativeRect, ji as createLegendEntry, jn as WpLinkedTextboxOptions, jo as createGroupLocking, jr as createXdrStyle, js as createSoftEdgeEffect, jt as ColorMethod, k as createGraphicFrame, ka as createSmooth, kc as PathShadeOptions, ki as createLeaderLines, kn as WpGraphicFrameOptions, ko as ShapeLockingOptions, kr as createXdrSp, ks as Vector3D, kt as createDiagramRelIds, l as createBuFontTx, la as createPivotSource, lc as LineEndType, li as createEvenHeader, ln as AnimLvlOptions, lo as createCdrNvCxnSpPr, lr as createXdrCNvCxnSpPr, ls as PathFillMode, lt as createThemeManager, m as createCNvGrpSpPr, ma as createSecondPiePt, mc as createGroupFill, mi as createFirstFooter, mn as HierBranchOptions, mo as createCdrPic, mr as createXdrCol, ms as GeometryGuide, mt as createTxDef, n as createBevelElement, na as createPageMargins, nc as OutlineFillProperties, ni as createDTable, nl as PresetColorOptions, nn as createLayoutDefHdr, no as createCdrCNvSpPr, nr as createWpTxbxContent, ns as createBlipFill, nt as createStCxn, o as createBr, oa as createPictureStackUnit, oc as createOutline, oi as createDispUnitsLbl, ol as ColorTransformOptions, on as AdjLstOptions, oo as createCdrGraphicFrame, or as XdrShapeAttributes, os as CustomGeometryOptions, ot as createTab, p as createCNvGraphicFramePr, pa as createProtection, pc as createCustomDash, pi as createExternalData, pn as ChPrefOptions, po as createCdrNvSpPr, pr as createXdrCNvSpPr, ps as PresetGeometryOptions, pt as createTr2bl, q as createOverrideClrMapping, qa as createY, qc as createSystemColor, qi as createMultiLvlStrCache, qn as createWpGrpSp, qo as MediaTransformation, qr as createBuiltInUnit, qs as createInnerShadowEffect, qt as DiagramCategoryOptions, r as createBldChart, ra as createPageSetup, rc as OutlineOptions, ri as createData, rl as createPresetColor, rn as createLayoutDefHdrLst, ro as createCdrCxnSp, rr as createWpWhole, rs as BlipOptions, rt as createStart, s as createBuBlip, sa as createPivotFmt, sc as LineEndLength, si as createDownBars, sl as createColorTransforms, sn as AdjOptions, so as createCdrGrpSp, sr as XdrTwoCellAnchorOptions, ss as GeomRect, st as createTabLst, t as createAudioCd, ta as createOverlap, tc as LineJoin, ti as createDPt, tl as PresetColor, tn as createColorsDefHdrLst, to as createCdrCNvPr, tr as createWpTxbx, ts as BlipFillOptions, tt as createSt, u as createBuSzPts, ua as createPlotVisOnly, uc as LineEndWidth, ui as createExplosion, un as AnimOneOptions, uo as createCdrNvGraphicFramePr, ur as createXdrCNvGrpSpPr, us as PathOptions, ut as createThemeOverride, v as createClrMap, va as createShape, vc as createNoFill, vi as createFormatting, vn as createAdj, vo as createCdrStyle, vr as createXdrFrom, vs as createShape3D, vt as createULn, w as createDgm, wa as createShowOutline, wc as extractBlipFillMedia, wi as createHiLowLines, wn as createHierBranch, wo as LockedCanvas, wr as createXdrNvSpPr, ws as CameraOptions, wt as DiagramTextPropsOptions, x as createCustClrLst, xa as createShowKeys, xc as FillOptions, xi as createH, xn as createAnimOne, xo as createCdrX, xr as createXdrNvCxnSpPr, xs as createBevel, xt as createWavAudioFile, y as createCpLocks, ya as createShowDLblsOverMax, yc as BlipFillConfigOptions, yi as createGapDepth, yn as createAdjLst, yo as createCdrTo, yr as createXdrGrpSp, ys as BevelOptions, yt as createULnTx, z as createLnBlToTr, za as createUpBars, zc as createSourceRectangle, zi as createMarker, zn as createWpCNvFrPr, zo as TableStyleListOptions, zr as createApplyToSides, zs as createReflectionEffect, zt as createFillClrLst } from "../index-C-DvIxek.mjs";
|
|
2
|
-
export { type AdjLstOptions, type AdjOptions, AnimLevelValue, type AnimLvlOptions, type AnimOneOptions, AnimOneValue, type BackdropOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, type CameraOptions, type ChMaxOptions, type ChPrefOptions, type ColorListOptions, ColorMethod, type ColorTransformOptions, type ColorsDefHdrLstOptions, type ColorsDefHdrOptions, CompoundLine, type ConnectionSite, type CustomGeometryOptions, type DashStop, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtLstOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelIdsOptions, type DiagramStyleLblOptions, type DiagramStyleOptions, type DiagramTextPropsOptions, type EffectContainerType, type EffectDagOptions, 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 LayoutDefHdrLstOptions, type LayoutDefHdrOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions,
|
|
1
|
+
import { $ as createStyleLbl, $a as createSchemeColor, $n as ReflectionEffectOptions, $t as TableStyleOptions, A as scRgbColorDesc, Aa as GradientStop, An as Shape3DOptions, At as createAdj, B as DiagramRelIdsOptions, Ba as createTileInfo, Bn as Scene3DOptions, Bt as GroupLockingOptions, C as fillDesc, Ca as BlipFillMediaData, Cn as PathOptions, Cr as LineEndOptions, Ct as AnimOneValue, D as hslColorDesc, Da as extractBlipFillMedia, Dn as GeometryGuide, Dr as DashStop, Dt as HierBranchStyle, E as getColorDescriptor, Ea as buildFill, En as stringifyPresetGeometry, Er as createLineEnd, Et as HierBranchOptions, F as DiagramExtensionOptions, Fa as TileFlipMode, Fn as createBottomBevel, Ft as createChPref, G as DiagramStyleOptions, Ga as SolidFillOptions, Gn as EffectContainerType, Gt as createPictureLocking, H as ColorListOptions, Ha as createSourceRectangle, Hn as Vector3D, Ht as ShapeLockingOptions, I as DiagramTextPropsOptions, Ia as createGradientFill, In as BackdropOptions, It as createHierBranch, J as StyleMatrixIndex, Ja as SystemColor, Jn as BlurEffectOptions, Jt as StyleMatrixReferenceOptions, K as FontCollectionIndex, Ka as createColorElement, Kn as EffectDagOptions, Kt as createShapeLocking, L as createDiagramExtLst, La as createGradientStop, Ln as CameraOptions, Lt as createOrgChart, M as solidFillDesc, Ma as PathShadeOptions, Mn as BevelOptions, Mt as createAnimLvl, N as systemColorDesc, Na as PathShadeType, Nn as BevelPresetType, Nt as createAnimOne, O as presetColorDesc, Oa as GradientFillOptions, On as stringifyAdjustmentValues, Or as createCustomDash, Ot as OrgChartOptions, P as DiagramExtLstOptions, Pa as RelativeRect, Pn as createBevel, Pt as createChMax, Q as createLinClrLst, Qa as SchemeColorOptions, Qn as createEffectList, Qt as TableStyleListOptions, R as createDiagramSp3d, Ra as TileAlignment, Rn as LightRigOptions, Rt as createPresLayoutVars, S as outlineDesc, Sa as BlipFillConfigOptions, Sn as PathFillMode, Sr as LineEndLength, St as AnimOneOptions, T as patternFillDesc, Ta as GradientStopOptions, Tn as PresetGeometryOptions, Tr as LineEndWidth, Tt as ChPrefOptions, U as ColorMethod, Ua as BlipEffectsOptions, Un as createScene3D, Ut as createGraphicFrameLocking, V as createDiagramRelIds, Va as SourceRectangleOptions, Vn as SphereCoords, Vt as PictureLockingOptions, W as DiagramStyleLblOptions, Wa as createBlipEffects, Wn as createSoftEdgeEffect, Wt as createGroupLocking, X as createEffectClrLst, Xa as createSystemColor, Xn as EffectListOptions, Xt as TableCellStyleOptions, Y as createDiagramStyle, Ya as SystemColorOptions, Yn as EffectExtent, Yt as TableCellBorderOptions, Z as createFillClrLst, Za as SchemeColor, Zn as calculateEffectExtent, Zt as TablePartStyleOptions, _ as graphicFrameLockingDesc, _a as createGroupFill, _n as createBlip, _r as OutlineFillProperties, _t as createStyleDefHdrLst, a as blipDesc, an as MediaDataTransformation, ao as PresetColorOptions, ar as RectAlignment, at as DiagramCategoryOptions, b as shapeLockingDesc, ba as createPatternFill, bn as GeomRect, br as PresetDash, bt as AnimLevelValue, c as stretchDesc, cn as GroupTransform2DOptions, co as createHslColor, cr as createInnerShadowEffect, ct as LayoutDefHdrLstOptions, d as scene3DDesc, dn as createTransform2D, dr as BlendMode, dt as StyleDefHdrOptions, en as TableStyleRegion, eo as ScRgbColorOptions, er as createReflectionEffect, et as createTxEffectClrLst, f as shape3DDesc, fn as stringifyStretch, fr as FillOverlayEffectOptions, ft as createColorsDefHdr, g as presetGeometryDesc, gn as BlipOptions, gr as LineJoin, gt as createStyleDefHdr, h as customGeometryDesc, hn as createBlipFill, hr as LineCap, ht as createLayoutDefHdrLst, i as presLayoutVarsDesc, in as createTableStyleList, io as PresetColor, ir as OuterShadowEffectOptions, it as ColorsDefHdrOptions, j as schemeColorDesc, ja as LinearShadeOptions, jn as createShape3D, jt as createAdjLst, k as rgbColorDesc, ka as GradientShadeOptions, kn as PresetMaterialType, kt as PresLayoutVarsOptions, l as tileDesc, ln as Transform2DOptions, lo as ColorTransformOptions, lr as GlowEffectOptions, lt as LayoutDefHdrOptions, m as transform2DDesc, mn as BlipFillOptions, mr as CompoundLine, mt as createLayoutDefHdr, n as diagramRelIdsDesc, nn as ThemeableLineStyleOptions, no as RgbColorOptions, nr as PresetShadowVal, nt as createTxLinClrLst, o as blipFillDesc, on as MediaTransformation, oo as createPresetColor, or as createOuterShadowEffect, ot as DiagramDescriptionOptions, p as groupTransform2DDesc, pn as createExtentionList, pr as createFillOverlayEffect, pt as createColorsDefHdrLst, q as HueDirection, qa as createSolidFill, qn as createEffectDag, qt as OnOffStyleType, r as diagramStyleDesc, rn as createTableStyle, ro as createRgbColor, rr as createPresetShadowEffect, rt as ColorsDefHdrLstOptions, s as sourceRectangleDesc, sn as createTransformation, so as HslColorOptions, sr as InnerShadowEffectOptions, st as DiagramNameOptions, t as diagramExtLstDesc, tn as TableTextStyleOptions, to as createScRgbColor, tr as PresetShadowEffectOptions, tt as createTxFillClrLst, u as bevelDesc, un as createGroupTransform2D, uo as createColorTransforms, ur as createGlowEffect, ut as StyleDefHdrLstOptions, v as groupLockingDesc, va as PatternFillOptions, vn as ConnectionSite, vr as OutlineOptions, vt as AdjLstOptions, w as gradientFillDesc, wa as FillOptions, wn as createCustomGeometry, wr as LineEndType, wt as ChMaxOptions, x as effectListDesc, xa as createNoFill, xn as PathCommand, xr as createOutline, xt as AnimLvlOptions, y as pictureLockingDesc, ya as PresetPattern, yn as CustomGeometryOptions, yr as PenAlignment, yt as AdjOptions, z as createDiagramTxPr, za as TileOptions, zn as Point3D, zt as GraphicFrameLockingOptions } from "../index-RWXzxibP.mjs";
|
|
2
|
+
export { type AdjLstOptions, type AdjOptions, AnimLevelValue, type AnimLvlOptions, type AnimOneOptions, AnimOneValue, type BackdropOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, type CameraOptions, type ChMaxOptions, type ChPrefOptions, type ColorListOptions, ColorMethod, type ColorTransformOptions, type ColorsDefHdrLstOptions, type ColorsDefHdrOptions, CompoundLine, type ConnectionSite, type CustomGeometryOptions, type DashStop, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtLstOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelIdsOptions, type DiagramStyleLblOptions, type DiagramStyleOptions, type DiagramTextPropsOptions, 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 LayoutDefHdrLstOptions, type LayoutDefHdrOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, 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 PresLayoutVarsOptions, 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 StyleDefHdrLstOptions, type StyleDefHdrOptions, 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, createAdj, createAdjLst, createAnimLvl, createAnimOne, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChMax, createChPref, createColorElement, createColorTransforms, createColorsDefHdr, createColorsDefHdrLst, createCustomDash, createCustomGeometry, createDiagramExtLst, createDiagramRelIds, createDiagramSp3d, createDiagramStyle, createDiagramTxPr, createEffectClrLst, createEffectDag, createEffectList, createExtentionList, createFillClrLst, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefHdr, createLayoutDefHdrLst, createLinClrLst, createLineEnd, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPresLayoutVars, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefHdr, createStyleDefHdrLst, createStyleLbl, createSystemColor, createTableStyle, createTableStyleList, createTileInfo, createTransform2D, createTransformation, createTxEffectClrLst, createTxFillClrLst, createTxLinClrLst, customGeometryDesc, diagramExtLstDesc, diagramRelIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, getColorDescriptor, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, patternFillDesc, pictureLockingDesc, presLayoutVarsDesc, 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
|
|
2
|
-
export { AnimLevelValue, AnimOneValue, BevelPresetType, BlendMode, ColorMethod, CompoundLine, FontCollectionIndex, HierBranchStyle, HueDirection, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin,
|
|
1
|
+
import { $ as systemColorDesc, A as bevelDesc, An as LineCap, Ar as PresetColor, At as createChPref, B as shapeLockingDesc, Bn as createGroupFill, Bt as createTransformation, C as diagramStyleDesc, Cn as RectAlignment, Cr as createSolidFill, Ct as AnimOneValue, D as sourceRectangleDesc, Dn as BlendMode, Dr as createSchemeColor, Dt as createAnimLvl, E as blipFillDesc, En as createGlowEffect, Er as SchemeColor, Et as createAdjLst, F as customGeometryDesc, Fn as LineEndLength, Ft as createGroupLocking, G as patternFillDesc, Gn as createPatternFill, H as outlineDesc, Hn as buildFill, I as presetGeometryDesc, In as LineEndType, It as createPictureLocking, J as presetColorDesc, Jn as createGradientFill, K as getColorDescriptor, Kn as PathShadeType, L as graphicFrameLockingDesc, Ln as LineEndWidth, Lt as createShapeLocking, M as shape3DDesc, Mn as PenAlignment, Mr as createHslColor, Mt as createOrgChart, N as groupTransform2DDesc, Nn as PresetDash, Nr as createColorTransforms, Nt as createPresLayoutVars, O as stretchDesc, On as createFillOverlayEffect, Or as createScRgbColor, Ot as createAnimOne, P as transform2DDesc, Pn as createOutline, Pt as createGraphicFrameLocking, Q as solidFillDesc, R as groupLockingDesc, Rn as createLineEnd, Rt as createTableStyle, S as diagramRelIdsDesc, Sn as createPresetShadowEffect, Sr as createColorElement, St as AnimLevelValue, T as blipDesc, Tn as createInnerShadowEffect, Tr as createSystemColor, Tt as createAdj, U as fillDesc, Un as extractBlipFillMedia, V as effectListDesc, Vn as createNoFill, W as gradientFillDesc, Wn as PresetPattern, X as scRgbColorDesc, Xn as TileAlignment, Y as rgbColorDesc, Yn as createGradientStop, Z as schemeColorDesc, Zn as createTileInfo, _n as calculateEffectExtent, _r as createBlipEffects, _t as createColorsDefHdrLst, an as createBlip, at as FontCollectionIndex, bn as createReflectionEffect, bt as createStyleDefHdr, cn as stringifyPresetGeometry, ct as createDiagramStyle, dn as createShape3D, dt as createLinClrLst, et as createDiagramExtLst, fn as BevelPresetType, ft as createStyleLbl, gn as createEffectDag, gr as createSourceRectangle, gt as createColorsDefHdr, hn as createScene3D, ht as createTxLinClrLst, in as createBlipFill, it as ColorMethod, j as scene3DDesc, jn as LineJoin, jr as createPresetColor, jt as createHierBranch, k as tileDesc, kn as CompoundLine, kr as createRgbColor, kt as createChMax, ln as stringifyAdjustmentValues, lt as createEffectClrLst, mn as createBottomBevel, mt as createTxFillClrLst, nn as createTransform2D, nt as createDiagramTxPr, on as createExtentionList, ot as HueDirection, pn as createBevel, pt as createTxEffectClrLst, q as hslColorDesc, qn as TileFlipMode, rn as stringifyStretch, rt as createDiagramRelIds, sn as createCustomGeometry, st as StyleMatrixIndex, tn as createGroupTransform2D, tt as createDiagramSp3d, un as PresetMaterialType, ut as createFillClrLst, vn as createEffectList, vt as createLayoutDefHdr, w as presLayoutVarsDesc, wn as createOuterShadowEffect, wr as SystemColor, wt as HierBranchStyle, x as diagramExtLstDesc, xn as PresetShadowVal, xt as createStyleDefHdrLst, yn as createSoftEdgeEffect, yt as createLayoutDefHdrLst, z as pictureLockingDesc, zn as createCustomDash, zt as createTableStyleList } from "../src-CU2AFKyt.mjs";
|
|
2
|
+
export { AnimLevelValue, AnimOneValue, 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, createAdj, createAdjLst, createAnimLvl, createAnimOne, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createChMax, createChPref, createColorElement, createColorTransforms, createColorsDefHdr, createColorsDefHdrLst, createCustomDash, createCustomGeometry, createDiagramExtLst, createDiagramRelIds, createDiagramSp3d, createDiagramStyle, createDiagramTxPr, createEffectClrLst, createEffectDag, createEffectList, createExtentionList, createFillClrLst, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefHdr, createLayoutDefHdrLst, createLinClrLst, createLineEnd, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPresLayoutVars, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefHdr, createStyleDefHdrLst, createStyleLbl, createSystemColor, createTableStyle, createTableStyleList, createTileInfo, createTransform2D, createTransformation, createTxEffectClrLst, createTxFillClrLst, createTxLinClrLst, customGeometryDesc, diagramExtLstDesc, diagramRelIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, getColorDescriptor, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, patternFillDesc, pictureLockingDesc, presLayoutVarsDesc, presetColorDesc, presetGeometryDesc, rgbColorDesc, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, solidFillDesc, sourceRectangleDesc, stretchDesc, stringifyAdjustmentValues, stringifyPresetGeometry, stringifyStretch, systemColorDesc, tileDesc, transform2DDesc };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Element } from "@office-open/xml";
|
|
2
|
+
|
|
3
|
+
//#region src/descriptor/context.d.ts
|
|
4
|
+
/** Context passed during stringify (write path). */
|
|
5
|
+
interface WriteContext {
|
|
6
|
+
/** Register a relationship and return its rId. */
|
|
7
|
+
addRelationship(type: string, target: string, mode?: string): string;
|
|
8
|
+
/** Add a media file and return its reference. */
|
|
9
|
+
addMedia(data: Uint8Array, type: string): string;
|
|
10
|
+
}
|
|
11
|
+
/** Context passed during parse (parse path). */
|
|
12
|
+
interface ReadContext {
|
|
13
|
+
/** Resolve a relationship rId to its target path. */
|
|
14
|
+
resolveRelationship(rId: string): string | undefined;
|
|
15
|
+
/** Get a parsed XML part by path. */
|
|
16
|
+
getPart(path: string): Element | undefined;
|
|
17
|
+
/** Get raw binary data (images, media, etc.) by path. */
|
|
18
|
+
getRaw(path: string): Uint8Array | undefined;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/descriptor/types.d.ts
|
|
22
|
+
/** Element descriptor — declarative XML mapping. */
|
|
23
|
+
interface ElementDescriptor<T> {
|
|
24
|
+
readonly kind: "element";
|
|
25
|
+
readonly tag: string;
|
|
26
|
+
readonly attrs?: readonly AttrSpec<T>[];
|
|
27
|
+
readonly content?: readonly ContentSpec<T>[];
|
|
28
|
+
}
|
|
29
|
+
/** Custom descriptor — for complex logic that doesn't fit the declarative model. */
|
|
30
|
+
interface CustomDescriptor<T, Ctx = WriteContext> {
|
|
31
|
+
readonly kind: "custom";
|
|
32
|
+
stringify(value: T, ctx: Ctx): string | undefined;
|
|
33
|
+
parse(el: Element, ctx: ReadContext): Partial<T>;
|
|
34
|
+
}
|
|
35
|
+
/** Union type for all descriptors. */
|
|
36
|
+
type Descriptor<T> = ElementDescriptor<T> | CustomDescriptor<T>;
|
|
37
|
+
interface AttrSpec<T> {
|
|
38
|
+
/** Property key in the Options object. */
|
|
39
|
+
readonly key: keyof T & string;
|
|
40
|
+
/** XML attribute name (e.g. "w:val"). */
|
|
41
|
+
readonly xmlName: string;
|
|
42
|
+
/** Default value — omitted during stringify when equal. */
|
|
43
|
+
readonly default?: unknown;
|
|
44
|
+
/** Encode a JS value to an XML attribute string. Return undefined to skip. */
|
|
45
|
+
readonly encode?: (v: any) => string | undefined;
|
|
46
|
+
/** Decode an XML attribute string to a JS value. */
|
|
47
|
+
readonly decode?: (raw: string) => any;
|
|
48
|
+
}
|
|
49
|
+
/** Single child element mapped to a property. */
|
|
50
|
+
interface ChildSpec<T> {
|
|
51
|
+
readonly kind: "child";
|
|
52
|
+
readonly key: keyof T & string;
|
|
53
|
+
readonly tag: string;
|
|
54
|
+
readonly desc: Descriptor<any>;
|
|
55
|
+
}
|
|
56
|
+
/** Multiple child elements of the same tag mapped to an array property. */
|
|
57
|
+
interface ChildrenSpec<T> {
|
|
58
|
+
readonly kind: "children";
|
|
59
|
+
readonly key: keyof T & string;
|
|
60
|
+
readonly tag: string;
|
|
61
|
+
readonly desc: Descriptor<any>;
|
|
62
|
+
}
|
|
63
|
+
/** Union child — one of several possible child elements. */
|
|
64
|
+
interface UnionSpec<T> {
|
|
65
|
+
readonly kind: "union";
|
|
66
|
+
readonly key: keyof T & string;
|
|
67
|
+
readonly variants: readonly UnionVariant[];
|
|
68
|
+
}
|
|
69
|
+
/** Text content mapped to a property. */
|
|
70
|
+
interface TextSpec<T> {
|
|
71
|
+
readonly kind: "text";
|
|
72
|
+
readonly key: keyof T & string;
|
|
73
|
+
}
|
|
74
|
+
interface UnionVariant {
|
|
75
|
+
readonly tag: string;
|
|
76
|
+
readonly match: (opts: any) => boolean;
|
|
77
|
+
readonly desc: Descriptor<any>;
|
|
78
|
+
}
|
|
79
|
+
/** Discriminated union of all content spec types. */
|
|
80
|
+
type ContentSpec<T> = ChildSpec<T> | ChildrenSpec<T> | UnionSpec<T> | TextSpec<T> | CustomDescriptor<T>;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/descriptor/builder.d.ts
|
|
83
|
+
declare function element$1<T extends object>(tag: string): DescriptorBuilder<T>;
|
|
84
|
+
declare class DescriptorBuilder<T extends object> {
|
|
85
|
+
private readonly _tag;
|
|
86
|
+
private readonly _attrs;
|
|
87
|
+
private readonly _content;
|
|
88
|
+
constructor(tag: string);
|
|
89
|
+
/** Add an attribute mapping. */
|
|
90
|
+
attr(key: keyof T & string, xmlName: string, opts?: {
|
|
91
|
+
readonly default?: unknown;
|
|
92
|
+
readonly encode?: (v: any) => string | undefined;
|
|
93
|
+
readonly decode?: (raw: string) => any;
|
|
94
|
+
}): this;
|
|
95
|
+
/** Add a single child element mapping. */
|
|
96
|
+
child(key: keyof T & string, tag: string, desc: ChildSpec<T>["desc"]): this;
|
|
97
|
+
/** Add a repeating child element mapping. */
|
|
98
|
+
children(key: keyof T & string, tag: string, desc: ChildrenSpec<T>["desc"]): this;
|
|
99
|
+
/** Add a union (one-of-several) child mapping. */
|
|
100
|
+
union(key: keyof T & string, variants: readonly UnionVariant[]): this;
|
|
101
|
+
/** Add a text content mapping. */
|
|
102
|
+
text(key: keyof T & string): this;
|
|
103
|
+
/** Add a custom content handler. */
|
|
104
|
+
custom(spec: CustomDescriptor<T>): this;
|
|
105
|
+
/** Build the immutable ElementDescriptor. */
|
|
106
|
+
build(): ElementDescriptor<T>;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/descriptor/runtime.d.ts
|
|
110
|
+
/**
|
|
111
|
+
* Serialize an Options object to an XML string using its descriptor.
|
|
112
|
+
* Returns `undefined` when an optional element should be omitted.
|
|
113
|
+
*/
|
|
114
|
+
declare function stringify<T>(desc: Descriptor<T>, value: T, ctx: WriteContext): string | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Parse an XML Element into a partial Options object using its descriptor.
|
|
117
|
+
*/
|
|
118
|
+
declare function parse<T>(desc: Descriptor<T>, el: Element, ctx: ReadContext): Partial<T>;
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/descriptor/helpers.d.ts
|
|
121
|
+
/**
|
|
122
|
+
* OOXML-specific encode/decode helpers for descriptors.
|
|
123
|
+
*
|
|
124
|
+
* XML traversal helpers (findChild, etc.) are in @office-open/xml utils.
|
|
125
|
+
* This file only contains OOXML value encoding/decoding.
|
|
126
|
+
*
|
|
127
|
+
* @module
|
|
128
|
+
*/
|
|
129
|
+
/** Encode boolean for CT_OnOff: true → omit val, false → "0". */
|
|
130
|
+
declare const boolEncode: (v: boolean | undefined) => string | undefined;
|
|
131
|
+
/** Decode CT_OnOff: absent or "true"/"1" → true, "0"/"false" → false. */
|
|
132
|
+
declare const boolDecode: (raw: string) => boolean;
|
|
133
|
+
/** Create an enum encoder from a JS↔XML mapping. */
|
|
134
|
+
declare const enumEncode: (map: Record<string, string>) => (v: string | undefined) => string | undefined;
|
|
135
|
+
/** Create an enum decoder from a JS↔XML mapping (inverted). */
|
|
136
|
+
declare const enumDecode: (map: Record<string, string>) => (raw: string) => string;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/descriptor/registry.d.ts
|
|
139
|
+
declare class DescriptorRegistry {
|
|
140
|
+
private static readonly _map;
|
|
141
|
+
/** Register a descriptor with its XML tag. */
|
|
142
|
+
static register(tag: string, desc: Descriptor<any>): void;
|
|
143
|
+
/** Look up a descriptor by XML tag. */
|
|
144
|
+
static get(tag: string): Descriptor<any> | undefined;
|
|
145
|
+
/** Get all registered tags. */
|
|
146
|
+
static tags(): ReadonlySet<string>;
|
|
147
|
+
/** Check if a tag is registered. */
|
|
148
|
+
static has(tag: string): boolean;
|
|
149
|
+
/** Get the number of registered descriptors. */
|
|
150
|
+
static get size(): number;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
export { TextSpec as _, enumEncode as a, ReadContext as b, DescriptorBuilder as c, ChildSpec as d, ChildrenSpec as f, ElementDescriptor as g, Descriptor as h, enumDecode as i, element$1 as l, CustomDescriptor as m, boolDecode as n, parse as o, ContentSpec as p, boolEncode as r, stringify as s, DescriptorRegistry as t, AttrSpec as u, UnionSpec as v, WriteContext as x, UnionVariant as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as CustomDescriptor } from "./index-BI-1SKm5.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/theme/theme-options.d.ts
|
|
4
4
|
/**
|
|
@@ -36,11 +36,11 @@ interface ThemeOptions {
|
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/theme/default-theme.d.ts
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Generate theme XML string from options.
|
|
41
|
+
* Returns cached default when no options provided.
|
|
42
|
+
*/
|
|
43
|
+
declare function createThemeXml(options?: ThemeOptions): string;
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/theme/build-theme-xml.d.ts
|
|
46
46
|
declare function buildThemeXml(options?: ThemeOptions): string;
|
|
@@ -49,4 +49,7 @@ declare function buildThemeXml(options?: ThemeOptions): string;
|
|
|
49
49
|
/** Office 2016+ default theme colors (hex without #). */
|
|
50
50
|
declare const DEFAULT_COLORS: Required<ColorSchemeOptions>;
|
|
51
51
|
//#endregion
|
|
52
|
-
|
|
52
|
+
//#region src/theme/theme-descriptors.d.ts
|
|
53
|
+
declare const themeDesc: CustomDescriptor<ThemeOptions>;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { ColorSchemeOptions as a, createThemeXml as i, DEFAULT_COLORS as n, FontSchemeOptions as o, buildThemeXml as r, ThemeOptions as s, themeDesc as t };
|