@json-to-office/core-pptx 5.4.0 → 6.0.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/index.js CHANGED
@@ -4803,7 +4803,7 @@ var vermilion_pptx_theme_default = {
4803
4803
  },
4804
4804
  actionTitle: {
4805
4805
  type: "display",
4806
- color: "primary"
4806
+ color: "accent"
4807
4807
  },
4808
4808
  keyTakeaways: {
4809
4809
  type: "label",
@@ -4832,7 +4832,7 @@ var vermilion_pptx_theme_default = {
4832
4832
  },
4833
4833
  cover: {
4834
4834
  type: "display",
4835
- color: "primary",
4835
+ color: "accent",
4836
4836
  rule: {
4837
4837
  weightPt: 4,
4838
4838
  color: "accent"
@@ -5263,12 +5263,15 @@ var pptxThemes = PPTX_THEMES;
5263
5263
  // src/themes/design-system.ts
5264
5264
  import {
5265
5265
  designCanvas,
5266
+ resolveMotif,
5266
5267
  resolveTypeRoles,
5267
5268
  validateDesignColors
5268
5269
  } from "@json-to-office/shared";
5269
5270
  function resolvePptxDesignSystem(theme, width = 10, height = 7.5) {
5270
5271
  validateDesignColors(theme, theme.colors);
5271
- if (!theme.typography) return theme;
5272
+ const motif = resolveMotif(theme.motif);
5273
+ if (!theme.typography)
5274
+ return motif === theme.motif ? theme : withMotif(theme, motif);
5272
5275
  const canvas = designCanvas("pptx", { width, height });
5273
5276
  const roles = resolveTypeRoles(theme, canvas, theme.defaults.fontSize);
5274
5277
  const styles = { ...theme.styles };
@@ -5295,7 +5298,13 @@ function resolvePptxDesignSystem(theme, width = 10, height = 7.5) {
5295
5298
  ...styles[key]
5296
5299
  };
5297
5300
  }
5298
- return { ...theme, styles };
5301
+ return { ...withMotif(theme, motif), styles };
5302
+ }
5303
+ function withMotif(theme, motif) {
5304
+ if (motif !== void 0) return { ...theme, motif };
5305
+ const rest = { ...theme };
5306
+ delete rest.motif;
5307
+ return rest;
5299
5308
  }
5300
5309
  function designGrid(theme, width, height) {
5301
5310
  const space = theme.spacing?.canvas?.[designCanvas("pptx", { width, height })];