@office-open/core 0.10.2 → 0.10.4
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-BdWTH1vv.mjs → descriptor-DAER86Rt.mjs} +1 -26
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{index-vEeWkbm5.d.mts → index-3STznXzZ.d.mts} +1 -1
- package/dist/{index-Bpw3LFuI.d.mts → index-BpWDihDR.d.mts} +226 -215
- package/dist/{index-DEeO4sOq.d.mts → index-CHGFwCCQ.d.mts} +54 -27
- package/dist/{index-BEQ12eyX.d.mts → index-CN0YjNSx.d.mts} +1 -1
- package/dist/{index-L82O3q6V.d.mts → index-CpNwAcem.d.mts} +22 -23
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +4 -4
- package/dist/patch/index.d.mts +2 -2
- package/dist/patch/index.mjs +2 -2
- package/dist/{patch-DocIv0Sn.mjs → patch-DEPPafeB.mjs} +49 -4
- package/dist/{src-DaZbVB3f.mjs → src-Cc2VvOoz.mjs} +1577 -1469
- package/dist/theme/index.d.mts +1 -1
- package/dist/util/values.d.mts +1 -1
- package/dist/{values-Dqj8cbcy.d.mts → values-DQfI1FSg.d.mts} +11 -4
- package/package.json +2 -2
|
@@ -6,8 +6,46 @@ import { Buffer } from "\u0000polyfill-node.buffer";
|
|
|
6
6
|
type DataType = ArrayBufferLike | Blob | DataView | number[] | ReadableStream | string | Uint8Array;
|
|
7
7
|
/** Test whether a string is a base64 data URL (`data:[mime];base64,...`). */
|
|
8
8
|
declare function isBase64DataURL(input: string): boolean;
|
|
9
|
+
/** Options for {@link toUint8Array}. */
|
|
10
|
+
interface ToUint8ArrayOptions {
|
|
11
|
+
/**
|
|
12
|
+
* How to interpret a plain (non-data-URL) string input. Data URLs
|
|
13
|
+
* (`data:...;base64,...`) and binary inputs (Buffer/Uint8Array/ArrayBuffer/
|
|
14
|
+
* DataView/number[]) are auto-detected and ignore this hint.
|
|
15
|
+
*
|
|
16
|
+
* - `"utf8"` (default): UTF-8 text.
|
|
17
|
+
* - `"base64"`: base64-encoded binary — e.g. an image supplied via
|
|
18
|
+
* `readFileSync(...).toString("base64")`.
|
|
19
|
+
*/
|
|
20
|
+
encoding?: "utf8" | "base64";
|
|
21
|
+
}
|
|
9
22
|
/** Normalize any supported binary input to a `Uint8Array`. */
|
|
10
|
-
declare function toUint8Array(data: DataType): Uint8Array;
|
|
23
|
+
declare function toUint8Array(data: DataType, options?: ToUint8ArrayOptions): Uint8Array;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/opc/output.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* Output type definitions for OOXML document export.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
interface OutputByType {
|
|
32
|
+
base64: string;
|
|
33
|
+
string: string;
|
|
34
|
+
text: string;
|
|
35
|
+
binarystring: string;
|
|
36
|
+
array: readonly number[];
|
|
37
|
+
uint8array: Uint8Array;
|
|
38
|
+
arraybuffer: ArrayBuffer;
|
|
39
|
+
blob: Blob;
|
|
40
|
+
nodebuffer: Buffer;
|
|
41
|
+
}
|
|
42
|
+
type OutputType = keyof OutputByType;
|
|
43
|
+
declare const OoxmlMimeType: {
|
|
44
|
+
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
45
|
+
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
46
|
+
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
47
|
+
};
|
|
48
|
+
declare const convertOutput: <T extends OutputType>(data: Uint8Array, type: T, mimeType?: string) => OutputByType[T];
|
|
11
49
|
//#endregion
|
|
12
50
|
//#region src/opc/core.d.ts
|
|
13
51
|
type IXmlableObject = Readonly<Record<string, unknown>>;
|
|
@@ -63,31 +101,6 @@ declare function buildCorePropertiesXml(opts: {
|
|
|
63
101
|
*/
|
|
64
102
|
declare function buildCorePropertiesXmlString(opts: CorePropertiesOptions): string;
|
|
65
103
|
//#endregion
|
|
66
|
-
//#region src/opc/output.d.ts
|
|
67
|
-
/**
|
|
68
|
-
* Output type definitions for OOXML document export.
|
|
69
|
-
*
|
|
70
|
-
* @module
|
|
71
|
-
*/
|
|
72
|
-
interface OutputByType {
|
|
73
|
-
base64: string;
|
|
74
|
-
string: string;
|
|
75
|
-
text: string;
|
|
76
|
-
binarystring: string;
|
|
77
|
-
array: readonly number[];
|
|
78
|
-
uint8array: Uint8Array;
|
|
79
|
-
arraybuffer: ArrayBuffer;
|
|
80
|
-
blob: Blob;
|
|
81
|
-
nodebuffer: Buffer;
|
|
82
|
-
}
|
|
83
|
-
type OutputType = keyof OutputByType;
|
|
84
|
-
declare const OoxmlMimeType: {
|
|
85
|
-
readonly DOCX: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
86
|
-
readonly PPTX: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
87
|
-
readonly XLSX: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
88
|
-
};
|
|
89
|
-
declare const convertOutput: <T extends OutputType>(data: Uint8Array, type: T, mimeType?: string) => OutputByType[T];
|
|
90
|
-
//#endregion
|
|
91
104
|
//#region src/patch/xml-namespace.d.ts
|
|
92
105
|
/**
|
|
93
106
|
* Namespace configuration for XML patch operations.
|
|
@@ -204,9 +217,23 @@ declare const toJson: (xmlData: string) => Element;
|
|
|
204
217
|
declare const createTextElementContents: (text: string) => Element[];
|
|
205
218
|
declare const patchSpaceAttribute: (element: Element) => Element;
|
|
206
219
|
declare const getFirstLevelElements: (relationships: Element, id: string) => Element[];
|
|
220
|
+
/**
|
|
221
|
+
* Next sequential numeric id: the largest `attr` value among direct children
|
|
222
|
+
* named `childName`, plus one. `seed` is the floor — e.g. PPTX `<p:sldId>`
|
|
223
|
+
* values start at 255, so the first appended id is at least 256.
|
|
224
|
+
*
|
|
225
|
+
* Unifies the per-package `maxCommentId` / `maxSldId` / `maxSheetId` helpers.
|
|
226
|
+
*/
|
|
227
|
+
declare const nextNumericId: (parent: Element | undefined, childName: string, attr: string, seed?: number) => number;
|
|
207
228
|
//#endregion
|
|
208
229
|
//#region src/patch/content-types-manager.d.ts
|
|
209
230
|
declare const appendContentType: (element: Element, contentType: string, extension: string) => void;
|
|
231
|
+
/**
|
|
232
|
+
* Append an `<Override>` element to a `[Content_Types].xml` root, deduped by
|
|
233
|
+
* `PartName`. Sibling to {@link appendContentType} (which handles `<Default>`):
|
|
234
|
+
* unifies the per-package Override-dedup blocks in docx/pptx/xlsx patchers.
|
|
235
|
+
*/
|
|
236
|
+
declare const appendOverride: (element: Element, partName: string, contentType: string) => void;
|
|
210
237
|
//#endregion
|
|
211
238
|
//#region src/patch/relationship-manager.d.ts
|
|
212
239
|
declare const getNextRelationshipIndex: (relationships: Element) => number;
|
|
@@ -236,4 +263,4 @@ interface BasePatchOptions<T extends OutputType = OutputType> {
|
|
|
236
263
|
placeholderDelimiters?: PlaceholderDelimiters;
|
|
237
264
|
}
|
|
238
265
|
//#endregion
|
|
239
|
-
export {
|
|
266
|
+
export { OutputType as A, XmlNamespaceConfig as C, parseCorePropsElement as D, buildCorePropertiesXmlString as E, toUint8Array as F, DataType as M, ToUint8ArrayOptions as N, OoxmlMimeType as O, isBase64DataURL as P, PPTX_NS as S, buildCorePropertiesXml as T, RenderedParagraphNode as _, getNextRelationshipIndex as a, createReplacer as b, createTextElementContents as c, patchSpaceAttribute as d, toJson as f, createTraverser as g, createTokenReplacer as h, appendRelationship as i, convertOutput as j, OutputByType as k, getFirstLevelElements as l, createSplitInject as m, PlaceholderDelimiters as n, appendContentType as o, TokenNotFoundError as p, applyCorePropertiesOverride as r, appendOverride as s, BasePatchOptions as t, nextNumericId as u, createRunRenderer as v, CorePropertiesOptions as w, DOCX_NS as x, ReplacerConfig as y };
|
|
@@ -19,23 +19,37 @@ interface ReadContext {
|
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/descriptor/types.d.ts
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Custom descriptor — hand-written stringify/parse for an OOXML part.
|
|
24
|
+
*
|
|
25
|
+
* `TInput` is the stringify input (the options shape callers build); `TOutput`
|
|
26
|
+
* is the parse output (the shape parse produces). They default to the same
|
|
27
|
+
* type, so the common case — a descriptor whose stringify and parse share one
|
|
28
|
+
* options shape — is written as `CustomDescriptor<T>` unchanged. Only
|
|
29
|
+
* descriptors whose parse yields a genuinely different shape (e.g. an
|
|
30
|
+
* accumulator-based stringify vs. a structured parse result) pass a third
|
|
31
|
+
* argument, which lets parse return its real type instead of lying via `as`.
|
|
32
|
+
*
|
|
33
|
+
* `Ctx` stays the second parameter to preserve the existing
|
|
34
|
+
* `CustomDescriptor<T, BodyContext>` call sites that customize the write
|
|
35
|
+
* context; `TOutput` is third so it never collides with that two-arg form.
|
|
36
|
+
*/
|
|
37
|
+
interface CustomDescriptor<TInput, Ctx = WriteContext, TOutput = TInput> {
|
|
24
38
|
kind: "custom";
|
|
25
|
-
stringify(value:
|
|
26
|
-
parse(el: Element, ctx: ReadContext):
|
|
39
|
+
stringify(value: TInput, ctx: Ctx): string | undefined;
|
|
40
|
+
parse(el: Element, ctx: ReadContext): TOutput;
|
|
27
41
|
}
|
|
28
42
|
/** Alias for "any descriptor" — retained for call-site readability. */
|
|
29
|
-
type Descriptor<
|
|
43
|
+
type Descriptor<TInput, Ctx = WriteContext, TOutput = TInput> = CustomDescriptor<TInput, Ctx, TOutput>;
|
|
30
44
|
//#endregion
|
|
31
45
|
//#region src/descriptor/runtime.d.ts
|
|
32
46
|
/**
|
|
33
47
|
* Serialize an Options object to an XML string using its descriptor.
|
|
34
48
|
* Returns `undefined` when an optional element should be omitted.
|
|
35
49
|
*/
|
|
36
|
-
declare function stringify$1<
|
|
50
|
+
declare function stringify$1<TInput, Ctx = WriteContext, TOutput = TInput>(desc: CustomDescriptor<TInput, Ctx, TOutput>, value: TInput, ctx: Ctx): string | undefined;
|
|
37
51
|
/** Parse an XML Element into an Options object using its descriptor. */
|
|
38
|
-
declare function parse$1<
|
|
52
|
+
declare function parse$1<TInput, TOutput = TInput, Ctx = WriteContext>(desc: CustomDescriptor<TInput, Ctx, TOutput>, el: Element, ctx: ReadContext): TOutput;
|
|
39
53
|
//#endregion
|
|
40
54
|
//#region src/descriptor/helpers.d.ts
|
|
41
55
|
/**
|
|
@@ -55,21 +69,6 @@ declare const enumEncode: (map: Record<string, string>) => (v: string | undefine
|
|
|
55
69
|
/** Create an enum decoder from a JS↔XML mapping (inverted). */
|
|
56
70
|
declare const enumDecode: (map: Record<string, string>) => (raw: string) => string;
|
|
57
71
|
//#endregion
|
|
58
|
-
//#region src/descriptor/registry.d.ts
|
|
59
|
-
declare class DescriptorRegistry {
|
|
60
|
-
private static readonly _map;
|
|
61
|
-
/** Register a descriptor with its XML tag. */
|
|
62
|
-
static register(tag: string, desc: Descriptor<any>): void;
|
|
63
|
-
/** Look up a descriptor by XML tag. */
|
|
64
|
-
static get(tag: string): Descriptor<any> | undefined;
|
|
65
|
-
/** Get all registered tags. */
|
|
66
|
-
static tags(): ReadonlySet<string>;
|
|
67
|
-
/** Check if a tag is registered. */
|
|
68
|
-
static has(tag: string): boolean;
|
|
69
|
-
/** Get the number of registered descriptors. */
|
|
70
|
-
static get size(): number;
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
72
|
//#region src/descriptor/field-spec.d.ts
|
|
74
73
|
/**
|
|
75
74
|
* Declarative field-consistency spec for descriptors.
|
|
@@ -167,4 +166,4 @@ interface OrderViolation {
|
|
|
167
166
|
*/
|
|
168
167
|
declare function checkOrder(xml: string, expected: readonly string[]): readonly OrderViolation[];
|
|
169
168
|
//#endregion
|
|
170
|
-
export {
|
|
169
|
+
export { Descriptor as _, diffTagSets as a, FIELD_SPECS as c, boolEncode as d, enumDecode as f, CustomDescriptor as g, stringify$1 as h, checkOrder as i, findFieldSpec as l, parse$1 as m, OrderViolation as n, roundTripFields as o, enumEncode as p, RoundTripResult as r, DescriptorFieldSpec as s, FieldConsistencyReport as t, boolDecode as u, ReadContext as v, WriteContext as y };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
2
|
-
import { _ as
|
|
3
|
-
import { $ as createLineColorList, $a as
|
|
4
|
-
import { A as
|
|
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-CN0YjNSx.mjs";
|
|
2
|
+
import { _ as Descriptor, a as diffTagSets, c as FIELD_SPECS, d as boolEncode, f as enumDecode, g as CustomDescriptor, h as stringify, i as checkOrder, l as findFieldSpec, m as parse, n as OrderViolation, o as roundTripFields, p as enumEncode, r as RoundTripResult, s as DescriptorFieldSpec, t as FieldConsistencyReport, u as boolDecode, v as ReadContext, y as WriteContext } from "./index-CpNwAcem.mjs";
|
|
3
|
+
import { $ as createLineColorList, $a as TileAlignment, $i as encodeBase64, $n as createReflectionEffect, $r as xsdPathFillMode, $t as TableStyleListOptions, A as scRgbColorDesc, Aa as zipAndConvert, Ai as convertUniversalMeasureToEmu, An as createShape3D, Ar as addSmartArtRelationships, At as PresentationLayoutVariablesOptions, B as createDiagramTextProperties, Ba as GradientStopOptions, Bi as OpcSeverity, Bn as SphereCoords, Br as replaceHyperlinkPlaceholders, Bt as GraphicFrameLockingOptions, C as fillDesc, Ca as ZipOptions, Ci as convertMillimetersToTwip, Cn as createCustomGeometry, Co as createHslColor, Cr as LineEndType, Ct as AnimationLevelOptions, D as parseColorChoice, Da as levelForMediaName, Di as convertToInch, Dn as stringifyAdjustmentValues, Dr as createCustomDash, Dt as MaxChildrenOptions, E as hslColorDesc, Ea as createZipStream, Ei as convertToEmu, En as GeometryGuide, Er as DashStop, Et as HierBranchStyle, F as DiagramExtensionListOptions, Fa as createPatternFill, Fi as compileMapping, Fn as BackdropOptions, Fr as getReferencedMedia, Ft as createHierBranch, G as DiagramStyleLabelOptions, Ga as GradientStop, Gi as PPTX_PARTS, Gn as EffectDagOptions, Gr as replaceVideoPlaceholders, Gt as createGroupLocking, H as createDiagramRelationshipIds, Ha as extractBlipFillMedia, Hi as validateOpcConsistency, Hn as createScene3D, Hr as replaceMediaPlaceholders, Ht as PictureLockingOptions, I as DiagramExtensionOptions, Ia as createNoFill, Ii as ContentTypeOverrideEntry, In as CameraOptions, Ir as getVideoRefs, It as createMaxChildren, J as HueDirection, Ja as PathShadeType, Ji as PartPresence, Jn as EffectExtent, Jr as xsdCompoundLine, Jt as OnOffStyleType, K as DiagramStyleOptions, Ka as LinearShadeOptions, Ki as PackagePartRegistry, Kn as createEffectDag, Kr as invertMap, Kt as createPictureLocking, L as DiagramTextPropertiesOptions, La as BlipFillConfigOptions, Li as buildContentTypeOverrides, Ln as LightRigOptions, Lr as hasPlaceholders, Lt as createOrgChart, M as solidFillDesc, Ma as createGroupFill, Mi as convertUniversalMeasureToPt, Mn as BevelPresetType, Mr as findAndReplaceImagePlaceholders, Mt as createAdjustList, N as stringifyColorChoice, Na as PatternFillOptions, Ni as convertUniversalMeasureToTwip, Nn as createBevel, Nr as formatId, Nt as createAnimateOneByOne, O as presetColorDesc, Oa as strFromU8, Oi as convertToPt, On as PresetMaterialType, Or as IdFormat, Ot as OrgChartOptions, P as systemColorDesc, Pa as PresetPattern, Pi as parseUniversalMeasure, Pn as createBottomBevel, Pr as getMediaRefs, Pt as createAnimationLevel, Q as createFillColorList, Qa as createGradientStop, Qi as decodeBase64, Qn as ReflectionEffectOptions, Qr as xsdMaterialType, Qt as TablePartStyleOptions, R as createDiagramExtensionList, Ra as BlipFillMediaData, Ri as OpcCode, Rn as Point3D, Rr as replaceAllPlaceholders, Rt as createPreferredChildren, S as outlineDesc, Sa as ZIP_STORED_LEVEL, Si as convertInchesToTwip, Sn as PathOptions, So as HslColorOptions, Sr as LineEndOptions, St as AnimateOneByOneValue, T as patternFillDesc, Ta as createPacker, Ti as convertPointsToEmu, Tn as stringifyPresetGeometry, To as createColorTransforms, Tr as createLineEnd, Tt as HierBranchOptions, U as ColorListOptions, Ua as GradientFillOptions, Ui as DOCX_PARTS, Un as createSoftEdgeEffect, Ur as replaceNumberingPlaceholders, Ut as ShapeLockingOptions, V as DiagramRelationshipIdsOptions, Va as buildFill, Vi as summarizeOpcIssues, Vn as Vector3D, Vr as replaceImagePlaceholders, Vt as GroupLockingOptions, W as ColorMethod, Wa as GradientShadeOptions, Wi as PART_REGISTRIES, Wn as EffectContainerType, Wr as replaceSmartArtPlaceholders, Wt as createGraphicFrameLocking, X as createDiagramStyle, Xa as TileFlipMode, Xi as ParsedArchive, Xn as calculateEffectExtent, Xr as xsdLineCap, Xt as TableCellBorderOptions, Y as StyleMatrixIndex, Ya as RelativeRect, Yi as XLSX_PARTS, Yn as EffectListOptions, Yr as xsdEffectContainer, Yt as StyleMatrixReferenceOptions, Z as createEffectColorList, Za as createGradientFill, Zi as parseArchive, Zn as createEffectList, Zr as xsdLineEndSize, Zt as TableCellStyleOptions, _ as graphicFrameLockingDesc, _a as CompressionOptions, _i as randomBytes, _n as ConnectionSite, _o as RgbColorOptions, _r as OutlineOptions, _t as createStyleDefinitionHeader, a as blipDesc, aa as appPropertiesDesc, ai as xsdTextAlign, an as createTableStyleList, ao as createBlipEffects, ar as createOuterShadowEffect, at as ColorsDefinitionHeaderOptions, b as shapeLockingDesc, ba as XmlifyedFile, bi as convertEmuToPoints, bn as PathCommand, bo as PresetColorOptions, br as createOutline, bt as AdjustOptions, c as stretchDesc, ca as createDefault, ci as xsdUnderlineStyle, cn as Transform2DOptions, co as createSolidFill, cr as GlowEffectOptions, ct as DiagramNameOptions, d as scene3DDesc, da as Media, di as hashedId, dn as stringifyStretch, do as createSystemColor, dr as FillOverlayEffectOptions, dt as StyleDefinitionHeaderListOptions, ea as CustomPropertiesInput, ei as xsdPattern, en as TableStyleOptions, eo as TileOptions, er as PresetShadowEffectOptions, et as createStyleLabel, f as shape3DDesc, fa as RelationshipType, fi as uniqueId, fn as createExtentionList, fo as SchemeColor, fr as createFillOverlayEffect, ft as StyleDefinitionHeaderOptions, g as presetGeometryDesc, ga as CompileFn, gi as hashPasswordAgile, gn as createBlip, go as createScRgbColor, gr as OutlineFillProperties, gt as createLayoutDefinitionHeaderList, h as customGeometryDesc, ha as optionalRelsPart, hi as derivePasswordHash, hn as BlipOptions, ho as ScRgbColorOptions, hr as LineJoin, ht as createLayoutDefinitionHeader, i as presentationLayoutVariablesDesc, ia as AppPropertiesOptions, ii as xsdStrikeStyle, in as createTableStyle, io as BlipEffectsOptions, ir as RectAlignment, it as ColorsDefinitionHeaderListOptions, j as schemeColorDesc, ja as zipSyncAndConvert, ji as convertUniversalMeasureToInch, jn as BevelOptions, jr as collectPlaceholderKeys, jt as createAdjust, k as rgbColorDesc, ka as unzipSync, ki as convertToTwip, kn as Shape3DOptions, kr as SmartArtRelOptions, kt as PreferredChildrenOptions, l as tileDesc, la as createOverride, li as xsdVerticalMergeRev, ln as createGroupTransform2D, lo as SystemColor, lr as createGlowEffect, lt as LayoutDefinitionHeaderListOptions, m as transform2DDesc, ma as TargetModeType, mi as uniqueUuid, mn as createBlipFill, mo as createSchemeColor, mr as LineCap, mt as createColorsDefinitionHeaderList, n as diagramRelationshipIdsDesc, na as customPropertiesDesc, ni as xsdPresetShadow, nn as TableTextStyleOptions, no as SourceRectangleOptions, nr as createPresetShadowEffect, nt as createTextFillColorList, o as blipFillDesc, oa as DefaultAttributes, oi as xsdTextAnchor, on as parseTableStyleList, oo as SolidFillOptions, or as InnerShadowEffectOptions, ot as DiagramCategoryOptions, p as groupTransform2DDesc, pa as Relationships, pi as uniqueNumericIdCreator, pn as BlipFillOptions, po as SchemeColorOptions, pr as CompoundLine, pt as createColorsDefinitionHeader, q as FontCollectionIndex, qa as PathShadeOptions, qi as PartDef, qn as BlurEffectOptions, qr as xsdBlendMode, qt as createShapeLocking, r as diagramStyleDesc, ra as AppPropertiesInput, ri as xsdRectAlignment, rn as ThemeableLineStyleOptions, ro as createSourceRectangle, rr as OuterShadowEffectOptions, rt as createTextLineColorList, s as sourceRectangleDesc, sa as OverrideAttributes, si as xsdTextCaps, sn as GroupTransform2DOptions, so as createColorElement, sr as createInnerShadowEffect, st as DiagramDescriptionOptions, t as diagramExtensionListDesc, ta as CustomPropertyOptions, ti as xsdPenAlignment, tn as TableStyleRegion, to as createTileInfo, tr as PresetShadowVal, tt as createTextEffectColorList, u as bevelDesc, ua as BaseMediaEntry, ui as UniqueNumericIdCreator, un as createTransform2D, uo as SystemColorOptions, ur as BlendMode, ut as LayoutDefinitionHeaderOptions, v as groupLockingDesc, va as Packer, vi as convertEmuToInches, vn as CustomGeometryOptions, vo as createRgbColor, vr as PenAlignment, vt as createStyleDefinitionHeaderList, w as gradientFillDesc, wa as Zippable, wi as convertPixelsToEmu, wn as PresetGeometryOptions, wo as ColorTransformOptions, wr as LineEndWidth, wt as AnimationLevelValue, x as effectListDesc, xa as ZIP_DEFLATE_LEVEL, xi as convertInchesToEmu, xn as PathFillMode, xo as createPresetColor, xr as LineEndLength, xt as AnimateOneByOneOptions, y as pictureLockingDesc, ya as PackerOptions, yi as convertEmuToPixels, yn as GeomRect, yo as PresetColor, yr as PresetDash, yt as AdjustListOptions, z as createDiagramShape3D, za as FillOptions, zi as OpcIssue, zn as Scene3DOptions, zr as replaceChartPlaceholders, zt as createPresentationLayoutVariables } from "./index-BpWDihDR.mjs";
|
|
4
|
+
import { A as OutputType, C as XmlNamespaceConfig, D as parseCorePropsElement, E as buildCorePropertiesXmlString, F as toUint8Array, M as DataType, N as ToUint8ArrayOptions, O as OoxmlMimeType, P as isBase64DataURL, S as PPTX_NS, T as buildCorePropertiesXml, _ as RenderedParagraphNode, a as getNextRelationshipIndex, b as createReplacer, c as createTextElementContents, d as patchSpaceAttribute, f as toJson, g as createTraverser, h as createTokenReplacer, i as appendRelationship, j as convertOutput, k as OutputByType, l as getFirstLevelElements, m as createSplitInject, n as PlaceholderDelimiters, o as appendContentType, p as TokenNotFoundError, r as applyCorePropertiesOverride, s as appendOverride, t as BasePatchOptions, u as nextNumericId, v as createRunRenderer, w as CorePropertiesOptions, x as DOCX_NS, y as ReplacerConfig } from "./index-CHGFwCCQ.mjs";
|
|
5
5
|
import { a as PointPropertySetOptions, c as stringifyDataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as stringifyConnection, m as COLOR_CATEGORIES, n as createDataModel, o as stringifyPoint, p as getStyleXml, r as SmartArtCollection, s as stringifyTransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "./index-CsQP7Cl4.mjs";
|
|
6
|
-
import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "./index-
|
|
7
|
-
import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-
|
|
8
|
-
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type AppPropertiesInput, type AppPropertiesOptions, AxisChartType, type BackdropOptions, type BasePatchOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, BubbleSeriesData, COLOR_CATEGORIES, type CameraOptions, ChartCollection, ChartData, ChartSeriesData, ChartSpaceOptions, ChartType, type ColorListOptions, ColorMethod, type ColorSchemeOptions, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, type CompileFn, CompoundLine, type CompressionOptions, type ConnectionSite, type ContentTypeOverrideEntry, type CorePropertiesOptions, type CustomDescriptor, type CustomGeometryOptions, type CustomPropertiesInput, type CustomPropertyOptions, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, type DashStop, DataLabelPosition, DataLabelsOptions, DataType, type DefaultAttributes, type Descriptor, type DescriptorFieldSpec,
|
|
6
|
+
import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "./index-3STznXzZ.mjs";
|
|
7
|
+
import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-DQfI1FSg.mjs";
|
|
8
|
+
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type AppPropertiesInput, type AppPropertiesOptions, AxisChartType, type BackdropOptions, type BaseMediaEntry, type BasePatchOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, BubbleSeriesData, COLOR_CATEGORIES, type CameraOptions, ChartCollection, ChartData, ChartSeriesData, ChartSpaceOptions, ChartType, type ColorListOptions, ColorMethod, type ColorSchemeOptions, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, type CompileFn, CompoundLine, type CompressionOptions, type ConnectionSite, type ContentTypeOverrideEntry, type CorePropertiesOptions, type CustomDescriptor, type CustomGeometryOptions, type CustomPropertiesInput, type CustomPropertyOptions, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, type DashStop, DataLabelPosition, DataLabelsOptions, DataType, type DefaultAttributes, type Descriptor, type DescriptorFieldSpec, 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, ErrorBarDirection, ErrorBarOptions, ErrorBarType, ErrorValueType, FIELD_SPECS, type FieldConsistencyReport, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type FontSchemeOptions, 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, IdFormat, type InnerShadowEffectOptions, LAYOUT_CATEGORIES, type LayoutDefinitionHeaderListOptions, type LayoutDefinitionHeaderOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MaxChildrenOptions, Media, type OnOffStyleType, OoxmlMimeType, type OpcCode, type OpcIssue, type OpcSeverity, type OrderViolation, type OrgChartOptions, type OuterShadowEffectOptions, type OutlineFillProperties, type OutlineOptions, type OutputByType, type OutputType, type OverrideAttributes, PART_REGISTRIES, PPTX_NS, PPTX_PARTS, type PackagePartRegistry, type Packer, type PackerOptions, ParsedArchive, type PartDef, type PartPresence, type PathCommand, type PathFillMode, type PathOptions, type PathShadeOptions, PathShadeType, type PatternFillOptions, PenAlignment, Percentage, type PictureLockingOptions, type PlaceholderDelimiters, type Point3D, PointPropertySetOptions, PositivePercentage, PositiveUniversalMeasure, type PreferredChildrenOptions, type PresentationLayoutVariablesOptions, PresetColor, type PresetColorOptions, PresetDash, type PresetGeometryOptions, PresetMaterialType, PresetPattern, type PresetShadowEffectOptions, PresetShadowVal, type ReadContext, RectAlignment, type ReflectionEffectOptions, type RelationshipType, Relationships, RelativeMeasure, type RelativeRect, type RenderedParagraphNode, type ReplacerConfig, type RgbColorOptions, type RoundTripResult, STYLE_CATEGORIES, type ScRgbColorOptions, type Scene3DOptions, SchemeColor, type SchemeColorOptions, type Shape3DOptions, type ShapeLockingOptions, SmartArtCollection, SmartArtData, SmartArtRelOptions, 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, TargetModeType, ThemeColor, ThemeFont, type ThemeOptions, type ThemeableLineStyleOptions, TileAlignment, TileFlipMode, type TileOptions, TimeUnit, ToUint8ArrayOptions, TokenNotFoundError, type Transform2DOptions, TreeNode, TrendlineOptions, TrendlineType, UniqueNumericIdCreator, UniversalMeasure, type Vector3D, View3DOptions, type WriteContext, XLSX_PARTS, type XmlNamespaceConfig, type XmlifyedFile, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, type ZipOptions, type Zippable, addSmartArtRelationships, appPropertiesDesc, appendContentType, appendOverride, appendRelationship, applyCorePropertiesOverride, bevelDesc, blipDesc, blipFillDesc, boolDecode, boolEncode, buildContentTypeOverrides, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, calculateEffectExtent, chartSpaceDesc, checkOrder, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertToEmu, convertToInch, convertToPt, convertToTwip, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDataModel, createDefault, 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, createOverride, createPacker, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextElementContents, createTextFillColorList, createTextLineColorList, createThemeXml, createTileInfo, createTokenReplacer, createTransform2D, createTraverser, createZipStream, customGeometryDesc, customPropertiesDesc, dateTimeValue, decimalNumber, decodeBase64, derivePasswordHash, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, diffTagSets, effectListDesc, eighthPointMeasureValue, encodeBase64, enumDecode, enumEncode, extractBlipFillMedia, fillDesc, findAndReplaceImagePlaceholders, findFieldSpec, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getMediaRefs, getNextRelationshipIndex, getReferencedMedia, getStyleXml, getVideoRefs, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, hslColorDesc, invertMap, isBase64DataURL, levelForMediaName, longHexNumber, measurementOrPercentValue, nextNumericId, optionalRelsPart, outlineDesc, parse, parseArchive, parseColorChoice, parseCorePropsElement, parseTableStyleList, parseUniversalMeasure, patchSpaceAttribute, patternFillDesc, percentageValue, pictureLockingDesc, pointMeasureValue, positiveUniversalMeasureValue, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, randomBytes, replaceAllPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, rgbColorDesc, roundTripFields, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, solidFillDesc, sourceRectangleDesc, strFromU8, stretchDesc, stringify, stringifyAdjustmentValues, stringifyColorChoice, stringifyConnection, stringifyDataModel, stringifyPoint, stringifyPresetGeometry, stringifyStretch, stringifyTransPoint, summarizeOpcIssues, systemColorDesc, themeDesc, tileDesc, toJson, toUint8Array, transform2DDesc, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, validateOpcConsistency, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { $ as convertUniversalMeasureToTwip, $n as createGradientStop, $r as levelForMediaName, $t as createGroupLocking, A as customGeometryDesc, An as createGlowEffect, Ar as SystemColor, At as createStyleLabel, B as convertEmuToPoints, Bn as LineEndType, Br as buildContentTypeOverrides, Bt as AnimateOneByOneValue, C as diagramStyleDesc, Cn as createSoftEdgeEffect, Cr as uniqueId, Ct as FontCollectionIndex, D as shape3DDesc, Dn as RectAlignment, Dr as toUint8Array, Dt as createEffectColorList, E as scene3DDesc, En as createPresetShadowEffect, Er as isBase64DataURL, Et as createDiagramStyle, F as shapeLockingDesc, Fn as LineJoin, Fr as createRgbColor, Ft as createColorsDefinitionHeaderList, G as convertPointsToEmu, Gn as createNoFill, Gr as summarizeOpcIssues, Gt as createAnimateOneByOne, H as convertInchesToTwip, Hn as createLineEnd, Hr as PART_REGISTRIES, Ht as HierBranchStyle, I as effectListDesc, In as PenAlignment, Ir as PresetColor, It as createLayoutDefinitionHeader, J as convertToPt, Jn as PresetPattern, Jr as parseArchive, Jt as createMaxChildren, K as convertToEmu, Kn as buildFill, Kr as validateOpcConsistency, Kt as createAnimationLevel, L as outlineDesc, Ln as PresetDash, Lr as createPresetColor, Lt as createLayoutDefinitionHeaderList, M as graphicFrameLockingDesc, Mn as createFillOverlayEffect, Mr as SchemeColor, Mt as createTextFillColorList, N as groupLockingDesc, Nn as CompoundLine, Nr as createSchemeColor, Nt as createTextLineColorList, O as groupTransform2DDesc, On as createOuterShadowEffect, Or as createColorElement, Ot as createFillColorList, P as pictureLockingDesc, Pn as LineCap, Pr as createScRgbColor, Pt as createColorsDefinitionHeader, Q as convertUniversalMeasureToPt, Qn as createGradientFill, Qr as createZipStream, Qt as createGraphicFrameLocking, R as convertEmuToInches, Rn as createOutline, Rr as createHslColor, Rt as createStyleDefinitionHeader, S as diagramRelationshipIdsDesc, Sn as createEffectList, Sr as hashedId, St as ColorMethod, T as bevelDesc, Tn as PresetShadowVal, Tr as uniqueUuid, Tt as StyleMatrixIndex, U as convertMillimetersToTwip, Un as createCustomDash, Ur as PPTX_PARTS, Ut as createAdjust, V as convertInchesToEmu, Vn as LineEndWidth, Vr as DOCX_PARTS, Vt as AnimationLevelValue, W as convertPixelsToEmu, Wn as createGroupFill, Wr as XLSX_PARTS, Wt as createAdjustList, X as convertUniversalMeasureToEmu, Xn as PathShadeType, Xr as ZIP_STORED_LEVEL, Xt as createPreferredChildren, Y as convertToTwip, Yn as createPatternFill, Yr as ZIP_DEFLATE_LEVEL, Yt as createOrgChart, Z as convertUniversalMeasureToInch, Zn as TileFlipMode, Zr as createPacker, Zt as createPresentationLayoutVariables, _ as derivePasswordHash, _n as createBevel, _r as xsdTextCaps, _t as systemColorDesc, a as getMediaRefs, ai as convertOutput, an as createGroupTransform2D, ar as xsdEffectContainer, at as blipFillDesc, b as compileMapping, bn as createEffectDag, br as createSourceRectangle, bt as createDiagramTextProperties, c as hasPlaceholders, ci as customPropertiesDesc, cn as createBlipFill, cr as xsdMaterialType, ct as tileDesc, d as replaceHyperlinkPlaceholders, di as createOverride, dn as createCustomGeometry, dr as xsdPenAlignment, dt as presetColorDesc, ei as strFromU8, en as createPictureLocking, er as TileAlignment, et as parseUniversalMeasure, f as replaceImagePlaceholders, fi as Media, fn as stringifyPresetGeometry, fr as xsdPresetShadow, ft as rgbColorDesc, g as replaceVideoPlaceholders, gn as BevelPresetType, gr as xsdTextAnchor, gt as stringifyColorChoice, h as replaceSmartArtPlaceholders, hi as optionalRelsPart, hn as createShape3D, hr as xsdTextAlign, ht as solidFillDesc, i as formatId, ii as OoxmlMimeType, in as parseTableStyleList, ir as xsdCompoundLine, it as blipDesc, j as presetGeometryDesc, jn as BlendMode, jr as createSystemColor, jt as createTextEffectColorList, k as transform2DDesc, kn as createInnerShadowEffect, kr as createSolidFill, kt as createLineColorList, l as replaceAllPlaceholders, li as appPropertiesDesc, ln as createBlip, lr as xsdPathFillMode, lt as hslColorDesc, m as replaceNumberingPlaceholders, mi as TargetModeType, mn as PresetMaterialType, mr as xsdStrikeStyle, mt as schemeColorDesc, n as collectPlaceholderKeys, ni as zipAndConvert, nn as createTableStyle, nr as invertMap, nt as gradientFillDesc, o as getReferencedMedia, oi as decodeBase64, on as createTransform2D, or as xsdLineCap, ot as sourceRectangleDesc, p as replaceMediaPlaceholders, pi as Relationships, pn as stringifyAdjustmentValues, pr as xsdRectAlignment, pt as scRgbColorDesc, q as convertToInch, qn as extractBlipFillMedia, qr as ParsedArchive, qt as createHierBranch, r as findAndReplaceImagePlaceholders, ri as zipSyncAndConvert, rn as createTableStyleList, rr as xsdBlendMode, rt as patternFillDesc, s as getVideoRefs, si as encodeBase64, sn as stringifyStretch, sr as xsdLineEndSize, st as stretchDesc, t as addSmartArtRelationships, ti as unzipSync, tn as createShapeLocking, tr as createTileInfo, tt as fillDesc, u as replaceChartPlaceholders, ui as createDefault, un as createExtentionList, ur as xsdPattern, ut as parseColorChoice, v as hashPasswordAgile, vn as createBottomBevel, vr as xsdUnderlineStyle, vt as createDiagramExtensionList, w as presentationLayoutVariablesDesc, wn as createReflectionEffect, wr as uniqueNumericIdCreator, wt as HueDirection, x as diagramExtensionListDesc, xn as calculateEffectExtent, xr as createBlipEffects, xt as createDiagramRelationshipIds, y as randomBytes, yn as createScene3D, yr as xsdVerticalMergeRev, yt as createDiagramShape3D, z as convertEmuToPixels, zn as LineEndLength, zr as createColorTransforms, zt as createStyleDefinitionHeaderList } from "./src-Cc2VvOoz.mjs";
|
|
2
|
+
import { _ as DOCX_NS, a as appendOverride, b as buildCorePropertiesXmlString, c as createRunRenderer, d as createSplitInject, f as createTextElementContents, g as toJson, h as patchSpaceAttribute, i as appendContentType, l as createTokenReplacer, m as nextNumericId, n as appendRelationship, o as createReplacer, p as getFirstLevelElements, r as getNextRelationshipIndex, s as createTraverser, t as applyCorePropertiesOverride, u as TokenNotFoundError, v as PPTX_NS, x as parseCorePropsElement, y as buildCorePropertiesXml } from "./patch-DEPPafeB.mjs";
|
|
3
3
|
import { a as stringifyDataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as stringifyTransPoint, l as getLayoutXml, n as SmartArtCollection, o as stringifyConnection, p as STYLE_CATEGORIES, r as stringifyPoint, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-DCY-Vdv7.mjs";
|
|
4
4
|
import { a as TimeUnit, c as ChartCollection, i as ErrorValueType, n as ErrorBarDirection, o as TrendlineType, r as ErrorBarType, s as chartSpaceDesc, t as DataLabelPosition } from "./chart-DwE8FCFk.mjs";
|
|
5
|
-
import { a as roundTripFields, c as
|
|
5
|
+
import { a as roundTripFields, c as enumDecode, d as stringify, i as diffTagSets, l as enumEncode, n as findFieldSpec, o as boolDecode, r as checkOrder, s as boolEncode, t as FIELD_SPECS, u as parse } from "./descriptor-DAER86Rt.mjs";
|
|
6
6
|
import { i as DEFAULT_COLORS, n as createThemeXml, r as buildThemeXml, t as themeDesc } from "./theme-CiNzdl-9.mjs";
|
|
7
7
|
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-CVIZcTRw.mjs";
|
|
8
|
-
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, COLOR_CATEGORIES, ChartCollection, ColorMethod, CompoundLine, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, DataLabelPosition,
|
|
8
|
+
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, COLOR_CATEGORIES, ChartCollection, ColorMethod, CompoundLine, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, DataLabelPosition, ErrorBarDirection, ErrorBarType, ErrorValueType, FIELD_SPECS, FontCollectionIndex, HierBranchStyle, HueDirection, LAYOUT_CATEGORIES, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, Media, OoxmlMimeType, PART_REGISTRIES, PPTX_NS, PPTX_PARTS, ParsedArchive, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, Relationships, STYLE_CATEGORIES, SchemeColor, SmartArtCollection, StyleMatrixIndex, SystemColor, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TimeUnit, TokenNotFoundError, TrendlineType, XLSX_PARTS, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, addSmartArtRelationships, appPropertiesDesc, appendContentType, appendOverride, appendRelationship, applyCorePropertiesOverride, bevelDesc, blipDesc, blipFillDesc, boolDecode, boolEncode, buildContentTypeOverrides, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, calculateEffectExtent, chartSpaceDesc, checkOrder, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertToEmu, convertToInch, convertToPt, convertToTwip, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDataModel, createDefault, 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, createOverride, createPacker, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextElementContents, createTextFillColorList, createTextLineColorList, createThemeXml, createTileInfo, createTokenReplacer, createTransform2D, createTraverser, createZipStream, customGeometryDesc, customPropertiesDesc, dateTimeValue, decimalNumber, decodeBase64, derivePasswordHash, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, diffTagSets, effectListDesc, eighthPointMeasureValue, encodeBase64, enumDecode, enumEncode, extractBlipFillMedia, fillDesc, findAndReplaceImagePlaceholders, findFieldSpec, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getMediaRefs, getNextRelationshipIndex, getReferencedMedia, getStyleXml, getVideoRefs, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, hslColorDesc, invertMap, isBase64DataURL, levelForMediaName, longHexNumber, measurementOrPercentValue, nextNumericId, optionalRelsPart, outlineDesc, parse, parseArchive, parseColorChoice, parseCorePropsElement, parseTableStyleList, parseUniversalMeasure, patchSpaceAttribute, patternFillDesc, percentageValue, pictureLockingDesc, pointMeasureValue, positiveUniversalMeasureValue, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, randomBytes, replaceAllPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, rgbColorDesc, roundTripFields, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, solidFillDesc, sourceRectangleDesc, strFromU8, stretchDesc, stringify, stringifyAdjustmentValues, stringifyColorChoice, stringifyConnection, stringifyDataModel, stringifyPoint, stringifyPresetGeometry, stringifyStretch, stringifyTransPoint, summarizeOpcIssues, systemColorDesc, themeDesc, tileDesc, toJson, toUint8Array, transform2DDesc, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, validateOpcConsistency, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
|
package/dist/patch/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { type BasePatchOptions, DOCX_NS, PPTX_NS, type PlaceholderDelimiters, type RenderedParagraphNode, type ReplacerConfig, TokenNotFoundError, type XmlNamespaceConfig, appendContentType, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
1
|
+
import { C as XmlNamespaceConfig, S as PPTX_NS, _ as RenderedParagraphNode, a as getNextRelationshipIndex, b as createReplacer, c as createTextElementContents, d as patchSpaceAttribute, f as toJson, g as createTraverser, h as createTokenReplacer, i as appendRelationship, l as getFirstLevelElements, m as createSplitInject, n as PlaceholderDelimiters, o as appendContentType, p as TokenNotFoundError, r as applyCorePropertiesOverride, s as appendOverride, t as BasePatchOptions, u as nextNumericId, v as createRunRenderer, x as DOCX_NS, y as ReplacerConfig } from "../index-CHGFwCCQ.mjs";
|
|
2
|
+
export { type BasePatchOptions, DOCX_NS, PPTX_NS, type PlaceholderDelimiters, type RenderedParagraphNode, type ReplacerConfig, TokenNotFoundError, type XmlNamespaceConfig, appendContentType, appendOverride, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, nextNumericId, patchSpaceAttribute, toJson };
|
package/dist/patch/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
1
|
+
import { _ as DOCX_NS, a as appendOverride, c as createRunRenderer, d as createSplitInject, f as createTextElementContents, g as toJson, h as patchSpaceAttribute, i as appendContentType, l as createTokenReplacer, m as nextNumericId, n as appendRelationship, o as createReplacer, p as getFirstLevelElements, r as getNextRelationshipIndex, s as createTraverser, t as applyCorePropertiesOverride, u as TokenNotFoundError, v as PPTX_NS } from "../patch-DEPPafeB.mjs";
|
|
2
|
+
export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendOverride, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, nextNumericId, patchSpaceAttribute, toJson };
|
|
@@ -152,6 +152,22 @@ const patchSpaceAttribute = (element) => ({
|
|
|
152
152
|
attributes: { "xml:space": "preserve" }
|
|
153
153
|
});
|
|
154
154
|
const getFirstLevelElements = (relationships, id) => relationships.elements?.find((e) => e.name === id)?.elements ?? [];
|
|
155
|
+
/**
|
|
156
|
+
* Next sequential numeric id: the largest `attr` value among direct children
|
|
157
|
+
* named `childName`, plus one. `seed` is the floor — e.g. PPTX `<p:sldId>`
|
|
158
|
+
* values start at 255, so the first appended id is at least 256.
|
|
159
|
+
*
|
|
160
|
+
* Unifies the per-package `maxCommentId` / `maxSldId` / `maxSheetId` helpers.
|
|
161
|
+
*/
|
|
162
|
+
const nextNumericId = (parent, childName, attr, seed = 0) => {
|
|
163
|
+
let maxId = seed;
|
|
164
|
+
for (const child of parent?.elements ?? []) {
|
|
165
|
+
if (child.name !== childName) continue;
|
|
166
|
+
const id = Number(child.attributes?.[attr]);
|
|
167
|
+
if (Number.isFinite(id)) maxId = Math.max(maxId, id);
|
|
168
|
+
}
|
|
169
|
+
return maxId + 1;
|
|
170
|
+
};
|
|
155
171
|
//#endregion
|
|
156
172
|
//#region src/patch/paragraph-split-inject.ts
|
|
157
173
|
var TokenNotFoundError = class extends Error {
|
|
@@ -437,10 +453,21 @@ const goToParentElementFromPath = (json, path) => goToElementFromPath(json, path
|
|
|
437
453
|
const getLastElementIndexFromPath = (path) => path[path.length - 1];
|
|
438
454
|
//#endregion
|
|
439
455
|
//#region src/patch/content-types-manager.ts
|
|
456
|
+
/**
|
|
457
|
+
* The `<Types>` child array, initialized in place when absent (so a `<Default>`
|
|
458
|
+
* or `<Override>` can always be appended). Returns `undefined` if `element` has
|
|
459
|
+
* no `<Types>` child (malformed `[Content_Types].xml`).
|
|
460
|
+
*/
|
|
461
|
+
const typesChildren = (element) => {
|
|
462
|
+
const types = element.elements?.find((e) => e.name === "Types");
|
|
463
|
+
if (!types) return void 0;
|
|
464
|
+
return types.elements ?? (types.elements = []);
|
|
465
|
+
};
|
|
440
466
|
const appendContentType = (element, contentType, extension) => {
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
443
|
-
|
|
467
|
+
const els = typesChildren(element);
|
|
468
|
+
if (!els) return;
|
|
469
|
+
if (els.some((el) => el.type === "element" && el.name === "Default" && el?.attributes?.ContentType === contentType && el?.attributes?.Extension === extension)) return;
|
|
470
|
+
els.push({
|
|
444
471
|
attributes: {
|
|
445
472
|
ContentType: contentType,
|
|
446
473
|
Extension: extension
|
|
@@ -449,6 +476,24 @@ const appendContentType = (element, contentType, extension) => {
|
|
|
449
476
|
type: "element"
|
|
450
477
|
});
|
|
451
478
|
};
|
|
479
|
+
/**
|
|
480
|
+
* Append an `<Override>` element to a `[Content_Types].xml` root, deduped by
|
|
481
|
+
* `PartName`. Sibling to {@link appendContentType} (which handles `<Default>`):
|
|
482
|
+
* unifies the per-package Override-dedup blocks in docx/pptx/xlsx patchers.
|
|
483
|
+
*/
|
|
484
|
+
const appendOverride = (element, partName, contentType) => {
|
|
485
|
+
const els = typesChildren(element);
|
|
486
|
+
if (!els) return;
|
|
487
|
+
if (els.some((el) => el.type === "element" && el.name === "Override" && el?.attributes?.PartName === partName)) return;
|
|
488
|
+
els.push({
|
|
489
|
+
attributes: {
|
|
490
|
+
PartName: partName,
|
|
491
|
+
ContentType: contentType
|
|
492
|
+
},
|
|
493
|
+
name: "Override",
|
|
494
|
+
type: "element"
|
|
495
|
+
});
|
|
496
|
+
};
|
|
452
497
|
//#endregion
|
|
453
498
|
//#region src/patch/relationship-manager.ts
|
|
454
499
|
const getIdFromRelationshipId = (relationshipId) => {
|
|
@@ -481,4 +526,4 @@ function applyCorePropertiesOverride(corePropsDoc, overrides) {
|
|
|
481
526
|
});
|
|
482
527
|
}
|
|
483
528
|
//#endregion
|
|
484
|
-
export {
|
|
529
|
+
export { DOCX_NS as _, appendOverride as a, buildCorePropertiesXmlString as b, createRunRenderer as c, createSplitInject as d, createTextElementContents as f, toJson as g, patchSpaceAttribute as h, appendContentType as i, createTokenReplacer as l, nextNumericId as m, appendRelationship as n, createReplacer as o, getFirstLevelElements as p, getNextRelationshipIndex as r, createTraverser as s, applyCorePropertiesOverride as t, TokenNotFoundError as u, PPTX_NS as v, parseCorePropsElement as x, buildCorePropertiesXml as y };
|