@office-open/core 0.10.3 → 0.10.5
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/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{index-Dl4z-M1N.d.mts → index-BpWDihDR.d.mts} +41 -92
- package/dist/{index-BkEFbS8B.d.mts → index-CHGFwCCQ.d.mts} +15 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/patch/index.d.mts +1 -1
- package/dist/{src-BPRAxccL.mjs → src-Cc2VvOoz.mjs} +215 -209
- 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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as createLineColorList, $a as
|
|
2
|
-
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type BackdropOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, type CameraOptions, type ColorListOptions, ColorMethod, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, CompoundLine, type ConnectionSite, type CustomGeometryOptions, type DashStop, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtensionListOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelationshipIdsOptions, type DiagramStyleLabelOptions, type DiagramStyleOptions, type DiagramTextPropertiesOptions, type EffectContainerType, type EffectDagOptions, type EffectExtent, type EffectListOptions, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type GeomRect, type GeometryGuide, type GlowEffectOptions, type GradientFillOptions, type GradientShadeOptions, type GradientStop, type GradientStopOptions, type GraphicFrameLockingOptions, type GroupLockingOptions, type GroupTransform2DOptions, type HierBranchOptions, HierBranchStyle, type HslColorOptions, HueDirection, type InnerShadowEffectOptions, type LayoutDefinitionHeaderListOptions, type LayoutDefinitionHeaderOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MaxChildrenOptions, type
|
|
1
|
+
import { $ as createLineColorList, $a as TileAlignment, $n as createReflectionEffect, $t as TableStyleListOptions, A as scRgbColorDesc, An as createShape3D, At as PresentationLayoutVariablesOptions, B as createDiagramTextProperties, Ba as GradientStopOptions, Bn as SphereCoords, Bt as GraphicFrameLockingOptions, C as fillDesc, Cn as createCustomGeometry, Co as createHslColor, Cr as LineEndType, Ct as AnimationLevelOptions, D as parseColorChoice, Dn as stringifyAdjustmentValues, Dr as createCustomDash, Dt as MaxChildrenOptions, E as hslColorDesc, En as GeometryGuide, Er as DashStop, Et as HierBranchStyle, F as DiagramExtensionListOptions, Fa as createPatternFill, Fn as BackdropOptions, Ft as createHierBranch, G as DiagramStyleLabelOptions, Ga as GradientStop, Gn as EffectDagOptions, Gt as createGroupLocking, H as createDiagramRelationshipIds, Ha as extractBlipFillMedia, Hn as createScene3D, Ht as PictureLockingOptions, I as DiagramExtensionOptions, Ia as createNoFill, In as CameraOptions, It as createMaxChildren, J as HueDirection, Ja as PathShadeType, Jn as EffectExtent, Jt as OnOffStyleType, K as DiagramStyleOptions, Ka as LinearShadeOptions, Kn as createEffectDag, Kt as createPictureLocking, L as DiagramTextPropertiesOptions, La as BlipFillConfigOptions, Ln as LightRigOptions, Lt as createOrgChart, M as solidFillDesc, Ma as createGroupFill, Mn as BevelPresetType, Mt as createAdjustList, N as stringifyColorChoice, Na as PatternFillOptions, Nn as createBevel, Nt as createAnimateOneByOne, O as presetColorDesc, On as PresetMaterialType, Ot as OrgChartOptions, P as systemColorDesc, Pa as PresetPattern, Pn as createBottomBevel, Pt as createAnimationLevel, Q as createFillColorList, Qa as createGradientStop, Qn as ReflectionEffectOptions, Qt as TablePartStyleOptions, R as createDiagramExtensionList, Ra as BlipFillMediaData, Rn as Point3D, Rt as createPreferredChildren, S as outlineDesc, Sn as PathOptions, So as HslColorOptions, Sr as LineEndOptions, St as AnimateOneByOneValue, T as patternFillDesc, Tn as stringifyPresetGeometry, To as createColorTransforms, Tr as createLineEnd, Tt as HierBranchOptions, U as ColorListOptions, Ua as GradientFillOptions, Un as createSoftEdgeEffect, Ut as ShapeLockingOptions, V as DiagramRelationshipIdsOptions, Va as buildFill, Vn as Vector3D, Vt as GroupLockingOptions, W as ColorMethod, Wa as GradientShadeOptions, Wn as EffectContainerType, Wt as createGraphicFrameLocking, X as createDiagramStyle, Xa as TileFlipMode, Xn as calculateEffectExtent, Xt as TableCellBorderOptions, Y as StyleMatrixIndex, Ya as RelativeRect, Yn as EffectListOptions, Yt as StyleMatrixReferenceOptions, Z as createEffectColorList, Za as createGradientFill, Zn as createEffectList, Zt as TableCellStyleOptions, _ as graphicFrameLockingDesc, _n as ConnectionSite, _o as RgbColorOptions, _r as OutlineOptions, _t as createStyleDefinitionHeader, a as blipDesc, an as createTableStyleList, ao as createBlipEffects, ar as createOuterShadowEffect, at as ColorsDefinitionHeaderOptions, b as shapeLockingDesc, bn as PathCommand, bo as PresetColorOptions, br as createOutline, bt as AdjustOptions, c as stretchDesc, cn as Transform2DOptions, co as createSolidFill, cr as GlowEffectOptions, ct as DiagramNameOptions, d as scene3DDesc, dn as stringifyStretch, do as createSystemColor, dr as FillOverlayEffectOptions, dt as StyleDefinitionHeaderListOptions, en as TableStyleOptions, eo as TileOptions, er as PresetShadowEffectOptions, et as createStyleLabel, f as shape3DDesc, fn as createExtentionList, fo as SchemeColor, fr as createFillOverlayEffect, ft as StyleDefinitionHeaderOptions, g as presetGeometryDesc, gn as createBlip, go as createScRgbColor, gr as OutlineFillProperties, gt as createLayoutDefinitionHeaderList, h as customGeometryDesc, hn as BlipOptions, ho as ScRgbColorOptions, hr as LineJoin, ht as createLayoutDefinitionHeader, i as presentationLayoutVariablesDesc, in as createTableStyle, io as BlipEffectsOptions, ir as RectAlignment, it as ColorsDefinitionHeaderListOptions, j as schemeColorDesc, jn as BevelOptions, jt as createAdjust, k as rgbColorDesc, kn as Shape3DOptions, kt as PreferredChildrenOptions, l as tileDesc, ln as createGroupTransform2D, lo as SystemColor, lr as createGlowEffect, lt as LayoutDefinitionHeaderListOptions, m as transform2DDesc, mn as createBlipFill, mo as createSchemeColor, mr as LineCap, mt as createColorsDefinitionHeaderList, n as diagramRelationshipIdsDesc, nn as TableTextStyleOptions, no as SourceRectangleOptions, nr as createPresetShadowEffect, nt as createTextFillColorList, o as blipFillDesc, on as parseTableStyleList, oo as SolidFillOptions, or as InnerShadowEffectOptions, ot as DiagramCategoryOptions, p as groupTransform2DDesc, pn as BlipFillOptions, po as SchemeColorOptions, pr as CompoundLine, pt as createColorsDefinitionHeader, q as FontCollectionIndex, qa as PathShadeOptions, qn as BlurEffectOptions, qt as createShapeLocking, r as diagramStyleDesc, rn as ThemeableLineStyleOptions, ro as createSourceRectangle, rr as OuterShadowEffectOptions, rt as createTextLineColorList, s as sourceRectangleDesc, sn as GroupTransform2DOptions, so as createColorElement, sr as createInnerShadowEffect, st as DiagramDescriptionOptions, t as diagramExtensionListDesc, tn as TableStyleRegion, to as createTileInfo, tr as PresetShadowVal, tt as createTextEffectColorList, u as bevelDesc, un as createTransform2D, uo as SystemColorOptions, ur as BlendMode, ut as LayoutDefinitionHeaderOptions, v as groupLockingDesc, vn as CustomGeometryOptions, vo as createRgbColor, vr as PenAlignment, vt as createStyleDefinitionHeaderList, w as gradientFillDesc, wn as PresetGeometryOptions, wo as ColorTransformOptions, wr as LineEndWidth, wt as AnimationLevelValue, x as effectListDesc, xn as PathFillMode, xo as createPresetColor, xr as LineEndLength, xt as AnimateOneByOneOptions, y as pictureLockingDesc, yn as GeomRect, yo as PresetColor, yr as PresetDash, yt as AdjustListOptions, z as createDiagramShape3D, za as FillOptions, zn as Scene3DOptions, zt as createPresentationLayoutVariables } from "../index-BpWDihDR.mjs";
|
|
2
|
+
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type BackdropOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, type CameraOptions, type ColorListOptions, ColorMethod, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, CompoundLine, type ConnectionSite, type CustomGeometryOptions, type DashStop, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtensionListOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelationshipIdsOptions, type DiagramStyleLabelOptions, type DiagramStyleOptions, type DiagramTextPropertiesOptions, type EffectContainerType, type EffectDagOptions, type EffectExtent, type EffectListOptions, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type GeomRect, type GeometryGuide, type GlowEffectOptions, type GradientFillOptions, type GradientShadeOptions, type GradientStop, type GradientStopOptions, type GraphicFrameLockingOptions, type GroupLockingOptions, type GroupTransform2DOptions, type HierBranchOptions, HierBranchStyle, type HslColorOptions, HueDirection, type InnerShadowEffectOptions, type LayoutDefinitionHeaderListOptions, type LayoutDefinitionHeaderOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MaxChildrenOptions, type OnOffStyleType, type OrgChartOptions, type OuterShadowEffectOptions, type OutlineFillProperties, type OutlineOptions, type PathCommand, type PathFillMode, type PathOptions, type PathShadeOptions, PathShadeType, type PatternFillOptions, PenAlignment, type PictureLockingOptions, type Point3D, type PreferredChildrenOptions, type PresentationLayoutVariablesOptions, PresetColor, type PresetColorOptions, PresetDash, type PresetGeometryOptions, PresetMaterialType, PresetPattern, type PresetShadowEffectOptions, PresetShadowVal, RectAlignment, type ReflectionEffectOptions, type RelativeRect, type RgbColorOptions, type ScRgbColorOptions, type Scene3DOptions, SchemeColor, type SchemeColorOptions, type Shape3DOptions, type ShapeLockingOptions, type SolidFillOptions, type SourceRectangleOptions, type SphereCoords, type StyleDefinitionHeaderListOptions, type StyleDefinitionHeaderOptions, StyleMatrixIndex, type StyleMatrixReferenceOptions, SystemColor, type SystemColorOptions, type TableCellBorderOptions, type TableCellStyleOptions, type TablePartStyleOptions, type TableStyleListOptions, type TableStyleOptions, type TableStyleRegion, type TableTextStyleOptions, type ThemeableLineStyleOptions, TileAlignment, TileFlipMode, type TileOptions, type Transform2DOptions, type Vector3D, bevelDesc, blipDesc, blipFillDesc, buildFill, calculateEffectExtent, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextFillColorList, createTextLineColorList, createTileInfo, createTransform2D, customGeometryDesc, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, parseColorChoice, parseTableStyleList, patternFillDesc, pictureLockingDesc, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, rgbColorDesc, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, solidFillDesc, sourceRectangleDesc, stretchDesc, stringifyAdjustmentValues, stringifyColorChoice, stringifyPresetGeometry, stringifyStretch, systemColorDesc, tileDesc, transform2DDesc };
|
package/dist/drawingml/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, ColorMethod, CompoundLine, FontCollectionIndex, HierBranchStyle, HueDirection, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, SchemeColor, StyleMatrixIndex, SystemColor, TileAlignment, TileFlipMode, bevelDesc, blipDesc, blipFillDesc, buildFill, calculateEffectExtent, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextFillColorList, createTextLineColorList, createTileInfo, createTransform2D,
|
|
1
|
+
import { $n as createGradientStop, $t as createGroupLocking, A as customGeometryDesc, An as createGlowEffect, Ar as SystemColor, At as createStyleLabel, Bn as LineEndType, Bt as AnimateOneByOneValue, C as diagramStyleDesc, Cn as createSoftEdgeEffect, Ct as FontCollectionIndex, D as shape3DDesc, Dn as RectAlignment, Dt as createEffectColorList, E as scene3DDesc, En as createPresetShadowEffect, Et as createDiagramStyle, F as shapeLockingDesc, Fn as LineJoin, Fr as createRgbColor, Ft as createColorsDefinitionHeaderList, Gn as createNoFill, Gt as createAnimateOneByOne, Hn as createLineEnd, Ht as HierBranchStyle, I as effectListDesc, In as PenAlignment, Ir as PresetColor, It as createLayoutDefinitionHeader, Jn as PresetPattern, Jt as createMaxChildren, Kn as buildFill, 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, Qn as createGradientFill, Qt as createGraphicFrameLocking, Rn as createOutline, Rr as createHslColor, Rt as createStyleDefinitionHeader, S as diagramRelationshipIdsDesc, Sn as createEffectList, St as ColorMethod, T as bevelDesc, Tn as PresetShadowVal, Tt as StyleMatrixIndex, Un as createCustomDash, Ut as createAdjust, Vn as LineEndWidth, Vt as AnimationLevelValue, Wn as createGroupFill, Wt as createAdjustList, Xn as PathShadeType, Xt as createPreferredChildren, Yn as createPatternFill, Yt as createOrgChart, Zn as TileFlipMode, Zt as createPresentationLayoutVariables, _n as createBevel, _t as systemColorDesc, an as createGroupTransform2D, at as blipFillDesc, bn as createEffectDag, br as createSourceRectangle, bt as createDiagramTextProperties, cn as createBlipFill, ct as tileDesc, dn as createCustomGeometry, dt as presetColorDesc, en as createPictureLocking, er as TileAlignment, fn as stringifyPresetGeometry, ft as rgbColorDesc, gn as BevelPresetType, gt as stringifyColorChoice, hn as createShape3D, ht as solidFillDesc, in as parseTableStyleList, 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, ln as createBlip, lt as hslColorDesc, mn as PresetMaterialType, mt as schemeColorDesc, nn as createTableStyle, nt as gradientFillDesc, on as createTransform2D, ot as sourceRectangleDesc, pn as stringifyAdjustmentValues, pt as scRgbColorDesc, qn as extractBlipFillMedia, qt as createHierBranch, rn as createTableStyleList, rt as patternFillDesc, sn as stringifyStretch, st as stretchDesc, tn as createShapeLocking, tr as createTileInfo, tt as fillDesc, un as createExtentionList, ut as parseColorChoice, vn as createBottomBevel, vt as createDiagramExtensionList, w as presentationLayoutVariablesDesc, wn as createReflectionEffect, wt as HueDirection, x as diagramExtensionListDesc, xn as calculateEffectExtent, xr as createBlipEffects, xt as createDiagramRelationshipIds, yn as createScene3D, yt as createDiagramShape3D, zn as LineEndLength, zr as createColorTransforms, zt as createStyleDefinitionHeaderList } from "../src-Cc2VvOoz.mjs";
|
|
2
|
+
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, ColorMethod, CompoundLine, FontCollectionIndex, HierBranchStyle, HueDirection, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, SchemeColor, StyleMatrixIndex, SystemColor, TileAlignment, TileFlipMode, bevelDesc, blipDesc, blipFillDesc, buildFill, calculateEffectExtent, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createRgbColor, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextFillColorList, createTextLineColorList, createTileInfo, createTransform2D, customGeometryDesc, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, effectListDesc, extractBlipFillMedia, fillDesc, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hslColorDesc, outlineDesc, parseColorChoice, parseTableStyleList, patternFillDesc, pictureLockingDesc, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, rgbColorDesc, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, solidFillDesc, sourceRectangleDesc, stretchDesc, stringifyAdjustmentValues, stringifyColorChoice, stringifyPresetGeometry, stringifyStretch, systemColorDesc, tileDesc, transform2DDesc };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as CustomDescriptor, v as ReadContext, y as WriteContext } from "./index-CpNwAcem.mjs";
|
|
2
|
-
import { A as OutputType, M as DataType, k as OutputByType } from "./index-
|
|
3
|
-
import { s as UniversalMeasure } from "./values-
|
|
2
|
+
import { A as OutputType, M as DataType, k as OutputByType } from "./index-CHGFwCCQ.mjs";
|
|
3
|
+
import { s as UniversalMeasure } from "./values-DQfI1FSg.mjs";
|
|
4
4
|
import { Element } from "@office-open/xml";
|
|
5
5
|
import { ZipOptions, Zippable, Zippable as Zippable$1, strFromU8 as strFromU8$1, unzipSync as unzipSync$1 } from "fflate";
|
|
6
6
|
import { Buffer } from "\u0000polyfill-node.buffer";
|
|
@@ -2357,28 +2357,10 @@ declare const convertPointsToEmu: (points: number) => number;
|
|
|
2357
2357
|
* Converts EMU to points.
|
|
2358
2358
|
*/
|
|
2359
2359
|
declare const convertEmuToPoints: (emus: number) => number;
|
|
2360
|
-
/** A rectangular position in pixels. */
|
|
2361
|
-
interface PixelPosition {
|
|
2362
|
-
x: number;
|
|
2363
|
-
y: number;
|
|
2364
|
-
width: number;
|
|
2365
|
-
height: number;
|
|
2366
|
-
}
|
|
2367
|
-
/** An EMU-based rectangular position. */
|
|
2368
|
-
interface EmuPosition {
|
|
2369
|
-
x: number;
|
|
2370
|
-
y: number;
|
|
2371
|
-
cx: number;
|
|
2372
|
-
cy: number;
|
|
2373
|
-
}
|
|
2374
|
-
/**
|
|
2375
|
-
* Converts a pixel-based position to EMU coordinates.
|
|
2376
|
-
*/
|
|
2377
|
-
declare const convertPositionToEmu: (pos: PixelPosition) => EmuPosition;
|
|
2378
2360
|
/** Parsed result of a UniversalMeasure string. */
|
|
2379
2361
|
interface ParsedMeasure {
|
|
2380
2362
|
value: number;
|
|
2381
|
-
unit: "mm" | "cm" | "in" | "pt" | "pc" | "pi";
|
|
2363
|
+
unit: "mm" | "cm" | "in" | "pt" | "pc" | "pi" | "px";
|
|
2382
2364
|
}
|
|
2383
2365
|
/**
|
|
2384
2366
|
* Parse a UniversalMeasure string into its numeric value and unit.
|
|
@@ -2449,23 +2431,52 @@ declare const convertUniversalMeasureToEmu: (measure: string) => number;
|
|
|
2449
2431
|
/**
|
|
2450
2432
|
* Converts a measurement value (number or UniversalMeasure) to EMU.
|
|
2451
2433
|
*
|
|
2452
|
-
*
|
|
2453
|
-
*
|
|
2434
|
+
* Numbers are returned as-is (assumed EMU). Strings are parsed as
|
|
2435
|
+
* UniversalMeasure via {@link convertUniversalMeasureToEmu} — including the
|
|
2436
|
+
* project-only `px` unit (96 DPI). The result is always an EMU number written to
|
|
2437
|
+
* XML, so px never appears verbatim in the document.
|
|
2454
2438
|
*
|
|
2455
|
-
* Useful for
|
|
2456
|
-
* where the XSD type is a union (e.g., ST_Coordinate).
|
|
2439
|
+
* Useful for DrawingML fields where the XSD type is a union (e.g., ST_Coordinate).
|
|
2457
2440
|
*
|
|
2458
|
-
* @param val - A numeric EMU value or a
|
|
2441
|
+
* @param val - A numeric EMU value, or a UniversalMeasure string (incl. `${n}px`)
|
|
2459
2442
|
* @returns The value in EMU
|
|
2460
2443
|
*
|
|
2461
2444
|
* @example
|
|
2462
2445
|
* ```typescript
|
|
2463
|
-
* convertToEmu(914400);
|
|
2464
|
-
* convertToEmu("1in");
|
|
2465
|
-
* convertToEmu("2.54cm");
|
|
2446
|
+
* convertToEmu(914400); // 914400 (already EMU)
|
|
2447
|
+
* convertToEmu("1in"); // 914400
|
|
2448
|
+
* convertToEmu("2.54cm"); // 914400
|
|
2449
|
+
* convertToEmu("200px"); // 1905000 (200 * 9525)
|
|
2466
2450
|
* ```
|
|
2467
2451
|
*/
|
|
2468
2452
|
declare const convertToEmu: (val: number | string) => number;
|
|
2453
|
+
/**
|
|
2454
|
+
* Converts a UniversalMeasure string to points (1pt = 1/72 inch).
|
|
2455
|
+
*
|
|
2456
|
+
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc),
|
|
2457
|
+
* px (96 DPI).
|
|
2458
|
+
*/
|
|
2459
|
+
declare const convertUniversalMeasureToPt: (measure: string) => number;
|
|
2460
|
+
/**
|
|
2461
|
+
* Converts a measurement value (number or UniversalMeasure) to points.
|
|
2462
|
+
*
|
|
2463
|
+
* Numbers are returned as-is (assumed to be in points). Strings are parsed as
|
|
2464
|
+
* UniversalMeasure. Useful for SpreadsheetML fields where a number is points.
|
|
2465
|
+
*/
|
|
2466
|
+
declare const convertToPt: (val: number | string) => number;
|
|
2467
|
+
/**
|
|
2468
|
+
* Converts a UniversalMeasure string to inches.
|
|
2469
|
+
*
|
|
2470
|
+
* Supports units: mm, cm, in, pt, pc, pi, px (96 DPI).
|
|
2471
|
+
*/
|
|
2472
|
+
declare const convertUniversalMeasureToInch: (measure: string) => number;
|
|
2473
|
+
/**
|
|
2474
|
+
* Converts a measurement value (number or UniversalMeasure) to inches.
|
|
2475
|
+
*
|
|
2476
|
+
* Numbers are returned as-is (assumed to be in inches). Useful for SpreadsheetML
|
|
2477
|
+
* page-margin fields where a number is inches.
|
|
2478
|
+
*/
|
|
2479
|
+
declare const convertToInch: (val: number | string) => number;
|
|
2469
2480
|
//#endregion
|
|
2470
2481
|
//#region src/util/crypto.d.ts
|
|
2471
2482
|
/**
|
|
@@ -4420,68 +4431,6 @@ declare const createTransform2D: (options: Transform2DOptions, elementName?: str
|
|
|
4420
4431
|
*/
|
|
4421
4432
|
declare const createGroupTransform2D: (options: GroupTransform2DOptions, elementName?: string) => string;
|
|
4422
4433
|
//#endregion
|
|
4423
|
-
//#region src/drawingml/media/transformation.d.ts
|
|
4424
|
-
/**
|
|
4425
|
-
* Internal media data transformation with both pixel and EMU values.
|
|
4426
|
-
*/
|
|
4427
|
-
interface MediaDataTransformation {
|
|
4428
|
-
offset?: {
|
|
4429
|
-
pixels: {
|
|
4430
|
-
x: number;
|
|
4431
|
-
y: number;
|
|
4432
|
-
};
|
|
4433
|
-
emus?: {
|
|
4434
|
-
x: number;
|
|
4435
|
-
y: number;
|
|
4436
|
-
};
|
|
4437
|
-
};
|
|
4438
|
-
pixels: {
|
|
4439
|
-
/** Width in pixels */x: number; /** Height in pixels */
|
|
4440
|
-
y: number;
|
|
4441
|
-
};
|
|
4442
|
-
/** Display dimensions in EMUs (English Metric Units) */
|
|
4443
|
-
emus: {
|
|
4444
|
-
/** Width in EMUs (1 inch = 914400 EMUs) */x: number; /** Height in EMUs (1 inch = 914400 EMUs) */
|
|
4445
|
-
y: number;
|
|
4446
|
-
};
|
|
4447
|
-
/** Optional flip transformations */
|
|
4448
|
-
flip?: {
|
|
4449
|
-
/** Whether to flip the image vertically */vertical?: boolean; /** Whether to flip the image horizontally */
|
|
4450
|
-
horizontal?: boolean;
|
|
4451
|
-
};
|
|
4452
|
-
/** Optional rotation angle in degrees */
|
|
4453
|
-
rotation?: number;
|
|
4454
|
-
}
|
|
4455
|
-
/**
|
|
4456
|
-
* Transformation options for media display.
|
|
4457
|
-
*
|
|
4458
|
-
* Specifies how an image should be transformed when displayed in the document.
|
|
4459
|
-
*/
|
|
4460
|
-
interface MediaTransformation {
|
|
4461
|
-
offset?: {
|
|
4462
|
-
top?: number;
|
|
4463
|
-
left?: number;
|
|
4464
|
-
};
|
|
4465
|
-
width: number;
|
|
4466
|
-
/** Display height in pixels */
|
|
4467
|
-
height: number;
|
|
4468
|
-
/** Optional flip transformations */
|
|
4469
|
-
flip?: {
|
|
4470
|
-
/** Whether to flip the image vertically */vertical?: boolean; /** Whether to flip the image horizontally */
|
|
4471
|
-
horizontal?: boolean;
|
|
4472
|
-
};
|
|
4473
|
-
/** Optional rotation angle in degrees */
|
|
4474
|
-
rotation?: number;
|
|
4475
|
-
}
|
|
4476
|
-
/**
|
|
4477
|
-
* Converts user-facing transformation options (pixels) to internal
|
|
4478
|
-
* transformation data (pixels + EMUs).
|
|
4479
|
-
*
|
|
4480
|
-
* @param options - User-facing transformation in pixels
|
|
4481
|
-
* @returns Internal transformation data with both pixel and EMU values
|
|
4482
|
-
*/
|
|
4483
|
-
declare const createTransformation: (options: MediaTransformation) => MediaDataTransformation;
|
|
4484
|
-
//#endregion
|
|
4485
4434
|
//#region src/drawingml/table-style.d.ts
|
|
4486
4435
|
type TableStyleRegion = "tblBg" | "wholeTbl" | "band1H" | "band2H" | "band1V" | "band2V" | "lastCol" | "firstCol" | "lastRow" | "seCell" | "swCell" | "firstRow" | "neCell" | "nwCell";
|
|
4487
4436
|
type OnOffStyleType = "on" | "off" | "def";
|
|
@@ -5063,4 +5012,4 @@ declare const diagramStyleDesc: CustomDescriptor<DiagramStyleOptions>;
|
|
|
5063
5012
|
declare const presentationLayoutVariablesDesc: CustomDescriptor<PresentationLayoutVariablesOptions>;
|
|
5064
5013
|
declare const diagramExtensionListDesc: CustomDescriptor<DiagramExtensionListOptions>;
|
|
5065
5014
|
//#endregion
|
|
5066
|
-
export { createLineColorList as $,
|
|
5015
|
+
export { createLineColorList as $, TileAlignment as $a, encodeBase64 as $i, createReflectionEffect as $n, xsdPathFillMode as $r, TableStyleListOptions as $t, scRgbColorDesc as A, zipAndConvert as Aa, convertUniversalMeasureToEmu as Ai, createShape3D as An, addSmartArtRelationships as Ar, PresentationLayoutVariablesOptions as At, createDiagramTextProperties as B, GradientStopOptions as Ba, OpcSeverity as Bi, SphereCoords as Bn, replaceHyperlinkPlaceholders as Br, GraphicFrameLockingOptions as Bt, fillDesc as C, ZipOptions as Ca, convertMillimetersToTwip as Ci, createCustomGeometry as Cn, createHslColor as Co, LineEndType as Cr, AnimationLevelOptions as Ct, parseColorChoice as D, levelForMediaName as Da, convertToInch as Di, stringifyAdjustmentValues as Dn, createCustomDash as Dr, MaxChildrenOptions as Dt, hslColorDesc as E, createZipStream as Ea, convertToEmu as Ei, GeometryGuide as En, DashStop as Er, HierBranchStyle as Et, DiagramExtensionListOptions as F, createPatternFill as Fa, compileMapping as Fi, BackdropOptions as Fn, getReferencedMedia as Fr, createHierBranch as Ft, DiagramStyleLabelOptions as G, GradientStop as Ga, PPTX_PARTS as Gi, EffectDagOptions as Gn, replaceVideoPlaceholders as Gr, createGroupLocking as Gt, createDiagramRelationshipIds as H, extractBlipFillMedia as Ha, validateOpcConsistency as Hi, createScene3D as Hn, replaceMediaPlaceholders as Hr, PictureLockingOptions as Ht, DiagramExtensionOptions as I, createNoFill as Ia, ContentTypeOverrideEntry as Ii, CameraOptions as In, getVideoRefs as Ir, createMaxChildren as It, HueDirection as J, PathShadeType as Ja, PartPresence as Ji, EffectExtent as Jn, xsdCompoundLine as Jr, OnOffStyleType as Jt, DiagramStyleOptions as K, LinearShadeOptions as Ka, PackagePartRegistry as Ki, createEffectDag as Kn, invertMap as Kr, createPictureLocking as Kt, DiagramTextPropertiesOptions as L, BlipFillConfigOptions as La, buildContentTypeOverrides as Li, LightRigOptions as Ln, hasPlaceholders as Lr, createOrgChart as Lt, solidFillDesc as M, createGroupFill as Ma, convertUniversalMeasureToPt as Mi, BevelPresetType as Mn, findAndReplaceImagePlaceholders as Mr, createAdjustList as Mt, stringifyColorChoice as N, PatternFillOptions as Na, convertUniversalMeasureToTwip as Ni, createBevel as Nn, formatId as Nr, createAnimateOneByOne as Nt, presetColorDesc as O, strFromU8$1 as Oa, convertToPt as Oi, PresetMaterialType as On, IdFormat as Or, OrgChartOptions as Ot, systemColorDesc as P, PresetPattern as Pa, parseUniversalMeasure as Pi, createBottomBevel as Pn, getMediaRefs as Pr, createAnimationLevel as Pt, createFillColorList as Q, createGradientStop as Qa, decodeBase64 as Qi, ReflectionEffectOptions as Qn, xsdMaterialType as Qr, TablePartStyleOptions as Qt, createDiagramExtensionList as R, BlipFillMediaData as Ra, OpcCode as Ri, Point3D as Rn, replaceAllPlaceholders as Rr, createPreferredChildren as Rt, outlineDesc as S, ZIP_STORED_LEVEL as Sa, convertInchesToTwip as Si, PathOptions as Sn, HslColorOptions as So, LineEndOptions as Sr, AnimateOneByOneValue as St, patternFillDesc as T, createPacker as Ta, convertPointsToEmu as Ti, stringifyPresetGeometry as Tn, createColorTransforms as To, createLineEnd as Tr, HierBranchOptions as Tt, ColorListOptions as U, GradientFillOptions as Ua, DOCX_PARTS as Ui, createSoftEdgeEffect as Un, replaceNumberingPlaceholders as Ur, ShapeLockingOptions as Ut, DiagramRelationshipIdsOptions as V, buildFill as Va, summarizeOpcIssues as Vi, Vector3D as Vn, replaceImagePlaceholders as Vr, GroupLockingOptions as Vt, ColorMethod as W, GradientShadeOptions as Wa, PART_REGISTRIES as Wi, EffectContainerType as Wn, replaceSmartArtPlaceholders as Wr, createGraphicFrameLocking as Wt, createDiagramStyle as X, TileFlipMode as Xa, ParsedArchive as Xi, calculateEffectExtent as Xn, xsdLineCap as Xr, TableCellBorderOptions as Xt, StyleMatrixIndex as Y, RelativeRect as Ya, XLSX_PARTS as Yi, EffectListOptions as Yn, xsdEffectContainer as Yr, StyleMatrixReferenceOptions as Yt, createEffectColorList as Z, createGradientFill as Za, parseArchive as Zi, createEffectList as Zn, xsdLineEndSize as Zr, TableCellStyleOptions as Zt, graphicFrameLockingDesc as _, CompressionOptions as _a, randomBytes as _i, ConnectionSite as _n, RgbColorOptions as _o, OutlineOptions as _r, createStyleDefinitionHeader as _t, blipDesc as a, appPropertiesDesc as aa, xsdTextAlign as ai, createTableStyleList as an, createBlipEffects as ao, createOuterShadowEffect as ar, ColorsDefinitionHeaderOptions as at, shapeLockingDesc as b, XmlifyedFile as ba, convertEmuToPoints as bi, PathCommand as bn, PresetColorOptions as bo, createOutline as br, AdjustOptions as bt, stretchDesc as c, createDefault as ca, xsdUnderlineStyle as ci, Transform2DOptions as cn, createSolidFill as co, GlowEffectOptions as cr, DiagramNameOptions as ct, scene3DDesc as d, Media as da, hashedId as di, stringifyStretch as dn, createSystemColor as do, FillOverlayEffectOptions as dr, StyleDefinitionHeaderListOptions as dt, CustomPropertiesInput as ea, xsdPattern as ei, TableStyleOptions as en, TileOptions as eo, PresetShadowEffectOptions as er, createStyleLabel as et, shape3DDesc as f, RelationshipType as fa, uniqueId as fi, createExtentionList as fn, SchemeColor as fo, createFillOverlayEffect as fr, StyleDefinitionHeaderOptions as ft, presetGeometryDesc as g, CompileFn as ga, hashPasswordAgile as gi, createBlip as gn, createScRgbColor as go, OutlineFillProperties as gr, createLayoutDefinitionHeaderList as gt, customGeometryDesc as h, optionalRelsPart as ha, derivePasswordHash as hi, BlipOptions as hn, ScRgbColorOptions as ho, LineJoin as hr, createLayoutDefinitionHeader as ht, presentationLayoutVariablesDesc as i, AppPropertiesOptions as ia, xsdStrikeStyle as ii, createTableStyle as in, BlipEffectsOptions as io, RectAlignment as ir, ColorsDefinitionHeaderListOptions as it, schemeColorDesc as j, zipSyncAndConvert as ja, convertUniversalMeasureToInch as ji, BevelOptions as jn, collectPlaceholderKeys as jr, createAdjust as jt, rgbColorDesc as k, unzipSync$1 as ka, convertToTwip as ki, Shape3DOptions as kn, SmartArtRelOptions as kr, PreferredChildrenOptions as kt, tileDesc as l, createOverride as la, xsdVerticalMergeRev as li, createGroupTransform2D as ln, SystemColor as lo, createGlowEffect as lr, LayoutDefinitionHeaderListOptions as lt, transform2DDesc as m, TargetModeType as ma, uniqueUuid as mi, createBlipFill as mn, createSchemeColor as mo, LineCap as mr, createColorsDefinitionHeaderList as mt, diagramRelationshipIdsDesc as n, customPropertiesDesc as na, xsdPresetShadow as ni, TableTextStyleOptions as nn, SourceRectangleOptions as no, createPresetShadowEffect as nr, createTextFillColorList as nt, blipFillDesc as o, DefaultAttributes as oa, xsdTextAnchor as oi, parseTableStyleList as on, SolidFillOptions as oo, InnerShadowEffectOptions as or, DiagramCategoryOptions as ot, groupTransform2DDesc as p, Relationships as pa, uniqueNumericIdCreator as pi, BlipFillOptions as pn, SchemeColorOptions as po, CompoundLine as pr, createColorsDefinitionHeader as pt, FontCollectionIndex as q, PathShadeOptions as qa, PartDef as qi, BlurEffectOptions as qn, xsdBlendMode as qr, createShapeLocking as qt, diagramStyleDesc as r, AppPropertiesInput as ra, xsdRectAlignment as ri, ThemeableLineStyleOptions as rn, createSourceRectangle as ro, OuterShadowEffectOptions as rr, createTextLineColorList as rt, sourceRectangleDesc as s, OverrideAttributes as sa, xsdTextCaps as si, GroupTransform2DOptions as sn, createColorElement as so, createInnerShadowEffect as sr, DiagramDescriptionOptions as st, diagramExtensionListDesc as t, CustomPropertyOptions as ta, xsdPenAlignment as ti, TableStyleRegion as tn, createTileInfo as to, PresetShadowVal as tr, createTextEffectColorList as tt, bevelDesc as u, BaseMediaEntry as ua, UniqueNumericIdCreator as ui, createTransform2D as un, SystemColorOptions as uo, BlendMode as ur, LayoutDefinitionHeaderOptions as ut, groupLockingDesc as v, Packer as va, convertEmuToInches as vi, CustomGeometryOptions as vn, createRgbColor as vo, PenAlignment as vr, createStyleDefinitionHeaderList as vt, gradientFillDesc as w, Zippable$1 as wa, convertPixelsToEmu as wi, PresetGeometryOptions as wn, ColorTransformOptions as wo, LineEndWidth as wr, AnimationLevelValue as wt, effectListDesc as x, ZIP_DEFLATE_LEVEL as xa, convertInchesToEmu as xi, PathFillMode as xn, createPresetColor as xo, LineEndLength as xr, AnimateOneByOneOptions as xt, pictureLockingDesc as y, PackerOptions as ya, convertEmuToPixels as yi, GeomRect as yn, PresetColor as yo, PresetDash as yr, AdjustListOptions as yt, createDiagramShape3D as z, FillOptions as za, OpcIssue as zi, Scene3DOptions as zn, replaceChartPlaceholders as zr, createPresentationLayoutVariables as zt };
|
|
@@ -6,8 +6,21 @@ 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;
|
|
11
24
|
//#endregion
|
|
12
25
|
//#region src/opc/output.d.ts
|
|
13
26
|
/**
|
|
@@ -250,4 +263,4 @@ interface BasePatchOptions<T extends OutputType = OutputType> {
|
|
|
250
263
|
placeholderDelimiters?: PlaceholderDelimiters;
|
|
251
264
|
}
|
|
252
265
|
//#endregion
|
|
253
|
-
export { OutputType as A, XmlNamespaceConfig as C, parseCorePropsElement as D, buildCorePropertiesXmlString as E, DataType as M,
|
|
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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
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
|
|
4
|
-
import { A as OutputType, C as XmlNamespaceConfig, D as parseCorePropsElement, E as buildCorePropertiesXmlString, M as DataType, N as
|
|
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
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-
|
|
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,
|
|
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
|
|
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
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
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, 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,
|
|
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 { 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-
|
|
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
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 };
|
|
@@ -3507,13 +3507,14 @@ function isBase64DataURL(input) {
|
|
|
3507
3507
|
return DATA_URL_RE.test(input);
|
|
3508
3508
|
}
|
|
3509
3509
|
/** Normalize any supported binary input to a `Uint8Array`. */
|
|
3510
|
-
function toUint8Array(data) {
|
|
3510
|
+
function toUint8Array(data, options) {
|
|
3511
3511
|
if (data instanceof Uint8Array) return data;
|
|
3512
3512
|
if (data instanceof ArrayBuffer) return new Uint8Array(data);
|
|
3513
3513
|
if (data instanceof DataView) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
3514
3514
|
if (typeof data === "string") {
|
|
3515
3515
|
const match = data.match(DATA_URL_RE);
|
|
3516
3516
|
if (match) return decodeBase64(data.slice(match[0].length));
|
|
3517
|
+
if (options?.encoding === "base64") return decodeBase64(data);
|
|
3517
3518
|
return new TextEncoder().encode(data);
|
|
3518
3519
|
}
|
|
3519
3520
|
if (Array.isArray(data)) return new Uint8Array(data);
|
|
@@ -5811,212 +5812,6 @@ const createGroupTransform2D = (options, elementName = "a:xfrm") => {
|
|
|
5811
5812
|
return element(elementName, buildXfrmAttrs(options), children);
|
|
5812
5813
|
};
|
|
5813
5814
|
//#endregion
|
|
5814
|
-
//#region src/util/converters.ts
|
|
5815
|
-
/**
|
|
5816
|
-
* OOXML unit conversion utilities.
|
|
5817
|
-
*
|
|
5818
|
-
* @module
|
|
5819
|
-
*/
|
|
5820
|
-
/**
|
|
5821
|
-
* Converts millimeters to TWIP (twentieths of a point).
|
|
5822
|
-
*/
|
|
5823
|
-
const convertMillimetersToTwip = (millimeters) => Math.floor(millimeters / 25.4 * 72 * 20);
|
|
5824
|
-
/**
|
|
5825
|
-
* Converts inches to TWIP (twentieths of a point).
|
|
5826
|
-
*/
|
|
5827
|
-
const convertInchesToTwip = (inches) => Math.floor(inches * 72 * 20);
|
|
5828
|
-
/**
|
|
5829
|
-
* Converts pixels to EMU (96 DPI).
|
|
5830
|
-
*/
|
|
5831
|
-
const convertPixelsToEmu = (pixels) => Math.round(pixels * 9525);
|
|
5832
|
-
/**
|
|
5833
|
-
* Converts EMU to pixels (96 DPI).
|
|
5834
|
-
*
|
|
5835
|
-
* Returns a possibly fractional (sub-pixel) value. The integer rounding that
|
|
5836
|
-
* lived here before permanently discarded sub-pixel precision, which made an
|
|
5837
|
-
* EMU → pixel → EMU round-trip lossy (e.g. 5521960 EMU → 580 px → 5524500 EMU).
|
|
5838
|
-
* Keeping the fraction lets convertPixelsToEmu restore the exact original EMU.
|
|
5839
|
-
* Callers needing an integer pixel for display should Math.round the result.
|
|
5840
|
-
*/
|
|
5841
|
-
const convertEmuToPixels = (emus) => emus / 9525;
|
|
5842
|
-
/**
|
|
5843
|
-
* Converts inches to EMU.
|
|
5844
|
-
*/
|
|
5845
|
-
const convertInchesToEmu = (inches) => Math.round(inches * 914400);
|
|
5846
|
-
/**
|
|
5847
|
-
* Converts EMU to inches.
|
|
5848
|
-
*/
|
|
5849
|
-
const convertEmuToInches = (emus) => emus / 914400;
|
|
5850
|
-
/**
|
|
5851
|
-
* Converts points to EMU.
|
|
5852
|
-
*/
|
|
5853
|
-
const convertPointsToEmu = (points) => Math.round(points * 12700);
|
|
5854
|
-
/**
|
|
5855
|
-
* Converts EMU to points.
|
|
5856
|
-
*/
|
|
5857
|
-
const convertEmuToPoints = (emus) => emus / 12700;
|
|
5858
|
-
/**
|
|
5859
|
-
* Converts a pixel-based position to EMU coordinates.
|
|
5860
|
-
*/
|
|
5861
|
-
const convertPositionToEmu = (pos) => ({
|
|
5862
|
-
x: convertPixelsToEmu(pos.x),
|
|
5863
|
-
y: convertPixelsToEmu(pos.y),
|
|
5864
|
-
cx: convertPixelsToEmu(pos.width),
|
|
5865
|
-
cy: convertPixelsToEmu(pos.height)
|
|
5866
|
-
});
|
|
5867
|
-
/**
|
|
5868
|
-
* Parse a UniversalMeasure string into its numeric value and unit.
|
|
5869
|
-
*
|
|
5870
|
-
* @param measure - A universal measure string like "2.54cm", "-10mm", "1in"
|
|
5871
|
-
* @returns The parsed value and unit
|
|
5872
|
-
* @throws Error if the format is invalid
|
|
5873
|
-
*
|
|
5874
|
-
* @example
|
|
5875
|
-
* ```typescript
|
|
5876
|
-
* parseUniversalMeasure("2.54cm"); // { value: 2.54, unit: "cm" }
|
|
5877
|
-
* parseUniversalMeasure("-10mm"); // { value: -10, unit: "mm" }
|
|
5878
|
-
* ```
|
|
5879
|
-
*/
|
|
5880
|
-
const parseUniversalMeasure = (measure) => {
|
|
5881
|
-
const match = measure.match(/^(-?[0-9]+(?:\.[0-9]+)?)(mm|cm|in|pt|pc|pi)$/);
|
|
5882
|
-
if (!match) throw new Error(`Invalid universal measure: '${measure}'`);
|
|
5883
|
-
return {
|
|
5884
|
-
value: parseFloat(match[1]),
|
|
5885
|
-
unit: match[2]
|
|
5886
|
-
};
|
|
5887
|
-
};
|
|
5888
|
-
/**
|
|
5889
|
-
* Converts a UniversalMeasure string to TWIP (twentieths of a point).
|
|
5890
|
-
*
|
|
5891
|
-
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc).
|
|
5892
|
-
*
|
|
5893
|
-
* @param measure - A universal measure string like "2.54cm", "1in", "12pt"
|
|
5894
|
-
* @returns The value in TWIP
|
|
5895
|
-
*
|
|
5896
|
-
* @example
|
|
5897
|
-
* ```typescript
|
|
5898
|
-
* convertUniversalMeasureToTwip("1in"); // 1440
|
|
5899
|
-
* convertUniversalMeasureToTwip("2.54cm"); // ~1440 (1 inch)
|
|
5900
|
-
* convertUniversalMeasureToTwip("72pt"); // 1440 (1 inch = 72pt = 1440 twips)
|
|
5901
|
-
* ```
|
|
5902
|
-
*/
|
|
5903
|
-
const convertUniversalMeasureToTwip = (measure) => {
|
|
5904
|
-
const { value, unit } = parseUniversalMeasure(measure);
|
|
5905
|
-
switch (unit) {
|
|
5906
|
-
case "mm": return convertMillimetersToTwip(value);
|
|
5907
|
-
case "cm": return convertMillimetersToTwip(value * 10);
|
|
5908
|
-
case "in": return convertInchesToTwip(value);
|
|
5909
|
-
case "pt": return Math.floor(value * 20);
|
|
5910
|
-
case "pc":
|
|
5911
|
-
case "pi": return Math.floor(value * 12 * 20);
|
|
5912
|
-
}
|
|
5913
|
-
};
|
|
5914
|
-
/**
|
|
5915
|
-
* Converts a measurement value (number or UniversalMeasure) to TWIP.
|
|
5916
|
-
*
|
|
5917
|
-
* If the value is already a number, it is returned as-is (assumed to be in twips).
|
|
5918
|
-
* If the value is a UniversalMeasure string, it is converted to twips.
|
|
5919
|
-
*
|
|
5920
|
-
* Useful for accepting both `number` and `UniversalMeasure` inputs where
|
|
5921
|
-
* the XSD type is a union (e.g., ST_TwipsMeasure, ST_SignedTwipsMeasure).
|
|
5922
|
-
*
|
|
5923
|
-
* @param val - A numeric twip value or a universal measure string
|
|
5924
|
-
* @returns The value in TWIP
|
|
5925
|
-
*
|
|
5926
|
-
* @example
|
|
5927
|
-
* ```typescript
|
|
5928
|
-
* convertToTwip(1440); // 1440 (already twips)
|
|
5929
|
-
* convertToTwip("1in"); // 1440
|
|
5930
|
-
* convertToTwip("2.54cm"); // ~1440
|
|
5931
|
-
* ```
|
|
5932
|
-
*/
|
|
5933
|
-
const convertToTwip = (val) => typeof val === "string" ? convertUniversalMeasureToTwip(val) : val;
|
|
5934
|
-
/**
|
|
5935
|
-
* Converts a UniversalMeasure string to EMU (English Metric Units).
|
|
5936
|
-
*
|
|
5937
|
-
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc).
|
|
5938
|
-
*
|
|
5939
|
-
* @param measure - A universal measure string like "2.54cm", "1in", "12pt"
|
|
5940
|
-
* @returns The value in EMU
|
|
5941
|
-
*
|
|
5942
|
-
* @example
|
|
5943
|
-
* ```typescript
|
|
5944
|
-
* convertUniversalMeasureToEmu("1in"); // 914400
|
|
5945
|
-
* convertUniversalMeasureToEmu("2.54cm"); // 914400
|
|
5946
|
-
* convertUniversalMeasureToEmu("12pt"); // 152400
|
|
5947
|
-
* ```
|
|
5948
|
-
*/
|
|
5949
|
-
const convertUniversalMeasureToEmu = (measure) => {
|
|
5950
|
-
const { value, unit } = parseUniversalMeasure(measure);
|
|
5951
|
-
switch (unit) {
|
|
5952
|
-
case "mm": return Math.round(value * 36e3);
|
|
5953
|
-
case "cm": return Math.round(value * 36e4);
|
|
5954
|
-
case "in": return convertInchesToEmu(value);
|
|
5955
|
-
case "pt": return convertPointsToEmu(value);
|
|
5956
|
-
case "pc":
|
|
5957
|
-
case "pi": return convertPointsToEmu(value * 12);
|
|
5958
|
-
}
|
|
5959
|
-
};
|
|
5960
|
-
/**
|
|
5961
|
-
* Converts a measurement value (number or UniversalMeasure) to EMU.
|
|
5962
|
-
*
|
|
5963
|
-
* If the value is already a number, it is returned as-is (assumed to be in EMU).
|
|
5964
|
-
* If the value is a UniversalMeasure string, it is converted to EMU.
|
|
5965
|
-
*
|
|
5966
|
-
* Useful for accepting both `number` and `UniversalMeasure` inputs in DrawingML
|
|
5967
|
-
* where the XSD type is a union (e.g., ST_Coordinate).
|
|
5968
|
-
*
|
|
5969
|
-
* @param val - A numeric EMU value or a universal measure string
|
|
5970
|
-
* @returns The value in EMU
|
|
5971
|
-
*
|
|
5972
|
-
* @example
|
|
5973
|
-
* ```typescript
|
|
5974
|
-
* convertToEmu(914400); // 914400 (already EMU)
|
|
5975
|
-
* convertToEmu("1in"); // 914400
|
|
5976
|
-
* convertToEmu("2.54cm"); // 914400
|
|
5977
|
-
* ```
|
|
5978
|
-
*/
|
|
5979
|
-
const convertToEmu = (val) => typeof val === "string" ? convertUniversalMeasureToEmu(val) : val;
|
|
5980
|
-
//#endregion
|
|
5981
|
-
//#region src/drawingml/media/transformation.ts
|
|
5982
|
-
/**
|
|
5983
|
-
* Media transformation utilities for DrawingML.
|
|
5984
|
-
*
|
|
5985
|
-
* Converts user-facing transformation options (pixels) to internal
|
|
5986
|
-
* transformation data (pixels + EMUs).
|
|
5987
|
-
*
|
|
5988
|
-
* @module
|
|
5989
|
-
*/
|
|
5990
|
-
/**
|
|
5991
|
-
* Converts user-facing transformation options (pixels) to internal
|
|
5992
|
-
* transformation data (pixels + EMUs).
|
|
5993
|
-
*
|
|
5994
|
-
* @param options - User-facing transformation in pixels
|
|
5995
|
-
* @returns Internal transformation data with both pixel and EMU values
|
|
5996
|
-
*/
|
|
5997
|
-
const createTransformation = (options) => ({
|
|
5998
|
-
emus: {
|
|
5999
|
-
x: convertPixelsToEmu(options.width),
|
|
6000
|
-
y: convertPixelsToEmu(options.height)
|
|
6001
|
-
},
|
|
6002
|
-
flip: options.flip,
|
|
6003
|
-
offset: {
|
|
6004
|
-
emus: {
|
|
6005
|
-
x: convertPixelsToEmu(options.offset?.left ?? 0),
|
|
6006
|
-
y: convertPixelsToEmu(options.offset?.top ?? 0)
|
|
6007
|
-
},
|
|
6008
|
-
pixels: {
|
|
6009
|
-
x: Math.round(options.offset?.left ?? 0),
|
|
6010
|
-
y: Math.round(options.offset?.top ?? 0)
|
|
6011
|
-
}
|
|
6012
|
-
},
|
|
6013
|
-
pixels: {
|
|
6014
|
-
x: Math.round(options.width),
|
|
6015
|
-
y: Math.round(options.height)
|
|
6016
|
-
},
|
|
6017
|
-
rotation: options.rotation ? options.rotation * 6e4 : void 0
|
|
6018
|
-
});
|
|
6019
|
-
//#endregion
|
|
6020
5815
|
//#region src/drawingml/table-style.ts
|
|
6021
5816
|
/**
|
|
6022
5817
|
* Table Style system for DrawingML.
|
|
@@ -7315,7 +7110,7 @@ const fillDesc = {
|
|
|
7315
7110
|
if (opts.path) gradOpts.shade = { path: opts.path };
|
|
7316
7111
|
return stringify$1(gradientFillDesc, gradOpts, ctx);
|
|
7317
7112
|
}
|
|
7318
|
-
case "blip": return buildFill(opts, ctx.addMedia(toUint8Array(opts.data), opts.imageType));
|
|
7113
|
+
case "blip": return buildFill(opts, ctx.addMedia(toUint8Array(opts.data, { encoding: "base64" }), opts.imageType));
|
|
7319
7114
|
case "pattern": return stringify$1(patternFillDesc, {
|
|
7320
7115
|
pattern: opts.pattern,
|
|
7321
7116
|
...opts.foregroundColor && { foregroundColor: typeof opts.foregroundColor === "string" ? { value: opts.foregroundColor.replace("#", "") } : opts.foregroundColor },
|
|
@@ -7373,6 +7168,217 @@ function readDirectColor(el, ctx) {
|
|
|
7373
7168
|
return { value: "" };
|
|
7374
7169
|
}
|
|
7375
7170
|
//#endregion
|
|
7171
|
+
//#region src/util/converters.ts
|
|
7172
|
+
/**
|
|
7173
|
+
* OOXML unit conversion utilities.
|
|
7174
|
+
*
|
|
7175
|
+
* @module
|
|
7176
|
+
*/
|
|
7177
|
+
/**
|
|
7178
|
+
* Converts millimeters to TWIP (twentieths of a point).
|
|
7179
|
+
*/
|
|
7180
|
+
const convertMillimetersToTwip = (millimeters) => Math.floor(millimeters / 25.4 * 72 * 20);
|
|
7181
|
+
/**
|
|
7182
|
+
* Converts inches to TWIP (twentieths of a point).
|
|
7183
|
+
*/
|
|
7184
|
+
const convertInchesToTwip = (inches) => Math.floor(inches * 72 * 20);
|
|
7185
|
+
/**
|
|
7186
|
+
* Converts pixels to EMU (96 DPI).
|
|
7187
|
+
*/
|
|
7188
|
+
const convertPixelsToEmu = (pixels) => Math.round(pixels * 9525);
|
|
7189
|
+
/**
|
|
7190
|
+
* Converts EMU to pixels (96 DPI).
|
|
7191
|
+
*
|
|
7192
|
+
* Returns a possibly fractional (sub-pixel) value. The integer rounding that
|
|
7193
|
+
* lived here before permanently discarded sub-pixel precision, which made an
|
|
7194
|
+
* EMU → pixel → EMU round-trip lossy (e.g. 5521960 EMU → 580 px → 5524500 EMU).
|
|
7195
|
+
* Keeping the fraction lets convertPixelsToEmu restore the exact original EMU.
|
|
7196
|
+
* Callers needing an integer pixel for display should Math.round the result.
|
|
7197
|
+
*/
|
|
7198
|
+
const convertEmuToPixels = (emus) => emus / 9525;
|
|
7199
|
+
/**
|
|
7200
|
+
* Converts inches to EMU.
|
|
7201
|
+
*/
|
|
7202
|
+
const convertInchesToEmu = (inches) => Math.round(inches * 914400);
|
|
7203
|
+
/**
|
|
7204
|
+
* Converts EMU to inches.
|
|
7205
|
+
*/
|
|
7206
|
+
const convertEmuToInches = (emus) => emus / 914400;
|
|
7207
|
+
/**
|
|
7208
|
+
* Converts points to EMU.
|
|
7209
|
+
*/
|
|
7210
|
+
const convertPointsToEmu = (points) => Math.round(points * 12700);
|
|
7211
|
+
/**
|
|
7212
|
+
* Converts EMU to points.
|
|
7213
|
+
*/
|
|
7214
|
+
const convertEmuToPoints = (emus) => emus / 12700;
|
|
7215
|
+
/**
|
|
7216
|
+
* Parse a UniversalMeasure string into its numeric value and unit.
|
|
7217
|
+
*
|
|
7218
|
+
* @param measure - A universal measure string like "2.54cm", "-10mm", "1in"
|
|
7219
|
+
* @returns The parsed value and unit
|
|
7220
|
+
* @throws Error if the format is invalid
|
|
7221
|
+
*
|
|
7222
|
+
* @example
|
|
7223
|
+
* ```typescript
|
|
7224
|
+
* parseUniversalMeasure("2.54cm"); // { value: 2.54, unit: "cm" }
|
|
7225
|
+
* parseUniversalMeasure("-10mm"); // { value: -10, unit: "mm" }
|
|
7226
|
+
* ```
|
|
7227
|
+
*/
|
|
7228
|
+
const parseUniversalMeasure = (measure) => {
|
|
7229
|
+
const match = measure.match(/^(-?[0-9]+(?:\.[0-9]+)?)(mm|cm|in|pt|pc|pi|px)$/);
|
|
7230
|
+
if (!match) throw new Error(`Invalid universal measure: '${measure}'`);
|
|
7231
|
+
return {
|
|
7232
|
+
value: parseFloat(match[1]),
|
|
7233
|
+
unit: match[2]
|
|
7234
|
+
};
|
|
7235
|
+
};
|
|
7236
|
+
/**
|
|
7237
|
+
* Converts a UniversalMeasure string to TWIP (twentieths of a point).
|
|
7238
|
+
*
|
|
7239
|
+
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc).
|
|
7240
|
+
*
|
|
7241
|
+
* @param measure - A universal measure string like "2.54cm", "1in", "12pt"
|
|
7242
|
+
* @returns The value in TWIP
|
|
7243
|
+
*
|
|
7244
|
+
* @example
|
|
7245
|
+
* ```typescript
|
|
7246
|
+
* convertUniversalMeasureToTwip("1in"); // 1440
|
|
7247
|
+
* convertUniversalMeasureToTwip("2.54cm"); // ~1440 (1 inch)
|
|
7248
|
+
* convertUniversalMeasureToTwip("72pt"); // 1440 (1 inch = 72pt = 1440 twips)
|
|
7249
|
+
* ```
|
|
7250
|
+
*/
|
|
7251
|
+
const convertUniversalMeasureToTwip = (measure) => {
|
|
7252
|
+
const { value, unit } = parseUniversalMeasure(measure);
|
|
7253
|
+
switch (unit) {
|
|
7254
|
+
case "mm": return convertMillimetersToTwip(value);
|
|
7255
|
+
case "cm": return convertMillimetersToTwip(value * 10);
|
|
7256
|
+
case "in": return convertInchesToTwip(value);
|
|
7257
|
+
case "pt": return Math.floor(value * 20);
|
|
7258
|
+
case "pc":
|
|
7259
|
+
case "pi": return Math.floor(value * 12 * 20);
|
|
7260
|
+
case "px": return Math.round(value * 15);
|
|
7261
|
+
}
|
|
7262
|
+
};
|
|
7263
|
+
/**
|
|
7264
|
+
* Converts a measurement value (number or UniversalMeasure) to TWIP.
|
|
7265
|
+
*
|
|
7266
|
+
* If the value is already a number, it is returned as-is (assumed to be in twips).
|
|
7267
|
+
* If the value is a UniversalMeasure string, it is converted to twips.
|
|
7268
|
+
*
|
|
7269
|
+
* Useful for accepting both `number` and `UniversalMeasure` inputs where
|
|
7270
|
+
* the XSD type is a union (e.g., ST_TwipsMeasure, ST_SignedTwipsMeasure).
|
|
7271
|
+
*
|
|
7272
|
+
* @param val - A numeric twip value or a universal measure string
|
|
7273
|
+
* @returns The value in TWIP
|
|
7274
|
+
*
|
|
7275
|
+
* @example
|
|
7276
|
+
* ```typescript
|
|
7277
|
+
* convertToTwip(1440); // 1440 (already twips)
|
|
7278
|
+
* convertToTwip("1in"); // 1440
|
|
7279
|
+
* convertToTwip("2.54cm"); // ~1440
|
|
7280
|
+
* ```
|
|
7281
|
+
*/
|
|
7282
|
+
const convertToTwip = (val) => typeof val === "string" ? convertUniversalMeasureToTwip(val) : val;
|
|
7283
|
+
/**
|
|
7284
|
+
* Converts a UniversalMeasure string to EMU (English Metric Units).
|
|
7285
|
+
*
|
|
7286
|
+
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc).
|
|
7287
|
+
*
|
|
7288
|
+
* @param measure - A universal measure string like "2.54cm", "1in", "12pt"
|
|
7289
|
+
* @returns The value in EMU
|
|
7290
|
+
*
|
|
7291
|
+
* @example
|
|
7292
|
+
* ```typescript
|
|
7293
|
+
* convertUniversalMeasureToEmu("1in"); // 914400
|
|
7294
|
+
* convertUniversalMeasureToEmu("2.54cm"); // 914400
|
|
7295
|
+
* convertUniversalMeasureToEmu("12pt"); // 152400
|
|
7296
|
+
* ```
|
|
7297
|
+
*/
|
|
7298
|
+
const convertUniversalMeasureToEmu = (measure) => {
|
|
7299
|
+
const { value, unit } = parseUniversalMeasure(measure);
|
|
7300
|
+
switch (unit) {
|
|
7301
|
+
case "mm": return Math.round(value * 36e3);
|
|
7302
|
+
case "cm": return Math.round(value * 36e4);
|
|
7303
|
+
case "in": return convertInchesToEmu(value);
|
|
7304
|
+
case "pt": return convertPointsToEmu(value);
|
|
7305
|
+
case "pc":
|
|
7306
|
+
case "pi": return convertPointsToEmu(value * 12);
|
|
7307
|
+
case "px": return convertPixelsToEmu(value);
|
|
7308
|
+
}
|
|
7309
|
+
};
|
|
7310
|
+
/**
|
|
7311
|
+
* Converts a measurement value (number or UniversalMeasure) to EMU.
|
|
7312
|
+
*
|
|
7313
|
+
* Numbers are returned as-is (assumed EMU). Strings are parsed as
|
|
7314
|
+
* UniversalMeasure via {@link convertUniversalMeasureToEmu} — including the
|
|
7315
|
+
* project-only `px` unit (96 DPI). The result is always an EMU number written to
|
|
7316
|
+
* XML, so px never appears verbatim in the document.
|
|
7317
|
+
*
|
|
7318
|
+
* Useful for DrawingML fields where the XSD type is a union (e.g., ST_Coordinate).
|
|
7319
|
+
*
|
|
7320
|
+
* @param val - A numeric EMU value, or a UniversalMeasure string (incl. `${n}px`)
|
|
7321
|
+
* @returns The value in EMU
|
|
7322
|
+
*
|
|
7323
|
+
* @example
|
|
7324
|
+
* ```typescript
|
|
7325
|
+
* convertToEmu(914400); // 914400 (already EMU)
|
|
7326
|
+
* convertToEmu("1in"); // 914400
|
|
7327
|
+
* convertToEmu("2.54cm"); // 914400
|
|
7328
|
+
* convertToEmu("200px"); // 1905000 (200 * 9525)
|
|
7329
|
+
* ```
|
|
7330
|
+
*/
|
|
7331
|
+
const convertToEmu = (val) => typeof val === "string" ? convertUniversalMeasureToEmu(val) : val;
|
|
7332
|
+
/**
|
|
7333
|
+
* Converts a UniversalMeasure string to points (1pt = 1/72 inch).
|
|
7334
|
+
*
|
|
7335
|
+
* Supports units: mm, cm, in, pt, pc (picas, 1pc = 12pt), pi (alias for pc),
|
|
7336
|
+
* px (96 DPI).
|
|
7337
|
+
*/
|
|
7338
|
+
const convertUniversalMeasureToPt = (measure) => {
|
|
7339
|
+
const { value, unit } = parseUniversalMeasure(measure);
|
|
7340
|
+
switch (unit) {
|
|
7341
|
+
case "mm": return value / 25.4 * 72;
|
|
7342
|
+
case "cm": return value * 10 / 25.4 * 72;
|
|
7343
|
+
case "in": return value * 72;
|
|
7344
|
+
case "pt": return value;
|
|
7345
|
+
case "pc":
|
|
7346
|
+
case "pi": return value * 12;
|
|
7347
|
+
case "px": return value / 96 * 72;
|
|
7348
|
+
}
|
|
7349
|
+
};
|
|
7350
|
+
/**
|
|
7351
|
+
* Converts a measurement value (number or UniversalMeasure) to points.
|
|
7352
|
+
*
|
|
7353
|
+
* Numbers are returned as-is (assumed to be in points). Strings are parsed as
|
|
7354
|
+
* UniversalMeasure. Useful for SpreadsheetML fields where a number is points.
|
|
7355
|
+
*/
|
|
7356
|
+
const convertToPt = (val) => typeof val === "string" ? convertUniversalMeasureToPt(val) : val;
|
|
7357
|
+
/**
|
|
7358
|
+
* Converts a UniversalMeasure string to inches.
|
|
7359
|
+
*
|
|
7360
|
+
* Supports units: mm, cm, in, pt, pc, pi, px (96 DPI).
|
|
7361
|
+
*/
|
|
7362
|
+
const convertUniversalMeasureToInch = (measure) => {
|
|
7363
|
+
const { value, unit } = parseUniversalMeasure(measure);
|
|
7364
|
+
switch (unit) {
|
|
7365
|
+
case "mm": return value / 25.4;
|
|
7366
|
+
case "cm": return value * 10 / 25.4;
|
|
7367
|
+
case "in": return value;
|
|
7368
|
+
case "pt": return value / 72;
|
|
7369
|
+
case "pc":
|
|
7370
|
+
case "pi": return value * 12 / 72;
|
|
7371
|
+
case "px": return value / 96;
|
|
7372
|
+
}
|
|
7373
|
+
};
|
|
7374
|
+
/**
|
|
7375
|
+
* Converts a measurement value (number or UniversalMeasure) to inches.
|
|
7376
|
+
*
|
|
7377
|
+
* Numbers are returned as-is (assumed to be in inches). Useful for SpreadsheetML
|
|
7378
|
+
* page-margin fields where a number is inches.
|
|
7379
|
+
*/
|
|
7380
|
+
const convertToInch = (val) => typeof val === "string" ? convertUniversalMeasureToInch(val) : val;
|
|
7381
|
+
//#endregion
|
|
7376
7382
|
//#region src/drawingml/outline/outline-descriptors.ts
|
|
7377
7383
|
/**
|
|
7378
7384
|
* Outline descriptor for DrawingML shapes.
|
|
@@ -8692,4 +8698,4 @@ function replaceHyperlinkPlaceholders(xml, hyperlinks, offset) {
|
|
|
8692
8698
|
return replacePlaceholders(xml, map);
|
|
8693
8699
|
}
|
|
8694
8700
|
//#endregion
|
|
8695
|
-
export {
|
|
8701
|
+
export { convertUniversalMeasureToTwip as $, createGradientStop as $n, levelForMediaName as $r, createGroupLocking as $t, customGeometryDesc as A, createGlowEffect as An, SystemColor as Ar, createStyleLabel as At, convertEmuToPoints as B, LineEndType as Bn, buildContentTypeOverrides as Br, AnimateOneByOneValue as Bt, diagramStyleDesc as C, createSoftEdgeEffect as Cn, uniqueId as Cr, FontCollectionIndex as Ct, shape3DDesc as D, RectAlignment as Dn, toUint8Array as Dr, createEffectColorList as Dt, scene3DDesc as E, createPresetShadowEffect as En, isBase64DataURL as Er, createDiagramStyle as Et, shapeLockingDesc as F, LineJoin as Fn, createRgbColor as Fr, createColorsDefinitionHeaderList as Ft, convertPointsToEmu as G, createNoFill as Gn, summarizeOpcIssues as Gr, createAnimateOneByOne as Gt, convertInchesToTwip as H, createLineEnd as Hn, PART_REGISTRIES as Hr, HierBranchStyle as Ht, effectListDesc as I, PenAlignment as In, PresetColor as Ir, createLayoutDefinitionHeader as It, convertToPt as J, PresetPattern as Jn, parseArchive as Jr, createMaxChildren as Jt, convertToEmu as K, buildFill as Kn, validateOpcConsistency as Kr, createAnimationLevel as Kt, outlineDesc as L, PresetDash as Ln, createPresetColor as Lr, createLayoutDefinitionHeaderList as Lt, graphicFrameLockingDesc as M, createFillOverlayEffect as Mn, SchemeColor as Mr, createTextFillColorList as Mt, groupLockingDesc as N, CompoundLine as Nn, createSchemeColor as Nr, createTextLineColorList as Nt, groupTransform2DDesc as O, createOuterShadowEffect as On, createColorElement as Or, createFillColorList as Ot, pictureLockingDesc as P, LineCap as Pn, createScRgbColor as Pr, createColorsDefinitionHeader as Pt, convertUniversalMeasureToPt as Q, createGradientFill as Qn, createZipStream as Qr, createGraphicFrameLocking as Qt, convertEmuToInches as R, createOutline as Rn, createHslColor as Rr, createStyleDefinitionHeader as Rt, diagramRelationshipIdsDesc as S, createEffectList as Sn, hashedId as Sr, ColorMethod as St, bevelDesc as T, PresetShadowVal as Tn, uniqueUuid as Tr, StyleMatrixIndex as Tt, convertMillimetersToTwip as U, createCustomDash as Un, PPTX_PARTS as Ur, createAdjust as Ut, convertInchesToEmu as V, LineEndWidth as Vn, DOCX_PARTS as Vr, AnimationLevelValue as Vt, convertPixelsToEmu as W, createGroupFill as Wn, XLSX_PARTS as Wr, createAdjustList as Wt, convertUniversalMeasureToEmu as X, PathShadeType as Xn, ZIP_STORED_LEVEL as Xr, createPreferredChildren as Xt, convertToTwip as Y, createPatternFill as Yn, ZIP_DEFLATE_LEVEL as Yr, createOrgChart as Yt, convertUniversalMeasureToInch as Z, TileFlipMode as Zn, createPacker as Zr, createPresentationLayoutVariables as Zt, derivePasswordHash as _, createBevel as _n, xsdTextCaps as _r, systemColorDesc as _t, getMediaRefs as a, convertOutput as ai, createGroupTransform2D as an, xsdEffectContainer as ar, blipFillDesc as at, compileMapping as b, createEffectDag as bn, createSourceRectangle as br, createDiagramTextProperties as bt, hasPlaceholders as c, customPropertiesDesc as ci, createBlipFill as cn, xsdMaterialType as cr, tileDesc as ct, replaceHyperlinkPlaceholders as d, createOverride as di, createCustomGeometry as dn, xsdPenAlignment as dr, presetColorDesc as dt, strFromU8$1 as ei, createPictureLocking as en, TileAlignment as er, parseUniversalMeasure as et, replaceImagePlaceholders as f, Media as fi, stringifyPresetGeometry as fn, xsdPresetShadow as fr, rgbColorDesc as ft, replaceVideoPlaceholders as g, BevelPresetType as gn, xsdTextAnchor as gr, stringifyColorChoice as gt, replaceSmartArtPlaceholders as h, optionalRelsPart as hi, createShape3D as hn, xsdTextAlign as hr, solidFillDesc as ht, formatId as i, OoxmlMimeType as ii, parseTableStyleList as in, xsdCompoundLine as ir, blipDesc as it, presetGeometryDesc as j, BlendMode as jn, createSystemColor as jr, createTextEffectColorList as jt, transform2DDesc as k, createInnerShadowEffect as kn, createSolidFill as kr, createLineColorList as kt, replaceAllPlaceholders as l, appPropertiesDesc as li, createBlip as ln, xsdPathFillMode as lr, hslColorDesc as lt, replaceNumberingPlaceholders as m, TargetModeType as mi, PresetMaterialType as mn, xsdStrikeStyle as mr, schemeColorDesc as mt, collectPlaceholderKeys as n, zipAndConvert as ni, createTableStyle as nn, invertMap as nr, gradientFillDesc as nt, getReferencedMedia as o, decodeBase64 as oi, createTransform2D as on, xsdLineCap as or, sourceRectangleDesc as ot, replaceMediaPlaceholders as p, Relationships as pi, stringifyAdjustmentValues as pn, xsdRectAlignment as pr, scRgbColorDesc as pt, convertToInch as q, extractBlipFillMedia as qn, ParsedArchive as qr, createHierBranch as qt, findAndReplaceImagePlaceholders as r, zipSyncAndConvert as ri, createTableStyleList as rn, xsdBlendMode as rr, patternFillDesc as rt, getVideoRefs as s, encodeBase64 as si, stringifyStretch as sn, xsdLineEndSize as sr, stretchDesc as st, addSmartArtRelationships as t, unzipSync$1 as ti, createShapeLocking as tn, createTileInfo as tr, fillDesc as tt, replaceChartPlaceholders as u, createDefault as ui, createExtentionList as un, xsdPattern as ur, parseColorChoice as ut, hashPasswordAgile as v, createBottomBevel as vn, xsdUnderlineStyle as vr, createDiagramExtensionList as vt, presentationLayoutVariablesDesc as w, createReflectionEffect as wn, uniqueNumericIdCreator as wr, HueDirection as wt, diagramExtensionListDesc as x, calculateEffectExtent as xn, createBlipEffects as xr, createDiagramRelationshipIds as xt, randomBytes as y, createScene3D as yn, xsdVerticalMergeRev as yr, createDiagramShape3D as yt, convertEmuToPixels as z, LineEndLength as zn, createColorTransforms as zr, createStyleDefinitionHeaderList as zt };
|
package/dist/util/values.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ThemeColor, ThemeFont, UniversalMeasure, dateTimeValue, decimalNumber, eighthPointMeasureValue, hexBinary, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, universalMeasureValue, unsignedDecimalNumber };
|
|
@@ -12,18 +12,25 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* A measurement value with optional sign and unit suffix.
|
|
14
14
|
*
|
|
15
|
-
* Supports units: mm (millimeters), cm (centimeters), in (inches),
|
|
16
|
-
*
|
|
15
|
+
* Supports units: mm (millimeters), cm (centimeters), in (inches), pt (points),
|
|
16
|
+
* pc (picas), pi (picas), and a project-only px (96 DPI pixels).
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* px is NOT part of OOXML's ST_UniversalMeasure (whose pattern is
|
|
19
|
+
* `-?[0-9]+(\.[0-9]+)?(mm|cm|in|pt|pc|pi)`); it is a project extension so
|
|
20
|
+
* geometry APIs can accept `"200px"` alongside `"5cm"`. px is converted to EMU
|
|
21
|
+
* (or TWIP) on input and never written to XML verbatim. Note: Word line spacing
|
|
22
|
+
* with lineRule="auto" uses a bare multiple (240ths of a line), not a measure,
|
|
23
|
+
* so px is irrelevant there; spacing before/after and indents accept px and
|
|
24
|
+
* convert it to twips (1px = 15twip).
|
|
19
25
|
*
|
|
20
26
|
* @example
|
|
21
27
|
* ```typescript
|
|
22
28
|
* const measure: UniversalMeasure = "10.5mm";
|
|
29
|
+
* const px: UniversalMeasure = "200px";
|
|
23
30
|
* const negative: UniversalMeasure = "-5pt";
|
|
24
31
|
* ```
|
|
25
32
|
*/
|
|
26
|
-
type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
|
|
33
|
+
type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi" | "px"}`;
|
|
27
34
|
/**
|
|
28
35
|
* A positive measurement value with unit suffix.
|
|
29
36
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-open/core",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"description": "Shared OOXML infrastructure — XML components, validators, converters, charts, and SmartArt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"core",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@noble/hashes": "2.2.0",
|
|
68
68
|
"fflate": "0.8.3",
|
|
69
|
-
"@office-open/xml": "0.10.
|
|
69
|
+
"@office-open/xml": "0.10.5"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"dev": "basis build --stub",
|