@openpresentation/opf-pptx 0.20.1 → 0.20.3

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -2036,7 +2036,8 @@ function masterBackground(context) {
2036
2036
 
2037
2037
  // The theme part carries the deck-level scheme (slide overrides stay literal)
2038
2038
  // and, for a theme reference that resolves (embedded or in a registered catalog), that theme's name, which import
2039
- // recovery matches against the registered catalogs (FF-24).
2039
+ // recovery matches against the registered catalogs (FF-24). Without an authored theme,
2040
+ // brand the generated theme: PowerPoint uses it for the Home > Layout category.
2040
2041
  function exportTheme(presentation, context, options) {
2041
2042
  const reference = presentation.design?.theme;
2042
2043
  const theme = typeof reference === "string" ? resolveReference(presentation, "themes", reference, {catalogs: options.catalogs}) : undefined;
@@ -2044,7 +2045,7 @@ function exportTheme(presentation, context, options) {
2044
2045
  return {
2045
2046
  themeColors: themeSlotColors(scheme),
2046
2047
  schemeName: scheme.name ?? scheme.id ?? "OpenPresentation",
2047
- themeName: theme ? theme.record.name ?? theme.id : undefined
2048
+ themeName: theme ? theme.record.name ?? theme.id : "pptx.gallery"
2048
2049
  };
2049
2050
  }
2050
2051
 
@@ -4331,7 +4332,7 @@ function normalizePartBytes(path, bytes, context, renameMaps, entries, imageMeta
4331
4332
  xml = xml.replace('</Types>', `${overrides}</Types>`);
4332
4333
  }
4333
4334
  if (/^ppt\/slideMasters\/slideMaster\d+\.xml$/.test(path)) {
4334
- // Name the generated layout group independently of a:theme's authored identity. Script masters copy this label.
4335
+ // Name the generated master; PowerPoint's layout category also needs the default theme name. Script masters copy this label.
4335
4336
  xml = themeMasterBulletFonts(xml).replace(/<p:cSld\b([^>]*)>/, (_, attributes) =>
4336
4337
  `<p:cSld${attributes.replace(/\s+name="[^"]*"/, '')} name="pptx.gallery">`);
4337
4338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpresentation/opf-pptx",
3
- "version": "0.20.1",
3
+ "version": "0.20.3",
4
4
  "description": "Pure local OPF to PPTX export and PPTX to OPF import tooling.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -64,9 +64,9 @@
64
64
  "test:determinism": "node test/determinism.mjs"
65
65
  },
66
66
  "dependencies": {
67
- "@openpresentation/gallery": "^3.0.0",
68
67
  "@node-projects/jszip": "4.3.0",
69
- "@openpresentation/opf": "^0.20.1",
68
+ "@openpresentation/gallery": "^3.0.0",
69
+ "@openpresentation/opf": "^0.20.2",
70
70
  "@rgrove/parse-xml": "4.2.3",
71
71
  "fast-xml-parser": "^5.8.0",
72
72
  "fflate": "^0.8.3",
@@ -74,7 +74,7 @@
74
74
  "sharp": "0.35.5"
75
75
  },
76
76
  "peerDependencies": {
77
- "@openpresentation/opf-render": "^0.20.0"
77
+ "@openpresentation/opf-render": "^0.20.2"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "@openpresentation/opf-render": {
@@ -98,10 +98,10 @@
98
98
  "@expo-google-fonts/roboto": "0.4.3",
99
99
  "@expo-google-fonts/roboto-mono": "0.4.2",
100
100
  "@expo-google-fonts/tinos": "0.4.2",
101
- "@openpresentation/opf-render": "0.20.0",
101
+ "@openpresentation/opf-render": "0.20.2",
102
102
  "@resvg/resvg-js": "2.6.2",
103
103
  "esbuild": "0.28.2",
104
- "playwright": "1.63.0"
104
+ "playwright": "1.64.0"
105
105
  },
106
106
  "imports": {
107
107
  "#image-fallback": {