@office-open/core 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -11
- package/dist/chart/index.d.mts +2 -2
- package/dist/chart/index.mjs +2 -2
- package/dist/{chart-ChqlyVeb.mjs → chart-CigYrDhf.mjs} +177 -32
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{drawingml-DQlhouyh.mjs → drawingml-B-2eEHAF.mjs} +2954 -2
- package/dist/{index-C4Wm3RBo.d.mts → index-Bh6s66Up.d.mts} +163 -2
- package/dist/index-Cj2Yf5mk.d.mts +52 -0
- package/dist/{index-Borh69Zs.d.mts → index-CoTp4wVf.d.mts} +1 -17
- package/dist/{index-f_Izh2dj.d.mts → index-D0N5Bw2M.d.mts} +44 -6
- package/dist/{index-C0lMGS9A.d.mts → index-DEvpdl1o.d.mts} +1610 -2
- package/dist/index.d.mts +59 -12
- package/dist/index.mjs +81 -19
- package/dist/smartart/index.d.mts +2 -2
- package/dist/smartart/index.mjs +1 -1
- package/dist/{smartart-Cx1qa6k_.mjs → smartart-9ZpWgmIy.mjs} +63 -8
- package/dist/theme/index.d.mts +2 -0
- package/dist/theme/index.mjs +2 -0
- package/dist/theme-FWD_20fH.mjs +80 -0
- package/dist/{values-zMCu5EoQ.mjs → values-BOWpTgBE.mjs} +1 -1
- package/dist/values.mjs +1 -1
- package/dist/{xml-components-xJkfJ6ff.mjs → xml-components-BuFdDxHN.mjs} +2 -33
- package/package.json +11 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { C as IXmlAttribute, S as Context, _ as AttributePayload, a as BuilderElement, b as XmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as EMPTY_OBJECT, w as IXmlableObject, x as BaseXmlComponent, y as IgnoreIfEmptyXmlComponent } from "./index-
|
|
1
|
+
import { C as IXmlAttribute, S as Context, _ as AttributePayload, a as BuilderElement, b as XmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as EMPTY_OBJECT, w as IXmlableObject, x as BaseXmlComponent, y as IgnoreIfEmptyXmlComponent } from "./index-CoTp4wVf.mjs";
|
|
2
2
|
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-COjPGYkS.mjs";
|
|
3
|
-
import { A as
|
|
4
|
-
import { $ as RectAlignment, $t as createSolidFill, A as createBevel, At as FillOptions, B as createSoftEdgeEffect, Bt as RelativeRect, C as GeometryGuide, Ct as createGroupFill, D as createShape3D, Dt as createNoFill, E as Shape3DOptions, Et as createPatternFill, F as Point3D, Ft as GradientShadeOptions, G as EffectListOptions, Gt as TileOptions, H as EffectDagOptions, Ht as createGradientFill, I as Scene3DOptions, It as GradientStop, J as createReflectionEffect, Jt as createSourceRectangle, K as createEffectList, Kt as createTileInfo, L as SphereCoords, Lt as LinearShadeOptions, M as BackdropOptions, Mt as buildFill, N as CameraOptions, Nt as extractBlipFillMedia, O as BevelOptions, Ot as BlipFillConfigOptions, P as LightRigOptions, Pt as GradientFillOptions, Q as OuterShadowEffectOptions, Qt as createColorElement, R as Vector3D, Rt as PathShadeOptions, S as PresetGeometryOptions, St as createCustomDash, T as PresetMaterialType, Tt as PresetPattern, U as createEffectDag, Ut as createGradientStop, V as EffectContainerType, Vt as TileFlipMode, W as BlurEffectOptions, Wt as TileAlignment, X as PresetShadowVal, Xt as createBlipEffects, Y as PresetShadowEffectOptions, Yt as BlipEffectsOptions, Z as createPresetShadowEffect, Zt as SolidFillOptions, _ as PathCommand, _t as LineEndOptions, a as Transform2DOptions, an as createSchemeColor, at as BlendMode, b as createCustomGeometry, bt as createLineEnd, c as Stretch, cn as RgbColorOptions, ct as CompoundLine, d as createBlipFill, dn as PresetColorOptions, dt as OutlineFillProperties, en as SystemColor, et as createOuterShadowEffect, f as BlipOptions, fn as createPresetColor, ft as OutlineOptions, g as GeomRect, gn as createColorTransforms, gt as LineEndLength, h as CustomGeometryOptions, hn as ColorTransformOptions, ht as createOutline, i as GroupTransform2DOptions, in as SchemeColorOptions, it as createGlowEffect, j as createBottomBevel, jt as GradientStopOptions, k as BevelPresetType, kt as BlipFillMediaData, l as createExtentionList, ln as createRgbColor, lt as LineCap, m as ConnectionSite, mn as createHslColor, mt as PresetDash, n as MediaTransformation, nn as createSystemColor, nt as createInnerShadowEffect, o as createGroupTransform2D, on as ScRgbColorOptions, ot as FillOverlayEffectOptions, p as createBlip, pn as HslColorOptions, pt as PenAlignment, q as ReflectionEffectOptions, qt as SourceRectangleOptions, r as createTransformation, rn as SchemeColor, rt as GlowEffectOptions, s as createTransform2D, sn as createScRgbColor, st as createFillOverlayEffect, t as MediaDataTransformation, tn as SystemColorOptions, tt as InnerShadowEffectOptions, u as BlipFillOptions, un as PresetColor, ut as LineJoin, v as PathFillMode, vt as LineEndType, w as createAdjustmentValues, wt as PatternFillOptions, x as PresetGeometry, xt as DashStop, y as PathOptions, yt as LineEndWidth, z as createScene3D, zt as PathShadeType } from "./index-C0lMGS9A.mjs";
|
|
5
|
-
import { a as Point, c as
|
|
3
|
+
import { A as DataLabelsOptions, B as TrendlineType, C as BubbleChartOptions, D as createChartType, E as ChartTypeOptions, F as ErrorBars, G as CatAx, H as View3DOptions, I as ErrorValueType, K as SerAx, L as TimeUnit, M as ErrorBarDirection, N as ErrorBarOptions, O as DataLabelPosition, P as ErrorBarType, R as Trendline, S as AxisChartType, T as ChartType, U as BubbleChart, V as View3D, W as BubbleSeriesData, _ as ChartCollection, a as Pie3DChart, b as ChartSpaceOptions, c as LineChart, d as BarChart, f as Area3DChart, g as createStrRef, h as createNumRef, i as RadarChart, j as DateAx, k as DataLabels, l as DoughnutChart, m as ChartTitle, n as StockChart, o as PieChart, p as AreaChart, q as ValAx, r as ScatterChart, s as Line3DChart, t as SurfaceChart, u as Bar3DChart, v as ChartData, w as ChartSeriesData, x as AllChartTypeOptions, y as ChartSpace, z as TrendlineOptions } from "./index-Bh6s66Up.mjs";
|
|
4
|
+
import { $ as createSp, $a as createCdrCNvGrpSpPr, $c as PresetColor, $i as createOfPieChart, $n as createWpSpPr, $o as BlipFillOptions, $r as createCustUnit, $s as LineJoin, $t as StyleDefHdrOptions, A as createGrpSp, Aa as createSplitPos, Ac as TileFlipMode, Ai as createLegacyDrawingHF, An as WpGroupOptions, Ao as createPictureLocking, Ar as createXdrSpPr, As as EffectContainerType, At as ColorListOptions, B as createLnDef, Ba as createUpDownBars, Bc as SolidFillOptions, Bi as createMax, Bn as createWpCNvGrpSpPr, Bo as TableTextStyleOptions, Br as createAutoUpdate, Bs as createPresetShadowEffect, Bt as createLinClrLst, C as createCxnSpLocks, Ca as createShowNegBubbles, Cc as GradientFillOptions, Ci as createHeaderFooter, Cn as createChPref, Co as createCdrY, Cr as createXdrNvPicPr, Cs as LightRigOptions, Ct as DiagramExtensionOptions, D as createExtraClrScheme, Da as createSize, Dc as PathShadeOptions, Di as createLayoutTarget, Dn as WpCanvasOptions, Do as ShapeLockingOptions, Dr as createXdrRow, Ds as Vector3D, Dt as createDiagramTxPr, E as createEndCxn, Ea as createSideWall, Ec as LinearShadeOptions, Ei as createInvertIfNegative, En as createPresLayoutVars, Eo as PictureLockingOptions, Er as createXdrPic, Es as SphereCoords, Et as createDiagramSp3d, F as createHlinkMouseOver, Fa as createThickness, Fc as createTileInfo, Fi as createMajorTickMark, Fn as createWpBg, Fo as TableCellStyleOptions, Fr as PageMarginsOptions, Fs as createEffectList, Ft as HueDirection, G as createNvPicPr, Ga as createX, Gc as createSystemColor, Gi as createMinorUnit, Gn as createWpExtLst, Go as MediaTransformation, Gr as createBubble3D, Gs as createInnerShadowEffect, Gt as ColorsDefHdrLstOptions, H as createNvCxnSpPr, Ha as createUserShapes, Hc as createSolidFill, Hi as createMinorGridlines, Hn as createWpCNvSpPr, Ho as createTableStyle, Hr as createBandFmt, Hs as RectAlignment, Ht as createTxEffectClrLst, I as createInsideH, Ia as createTickLblPos, Ic as SourceRectangleOptions, Ii as createMajorTimeUnit, In as createWpBodyPr, Io as TablePartStyleOptions, Ir as PageSetupOptions, Is as ReflectionEffectOptions, It as StyleMatrixIndex, J as createPic, Ja as createYMode, Jc as createSchemeColor, Ji as createMultiLvlStrRef, Jn as createWpGrpSpPr, Jo as Transform2DOptions, Jr as createChartObject, Js as BlendMode, Jt as DiagramDescriptionOptions, K as createNvSpPr, Ka as createXMode, Kc as SchemeColor, Ki as createMinus, Kn as createWpGraphicFrame, Ko as createTransformation, Kr as createBubbleScale, Ks as GlowEffectOptions, Kt as ColorsDefHdrOptions, L as createInsideV, La as createTickMarkSkip, Lc as createSourceRectangle, Li as createMajorUnit, Ln as createWpCNvCnPr, Lo as TableStyleListOptions, Lr as createApplyToEnd, Ls as createReflectionEffect, Lt as createDiagramStyle, M as createHeader, Ma as createStrLit, Mc as createGradientStop, Mi as createLogBase, Mn as WpNonVisualDrawingPropsOptions, Mo as OnOffStyleType, Mr as createXdrTo, Ms as createEffectDag, Mt as DiagramStyleLblOptions, N as createHeaders, Na as createSurface3DChart, Nc as TileAlignment, Ni as createLvl, Nn as WpShapeOptions, No as StyleMatrixReferenceOptions, Nr as createXdrTwoCellAnchor, Ns as BlurEffectOptions, Nt as DiagramStyleOptions, O as createFontElement, Oa as createSizeRepresents, Oc as PathShadeType, Oi as createLblAlgn, On as WpContentPartOptions, Oo as createGraphicFrameLocking, Or as createXdrRowOff, Os as createScene3D, Ot as DiagramRelIdsOptions, P as createHighlight, Pa as createSymbol, Pc as TileOptions, Pi as createMajorGridlines, Pn as WpTextboxOptions, Po as TableCellBorderOptions, Pr as createXdrTxBody, Ps as EffectListOptions, Pt as FontCollectionIndex, Q as createSnd, Qa as createCdrCNvGraphicFramePr, Qc as createRgbColor, Qi as createOddHeader, Qn as createWpSp, Qo as createExtentionList, Qr as createCustSplit, Qs as LineCap, Qt as StyleDefHdrLstOptions, R as createLeft, Ra as createTrendlineLbl, Rc as BlipEffectsOptions, Ri as createManualLayout, Rn as createWpCNvContentPartPr, Ro as TableStyleOptions, Rr as createApplyToFront, Rs as PresetShadowEffectOptions, Rt as createEffectClrLst, S as createCxnSp, Sa as createShowLeaderLines, Sc as extractBlipFillMedia, Si as createHMode, Sn as createChMax, So as createCdrXfrm, Sr as createXdrNvGrpSpPr, Ss as CameraOptions, St as DiagramExtLstOptions, T as createEnd, Ta as createShowVertBorder, Tc as GradientStop, Ti as createHoleSize, Tn as createOrgChart, To as GroupLockingOptions, Tr as createXdrOneCellAnchor, Ts as Scene3DOptions, Tt as createDiagramExtLst, U as createNvGraphicFramePr, Ua as createW, Uc as SystemColor, Ui as createMinorTickMark, Un as createWpCanvas, Uo as createTableStyleList, Ur as createBandFmts, Us as createOuterShadowEffect, Ut as createTxFillClrLst, V as createLnTlToBr, Va as createUserInterface, Vc as createColorElement, Vi as createMin, Vn as createWpCNvPr, Vo as ThemeableLineStyleOptions, Vr as createBackWall, Vs as OuterShadowEffectOptions, Vt as createStyleLbl, W as createNvGrpSpPr, Wa as createWMode, Wc as SystemColorOptions, Wi as createMinorTimeUnit, Wn as createWpContentPart, Wo as MediaDataTransformation, Wr as createBaseTimeUnit, Ws as InnerShadowEffectOptions, Wt as createTxLinClrLst, X as createRight, Xa as createCdrBlipFill, Xc as createScRgbColor, Xi as createNumLit, Xn as createWpNestedGrpSp, Xo as createTransform2D, Xr as createCrossBetween, Xs as createFillOverlayEffect, Xt as LayoutDefHdrLstOptions, Y as createQuickTimeFile, Ya as createCdrAbsSizeAnchor, Yc as ScRgbColorOptions, Yi as createName, Yn as createWpLinkedTxbx, Yo as createGroupTransform2D, Yr as createClrMapOvr, Ys as FillOverlayEffectOptions, Yt as DiagramNameOptions, Z as createRound, Za as createCdrCNvCxnSpPr, Zc as RgbColorOptions, Zi as createOddFooter, Zn as createWpNvContentPartPr, Zo as Stretch, Zr as createCrossesAt, Zs as CompoundLine, Zt as LayoutDefHdrOptions, _ as createChart, _a as createSerLines, _c as BlipFillConfigOptions, _i as createFmtId, _n as PresLayoutVarsOptions, _o as createCdrSpPr, _r as createXdrCxnSp, _s as BevelOptions, _t as createUFillTx, a as createBottom, aa as createPictureOptions, ac as LineEndLength, ai as createDispUnits, al as createColorTransforms, an as createStyleDefHdrLst, ao as createCdrFrom, ar as XdrMarkerOptions, as as GeomRect, at as createSym, b as createCustClr, ba as createShowHorzBorder, bc as GradientStopOptions, bi as createGapWidth, bn as createAnimLvl, bo as createCdrTxBody, br as createXdrGrpSpPr, bs as createBottomBevel, bt as createUseSpRect, c as createBuClrTx, ca as createPivotFmts, cc as LineEndWidth, ci as createEvenFooter, cn as AnimLevelValue, co as createCdrGrpSpPr, cr as createXdrBlipFill, cs as PathOptions, ct as createTableStyleElement, d as createBuSzTx, da as createPlus, dc as createCustomDash, di as createExt, dn as AnimOneValue, do as createCdrNvGrpSpPr, dr as createXdrCNvPicPr, ds as PresetGeometryOptions, dt as createTl2br, ea as createOfPieType, ec as OutlineFillProperties, ei as createDLbl, el as PresetColorOptions, en as createColorsDefHdr, eo as createCdrCNvPicPr, er as createWpStyle, es as createBlipFill, et as createSpDef, f as createCNvCxnSpPr, fa as createPrintSettings, fc as createGroupFill, fi as createExtLst, fn as ChMaxOptions, fo as createCdrNvPicPr, fr as createXdrCNvPr, fs as GeometryGuide, ft as createTop, g as createCell3D, ga as createSelection, gc as createNoFill, gi as createFloor, gn as OrgChartOptions, go as createCdrSp, gr as createXdrContentPart, gs as createShape3D, gt as createUFill, h as createCNvSpPr, ha as createSecondPieSize, hc as createPatternFill, hi as createFirstHeader, hn as HierBranchStyle, ho as createCdrRelSizeAnchor, hr as createXdrColOff, hs as Shape3DOptions, ht as createTxSp, i as createBldDgm, ia as createPictureFormat, ic as createOutline, ii as createDispBlanksAs, il as ColorTransformOptions, in as createStyleDefHdr, io as createCdrExt, ir as createWpXfrm, is as CustomGeometryOptions, it as createStyleElement, j as createGrpSpPr, ja as createSplitType, jc as createGradientFill, ji as createLegendEntry, jn as WpLinkedTextboxOptions, jo as createShapeLocking, jr as createXdrStyle, js as EffectDagOptions, jt as ColorMethod, k as createGraphicFrame, ka as createSmooth, kc as RelativeRect, ki as createLeaderLines, kn as WpGraphicFrameOptions, ko as createGroupLocking, kr as createXdrSp, ks as createSoftEdgeEffect, kt as createDiagramRelIds, l as createBuFontTx, la as createPivotSource, lc as createLineEnd, li as createEvenHeader, ln as AnimLvlOptions, lo as createCdrNvCxnSpPr, lr as createXdrCNvCxnSpPr, ls as createCustomGeometry, lt as createThemeManager, m as createCNvGrpSpPr, ma as createSecondPiePt, mc as PresetPattern, mi as createFirstFooter, mn as HierBranchOptions, mo as createCdrPic, mr as createXdrCol, ms as PresetMaterialType, mt as createTxDef, n as createBevelElement, na as createPageMargins, nc as PenAlignment, ni as createDTable, nl as HslColorOptions, nn as createLayoutDefHdr, no as createCdrCNvSpPr, nr as createWpTxbxContent, ns as createBlip, nt as createStCxn, o as createBr, oa as createPictureStackUnit, oc as LineEndOptions, oi as createDispUnitsLbl, on as AdjLstOptions, oo as createCdrGraphicFrame, or as XdrShapeAttributes, os as PathCommand, ot as createTab, p as createCNvGraphicFramePr, pa as createProtection, pc as PatternFillOptions, pi as createExternalData, pn as ChPrefOptions, po as createCdrNvSpPr, pr as createXdrCNvSpPr, ps as createAdjustmentValues, pt as createTr2bl, q as createOverrideClrMapping, qa as createY, qc as SchemeColorOptions, qi as createMultiLvlStrCache, qn as createWpGrpSp, qo as GroupTransform2DOptions, qr as createBuiltInUnit, qs as createGlowEffect, qt as DiagramCategoryOptions, r as createBldChart, ra as createPageSetup, rc as PresetDash, ri as createData, rl as createHslColor, rn as createLayoutDefHdrLst, ro as createCdrCxnSp, rr as createWpWhole, rs as ConnectionSite, rt as createStart, s as createBuBlip, sa as createPivotFmt, sc as LineEndType, si as createDownBars, sn as AdjOptions, so as createCdrGrpSp, sr as XdrTwoCellAnchorOptions, ss as PathFillMode, st as createTabLst, t as createAudioCd, ta as createOverlap, tc as OutlineOptions, ti as createDPt, tl as createPresetColor, tn as createColorsDefHdrLst, to as createCdrCNvPr, tr as createWpTxbx, ts as BlipOptions, tt as createSt, u as createBuSzPts, ua as createPlotVisOnly, uc as DashStop, ui as createExplosion, un as AnimOneOptions, uo as createCdrNvGraphicFramePr, ur as createXdrCNvGrpSpPr, us as PresetGeometry, ut as createThemeOverride, v as createClrMap, va as createShape, vc as BlipFillMediaData, vi as createFormatting, vn as createAdj, vo as createCdrStyle, vr as createXdrFrom, vs as BevelPresetType, vt as createULn, w as createDgm, wa as createShowOutline, wc as GradientShadeOptions, wi as createHiLowLines, wn as createHierBranch, wo as GraphicFrameLockingOptions, wr as createXdrNvSpPr, ws as Point3D, wt as DiagramTextPropsOptions, x as createCustClrLst, xa as createShowKeys, xc as buildFill, xi as createH, xn as createAnimOne, xo as createCdrX, xr as createXdrNvCxnSpPr, xs as BackdropOptions, xt as createWavAudioFile, y as createCpLocks, ya as createShowDLblsOverMax, yc as FillOptions, yi as createGapDepth, yn as createAdjLst, yo as createCdrTo, yr as createXdrGrpSp, ys as createBevel, yt as createULnTx, z as createLnBlToTr, za as createUpBars, zc as createBlipEffects, zi as createMarker, zn as createWpCNvFrPr, zo as TableStyleRegion, zr as createApplyToSides, zs as PresetShadowVal, zt as createFillClrLst } from "./index-DEvpdl1o.mjs";
|
|
5
|
+
import { a as Point, c as DataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as Connection, m as COLOR_CATEGORIES, n as createDataModel, o as PointPropertySetOptions, p as getStyleXml, r as SmartArtCollection, s as TransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "./index-D0N5Bw2M.mjs";
|
|
6
6
|
import { _ as PPTX_NS, a as getFirstLevelElements, c as TokenNotFoundError, d as createTraverser, f as RenderedParagraphNode, g as DOCX_NS, h as createReplacer, i as createTextElementContents, l as createSplitInject, m as ReplacerConfig, n as getNextRelationshipIndex, o as patchSpaceAttribute, p as createRunRenderer, r as appendContentType, s as toJson, t as appendRelationship, u as createTokenReplacer, v as XmlNamespaceConfig } from "./index-BCUfgp9A.mjs";
|
|
7
|
+
import { a as FontSchemeOptions, i as ColorSchemeOptions, n as buildThemeXml, o as ThemeOptions, r as DefaultTheme, t as DEFAULT_COLORS } from "./index-Cj2Yf5mk.mjs";
|
|
7
8
|
import { Element } from "@office-open/xml";
|
|
8
9
|
import { ZipOptions, Zippable, Zippable as Zippable$1, strFromU8, unzipSync } from "fflate";
|
|
9
10
|
import { DataType, toUint8Array } from "undio";
|
|
@@ -47,6 +48,24 @@ declare const convertPointsToEmu: (points: number) => number;
|
|
|
47
48
|
* Converts EMU to points.
|
|
48
49
|
*/
|
|
49
50
|
declare const convertEmuToPoints: (emus: number) => number;
|
|
51
|
+
/** A rectangular position in pixels. */
|
|
52
|
+
interface PixelPosition {
|
|
53
|
+
readonly x: number;
|
|
54
|
+
readonly y: number;
|
|
55
|
+
readonly width: number;
|
|
56
|
+
readonly height: number;
|
|
57
|
+
}
|
|
58
|
+
/** An EMU-based rectangular position. */
|
|
59
|
+
interface EmuPosition {
|
|
60
|
+
readonly x: number;
|
|
61
|
+
readonly y: number;
|
|
62
|
+
readonly cx: number;
|
|
63
|
+
readonly cy: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Converts a pixel-based position to EMU coordinates.
|
|
67
|
+
*/
|
|
68
|
+
declare const convertPositionToEmu: (pos: PixelPosition) => EmuPosition;
|
|
50
69
|
//#endregion
|
|
51
70
|
//#region src/id-generators.d.ts
|
|
52
71
|
/**
|
|
@@ -206,7 +225,7 @@ declare class AppProperties extends ImportedXmlComponent {
|
|
|
206
225
|
}
|
|
207
226
|
//#endregion
|
|
208
227
|
//#region src/opc/relationships.d.ts
|
|
209
|
-
type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramLayout" | "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | "http://schemas.microsoft.com/office/2007/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/bibliography" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" | "http://schemas.microsoft.com/office/2007/relationships/media" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords";
|
|
228
|
+
type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramLayout" | "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | "http://schemas.microsoft.com/office/2007/relationships/diagramColors" | "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/bibliography" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideSyncProperties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" | "http://schemas.microsoft.com/office/2007/relationships/media" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath";
|
|
210
229
|
declare const TargetModeType: {
|
|
211
230
|
readonly EXTERNAL: "External";
|
|
212
231
|
};
|
|
@@ -242,13 +261,9 @@ declare const createOverride: (contentType: string, partName?: string) => XmlCom
|
|
|
242
261
|
//#endregion
|
|
243
262
|
//#region src/formatter.d.ts
|
|
244
263
|
/**
|
|
245
|
-
* Converts an XmlComponent tree into
|
|
264
|
+
* Converts an XmlComponent tree into an XML string via the toXml() fast path.
|
|
246
265
|
*/
|
|
247
266
|
declare class Formatter {
|
|
248
|
-
/**
|
|
249
|
-
* @deprecated Use `component.toXml(context)` or `formatToXml()` instead.
|
|
250
|
-
*/
|
|
251
|
-
format<T extends Context = Context>(input: BaseXmlComponent, context?: T): Record<string, any>;
|
|
252
267
|
/**
|
|
253
268
|
* Serialize a component directly to XML string via the toXml() fast path.
|
|
254
269
|
* Always includes XML declaration.
|
|
@@ -348,7 +363,7 @@ declare function elementToCompact(el: Element): IXmlableObject;
|
|
|
348
363
|
declare class RawPassthrough extends BaseXmlComponent {
|
|
349
364
|
private readonly element;
|
|
350
365
|
constructor(element: Element);
|
|
351
|
-
|
|
366
|
+
toXml(_context: Context): string;
|
|
352
367
|
}
|
|
353
368
|
//#endregion
|
|
354
369
|
//#region src/placeholder.d.ts
|
|
@@ -508,4 +523,36 @@ declare function compileMapping(mapping: Record<string, {
|
|
|
508
523
|
path: string;
|
|
509
524
|
}[], mediaLevel?: number): Zippable;
|
|
510
525
|
//#endregion
|
|
511
|
-
|
|
526
|
+
//#region src/crypto.d.ts
|
|
527
|
+
/**
|
|
528
|
+
* Password hashing utilities for OOXML document protection.
|
|
529
|
+
*
|
|
530
|
+
* Implements ECMA-376 Agile Encryption password derivation.
|
|
531
|
+
* Passwords are encoded as UTF-16LE per the OOXML specification.
|
|
532
|
+
*
|
|
533
|
+
* @module
|
|
534
|
+
*/
|
|
535
|
+
/**
|
|
536
|
+
* Generates cryptographically secure random bytes.
|
|
537
|
+
*/
|
|
538
|
+
declare function randomBytes(length: number): Uint8Array;
|
|
539
|
+
/**
|
|
540
|
+
* Computes the ECMA-376 Agile Encryption hash for a password.
|
|
541
|
+
*
|
|
542
|
+
* Algorithm: SHA-512(salt + UTF-16LE(password)), then iterate SHA-512(hash + i.toUint32LE()) spinCount times.
|
|
543
|
+
*/
|
|
544
|
+
declare function hashPasswordAgile(password: string, salt: Uint8Array, spinCount: number): string;
|
|
545
|
+
/**
|
|
546
|
+
* Derives a password hash for OOXML document protection.
|
|
547
|
+
*
|
|
548
|
+
* Returns base64-encoded hashValue, saltValue, spinCount, and algorithmName
|
|
549
|
+
* suitable for direct use in document protection options.
|
|
550
|
+
*/
|
|
551
|
+
declare function derivePasswordHash(password: string, spinCount?: number): {
|
|
552
|
+
hashValue: string;
|
|
553
|
+
saltValue: string;
|
|
554
|
+
spinCount: number;
|
|
555
|
+
algorithmName: string;
|
|
556
|
+
};
|
|
557
|
+
//#endregion
|
|
558
|
+
export { type AdjLstOptions, type AdjOptions, AllChartTypeOptions, AnimLevelValue, type AnimLvlOptions, type AnimOneOptions, AnimOneValue, AppProperties, Area3DChart, AreaChart, AttributePayload, AxisChartType, type BackdropOptions, Bar3DChart, BarChart, BaseXmlComponent, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, BubbleChart, BubbleChartOptions, type BubbleSeriesData, BuilderElement, COLOR_CATEGORIES, type CameraOptions, CatAx, type ChMaxOptions, type ChPrefOptions, ChartCollection, ChartData, ChartSeriesData, ChartSpace, ChartSpaceOptions, ChartTitle, ChartType, ChartTypeOptions, type ColorListOptions, ColorMethod, type ColorSchemeOptions, type ColorTransformOptions, type ColorsDefHdrLstOptions, type ColorsDefHdrOptions, CompileFn, CompoundLine, CompressionOptions, Connection, type ConnectionSite, Context, CoreProperties, type CustomGeometryOptions, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, type DashStop, DataLabelPosition, DataLabels, DataLabelsOptions, DataModel, type DataType, DateAx, type DefaultAttributes, DefaultTheme, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtLstOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelIdsOptions, type DiagramStyleLblOptions, type DiagramStyleOptions, type DiagramTextPropsOptions, DoughnutChart, EMPTY_OBJECT, type EffectContainerType, type EffectDagOptions, type EffectListOptions, EmptyElement, EmuPosition, ErrorBarDirection, ErrorBarOptions, ErrorBarType, ErrorBars, ErrorValueType, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type FontSchemeOptions, Formatter, 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, IXmlAttribute, IXmlableObject, IdFormat, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, type InnerShadowEffectOptions, LAYOUT_CATEGORIES, type LayoutDefHdrLstOptions, type LayoutDefHdrOptions, type LightRigOptions, Line3DChart, LineCap, LineChart, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MediaDataTransformation, type MediaTransformation, type OnOffStyleType, OoxmlMimeType, type OrgChartOptions, type OuterShadowEffectOptions, type OutlineFillProperties, type OutlineOptions, OutputByType, OutputType, type OverrideAttributes, PPTX_NS, Packer, PackerOptions, type PageMarginsOptions, type PageSetupOptions, ParsedArchive, type PathCommand, type PathFillMode, type PathOptions, type PathShadeOptions, PathShadeType, type PatternFillOptions, PenAlignment, Percentage, type PictureLockingOptions, Pie3DChart, PieChart, PixelPosition, Point, type Point3D, PointPropertySetOptions, PositivePercentage, PositiveUniversalMeasure, type PresLayoutVarsOptions, PresetColor, type PresetColorOptions, PresetDash, PresetGeometry, type PresetGeometryOptions, PresetMaterialType, PresetPattern, type PresetShadowEffectOptions, PresetShadowVal, RadarChart, RawPassthrough, RectAlignment, type ReflectionEffectOptions, type RelationshipType, Relationships, RelativeMeasure, type RelativeRect, type RenderedParagraphNode, type ReplacerConfig, type RgbColorOptions, STYLE_CATEGORIES, type ScRgbColorOptions, ScatterChart, type Scene3DOptions, SchemeColor, type SchemeColorOptions, SerAx, type Shape3DOptions, type ShapeLockingOptions, SmartArtCollection, SmartArtData, SmartArtRelOptions, type SolidFillOptions, type SourceRectangleOptions, type SphereCoords, StockChart, Stretch, type StyleDefHdrLstOptions, type StyleDefHdrOptions, StyleMatrixIndex, type StyleMatrixReferenceOptions, SurfaceChart, 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, TokenNotFoundError, TransPoint, type Transform2DOptions, TreeNode, Trendline, TrendlineOptions, TrendlineType, UniqueNumericIdCreator, UniversalMeasure, ValAx, type Vector3D, View3D, View3DOptions, type WpCanvasOptions, type WpContentPartOptions, type WpGraphicFrameOptions, type WpGroupOptions, type WpLinkedTextboxOptions, type WpNonVisualDrawingPropsOptions, type WpShapeOptions, type WpTextboxOptions, type XdrMarkerOptions, type XdrShapeAttributes, type XdrTwoCellAnchorOptions, XmlComponent, type XmlNamespaceConfig, XmlifyedFile, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, type ZipOptions, type Zippable, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildAttrObject, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, chartAttr, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPositionToEmu, convertToXmlComponent, createAdj, createAdjLst, createAdjustmentValues, createAnimLvl, createAnimOne, createApplyToEnd, createApplyToFront, createApplyToSides, createAudioCd, createAutoUpdate, createBackWall, createBandFmt, createBandFmts, createBaseTimeUnit, createBevel, createBevelElement, createBldChart, createBldDgm, createBlip, createBlipEffects, createBlipFill, createBottom, createBottomBevel, createBr, createBuBlip, createBuClrTx, createBuFontTx, createBuSzPts, createBuSzTx, createBubble3D, createBubbleScale, createBuiltInUnit, createCNvCxnSpPr, createCNvGraphicFramePr, createCNvGrpSpPr, createCNvSpPr, createCdrAbsSizeAnchor, createCdrBlipFill, createCdrCNvCxnSpPr, createCdrCNvGraphicFramePr, createCdrCNvGrpSpPr, createCdrCNvPicPr, createCdrCNvPr, createCdrCNvSpPr, createCdrCxnSp, createCdrExt, createCdrFrom, createCdrGraphicFrame, createCdrGrpSp, createCdrGrpSpPr, createCdrNvCxnSpPr, createCdrNvGraphicFramePr, createCdrNvGrpSpPr, createCdrNvPicPr, createCdrNvSpPr, createCdrPic, createCdrRelSizeAnchor, createCdrSp, createCdrSpPr, createCdrStyle, createCdrTo, createCdrTxBody, createCdrX, createCdrXfrm, createCdrY, createCell3D, createChMax, createChPref, createChart, createChartObject, createChartType, createClrMap, createClrMapOvr, createColorElement, createColorTransforms, createColorsDefHdr, createColorsDefHdrLst, createCpLocks, createCrossBetween, createCrossesAt, createCustClr, createCustClrLst, createCustSplit, createCustUnit, createCustomDash, createCustomGeometry, createCxnSp, createCxnSpLocks, createDLbl, createDPt, createDTable, createData, createDataModel, createDefault, createDgm, createDiagramExtLst, createDiagramRelIds, createDiagramSp3d, createDiagramStyle, createDiagramTxPr, createDispBlanksAs, createDispUnits, createDispUnitsLbl, createDownBars, createEffectClrLst, createEffectDag, createEffectList, createEnd, createEndCxn, createEvenFooter, createEvenHeader, createExplosion, createExt, createExtLst, createExtentionList, createExternalData, createExtraClrScheme, createFillClrLst, createFillOverlayEffect, createFirstFooter, createFirstHeader, createFloor, createFmtId, createFontElement, createFormatting, createGapDepth, createGapWidth, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrame, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createGrpSp, createGrpSpPr, createH, createHMode, createHeader, createHeaderFooter, createHeaders, createHiLowLines, createHierBranch, createHighlight, createHlinkMouseOver, createHoleSize, createHslColor, createInnerShadowEffect, createInsideH, createInsideV, createInvertIfNegative, createLayoutDefHdr, createLayoutDefHdrLst, createLayoutTarget, createLblAlgn, createLeaderLines, createLeft, createLegacyDrawingHF, createLegendEntry, createLinClrLst, createLineEnd, createLnBlToTr, createLnDef, createLnTlToBr, createLogBase, createLvl, createMajorGridlines, createMajorTickMark, createMajorTimeUnit, createMajorUnit, createManualLayout, createMarker, createMax, createMin, createMinorGridlines, createMinorTickMark, createMinorTimeUnit, createMinorUnit, createMinus, createMultiLvlStrCache, createMultiLvlStrRef, createName, createNoFill, createNumLit, createNumRef, createNvCxnSpPr, createNvGraphicFramePr, createNvGrpSpPr, createNvPicPr, createNvSpPr, createOddFooter, createOddHeader, createOfPieChart, createOfPieType, createOrgChart, createOuterShadowEffect, createOutline, createOverlap, createOverride, createOverrideClrMapping, createPacker, createPageMargins, createPageSetup, createPatternFill, createPic, createPictureFormat, createPictureLocking, createPictureOptions, createPictureStackUnit, createPivotFmt, createPivotFmts, createPivotSource, createPlotVisOnly, createPlus, createPresLayoutVars, createPresetColor, createPresetShadowEffect, createPrintSettings, createProtection, createQuickTimeFile, createReflectionEffect, createReplacer, createRgbColor, createRight, createRound, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createSecondPiePt, createSecondPieSize, createSelection, createSerLines, createShape, createShape3D, createShapeLocking, createShowDLblsOverMax, createShowHorzBorder, createShowKeys, createShowLeaderLines, createShowNegBubbles, createShowOutline, createShowVertBorder, createSideWall, createSize, createSizeRepresents, createSmooth, createSnd, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSp, createSpDef, createSplitInject, createSplitPos, createSplitType, createSt, createStCxn, createStart, createStrLit, createStrRef, createStyleDefHdr, createStyleDefHdrLst, createStyleElement, createStyleLbl, createSurface3DChart, createSym, createSymbol, createSystemColor, createTab, createTabLst, createTableStyle, createTableStyleElement, createTableStyleList, createTextElementContents, createThemeManager, createThemeOverride, createThickness, createTickLblPos, createTickMarkSkip, createTileInfo, createTl2br, createTokenReplacer, createTop, createTr2bl, createTransform2D, createTransformation, createTraverser, createTrendlineLbl, createTxDef, createTxEffectClrLst, createTxFillClrLst, createTxLinClrLst, createTxSp, createUFill, createUFillTx, createULn, createULnTx, createUpBars, createUpDownBars, createUseSpRect, createUserInterface, createUserShapes, createW, createWMode, createWavAudioFile, createWpBg, createWpBodyPr, createWpCNvCnPr, createWpCNvContentPartPr, createWpCNvFrPr, createWpCNvGrpSpPr, createWpCNvPr, createWpCNvSpPr, createWpCanvas, createWpContentPart, createWpExtLst, createWpGraphicFrame, createWpGrpSp, createWpGrpSpPr, createWpLinkedTxbx, createWpNestedGrpSp, createWpNvContentPartPr, createWpSp, createWpSpPr, createWpStyle, createWpTxbx, createWpTxbxContent, createWpWhole, createWpXfrm, createX, createXMode, createXdrBlipFill, createXdrCNvCxnSpPr, createXdrCNvGrpSpPr, createXdrCNvPicPr, createXdrCNvPr, createXdrCNvSpPr, createXdrCol, createXdrColOff, createXdrContentPart, createXdrCxnSp, createXdrFrom, createXdrGrpSp, createXdrGrpSpPr, createXdrNvCxnSpPr, createXdrNvGrpSpPr, createXdrNvPicPr, createXdrNvSpPr, createXdrOneCellAnchor, createXdrPic, createXdrRow, createXdrRowOff, createXdrSp, createXdrSpPr, createXdrStyle, createXdrTo, createXdrTwoCellAnchor, createXdrTxBody, createY, createYMode, createZipStream, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, elementToCompact, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, 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,10 +1,12 @@
|
|
|
1
|
-
import { _ as EMPTY_OBJECT, a as BuilderElement, b as BaseXmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as IgnoreIfEmptyXmlComponent, y as XmlComponent } from "./xml-components-
|
|
2
|
-
import { _ 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-
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-
|
|
5
|
-
import { C as ValAx, S as
|
|
1
|
+
import { _ as EMPTY_OBJECT, a as BuilderElement, b as BaseXmlComponent, c as buildAttrObject, d as numberValObj, f as onOffObj, g as wrapEl, h as stringValObj, i as convertToXmlComponent, l as chartAttr, m as stringEnumValObj, n as ImportedRootElementAttributes, o as EmptyElement, p as stringContainerObj, r as ImportedXmlComponent, s as attrObj, t as InitializableXmlComponent, u as hpsMeasureObj, v as IgnoreIfEmptyXmlComponent, y as XmlComponent } from "./xml-components-BuFdDxHN.mjs";
|
|
2
|
+
import { _ as twipsMeasureValue, a as eighthPointMeasureValue, b as unsignedDecimalNumber, c as hpsMeasureValue, d as percentageValue, f as pointMeasureValue, g as signedTwipsMeasureValue, h as signedHpsMeasureValue, i as decimalNumber, l as longHexNumber, m as shortHexNumber, n as ThemeFont, o as hexBinary, p as positiveUniversalMeasureValue, r as dateTimeValue, s as hexColorValue, t as ThemeColor, u as measurementOrPercentValue, v as uCharHexNumber, y as universalMeasureValue } from "./values-BOWpTgBE.mjs";
|
|
3
|
+
import { $ as createSp, $a as PresetGeometry, $i as createTickMarkSkip, $n as createApplyToEnd, $o as xsdRectAlignment, $r as createMajorUnit, $t as createHierBranch, A as createGrpSp, Aa as createCdrPic, Ai as createSecondPiePt, An as createXdrCNvPr, Ao as createGroupFill, Ar as createFirstFooter, As as convertMillimetersToTwip, At as createDiagramStyle, B as createLnDef, Ba as createGraphicFrameLocking, Bi as createShowOutline, Bn as createXdrNvGrpSpPr, Bo as TileAlignment, Br as createHiLowLines, Bt as createLayoutDefHdr, C as createCxnSpLocks, Ca as createCdrGrpSp, Ci as createPivotFmt, Cn as createWpTxbxContent, Co as PresetDash, Cr as createDownBars, Cs as uniqueNumericIdCreator, Ct as createDiagramSp3d, D as createExtraClrScheme, Da as createCdrNvGrpSpPr, Di as createPlus, Dn as createXdrCNvCxnSpPr, Do as LineEndWidth, Dr as createExt, Ds as convertEmuToPoints, Dt as FontCollectionIndex, E as createEndCxn, Ea as createCdrNvGraphicFramePr, Ei as createPlotVisOnly, En as createXdrBlipFill, Eo as LineEndType, Er as createExplosion, Es as convertEmuToPixels, Et as ColorMethod, F as createHlinkMouseOver, Fa as createCdrTo, Fi as createShowDLblsOverMax, Fn as createXdrCxnSp, Fo as createPatternFill, Fr as createGapDepth, Ft as createTxEffectClrLst, G as createNvPicPr, Ga as createTableStyleList, Gi as createSmooth, Gn as createXdrRow, Go as xsdEffectContainer, Gr as createLeaderLines, Gt as AnimOneValue, H as createNvCxnSpPr, Ha as createPictureLocking, Hi as createSideWall, Hn as createXdrNvSpPr, Ho as invertMap, Hr as createInvertIfNegative, Ht as createStyleDefHdr, I as createInsideH, Ia as createCdrTxBody, Ii as createShowHorzBorder, In as createXdrFrom, Io as PathShadeType, Ir as createGapWidth, It as createTxFillClrLst, J as createPic, Ja as createTransform2D, Ji as createStrLit, Jn as createXdrSpPr, Jo as xsdMaterialType, Jr as createLogBase, Jt as createAdjLst, K as createNvSpPr, Ka as createTransformation, Ki as createSplitPos, Kn as createXdrRowOff, Ko as xsdLineCap, Kr as createLegacyDrawingHF, Kt as HierBranchStyle, L as createInsideV, La as createCdrX, Li as createShowKeys, Ln as createXdrGrpSp, Lo as TileFlipMode, Lr as createH, Lt as createTxLinClrLst, M as createHeader, Ma as createCdrSp, Mi as createSelection, Mn as createXdrCol, Mo as buildFill, Mr as createFloor, Ms as convertPointsToEmu, Mt as createFillClrLst, N as createHeaders, Na as createCdrSpPr, Ni as createSerLines, Nn as createXdrColOff, No as extractBlipFillMedia, Nr as createFmtId, Ns as convertPositionToEmu, Nt as createLinClrLst, O as createFontElement, Oa as createCdrNvPicPr, Oi as createPrintSettings, On as createXdrCNvGrpSpPr, Oo as createLineEnd, Or as createExtLst, Os as convertInchesToEmu, Ot as HueDirection, P as createHighlight, Pa as createCdrStyle, Pi as createShape, Pn as createXdrContentPart, Po as PresetPattern, Pr as createFormatting, Pt as createStyleLbl, Q as createSnd, Qa as createCustomGeometry, Qi as createTickLblPos, Qn as createXdrTxBody, Qo as xsdPresetShadow, Qr as createMajorTimeUnit, Qt as createChPref, R as createLeft, Ra as createCdrXfrm, Ri as createShowLeaderLines, Rn as createXdrGrpSpPr, Ro as createGradientFill, Rr as createHMode, Rt as createColorsDefHdr, S as createCxnSp, Sa as createCdrGraphicFrame, Si as createPictureStackUnit, Sn as createWpTxbx, So as PenAlignment, Sr as createDispUnitsLbl, Ss as uniqueId, St as createDiagramExtLst, T as createEnd, Ta as createCdrNvCxnSpPr, Ti as createPivotSource, Tn as createWpXfrm, To as LineEndLength, Tr as createEvenHeader, Ts as convertEmuToInches, Tt as createDiagramRelIds, U as createNvGraphicFramePr, Ua as createShapeLocking, Ui as createSize, Un as createXdrOneCellAnchor, Uo as xsdBlendMode, Ur as createLayoutTarget, Ut as createStyleDefHdrLst, V as createLnTlToBr, Va as createGroupLocking, Vi as createShowVertBorder, Vn as createXdrNvPicPr, Vo as createTileInfo, Vr as createHoleSize, Vt as createLayoutDefHdrLst, W as createNvGrpSpPr, Wa as createTableStyle, Wi as createSizeRepresents, Wn as createXdrPic, Wo as xsdCompoundLine, Wr as createLblAlgn, Wt as AnimLevelValue, X as createRight, Xa as createBlip, Xi as createSymbol, Xn as createXdrTo, Xo as xsdPattern, Xr as createMajorGridlines, Xt as createAnimOne, Y as createQuickTimeFile, Ya as createBlipFill, Yi as createSurface3DChart, Yn as createXdrStyle, Yo as xsdPathFillMode, Yr as createLvl, Yt as createAnimLvl, Z as createRound, Za as createExtentionList, Zi as createThickness, Zn as createXdrTwoCellAnchor, Zo as xsdPenAlignment, Zr as createMajorTickMark, Zt as createChMax, _ as createChart, _a as createCdrCNvPr, _i as createOverlap, _n as createWpNestedGrpSp, _o as BlendMode, _r as createDPt, _s as PresetColor, _t as createUFillTx, a as createBottom, aa as createW, ai as createMinorTickMark, an as createWpCNvContentPartPr, ao as createBottomBevel, ar as createBandFmts, as as xsdVerticalMergeRev, at as createSym, b as createCustClr, ba as createCdrExt, bi as createPictureFormat, bn as createWpSpPr, bo as LineCap, br as createDispBlanksAs, bs as createColorTransforms, bt as createUseSpRect, c as createBuClrTx, ca as createXMode, ci as createMinus, cn as createWpCNvPr, co as createEffectList, cr as createBubbleScale, cs as createBlipEffects, ct as createTableStyleElement, d as createBuSzTx, da as createCdrAbsSizeAnchor, di as createName, dn as createWpContentPart, do as PresetShadowVal, dr as createClrMapOvr, ds as SystemColor, dt as createTl2br, ea as createTrendlineLbl, ei as createManualLayout, en as createOrgChart, eo as createAdjustmentValues, er as createApplyToFront, es as xsdStrikeStyle, et as createSpDef, f as createCNvCxnSpPr, fa as createCdrBlipFill, fi as createNumLit, fn as createWpExtLst, fo as createPresetShadowEffect, fr as createCrossBetween, fs as createSystemColor, ft as createTop, g as createCell3D, ga as createCdrCNvPicPr, gi as createOfPieType, gn as createWpLinkedTxbx, go as createGlowEffect, gr as createDLbl, gs as createRgbColor, gt as createUFill, h as createCNvSpPr, ha as createCdrCNvGrpSpPr, hi as createOfPieChart, hn as createWpGrpSpPr, ho as createInnerShadowEffect, hr as createCustUnit, hs as createScRgbColor, ht as createTxSp, i as createBldDgm, ia as createUserShapes, ii as createMinorGridlines, in as createWpCNvCnPr, io as createBevel, ir as createBandFmt, is as xsdUnderlineStyle, it as createStyleElement, j as createGrpSpPr, ja as createCdrRelSizeAnchor, ji as createSecondPieSize, jn as createXdrCNvSpPr, jo as createNoFill, jr as createFirstHeader, js as convertPixelsToEmu, jt as createEffectClrLst, k as createGraphicFrame, ka as createCdrNvSpPr, ki as createProtection, kn as createXdrCNvPicPr, ko as createCustomDash, kr as createExternalData, ks as convertInchesToTwip, kt as StyleMatrixIndex, l as createBuFontTx, la as createY, li as createMultiLvlStrCache, ln as createWpCNvSpPr, lo as createSoftEdgeEffect, lr as createBuiltInUnit, ls as createColorElement, lt as createThemeManager, m as createCNvGrpSpPr, ma as createCdrCNvGraphicFramePr, mi as createOddHeader, mn as createWpGrpSp, mo as createOuterShadowEffect, mr as createCustSplit, ms as createSchemeColor, mt as createTxDef, n as createBevelElement, na as createUpDownBars, ni as createMax, nn as createWpBg, no as createShape3D, nr as createAutoUpdate, ns as xsdTextAnchor, nt as createStCxn, o as createBr, oa as createWMode, oi as createMinorTimeUnit, on as createWpCNvFrPr, oo as createScene3D, or as createBaseTimeUnit, os as Stretch, ot as createTab, p as createCNvGraphicFramePr, pa as createCdrCNvCxnSpPr, pi as createOddFooter, pn as createWpGraphicFrame, po as RectAlignment, pr as createCrossesAt, ps as SchemeColor, pt as createTr2bl, q as createOverrideClrMapping, qa as createGroupTransform2D, qi as createSplitType, qn as createXdrSp, qo as xsdLineEndSize, qr as createLegendEntry, qt as createAdj, r as createBldChart, ra as createUserInterface, ri as createMin, rn as createWpBodyPr, ro as BevelPresetType, rr as createBackWall, rs as xsdTextCaps, rt as createStart, s as createBuBlip, sa as createX, si as createMinorUnit, sn as createWpCNvGrpSpPr, so as createEffectDag, sr as createBubble3D, ss as createSourceRectangle, st as createTabLst, t as createAudioCd, ta as createUpBars, ti as createMarker, tn as createPresLayoutVars, to as PresetMaterialType, tr as createApplyToSides, ts as xsdTextAlign, tt as createSt, u as createBuSzPts, ua as createYMode, ui as createMultiLvlStrRef, un as createWpCanvas, uo as createReflectionEffect, ur as createChartObject, us as createSolidFill, ut as createThemeOverride, v as createClrMap, va as createCdrCNvSpPr, vi as createPageMargins, vn as createWpNvContentPartPr, vo as createFillOverlayEffect, vr as createDTable, vs as createPresetColor, vt as createULn, w as createDgm, wa as createCdrGrpSpPr, wi as createPivotFmts, wn as createWpWhole, wo as createOutline, wr as createEvenFooter, ws as uniqueUuid, wt as createDiagramTxPr, x as createCustClrLst, xa as createCdrFrom, xi as createPictureOptions, xn as createWpStyle, xo as LineJoin, xr as createDispUnits, xs as hashedId, xt as createWavAudioFile, y as createCpLocks, ya as createCdrCxnSp, yi as createPageSetup, yn as createWpSp, yo as CompoundLine, yr as createData, ys as createHslColor, yt as createULnTx, z as createLnBlToTr, za as createCdrY, zi as createShowNegBubbles, zn as createXdrNvCxnSpPr, zo as createGradientStop, zr as createHeaderFooter, zt as createColorsDefHdrLst } from "./drawingml-B-2eEHAF.mjs";
|
|
4
|
+
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-9ZpWgmIy.mjs";
|
|
5
|
+
import { A as createNumRef, C as ErrorValueType, D as View3D, E as TrendlineType, M as CatAx, N as SerAx, O as Area3DChart, P as ValAx, S as ErrorBars, T as Trendline, _ as DataLabelPosition, a as SurfaceChart, b as ErrorBarDirection, c as RadarChart, d as Line3DChart, f as LineChart, g as BarChart, h as Bar3DChart, i as createChartType, j as createStrRef, k as AreaChart, l as Pie3DChart, m as BubbleChart, n as ChartSpace, o as StockChart, p as DoughnutChart, r as ChartTitle, s as ScatterChart, t as ChartCollection, u as PieChart, v as DataLabels, w as TimeUnit, x as ErrorBarType, y as DateAx } from "./chart-CigYrDhf.mjs";
|
|
6
6
|
import { a as createTraverser, c as TokenNotFoundError, d as getFirstLevelElements, f as patchSpaceAttribute, h as PPTX_NS, i as createReplacer, l as createSplitInject, m as DOCX_NS, n as getNextRelationshipIndex, o as createRunRenderer, p as toJson, r as appendContentType, s as createTokenReplacer, t as appendRelationship, u as createTextElementContents } from "./patch-ilNZTQmG.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { n as buildThemeXml, r as DEFAULT_COLORS, t as DefaultTheme } from "./theme-FWD_20fH.mjs";
|
|
8
|
+
import { escapeXml, js2xml, textOf, xml, xml2js } from "@office-open/xml";
|
|
9
|
+
import hash from "hash.js";
|
|
8
10
|
import { AsyncZipDeflate, Zip, ZipPassThrough, strFromU8, strFromU8 as strFromU8$1, strToU8, unzipSync, unzipSync as unzipSync$1, zip, zipSync } from "fflate";
|
|
9
11
|
import { toUint8Array } from "undio";
|
|
10
12
|
//#region \0polyfill-node.global.js
|
|
@@ -1592,7 +1594,7 @@ const createPacker = (options) => {
|
|
|
1592
1594
|
};
|
|
1593
1595
|
//#endregion
|
|
1594
1596
|
//#region src/opc/app-properties.ts
|
|
1595
|
-
const APP_PROPS_XML = "<Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\" xmlns:vt=\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\"
|
|
1597
|
+
const APP_PROPS_XML = "<Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\" xmlns:vt=\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\"><Application>Microsoft Office Word</Application></Properties>";
|
|
1596
1598
|
var AppProperties = class AppProperties extends ImportedXmlComponent {
|
|
1597
1599
|
static instance = ImportedXmlComponent.fromXmlString(APP_PROPS_XML);
|
|
1598
1600
|
constructor() {
|
|
@@ -1683,17 +1685,9 @@ const createOverride = (contentType, partName) => new BuilderElement({
|
|
|
1683
1685
|
//#region src/formatter.ts
|
|
1684
1686
|
const XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
|
|
1685
1687
|
/**
|
|
1686
|
-
* Converts an XmlComponent tree into
|
|
1688
|
+
* Converts an XmlComponent tree into an XML string via the toXml() fast path.
|
|
1687
1689
|
*/
|
|
1688
1690
|
var Formatter = class {
|
|
1689
|
-
/**
|
|
1690
|
-
* @deprecated Use `component.toXml(context)` or `formatToXml()` instead.
|
|
1691
|
-
*/
|
|
1692
|
-
format(input, context = { stack: [] }) {
|
|
1693
|
-
const output = input.prepForXml(context);
|
|
1694
|
-
if (output) return output;
|
|
1695
|
-
throw new Error("XMLComponent did not format correctly");
|
|
1696
|
-
}
|
|
1697
1691
|
/**
|
|
1698
1692
|
* Serialize a component directly to XML string via the toXml() fast path.
|
|
1699
1693
|
* Always includes XML declaration.
|
|
@@ -1944,8 +1938,8 @@ var RawPassthrough = class extends BaseXmlComponent {
|
|
|
1944
1938
|
super(element.name ?? "unknown");
|
|
1945
1939
|
this.element = element;
|
|
1946
1940
|
}
|
|
1947
|
-
|
|
1948
|
-
return elementToCompact(this.element);
|
|
1941
|
+
toXml(_context) {
|
|
1942
|
+
return xml(elementToCompact(this.element));
|
|
1949
1943
|
}
|
|
1950
1944
|
};
|
|
1951
1945
|
//#endregion
|
|
@@ -2027,4 +2021,72 @@ function compileMapping(mapping, overrides, media, mediaLevel = 0) {
|
|
|
2027
2021
|
return files;
|
|
2028
2022
|
}
|
|
2029
2023
|
//#endregion
|
|
2030
|
-
|
|
2024
|
+
//#region src/crypto.ts
|
|
2025
|
+
/**
|
|
2026
|
+
* Password hashing utilities for OOXML document protection.
|
|
2027
|
+
*
|
|
2028
|
+
* Implements ECMA-376 Agile Encryption password derivation.
|
|
2029
|
+
* Passwords are encoded as UTF-16LE per the OOXML specification.
|
|
2030
|
+
*
|
|
2031
|
+
* @module
|
|
2032
|
+
*/
|
|
2033
|
+
/**
|
|
2034
|
+
* Encodes a Uint8Array to a plain base64 string (no data URI prefix).
|
|
2035
|
+
*/
|
|
2036
|
+
function toBase64(bytes) {
|
|
2037
|
+
const binary = String.fromCharCode(...bytes);
|
|
2038
|
+
return btoa(binary);
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Encodes a string as UTF-16LE (no BOM, no null terminator).
|
|
2042
|
+
* Per ECMA-376 Part 2 §14.2.5, passwords SHALL be encoded as UTF-16LE.
|
|
2043
|
+
*/
|
|
2044
|
+
function utf16leEncode(str) {
|
|
2045
|
+
const bytes = new Uint8Array(str.length * 2);
|
|
2046
|
+
for (let i = 0; i < str.length; i++) {
|
|
2047
|
+
const code = str.charCodeAt(i);
|
|
2048
|
+
bytes[i * 2] = code & 255;
|
|
2049
|
+
bytes[i * 2 + 1] = code >> 8 & 255;
|
|
2050
|
+
}
|
|
2051
|
+
return bytes;
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Generates cryptographically secure random bytes.
|
|
2055
|
+
*/
|
|
2056
|
+
function randomBytes(length) {
|
|
2057
|
+
const bytes = new Uint8Array(length);
|
|
2058
|
+
if (typeof crypto !== "undefined" && crypto.getRandomValues) crypto.getRandomValues(bytes);
|
|
2059
|
+
else for (let i = 0; i < length; i++) bytes[i] = Math.floor(Math.random() * 256);
|
|
2060
|
+
return bytes;
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Computes the ECMA-376 Agile Encryption hash for a password.
|
|
2064
|
+
*
|
|
2065
|
+
* Algorithm: SHA-512(salt + UTF-16LE(password)), then iterate SHA-512(hash + i.toUint32LE()) spinCount times.
|
|
2066
|
+
*/
|
|
2067
|
+
function hashPasswordAgile(password, salt, spinCount) {
|
|
2068
|
+
let h = hash.sha512().update(salt).update(utf16leEncode(password)).digest();
|
|
2069
|
+
for (let i = 0; i < spinCount; i++) {
|
|
2070
|
+
const counter = new Uint8Array(4);
|
|
2071
|
+
new DataView(counter.buffer).setUint32(0, i, true);
|
|
2072
|
+
h = hash.sha512().update(h).update(counter).digest();
|
|
2073
|
+
}
|
|
2074
|
+
return toBase64(new Uint8Array(h));
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Derives a password hash for OOXML document protection.
|
|
2078
|
+
*
|
|
2079
|
+
* Returns base64-encoded hashValue, saltValue, spinCount, and algorithmName
|
|
2080
|
+
* suitable for direct use in document protection options.
|
|
2081
|
+
*/
|
|
2082
|
+
function derivePasswordHash(password, spinCount = 1e5) {
|
|
2083
|
+
const salt = randomBytes(16);
|
|
2084
|
+
return {
|
|
2085
|
+
hashValue: hashPasswordAgile(password, salt, spinCount),
|
|
2086
|
+
saltValue: toBase64(salt),
|
|
2087
|
+
spinCount,
|
|
2088
|
+
algorithmName: "SHA-512"
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
//#endregion
|
|
2092
|
+
export { AnimLevelValue, AnimOneValue, AppProperties, Area3DChart, AreaChart, Bar3DChart, BarChart, BaseXmlComponent, BevelPresetType, BlendMode, BubbleChart, BuilderElement, COLOR_CATEGORIES, CatAx, ChartCollection, ChartSpace, ChartTitle, ColorMethod, CompoundLine, Connection, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DataLabelPosition, DataLabels, DataModel, DateAx, DefaultTheme, DoughnutChart, EMPTY_OBJECT, EmptyElement, ErrorBarDirection, ErrorBarType, ErrorBars, ErrorValueType, FontCollectionIndex, Formatter, HierBranchStyle, HueDirection, IgnoreIfEmptyXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, LAYOUT_CATEGORIES, Line3DChart, LineCap, LineChart, LineEndLength, LineEndType, LineEndWidth, LineJoin, OoxmlMimeType, PPTX_NS, ParsedArchive, PathShadeType, PenAlignment, Pie3DChart, PieChart, Point, PresetColor, PresetDash, PresetGeometry, PresetMaterialType, PresetPattern, PresetShadowVal, RadarChart, RawPassthrough, RectAlignment, Relationships, STYLE_CATEGORIES, ScatterChart, SchemeColor, SerAx, SmartArtCollection, StockChart, Stretch, StyleMatrixIndex, SurfaceChart, SystemColor, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TimeUnit, TokenNotFoundError, TransPoint, Trendline, TrendlineType, ValAx, View3D, XmlComponent, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, addSmartArtRelationships, appendContentType, appendRelationship, attrObj, buildAttrObject, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, chartAttr, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPositionToEmu, convertToXmlComponent, createAdj, createAdjLst, createAdjustmentValues, createAnimLvl, createAnimOne, createApplyToEnd, createApplyToFront, createApplyToSides, createAudioCd, createAutoUpdate, createBackWall, createBandFmt, createBandFmts, createBaseTimeUnit, createBevel, createBevelElement, createBldChart, createBldDgm, createBlip, createBlipEffects, createBlipFill, createBottom, createBottomBevel, createBr, createBuBlip, createBuClrTx, createBuFontTx, createBuSzPts, createBuSzTx, createBubble3D, createBubbleScale, createBuiltInUnit, createCNvCxnSpPr, createCNvGraphicFramePr, createCNvGrpSpPr, createCNvSpPr, createCdrAbsSizeAnchor, createCdrBlipFill, createCdrCNvCxnSpPr, createCdrCNvGraphicFramePr, createCdrCNvGrpSpPr, createCdrCNvPicPr, createCdrCNvPr, createCdrCNvSpPr, createCdrCxnSp, createCdrExt, createCdrFrom, createCdrGraphicFrame, createCdrGrpSp, createCdrGrpSpPr, createCdrNvCxnSpPr, createCdrNvGraphicFramePr, createCdrNvGrpSpPr, createCdrNvPicPr, createCdrNvSpPr, createCdrPic, createCdrRelSizeAnchor, createCdrSp, createCdrSpPr, createCdrStyle, createCdrTo, createCdrTxBody, createCdrX, createCdrXfrm, createCdrY, createCell3D, createChMax, createChPref, createChart, createChartObject, createChartType, createClrMap, createClrMapOvr, createColorElement, createColorTransforms, createColorsDefHdr, createColorsDefHdrLst, createCpLocks, createCrossBetween, createCrossesAt, createCustClr, createCustClrLst, createCustSplit, createCustUnit, createCustomDash, createCustomGeometry, createCxnSp, createCxnSpLocks, createDLbl, createDPt, createDTable, createData, createDataModel, createDefault, createDgm, createDiagramExtLst, createDiagramRelIds, createDiagramSp3d, createDiagramStyle, createDiagramTxPr, createDispBlanksAs, createDispUnits, createDispUnitsLbl, createDownBars, createEffectClrLst, createEffectDag, createEffectList, createEnd, createEndCxn, createEvenFooter, createEvenHeader, createExplosion, createExt, createExtLst, createExtentionList, createExternalData, createExtraClrScheme, createFillClrLst, createFillOverlayEffect, createFirstFooter, createFirstHeader, createFloor, createFmtId, createFontElement, createFormatting, createGapDepth, createGapWidth, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrame, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createGrpSp, createGrpSpPr, createH, createHMode, createHeader, createHeaderFooter, createHeaders, createHiLowLines, createHierBranch, createHighlight, createHlinkMouseOver, createHoleSize, createHslColor, createInnerShadowEffect, createInsideH, createInsideV, createInvertIfNegative, createLayoutDefHdr, createLayoutDefHdrLst, createLayoutTarget, createLblAlgn, createLeaderLines, createLeft, createLegacyDrawingHF, createLegendEntry, createLinClrLst, createLineEnd, createLnBlToTr, createLnDef, createLnTlToBr, createLogBase, createLvl, createMajorGridlines, createMajorTickMark, createMajorTimeUnit, createMajorUnit, createManualLayout, createMarker, createMax, createMin, createMinorGridlines, createMinorTickMark, createMinorTimeUnit, createMinorUnit, createMinus, createMultiLvlStrCache, createMultiLvlStrRef, createName, createNoFill, createNumLit, createNumRef, createNvCxnSpPr, createNvGraphicFramePr, createNvGrpSpPr, createNvPicPr, createNvSpPr, createOddFooter, createOddHeader, createOfPieChart, createOfPieType, createOrgChart, createOuterShadowEffect, createOutline, createOverlap, createOverride, createOverrideClrMapping, createPacker, createPageMargins, createPageSetup, createPatternFill, createPic, createPictureFormat, createPictureLocking, createPictureOptions, createPictureStackUnit, createPivotFmt, createPivotFmts, createPivotSource, createPlotVisOnly, createPlus, createPresLayoutVars, createPresetColor, createPresetShadowEffect, createPrintSettings, createProtection, createQuickTimeFile, createReflectionEffect, createReplacer, createRgbColor, createRight, createRound, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createSecondPiePt, createSecondPieSize, createSelection, createSerLines, createShape, createShape3D, createShapeLocking, createShowDLblsOverMax, createShowHorzBorder, createShowKeys, createShowLeaderLines, createShowNegBubbles, createShowOutline, createShowVertBorder, createSideWall, createSize, createSizeRepresents, createSmooth, createSnd, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSp, createSpDef, createSplitInject, createSplitPos, createSplitType, createSt, createStCxn, createStart, createStrLit, createStrRef, createStyleDefHdr, createStyleDefHdrLst, createStyleElement, createStyleLbl, createSurface3DChart, createSym, createSymbol, createSystemColor, createTab, createTabLst, createTableStyle, createTableStyleElement, createTableStyleList, createTextElementContents, createThemeManager, createThemeOverride, createThickness, createTickLblPos, createTickMarkSkip, createTileInfo, createTl2br, createTokenReplacer, createTop, createTr2bl, createTransform2D, createTransformation, createTraverser, createTrendlineLbl, createTxDef, createTxEffectClrLst, createTxFillClrLst, createTxLinClrLst, createTxSp, createUFill, createUFillTx, createULn, createULnTx, createUpBars, createUpDownBars, createUseSpRect, createUserInterface, createUserShapes, createW, createWMode, createWavAudioFile, createWpBg, createWpBodyPr, createWpCNvCnPr, createWpCNvContentPartPr, createWpCNvFrPr, createWpCNvGrpSpPr, createWpCNvPr, createWpCNvSpPr, createWpCanvas, createWpContentPart, createWpExtLst, createWpGraphicFrame, createWpGrpSp, createWpGrpSpPr, createWpLinkedTxbx, createWpNestedGrpSp, createWpNvContentPartPr, createWpSp, createWpSpPr, createWpStyle, createWpTxbx, createWpTxbxContent, createWpWhole, createWpXfrm, createX, createXMode, createXdrBlipFill, createXdrCNvCxnSpPr, createXdrCNvGrpSpPr, createXdrCNvPicPr, createXdrCNvPr, createXdrCNvSpPr, createXdrCol, createXdrColOff, createXdrContentPart, createXdrCxnSp, createXdrFrom, createXdrGrpSp, createXdrGrpSpPr, createXdrNvCxnSpPr, createXdrNvGrpSpPr, createXdrNvPicPr, createXdrNvSpPr, createXdrOneCellAnchor, createXdrPic, createXdrRow, createXdrRowOff, createXdrSp, createXdrSpPr, createXdrStyle, createXdrTo, createXdrTwoCellAnchor, createXdrTxBody, createY, createYMode, createZipStream, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, elementToCompact, extractBlipFillMedia, formatId, getColorXml, getFirstLevelElements, getLayoutXml, getNextRelationshipIndex, getReferencedMedia, getStyleXml, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureObj, hpsMeasureValue, invertMap, longHexNumber, measurementOrPercentValue, numberValObj, onOffObj, parseArchive, parseCorePropsElement, patchSpaceAttribute, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceChartPlaceholders, replaceImagePlaceholders, replaceSmartArtPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, strFromU8, stringContainerObj, stringEnumValObj, stringValObj, toJson, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, wrapEl, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Point, c as
|
|
2
|
-
export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TransPoint, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml };
|
|
1
|
+
import { a as Point, c as DataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as Connection, m as COLOR_CATEGORIES, n as createDataModel, o as PointPropertySetOptions, p as getStyleXml, r as SmartArtCollection, s as TransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "../index-D0N5Bw2M.mjs";
|
|
2
|
+
export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, PointPropertySetOptions, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TransPoint, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml };
|
package/dist/smartart/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-
|
|
1
|
+
import { a as DataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as TransPoint, l as getLayoutXml, n as SmartArtCollection, o as Connection, p as STYLE_CATEGORIES, r as Point, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "../smartart-9ZpWgmIy.mjs";
|
|
2
2
|
export { COLOR_CATEGORIES, Connection, DEFAULT_DRAWING_XML, DataModel, LAYOUT_CATEGORIES, Point, STYLE_CATEGORIES, SmartArtCollection, TransPoint, createDataModel, getColorXml, getLayoutXml, getStyleXml };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as chartAttr, y as XmlComponent } from "./xml-components-
|
|
1
|
+
import { l as chartAttr, y as XmlComponent } from "./xml-components-BuFdDxHN.mjs";
|
|
2
2
|
//#region src/smartart/categories.ts
|
|
3
3
|
/** Layout ID → OOXML category type */
|
|
4
4
|
const LAYOUT_CATEGORIES = {
|
|
@@ -101,23 +101,32 @@ const COLOR_CATEGORIES = {
|
|
|
101
101
|
* based on the uniqueId / loTypeId in the data model.
|
|
102
102
|
*/
|
|
103
103
|
function getLayoutXml(layoutId) {
|
|
104
|
-
if (layoutId === "default") return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:layoutDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/layout/default\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"list\" pri=\"400\"/></dgm:catLst><dgm:sampData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"2\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"3\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"4\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"5\"><dgm:prSet phldr=\"1\"/></dgm:pt></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"6\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"7\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/><dgm:cxn modelId=\"8\" srcId=\"0\" destId=\"3\" srcOrd=\"2\" destOrd=\"0\"/><dgm:cxn modelId=\"9\" srcId=\"0\" destId=\"4\" srcOrd=\"3\" destOrd=\"0\"/><dgm:cxn modelId=\"10\" srcId=\"0\" destId=\"5\" srcOrd=\"4\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:sampData><dgm:styleData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"/><dgm:pt modelId=\"2\"/></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"3\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"4\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:styleData><dgm:clrData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"/><dgm:pt modelId=\"2\"/><dgm:pt modelId=\"3\"/><dgm:pt modelId=\"4\"/><dgm:pt modelId=\"5\"/><dgm:pt modelId=\"6\"/></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"7\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"8\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/><dgm:cxn modelId=\"9\" srcId=\"0\" destId=\"3\" srcOrd=\"2\" destOrd=\"0\"/><dgm:cxn modelId=\"10\" srcId=\"0\" destId=\"4\" srcOrd=\"3\" destOrd=\"0\"/><dgm:cxn modelId=\"11\" srcId=\"0\" destId=\"5\" srcOrd=\"4\" destOrd=\"0\"/><dgm:cxn modelId=\"12\" srcId=\"0\" destId=\"6\" srcOrd=\"5\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:clrData><dgm:layoutNode name=\"diagram\"><dgm:varLst><dgm:dir/><dgm:resizeHandles val=\"exact\"/></dgm:varLst><dgm:choose name=\"Name0\"><dgm:if name=\"Name1\" func=\"var\" arg=\"dir\" op=\"equ\" val=\"norm\"><dgm:alg type=\"snake\"><dgm:param type=\"grDir\" val=\"tL\"/><dgm:param type=\"flowDir\" val=\"row\"/><dgm:param type=\"contDir\" val=\"sameDir\"/><dgm:param type=\"off\" val=\"ctr\"/></dgm:alg></dgm:if><dgm:else name=\"Name2\"><dgm:alg type=\"snake\"><dgm:param type=\"grDir\" val=\"tR\"/><dgm:param type=\"flowDir\" val=\"row\"/><dgm:param type=\"contDir\" val=\"sameDir\"/><dgm:param type=\"off\" val=\"ctr\"/></dgm:alg></dgm:else></dgm:choose><dgm:shape xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf/><dgm:constrLst><dgm:constr type=\"w\" for=\"ch\" forName=\"node\" refType=\"w\"/><dgm:constr type=\"h\" for=\"ch\" forName=\"node\" refType=\"w\" refFor=\"ch\" refForName=\"node\" fact=\"0.6\"/><dgm:constr type=\"w\" for=\"ch\" forName=\"sibTrans\" refType=\"w\" refFor=\"ch\" refForName=\"node\" fact=\"0.1\"/><dgm:constr type=\"sp\" refType=\"w\" refFor=\"ch\" refForName=\"sibTrans\"/><dgm:constr type=\"primFontSz\" for=\"ch\" forName=\"node\" op=\"equ\" val=\"65\"/></dgm:constrLst><dgm:ruleLst/><dgm:forEach name=\"Name3\" axis=\"ch\" ptType=\"node\"><dgm:layoutNode name=\"node\"><dgm:varLst><dgm:bulletEnabled val=\"1\"/></dgm:varLst><dgm:alg type=\"tx\"/><dgm:shape type=\"rect\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf axis=\"desOrSelf\" ptType=\"node\"/><dgm:constrLst><dgm:constr type=\"lMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"rMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"tMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"bMarg\" refType=\"primFontSz\" fact=\"0.3\"/></dgm:constrLst><dgm:ruleLst><dgm:rule type=\"primFontSz\" val=\"5\" fact=\"NaN\" max=\"NaN\"/></dgm:ruleLst></dgm:layoutNode><dgm:forEach name=\"Name4\" axis=\"followSib\" ptType=\"sibTrans\" cnt=\"1\"><dgm:layoutNode name=\"sibTrans\"><dgm:alg type=\"sp\"/><dgm:shape xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf/><dgm:constrLst/><dgm:ruleLst/></dgm:layoutNode></dgm:forEach></dgm:layoutNode></dgm:layoutDef>";
|
|
104
|
+
if (layoutId === "default") return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:layoutDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/layout/default\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"list\" pri=\"400\"/></dgm:catLst><dgm:sampData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"2\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"3\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"4\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"5\"><dgm:prSet phldr=\"1\"/></dgm:pt></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"6\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"7\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/><dgm:cxn modelId=\"8\" srcId=\"0\" destId=\"3\" srcOrd=\"2\" destOrd=\"0\"/><dgm:cxn modelId=\"9\" srcId=\"0\" destId=\"4\" srcOrd=\"3\" destOrd=\"0\"/><dgm:cxn modelId=\"10\" srcId=\"0\" destId=\"5\" srcOrd=\"4\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:sampData><dgm:styleData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"/><dgm:pt modelId=\"2\"/></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"3\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"4\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:styleData><dgm:clrData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"/><dgm:pt modelId=\"2\"/><dgm:pt modelId=\"3\"/><dgm:pt modelId=\"4\"/><dgm:pt modelId=\"5\"/><dgm:pt modelId=\"6\"/></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"7\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"8\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/><dgm:cxn modelId=\"9\" srcId=\"0\" destId=\"3\" srcOrd=\"2\" destOrd=\"0\"/><dgm:cxn modelId=\"10\" srcId=\"0\" destId=\"4\" srcOrd=\"3\" destOrd=\"0\"/><dgm:cxn modelId=\"11\" srcId=\"0\" destId=\"5\" srcOrd=\"4\" destOrd=\"0\"/><dgm:cxn modelId=\"12\" srcId=\"0\" destId=\"6\" srcOrd=\"5\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:clrData><dgm:layoutNode name=\"diagram\" chOrder=\"b\"><dgm:varLst><dgm:dir/><dgm:resizeHandles val=\"exact\"/></dgm:varLst><dgm:choose name=\"Name0\"><dgm:if name=\"Name1\" func=\"var\" arg=\"dir\" op=\"equ\" val=\"norm\"><dgm:alg type=\"snake\"><dgm:param type=\"grDir\" val=\"tL\"/><dgm:param type=\"flowDir\" val=\"row\"/><dgm:param type=\"contDir\" val=\"sameDir\"/><dgm:param type=\"off\" val=\"ctr\"/></dgm:alg></dgm:if><dgm:else name=\"Name2\"><dgm:alg type=\"snake\"><dgm:param type=\"grDir\" val=\"tR\"/><dgm:param type=\"flowDir\" val=\"row\"/><dgm:param type=\"contDir\" val=\"sameDir\"/><dgm:param type=\"off\" val=\"ctr\"/></dgm:alg></dgm:else></dgm:choose><dgm:shape blipPhldr=\"false\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf/><dgm:constrLst><dgm:constr type=\"w\" for=\"ch\" forName=\"node\" refType=\"w\" refPtType=\"all\"/><dgm:constr type=\"h\" for=\"ch\" forName=\"node\" refType=\"w\" refFor=\"ch\" refForName=\"node\" fact=\"0.6\"/><dgm:constr type=\"w\" for=\"ch\" forName=\"sibTrans\" refType=\"w\" refFor=\"ch\" refForName=\"node\" fact=\"0.1\"/><dgm:constr type=\"sp\" refType=\"w\" refFor=\"ch\" refForName=\"sibTrans\"/><dgm:constr type=\"primFontSz\" for=\"ch\" forName=\"node\" op=\"equ\" val=\"65\"/></dgm:constrLst><dgm:ruleLst/><dgm:forEach name=\"Name3\" axis=\"ch\" ptType=\"node\" st=\"1\"><dgm:layoutNode name=\"node\"><dgm:varLst><dgm:bulletEnabled val=\"1\"/></dgm:varLst><dgm:alg type=\"tx\"/><dgm:shape type=\"rect\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf axis=\"desOrSelf\" ptType=\"node\"/><dgm:constrLst><dgm:constr type=\"lMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"rMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"tMarg\" refType=\"primFontSz\" fact=\"0.3\"/><dgm:constr type=\"bMarg\" refType=\"primFontSz\" fact=\"0.3\"/></dgm:constrLst><dgm:ruleLst><dgm:rule type=\"primFontSz\" val=\"5\" fact=\"NaN\" max=\"NaN\"/></dgm:ruleLst></dgm:layoutNode><dgm:forEach name=\"Name4\" axis=\"followSib\" ptType=\"sibTrans\" cnt=\"1\"><dgm:layoutNode name=\"sibTrans\"><dgm:alg type=\"sp\"/><dgm:shape xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:blip=\"\"><dgm:adjLst/></dgm:shape><dgm:presOf/><dgm:constrLst/><dgm:ruleLst/></dgm:layoutNode></dgm:forEach></dgm:layoutNode></dgm:layoutDef>";
|
|
105
105
|
const cat = LAYOUT_CATEGORIES[layoutId] ?? "list";
|
|
106
106
|
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:layoutDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/layout/" + layoutId + "\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"" + cat + "\" pri=\"400\"/></dgm:catLst><dgm:sampData><dgm:dataModel><dgm:ptLst><dgm:pt modelId=\"0\" type=\"doc\"/><dgm:pt modelId=\"1\"><dgm:prSet phldr=\"1\"/></dgm:pt><dgm:pt modelId=\"2\"><dgm:prSet phldr=\"1\"/></dgm:pt></dgm:ptLst><dgm:cxnLst><dgm:cxn modelId=\"3\" srcId=\"0\" destId=\"1\" srcOrd=\"0\" destOrd=\"0\"/><dgm:cxn modelId=\"4\" srcId=\"0\" destId=\"2\" srcOrd=\"1\" destOrd=\"0\"/></dgm:cxnLst><dgm:bg/><dgm:whole/></dgm:dataModel></dgm:sampData></dgm:layoutDef>";
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* Returns style
|
|
109
|
+
* Returns style XML with basic style definitions (fillClrLst, linClrLst, etc.)
|
|
110
|
+
* that allow PowerPoint to correctly render SmartArt colors and effects.
|
|
110
111
|
*/
|
|
111
112
|
function getStyleXml(styleId) {
|
|
112
113
|
const cat = STYLE_CATEGORIES[styleId] ?? "simple";
|
|
113
|
-
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:styleDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/quickstyle/" + styleId + "\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"" + cat + "\" pri=\"10100\"/></dgm:catLst><dgm:scene3d><a:camera prst=\"orthographicFront\"/><a:lightRig rig=\"threePt\" dir=\"t\"/></dgm:scene3d></dgm:styleDef>";
|
|
114
|
+
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:styleDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/quickstyle/" + styleId + "\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"" + cat + "\" pri=\"10100\"/></dgm:catLst><dgm:scene3d><a:camera prst=\"orthographicFront\"/><a:lightRig rig=\"threePt\" dir=\"t\"/></dgm:scene3d><dgm:fillClrLst><a:solidFill><a:schemeClr val=\"accent1\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent2\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent3\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent4\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent5\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent6\"/></a:solidFill></dgm:fillClrLst><dgm:linClrLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:linClrLst><dgm:effectClrLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:effectClrLst><dgm:fontClrLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:fontClrLst></dgm:styleDef>";
|
|
114
115
|
}
|
|
115
116
|
/**
|
|
116
|
-
* Returns color
|
|
117
|
+
* Returns color XML with basic color definitions (fillLst, linLst, etc.)
|
|
118
|
+
* that allow PowerPoint to correctly render SmartArt with the specified color scheme.
|
|
117
119
|
*/
|
|
118
120
|
function getColorXml(colorId) {
|
|
119
121
|
const cat = COLOR_CATEGORIES[colorId] ?? "accent1";
|
|
120
|
-
|
|
122
|
+
const accentMatch = colorId.match(/^(accent\d)/);
|
|
123
|
+
const accentVal = accentMatch ? accentMatch[1] : "accent1";
|
|
124
|
+
let colorContent;
|
|
125
|
+
if (colorId.startsWith("accent")) colorContent = `<dgm:fillLst><a:solidFill><a:schemeClr val="${accentVal}"/></a:solidFill></dgm:fillLst><dgm:linLst><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></dgm:linLst><dgm:effectLst><a:solidFill><a:schemeClr val="tx1"/></a:solidFill></dgm:effectLst><dgm:txFillLst><a:solidFill><a:schemeClr val="tx1"/></a:solidFill></dgm:txFillLst><dgm:txLinLst><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></dgm:txLinLst><dgm:txEffectLst><a:solidFill><a:schemeClr val="tx1"/></a:solidFill></dgm:txEffectLst>`;
|
|
126
|
+
else if (colorId.startsWith("colorful")) colorContent = "<dgm:fillLst><a:solidFill><a:schemeClr val=\"accent1\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent2\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent3\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent4\"/></a:solidFill><a:solidFill><a:schemeClr val=\"accent5\"/></a:solidFill></dgm:fillLst><dgm:linLst><a:solidFill><a:schemeClr val=\"lt1\"/></a:solidFill></dgm:linLst><dgm:effectLst><a:solidFill><a:schemeClr val=\"lt1\"/></a:solidFill></dgm:effectLst><dgm:txFillLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:txFillLst><dgm:txLinLst/><dgm:txEffectLst/>";
|
|
127
|
+
else if (colorId.startsWith("dark")) colorContent = "<dgm:fillLst><a:solidFill><a:schemeClr val=\"dk1\"/></a:solidFill><a:solidFill><a:schemeClr val=\"dk2\"/></a:solidFill></dgm:fillLst><dgm:linLst><a:solidFill><a:schemeClr val=\"lt1\"/></a:solidFill></dgm:linLst><dgm:effectLst><a:solidFill><a:schemeClr val=\"lt1\"/></a:solidFill></dgm:effectLst><dgm:txFillLst><a:solidFill><a:schemeClr val=\"lt1\"/></a:solidFill></dgm:txFillLst><dgm:txLinLst/><dgm:txEffectLst/>";
|
|
128
|
+
else colorContent = "<dgm:fillLst><a:solidFill><a:schemeClr val=\"accent1\"/></a:solidFill></dgm:fillLst><dgm:linLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:linLst><dgm:effectLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:effectLst><dgm:txFillLst><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill></dgm:txFillLst><dgm:txLinLst/><dgm:txEffectLst/>";
|
|
129
|
+
return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dgm:colorsDef xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" uniqueId=\"urn:microsoft.com/office/officeart/2005/8/colors/" + colorId + "\"><dgm:title val=\"\"/><dgm:desc val=\"\"/><dgm:catLst><dgm:cat type=\"" + cat + "\" pri=\"11200\"/></dgm:catLst>" + colorContent + "</dgm:colorsDef>";
|
|
121
130
|
}
|
|
122
131
|
/** Minimal drawing cache for SmartArt (Office apps auto-regenerate this on open) */
|
|
123
132
|
const DEFAULT_DRAWING_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><dsp:drawing xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\" xmlns:dsp=\"http://schemas.microsoft.com/office/drawing/2008/diagram\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><dsp:spTree><dsp:nvGrpSpPr><dsp:cNvPr id=\"0\" name=\"\"/><dsp:cNvGrpSpPr/></dsp:nvGrpSpPr><dsp:grpSpPr/></dsp:spTree></dsp:drawing>";
|
|
@@ -127,7 +136,7 @@ const DEFAULT_DRAWING_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone
|
|
|
127
136
|
* dgm:cxn — SmartArt data model connection (edge).
|
|
128
137
|
*/
|
|
129
138
|
var Connection = class extends XmlComponent {
|
|
130
|
-
constructor(modelId, srcId, destId, type, srcOrd = 0, destOrd = 0, parTransId, sibTransId) {
|
|
139
|
+
constructor(modelId, srcId, destId, type, srcOrd = 0, destOrd = 0, parTransId, sibTransId, presId) {
|
|
131
140
|
super("dgm:cxn");
|
|
132
141
|
const attrs = {
|
|
133
142
|
modelId,
|
|
@@ -139,6 +148,7 @@ var Connection = class extends XmlComponent {
|
|
|
139
148
|
if (type) attrs.type = type;
|
|
140
149
|
if (parTransId) attrs.parTransId = parTransId;
|
|
141
150
|
if (sibTransId) attrs.sibTransId = sibTransId;
|
|
151
|
+
if (presId) attrs.presId = presId;
|
|
142
152
|
this.root.push(chartAttr(attrs));
|
|
143
153
|
}
|
|
144
154
|
};
|
|
@@ -183,16 +193,61 @@ var EmptyElement$2 = class extends XmlComponent {
|
|
|
183
193
|
* dgm:pt — SmartArt data model point (node).
|
|
184
194
|
*/
|
|
185
195
|
var Point = class extends XmlComponent {
|
|
186
|
-
constructor(modelId, text, type = "node") {
|
|
196
|
+
constructor(modelId, text, type = "node", propertySet) {
|
|
187
197
|
super("dgm:pt");
|
|
188
198
|
this.root.push(chartAttr({
|
|
189
199
|
modelId,
|
|
190
200
|
type
|
|
191
201
|
}));
|
|
202
|
+
if (propertySet) this.root.push(new PropertySet(propertySet));
|
|
192
203
|
this.root.push(new PointText(text));
|
|
193
204
|
}
|
|
194
205
|
};
|
|
195
206
|
/**
|
|
207
|
+
* dgm:prSet — Property set for a SmartArt data model point.
|
|
208
|
+
*/
|
|
209
|
+
var PropertySet = class extends XmlComponent {
|
|
210
|
+
constructor(opts) {
|
|
211
|
+
super("dgm:prSet");
|
|
212
|
+
const attr = {};
|
|
213
|
+
if (opts.presentationAssociationId !== void 0) attr.presAssocID = opts.presentationAssociationId;
|
|
214
|
+
if (opts.presentationName !== void 0) attr.presName = opts.presentationName;
|
|
215
|
+
if (opts.presentationStyleLabel !== void 0) attr.presStyleLbl = opts.presentationStyleLabel;
|
|
216
|
+
if (opts.presentationStyleIndex !== void 0) attr.presStyleIdx = opts.presentationStyleIndex;
|
|
217
|
+
if (opts.presentationStyleCount !== void 0) attr.presStyleCnt = opts.presentationStyleCount;
|
|
218
|
+
if (opts.placeholderText !== void 0) attr.phldrT = opts.placeholderText;
|
|
219
|
+
if (opts.placeholder !== void 0) attr.phldr = opts.placeholder ? "1" : "0";
|
|
220
|
+
if (opts.customAngle !== void 0) attr.custAng = opts.customAngle;
|
|
221
|
+
if (opts.customFlipVertical !== void 0) attr.custFlipVert = opts.customFlipVertical ? "1" : "0";
|
|
222
|
+
if (opts.customFlipHorizontal !== void 0) attr.custFlipHor = opts.customFlipHorizontal ? "1" : "0";
|
|
223
|
+
if (opts.customSizeX !== void 0) attr.custSzX = opts.customSizeX;
|
|
224
|
+
if (opts.customSizeY !== void 0) attr.custSzY = opts.customSizeY;
|
|
225
|
+
if (opts.customScaleX !== void 0) attr.custScaleX = opts.customScaleX;
|
|
226
|
+
if (opts.customScaleY !== void 0) attr.custScaleY = opts.customScaleY;
|
|
227
|
+
if (opts.customText !== void 0) attr.custT = opts.customText ? "1" : "0";
|
|
228
|
+
if (opts.customLinearFactorX !== void 0) attr.custLinFactX = opts.customLinearFactorX;
|
|
229
|
+
if (opts.customLinearFactorY !== void 0) attr.custLinFactY = opts.customLinearFactorY;
|
|
230
|
+
if (opts.customLinearFactorNeighborX !== void 0) attr.custLinFactNeighborX = opts.customLinearFactorNeighborX;
|
|
231
|
+
if (opts.customLinearFactorNeighborY !== void 0) attr.custLinFactNeighborY = opts.customLinearFactorNeighborY;
|
|
232
|
+
if (opts.customRadialScaleRadius !== void 0) attr.custRadScaleRad = opts.customRadialScaleRadius;
|
|
233
|
+
if (opts.customRadialScaleIncrement !== void 0) attr.custRadScaleInc = opts.customRadialScaleIncrement;
|
|
234
|
+
if (opts.coherent3DOffset !== void 0) attr.coherent3DOff = opts.coherent3DOffset ? "1" : "0";
|
|
235
|
+
if (opts.hideGeometry !== void 0) attr.hideGeom = opts.hideGeometry ? "1" : "0";
|
|
236
|
+
if (opts.hideLastTransition !== void 0) attr.hideLastTrans = opts.hideLastTransition ? "1" : "0";
|
|
237
|
+
if (opts.lockTextEntry !== void 0) attr.lkTxEntry = opts.lockTextEntry ? "1" : "0";
|
|
238
|
+
if (opts.moveWith !== void 0) attr.moveWith = opts.moveWith;
|
|
239
|
+
if (opts.useDefault !== void 0) attr.useDef = opts.useDefault ? "1" : "0";
|
|
240
|
+
if (opts.zOrderOffset !== void 0) attr.zOrderOff = opts.zOrderOffset;
|
|
241
|
+
if (opts.layoutTypeId !== void 0) attr.loTypeId = opts.layoutTypeId;
|
|
242
|
+
if (opts.layoutCategoryId !== void 0) attr.loCatId = opts.layoutCategoryId;
|
|
243
|
+
if (opts.quickStyleTypeId !== void 0) attr.qsTypeId = opts.quickStyleTypeId;
|
|
244
|
+
if (opts.quickStyleCategoryId !== void 0) attr.qsCatId = opts.quickStyleCategoryId;
|
|
245
|
+
if (opts.colorStyleTypeId !== void 0) attr.csTypeId = opts.colorStyleTypeId;
|
|
246
|
+
if (opts.colorStyleCategoryId !== void 0) attr.csCatId = opts.colorStyleCategoryId;
|
|
247
|
+
if (Object.keys(attr).length > 0) this.root.push({ _attr: attr });
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
196
251
|
* Transition point (parTrans or sibTrans) — no text body, references a connection.
|
|
197
252
|
*/
|
|
198
253
|
var TransPoint = class extends XmlComponent {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as FontSchemeOptions, i as ColorSchemeOptions, n as buildThemeXml, o as ThemeOptions, r as DefaultTheme, t as DEFAULT_COLORS } from "../index-Cj2Yf5mk.mjs";
|
|
2
|
+
export { type ColorSchemeOptions, DEFAULT_COLORS, DefaultTheme, type FontSchemeOptions, type ThemeOptions, buildThemeXml };
|