@office-open/core 0.6.8 → 0.6.10
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 +9 -9
- package/dist/chart/index.d.mts +1 -1
- package/dist/chart/index.mjs +1 -1
- package/dist/{chart-jj57bDdC.mjs → chart-dfAcyzCL.mjs} +1 -1
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +1 -1
- package/dist/{drawingml-C0t3mzSK.mjs → drawingml-DQlhouyh.mjs} +11 -9
- package/dist/{index-BaL8Sbrf.d.mts → index-BWboZ6Uq.d.mts} +1 -1
- package/dist/{index-DP97S6un.d.mts → index-Borh69Zs.d.mts} +10 -7
- package/dist/{index-18VktT2t.d.mts → index-CtcOpyfu.d.mts} +2 -2
- package/dist/{index-CEFUwJ2F.d.mts → index-f_Izh2dj.d.mts} +1 -1
- package/dist/index.d.mts +62 -48
- package/dist/index.mjs +232 -58
- package/dist/patch/index.d.mts +2 -2
- package/dist/patch/index.mjs +1 -1
- package/dist/{patch-O6SD_BaJ.mjs → patch-ilNZTQmG.mjs} +64 -39
- package/dist/smartart/index.d.mts +1 -1
- package/dist/smartart/index.mjs +1 -1
- package/dist/{smartart-BKz8xM1k.mjs → smartart-Cx1qa6k_.mjs} +5 -9
- package/dist/values-zMCu5EoQ.mjs +371 -0
- package/dist/values.d.mts +1 -1
- package/dist/values.mjs +1 -370
- package/dist/{xml-components-Cfvn_mId.mjs → xml-components-xJkfJ6ff.mjs} +39 -12
- package/package.json +2 -2
- /package/dist/{index-DNLRdIqy.d.mts → index-BCUfgp9A.d.mts} +0 -0
- /package/dist/{values-QyWq4U4A.d.mts → values-COjPGYkS.d.mts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as EMPTY_OBJECT, a as BuilderElement, b as BaseXmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as IgnoreIfEmptyXmlComponent, y as XmlComponent } from "./xml-components-
|
|
2
|
-
import {
|
|
3
|
-
import { $ as xsdCompoundLine, A as LineJoin, At as hashedId, B as createNoFill, Bt as convertPixelsToEmu, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, Ft as convertEmuToPixels, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, It as convertEmuToPoints, J as createGradientStop, K as TileFlipMode, L as createLineEnd, Lt as convertInchesToEmu, M as PresetDash, Mt as uniqueNumericIdCreator, N as createOutline, Nt as uniqueUuid, O as CompoundLine, Ot as createHslColor, P as LineEndLength, Pt as convertEmuToInches, Q as xsdBlendMode, R as createCustomDash, Rt as convertInchesToTwip, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, Vt as convertPointsToEmu, W as createPatternFill, X as createTileInfo, Y as TileAlignment, Z as invertMap, _ as createEffectList, _t as createBlipEffects, a as createBlip, at as xsdPattern, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, ct as xsdRectAlignment, d as createShape3D, dt as xsdTextAnchor, et as xsdEffectContainer, f as BevelPresetType, ft as xsdTextCaps, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, it as xsdPathFillMode, j as PenAlignment, jt as uniqueId, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, lt as xsdStrikeStyle, m as createBottomBevel, mt as xsdVerticalMergeRev, n as createGroupTransform2D, nt as xsdLineEndSize, o as createExtentionList, ot as xsdPenAlignment, p as createBevel, pt as xsdUnderlineStyle, q as createGradientFill, r as createTransform2D, rt as xsdMaterialType, s as createCustomGeometry, st as xsdPresetShadow, t as createTransformation, tt as xsdLineCap, u as PresetMaterialType, ut as xsdTextAlign, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill, zt as convertMillimetersToTwip } from "./drawingml-
|
|
4
|
-
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-
|
|
5
|
-
import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "./chart-
|
|
6
|
-
import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "./patch-
|
|
1
|
+
import { _ as EMPTY_OBJECT, a as BuilderElement, b as BaseXmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as IgnoreIfEmptyXmlComponent, y as XmlComponent } from "./xml-components-xJkfJ6ff.mjs";
|
|
2
|
+
import { _ as twipsMeasureValue, a as eighthPointMeasureValue, b as unsignedDecimalNumber, c as hpsMeasureValue, d as percentageValue, f as pointMeasureValue, g as signedTwipsMeasureValue, h as signedHpsMeasureValue, i as decimalNumber, l as longHexNumber, m as shortHexNumber, n as ThemeFont, o as hexBinary, p as positiveUniversalMeasureValue, r as dateTimeValue, s as hexColorValue, t as ThemeColor, u as measurementOrPercentValue, v as uCharHexNumber, y as universalMeasureValue } from "./values-zMCu5EoQ.mjs";
|
|
3
|
+
import { $ as xsdCompoundLine, A as LineJoin, At as hashedId, B as createNoFill, Bt as convertPixelsToEmu, C as createOuterShadowEffect, Ct as createSchemeColor, D as createFillOverlayEffect, Dt as createPresetColor, E as BlendMode, Et as PresetColor, F as LineEndType, Ft as convertEmuToPixels, G as PathShadeType, H as extractBlipFillMedia, I as LineEndWidth, It as convertEmuToPoints, J as createGradientStop, K as TileFlipMode, L as createLineEnd, Lt as convertInchesToEmu, M as PresetDash, Mt as uniqueNumericIdCreator, N as createOutline, Nt as uniqueUuid, O as CompoundLine, Ot as createHslColor, P as LineEndLength, Pt as convertEmuToInches, Q as xsdBlendMode, R as createCustomDash, Rt as convertInchesToTwip, S as RectAlignment, St as SchemeColor, T as createGlowEffect, Tt as createRgbColor, U as PresetPattern, V as buildFill, Vt as convertPointsToEmu, W as createPatternFill, X as createTileInfo, Y as TileAlignment, Z as invertMap, _ as createEffectList, _t as createBlipEffects, a as createBlip, at as xsdPattern, b as PresetShadowVal, bt as SystemColor, c as PresetGeometry, ct as xsdRectAlignment, d as createShape3D, dt as xsdTextAnchor, et as xsdEffectContainer, f as BevelPresetType, ft as xsdTextCaps, g as createEffectDag, gt as createSourceRectangle, h as createScene3D, ht as Stretch, i as createBlipFill, it as xsdPathFillMode, j as PenAlignment, jt as uniqueId, k as LineCap, kt as createColorTransforms, l as createAdjustmentValues, lt as xsdStrikeStyle, m as createBottomBevel, mt as xsdVerticalMergeRev, n as createGroupTransform2D, nt as xsdLineEndSize, o as createExtentionList, ot as xsdPenAlignment, p as createBevel, pt as xsdUnderlineStyle, q as createGradientFill, r as createTransform2D, rt as xsdMaterialType, s as createCustomGeometry, st as xsdPresetShadow, t as createTransformation, tt as xsdLineCap, u as PresetMaterialType, ut as xsdTextAlign, v as createSoftEdgeEffect, vt as createColorElement, w as createInnerShadowEffect, wt as createScRgbColor, x as createPresetShadowEffect, xt as createSystemColor, y as createReflectionEffect, yt as createSolidFill, z as createGroupFill, zt as convertMillimetersToTwip } from "./drawingml-DQlhouyh.mjs";
|
|
4
|
+
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-Cx1qa6k_.mjs";
|
|
5
|
+
import { a as ScatterChart, c as BarChart, d as createStrRef, f as CatAx, i as createChartType, l as AreaChart, n as ChartSpace, o as PieChart, p as ValAx, r as ChartTitle, s as LineChart, t as ChartCollection, u as createNumRef } from "./chart-dfAcyzCL.mjs";
|
|
6
|
+
import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "./patch-ilNZTQmG.mjs";
|
|
7
7
|
import { escapeXml, js2xml, textOf, xml2js } from "@office-open/xml";
|
|
8
8
|
import { AsyncZipDeflate, Zip, ZipPassThrough, strFromU8, strFromU8 as strFromU8$1, strToU8, unzipSync, unzipSync as unzipSync$1, zip, zipSync } from "fflate";
|
|
9
9
|
//#region src/output-type.ts
|
|
@@ -23,7 +23,7 @@ const convertOutput = (data, type, mimeType = OoxmlMimeType.DOCX) => {
|
|
|
23
23
|
case "blob": return new Blob([data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength)], { type: mimeType });
|
|
24
24
|
case "arraybuffer": return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
|
|
25
25
|
case "uint8array": return data;
|
|
26
|
-
case "base64": return btoa(strFromU8$1(data, true));
|
|
26
|
+
case "base64": return typeof Buffer !== "undefined" ? Buffer.from(data).toString("base64") : btoa(strFromU8$1(data, true));
|
|
27
27
|
case "string":
|
|
28
28
|
case "text":
|
|
29
29
|
case "binarystring": return strFromU8$1(data, true);
|
|
@@ -32,15 +32,194 @@ const convertOutput = (data, type, mimeType = OoxmlMimeType.DOCX) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
//#endregion
|
|
35
|
+
//#region src/zip-native.ts
|
|
36
|
+
const CRC_TABLE = new Int32Array(256);
|
|
37
|
+
for (let i = 0; i < 256; i++) {
|
|
38
|
+
let c = i;
|
|
39
|
+
for (let k = 0; k < 8; k++) c = c & 1 ? c >>> 1 ^ -306674912 : c >>> 1;
|
|
40
|
+
CRC_TABLE[i] = c;
|
|
41
|
+
}
|
|
42
|
+
function computeCrc32(data) {
|
|
43
|
+
let crc = -1;
|
|
44
|
+
for (let i = 0; i < data.length; i++) crc = CRC_TABLE[(crc ^ data[i]) & 255] ^ crc >>> 8;
|
|
45
|
+
return ~crc;
|
|
46
|
+
}
|
|
47
|
+
let _nativeDeflate;
|
|
48
|
+
let _nativeDeflateAsync;
|
|
49
|
+
let _nativeCrc32;
|
|
50
|
+
try {
|
|
51
|
+
const zlib = await import("node:zlib");
|
|
52
|
+
_nativeDeflate = (data, level) => zlib.deflateRawSync(data, { level });
|
|
53
|
+
_nativeDeflateAsync = (data, level) => new Promise((resolve, reject) => zlib.deflateRaw(data, { level }, (err, result) => {
|
|
54
|
+
if (err) reject(err);
|
|
55
|
+
else resolve(result);
|
|
56
|
+
}));
|
|
57
|
+
_nativeCrc32 = zlib.crc32 ? (data) => zlib.crc32(data) : computeCrc32;
|
|
58
|
+
} catch {}
|
|
59
|
+
const hasNativeDeflate = () => _nativeDeflate !== void 0;
|
|
60
|
+
function wU16(b, o, v) {
|
|
61
|
+
b[o] = v & 255;
|
|
62
|
+
b[o + 1] = v >> 8 & 255;
|
|
63
|
+
}
|
|
64
|
+
function wU32(b, o, v) {
|
|
65
|
+
b[o] = v & 255;
|
|
66
|
+
b[o + 1] = v >> 8 & 255;
|
|
67
|
+
b[o + 2] = v >> 16 & 255;
|
|
68
|
+
b[o + 3] = v >> 24 & 255;
|
|
69
|
+
}
|
|
70
|
+
function resolveEntryData(raw, defaultLevel) {
|
|
71
|
+
if (Array.isArray(raw)) return {
|
|
72
|
+
data: raw[0],
|
|
73
|
+
level: raw[1].level ?? defaultLevel
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
data: raw,
|
|
77
|
+
level: defaultLevel
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function compressOne(data, level, method, deflate) {
|
|
81
|
+
if (level === 0) return {
|
|
82
|
+
compressed: data,
|
|
83
|
+
method: 0
|
|
84
|
+
};
|
|
85
|
+
const compressed = deflate(data, level);
|
|
86
|
+
if (compressed.length >= data.length) return {
|
|
87
|
+
compressed: data,
|
|
88
|
+
method: 0
|
|
89
|
+
};
|
|
90
|
+
return {
|
|
91
|
+
compressed,
|
|
92
|
+
method: 8
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async function compressOneAsync(data, level, deflate) {
|
|
96
|
+
if (level === 0) return {
|
|
97
|
+
compressed: data,
|
|
98
|
+
method: 0
|
|
99
|
+
};
|
|
100
|
+
const compressed = await deflate(data, level);
|
|
101
|
+
if (compressed.length >= data.length) return {
|
|
102
|
+
compressed: data,
|
|
103
|
+
method: 0
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
compressed,
|
|
107
|
+
method: 8
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function writeZipBuffer(entries) {
|
|
111
|
+
let totalSize = 0;
|
|
112
|
+
for (let i = 0; i < entries.length; i++) totalSize += 30 + entries[i].filename.length + entries[i].data.length;
|
|
113
|
+
const cdOffset = totalSize;
|
|
114
|
+
let cdSize = 0;
|
|
115
|
+
for (let i = 0; i < entries.length; i++) cdSize += 46 + entries[i].filename.length;
|
|
116
|
+
totalSize += cdSize + 22;
|
|
117
|
+
const buf = new Uint8Array(totalSize);
|
|
118
|
+
let offset = 0;
|
|
119
|
+
for (let i = 0; i < entries.length; i++) {
|
|
120
|
+
const e = entries[i];
|
|
121
|
+
e.localOffset = offset;
|
|
122
|
+
wU32(buf, offset, 67324752);
|
|
123
|
+
wU16(buf, offset + 4, 20);
|
|
124
|
+
wU16(buf, offset + 6, 0);
|
|
125
|
+
wU16(buf, offset + 8, e.method);
|
|
126
|
+
wU16(buf, offset + 10, 0);
|
|
127
|
+
wU16(buf, offset + 12, 0);
|
|
128
|
+
wU32(buf, offset + 14, e.crc);
|
|
129
|
+
wU32(buf, offset + 18, e.data.length);
|
|
130
|
+
wU32(buf, offset + 22, e.uncompressedSize);
|
|
131
|
+
wU16(buf, offset + 26, e.filename.length);
|
|
132
|
+
wU16(buf, offset + 28, 0);
|
|
133
|
+
offset += 30;
|
|
134
|
+
buf.set(e.filename, offset);
|
|
135
|
+
offset += e.filename.length;
|
|
136
|
+
buf.set(e.data, offset);
|
|
137
|
+
offset += e.data.length;
|
|
138
|
+
}
|
|
139
|
+
for (let i = 0; i < entries.length; i++) {
|
|
140
|
+
const e = entries[i];
|
|
141
|
+
wU32(buf, offset, 33639248);
|
|
142
|
+
wU16(buf, offset + 4, 20);
|
|
143
|
+
wU16(buf, offset + 6, 20);
|
|
144
|
+
wU16(buf, offset + 8, 0);
|
|
145
|
+
wU16(buf, offset + 10, e.method);
|
|
146
|
+
wU16(buf, offset + 12, 0);
|
|
147
|
+
wU16(buf, offset + 14, 0);
|
|
148
|
+
wU32(buf, offset + 16, e.crc);
|
|
149
|
+
wU32(buf, offset + 20, e.data.length);
|
|
150
|
+
wU32(buf, offset + 24, e.uncompressedSize);
|
|
151
|
+
wU16(buf, offset + 28, e.filename.length);
|
|
152
|
+
wU16(buf, offset + 30, 0);
|
|
153
|
+
wU16(buf, offset + 32, 0);
|
|
154
|
+
wU16(buf, offset + 34, 0);
|
|
155
|
+
wU16(buf, offset + 36, 0);
|
|
156
|
+
wU32(buf, offset + 38, 0);
|
|
157
|
+
wU32(buf, offset + 42, e.localOffset);
|
|
158
|
+
offset += 46;
|
|
159
|
+
buf.set(e.filename, offset);
|
|
160
|
+
offset += e.filename.length;
|
|
161
|
+
}
|
|
162
|
+
wU32(buf, offset, 101010256);
|
|
163
|
+
wU16(buf, offset + 4, 0);
|
|
164
|
+
wU16(buf, offset + 6, 0);
|
|
165
|
+
wU16(buf, offset + 8, entries.length);
|
|
166
|
+
wU16(buf, offset + 10, entries.length);
|
|
167
|
+
wU32(buf, offset + 12, cdSize);
|
|
168
|
+
wU32(buf, offset + 16, cdOffset);
|
|
169
|
+
wU16(buf, offset + 20, 0);
|
|
170
|
+
return buf;
|
|
171
|
+
}
|
|
172
|
+
const textEncoder = new TextEncoder();
|
|
173
|
+
function nativeZip(files, level = 6) {
|
|
174
|
+
if (!_nativeDeflate) throw new Error("Native deflate not available");
|
|
175
|
+
const crc = _nativeCrc32 ?? computeCrc32;
|
|
176
|
+
const keys = Object.keys(files);
|
|
177
|
+
const entries = Array.from({ length: keys.length });
|
|
178
|
+
for (let i = 0; i < keys.length; i++) {
|
|
179
|
+
const { data, level: entryLevel } = resolveEntryData(files[keys[i]], level);
|
|
180
|
+
const c = crc(data);
|
|
181
|
+
const { compressed, method } = compressOne(data, entryLevel, 8, _nativeDeflate);
|
|
182
|
+
entries[i] = {
|
|
183
|
+
filename: textEncoder.encode(keys[i]),
|
|
184
|
+
data: compressed,
|
|
185
|
+
uncompressedSize: data.length,
|
|
186
|
+
crc: c,
|
|
187
|
+
method,
|
|
188
|
+
localOffset: 0
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return writeZipBuffer(entries);
|
|
192
|
+
}
|
|
193
|
+
async function nativeZipAsync(files, level = 6) {
|
|
194
|
+
if (!_nativeDeflateAsync) throw new Error("Native async deflate not available");
|
|
195
|
+
const crc = _nativeCrc32 ?? computeCrc32;
|
|
196
|
+
const keys = Object.keys(files);
|
|
197
|
+
const entries = Array.from({ length: keys.length });
|
|
198
|
+
for (let i = 0; i < keys.length; i++) {
|
|
199
|
+
const { data, level: entryLevel } = resolveEntryData(files[keys[i]], level);
|
|
200
|
+
const c = crc(data);
|
|
201
|
+
const { compressed, method } = await compressOneAsync(data, entryLevel, _nativeDeflateAsync);
|
|
202
|
+
entries[i] = {
|
|
203
|
+
filename: textEncoder.encode(keys[i]),
|
|
204
|
+
data: compressed,
|
|
205
|
+
uncompressedSize: data.length,
|
|
206
|
+
crc: c,
|
|
207
|
+
method,
|
|
208
|
+
localOffset: 0
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
return writeZipBuffer(entries);
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
35
214
|
//#region src/packer.ts
|
|
36
215
|
/**
|
|
37
216
|
* Shared packer utilities for OOXML document generation.
|
|
38
217
|
*
|
|
39
218
|
* @module
|
|
40
219
|
*/
|
|
41
|
-
/** Default DEFLATE
|
|
42
|
-
const ZIP_DEFLATE_LEVEL =
|
|
43
|
-
/**
|
|
220
|
+
/** Default DEFLATE level for XML entries (SuperFast, matching MS Office). */
|
|
221
|
+
const ZIP_DEFLATE_LEVEL = 1;
|
|
222
|
+
/** Default level for media entries (STORE — no compression). */
|
|
44
223
|
const ZIP_STORED_LEVEL = 0;
|
|
45
224
|
/**
|
|
46
225
|
* Asynchronously compress files and convert to the requested output format.
|
|
@@ -49,8 +228,8 @@ const ZIP_STORED_LEVEL = 0;
|
|
|
49
228
|
* XML entries use DEFLATE by default; media entries should explicitly set
|
|
50
229
|
* `{ level: ZIP_STORED_LEVEL }` to avoid redundant compression.
|
|
51
230
|
*/
|
|
52
|
-
const zipAndConvert = async (files, type, mimeType, level =
|
|
53
|
-
return convertOutput(await new Promise((resolve, reject) => {
|
|
231
|
+
const zipAndConvert = async (files, type, mimeType, level = 1) => {
|
|
232
|
+
return convertOutput(hasNativeDeflate() ? await nativeZipAsync(files, level) : await new Promise((resolve, reject) => {
|
|
54
233
|
zip(files, {
|
|
55
234
|
level,
|
|
56
235
|
consume: true
|
|
@@ -66,8 +245,8 @@ const zipAndConvert = async (files, type, mimeType, level = 6) => {
|
|
|
66
245
|
* Uses synchronous DEFLATE compression for maximum throughput.
|
|
67
246
|
* Blocks the event loop — prefer {@link zipAndConvert} in server contexts.
|
|
68
247
|
*/
|
|
69
|
-
const zipSyncAndConvert = (files, type, mimeType, level =
|
|
70
|
-
return convertOutput(zipSync(files, { level }), type, mimeType);
|
|
248
|
+
const zipSyncAndConvert = (files, type, mimeType, level = 1) => {
|
|
249
|
+
return convertOutput(hasNativeDeflate() ? nativeZip(files, level) : zipSync(files, { level }), type, mimeType);
|
|
71
250
|
};
|
|
72
251
|
/**
|
|
73
252
|
* Create a `ReadableStream<Uint8Array>` from compressed file entries.
|
|
@@ -76,7 +255,7 @@ const zipSyncAndConvert = (files, type, mimeType, level = 6) => {
|
|
|
76
255
|
* `STORED` entries (media) pass through synchronously.
|
|
77
256
|
* Works in both Node.js and browsers (Web Streams API).
|
|
78
257
|
*/
|
|
79
|
-
const createZipStream = (files) => {
|
|
258
|
+
const createZipStream = (files, defaultLevel = 1) => {
|
|
80
259
|
return new ReadableStream({ start(controller) {
|
|
81
260
|
try {
|
|
82
261
|
const zip = new Zip((err, chunk, _final) => {
|
|
@@ -89,7 +268,7 @@ const createZipStream = (files) => {
|
|
|
89
268
|
});
|
|
90
269
|
for (const [name, data] of Object.entries(files)) {
|
|
91
270
|
const raw = Array.isArray(data) ? data[0] : data;
|
|
92
|
-
const level = Array.isArray(data) ? data[1].level ??
|
|
271
|
+
const level = Array.isArray(data) ? data[1].level ?? defaultLevel : defaultLevel;
|
|
93
272
|
const entry = level === 0 ? new ZipPassThrough(name) : new AsyncZipDeflate(name, { level });
|
|
94
273
|
zip.add(entry);
|
|
95
274
|
entry.push(raw, true);
|
|
@@ -109,35 +288,35 @@ const createZipStream = (files) => {
|
|
|
109
288
|
*/
|
|
110
289
|
const createPacker = (options) => {
|
|
111
290
|
const { compile, mimeType } = options;
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
return zipAndConvert(compileFiles(file, overrides), type, mimeType);
|
|
291
|
+
const pack = async (file, type, opts) => {
|
|
292
|
+
return zipAndConvert(compile(file, opts?.overrides ?? [], opts?.compression?.media ?? 0), type, mimeType, opts?.compression?.xml ?? 1);
|
|
115
293
|
};
|
|
116
|
-
const toBytes = (file,
|
|
117
|
-
const toString = (file,
|
|
118
|
-
const toBuffer = (file,
|
|
119
|
-
const toBase64String = (file,
|
|
120
|
-
const toBlob = (file,
|
|
121
|
-
const toArrayBuffer = (file,
|
|
122
|
-
const packSync = (file, type,
|
|
123
|
-
return zipSyncAndConvert(
|
|
294
|
+
const toBytes = (file, opts) => pack(file, "uint8array", opts);
|
|
295
|
+
const toString = (file, opts) => pack(file, "string", opts);
|
|
296
|
+
const toBuffer = (file, opts) => pack(file, "nodebuffer", opts);
|
|
297
|
+
const toBase64String = (file, opts) => pack(file, "base64", opts);
|
|
298
|
+
const toBlob = (file, opts) => pack(file, "blob", opts);
|
|
299
|
+
const toArrayBuffer = (file, opts) => pack(file, "arraybuffer", opts);
|
|
300
|
+
const packSync = (file, type, opts) => {
|
|
301
|
+
return zipSyncAndConvert(compile(file, opts?.overrides ?? [], opts?.compression?.media ?? 0), type, mimeType, opts?.compression?.xml ?? 1);
|
|
124
302
|
};
|
|
125
|
-
const toBytesSync = (file,
|
|
126
|
-
const toStringSync = (file,
|
|
127
|
-
const toBufferSync = (file,
|
|
128
|
-
const toBase64StringSync = (file,
|
|
129
|
-
const toBlobSync = (file,
|
|
130
|
-
const toArrayBufferSync = (file,
|
|
131
|
-
const toStream = (file,
|
|
303
|
+
const toBytesSync = (file, opts) => packSync(file, "uint8array", opts);
|
|
304
|
+
const toStringSync = (file, opts) => packSync(file, "string", opts);
|
|
305
|
+
const toBufferSync = (file, opts) => packSync(file, "nodebuffer", opts);
|
|
306
|
+
const toBase64StringSync = (file, opts) => packSync(file, "base64", opts);
|
|
307
|
+
const toBlobSync = (file, opts) => packSync(file, "blob", opts);
|
|
308
|
+
const toArrayBufferSync = (file, opts) => packSync(file, "arraybuffer", opts);
|
|
309
|
+
const toStream = (file, opts) => {
|
|
310
|
+
const mediaLevel = opts?.compression?.media ?? 0;
|
|
132
311
|
let files;
|
|
133
312
|
try {
|
|
134
|
-
files =
|
|
313
|
+
files = compile(file, opts?.overrides ?? [], mediaLevel);
|
|
135
314
|
} catch (err) {
|
|
136
315
|
return new ReadableStream({ start(controller) {
|
|
137
316
|
controller.error(err instanceof Error ? err : new Error(String(err)));
|
|
138
317
|
} });
|
|
139
318
|
}
|
|
140
|
-
return createZipStream(files);
|
|
319
|
+
return createZipStream(files, opts?.compression?.xml ?? 1);
|
|
141
320
|
};
|
|
142
321
|
return {
|
|
143
322
|
compile,
|
|
@@ -452,7 +631,7 @@ var ParsedArchive = class {
|
|
|
452
631
|
return zipSync(files);
|
|
453
632
|
}
|
|
454
633
|
};
|
|
455
|
-
/**
|
|
634
|
+
/** Media file extensions that should use STORE (no compression). */
|
|
456
635
|
const MEDIA_EXTENSIONS = new Set([
|
|
457
636
|
".png",
|
|
458
637
|
".jpg",
|
|
@@ -507,6 +686,7 @@ function elementToCompact(el) {
|
|
|
507
686
|
* Used to include parsed-but-unrecognized XML in generated documents.
|
|
508
687
|
*/
|
|
509
688
|
var RawPassthrough = class extends BaseXmlComponent {
|
|
689
|
+
element;
|
|
510
690
|
constructor(element) {
|
|
511
691
|
super(element.name ?? "unknown");
|
|
512
692
|
this.element = element;
|
|
@@ -522,7 +702,7 @@ function hasPlaceholders(xml) {
|
|
|
522
702
|
return xml.includes("{");
|
|
523
703
|
}
|
|
524
704
|
function collectPlaceholderKeys(xml, prefix) {
|
|
525
|
-
const keys =
|
|
705
|
+
const keys = /* @__PURE__ */ new Set();
|
|
526
706
|
const search = `{${prefix}`;
|
|
527
707
|
let pos = 0;
|
|
528
708
|
while ((pos = xml.indexOf(search, pos)) !== -1) {
|
|
@@ -530,16 +710,14 @@ function collectPlaceholderKeys(xml, prefix) {
|
|
|
530
710
|
const keyEnd = xml.indexOf("}", keyStart);
|
|
531
711
|
if (keyEnd === -1) break;
|
|
532
712
|
const key = xml.substring(keyStart, keyEnd);
|
|
533
|
-
if (key.length > 0
|
|
713
|
+
if (key.length > 0) keys.add(key);
|
|
534
714
|
pos = keyEnd + 1;
|
|
535
715
|
}
|
|
536
|
-
return keys;
|
|
716
|
+
return [...keys];
|
|
537
717
|
}
|
|
538
718
|
function replaceImagePlaceholders(xml, mediaData, offset, idFormat = "rId") {
|
|
539
719
|
let result = xml;
|
|
540
|
-
mediaData.
|
|
541
|
-
result = result.replaceAll(`{${image.fileName}}`, formatId(offset, i, idFormat));
|
|
542
|
-
});
|
|
720
|
+
for (let i = 0; i < mediaData.length; i++) result = result.replaceAll(`{${mediaData[i].fileName}}`, formatId(offset, i, idFormat));
|
|
543
721
|
return result;
|
|
544
722
|
}
|
|
545
723
|
function getReferencedMedia(xml, mediaArray) {
|
|
@@ -547,9 +725,7 @@ function getReferencedMedia(xml, mediaArray) {
|
|
|
547
725
|
}
|
|
548
726
|
function replaceChartPlaceholders(xml, chartKeys, offset, idFormat = "rId") {
|
|
549
727
|
let result = xml;
|
|
550
|
-
chartKeys.
|
|
551
|
-
result = result.replaceAll(`{chart:${key}}`, formatId(offset, i, idFormat));
|
|
552
|
-
});
|
|
728
|
+
for (let i = 0; i < chartKeys.length; i++) result = result.replaceAll(`{chart:${chartKeys[i]}}`, formatId(offset, i, idFormat));
|
|
553
729
|
return result;
|
|
554
730
|
}
|
|
555
731
|
function replaceSmartArtPlaceholders(xml, keys, dataOffset, idFormat = "rId") {
|
|
@@ -558,12 +734,12 @@ function replaceSmartArtPlaceholders(xml, keys, dataOffset, idFormat = "rId") {
|
|
|
558
734
|
const loOffset = dataOffset + count;
|
|
559
735
|
const qsOffset = loOffset + count;
|
|
560
736
|
const csOffset = qsOffset + count;
|
|
561
|
-
keys.
|
|
562
|
-
result = result.replaceAll(`{smartart:${
|
|
563
|
-
result = result.replaceAll(`{smartart-lo:${
|
|
564
|
-
result = result.replaceAll(`{smartart-qs:${
|
|
565
|
-
result = result.replaceAll(`{smartart-cs:${
|
|
566
|
-
}
|
|
737
|
+
for (let i = 0; i < keys.length; i++) {
|
|
738
|
+
result = result.replaceAll(`{smartart:${keys[i]}}`, formatId(dataOffset, i, idFormat));
|
|
739
|
+
result = result.replaceAll(`{smartart-lo:${keys[i]}}`, formatId(loOffset, i, idFormat));
|
|
740
|
+
result = result.replaceAll(`{smartart-qs:${keys[i]}}`, formatId(qsOffset, i, idFormat));
|
|
741
|
+
result = result.replaceAll(`{smartart-cs:${keys[i]}}`, formatId(csOffset, i, idFormat));
|
|
742
|
+
}
|
|
567
743
|
return result;
|
|
568
744
|
}
|
|
569
745
|
function addSmartArtRelationships(keys, addRel, baseOffset, globalStartIndex, options) {
|
|
@@ -572,19 +748,17 @@ function addSmartArtRelationships(keys, addRel, baseOffset, globalStartIndex, op
|
|
|
572
748
|
const loOffset = baseOffset + count;
|
|
573
749
|
const qsOffset = loOffset + count;
|
|
574
750
|
const csOffset = qsOffset + count;
|
|
575
|
-
keys.
|
|
751
|
+
for (let i = 0; i < keys.length; i++) {
|
|
576
752
|
const gi = globalStartIndex + i;
|
|
577
753
|
addRel(baseOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData", `${pathPrefix}diagrams/data${gi + 1}.xml`);
|
|
578
754
|
addRel(loOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout", `${pathPrefix}diagrams/layout${gi + 1}.xml`);
|
|
579
755
|
addRel(qsOffset + i, styleRelType, `${pathPrefix}diagrams/quickStyle${gi + 1}.xml`);
|
|
580
756
|
addRel(csOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors", `${pathPrefix}diagrams/colors${gi + 1}.xml`);
|
|
581
757
|
addRel(csOffset + count + i, "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing", `${pathPrefix}diagrams/drawing${gi + 1}.xml`);
|
|
582
|
-
}
|
|
758
|
+
}
|
|
583
759
|
}
|
|
584
760
|
//#endregion
|
|
585
761
|
//#region src/compiler-utils.ts
|
|
586
|
-
/** Default STORE level for already-compressed media formats. */
|
|
587
|
-
const ZIP_STORED_LEVEL$1 = 0;
|
|
588
762
|
/** Reusable TextEncoder instance (stateless, safe to share). */
|
|
589
763
|
const encoder = new TextEncoder();
|
|
590
764
|
/**
|
|
@@ -592,11 +766,11 @@ const encoder = new TextEncoder();
|
|
|
592
766
|
*
|
|
593
767
|
* Centralises the mapping→Zippable conversion shared by all three compilers.
|
|
594
768
|
*/
|
|
595
|
-
function compileMapping(mapping, overrides, media) {
|
|
769
|
+
function compileMapping(mapping, overrides, media, mediaLevel = 0) {
|
|
596
770
|
const files = {};
|
|
597
771
|
for (const entry of Object.values(mapping)) files[entry.path] = encoder.encode(entry.data);
|
|
598
772
|
if (overrides) for (const o of overrides) files[o.path] = typeof o.data === "string" ? encoder.encode(o.data) : o.data;
|
|
599
|
-
if (media) for (const m of media) files[m.path] = [m.data, { level:
|
|
773
|
+
if (media) for (const m of media) files[m.path] = [m.data, { level: mediaLevel }];
|
|
600
774
|
return files;
|
|
601
775
|
}
|
|
602
776
|
//#endregion
|
package/dist/patch/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "../index-
|
|
2
|
-
export { DOCX_NS, PPTX_NS, RenderedParagraphNode, ReplacerConfig, TokenNotFoundError, XmlNamespaceConfig, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
1
|
+
import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "../index-BCUfgp9A.mjs";
|
|
2
|
+
export { DOCX_NS, PPTX_NS, type RenderedParagraphNode, type ReplacerConfig, TokenNotFoundError, type XmlNamespaceConfig, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
package/dist/patch/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "../patch-
|
|
1
|
+
import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "../patch-ilNZTQmG.mjs";
|
|
2
2
|
export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
@@ -37,7 +37,7 @@ const patchSpaceAttribute = (element) => ({
|
|
|
37
37
|
...element,
|
|
38
38
|
attributes: { "xml:space": "preserve" }
|
|
39
39
|
});
|
|
40
|
-
const getFirstLevelElements = (relationships, id) => relationships.elements?.
|
|
40
|
+
const getFirstLevelElements = (relationships, id) => relationships.elements?.find((e) => e.name === id)?.elements ?? [];
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/patch/paragraph-split-inject.ts
|
|
43
43
|
var TokenNotFoundError = class extends Error {
|
|
@@ -55,7 +55,7 @@ function createSplitInject(ns, createTextElementContents, options) {
|
|
|
55
55
|
const textElement = (element.elements ?? []).filter((e) => e.type === "element" && e.name === ns.text);
|
|
56
56
|
for (const text of textElement) {
|
|
57
57
|
if (!text.elements?.[0]) continue;
|
|
58
|
-
if (text.elements[0].text
|
|
58
|
+
if (text.elements[0].text.includes(token)) return i;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -78,11 +78,11 @@ function createSplitInject(ns, createTextElementContents, options) {
|
|
|
78
78
|
}).flat() ?? [];
|
|
79
79
|
return {
|
|
80
80
|
left: {
|
|
81
|
-
...
|
|
81
|
+
...runElement,
|
|
82
82
|
elements: splitElements.slice(0, splitIndex + 1)
|
|
83
83
|
},
|
|
84
84
|
right: {
|
|
85
|
-
...
|
|
85
|
+
...runElement,
|
|
86
86
|
elements: splitElements.slice(splitIndex + 1)
|
|
87
87
|
}
|
|
88
88
|
};
|
|
@@ -147,14 +147,15 @@ function createRunRenderer(ns) {
|
|
|
147
147
|
text: ""
|
|
148
148
|
};
|
|
149
149
|
let currentRunStringLength = 0;
|
|
150
|
-
const runs =
|
|
151
|
-
|
|
152
|
-
i
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
const runs = [];
|
|
151
|
+
for (let i = 0; i < node.element.elements.length; i++) {
|
|
152
|
+
const element = node.element.elements[i];
|
|
153
|
+
if (element.name === ns.run) {
|
|
154
|
+
const renderedRunNode = renderRunNode(element, i, currentRunStringLength);
|
|
155
|
+
currentRunStringLength += renderedRunNode.text.length;
|
|
156
|
+
runs.push(renderedRunNode);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
158
159
|
const text = runs.reduce((acc, curr) => acc + curr.text, "");
|
|
159
160
|
return {
|
|
160
161
|
index: node.index,
|
|
@@ -172,16 +173,22 @@ function createRunRenderer(ns) {
|
|
|
172
173
|
text: ""
|
|
173
174
|
};
|
|
174
175
|
let currentTextStringIndex = currentRunStringIndex;
|
|
175
|
-
const parts =
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
176
|
+
const parts = [];
|
|
177
|
+
for (let i = 0; i < node.elements.length; i++) {
|
|
178
|
+
const element = node.elements[i];
|
|
179
|
+
if (element.name === ns.text && element.elements && element.elements.length > 0) {
|
|
180
|
+
const text = element.elements[0].text ?? "";
|
|
181
|
+
const textStr = String(text);
|
|
182
|
+
const partStart = currentTextStringIndex;
|
|
183
|
+
currentTextStringIndex += textStr.length;
|
|
184
|
+
parts.push({
|
|
185
|
+
end: currentTextStringIndex - 1,
|
|
186
|
+
index: i,
|
|
187
|
+
start: partStart,
|
|
188
|
+
text: textStr
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
185
192
|
const text = parts.reduce((acc, curr) => acc + curr.text, "");
|
|
186
193
|
return {
|
|
187
194
|
end: currentTextStringIndex - 1,
|
|
@@ -193,28 +200,46 @@ function createRunRenderer(ns) {
|
|
|
193
200
|
};
|
|
194
201
|
return renderParagraphNode;
|
|
195
202
|
}
|
|
196
|
-
const buildNodePath = (node) =>
|
|
203
|
+
const buildNodePath = (node) => {
|
|
204
|
+
const path = [];
|
|
205
|
+
let current = node;
|
|
206
|
+
while (current) {
|
|
207
|
+
path.push(current.index);
|
|
208
|
+
current = current.parent;
|
|
209
|
+
}
|
|
210
|
+
path.reverse();
|
|
211
|
+
return path;
|
|
212
|
+
};
|
|
197
213
|
//#endregion
|
|
198
214
|
//#region src/patch/xml-traverser.ts
|
|
199
|
-
const elementsToWrapper = (wrapper) => wrapper.element.elements?.map((e, i) => ({
|
|
200
|
-
element: e,
|
|
201
|
-
index: i,
|
|
202
|
-
parent: wrapper
|
|
203
|
-
})) ?? [];
|
|
204
215
|
function createTraverser(ns) {
|
|
205
216
|
const renderParagraphNode = createRunRenderer(ns);
|
|
206
217
|
const traverse = (node) => {
|
|
207
|
-
|
|
208
|
-
const queue = [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
+
const renderedParagraphs = [];
|
|
219
|
+
const queue = [];
|
|
220
|
+
const rootChildren = node.elements;
|
|
221
|
+
if (rootChildren) {
|
|
222
|
+
const root = {
|
|
223
|
+
element: node,
|
|
224
|
+
index: 0,
|
|
225
|
+
parent: void 0
|
|
226
|
+
};
|
|
227
|
+
for (let i = 0; i < rootChildren.length; i++) queue.push({
|
|
228
|
+
element: rootChildren[i],
|
|
229
|
+
index: i,
|
|
230
|
+
parent: root
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
let qi = 0;
|
|
234
|
+
while (qi < queue.length) {
|
|
235
|
+
const current = queue[qi++];
|
|
236
|
+
if (current.element.name === ns.paragraph) renderedParagraphs.push(renderParagraphNode(current));
|
|
237
|
+
const children = current.element.elements;
|
|
238
|
+
if (children) for (let i = 0; i < children.length; i++) queue.push({
|
|
239
|
+
element: children[i],
|
|
240
|
+
index: i,
|
|
241
|
+
parent: current
|
|
242
|
+
});
|
|
218
243
|
}
|
|
219
244
|
return renderedParagraphs;
|
|
220
245
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-
|
|
1
|
+
import { a as Point, c as Connection, d as getLayoutXml, f as getStyleXml, h as STYLE_CATEGORIES, i as SmartArtData, l as DEFAULT_DRAWING_XML, m as LAYOUT_CATEGORIES, n as createDataModel, o as TransPoint, p as COLOR_CATEGORIES, r as SmartArtCollection, s as DataModel, t as TreeNode, u as getColorXml } from "../index-f_Izh2dj.mjs";
|
|
2
2
|
export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TransPoint, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml };
|
package/dist/smartart/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-
|
|
1
|
+
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-Cx1qa6k_.mjs";
|
|
2
2
|
export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, TransPoint, createDataModel, getColorXml, getLayoutXml, getStyleXml };
|