@office-open/core 0.9.7 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart/index.d.mts +1 -1
- package/dist/descriptor/index.d.mts +2 -2
- package/dist/descriptor/index.mjs +2 -2
- package/dist/descriptor-BdWTH1vv.mjs +444 -0
- package/dist/drawingml/index.d.mts +2 -2
- package/dist/drawingml/index.mjs +2 -2
- package/dist/{index-DMw7eid7.d.mts → index-BEQ12eyX.d.mts} +42 -42
- package/dist/{index-eu1aFQCm.d.mts → index-CsQP7Cl4.d.mts} +36 -36
- package/dist/index-DEeO4sOq.d.mts +239 -0
- package/dist/index-L82O3q6V.d.mts +170 -0
- package/dist/{index-CDYC3mxJ.d.mts → index-pvj6gDsT.d.mts} +832 -179
- package/dist/{index-4hjRdzMU.d.mts → index-vEeWkbm5.d.mts} +20 -20
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +4 -4
- package/dist/patch/index.d.mts +2 -2
- package/dist/patch/index.mjs +2 -2
- package/dist/{patch-ilNZTQmG.mjs → patch-DocIv0Sn.mjs} +125 -3
- package/dist/smartart/index.d.mts +1 -1
- package/dist/{src-DlZssiRY.mjs → src-CXdJt0WZ.mjs} +1214 -263
- package/dist/theme/index.d.mts +1 -1
- package/package.json +2 -2
- package/dist/descriptor-DcQm32dg.mjs +0 -71
- package/dist/index-C4r2WLEy.d.mts +0 -73
- package/dist/index-DmPBJwSk.d.mts +0 -127
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as CustomDescriptor } from "./index-L82O3q6V.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/theme/theme-options.d.ts
|
|
4
4
|
/**
|
|
@@ -8,31 +8,31 @@ import { c as CustomDescriptor } from "./index-C4r2WLEy.mjs";
|
|
|
8
8
|
*/
|
|
9
9
|
/** Color scheme — 12 theme colors (hex without #). */
|
|
10
10
|
interface ColorSchemeOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
dark1?: string;
|
|
12
|
+
light1?: string;
|
|
13
|
+
dark2?: string;
|
|
14
|
+
light2?: string;
|
|
15
|
+
accent1?: string;
|
|
16
|
+
accent2?: string;
|
|
17
|
+
accent3?: string;
|
|
18
|
+
accent4?: string;
|
|
19
|
+
accent5?: string;
|
|
20
|
+
accent6?: string;
|
|
21
|
+
hyperlink?: string;
|
|
22
|
+
followedHyperlink?: string;
|
|
23
23
|
}
|
|
24
24
|
/** Font scheme — 4 font slots (latin + east-asian for major/minor). */
|
|
25
25
|
interface FontSchemeOptions {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
majorFont?: string;
|
|
27
|
+
minorFont?: string;
|
|
28
|
+
majorFontAsian?: string;
|
|
29
|
+
minorFontAsian?: string;
|
|
30
30
|
}
|
|
31
31
|
/** Theme customization options. */
|
|
32
32
|
interface ThemeOptions {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
name?: string;
|
|
34
|
+
colors?: ColorSchemeOptions;
|
|
35
|
+
fonts?: FontSchemeOptions;
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/theme/default-theme.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as ChartCollection, a as ChartSpaceOptions, c as DataLabelsOptions, d as ErrorBarType, f as ErrorValueType, g as View3DOptions, h as TrendlineType, i as ChartSeriesData, l as ErrorBarDirection, m as TrendlineOptions, n as AxisChartType, o as ChartType, p as TimeUnit, r as BubbleSeriesData, s as DataLabelPosition, t as chartSpaceDesc, u as ErrorBarOptions, v as ChartData } from "./index-
|
|
2
|
-
import { a as
|
|
3
|
-
import { $ as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "./index-
|
|
1
|
+
import { _ as ChartCollection, a as ChartSpaceOptions, c as DataLabelsOptions, d as ErrorBarType, f as ErrorValueType, g as View3DOptions, h as TrendlineType, i as ChartSeriesData, l as ErrorBarDirection, m as TrendlineOptions, n as AxisChartType, o as ChartType, p as TimeUnit, r as BubbleSeriesData, s as DataLabelPosition, t as chartSpaceDesc, u as ErrorBarOptions, v as ChartData } from "./index-BEQ12eyX.mjs";
|
|
2
|
+
import { _ as CustomDescriptor, a as diffTagSets, b as WriteContext, c as FIELD_SPECS, d as boolDecode, f as boolEncode, g as stringify, h as parse, i as checkOrder, l as findFieldSpec, m as enumEncode, n as OrderViolation, o as roundTripFields, p as enumDecode, r as RoundTripResult, s as DescriptorFieldSpec, t as FieldConsistencyReport, u as DescriptorRegistry, v as Descriptor, y as ReadContext } from "./index-L82O3q6V.mjs";
|
|
3
|
+
import { $ as createLineColorList, $a as TileOptions, $i as parseArchive, $n as calculateEffectExtent, $r as xsdLineCap, $t as TableStyleListOptions, A as rgbColorDesc, Aa as TargetModeType, Ai as convertPointsToEmu, An as stringifyAdjustmentValues, Ar as createCustomDash, At as PresentationLayoutVariablesOptions, B as createDiagramTextProperties, Ba as buildFill, Bi as OpcCode, Bn as LightRigOptions, Br as hasPlaceholders, Bt as GraphicFrameLockingOptions, C as fillDesc, Ca as appPropertiesDesc, Ci as convertEmuToInches, Cn as PathCommand, Co as ColorTransformOptions, Cr as createOutline, Ct as AnimationLevelOptions, D as hslColorDesc, Da as createOverride, Di as convertInchesToTwip, Dn as PresetGeometryOptions, Dr as LineEndWidth, Dt as MaxChildrenOptions, E as getColorDescriptor, Ea as createDefault, Ei as convertInchesToEmu, En as createCustomGeometry, Er as LineEndType, Et as HierBranchStyle, F as DiagramExtensionListOptions, Fa as createNoFill, Fi as convertUniversalMeasureToTwip, Fn as BevelPresetType, Fr as findAndReplaceImagePlaceholders, Ft as createHierBranch, G as DiagramStyleLabelOptions, Ga as LinearShadeOptions, Gi as DOCX_PARTS, Gn as createScene3D, Gr as replaceMediaPlaceholders, Gt as createGroupLocking, H as createDiagramRelationshipIds, Ha as GradientFillOptions, Hi as OpcSeverity, Hn as Scene3DOptions, Hr as replaceChartPlaceholders, Ht as PictureLockingOptions, I as DiagramExtensionOptions, Ia as BlipFillConfigOptions, Ii as parseUniversalMeasure, In as createBevel, Ir as formatId, It as createMaxChildren, J as HueDirection, Ja as RelativeRect, Ji as PackagePartRegistry, Jn as EffectDagOptions, Jr as replaceVideoPlaceholders, Jt as OnOffStyleType, K as DiagramStyleOptions, Ka as PathShadeOptions, Ki as PART_REGISTRIES, Kn as createSoftEdgeEffect, Kr as replaceNumberingPlaceholders, Kt as createPictureLocking, L as DiagramTextPropertiesOptions, La as BlipFillMediaData, Li as compileMapping, Ln as createBottomBevel, Lr as getMediaRefs, Lt as createOrgChart, M as schemeColorDesc, Ma as PatternFillOptions, Mi as convertToEmu, Mn as Shape3DOptions, Mr as SmartArtRelOptions, Mt as createAdjustList, N as solidFillDesc, Na as PresetPattern, Ni as convertToTwip, Nn as createShape3D, Nr as addSmartArtRelationships, Nt as createAnimateOneByOne, O as parseColorChoice, Oa as RelationshipType, Oi as convertMillimetersToTwip, On as stringifyPresetGeometry, Or as createLineEnd, Ot as OrgChartOptions, P as systemColorDesc, Pa as createPatternFill, Pi as convertUniversalMeasureToEmu, Pn as BevelOptions, Pr as collectPlaceholderKeys, Pt as createAnimationLevel, Q as createFillColorList, Qa as TileAlignment, Qi as ParsedArchive, Qn as EffectListOptions, Qr as xsdEffectContainer, Qt as TablePartStyleOptions, R as createDiagramExtensionList, Ra as FillOptions, Ri as ContentTypeOverrideEntry, Rn as BackdropOptions, Rr as getReferencedMedia, Rt as createPreferredChildren, S as outlineDesc, Sa as AppPropertiesOptions, Si as PixelPosition, Sn as GeomRect, So as createHslColor, Sr as PresetDash, St as AnimateOneByOneValue, T as patternFillDesc, Ta as OverrideAttributes, Ti as convertEmuToPoints, Tn as PathOptions, Tr as LineEndOptions, Tt as HierBranchOptions, U as ColorListOptions, Ua as GradientShadeOptions, Ui as summarizeOpcIssues, Un as SphereCoords, Ur as replaceHyperlinkPlaceholders, Ut as ShapeLockingOptions, V as DiagramRelationshipIdsOptions, Va as extractBlipFillMedia, Vi as OpcIssue, Vn as Point3D, Vr as replaceAllPlaceholders, Vt as GroupLockingOptions, W as ColorMethod, Wa as GradientStop, Wi as validateOpcConsistency, Wn as Vector3D, Wr as replaceImagePlaceholders, Wt as createGraphicFrameLocking, X as createDiagramStyle, Xa as createGradientFill, Xi as PartPresence, Xn as BlurEffectOptions, Xr as xsdBlendMode, Xt as TableCellBorderOptions, Y as StyleMatrixIndex, Ya as TileFlipMode, Yi as PartDef, Yn as createEffectDag, Yr as invertMap, Yt as StyleMatrixReferenceOptions, Z as createEffectColorList, Za as createGradientStop, Zi as XLSX_PARTS, Zn as EffectExtent, Zr as xsdCompoundLine, Zt as TableCellStyleOptions, _ as graphicFrameLockingDesc, _a as zipSyncAndConvert, _i as uniqueUuid, _n as createBlipFill, _o as createRgbColor, _r as LineCap, _t as createStyleDefinitionHeader, a as blipDesc, aa as PackerOptions, ai as xsdPresetShadow, an as createTableStyleList, ao as SolidFillOptions, ar as createPresetShadowEffect, at as ColorsDefinitionHeaderOptions, b as shapeLockingDesc, ba as customPropertiesDesc, bi as randomBytes, bn as ConnectionSite, bo as createPresetColor, br as OutlineOptions, bt as AdjustOptions, c as stretchDesc, ca as ZIP_STORED_LEVEL, ci as xsdTextAlign, cn as MediaTransformation, co as SystemColor, cr as createOuterShadowEffect, ct as DiagramNameOptions, d as scene3DDesc, da as createPacker, di as xsdUnderlineStyle, dn as Transform2DOptions, do as SchemeColor, dr as GlowEffectOptions, dt as StyleDefinitionHeaderListOptions, ea as decodeBase64, ei as xsdLineEndSize, en as TableStyleOptions, eo as createTileInfo, er as createEffectList, et as createStyleLabel, f as shape3DDesc, fa as createZipStream, fi as xsdVerticalMergeRev, fn as createGroupTransform2D, fo as SchemeColorOptions, fr as createGlowEffect, ft as StyleDefinitionHeaderOptions, g as presetGeometryDesc, ga as zipAndConvert, gi as uniqueNumericIdCreator, gn as BlipFillOptions, go as RgbColorOptions, gr as CompoundLine, gt as createLayoutDefinitionHeaderList, h as customGeometryDesc, ha as unzipSync, hi as uniqueId, hn as createExtentionList, ho as createScRgbColor, hr as createFillOverlayEffect, ht as createLayoutDefinitionHeader, i as presentationLayoutVariablesDesc, ia as Packer, ii as xsdPenAlignment, in as createTableStyle, io as createBlipEffects, ir as PresetShadowVal, it as ColorsDefinitionHeaderListOptions, j as scRgbColorDesc, ja as createGroupFill, ji as convertPositionToEmu, jn as PresetMaterialType, jr as IdFormat, jt as createAdjust, k as presetColorDesc, ka as Relationships, ki as convertPixelsToEmu, kn as GeometryGuide, kr as DashStop, kt as PreferredChildrenOptions, l as tileDesc, la as ZipOptions, li as xsdTextAnchor, ln as createTransformation, lo as SystemColorOptions, lr as InnerShadowEffectOptions, lt as LayoutDefinitionHeaderListOptions, m as transform2DDesc, ma as strFromU8, mi as hashedId, mn as stringifyStretch, mo as ScRgbColorOptions, mr as FillOverlayEffectOptions, mt as createColorsDefinitionHeaderList, n as diagramRelationshipIdsDesc, na as CompileFn, ni as xsdPathFillMode, nn as TableTextStyleOptions, no as createSourceRectangle, nr as createReflectionEffect, nt as createTextFillColorList, o as blipFillDesc, oa as XmlifyedFile, oi as xsdRectAlignment, on as parseTableStyleList, oo as createColorElement, or as OuterShadowEffectOptions, ot as DiagramCategoryOptions, p as groupTransform2DDesc, pa as levelForMediaName, pi as UniqueNumericIdCreator, pn as createTransform2D, po as createSchemeColor, pr as BlendMode, pt as createColorsDefinitionHeader, q as FontCollectionIndex, qa as PathShadeType, qi as PPTX_PARTS, qn as EffectContainerType, qr as replaceSmartArtPlaceholders, qt as createShapeLocking, r as diagramStyleDesc, ra as CompressionOptions, ri as xsdPattern, rn as ThemeableLineStyleOptions, ro as BlipEffectsOptions, rr as PresetShadowEffectOptions, rt as createTextLineColorList, s as sourceRectangleDesc, sa as ZIP_DEFLATE_LEVEL, si as xsdStrikeStyle, sn as MediaDataTransformation, so as createSolidFill, sr as RectAlignment, st as DiagramDescriptionOptions, t as diagramExtensionListDesc, ta as encodeBase64, ti as xsdMaterialType, tn as TableStyleRegion, to as SourceRectangleOptions, tr as ReflectionEffectOptions, tt as createTextEffectColorList, u as bevelDesc, ua as Zippable, ui as xsdTextCaps, un as GroupTransform2DOptions, uo as createSystemColor, ur as createInnerShadowEffect, ut as LayoutDefinitionHeaderOptions, v as groupLockingDesc, va as CustomPropertiesInput, vi as derivePasswordHash, vn as BlipOptions, vo as PresetColor, vr as LineJoin, vt as createStyleDefinitionHeaderList, w as gradientFillDesc, wa as DefaultAttributes, wi as convertEmuToPixels, wn as PathFillMode, wo as createColorTransforms, wr as LineEndLength, wt as AnimationLevelValue, x as effectListDesc, xa as AppPropertiesInput, xi as EmuPosition, xn as CustomGeometryOptions, xo as HslColorOptions, xr as PenAlignment, xt as AnimateOneByOneOptions, y as pictureLockingDesc, ya as CustomPropertyOptions, yi as hashPasswordAgile, yn as createBlip, yo as PresetColorOptions, yr as OutlineFillProperties, yt as AdjustListOptions, z as createDiagramShape3D, za as GradientStopOptions, zi as buildContentTypeOverrides, zn as CameraOptions, zr as getVideoRefs, zt as createPresentationLayoutVariables } from "./index-pvj6gDsT.mjs";
|
|
4
|
+
import { A as DataType, C as OutputByType, D as buildCorePropertiesXml, E as CorePropertiesOptions, M as toUint8Array, O as buildCorePropertiesXmlString, S as OoxmlMimeType, T as convertOutput, _ as ReplacerConfig, a as getNextRelationshipIndex, b as PPTX_NS, c as getFirstLevelElements, d as TokenNotFoundError, f as createSplitInject, g as createRunRenderer, h as RenderedParagraphNode, i as appendRelationship, j as isBase64DataURL, k as parseCorePropsElement, l as patchSpaceAttribute, m as createTraverser, n as PlaceholderDelimiters, o as appendContentType, p as createTokenReplacer, r as applyCorePropertiesOverride, s as createTextElementContents, t as BasePatchOptions, u as toJson, v as createReplacer, w as OutputType, x as XmlNamespaceConfig, y as DOCX_NS } from "./index-DEeO4sOq.mjs";
|
|
5
|
+
import { a as PointPropertySetOptions, c as stringifyDataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as stringifyConnection, m as COLOR_CATEGORIES, n as createDataModel, o as stringifyPoint, p as getStyleXml, r as SmartArtCollection, s as stringifyTransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "./index-CsQP7Cl4.mjs";
|
|
6
|
+
import { a as ColorSchemeOptions, i as createThemeXml, n as DEFAULT_COLORS, o as FontSchemeOptions, r as buildThemeXml, s as ThemeOptions, t as themeDesc } from "./index-vEeWkbm5.mjs";
|
|
7
7
|
import { C as uCharHexNumber, S as twipsMeasureValue, T as unsignedDecimalNumber, _ as pointMeasureValue, a as ThemeColor, b as signedHpsMeasureValue, c as dateTimeValue, d as hexBinary, f as hexColorValue, g as percentageValue, h as measurementOrPercentValue, i as RelativeMeasure, l as decimalNumber, m as longHexNumber, n as PositivePercentage, o as ThemeFont, p as hpsMeasureValue, r as PositiveUniversalMeasure, s as UniversalMeasure, t as Percentage, u as eighthPointMeasureValue, v as positiveUniversalMeasureValue, w as universalMeasureValue, x as signedTwipsMeasureValue, y as shortHexNumber } from "./values-Dqj8cbcy.mjs";
|
|
8
|
-
export {
|
|
8
|
+
export { type AdjustListOptions, type AdjustOptions, type AnimateOneByOneOptions, AnimateOneByOneValue, type AnimationLevelOptions, AnimationLevelValue, type AppPropertiesInput, type AppPropertiesOptions, AxisChartType, type BackdropOptions, type BasePatchOptions, type BevelOptions, BevelPresetType, BlendMode, type BlipEffectsOptions, type BlipFillConfigOptions, type BlipFillMediaData, type BlipFillOptions, type BlipOptions, type BlurEffectOptions, BubbleSeriesData, COLOR_CATEGORIES, type CameraOptions, ChartCollection, ChartData, ChartSeriesData, ChartSpaceOptions, ChartType, type ColorListOptions, ColorMethod, type ColorSchemeOptions, type ColorTransformOptions, type ColorsDefinitionHeaderListOptions, type ColorsDefinitionHeaderOptions, type CompileFn, CompoundLine, type CompressionOptions, type ConnectionSite, type ContentTypeOverrideEntry, type CorePropertiesOptions, type CustomDescriptor, type CustomGeometryOptions, type CustomPropertiesInput, type CustomPropertyOptions, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, type DashStop, DataLabelPosition, DataLabelsOptions, DataType, type DefaultAttributes, type Descriptor, type DescriptorFieldSpec, DescriptorRegistry, type DiagramCategoryOptions, type DiagramDescriptionOptions, type DiagramExtensionListOptions, type DiagramExtensionOptions, type DiagramNameOptions, type DiagramRelationshipIdsOptions, type DiagramStyleLabelOptions, type DiagramStyleOptions, type DiagramTextPropertiesOptions, type EffectContainerType, type EffectDagOptions, type EffectExtent, type EffectListOptions, EmuPosition, ErrorBarDirection, ErrorBarOptions, ErrorBarType, ErrorValueType, FIELD_SPECS, type FieldConsistencyReport, type FillOptions, type FillOverlayEffectOptions, FontCollectionIndex, type FontSchemeOptions, type GeomRect, type GeometryGuide, type GlowEffectOptions, type GradientFillOptions, type GradientShadeOptions, type GradientStop, type GradientStopOptions, type GraphicFrameLockingOptions, type GroupLockingOptions, type GroupTransform2DOptions, type HierBranchOptions, HierBranchStyle, type HslColorOptions, HueDirection, IdFormat, type InnerShadowEffectOptions, LAYOUT_CATEGORIES, type LayoutDefinitionHeaderListOptions, type LayoutDefinitionHeaderOptions, type LightRigOptions, LineCap, LineEndLength, type LineEndOptions, LineEndType, LineEndWidth, LineJoin, type LinearShadeOptions, type MaxChildrenOptions, type MediaDataTransformation, type MediaTransformation, type OnOffStyleType, OoxmlMimeType, type OpcCode, type OpcIssue, type OpcSeverity, type OrderViolation, type OrgChartOptions, type OuterShadowEffectOptions, type OutlineFillProperties, type OutlineOptions, type OutputByType, type OutputType, type OverrideAttributes, PART_REGISTRIES, PPTX_NS, PPTX_PARTS, type PackagePartRegistry, type Packer, type PackerOptions, ParsedArchive, type PartDef, type PartPresence, type PathCommand, type PathFillMode, type PathOptions, type PathShadeOptions, PathShadeType, type PatternFillOptions, PenAlignment, Percentage, type PictureLockingOptions, PixelPosition, type PlaceholderDelimiters, type Point3D, PointPropertySetOptions, PositivePercentage, PositiveUniversalMeasure, type PreferredChildrenOptions, type PresentationLayoutVariablesOptions, PresetColor, type PresetColorOptions, PresetDash, type PresetGeometryOptions, PresetMaterialType, PresetPattern, type PresetShadowEffectOptions, PresetShadowVal, type ReadContext, RectAlignment, type ReflectionEffectOptions, type RelationshipType, Relationships, RelativeMeasure, type RelativeRect, type RenderedParagraphNode, type ReplacerConfig, type RgbColorOptions, type RoundTripResult, STYLE_CATEGORIES, type ScRgbColorOptions, type Scene3DOptions, SchemeColor, type SchemeColorOptions, type Shape3DOptions, type ShapeLockingOptions, SmartArtCollection, SmartArtData, SmartArtRelOptions, type SolidFillOptions, type SourceRectangleOptions, type SphereCoords, type StyleDefinitionHeaderListOptions, type StyleDefinitionHeaderOptions, StyleMatrixIndex, type StyleMatrixReferenceOptions, SystemColor, type SystemColorOptions, type TableCellBorderOptions, type TableCellStyleOptions, type TablePartStyleOptions, type TableStyleListOptions, type TableStyleOptions, type TableStyleRegion, type TableTextStyleOptions, TargetModeType, ThemeColor, ThemeFont, type ThemeOptions, type ThemeableLineStyleOptions, TileAlignment, TileFlipMode, type TileOptions, TimeUnit, TokenNotFoundError, type Transform2DOptions, TreeNode, TrendlineOptions, TrendlineType, UniqueNumericIdCreator, UniversalMeasure, type Vector3D, View3DOptions, type WriteContext, XLSX_PARTS, type XmlNamespaceConfig, type XmlifyedFile, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, type ZipOptions, type Zippable, addSmartArtRelationships, appPropertiesDesc, appendContentType, appendRelationship, applyCorePropertiesOverride, bevelDesc, blipDesc, blipFillDesc, boolDecode, boolEncode, buildContentTypeOverrides, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, calculateEffectExtent, chartSpaceDesc, checkOrder, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPositionToEmu, convertToEmu, convertToTwip, convertUniversalMeasureToEmu, convertUniversalMeasureToTwip, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDataModel, createDefault, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextElementContents, createTextFillColorList, createTextLineColorList, createThemeXml, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, customGeometryDesc, customPropertiesDesc, dateTimeValue, decimalNumber, decodeBase64, derivePasswordHash, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, diffTagSets, effectListDesc, eighthPointMeasureValue, encodeBase64, enumDecode, enumEncode, extractBlipFillMedia, fillDesc, findAndReplaceImagePlaceholders, findFieldSpec, formatId, getColorDescriptor, getColorXml, getFirstLevelElements, getLayoutXml, getMediaRefs, getNextRelationshipIndex, getReferencedMedia, getStyleXml, getVideoRefs, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, hslColorDesc, invertMap, isBase64DataURL, levelForMediaName, longHexNumber, measurementOrPercentValue, outlineDesc, parse, parseArchive, parseColorChoice, parseCorePropsElement, parseTableStyleList, parseUniversalMeasure, patchSpaceAttribute, patternFillDesc, percentageValue, pictureLockingDesc, pointMeasureValue, positiveUniversalMeasureValue, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, randomBytes, replaceAllPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, rgbColorDesc, roundTripFields, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, solidFillDesc, sourceRectangleDesc, strFromU8, stretchDesc, stringify, stringifyAdjustmentValues, stringifyConnection, stringifyDataModel, stringifyPoint, stringifyPresetGeometry, stringifyStretch, stringifyTransPoint, summarizeOpcIssues, systemColorDesc, themeDesc, tileDesc, toJson, toUint8Array, transform2DDesc, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, validateOpcConsistency, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as solidFillDesc, $n as createTileInfo, $r as
|
|
1
|
+
import { $ as solidFillDesc, $n as createTileInfo, $r as unzipSync, $t as convertToTwip, A as bevelDesc, An as createFillOverlayEffect, Ar as SchemeColor, At as createHierBranch, B as shapeLockingDesc, Bn as createLineEnd, Br as PART_REGISTRIES, Bt as createTableStyleList, C as diagramStyleDesc, Cn as PresetShadowVal, Cr as uniqueUuid, Ct as AnimateOneByOneValue, D as sourceRectangleDesc, Dn as createInnerShadowEffect, Dr as createSolidFill, Dt as createAdjustList, E as blipFillDesc, En as createOuterShadowEffect, Er as createColorElement, Et as createAdjust, F as customGeometryDesc, Fn as PresetDash, Fr as createPresetColor, Ft as createGraphicFrameLocking, G as patternFillDesc, Gn as extractBlipFillMedia, Gr as ParsedArchive, Gt as convertEmuToPoints, H as outlineDesc, Hn as createGroupFill, Hr as XLSX_PARTS, Ht as createTransformation, I as presetGeometryDesc, In as createOutline, Ir as createHslColor, It as createGroupLocking, J as parseColorChoice, Jn as PathShadeType, Jr as ZIP_STORED_LEVEL, Jt as convertMillimetersToTwip, K as getColorDescriptor, Kn as PresetPattern, Kr as parseArchive, Kt as convertInchesToEmu, L as graphicFrameLockingDesc, Ln as LineEndLength, Lr as createColorTransforms, Lt as createPictureLocking, M as shape3DDesc, Mn as LineCap, Mr as createScRgbColor, Mt as createOrgChart, N as groupTransform2DDesc, Nn as LineJoin, Nr as createRgbColor, Nt as createPreferredChildren, O as stretchDesc, On as createGlowEffect, Or as SystemColor, Ot as createAnimateOneByOne, P as transform2DDesc, Pn as PenAlignment, Pr as PresetColor, Pt as createPresentationLayoutVariables, Q as schemeColorDesc, Qn as TileAlignment, Qr as strFromU8, Qt as convertToEmu, R as groupLockingDesc, Rn as LineEndType, Rr as buildContentTypeOverrides, Rt as createShapeLocking, S as diagramRelationshipIdsDesc, Sn as createReflectionEffect, Sr as uniqueNumericIdCreator, St as createStyleDefinitionHeaderList, T as blipDesc, Tn as RectAlignment, Tr as toUint8Array, Tt as HierBranchStyle, U as fillDesc, Un as createNoFill, Ur as summarizeOpcIssues, Ut as convertEmuToInches, V as effectListDesc, Vn as createCustomDash, Vr as PPTX_PARTS, Vt as parseTableStyleList, W as gradientFillDesc, Wn as buildFill, Wr as validateOpcConsistency, Wt as convertEmuToPixels, X as rgbColorDesc, Xn as createGradientFill, Xr as createZipStream, Xt as convertPointsToEmu, Y as presetColorDesc, Yn as TileFlipMode, Yr as createPacker, Yt as convertPixelsToEmu, Z as scRgbColorDesc, Zn as createGradientStop, Zr as levelForMediaName, Zt as convertPositionToEmu, _ as derivePasswordHash, _n as createScene3D, _r as xsdVerticalMergeRev, _t as createColorsDefinitionHeader, a as getMediaRefs, ai as encodeBase64, an as stringifyStretch, ar as xsdLineEndSize, at as ColorMethod, b as compileMapping, bn as createEffectList, br as hashedId, bt as createLayoutDefinitionHeaderList, c as hasPlaceholders, ci as createDefault, cn as createExtentionList, cr as xsdPattern, ct as StyleMatrixIndex, d as replaceHyperlinkPlaceholders, di as TargetModeType, dn as stringifyAdjustmentValues, dr as xsdRectAlignment, dt as createFillColorList, ei as zipAndConvert, en as convertUniversalMeasureToEmu, er as invertMap, et as systemColorDesc, f as replaceImagePlaceholders, fn as PresetMaterialType, fr as xsdStrikeStyle, ft as createLineColorList, g as replaceVideoPlaceholders, gn as createBottomBevel, gr as xsdUnderlineStyle, gt as createTextLineColorList, h as replaceSmartArtPlaceholders, hn as createBevel, hr as xsdTextCaps, ht as createTextFillColorList, i as formatId, ii as decodeBase64, in as createTransform2D, ir as xsdLineCap, it as createDiagramRelationshipIds, j as scene3DDesc, jn as CompoundLine, jr as createSchemeColor, jt as createMaxChildren, k as tileDesc, kn as BlendMode, kr as createSystemColor, kt as createAnimationLevel, l as replaceAllPlaceholders, li as createOverride, ln as createCustomGeometry, lr as xsdPenAlignment, lt as createDiagramStyle, m as replaceNumberingPlaceholders, mn as BevelPresetType, mr as xsdTextAnchor, mt as createTextEffectColorList, n as collectPlaceholderKeys, ni as OoxmlMimeType, nn as parseUniversalMeasure, nr as xsdCompoundLine, nt as createDiagramShape3D, o as getReferencedMedia, oi as customPropertiesDesc, on as createBlipFill, or as xsdMaterialType, ot as FontCollectionIndex, p as replaceMediaPlaceholders, pn as createShape3D, pr as xsdTextAlign, pt as createStyleLabel, q as hslColorDesc, qn as createPatternFill, qr as ZIP_DEFLATE_LEVEL, qt as convertInchesToTwip, r as findAndReplaceImagePlaceholders, ri as convertOutput, rn as createGroupTransform2D, rr as xsdEffectContainer, rt as createDiagramTextProperties, s as getVideoRefs, si as appPropertiesDesc, sn as createBlip, sr as xsdPathFillMode, st as HueDirection, t as addSmartArtRelationships, ti as zipSyncAndConvert, tn as convertUniversalMeasureToTwip, tr as xsdBlendMode, tt as createDiagramExtensionList, u as replaceChartPlaceholders, ui as Relationships, un as stringifyPresetGeometry, ur as xsdPresetShadow, ut as createEffectColorList, v as hashPasswordAgile, vn as createEffectDag, vr as createSourceRectangle, vt as createColorsDefinitionHeaderList, w as presentationLayoutVariablesDesc, wn as createPresetShadowEffect, wr as isBase64DataURL, wt as AnimationLevelValue, x as diagramExtensionListDesc, xn as createSoftEdgeEffect, xr as uniqueId, xt as createStyleDefinitionHeader, y as randomBytes, yn as calculateEffectExtent, yr as createBlipEffects, yt as createLayoutDefinitionHeader, z as pictureLockingDesc, zn as LineEndWidth, zr as DOCX_PARTS, zt as createTableStyle } from "./src-CXdJt0WZ.mjs";
|
|
2
|
+
import { _ as buildCorePropertiesXml, a as createReplacer, c as createTokenReplacer, d as createTextElementContents, f as getFirstLevelElements, g as PPTX_NS, h as DOCX_NS, i as appendContentType, l as TokenNotFoundError, m as toJson, n as appendRelationship, o as createTraverser, p as patchSpaceAttribute, r as getNextRelationshipIndex, s as createRunRenderer, t as applyCorePropertiesOverride, u as createSplitInject, v as buildCorePropertiesXmlString, y as parseCorePropsElement } from "./patch-DocIv0Sn.mjs";
|
|
2
3
|
import { a as stringifyDataModel, c as getColorXml, d as COLOR_CATEGORIES, f as LAYOUT_CATEGORIES, i as stringifyTransPoint, l as getLayoutXml, n as SmartArtCollection, o as stringifyConnection, p as STYLE_CATEGORIES, r as stringifyPoint, s as DEFAULT_DRAWING_XML, t as createDataModel, u as getStyleXml } from "./smartart-DCY-Vdv7.mjs";
|
|
3
4
|
import { a as TimeUnit, c as ChartCollection, i as ErrorValueType, n as ErrorBarDirection, o as TrendlineType, r as ErrorBarType, s as chartSpaceDesc, t as DataLabelPosition } from "./chart-DwE8FCFk.mjs";
|
|
4
|
-
import { a as
|
|
5
|
-
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";
|
|
5
|
+
import { a as roundTripFields, c as boolEncode, d as parse, f as stringify, i as diffTagSets, l as enumDecode, n as findFieldSpec, o as DescriptorRegistry, r as checkOrder, s as boolDecode, t as FIELD_SPECS, u as enumEncode } from "./descriptor-BdWTH1vv.mjs";
|
|
6
6
|
import { i as DEFAULT_COLORS, n as createThemeXml, r as buildThemeXml, t as themeDesc } from "./theme-CiNzdl-9.mjs";
|
|
7
7
|
import { _ as twipsMeasureValue, a as eighthPointMeasureValue, b as unsignedDecimalNumber, c as hpsMeasureValue, d as percentageValue, f as pointMeasureValue, g as signedTwipsMeasureValue, h as signedHpsMeasureValue, i as decimalNumber, l as longHexNumber, m as shortHexNumber, n as ThemeFont, o as hexBinary, p as positiveUniversalMeasureValue, r as dateTimeValue, s as hexColorValue, t as ThemeColor, u as measurementOrPercentValue, v as uCharHexNumber, y as universalMeasureValue } from "./values-CVIZcTRw.mjs";
|
|
8
|
-
export {
|
|
8
|
+
export { AnimateOneByOneValue, AnimationLevelValue, BevelPresetType, BlendMode, COLOR_CATEGORIES, ChartCollection, ColorMethod, CompoundLine, DEFAULT_COLORS, DEFAULT_DRAWING_XML, DOCX_NS, DOCX_PARTS, DataLabelPosition, DescriptorRegistry, ErrorBarDirection, ErrorBarType, ErrorValueType, FIELD_SPECS, FontCollectionIndex, HierBranchStyle, HueDirection, LAYOUT_CATEGORIES, LineCap, LineEndLength, LineEndType, LineEndWidth, LineJoin, OoxmlMimeType, PART_REGISTRIES, PPTX_NS, PPTX_PARTS, ParsedArchive, PathShadeType, PenAlignment, PresetColor, PresetDash, PresetMaterialType, PresetPattern, PresetShadowVal, RectAlignment, Relationships, STYLE_CATEGORIES, SchemeColor, SmartArtCollection, StyleMatrixIndex, SystemColor, TargetModeType, ThemeColor, ThemeFont, TileAlignment, TileFlipMode, TimeUnit, TokenNotFoundError, TrendlineType, XLSX_PARTS, ZIP_DEFLATE_LEVEL, ZIP_STORED_LEVEL, addSmartArtRelationships, appPropertiesDesc, appendContentType, appendRelationship, applyCorePropertiesOverride, bevelDesc, blipDesc, blipFillDesc, boolDecode, boolEncode, buildContentTypeOverrides, buildCorePropertiesXml, buildCorePropertiesXmlString, buildFill, buildThemeXml, calculateEffectExtent, chartSpaceDesc, checkOrder, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertPixelsToEmu, convertPointsToEmu, convertPositionToEmu, convertToEmu, convertToTwip, convertUniversalMeasureToEmu, convertUniversalMeasureToTwip, createAdjust, createAdjustList, createAnimateOneByOne, createAnimationLevel, createBevel, createBlip, createBlipEffects, createBlipFill, createBottomBevel, createColorElement, createColorTransforms, createColorsDefinitionHeader, createColorsDefinitionHeaderList, createCustomDash, createCustomGeometry, createDataModel, createDefault, createDiagramExtensionList, createDiagramRelationshipIds, createDiagramShape3D, createDiagramStyle, createDiagramTextProperties, createEffectColorList, createEffectDag, createEffectList, createExtentionList, createFillColorList, createFillOverlayEffect, createGlowEffect, createGradientFill, createGradientStop, createGraphicFrameLocking, createGroupFill, createGroupLocking, createGroupTransform2D, createHierBranch, createHslColor, createInnerShadowEffect, createLayoutDefinitionHeader, createLayoutDefinitionHeaderList, createLineColorList, createLineEnd, createMaxChildren, createNoFill, createOrgChart, createOuterShadowEffect, createOutline, createOverride, createPacker, createPatternFill, createPictureLocking, createPreferredChildren, createPresentationLayoutVariables, createPresetColor, createPresetShadowEffect, createReflectionEffect, createReplacer, createRgbColor, createRunRenderer, createScRgbColor, createScene3D, createSchemeColor, createShape3D, createShapeLocking, createSoftEdgeEffect, createSolidFill, createSourceRectangle, createSplitInject, createStyleDefinitionHeader, createStyleDefinitionHeaderList, createStyleLabel, createSystemColor, createTableStyle, createTableStyleList, createTextEffectColorList, createTextElementContents, createTextFillColorList, createTextLineColorList, createThemeXml, createTileInfo, createTokenReplacer, createTransform2D, createTransformation, createTraverser, createZipStream, customGeometryDesc, customPropertiesDesc, dateTimeValue, decimalNumber, decodeBase64, derivePasswordHash, diagramExtensionListDesc, diagramRelationshipIdsDesc, diagramStyleDesc, diffTagSets, effectListDesc, eighthPointMeasureValue, encodeBase64, enumDecode, enumEncode, extractBlipFillMedia, fillDesc, findAndReplaceImagePlaceholders, findFieldSpec, formatId, getColorDescriptor, getColorXml, getFirstLevelElements, getLayoutXml, getMediaRefs, getNextRelationshipIndex, getReferencedMedia, getStyleXml, getVideoRefs, gradientFillDesc, graphicFrameLockingDesc, groupLockingDesc, groupTransform2DDesc, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, hslColorDesc, invertMap, isBase64DataURL, levelForMediaName, longHexNumber, measurementOrPercentValue, outlineDesc, parse, parseArchive, parseColorChoice, parseCorePropsElement, parseTableStyleList, parseUniversalMeasure, patchSpaceAttribute, patternFillDesc, percentageValue, pictureLockingDesc, pointMeasureValue, positiveUniversalMeasureValue, presentationLayoutVariablesDesc, presetColorDesc, presetGeometryDesc, randomBytes, replaceAllPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, rgbColorDesc, roundTripFields, scRgbColorDesc, scene3DDesc, schemeColorDesc, shape3DDesc, shapeLockingDesc, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, solidFillDesc, sourceRectangleDesc, strFromU8, stretchDesc, stringify, stringifyAdjustmentValues, stringifyConnection, stringifyDataModel, stringifyPoint, stringifyPresetGeometry, stringifyStretch, stringifyTransPoint, summarizeOpcIssues, systemColorDesc, themeDesc, tileDesc, toJson, toUint8Array, transform2DDesc, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, unzipSync, validateOpcConsistency, xsdBlendMode, xsdCompoundLine, xsdEffectContainer, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPresetShadow, xsdRectAlignment, xsdStrikeStyle, xsdTextAlign, xsdTextAnchor, xsdTextCaps, xsdUnderlineStyle, xsdVerticalMergeRev, zipAndConvert, zipSyncAndConvert };
|
package/dist/patch/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { DOCX_NS, PPTX_NS, type RenderedParagraphNode, type ReplacerConfig, TokenNotFoundError, type XmlNamespaceConfig, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
1
|
+
import { _ as ReplacerConfig, a as getNextRelationshipIndex, b as PPTX_NS, c as getFirstLevelElements, d as TokenNotFoundError, f as createSplitInject, g as createRunRenderer, h as RenderedParagraphNode, i as appendRelationship, l as patchSpaceAttribute, m as createTraverser, n as PlaceholderDelimiters, o as appendContentType, p as createTokenReplacer, r as applyCorePropertiesOverride, s as createTextElementContents, t as BasePatchOptions, u as toJson, v as createReplacer, x as XmlNamespaceConfig, y as DOCX_NS } from "../index-DEeO4sOq.mjs";
|
|
2
|
+
export { type BasePatchOptions, DOCX_NS, PPTX_NS, type PlaceholderDelimiters, type RenderedParagraphNode, type ReplacerConfig, TokenNotFoundError, type XmlNamespaceConfig, appendContentType, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
package/dist/patch/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendRelationship, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
1
|
+
import { a as createReplacer, c as createTokenReplacer, d as createTextElementContents, f as getFirstLevelElements, g as PPTX_NS, h as DOCX_NS, i as appendContentType, l as TokenNotFoundError, m as toJson, n as appendRelationship, o as createTraverser, p as patchSpaceAttribute, r as getNextRelationshipIndex, s as createRunRenderer, t as applyCorePropertiesOverride, u as createSplitInject } from "../patch-DocIv0Sn.mjs";
|
|
2
|
+
export { DOCX_NS, PPTX_NS, TokenNotFoundError, appendContentType, appendRelationship, applyCorePropertiesOverride, createReplacer, createRunRenderer, createSplitInject, createTextElementContents, createTokenReplacer, createTraverser, getFirstLevelElements, getNextRelationshipIndex, patchSpaceAttribute, toJson };
|
|
@@ -1,4 +1,118 @@
|
|
|
1
|
-
import { xml2js } from "@office-open/xml";
|
|
1
|
+
import { escapeXml, textOf, xml2js } from "@office-open/xml";
|
|
2
|
+
//#region src/opc/core.ts
|
|
3
|
+
const FIELD_MAP = [
|
|
4
|
+
{
|
|
5
|
+
name: "dc:title",
|
|
6
|
+
key: "title"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: "dc:subject",
|
|
10
|
+
key: "subject"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "dc:creator",
|
|
14
|
+
key: "creator"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "dc:description",
|
|
18
|
+
key: "description"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "cp:keywords",
|
|
22
|
+
key: "keywords"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "cp:lastModifiedBy",
|
|
26
|
+
key: "lastModifiedBy"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "cp:lastPrinted",
|
|
30
|
+
key: "lastPrinted"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "dcterms:created",
|
|
34
|
+
key: "created"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "dcterms:modified",
|
|
38
|
+
key: "modified"
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* Parse core properties from an already-parsed XML element.
|
|
43
|
+
* Shared by docx/pptx/xlsx to extract Dublin Core metadata into the unified
|
|
44
|
+
* {@link CorePropertiesOptions} shape.
|
|
45
|
+
*/
|
|
46
|
+
function parseCorePropsElement(el) {
|
|
47
|
+
if (!el) return {};
|
|
48
|
+
const props = {};
|
|
49
|
+
for (const field of FIELD_MAP) {
|
|
50
|
+
const child = el.elements?.find((e) => e.name === field.name);
|
|
51
|
+
const value = textOf(child) || void 0;
|
|
52
|
+
if (value) props[field.key] = value;
|
|
53
|
+
}
|
|
54
|
+
const revEl = el.elements?.find((e) => e.name === "cp:revision");
|
|
55
|
+
if (revEl) {
|
|
56
|
+
const rev = textOf(revEl);
|
|
57
|
+
if (rev) {
|
|
58
|
+
const n = Number(rev);
|
|
59
|
+
if (!Number.isNaN(n)) props.revision = n;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return props;
|
|
63
|
+
}
|
|
64
|
+
const CORE_PROPS_NS = Object.freeze({ _attr: Object.freeze({
|
|
65
|
+
"xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
|
|
66
|
+
"xmlns:dc": "http://purl.org/dc/elements/1.1/",
|
|
67
|
+
"xmlns:dcmitype": "http://purl.org/dcmitype/",
|
|
68
|
+
"xmlns:dcterms": "http://purl.org/dc/terms/",
|
|
69
|
+
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
|
|
70
|
+
}) });
|
|
71
|
+
const W3CDTF_ATTR = Object.freeze({ _attr: Object.freeze({ "xsi:type": "dcterms:W3CDTF" }) });
|
|
72
|
+
/**
|
|
73
|
+
* Build a cp:coreProperties XML object from metadata.
|
|
74
|
+
*
|
|
75
|
+
* Shared by docx and pptx to avoid duplicating namespace declarations
|
|
76
|
+
* and Dublin Core property construction.
|
|
77
|
+
*/
|
|
78
|
+
function buildCorePropertiesXml(opts) {
|
|
79
|
+
const children = [CORE_PROPS_NS];
|
|
80
|
+
if (opts.title) children.push({ "dc:title": [opts.title] });
|
|
81
|
+
if (opts.subject) children.push({ "dc:subject": [opts.subject] });
|
|
82
|
+
if (opts.creator) children.push({ "dc:creator": [opts.creator] });
|
|
83
|
+
if (opts.keywords) children.push({ "cp:keywords": [opts.keywords] });
|
|
84
|
+
if (opts.description) children.push({ "dc:description": [opts.description] });
|
|
85
|
+
children.push({ "cp:lastModifiedBy": [opts.lastModifiedBy || opts.creator || "Unknown"] });
|
|
86
|
+
if (opts.revision) children.push({ "cp:revision": [String(opts.revision)] });
|
|
87
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
88
|
+
children.push({ "dcterms:created": [W3CDTF_ATTR, now] });
|
|
89
|
+
children.push({ "dcterms:modified": [W3CDTF_ATTR, now] });
|
|
90
|
+
return { "cp:coreProperties": children };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Build a cp:coreProperties XML string directly (fast path).
|
|
94
|
+
*
|
|
95
|
+
* Shared by pptx and xlsx to bypass the toXml() → xml() pipeline.
|
|
96
|
+
* created/modified default to now when not supplied; all other fields emit
|
|
97
|
+
* only when present.
|
|
98
|
+
*/
|
|
99
|
+
function buildCorePropertiesXmlString(opts) {
|
|
100
|
+
const p = ["<cp:coreProperties xmlns:cp=\"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcmitype=\"http://purl.org/dcmitype/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"];
|
|
101
|
+
if (opts.title) p.push(`<dc:title>${escapeXml(opts.title)}</dc:title>`);
|
|
102
|
+
if (opts.subject) p.push(`<dc:subject>${escapeXml(opts.subject)}</dc:subject>`);
|
|
103
|
+
if (opts.creator) p.push(`<dc:creator>${escapeXml(opts.creator)}</dc:creator>`);
|
|
104
|
+
if (opts.keywords) p.push(`<cp:keywords>${escapeXml(opts.keywords)}</cp:keywords>`);
|
|
105
|
+
if (opts.description) p.push(`<dc:description>${escapeXml(opts.description)}</dc:description>`);
|
|
106
|
+
if (opts.lastPrinted) p.push(`<cp:lastPrinted>${escapeXml(opts.lastPrinted)}</cp:lastPrinted>`);
|
|
107
|
+
p.push(`<cp:lastModifiedBy>${escapeXml(opts.lastModifiedBy || opts.creator || "Unknown")}</cp:lastModifiedBy>`);
|
|
108
|
+
if (opts.revision !== void 0) p.push(`<cp:revision>${opts.revision}</cp:revision>`);
|
|
109
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
110
|
+
p.push(`<dcterms:created xsi:type="dcterms:W3CDTF">${opts.created ?? now}</dcterms:created>`);
|
|
111
|
+
p.push(`<dcterms:modified xsi:type="dcterms:W3CDTF">${opts.modified ?? now}</dcterms:modified>`);
|
|
112
|
+
p.push("</cp:coreProperties>");
|
|
113
|
+
return p.join("");
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
2
116
|
//#region src/patch/xml-namespace.ts
|
|
3
117
|
const DOCX_NS = {
|
|
4
118
|
paragraph: "w:p",
|
|
@@ -266,7 +380,7 @@ function createReplacer(config) {
|
|
|
266
380
|
for (const renderedParagraph of renderedParagraphs) {
|
|
267
381
|
const textJson = patch.children.flatMap((c) => formatChild(c, context));
|
|
268
382
|
switch (patch.type) {
|
|
269
|
-
case "
|
|
383
|
+
case "document": {
|
|
270
384
|
const parentElement = goToParentElementFromPath(json, renderedParagraph.pathToParagraph);
|
|
271
385
|
const elementIndex = getLastElementIndexFromPath(renderedParagraph.pathToParagraph);
|
|
272
386
|
parentElement.elements.splice(elementIndex, 1, ...textJson);
|
|
@@ -359,4 +473,12 @@ const appendRelationship = (relationships, id, type, target, targetMode) => {
|
|
|
359
473
|
return relationshipElements;
|
|
360
474
|
};
|
|
361
475
|
//#endregion
|
|
362
|
-
|
|
476
|
+
//#region src/patch/core-properties-override.ts
|
|
477
|
+
function applyCorePropertiesOverride(corePropsDoc, overrides) {
|
|
478
|
+
return buildCorePropertiesXmlString({
|
|
479
|
+
...parseCorePropsElement(corePropsDoc.elements?.find((e) => e.name === "cp:coreProperties") ?? corePropsDoc),
|
|
480
|
+
...overrides
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
export { buildCorePropertiesXml as _, createReplacer as a, createTokenReplacer as c, createTextElementContents as d, getFirstLevelElements as f, PPTX_NS as g, DOCX_NS as h, appendContentType as i, TokenNotFoundError as l, toJson as m, appendRelationship as n, createTraverser as o, patchSpaceAttribute as p, getNextRelationshipIndex as r, createRunRenderer as s, applyCorePropertiesOverride as t, createSplitInject as u, buildCorePropertiesXmlString as v, parseCorePropsElement as y };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PointPropertySetOptions, c as stringifyDataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as stringifyConnection, m as COLOR_CATEGORIES, n as createDataModel, o as stringifyPoint, p as getStyleXml, r as SmartArtCollection, s as stringifyTransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "../index-
|
|
1
|
+
import { a as PointPropertySetOptions, c as stringifyDataModel, d as getColorXml, f as getLayoutXml, g as STYLE_CATEGORIES, h as LAYOUT_CATEGORIES, i as SmartArtData, l as stringifyConnection, m as COLOR_CATEGORIES, n as createDataModel, o as stringifyPoint, p as getStyleXml, r as SmartArtCollection, s as stringifyTransPoint, t as TreeNode, u as DEFAULT_DRAWING_XML } from "../index-CsQP7Cl4.mjs";
|
|
2
2
|
export { COLOR_CATEGORIES, DEFAULT_DRAWING_XML, LAYOUT_CATEGORIES, PointPropertySetOptions, STYLE_CATEGORIES, SmartArtCollection, SmartArtData, TreeNode, createDataModel, getColorXml, getLayoutXml, getStyleXml, stringifyConnection, stringifyDataModel, stringifyPoint, stringifyTransPoint };
|