@office-open/core 0.12.3 → 0.13.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/dist/chart/index.d.mts +2 -2
- package/dist/chart/index.mjs +1 -1
- package/dist/{chart-DEIF3VZn.mjs → chart-Bn_McAo-.mjs} +4 -4
- package/dist/chart-Bn_McAo-.mjs.map +1 -0
- package/dist/drawing/index.d.mts +2 -2
- package/dist/drawing/index.mjs +1 -1
- package/dist/{drawing-BVwCkNXB.mjs → drawing-DJ363Awy.mjs} +102 -108
- package/dist/drawing-DJ363Awy.mjs.map +1 -0
- package/dist/{ext-uri-BHBcIrW7.mjs → ext-uri-BR1ouCh3.mjs} +6 -11
- package/dist/ext-uri-BR1ouCh3.mjs.map +1 -0
- package/dist/{index-DRggxtp7.d.mts → index-6_MYd0cg.d.mts} +3 -3
- package/dist/{index-DRggxtp7.d.mts.map → index-6_MYd0cg.d.mts.map} +1 -1
- package/dist/{index-DPkf_CtG.d.mts → index-BDeoFmTS.d.mts} +146 -149
- package/dist/index-BDeoFmTS.d.mts.map +1 -0
- package/dist/{index-DfFszyH1.d.mts → index-Cd0lFS5x.d.mts} +9 -17
- package/dist/index-Cd0lFS5x.d.mts.map +1 -0
- package/dist/{index-DcukVskh.d.mts → index-DOtPArpl.d.mts} +2 -2
- package/dist/{index-DcukVskh.d.mts.map → index-DOtPArpl.d.mts.map} +1 -1
- package/dist/{index-BwRtWyaP.d.mts → index-Dg0nIw2S.d.mts} +7 -7
- package/dist/{index-BwRtWyaP.d.mts.map → index-Dg0nIw2S.d.mts.map} +1 -1
- package/dist/{index-L6AXewfV.d.mts → index-DkJrkIVp.d.mts} +2 -3
- package/dist/index-DkJrkIVp.d.mts.map +1 -0
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +30 -10
- package/dist/index.mjs.map +1 -1
- package/dist/patch-AkQY17CD.mjs.map +1 -1
- package/dist/smartart/index.d.mts +1 -1
- package/dist/smartart/index.mjs +1 -1
- package/dist/{smartart-YH87Emca.mjs → smartart-D-8KBdQ_.mjs} +4 -4
- package/dist/{smartart-YH87Emca.mjs.map → smartart-D-8KBdQ_.mjs.map} +1 -1
- package/dist/{style-matrix-DjhMuuQg.mjs → style-matrix-B6YSVw6a.mjs} +2 -2
- package/dist/{style-matrix-DjhMuuQg.mjs.map → style-matrix-B6YSVw6a.mjs.map} +1 -1
- package/dist/theme/index.d.mts +3 -3
- package/dist/theme/index.mjs +2 -2
- package/dist/{theme-Dx0Db9bX.mjs → theme-BdqG5lmO.mjs} +3 -3
- package/dist/theme-BdqG5lmO.mjs.map +1 -0
- package/dist/{theme-options-kO89NUEX.d.mts → theme-options-wZX4i_xx.d.mts} +2 -2
- package/dist/{theme-options-kO89NUEX.d.mts.map → theme-options-wZX4i_xx.d.mts.map} +1 -1
- package/dist/util/index.d.mts +2 -2
- package/dist/util/index.mjs +3 -3
- package/dist/{util-iHHKF2Rx.mjs → util-BGfk-gE0.mjs} +2 -2
- package/dist/{util-iHHKF2Rx.mjs.map → util-BGfk-gE0.mjs.map} +1 -1
- package/dist/vector/index.d.mts +2 -2
- package/dist/vector/index.mjs +2 -2
- package/dist/{vector-DZ_OteHJ.mjs → vector-BhETDAdp.mjs} +2 -9
- package/dist/vector-BhETDAdp.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/chart-DEIF3VZn.mjs.map +0 -1
- package/dist/drawing-BVwCkNXB.mjs.map +0 -1
- package/dist/ext-uri-BHBcIrW7.mjs.map +0 -1
- package/dist/index-DPkf_CtG.d.mts.map +0 -1
- package/dist/index-DfFszyH1.d.mts.map +0 -1
- package/dist/index-L6AXewfV.d.mts.map +0 -1
- package/dist/theme-Dx0Db9bX.mjs.map +0 -1
- package/dist/vector-DZ_OteHJ.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { En as shape3DDesc, Jt as outlineDesc, Tn as scene3DDesc, Un as parseColorChoice, V as effectListDesc, Xn as stringifyColorChoice,
|
|
1
|
+
import { En as shape3DDesc, Jt as outlineDesc, Tn as scene3DDesc, Un as parseColorChoice, V as effectListDesc, Xn as stringifyColorChoice, an as fillDesc } from "./drawing-DJ363Awy.mjs";
|
|
2
2
|
import { findChild } from "@office-open/xml";
|
|
3
3
|
//#region src/theme/style-matrix.ts
|
|
4
4
|
/**
|
|
@@ -120,4 +120,4 @@ function parseFormatScheme(el, ctx) {
|
|
|
120
120
|
//#endregion
|
|
121
121
|
export { stringifyShapeStyle as i, parseShapeStyle as n, stringifyFormatScheme as r, parseFormatScheme as t };
|
|
122
122
|
|
|
123
|
-
//# sourceMappingURL=style-matrix-
|
|
123
|
+
//# sourceMappingURL=style-matrix-B6YSVw6a.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-matrix-DjhMuuQg.mjs","names":[],"sources":["../src/theme/style-matrix.ts"],"sourcesContent":["/**\n * Format scheme / style matrix (a:fmtScheme / CT_StyleMatrix) and shape style\n * (a:style / CT_ShapeStyle) stringify + parse.\n *\n * Reuses core fill/outline/effect/3d descriptors so the style matrix round-trips\n * through the same machinery as shape properties.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport {\n effectListDesc,\n fillDesc,\n outlineDesc,\n parseColorChoice,\n scene3DDesc,\n shape3DDesc,\n stringifyColorChoice,\n} from \"../drawing\";\nimport type { SolidFillOptions } from \"../drawing\";\nimport type {\n EffectStyleOptions,\n FontReferenceOptions,\n FormatSchemeOptions,\n DefaultShapeStyleOptions,\n StyleMatrixReferenceOptions,\n} from \"./theme-options\";\n\n// ── Style matrix reference (a:lnRef / a:fillRef / a:effectRef) ──\n\nfunction stringifyStyleMatrixReference(\n tag: string,\n opts: StyleMatrixReferenceOptions,\n ctx: WriteContext,\n): string {\n const color = opts.color ? stringifyColorChoice(opts.color, ctx) : \"\";\n return `<${tag} idx=\"${opts.index}\">${color}</${tag}>`;\n}\n\nfunction parseStyleMatrixReference(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): StyleMatrixReferenceOptions | undefined {\n if (!el?.attributes) return undefined;\n const idx = el.attributes[\"idx\"];\n if (idx === undefined) return undefined;\n const parsedColor = parseColorChoice(el, ctx);\n const color = parsedColor && Object.keys(parsedColor).length > 0 ? parsedColor : undefined;\n return color ? { index: Number(idx), color } : { index: Number(idx) };\n}\n\n// ── Font reference (a:fontRef) ──\n\nfunction stringifyFontReference(opts: FontReferenceOptions, ctx: WriteContext): string {\n const color = opts.color ? stringifyColorChoice(opts.color, ctx) : \"\";\n return `<a:fontRef idx=\"${opts.collection}\">${color}</a:fontRef>`;\n}\n\nfunction parseFontReference(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): FontReferenceOptions | undefined {\n if (!el?.attributes) return undefined;\n const idx = el.attributes[\"idx\"];\n if (idx !== \"major\" && idx !== \"minor\" && idx !== \"none\") return undefined;\n const parsedColor = parseColorChoice(el, ctx);\n const color: SolidFillOptions | undefined =\n parsedColor && Object.keys(parsedColor).length > 0 ? parsedColor : undefined;\n return color ? { collection: idx, color } : { collection: idx };\n}\n\n// ── Shape style (a:style / CT_ShapeStyle) ──\n\nexport function stringifyShapeStyle(\n opts: DefaultShapeStyleOptions,\n ctx: WriteContext,\n /**\n * Wrapper element — CT_ShapeStyle serializes under several names across\n * packages (a:style in theme objectDefaults, xdr:style in spreadsheet\n * drawings). Children stay in the a: namespace either way.\n */\n wrapTag = \"a:style\",\n): string {\n const lnRef = stringifyStyleMatrixReference(\"a:lnRef\", opts.lineReference, ctx);\n const fillRef = stringifyStyleMatrixReference(\"a:fillRef\", opts.fillReference, ctx);\n const effectRef = stringifyStyleMatrixReference(\"a:effectRef\", opts.effectReference, ctx);\n const fontRef = stringifyFontReference(opts.fontReference, ctx);\n return `<${wrapTag}>${lnRef}${fillRef}${effectRef}${fontRef}</${wrapTag}>`;\n}\n\nexport function parseShapeStyle(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): DefaultShapeStyleOptions | undefined {\n if (!el) return undefined;\n const lineReference = parseStyleMatrixReference(findChild(el, \"a:lnRef\"), ctx);\n const fillReference = parseStyleMatrixReference(findChild(el, \"a:fillRef\"), ctx);\n const effectReference = parseStyleMatrixReference(findChild(el, \"a:effectRef\"), ctx);\n const fontReference = parseFontReference(findChild(el, \"a:fontRef\"), ctx);\n if (!lineReference || !fillReference || !effectReference || !fontReference) return undefined;\n return { lineReference, fillReference, effectReference, fontReference };\n}\n\n// ── Effect style (a:effectStyle / CT_EffectStyleItem) ──\n\nfunction stringifyEffectStyle(opts: EffectStyleOptions, ctx: WriteContext): string {\n const effectLst = opts.effects\n ? (effectListDesc.stringify(opts.effects, ctx) ?? \"\")\n : \"<a:effectLst/>\";\n const scene3d = opts.scene3d ? (scene3DDesc.stringify(opts.scene3d, ctx) ?? \"\") : \"\";\n const shape3d = opts.shape3d ? (shape3DDesc.stringify(opts.shape3d, ctx) ?? \"\") : \"\";\n return `<a:effectStyle>${effectLst}${scene3d}${shape3d}</a:effectStyle>`;\n}\n\nfunction parseEffectStyle(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): EffectStyleOptions | undefined {\n if (!el) return undefined;\n const result: Partial<EffectStyleOptions> = {};\n const effectLst = findChild(el, \"a:effectLst\");\n if (effectLst) {\n const effects = effectListDesc.parse(effectLst, ctx);\n if (effects && Object.keys(effects).length > 0) result.effects = effects;\n }\n const scene3dEl = findChild(el, \"a:scene3d\");\n if (scene3dEl) result.scene3d = scene3DDesc.parse(scene3dEl, ctx);\n const shape3dEl = findChild(el, \"a:sp3d\");\n if (shape3dEl) result.shape3d = shape3DDesc.parse(shape3dEl, ctx);\n return result as EffectStyleOptions | undefined;\n}\n\n// ── Format scheme (a:fmtScheme / CT_StyleMatrix) ──\n\n/** Serialize a:fmtScheme. */\nexport function stringifyFormatScheme(opts: FormatSchemeOptions, ctx: WriteContext): string {\n const fillStyles = opts.fillStyles.map((f) => fillDesc.stringify(f, ctx) ?? \"\").join(\"\");\n const lineStyles = opts.lineStyles.map((l) => outlineDesc.stringify(l, ctx) ?? \"\").join(\"\");\n const effectStyles = opts.effectStyles.map((e) => stringifyEffectStyle(e, ctx)).join(\"\");\n const backgroundFillStyles = opts.backgroundFillStyles\n .map((f) => fillDesc.stringify(f, ctx) ?? \"\")\n .join(\"\");\n const name = opts.name ?? \"Office\";\n return `<a:fmtScheme name=\"${name}\"><a:fillStyleLst>${fillStyles}</a:fillStyleLst><a:lnStyleLst>${lineStyles}</a:lnStyleLst><a:effectStyleLst>${effectStyles}</a:effectStyleLst><a:bgFillStyleLst>${backgroundFillStyles}</a:bgFillStyleLst></a:fmtScheme>`;\n}\n\n/** Parse a:fmtScheme. */\nexport function parseFormatScheme(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): FormatSchemeOptions | undefined {\n if (!el) return undefined;\n const result: FormatSchemeOptions = {\n fillStyles: [],\n lineStyles: [],\n effectStyles: [],\n backgroundFillStyles: [],\n };\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n\n const fillStyleLst = findChild(el, \"a:fillStyleLst\");\n if (fillStyleLst) {\n for (const child of fillStyleLst.elements ?? []) {\n const fill = fillDesc.parse(child, ctx);\n if (fill) result.fillStyles.push(fill);\n }\n }\n const lnStyleLst = findChild(el, \"a:lnStyleLst\");\n if (lnStyleLst) {\n for (const child of lnStyleLst.elements ?? []) {\n if (child.name !== \"a:ln\") continue;\n const line = outlineDesc.parse(child, ctx);\n if (line) result.lineStyles.push(line);\n }\n }\n const effectStyleLst = findChild(el, \"a:effectStyleLst\");\n if (effectStyleLst) {\n for (const child of effectStyleLst.elements ?? []) {\n if (child.name !== \"a:effectStyle\") continue;\n const effect = parseEffectStyle(child, ctx);\n if (effect) result.effectStyles.push(effect);\n }\n }\n const bgFillStyleLst = findChild(el, \"a:bgFillStyleLst\");\n if (bgFillStyleLst) {\n for (const child of bgFillStyleLst.elements ?? []) {\n const fill = fillDesc.parse(child, ctx);\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;CAEF,MAAM,iBAAiB,UAAU,IAAI,kBAAkB;CACvD,IAAI,gBACF,KAAK,MAAM,SAAS,eAAe,YAAY,CAAC,GAAG;EACjD,IAAI,MAAM,SAAS,iBAAiB;EACpC,MAAM,SAAS,iBAAiB,OAAO,GAAG;EAC1C,IAAI,QAAQ,OAAO,aAAa,KAAK,MAAM;CAC7C;CAEF,MAAM,iBAAiB,UAAU,IAAI,kBAAkB;CACvD,IAAI,gBACF,KAAK,MAAM,SAAS,eAAe,YAAY,CAAC,GAAG;EACjD,MAAM,OAAO,SAAS,MAAM,OAAO,GAAG;EACtC,IAAI,MAAM,OAAO,qBAAqB,KAAK,IAAI;CACjD;CAEF,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"style-matrix-B6YSVw6a.mjs","names":[],"sources":["../src/theme/style-matrix.ts"],"sourcesContent":["/**\n * Format scheme / style matrix (a:fmtScheme / CT_StyleMatrix) and shape style\n * (a:style / CT_ShapeStyle) stringify + parse.\n *\n * Reuses core fill/outline/effect/3d descriptors so the style matrix round-trips\n * through the same machinery as shape properties.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport {\n effectListDesc,\n fillDesc,\n outlineDesc,\n parseColorChoice,\n scene3DDesc,\n shape3DDesc,\n stringifyColorChoice,\n} from \"../drawing\";\nimport type { SolidFillOptions } from \"../drawing\";\nimport type {\n EffectStyleOptions,\n FontReferenceOptions,\n FormatSchemeOptions,\n DefaultShapeStyleOptions,\n StyleMatrixReferenceOptions,\n} from \"./theme-options\";\n\n// ── Style matrix reference (a:lnRef / a:fillRef / a:effectRef) ──\n\nfunction stringifyStyleMatrixReference(\n tag: string,\n opts: StyleMatrixReferenceOptions,\n ctx: WriteContext,\n): string {\n const color = opts.color ? stringifyColorChoice(opts.color, ctx) : \"\";\n return `<${tag} idx=\"${opts.index}\">${color}</${tag}>`;\n}\n\nfunction parseStyleMatrixReference(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): StyleMatrixReferenceOptions | undefined {\n if (!el?.attributes) return undefined;\n const idx = el.attributes[\"idx\"];\n if (idx === undefined) return undefined;\n const parsedColor = parseColorChoice(el, ctx);\n const color = parsedColor && Object.keys(parsedColor).length > 0 ? parsedColor : undefined;\n return color ? { index: Number(idx), color } : { index: Number(idx) };\n}\n\n// ── Font reference (a:fontRef) ──\n\nfunction stringifyFontReference(opts: FontReferenceOptions, ctx: WriteContext): string {\n const color = opts.color ? stringifyColorChoice(opts.color, ctx) : \"\";\n return `<a:fontRef idx=\"${opts.collection}\">${color}</a:fontRef>`;\n}\n\nfunction parseFontReference(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): FontReferenceOptions | undefined {\n if (!el?.attributes) return undefined;\n const idx = el.attributes[\"idx\"];\n if (idx !== \"major\" && idx !== \"minor\" && idx !== \"none\") return undefined;\n const parsedColor = parseColorChoice(el, ctx);\n const color: SolidFillOptions | undefined =\n parsedColor && Object.keys(parsedColor).length > 0 ? parsedColor : undefined;\n return color ? { collection: idx, color } : { collection: idx };\n}\n\n// ── Shape style (a:style / CT_ShapeStyle) ──\n\nexport function stringifyShapeStyle(\n opts: DefaultShapeStyleOptions,\n ctx: WriteContext,\n /**\n * Wrapper element — CT_ShapeStyle serializes under several names across\n * packages (a:style in theme objectDefaults, xdr:style in spreadsheet\n * drawings). Children stay in the a: namespace either way.\n */\n wrapTag = \"a:style\",\n): string {\n const lnRef = stringifyStyleMatrixReference(\"a:lnRef\", opts.lineReference, ctx);\n const fillRef = stringifyStyleMatrixReference(\"a:fillRef\", opts.fillReference, ctx);\n const effectRef = stringifyStyleMatrixReference(\"a:effectRef\", opts.effectReference, ctx);\n const fontRef = stringifyFontReference(opts.fontReference, ctx);\n return `<${wrapTag}>${lnRef}${fillRef}${effectRef}${fontRef}</${wrapTag}>`;\n}\n\nexport function parseShapeStyle(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): DefaultShapeStyleOptions | undefined {\n if (!el) return undefined;\n const lineReference = parseStyleMatrixReference(findChild(el, \"a:lnRef\"), ctx);\n const fillReference = parseStyleMatrixReference(findChild(el, \"a:fillRef\"), ctx);\n const effectReference = parseStyleMatrixReference(findChild(el, \"a:effectRef\"), ctx);\n const fontReference = parseFontReference(findChild(el, \"a:fontRef\"), ctx);\n if (!lineReference || !fillReference || !effectReference || !fontReference) return undefined;\n return { lineReference, fillReference, effectReference, fontReference };\n}\n\n// ── Effect style (a:effectStyle / CT_EffectStyleItem) ──\n\nfunction stringifyEffectStyle(opts: EffectStyleOptions, ctx: WriteContext): string {\n const effectLst = opts.effects\n ? (effectListDesc.stringify(opts.effects, ctx) ?? \"\")\n : \"<a:effectLst/>\";\n const scene3d = opts.scene3d ? (scene3DDesc.stringify(opts.scene3d, ctx) ?? \"\") : \"\";\n const shape3d = opts.shape3d ? (shape3DDesc.stringify(opts.shape3d, ctx) ?? \"\") : \"\";\n return `<a:effectStyle>${effectLst}${scene3d}${shape3d}</a:effectStyle>`;\n}\n\nfunction parseEffectStyle(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): EffectStyleOptions | undefined {\n if (!el) return undefined;\n const result: Partial<EffectStyleOptions> = {};\n const effectLst = findChild(el, \"a:effectLst\");\n if (effectLst) {\n const effects = effectListDesc.parse(effectLst, ctx);\n if (effects && Object.keys(effects).length > 0) result.effects = effects;\n }\n const scene3dEl = findChild(el, \"a:scene3d\");\n if (scene3dEl) result.scene3d = scene3DDesc.parse(scene3dEl, ctx);\n const shape3dEl = findChild(el, \"a:sp3d\");\n if (shape3dEl) result.shape3d = shape3DDesc.parse(shape3dEl, ctx);\n return result as EffectStyleOptions | undefined;\n}\n\n// ── Format scheme (a:fmtScheme / CT_StyleMatrix) ──\n\n/** Serialize a:fmtScheme. */\nexport function stringifyFormatScheme(opts: FormatSchemeOptions, ctx: WriteContext): string {\n const fillStyles = opts.fillStyles.map((f) => fillDesc.stringify(f, ctx) ?? \"\").join(\"\");\n const lineStyles = opts.lineStyles.map((l) => outlineDesc.stringify(l, ctx) ?? \"\").join(\"\");\n const effectStyles = opts.effectStyles.map((e) => stringifyEffectStyle(e, ctx)).join(\"\");\n const backgroundFillStyles = opts.backgroundFillStyles\n .map((f) => fillDesc.stringify(f, ctx) ?? \"\")\n .join(\"\");\n const name = opts.name ?? \"Office\";\n return `<a:fmtScheme name=\"${name}\"><a:fillStyleLst>${fillStyles}</a:fillStyleLst><a:lnStyleLst>${lineStyles}</a:lnStyleLst><a:effectStyleLst>${effectStyles}</a:effectStyleLst><a:bgFillStyleLst>${backgroundFillStyles}</a:bgFillStyleLst></a:fmtScheme>`;\n}\n\n/** Parse a:fmtScheme. */\nexport function parseFormatScheme(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): FormatSchemeOptions | undefined {\n if (!el) return undefined;\n const result: FormatSchemeOptions = {\n fillStyles: [],\n lineStyles: [],\n effectStyles: [],\n backgroundFillStyles: [],\n };\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n\n const fillStyleLst = findChild(el, \"a:fillStyleLst\");\n if (fillStyleLst) {\n for (const child of fillStyleLst.elements ?? []) {\n const fill = fillDesc.parse(child, ctx);\n if (fill) result.fillStyles.push(fill);\n }\n }\n const lnStyleLst = findChild(el, \"a:lnStyleLst\");\n if (lnStyleLst) {\n for (const child of lnStyleLst.elements ?? []) {\n if (child.name !== \"a:ln\") continue;\n const line = outlineDesc.parse(child, ctx);\n if (line) result.lineStyles.push(line);\n }\n }\n const effectStyleLst = findChild(el, \"a:effectStyleLst\");\n if (effectStyleLst) {\n for (const child of effectStyleLst.elements ?? []) {\n if (child.name !== \"a:effectStyle\") continue;\n const effect = parseEffectStyle(child, ctx);\n if (effect) result.effectStyles.push(effect);\n }\n }\n const bgFillStyleLst = findChild(el, \"a:bgFillStyleLst\");\n if (bgFillStyleLst) {\n for (const child of bgFillStyleLst.elements ?? []) {\n const fill = fillDesc.parse(child, ctx);\n if (fill) result.backgroundFillStyles.push(f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U,IAAI,kBAAkB;CACvD,IAAI,gBACF,KAAK,MAAM,SAAS,eAAe,YAAY,CAAC,GAAG;EACjD,IAAI,MAAM,SAAS,iBAAiB;EACpC,MAAM,SAAS,iBAAiB,OAAO,GAAG;EAC1C,IAAI,QAAQ,OAAO,aAAa,KAAK,MAAM;CAC7C;CAEF,MAAM,iBAAiB,UAAU,IAAI,kBAAkB;CACvD,IAAI,gBACF,KAAK,MAAM,SAAS,eAAe,YAAY,CAAC,GAAG;EACjD,MAAM,OAAO,SAAS,MAAM,OAAO,GAAG;EACtC,IAAI,MAAM,OAAO,qBAAqB,KAAK,IAAI;CACjD;CAEF,OAAO;AACT"}
|
package/dist/theme/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as ThemeOverrideOptions, a as DefaultShapeDefinitionOptions, c as ExtraColorSchemeOptions, d as FontSchemeOptions, f as FormatSchemeOptions, g as ThemeOptions, h as TextFontOptions, i as CustomColorOptions, l as FontCollectionOptions, m as SupplementalFontOptions, n as ColorSchemeIndex, o as DefaultShapeStyleOptions, p as ObjectDefaultsOptions, r as ColorSchemeOptions, s as EffectStyleOptions, t as ColorMappingOptions, u as FontReferenceOptions } from "../theme-options-
|
|
3
|
-
import { a as stringifyColorMapping, c as themeOverrideDesc, d as buildThemeXml, f as createThemeXml, i as parseColorMapping, l as themeDesc, n as stringifyShapeStyle, o as ThemeManagerOptions, r as DEFAULT_COLOR_MAPPING, s as themeManagerDesc, t as parseShapeStyle, u as DEFAULT_COLORS } from "../index-
|
|
1
|
+
import { In as StyleMatrixReferenceOptions } from "../index-BDeoFmTS.mjs";
|
|
2
|
+
import { _ as ThemeOverrideOptions, a as DefaultShapeDefinitionOptions, c as ExtraColorSchemeOptions, d as FontSchemeOptions, f as FormatSchemeOptions, g as ThemeOptions, h as TextFontOptions, i as CustomColorOptions, l as FontCollectionOptions, m as SupplementalFontOptions, n as ColorSchemeIndex, o as DefaultShapeStyleOptions, p as ObjectDefaultsOptions, r as ColorSchemeOptions, s as EffectStyleOptions, t as ColorMappingOptions, u as FontReferenceOptions } from "../theme-options-wZX4i_xx.mjs";
|
|
3
|
+
import { a as stringifyColorMapping, c as themeOverrideDesc, d as buildThemeXml, f as createThemeXml, i as parseColorMapping, l as themeDesc, n as stringifyShapeStyle, o as ThemeManagerOptions, r as DEFAULT_COLOR_MAPPING, s as themeManagerDesc, t as parseShapeStyle, u as DEFAULT_COLORS } from "../index-DOtPArpl.mjs";
|
|
4
4
|
export { type ColorMappingOptions, type ColorSchemeIndex, type ColorSchemeOptions, type CustomColorOptions, DEFAULT_COLORS, DEFAULT_COLOR_MAPPING, type DefaultShapeDefinitionOptions, type DefaultShapeStyleOptions, type EffectStyleOptions, type ExtraColorSchemeOptions, type FontCollectionOptions, type FontReferenceOptions, type FontSchemeOptions, type FormatSchemeOptions, type ObjectDefaultsOptions, type StyleMatrixReferenceOptions, type SupplementalFontOptions, type TextFontOptions, type ThemeManagerOptions, type ThemeOptions, type ThemeOverrideOptions, buildThemeXml, createThemeXml, parseColorMapping, parseShapeStyle, stringifyColorMapping, stringifyShapeStyle, themeDesc, themeManagerDesc, themeOverrideDesc };
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as stringifyShapeStyle, n as parseShapeStyle } from "../style-matrix-
|
|
1
|
+
import { i as stringifyShapeStyle, n as parseShapeStyle } from "../style-matrix-B6YSVw6a.mjs";
|
|
2
2
|
import { n as parseColorMapping, r as stringifyColorMapping, t as DEFAULT_COLOR_MAPPING } from "../color-mapping-CFF0vRSe.mjs";
|
|
3
|
-
import { a as buildThemeXml, i as createThemeXml, n as themeOverrideDesc, o as DEFAULT_COLORS, r as themeDesc, t as themeManagerDesc } from "../theme-
|
|
3
|
+
import { a as buildThemeXml, i as createThemeXml, n as themeOverrideDesc, o as DEFAULT_COLORS, r as themeDesc, t as themeManagerDesc } from "../theme-BdqG5lmO.mjs";
|
|
4
4
|
export { DEFAULT_COLORS, DEFAULT_COLOR_MAPPING, buildThemeXml, createThemeXml, parseColorMapping, parseShapeStyle, stringifyColorMapping, stringifyShapeStyle, themeDesc, themeManagerDesc, themeOverrideDesc };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as bodyPropertiesDesc, Un as parseColorChoice, Xn as stringifyColorChoice, Zn as systemColorDesc, j as shapePropertiesDesc, u as textListStyleDesc } from "./drawing-
|
|
2
|
-
import { i as stringifyShapeStyle, n as parseShapeStyle, r as stringifyFormatScheme, t as parseFormatScheme } from "./style-matrix-
|
|
1
|
+
import { S as bodyPropertiesDesc, Un as parseColorChoice, Xn as stringifyColorChoice, Zn as systemColorDesc, j as shapePropertiesDesc, u as textListStyleDesc } from "./drawing-DJ363Awy.mjs";
|
|
2
|
+
import { i as stringifyShapeStyle, n as parseShapeStyle, r as stringifyFormatScheme, t as parseFormatScheme } from "./style-matrix-B6YSVw6a.mjs";
|
|
3
3
|
import { n as parseColorMapping, r as stringifyColorMapping } from "./color-mapping-CFF0vRSe.mjs";
|
|
4
4
|
import { escapeXml, findChild } from "@office-open/xml";
|
|
5
5
|
//#region src/theme/default-colors.ts
|
|
@@ -423,4 +423,4 @@ const themeManagerDesc = {
|
|
|
423
423
|
//#endregion
|
|
424
424
|
export { buildThemeXml as a, createThemeXml as i, themeOverrideDesc as n, DEFAULT_COLORS as o, themeDesc as r, themeManagerDesc as t };
|
|
425
425
|
|
|
426
|
-
//# sourceMappingURL=theme-
|
|
426
|
+
//# sourceMappingURL=theme-BdqG5lmO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-BdqG5lmO.mjs","names":[],"sources":["../src/theme/default-colors.ts","../src/theme/color-scheme.ts","../src/theme/custom-color.ts","../src/theme/extra-color-scheme.ts","../src/theme/font-scheme.ts","../src/theme/object-defaults.ts","../src/theme/build-theme-xml.ts","../src/theme/default-theme.ts","../src/theme/theme-descriptors.ts","../src/theme/theme-override.ts"],"sourcesContent":["/**\n * Default Office 2016+ theme colors.\n *\n * @module\n */\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\n/** Office 2016+ default theme colors (hex without #). */\nexport const DEFAULT_COLORS: Record<Exclude<keyof ColorSchemeOptions, \"name\">, string> = {\n dark1: \"000000\",\n light1: \"FFFFFF\",\n dark2: \"44546A\",\n light2: \"E7E6E6\",\n accent1: \"4472C4\",\n accent2: \"ED7D31\",\n accent3: \"A5A5A5\",\n accent4: \"FFC000\",\n accent5: \"5B9BD5\",\n accent6: \"70AD47\",\n hyperlink: \"0563C1\",\n followedHyperlink: \"954F72\",\n};\n","/**\n * Color scheme (a:clrScheme / CT_ColorScheme) stringify + parse.\n *\n * Every slot accepts a hex string (emits a:srgbClr) or a structured\n * SystemColorOptions (emits a:sysClr verbatim). dk1/lt1 default to the\n * conventional windowText/window sysClr form; parse reads both forms back\n * losslessly, so a source's sysClr spelling survives round-trip.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { systemColorDesc } from \"../drawing\";\nimport type { SystemColorOptions } from \"../drawing\";\nimport { DEFAULT_COLORS } from \"./default-colors\";\nimport type { ColorSchemeOptions } from \"./theme-options\";\n\nexport type { SchemeColorValue } from \"./theme-options\";\n\n/** Color keys excluding the clrScheme/`@name` attribute. */\ntype ColorKey = Exclude<keyof ColorSchemeOptions, \"name\">;\n\n/** clrScheme child tag → ColorSchemeOptions key, in schema order. */\nconst COLOR_TAGS: ReadonlyArray<{ tag: string; key: ColorKey }> = [\n { tag: \"a:dk1\", key: \"dark1\" },\n { tag: \"a:lt1\", key: \"light1\" },\n { tag: \"a:dk2\", key: \"dark2\" },\n { tag: \"a:lt2\", key: \"light2\" },\n { tag: \"a:accent1\", key: \"accent1\" },\n { tag: \"a:accent2\", key: \"accent2\" },\n { tag: \"a:accent3\", key: \"accent3\" },\n { tag: \"a:accent4\", key: \"accent4\" },\n { tag: \"a:accent5\", key: \"accent5\" },\n { tag: \"a:accent6\", key: \"accent6\" },\n { tag: \"a:hlink\", key: \"hyperlink\" },\n { tag: \"a:folHlink\", key: \"followedHyperlink\" },\n];\n\n/** The conventional dk1/lt1 sysClr forms emitted when a slot is unset. */\nconst DEFAULT_SYS_CLR: Partial<Record<ColorKey, string>> = {\n dark1: \"windowText\",\n light1: \"window\",\n};\n\nfunction stringifyColorTag(\n tag: string,\n key: ColorKey,\n opts: ColorSchemeOptions | undefined,\n): string {\n const userValue = opts?.[key];\n if (userValue !== undefined) {\n const colorXml =\n typeof userValue === \"string\"\n ? `<a:srgbClr val=\"${userValue}\"/>`\n : (systemColorDesc.stringify(userValue, undefined as never) ?? \"\");\n return `<${tag}>${colorXml}</${tag}>`;\n }\n const defaultValue = DEFAULT_COLORS[key];\n const sysClr = DEFAULT_SYS_CLR[key];\n if (sysClr) {\n return `<${tag}><a:sysClr val=\"${sysClr}\" lastClr=\"${defaultValue}\"/></${tag}>`;\n }\n return `<${tag}><a:srgbClr val=\"${defaultValue}\"/></${tag}>`;\n}\n\n/** Serialize a:clrScheme. Undefined options emit the full default scheme. */\nexport function stringifyColorScheme(\n opts: ColorSchemeOptions | undefined,\n fallbackName: string,\n): string {\n const name = opts?.name ?? fallbackName;\n const tags = COLOR_TAGS.map(({ tag, key }) => stringifyColorTag(tag, key, opts)).join(\"\");\n return `<a:clrScheme name=\"${name}\">${tags}</a:clrScheme>`;\n}\n\n/** Parse a:clrScheme into the subset of colors explicitly present. */\nexport function parseColorScheme(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ColorSchemeOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ColorSchemeOptions> = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n for (const { tag, key } of COLOR_TAGS) {\n const colorEl = findChild(el, tag);\n if (!colorEl) continue;\n const sysClr = findChild(colorEl, \"a:sysClr\");\n if (sysClr) {\n result[key] = systemColorDesc.parse(sysClr, ctx) as SystemColorOptions;\n continue;\n }\n const srgb = findChild(colorEl, \"a:srgbClr\");\n const val = srgb?.attributes?.[\"val\"];\n if (val !== undefined) result[key] = String(val);\n }\n return result;\n}\n","/**\n * Custom colors (a:custClr / CT_CustomColor) stringify + parse.\n *\n * Each entry is a named color choice; the list wrapper (a:custClrLst /\n * CT_CustomColorList) sits after extraClrSchemeLst in a theme.\n *\n * @module\n */\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { parseColorChoice, stringifyColorChoice } from \"../drawing\";\nimport type { SolidFillOptions } from \"../drawing\";\nimport type { CustomColorOptions } from \"./theme-options\";\n\n/** Serialize a:custClrLst. Returns \"\" when no custom colors set (optional element). */\nexport function stringifyCustomColors(\n opts: CustomColorOptions[] | undefined,\n ctx: WriteContext,\n): string {\n if (!opts || opts.length === 0) return \"\";\n const items = opts\n .map((c) => {\n const name = c.name ? ` name=\"${c.name}\"` : \"\";\n return `<a:custClr${name}>${stringifyColorChoice(c.color, ctx)}</a:custClr>`;\n })\n .join(\"\");\n return `<a:custClrLst>${items}</a:custClrLst>`;\n}\n\n/** Parse a:custClrLst. */\nexport function parseCustomColors(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): CustomColorOptions[] | undefined {\n if (!el) return undefined;\n const result: CustomColorOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:custClr\") continue;\n const color: SolidFillOptions | undefined = parseColorChoice(child, ctx);\n if (!color) continue;\n const name = child.attributes?.[\"name\"];\n result.push(name !== undefined ? { name: String(name), color } : { color });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Extra color scheme (a:extraClrScheme / CT_ExtraColorScheme) stringify + parse.\n *\n * Each entry pairs a color scheme with an optional color mapping. The list\n * wrapper (a:extraClrSchemeLst / CT_ColorSchemeList) holds zero or more entries.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext } from \"../descriptor\";\nimport { parseColorMapping, stringifyColorMapping } from \"./color-mapping\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport type { ExtraColorSchemeOptions } from \"./theme-options\";\n\n/** Serialize a:extraClrSchemeLst. Returns an empty element when no schemes set. */\nexport function stringifyExtraColorSchemes(\n opts: ExtraColorSchemeOptions[] | undefined,\n fallbackName: string,\n): string {\n if (!opts || opts.length === 0) return \"<a:extraClrSchemeLst/>\";\n const items = opts\n .map((scheme) => {\n const clrScheme = stringifyColorScheme(\n scheme.colorScheme,\n scheme.colorScheme.name ?? fallbackName,\n );\n const clrMap = scheme.colorMapping ? stringifyColorMapping(scheme.colorMapping) : \"\";\n return `<a:extraClrScheme>${clrScheme}${clrMap}</a:extraClrScheme>`;\n })\n .join(\"\");\n return `<a:extraClrSchemeLst>${items}</a:extraClrSchemeLst>`;\n}\n\n/** Parse a:extraClrSchemeLst. */\nexport function parseExtraColorSchemes(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ExtraColorSchemeOptions[] | undefined {\n if (!el) return undefined;\n const result: ExtraColorSchemeOptions[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"a:extraClrScheme\") continue;\n const colorScheme = parseColorScheme(findChild(child, \"a:clrScheme\"), ctx);\n if (!colorScheme) continue;\n const colorMapping = parseColorMapping(findChild(child, \"a:clrMap\"));\n result.push(colorMapping ? { colorScheme, colorMapping } : { colorScheme });\n }\n return result.length > 0 ? result : undefined;\n}\n","/**\n * Font scheme (a:fontScheme / CT_FontScheme) stringify + parse.\n *\n * CT_FontCollection order: latin → ea → cs → font[] (supplemental).\n *\n * @module\n */\nimport { escapeXml } from \"@office-open/xml\";\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type {\n FontCollectionOptions,\n FontSchemeOptions,\n SupplementalFontOptions,\n TextFontOptions,\n} from \"./theme-options\";\n\n// ── TextFont (a:latin / a:ea / a:cs) ──\n\nfunction stringifyTextFont(tag: string, opts: TextFontOptions | undefined): string {\n if (!opts) return \"\";\n const attrs = [`typeface=\"${escapeXml(opts.typeface)}\"`];\n if (opts.panose !== undefined) attrs.push(`panose=\"${escapeXml(opts.panose)}\"`);\n if (opts.pitchFamily !== undefined) attrs.push(`pitchFamily=\"${opts.pitchFamily}\"`);\n if (opts.charset !== undefined) attrs.push(`charset=\"${opts.charset}\"`);\n return `<${tag} ${attrs.join(\" \")}/>`;\n}\n\nfunction parseTextFont(el: XmlElement | undefined): TextFontOptions | undefined {\n if (!el?.attributes) return undefined;\n const typeface = el.attributes[\"typeface\"];\n if (typeface === undefined) return undefined;\n const result: TextFontOptions = { typeface: String(typeface) };\n if (el.attributes[\"panose\"] !== undefined) result.panose = String(el.attributes[\"panose\"]);\n if (el.attributes[\"pitchFamily\"] !== undefined)\n result.pitchFamily = Number(el.attributes[\"pitchFamily\"]);\n if (el.attributes[\"charset\"] !== undefined) result.charset = Number(el.attributes[\"charset\"]);\n return result;\n}\n\n// ── Font collection (a:majorFont / a:minorFont) ──\n\nfunction stringifyFontCollection(tag: string, opts: FontCollectionOptions | undefined): string {\n const latin = stringifyTextFont(\"a:latin\", opts?.latin);\n const eastAsian = stringifyTextFont(\"a:ea\", opts?.eastAsian);\n const complexScript = stringifyTextFont(\"a:cs\", opts?.complexScript);\n const supplemental = (opts?.supplementalFonts ?? [])\n .map((f) => `<a:font script=\"${escapeXml(f.script)}\" typeface=\"${escapeXml(f.typeface)}\"/>`)\n .join(\"\");\n return `<${tag}>${latin}${eastAsian}${complexScript}${supplemental}</${tag}>`;\n}\n\nfunction parseFontCollection(el: XmlElement | undefined): FontCollectionOptions | undefined {\n if (!el) return undefined;\n const result: FontCollectionOptions = {};\n const latin = parseTextFont(findChild(el, \"a:latin\"));\n if (latin) result.latin = latin;\n const eastAsian = parseTextFont(findChild(el, \"a:ea\"));\n if (eastAsian) result.eastAsian = eastAsian;\n const complexScript = parseTextFont(findChild(el, \"a:cs\"));\n if (complexScript) result.complexScript = complexScript;\n const supplementalFonts = (el.elements ?? [])\n .filter((c) => c.name === \"a:font\")\n .map((c): SupplementalFontOptions | undefined => {\n const script = c.attributes?.[\"script\"];\n const typeface = c.attributes?.[\"typeface\"];\n if (script === undefined || typeface === undefined) return undefined;\n return { script: String(script), typeface: String(typeface) };\n })\n .filter((v): v is SupplementalFontOptions => v !== undefined);\n if (supplementalFonts.length > 0) result.supplementalFonts = supplementalFonts;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n\n// ── Fresh defaults (Office theme major/minor fonts) ──\n\nconst DEFAULT_MAJOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri Light\", panose: \"020F0302020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\nconst DEFAULT_MINOR_FONT: FontCollectionOptions = {\n latin: { typeface: \"Calibri\", panose: \"020F0502020204030204\" },\n eastAsian: { typeface: \"\" },\n complexScript: { typeface: \"\" },\n};\n\n// ── Font scheme (a:fontScheme) ──\n\n/** Serialize a:fontScheme. Undefined options emit the Office default scheme. */\nexport function stringifyFontScheme(\n opts: FontSchemeOptions | undefined,\n fallbackName: string,\n): string {\n // Merge defaults so the XSD-required latin/ea/cs slots are always present,\n // even when the caller only customizes one font (e.g. latin typeface).\n const majorFont = stringifyFontCollection(\n \"a:majorFont\",\n opts?.majorFont ? { ...DEFAULT_MAJOR_FONT, ...opts.majorFont } : DEFAULT_MAJOR_FONT,\n );\n const minorFont = stringifyFontCollection(\n \"a:minorFont\",\n opts?.minorFont ? { ...DEFAULT_MINOR_FONT, ...opts.minorFont } : DEFAULT_MINOR_FONT,\n );\n const name = opts?.name ?? fallbackName;\n return `<a:fontScheme name=\"${name}\">${majorFont}${minorFont}</a:fontScheme>`;\n}\n\n/** Parse a:fontScheme. Returns undefined only when neither major nor minor font is present. */\nexport function parseFontScheme(el: XmlElement | undefined): FontSchemeOptions | undefined {\n if (!el) return undefined;\n const result: FontSchemeOptions = {};\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n const majorFont = parseFontCollection(findChild(el, \"a:majorFont\"));\n if (majorFont) result.majorFont = majorFont;\n const minorFont = parseFontCollection(findChild(el, \"a:minorFont\"));\n if (minorFont) result.minorFont = minorFont;\n return Object.keys(result).length > 0 ? result : undefined;\n}\n","/**\n * Object defaults (a:objectDefaults / CT_ObjectStyleDefaults) stringify + parse.\n *\n * Each default definition (spDef/lnDef/txDef) holds shape properties, body\n * properties, list style, and an optional shape style. Reuses core descriptors\n * so defaults round-trip through the same machinery as shapes.\n *\n * @module\n */\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { ReadContext, WriteContext } from \"../descriptor\";\nimport { bodyPropertiesDesc, shapePropertiesDesc, textListStyleDesc } from \"../drawing\";\nimport { parseShapeStyle, stringifyShapeStyle } from \"./style-matrix\";\nimport type { DefaultShapeDefinitionOptions, ObjectDefaultsOptions } from \"./theme-options\";\n\nfunction stringifyDefaultShapeDefinition(\n tag: string,\n opts: DefaultShapeDefinitionOptions,\n ctx: WriteContext,\n): string {\n // spPr/bodyPr/lstStyle are minOccurs=1 in CT_DefaultShapeDefinition — a\n // present-but-empty section must still emit its (empty) element. The spPr\n // and lstStyle descriptors return inner content only, so the wrapper tags\n // are added here.\n const spPr =\n opts.shapeProperties !== undefined\n ? `<a:spPr>${shapePropertiesDesc.stringify(opts.shapeProperties, ctx) ?? \"\"}</a:spPr>`\n : \"\";\n const bodyPr =\n opts.bodyProperties !== undefined\n ? bodyPropertiesDesc.stringify(opts.bodyProperties, ctx) || \"<a:bodyPr/>\"\n : \"\";\n const lstStyle =\n opts.listStyle !== undefined\n ? `<a:lstStyle>${textListStyleDesc.stringify(opts.listStyle, ctx) ?? \"\"}</a:lstStyle>`\n : \"\";\n const style = opts.shapeStyle ? stringifyShapeStyle(opts.shapeStyle, ctx) : \"\";\n return `<${tag}>${spPr}${bodyPr}${lstStyle}${style}</${tag}>`;\n}\n\nfunction parseDefaultShapeDefinition(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): DefaultShapeDefinitionOptions | undefined {\n if (!el) return undefined;\n const result: Partial<DefaultShapeDefinitionOptions> = {};\n // An empty element still marks the section present (the stringify leg\n // re-emits the empty marker), so `?? {}` — never drop on empty.\n const spPr = findChild(el, \"a:spPr\");\n if (spPr) result.shapeProperties = shapePropertiesDesc.parse(spPr, ctx) ?? {};\n const bodyPr = findChild(el, \"a:bodyPr\");\n if (bodyPr) result.bodyProperties = bodyPropertiesDesc.parse(bodyPr, ctx) ?? {};\n const lstStyle = findChild(el, \"a:lstStyle\");\n if (lstStyle) result.listStyle = textListStyleDesc.parse(lstStyle, ctx) ?? {};\n const style = findChild(el, \"a:style\");\n if (style) {\n const shapeStyle = parseShapeStyle(style, ctx);\n if (shapeStyle) result.shapeStyle = shapeStyle;\n }\n return Object.keys(result).length > 0 ? (result as DefaultShapeDefinitionOptions) : undefined;\n}\n\n/** Serialize a:objectDefaults. Returns an empty element when no defaults set. */\nexport function stringifyObjectDefaults(\n opts: ObjectDefaultsOptions | undefined,\n ctx: WriteContext,\n): string {\n if (!opts) return \"<a:objectDefaults/>\";\n const spDef = opts.shapeDefault\n ? stringifyDefaultShapeDefinition(\"a:spDef\", opts.shapeDefault, ctx)\n : \"\";\n const lnDef = opts.lineDefault\n ? stringifyDefaultShapeDefinition(\"a:lnDef\", opts.lineDefault, ctx)\n : \"\";\n const txDef = opts.textDefault\n ? stringifyDefaultShapeDefinition(\"a:txDef\", opts.textDefault, ctx)\n : \"\";\n if (!spDef && !lnDef && !txDef) return \"<a:objectDefaults/>\";\n return `<a:objectDefaults>${spDef}${lnDef}${txDef}</a:objectDefaults>`;\n}\n\n/** Parse a:objectDefaults. */\nexport function parseObjectDefaults(\n el: XmlElement | undefined,\n ctx: ReadContext,\n): ObjectDefaultsOptions | undefined {\n if (!el) return undefined;\n const result: Partial<ObjectDefaultsOptions> = {};\n const shapeDefault = parseDefaultShapeDefinition(findChild(el, \"a:spDef\"), ctx);\n if (shapeDefault) result.shapeDefault = shapeDefault;\n const lineDefault = parseDefaultShapeDefinition(findChild(el, \"a:lnDef\"), ctx);\n if (lineDefault) result.lineDefault = lineDefault;\n const textDefault = parseDefaultShapeDefinition(findChild(el, \"a:txDef\"), ctx);\n if (textDefault) result.textDefault = textDefault;\n return Object.keys(result).length > 0 ? (result as ObjectDefaultsOptions) : undefined;\n}\n","/**\n * Build theme XML string — structured driver over the CT_BaseStyles parts.\n *\n * Fresh output stays byte-identical to Office by reusing a pre-extracted\n * default fmtScheme fragment (O(1) fast path) unless the caller supplies a\n * structured formatScheme / objectDefaults / extraColorSchemes, in which case\n * the relevant descriptor serializes them.\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { stringifyColorScheme } from \"./color-scheme\";\nimport { stringifyCustomColors } from \"./custom-color\";\nimport { stringifyExtraColorSchemes } from \"./extra-color-scheme\";\nimport { stringifyFontScheme } from \"./font-scheme\";\nimport { stringifyObjectDefaults } from \"./object-defaults\";\nimport { stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Default Office fmtScheme — byte-identical to fresh output, keeps the common\n// path O(1) without running fill/line/effect descriptors.\nconst DEFAULT_FORMAT_SCHEME_XML =\n '<a:fmtScheme name=\"Office\"><a:fillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"110000\"/>' +\n '<a:satMod val=\"105000\"/><a:tint val=\"67000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\">' +\n '<a:lumMod val=\"105000\"/><a:satMod val=\"103000\"/><a:tint val=\"73000\"/></a:schemeClr></a:gs>' +\n '<a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"105000\"/><a:satMod val=\"109000\"/><a:tint val=\"81000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill><a:gradFill rotWithShape=\"1\">' +\n '<a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/><a:satMod val=\"103000\"/><a:tint val=\"94000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"50000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"100000\"/><a:satMod val=\"110000\"/>' +\n '<a:shade val=\"100000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"99000\"/>' +\n '<a:satMod val=\"120000\"/><a:shade val=\"78000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/>' +\n '</a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w=\"6350\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill>' +\n '<a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n '<a:ln w=\"12700\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln><a:ln w=\"19050\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\">' +\n '<a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/><a:miter lim=\"800000\"/></a:ln>' +\n \"</a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/>\" +\n '</a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"57150\" dist=\"19050\" dir=\"5400000\" algn=\"ctr\" ' +\n 'rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"63000\"/></a:srgbClr></a:outerShdw></a:effectLst>' +\n '</a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill>' +\n '<a:solidFill><a:schemeClr val=\"phClr\"><a:tint val=\"95000\"/><a:satMod val=\"170000\"/></a:schemeClr></a:solidFill>' +\n '<a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:lumMod val=\"102000\"/>' +\n '<a:satMod val=\"150000\"/><a:tint val=\"93000\"/><a:shade val=\"98000\"/></a:schemeClr></a:gs><a:gs pos=\"50000\">' +\n '<a:schemeClr val=\"phClr\"><a:lumMod val=\"103000\"/><a:satMod val=\"130000\"/><a:tint val=\"98000\"/><a:shade val=\"90000\"/>' +\n '</a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:satMod val=\"120000\"/><a:shade val=\"63000\"/>' +\n '</a:schemeClr></a:gs></a:gsLst><a:lin ang=\"5400000\" scaled=\"0\"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme>';\n\nfunction requireCtx(ctx: WriteContext | undefined, field: string): WriteContext {\n if (!ctx) throw new Error(`buildThemeXml: ${field} requires a WriteContext`);\n return ctx;\n}\n\nexport function buildThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n const opts = options ?? {};\n const name = opts.name ?? \"Office Theme\";\n\n const clrScheme = stringifyColorScheme(opts.colorScheme, name);\n const fontScheme = stringifyFontScheme(opts.fontScheme, name);\n const fmtScheme = opts.formatScheme\n ? stringifyFormatScheme(opts.formatScheme, requireCtx(ctx, \"formatScheme\"))\n : DEFAULT_FORMAT_SCHEME_XML;\n const objectDefaults = opts.objectDefaults\n ? stringifyObjectDefaults(opts.objectDefaults, requireCtx(ctx, \"objectDefaults\"))\n : \"<a:objectDefaults/>\";\n const extraClrSchemeLst = stringifyExtraColorSchemes(opts.extraColorSchemes, name);\n const custClrLst = opts.customColors\n ? stringifyCustomColors(opts.customColors, requireCtx(ctx, \"customColors\"))\n : \"\";\n\n return (\n `<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"${name}\">` +\n `<a:themeElements>${clrScheme}${fontScheme}${fmtScheme}</a:themeElements>` +\n `${objectDefaults}${extraClrSchemeLst}${custClrLst}</a:theme>`\n );\n}\n","/**\n * Theme XML generation — pure function.\n *\n * Fresh output (no options) returns a pre-computed default; anything else\n * rebuilds via buildThemeXml (simple customizations don't need a WriteContext).\n *\n * @module\n */\nimport type { WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport type { ThemeOptions } from \"./theme-options\";\n\n// Pre-computed default theme XML — zero allocation for the common case.\nconst DEFAULT_XML = buildThemeXml();\n\n/**\n * Generate theme XML string from options.\n * Returns the pre-computed default when no options are provided.\n */\nexport function createThemeXml(options?: ThemeOptions, ctx?: WriteContext): string {\n if (!options) return DEFAULT_XML;\n return buildThemeXml(options, ctx);\n}\n","/**\n * Theme descriptor — bidirectional mapping between ThemeOptions and theme XML.\n *\n * stringify delegates to buildThemeXml (structured driver). parse reads the full\n * CT_BaseStyles surface: colorScheme, fontScheme, formatScheme, objectDefaults,\n * and extraClrSchemeLst — so every part round-trips.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\nimport type { Element as XmlElement } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, ReadContext, WriteContext } from \"../descriptor\";\nimport { buildThemeXml } from \"./build-theme-xml\";\nimport { parseColorScheme } from \"./color-scheme\";\nimport { parseCustomColors } from \"./custom-color\";\nimport { parseExtraColorSchemes } from \"./extra-color-scheme\";\nimport { parseFontScheme } from \"./font-scheme\";\nimport { parseObjectDefaults } from \"./object-defaults\";\nimport { parseFormatScheme } from \"./style-matrix\";\nimport type { ThemeOptions } from \"./theme-options\";\n\nexport const themeDesc: CustomDescriptor<ThemeOptions, WriteContext, ThemeOptions> = {\n kind: \"custom\",\n\n stringify(opts: ThemeOptions, ctx: WriteContext): string | undefined {\n return buildThemeXml(opts, ctx);\n },\n\n parse(el: XmlElement, ctx: ReadContext): ThemeOptions {\n const result: Partial<ThemeOptions> = {};\n\n const name = el.attributes?.[\"name\"];\n if (name) result.name = String(name);\n\n const themeElements = findChild(el, \"a:themeElements\");\n if (themeElements) {\n const colorScheme = parseColorScheme(findChild(themeElements, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(themeElements, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(themeElements, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n }\n\n const objectDefaults = parseObjectDefaults(findChild(el, \"a:objectDefaults\"), ctx);\n if (objectDefaults) result.objectDefaults = objectDefaults;\n\n const extraColorSchemes = parseExtraColorSchemes(findChild(el, \"a:extraClrSchemeLst\"), ctx);\n if (extraColorSchemes) result.extraColorSchemes = extraColorSchemes;\n\n const customColors = parseCustomColors(findChild(el, \"a:custClrLst\"), ctx);\n if (customColors) result.customColors = customColors;\n\n return result as ThemeOptions;\n },\n};\n","/**\n * Theme override and theme manager descriptors.\n *\n * a:themeOverride (CT_BaseStylesOverride) is the root of a themeOverride{n}.xml\n * part — an optional subset of the base styles that a slide/layout/master can\n * reference to deviate from its owning theme. a:themeManager (CT_EmptyElement)\n * is the root of the legacy themeManager part; it carries no content.\n *\n * @module\n */\n\nimport { findChild } from \"@office-open/xml\";\n\nimport type { CustomDescriptor, WriteContext } from \"../descriptor\";\nimport { parseColorScheme, stringifyColorScheme } from \"./color-scheme\";\nimport { parseFontScheme, stringifyFontScheme } from \"./font-scheme\";\nimport { parseFormatScheme, stringifyFormatScheme } from \"./style-matrix\";\nimport type { ThemeOverrideOptions } from \"./theme-options\";\n\nconst THEME_NS = 'xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"';\n\nexport const themeOverrideDesc: CustomDescriptor<\n ThemeOverrideOptions,\n WriteContext,\n ThemeOverrideOptions\n> = {\n kind: \"custom\",\n\n stringify(opts, ctx) {\n let content = \"\";\n if (opts.colorScheme) {\n content += stringifyColorScheme(opts.colorScheme, opts.colorScheme.name ?? \"Override\");\n }\n if (opts.fontScheme) {\n content += stringifyFontScheme(opts.fontScheme, opts.fontScheme.name ?? \"Override\");\n }\n if (opts.formatScheme) content += stringifyFormatScheme(opts.formatScheme, ctx);\n return `<a:themeOverride ${THEME_NS}>${content}</a:themeOverride>`;\n },\n\n parse(el, ctx) {\n const result: Partial<ThemeOverrideOptions> = {};\n const colorScheme = parseColorScheme(findChild(el, \"a:clrScheme\"), ctx);\n if (colorScheme) result.colorScheme = colorScheme;\n const fontScheme = parseFontScheme(findChild(el, \"a:fontScheme\"));\n if (fontScheme) result.fontScheme = fontScheme;\n const formatScheme = parseFormatScheme(findChild(el, \"a:fmtScheme\"), ctx);\n if (formatScheme) result.formatScheme = formatScheme;\n return result as ThemeOverrideOptions;\n },\n};\n\n/** Options for a themeManager part — CT_EmptyElement has no content or attributes. */\nexport type ThemeManagerOptions = Record<never, never>;\n\nexport const themeManagerDesc: CustomDescriptor<\n ThemeManagerOptions,\n WriteContext,\n ThemeManagerOptions\n> = {\n kind: \"custom\",\n\n stringify(_opts, _ctx) {\n return `<a:themeManager ${THEME_NS}/>`;\n },\n\n parse(_el, _ctx) {\n return {};\n },\n};\n"],"mappings":";;;;;;AAQA,MAAa,iBAA4E;CACvF,OAAO;CACP,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,mBAAmB;AACrB;;;;;;;;;;;;;;ACIA,MAAM,aAA4D;CAChE;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAS,KAAK;CAAQ;CAC7B;EAAE,KAAK;EAAS,KAAK;CAAS;CAC9B;EAAE,KAAK;EAAa,KAAK;CAAU;CACnC;EAAE,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C,OAAO;CACT;AACF;AAKA,MAAa,mBAIT;CACF,MAAM;CAEN,UAAU,OAAO,MAAM;EACrB,OAAO,mBAAmB,SAAS;CACrC;CAEA,MAAM,KAAK,MAAM;EACf,OAAO,CAAC;CACV;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as Panose } from "./values-BECDm4zr.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Ea as FillOptions, In as StyleMatrixReferenceOptions, Ja as SystemColorOptions, Qi as EffectListOptions, Ur as BodyPropertiesOptions, Wa as SolidFillOptions, gi as Scene3DOptions, oi as Shape3DOptions, ri as ShapePropertiesOptions, ur as TextListStyleOptions, wi as OutlineOptions } from "./index-BDeoFmTS.mjs";
|
|
3
3
|
//#region src/theme/theme-options.d.ts
|
|
4
4
|
interface TextFontOptions {
|
|
5
5
|
typeface: string;
|
|
@@ -106,4 +106,4 @@ interface ThemeOptions {
|
|
|
106
106
|
type ThemeOverrideOptions = Pick<ThemeOptions, "colorScheme" | "fontScheme" | "formatScheme">;
|
|
107
107
|
//#endregion
|
|
108
108
|
export { ThemeOverrideOptions as _, DefaultShapeDefinitionOptions as a, ExtraColorSchemeOptions as c, FontSchemeOptions as d, FormatSchemeOptions as f, ThemeOptions as g, TextFontOptions as h, CustomColorOptions as i, FontCollectionOptions as l, SupplementalFontOptions as m, ColorSchemeIndex as n, DefaultShapeStyleOptions as o, ObjectDefaultsOptions as p, ColorSchemeOptions as r, EffectStyleOptions as s, ColorMappingOptions as t, FontReferenceOptions as u };
|
|
109
|
-
//# sourceMappingURL=theme-options-
|
|
109
|
+
//# sourceMappingURL=theme-options-wZX4i_xx.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-options-
|
|
1
|
+
{"version":3,"file":"theme-options-wZX4i_xx.d.mts","names":[],"sources":["../src/theme/theme-options.ts"],"mappings":";;;UA4BiB;EACf;EACA,SAAS;EACT;EACA;;UAIe;EACf;EACA;;UAIe;EACf,QAAQ;EAER,YAAY;EAEZ,gBAAgB;EAChB,oBAAoB;;UAIL;EACf,YAAY;EACZ,YAAY;EACZ;;KAOU,4BAA4B;UAGvB;EACf,QAAQ;EACR,SAAS;EACT,QAAQ;EACR,SAAS;EACT,UAAU;EACV,UAAU;EACV,UAAU;EACV,UAAU;EACV,UAAU;EACV,UAAU;EACV,YAAY;EACZ,oBAAoB;EAEpB;;UAIe;EAEf;EACA,QAAQ;;UAIO;EACf,eAAe;EACf,eAAe;EACf,iBAAiB;EACjB,eAAe;;UAIA;EACf,UAAU;EACV,UAAU;EACV,UAAU;;UAIK;EAEf,YAAY;EAEZ,YAAY;EAEZ,cAAc;EAEd,sBAAsB;EACtB;;UAIe;EACf,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,aAAa;;UAIE;EAEf,eAAe;EAEf,cAAc;EAEd,cAAc;;KAIJ;UAeK;EACf,aAAa;EACb,OAAO;EACP,aAAa;EACb,OAAO;EACP,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,WAAW;EACX,mBAAmB;;UAIJ;EACf,aAAa;EACb,eAAe,QAAQ;;UAIR;EAEf;EAEA,OAAO;;UAIQ;EACf;EACA,cAAc;EACd,aAAa;EACb,eAAe;EACf,iBAAiB;EACjB,oBAAoB;EACpB,eAAe;;KAIL,uBAAuB,KACjC"}
|
package/dist/util/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as toUint8Array, n as ToUint8ArrayOptions, r as isBase64DataURL, t as DataType } from "../data-type-CZMKVaaT.mjs";
|
|
2
2
|
import { A as positiveUniversalMeasureValue, C as hexColorValue, D as parseOnOff, E as measurementOrPercentValue, F as twipsMeasureValue, I as uCharHexNumber, L as universalMeasureValue, M as signedHpsMeasureValue, N as signedTwipsMeasureValue, O as percentageValue, P as stripColorHashPrefix, R as unsignedDecimalNumber, S as hexBinary, T as longHexNumber, _ as UniversalMeasure, a as HexColor, b as decimalNumber, c as Panose, d as PositiveUniversalMeasure, f as RelativeMeasure, g as UcharHexNumber, h as ThemeFont, i as Guid, j as shortHexNumber, k as pointMeasureValue, l as Percentage, m as ThemeColor, n as Base64, o as HexColorOrAuto, p as ShortHexNumber, r as DateTime, s as LongHexNumber, t as ArgbHexColor, u as PositivePercentage, v as UnsignedShortHex, w as hpsMeasureValue, x as eighthPointMeasureValue, y as dateTimeValue } from "../values-BECDm4zr.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
export { ArgbHexColor, Base64, DataType, DateTime, Guid, HexColor, HexColorOrAuto, IdFormat, ImageFileType, LongHexNumber, Panose, Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ShortHexNumber, SmartArtRelOptions, ThemeColor, ThemeFont, ToUint8ArrayOptions, UcharHexNumber, UniqueNumericIdCreator, UniversalMeasure, UnsignedShortHex, XmlifyedFileEntry, addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu,
|
|
3
|
+
import { $ as xsdLightRigDirection, $t as convertTwipToEmu, A as xsdAnimValueType, At as UniqueNumericIdCreator, B as xsdCompoundLine, Bt as convertEmuToPixels, C as replacePlaceholders, Ct as xsdTextVerticalType, D as xsdAnimCalcMode, Dt as xsdVerticalMergeRev, E as invertMap, Et as xsdUnderlineStyle, F as xsdAxisOrientation, Ft as extUriMatches, G as xsdEffectContainer, Gt as convertMillimetersToTwip, H as xsdDataLabelPosition, Ht as convertEmuToTwip, I as xsdAxisPosition, It as derivePasswordHash, J as xsdHierBranch, Jt as convertPointsToTwip, K as xsdErrorValueType, Kt as convertPixelsToEmu, L as xsdBlendMode, Lt as hashPasswordAgile, M as xsdAxisCrossBetween, Mt as uniqueId, N as xsdAxisCrosses, Nt as uniqueNumericIdCreator, O as xsdAnimClass, Ot as ImageFileType, P as xsdAxisLabelAlignment, Pt as uniqueUuid, Q as xsdLegendPosition, Qt as convertToTwip, R as xsdChartBuild, Rt as randomBytes, S as replaceOlePlaceholders, St as xsdTextTabAlignment, T as replaceVideoPlaceholders, Tt as xsdTrendlineType, U as xsdDiagramBuild, Ut as convertInchesToEmu, V as xsdConsolidateFunction, Vt as convertEmuToPoints, W as xsdDiagramDirection, Wt as convertInchesToTwip, X as xsdIterateType, Xt as convertToInch, Y as xsdHueDirection, Yt as convertToEmu, Z as xsdJcAlignment, Zt as convertToPt, _ as replaceImageLinkPlaceholders, _t as xsdTableWidthType, a as findAndReplaceImagePlaceholders, an as emitPercent, at as xsdPathFillMode, b as replaceNumberingPlaceholders, bt as xsdTextBuild, c as getMediaRefs, cn as parsePercent, ct as xsdPlaceholderType, d as getVideoRefs, dn as XmlifyedFileEntry, dt as xsdResizeHandles, en as convertUniversalMeasureToEmu, et as xsdLineCap, f as hasPlaceholders, fn as addBinaryFile, ft as xsdShadingPattern, g as replaceHyperlinkPlaceholders, gt as xsdStrikeStyle, h as replaceChartPlaceholders, ht as xsdSplitType, i as collectPlaceholderKeys, in as emitAngle, it as xsdOrient, j as xsdAnimationDgmBuild, jt as hashedId, k as xsdAnimLevel, kt as imageTypeFromPath, l as getOleRefs, ln as parsePercentAttr, lt as xsdPresetShadow, m as replaceAudioPlaceholders, mt as xsdSlideLayoutType, n as SmartArtRelOptions, nn as convertUniversalMeasureToPt, nt as xsdMaterialType, o as formatId, on as mapOptional, ot as xsdPattern, p as replaceAllPlaceholders, pn as compileMapping, pt as xsdSizeRepresents, q as xsdFontAlignment, qt as convertPointsToEmu, r as addSmartArtRelationships, rn as convertUniversalMeasureToTwip, rt as xsdMathStyle, s as getAudioRefs, sn as parseAngle, st as xsdPenAlignment, t as IdFormat, tn as convertUniversalMeasureToInch, tt as xsdLineEndSize, u as getReferencedMedia, un as parseUniversalMeasure, ut as xsdRectAlignment, v as replaceImagePlaceholders, vt as xsdTextAlign, w as replaceSmartArtPlaceholders, wt as xsdTotalsRowFunction, x as replaceOleLinkPlaceholders, xt as xsdTextCaps, y as replaceMediaPlaceholders, yt as xsdTextAnchor, z as xsdComments, zt as convertEmuToInches } from "../index-Cd0lFS5x.mjs";
|
|
4
|
+
export { ArgbHexColor, Base64, DataType, DateTime, Guid, HexColor, HexColorOrAuto, IdFormat, ImageFileType, LongHexNumber, Panose, Percentage, PositivePercentage, PositiveUniversalMeasure, RelativeMeasure, ShortHexNumber, SmartArtRelOptions, ThemeColor, ThemeFont, ToUint8ArrayOptions, UcharHexNumber, UniqueNumericIdCreator, UniversalMeasure, UnsignedShortHex, XmlifyedFileEntry, addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, emitAngle, emitPercent, extUriMatches, findAndReplaceImagePlaceholders, formatId, getAudioRefs, getMediaRefs, getOleRefs, getReferencedMedia, getVideoRefs, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, imageTypeFromPath, invertMap, isBase64DataURL, longHexNumber, mapOptional, measurementOrPercentValue, parseAngle, parseOnOff, parsePercent, parsePercentAttr, parseUniversalMeasure, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceAllPlaceholders, replaceAudioPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImageLinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceOleLinkPlaceholders, replaceOlePlaceholders, replacePlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, stripColorHashPrefix, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, xsdAnimCalcMode, xsdAnimClass, xsdAnimLevel, xsdAnimValueType, xsdAnimationDgmBuild, xsdAxisCrossBetween, xsdAxisCrosses, xsdAxisLabelAlignment, xsdAxisOrientation, xsdAxisPosition, xsdBlendMode, xsdChartBuild, xsdComments, xsdCompoundLine, xsdConsolidateFunction, xsdDataLabelPosition, xsdDiagramBuild, xsdDiagramDirection, xsdEffectContainer, xsdErrorValueType, xsdFontAlignment, xsdHierBranch, xsdHueDirection, xsdIterateType, xsdJcAlignment, xsdLegendPosition, xsdLightRigDirection, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdMathStyle, xsdOrient, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPlaceholderType, xsdPresetShadow, xsdRectAlignment, xsdResizeHandles, xsdShadingPattern, xsdSizeRepresents, xsdSlideLayoutType, xsdSplitType, xsdStrikeStyle, xsdTableWidthType, xsdTextAlign, xsdTextAnchor, xsdTextBuild, xsdTextCaps, xsdTextTabAlignment, xsdTextVerticalType, xsdTotalsRowFunction, xsdTrendlineType, xsdUnderlineStyle, xsdVerticalMergeRev };
|
package/dist/util/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as replaceVideoPlaceholders, D as addBinaryFile, E as randomBytes, O as compileMapping, S as replaceSmartArtPlaceholders, T as hashPasswordAgile, _ as replaceMediaPlaceholders, a as getAudioRefs, b as replaceOlePlaceholders, c as getReferencedMedia, d as replaceAllPlaceholders, f as replaceAudioPlaceholders, g as replaceImagePlaceholders, h as replaceImageLinkPlaceholders, i as formatId, l as getVideoRefs, m as replaceHyperlinkPlaceholders, n as collectPlaceholderKeys, o as getMediaRefs, p as replaceChartPlaceholders, r as findAndReplaceImagePlaceholders, s as getOleRefs, t as addSmartArtRelationships, u as hasPlaceholders, v as replaceNumberingPlaceholders, w as derivePasswordHash, x as replacePlaceholders, y as replaceOleLinkPlaceholders } from "../util-
|
|
2
|
-
import { $ as
|
|
3
|
-
export { addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu,
|
|
1
|
+
import { C as replaceVideoPlaceholders, D as addBinaryFile, E as randomBytes, O as compileMapping, S as replaceSmartArtPlaceholders, T as hashPasswordAgile, _ as replaceMediaPlaceholders, a as getAudioRefs, b as replaceOlePlaceholders, c as getReferencedMedia, d as replaceAllPlaceholders, f as replaceAudioPlaceholders, g as replaceImagePlaceholders, h as replaceImageLinkPlaceholders, i as formatId, l as getVideoRefs, m as replaceHyperlinkPlaceholders, n as collectPlaceholderKeys, o as getMediaRefs, p as replaceChartPlaceholders, r as findAndReplaceImagePlaceholders, s as getOleRefs, t as addSmartArtRelationships, u as hasPlaceholders, v as replaceNumberingPlaceholders, w as derivePasswordHash, x as replacePlaceholders, y as replaceOleLinkPlaceholders } from "../util-BGfk-gE0.mjs";
|
|
2
|
+
import { $ as xsdErrorValueType, $t as signedHpsMeasureValue, A as parsePercent, At as xsdTextVerticalType, B as xsdAxisCrosses, Bt as dateTimeValue, C as convertUniversalMeasureToInch, Ct as xsdStrikeStyle, D as emitPercent, Dt as xsdTextBuild, E as emitAngle, Et as xsdTextAnchor, F as xsdAnimClass, Ft as isBase64DataURL, G as xsdChartBuild, Gt as hpsMeasureValue, H as xsdAxisOrientation, Ht as eighthPointMeasureValue, I as xsdAnimLevel, It as toUint8Array, J as xsdConsolidateFunction, Jt as parseOnOff, K as xsdComments, Kt as longHexNumber, L as xsdAnimValueType, M as parseUniversalMeasure, Mt as xsdTrendlineType, N as invertMap, Nt as xsdUnderlineStyle, O as mapOptional, Ot as xsdTextCaps, P as xsdAnimCalcMode, Pt as xsdVerticalMergeRev, Q as xsdEffectContainer, Qt as shortHexNumber, R as xsdAnimationDgmBuild, S as convertUniversalMeasureToEmu, St as xsdSplitType, T as convertUniversalMeasureToTwip, Tt as xsdTextAlign, U as xsdAxisPosition, Ut as hexBinary, V as xsdAxisLabelAlignment, Vt as decimalNumber, W as xsdBlendMode, Wt as hexColorValue, X as xsdDiagramBuild, Xt as pointMeasureValue, Y as xsdDataLabelPosition, Yt as percentageValue, Z as xsdDiagramDirection, Zt as positiveUniversalMeasureValue, _ as convertToEmu, _t as xsdRectAlignment, a as uniqueNumericIdCreator, an as unsignedDecimalNumber, at as xsdLegendPosition, b as convertToTwip, bt as xsdSizeRepresents, c as convertEmuToPixels, ct as xsdLineEndSize, d as convertInchesToEmu, dt as xsdOrient, en as signedTwipsMeasureValue, et as xsdFontAlignment, f as convertInchesToTwip, ft as xsdPathFillMode, g as convertPointsToTwip, gt as xsdPresetShadow, h as convertPointsToEmu, ht as xsdPlaceholderType, i as uniqueId, in as universalMeasureValue, it as xsdJcAlignment, j as parsePercentAttr, jt as xsdTotalsRowFunction, k as parseAngle, kt as xsdTextTabAlignment, l as convertEmuToPoints, lt as xsdMaterialType, m as convertPixelsToEmu, mt as xsdPenAlignment, n as imageTypeFromPath, nn as twipsMeasureValue, nt as xsdHueDirection, o as uniqueUuid, ot as xsdLightRigDirection, p as convertMillimetersToTwip, pt as xsdPattern, q as xsdCompoundLine, qt as measurementOrPercentValue, r as hashedId, rn as uCharHexNumber, rt as xsdIterateType, s as convertEmuToInches, st as xsdLineCap, t as extUriMatches, tn as stripColorHashPrefix, tt as xsdHierBranch, u as convertEmuToTwip, ut as xsdMathStyle, v as convertToInch, vt as xsdResizeHandles, w as convertUniversalMeasureToPt, wt as xsdTableWidthType, x as convertTwipToEmu, xt as xsdSlideLayoutType, y as convertToPt, yt as xsdShadingPattern, z as xsdAxisCrossBetween } from "../ext-uri-BR1ouCh3.mjs";
|
|
3
|
+
export { addBinaryFile, addSmartArtRelationships, collectPlaceholderKeys, compileMapping, convertEmuToInches, convertEmuToPixels, convertEmuToPoints, convertEmuToTwip, convertInchesToEmu, convertInchesToTwip, convertMillimetersToTwip, convertPixelsToEmu, convertPointsToEmu, convertPointsToTwip, convertToEmu, convertToInch, convertToPt, convertToTwip, convertTwipToEmu, convertUniversalMeasureToEmu, convertUniversalMeasureToInch, convertUniversalMeasureToPt, convertUniversalMeasureToTwip, dateTimeValue, decimalNumber, derivePasswordHash, eighthPointMeasureValue, emitAngle, emitPercent, extUriMatches, findAndReplaceImagePlaceholders, formatId, getAudioRefs, getMediaRefs, getOleRefs, getReferencedMedia, getVideoRefs, hasPlaceholders, hashPasswordAgile, hashedId, hexBinary, hexColorValue, hpsMeasureValue, imageTypeFromPath, invertMap, isBase64DataURL, longHexNumber, mapOptional, measurementOrPercentValue, parseAngle, parseOnOff, parsePercent, parsePercentAttr, parseUniversalMeasure, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, randomBytes, replaceAllPlaceholders, replaceAudioPlaceholders, replaceChartPlaceholders, replaceHyperlinkPlaceholders, replaceImageLinkPlaceholders, replaceImagePlaceholders, replaceMediaPlaceholders, replaceNumberingPlaceholders, replaceOleLinkPlaceholders, replaceOlePlaceholders, replacePlaceholders, replaceSmartArtPlaceholders, replaceVideoPlaceholders, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, stripColorHashPrefix, toUint8Array, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber, xsdAnimCalcMode, xsdAnimClass, xsdAnimLevel, xsdAnimValueType, xsdAnimationDgmBuild, xsdAxisCrossBetween, xsdAxisCrosses, xsdAxisLabelAlignment, xsdAxisOrientation, xsdAxisPosition, xsdBlendMode, xsdChartBuild, xsdComments, xsdCompoundLine, xsdConsolidateFunction, xsdDataLabelPosition, xsdDiagramBuild, xsdDiagramDirection, xsdEffectContainer, xsdErrorValueType, xsdFontAlignment, xsdHierBranch, xsdHueDirection, xsdIterateType, xsdJcAlignment, xsdLegendPosition, xsdLightRigDirection, xsdLineCap, xsdLineEndSize, xsdMaterialType, xsdMathStyle, xsdOrient, xsdPathFillMode, xsdPattern, xsdPenAlignment, xsdPlaceholderType, xsdPresetShadow, xsdRectAlignment, xsdResizeHandles, xsdShadingPattern, xsdSizeRepresents, xsdSlideLayoutType, xsdSplitType, xsdStrikeStyle, xsdTableWidthType, xsdTextAlign, xsdTextAnchor, xsdTextBuild, xsdTextCaps, xsdTextTabAlignment, xsdTextVerticalType, xsdTotalsRowFunction, xsdTrendlineType, xsdUnderlineStyle, xsdVerticalMergeRev };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rt as encodeBase64, zt as Buffer } from "./ext-uri-BR1ouCh3.mjs";
|
|
2
2
|
import { AsyncZipDeflate, Zip, ZipDeflate, ZipPassThrough, strFromU8, strFromU8 as strFromU8$1, unzipSync as unzipSync$1, zip, zipSync, zipSync as zipSync$1 } from "fflate";
|
|
3
3
|
import { sha512 } from "@noble/hashes/sha2.js";
|
|
4
4
|
//#region src/opc/zip-native.ts
|
|
@@ -956,4 +956,4 @@ function replaceOleLinkPlaceholders(xml, links, offset) {
|
|
|
956
956
|
//#endregion
|
|
957
957
|
export { ZIP_STORED_LEVEL as A, OoxmlMimeType as B, replaceVideoPlaceholders as C, addBinaryFile as D, randomBytes as E, strFromU8$1 as F, hasNativeInflate as H, unzipSync$1 as I, zipAndConvert as L, createPacker as M, createZipStream as N, compileMapping as O, levelForMediaName as P, zipSync$1 as R, replaceSmartArtPlaceholders as S, hashPasswordAgile as T, nativeCrc32 as U, convertOutput as V, nativeUnzip as W, replaceMediaPlaceholders as _, getAudioRefs as a, replaceOlePlaceholders as b, getReferencedMedia as c, replaceAllPlaceholders as d, replaceAudioPlaceholders as f, replaceImagePlaceholders as g, replaceImageLinkPlaceholders as h, formatId as i, ZipStreamWriter as j, ZIP_DEFLATE_LEVEL as k, getVideoRefs as l, replaceHyperlinkPlaceholders as m, collectPlaceholderKeys as n, getMediaRefs as o, replaceChartPlaceholders as p, findAndReplaceImagePlaceholders as r, getOleRefs as s, addSmartArtRelationships as t, hasPlaceholders as u, replaceNumberingPlaceholders as v, derivePasswordHash as w, replacePlaceholders as x, replaceOleLinkPlaceholders as y, zipSyncAndConvert as z };
|
|
958
958
|
|
|
959
|
-
//# sourceMappingURL=util-
|
|
959
|
+
//# sourceMappingURL=util-BGfk-gE0.mjs.map
|