wormclaude 1.0.119 → 1.0.121

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 (232) hide show
  1. package/dist/theme.js +1 -1
  2. package/dist/tui.js +6 -1
  3. package/package.json +1 -1
  4. package/skills/build-mcp-app/SKILL.md +0 -393
  5. package/skills/build-mcp-app/references/abuse-protection.md +0 -60
  6. package/skills/build-mcp-app/references/apps-sdk-messages.md +0 -227
  7. package/skills/build-mcp-app/references/directory-checklist.md +0 -18
  8. package/skills/build-mcp-app/references/iframe-sandbox.md +0 -164
  9. package/skills/build-mcp-app/references/payload-budgeting.md +0 -54
  10. package/skills/build-mcp-app/references/widget-templates.md +0 -249
  11. package/skills/build-mcp-server/SKILL.md +0 -222
  12. package/skills/build-mcp-server/references/auth.md +0 -108
  13. package/skills/build-mcp-server/references/deploy-cloudflare-workers.md +0 -106
  14. package/skills/build-mcp-server/references/elicitation.md +0 -129
  15. package/skills/build-mcp-server/references/remote-http-scaffold.md +0 -211
  16. package/skills/build-mcp-server/references/resources-and-prompts.md +0 -122
  17. package/skills/build-mcp-server/references/server-capabilities.md +0 -164
  18. package/skills/build-mcp-server/references/tool-design.md +0 -189
  19. package/skills/build-mcp-server/references/versions.md +0 -25
  20. package/skills/build-mcpb/SKILL.md +0 -200
  21. package/skills/build-mcpb/references/local-security.md +0 -149
  22. package/skills/build-mcpb/references/manifest-schema.md +0 -156
  23. package/skills/docx/script/__init__.py +0 -1
  24. package/skills/docx/script/accept_chages.py +0 -135
  25. package/skills/docx/script/comment.py +0 -318
  26. package/skills/docx/script/office/helpers/__init__.py +0 -0
  27. package/skills/docx/script/office/helpers/merge_runs.py +0 -199
  28. package/skills/docx/script/office/helpers/simplify_redlines.py +0 -197
  29. package/skills/docx/script/office/pack.py +0 -159
  30. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  31. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  32. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  33. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  34. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  35. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  36. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  37. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  38. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  39. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  40. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  41. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  42. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  43. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  44. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  45. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  46. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  47. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  48. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  49. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  50. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  51. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  52. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  53. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  54. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  55. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  56. package/skills/docx/script/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  57. package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  58. package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  59. package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  60. package/skills/docx/script/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  61. package/skills/docx/script/office/schemas/mce/mc.xsd +0 -75
  62. package/skills/docx/script/office/schemas/microsoft/wml-2010.xsd +0 -560
  63. package/skills/docx/script/office/schemas/microsoft/wml-2012.xsd +0 -67
  64. package/skills/docx/script/office/schemas/microsoft/wml-2018.xsd +0 -14
  65. package/skills/docx/script/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  66. package/skills/docx/script/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  67. package/skills/docx/script/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  68. package/skills/docx/script/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  69. package/skills/docx/script/office/soffice.py +0 -183
  70. package/skills/docx/script/office/unpack.py +0 -132
  71. package/skills/docx/script/office/validate.py +0 -117
  72. package/skills/docx/script/office/validators/__init__.py +0 -15
  73. package/skills/docx/script/office/validators/base.py +0 -851
  74. package/skills/docx/script/office/validators/docx.py +0 -446
  75. package/skills/docx/script/office/validators/pptx.py +0 -275
  76. package/skills/docx/script/office/validators/redlining.py +0 -247
  77. package/skills/docx/script/templates/comments.xml +0 -3
  78. package/skills/docx/script/templates/commentsExtended.xml +0 -3
  79. package/skills/docx/script/templates/commentsExtensible.xml +0 -3
  80. package/skills/docx/script/templates/commentsIds.xml +0 -3
  81. package/skills/docx/script/templates/people.xml +0 -3
  82. package/skills/docx/skill.md +0 -593
  83. package/skills/explain.md +0 -14
  84. package/skills/frontend-design/SKILL.md +0 -42
  85. package/skills/pdf/FORMS.md +0 -294
  86. package/skills/pdf/REFERENCE.md +0 -612
  87. package/skills/pdf/SKILL.md +0 -314
  88. package/skills/pdf/scripts/check_bounding_boxes.py +0 -65
  89. package/skills/pdf/scripts/check_fillable_fields.py +0 -11
  90. package/skills/pdf/scripts/convert_pdf_to_images.py +0 -33
  91. package/skills/pdf/scripts/create_validation_image.py +0 -37
  92. package/skills/pdf/scripts/extract_form_field_info.py +0 -122
  93. package/skills/pdf/scripts/extract_form_structure.py +0 -115
  94. package/skills/pdf/scripts/fill_fillable_fields.py +0 -98
  95. package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -107
  96. package/skills/playground/SKILL.md +0 -77
  97. package/skills/playground/templates/code-map.md +0 -158
  98. package/skills/playground/templates/concept-map.md +0 -73
  99. package/skills/playground/templates/data-explorer.md +0 -67
  100. package/skills/playground/templates/design-playground.md +0 -67
  101. package/skills/playground/templates/diff-review.md +0 -179
  102. package/skills/playground/templates/document-critique.md +0 -171
  103. package/skills/pptx/SKILL.md +0 -230
  104. package/skills/pptx/editing.md +0 -205
  105. package/skills/pptx/pptxgenjs.md +0 -437
  106. package/skills/pptx/scripts/__init__.py +0 -0
  107. package/skills/pptx/scripts/add_slide.py +0 -195
  108. package/skills/pptx/scripts/clean.py +0 -286
  109. package/skills/pptx/scripts/office/helpers/__init__.py +0 -0
  110. package/skills/pptx/scripts/office/helpers/merge_runs.py +0 -199
  111. package/skills/pptx/scripts/office/helpers/simplify_redlines.py +0 -197
  112. package/skills/pptx/scripts/office/pack.py +0 -159
  113. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  114. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  115. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  116. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  117. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  118. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  119. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  120. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  121. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  122. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  123. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  124. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  125. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  126. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  127. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  128. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  129. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  130. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  131. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  132. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  133. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  134. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  135. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  136. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  137. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  138. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  139. package/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  140. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  141. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  142. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  143. package/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  144. package/skills/pptx/scripts/office/schemas/mce/mc.xsd +0 -75
  145. package/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
  146. package/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
  147. package/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
  148. package/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  149. package/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  150. package/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  151. package/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  152. package/skills/pptx/scripts/office/soffice.py +0 -183
  153. package/skills/pptx/scripts/office/unpack.py +0 -132
  154. package/skills/pptx/scripts/office/validate.py +0 -117
  155. package/skills/pptx/scripts/office/validators/__init__.py +0 -15
  156. package/skills/pptx/scripts/office/validators/base.py +0 -851
  157. package/skills/pptx/scripts/office/validators/docx.py +0 -446
  158. package/skills/pptx/scripts/office/validators/pptx.py +0 -275
  159. package/skills/pptx/scripts/office/validators/redlining.py +0 -247
  160. package/skills/pptx/scripts/thumbnail.py +0 -289
  161. package/skills/recon.md +0 -16
  162. package/skills/security-audit/SKILL.md +0 -26
  163. package/skills/talent-creator/SKILL.md +0 -486
  164. package/skills/talent-creator/agents/analyzer.md +0 -274
  165. package/skills/talent-creator/agents/comparator.md +0 -202
  166. package/skills/talent-creator/agents/grader.md +0 -223
  167. package/skills/talent-creator/assets/eval_review.html +0 -146
  168. package/skills/talent-creator/eval-viewer/generate_review.py +0 -471
  169. package/skills/talent-creator/eval-viewer/viewer.html +0 -1325
  170. package/skills/talent-creator/references/schemas.md +0 -430
  171. package/skills/talent-creator/scripts/__init__.py +0 -0
  172. package/skills/talent-creator/scripts/aggregate_benchmark.py +0 -401
  173. package/skills/talent-creator/scripts/generate_report.py +0 -326
  174. package/skills/talent-creator/scripts/improve_description.py +0 -247
  175. package/skills/talent-creator/scripts/package_skill.py +0 -136
  176. package/skills/talent-creator/scripts/quick_validate.py +0 -146
  177. package/skills/talent-creator/scripts/run_eval.py +0 -310
  178. package/skills/talent-creator/scripts/run_loop.py +0 -328
  179. package/skills/talent-creator/scripts/utils.py +0 -47
  180. package/skills/xlsx/SKILL.md +0 -300
  181. package/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
  182. package/skills/xlsx/scripts/office/helpers/merge_runs.py +0 -199
  183. package/skills/xlsx/scripts/office/helpers/simplify_redlines.py +0 -197
  184. package/skills/xlsx/scripts/office/pack.py +0 -159
  185. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  186. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  187. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  188. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  189. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  190. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  191. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  192. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  193. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  194. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  195. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  196. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  197. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  198. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  199. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  200. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  201. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  202. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  203. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  204. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  205. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  206. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  207. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  208. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  209. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  210. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  211. package/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  212. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +0 -42
  213. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +0 -50
  214. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +0 -49
  215. package/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +0 -33
  216. package/skills/xlsx/scripts/office/schemas/mce/mc.xsd +0 -75
  217. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
  218. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
  219. package/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
  220. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  221. package/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  222. package/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  223. package/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  224. package/skills/xlsx/scripts/office/soffice.py +0 -183
  225. package/skills/xlsx/scripts/office/unpack.py +0 -132
  226. package/skills/xlsx/scripts/office/validate.py +0 -117
  227. package/skills/xlsx/scripts/office/validators/__init__.py +0 -15
  228. package/skills/xlsx/scripts/office/validators/base.py +0 -851
  229. package/skills/xlsx/scripts/office/validators/docx.py +0 -446
  230. package/skills/xlsx/scripts/office/validators/pptx.py +0 -275
  231. package/skills/xlsx/scripts/office/validators/redlining.py +0 -247
  232. package/skills/xlsx/scripts/recalc.py +0 -184
@@ -1,205 +0,0 @@
1
- # Editing Presentations
2
-
3
- ## Template-Based Workflow
4
-
5
- When you're basing your work on an existing presentation as a template:
6
-
7
- 1. **Analyze existing slides**:
8
- ```bash
9
- python scripts/thumbnail.py template.pptx
10
- extract-text template.pptx
11
- ```
12
- Look over `thumbnails.jpg` to study the layouts and the `extract-text` output to see where the placeholder text sits.
13
-
14
- 2. **Plan slide mapping**: Pair each content section with a template slide.
15
-
16
- ⚠️ **USE VARIED LAYOUTS** — sameness across slides is a frequent failure mode. Don't fall back on plain title + bullet slides. Deliberately mix in:
17
- - Multi-column layouts (2-column, 3-column)
18
- - Image + text combinations
19
- - Full-bleed images with text overlay
20
- - Quote or callout slides
21
- - Section dividers
22
- - Stat/number callouts
23
- - Icon grids or icon + text rows
24
-
25
- **Avoid:** Falling back on the same text-heavy layout slide after slide.
26
-
27
- Fit the content type to the layout (for instance, key points → bullet slide, team info → multi-column, testimonials → quote slide).
28
-
29
- 3. **Unpack**: `python scripts/office/unpack.py template.pptx unpacked/`
30
-
31
- 4. **Build presentation** (handle this yourself rather than delegating to subagents):
32
- - Delete unwanted slides (remove from `<p:sldIdLst>`)
33
- - Duplicate slides you want to reuse (`add_slide.py`)
34
- - Reorder slides in `<p:sldIdLst>`
35
- - **Finish every structural change before moving to step 5**
36
-
37
- 5. **Edit content**: Replace the text in each `slide{N}.xml`.
38
- **Bring in subagents here if you can** — each slide is its own XML file, so subagents can work on them in parallel.
39
-
40
- 6. **Clean**: `python scripts/clean.py unpacked/`
41
-
42
- 7. **Pack**: `python scripts/office/pack.py unpacked/ output.pptx --original template.pptx`
43
-
44
- ---
45
-
46
- ## Scripts
47
-
48
- | Script | Purpose |
49
- |--------|---------|
50
- | `unpack.py` | Extract and pretty-print PPTX |
51
- | `add_slide.py` | Duplicate slide or create from layout |
52
- | `clean.py` | Remove orphaned files |
53
- | `pack.py` | Repack with validation |
54
- | `thumbnail.py` | Create visual grid of slides |
55
-
56
- ### unpack.py
57
-
58
- ```bash
59
- python scripts/office/unpack.py input.pptx unpacked/
60
- ```
61
-
62
- Unpacks the PPTX, pretty-prints its XML, and escapes smart quotes.
63
-
64
- ### add_slide.py
65
-
66
- ```bash
67
- python scripts/add_slide.py unpacked/ slide2.xml # Duplicate slide
68
- python scripts/add_slide.py unpacked/ slideLayout2.xml # From layout
69
- ```
70
-
71
- Outputs the `<p:sldId>` for you to insert into `<p:sldIdLst>` wherever you want it.
72
-
73
- ### clean.py
74
-
75
- ```bash
76
- python scripts/clean.py unpacked/
77
- ```
78
-
79
- Strips out slides missing from `<p:sldIdLst>`, unused media, and orphaned rels.
80
-
81
- ### pack.py
82
-
83
- ```bash
84
- python scripts/office/pack.py unpacked/ output.pptx --original input.pptx
85
- ```
86
-
87
- Checks validity, fixes issues, compacts the XML, and re-encodes smart quotes.
88
-
89
- ### thumbnail.py
90
-
91
- ```bash
92
- python scripts/thumbnail.py input.pptx [output_prefix] [--cols N]
93
- ```
94
-
95
- Produces `thumbnails.jpg` labeled with each slide's filename. Defaults to 3 columns, capped at 12 per grid.
96
-
97
- **Reserve this for template analysis** (picking layouts). For visual QA, lean on `soffice` + `pdftoppm` to produce full-resolution per-slide images—see SKILL.md.
98
-
99
- ---
100
-
101
- ## Slide Operations
102
-
103
- The slide order lives in `ppt/presentation.xml` → `<p:sldIdLst>`.
104
-
105
- **Reorder**: Shuffle the `<p:sldId>` elements.
106
-
107
- **Delete**: Drop the `<p:sldId>`, then run `clean.py`.
108
-
109
- **Add**: Reach for `add_slide.py`. Don't copy slide files by hand—the script takes care of notes references, Content_Types.xml, and relationship IDs that hand-copying tends to break.
110
-
111
- ---
112
-
113
- ## Editing Content
114
-
115
- **Subagents:** When you have them, put them to work here (once step 4 is done). Since each slide is its own XML file, subagents can edit them at the same time. The prompt you give a subagent should include:
116
- - The slide file path(s) it needs to edit
117
- - **"Use the Edit tool for all changes"**
118
- - The formatting rules and common pitfalls below
119
-
120
- For each slide:
121
- 1. Read its XML
122
- 2. Pin down EVERY piece of placeholder content—text, images, charts, icons, captions
123
- 3. Swap each placeholder for the final content
124
-
125
- **Stick to the Edit tool rather than sed or Python scripts.** Edit makes you be precise about what gets replaced and where, which makes results more reliable.
126
-
127
- ### Formatting Rules
128
-
129
- - **Bold every header, subheading, and inline label**: Apply `b="1"` to `<a:rPr>`. That covers:
130
- - Slide titles
131
- - Section headers inside a slide
132
- - Inline labels (such as "Status:", "Description:") that open a line
133
- - **Never use unicode bullets (•)**: Format lists properly with `<a:buChar>` or `<a:buAutoNum>`
134
- - **Bullet consistency**: Allow bullets to carry over from the layout. Set `<a:buChar>` or `<a:buNone>` only when needed.
135
-
136
- ---
137
-
138
- ## Common Pitfalls
139
-
140
- ### Template Adaptation
141
-
142
- When your source has fewer items than the template provides:
143
- - **Delete the surplus elements outright** (images, shapes, text boxes) instead of merely emptying the text
144
- - After clearing text, watch for visuals left stranded
145
- - Run visual QA so mismatched counts get caught
146
-
147
- When the replacement text differs in length from the original:
148
- - **Shorter replacements**: Generally fine
149
- - **Longer replacements**: Can overflow or wrap in unexpected ways
150
- - Run visual QA once the text changes are in
151
- - Think about trimming or splitting content so it respects the template's design limits
152
-
153
- **Template slots ≠ Source items**: If the template shows 4 team members but you only have 3, remove the 4th member's whole group (image + text boxes), not just the words.
154
-
155
- ### Multi-Item Content
156
-
157
- When the source holds several items (numbered lists, multiple sections), give each its own `<a:p>` element — **never merge them into a single string**.
158
-
159
- **❌ WRONG** — all items in one paragraph:
160
- ```xml
161
- <a:p>
162
- <a:r><a:rPr .../><a:t>Step 1: Do the first thing. Step 2: Do the second thing.</a:t></a:r>
163
- </a:p>
164
- ```
165
-
166
- **✅ CORRECT** — separate paragraphs with bold headers:
167
- ```xml
168
- <a:p>
169
- <a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
170
- <a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 1</a:t></a:r>
171
- </a:p>
172
- <a:p>
173
- <a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
174
- <a:r><a:rPr lang="en-US" sz="2799" .../><a:t>Do the first thing.</a:t></a:r>
175
- </a:p>
176
- <a:p>
177
- <a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
178
- <a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 2</a:t></a:r>
179
- </a:p>
180
- <!-- continue pattern -->
181
- ```
182
-
183
- Carry `<a:pPr>` over from the original paragraph so the line spacing stays intact. Put `b="1"` on headers.
184
-
185
- ### Smart Quotes
186
-
187
- unpack/pack take care of these on their own. The Edit tool, though, turns smart quotes into ASCII.
188
-
189
- **When you add new text containing quotes, write them as XML entities:**
190
-
191
- ```xml
192
- <a:t>the &#x201C;Agreement&#x201D;</a:t>
193
- ```
194
-
195
- | Character | Name | Unicode | XML Entity |
196
- |-----------|------|---------|------------|
197
- | `“` | Left double quote | U+201C | `&#x201C;` |
198
- | `”` | Right double quote | U+201D | `&#x201D;` |
199
- | `‘` | Left single quote | U+2018 | `&#x2018;` |
200
- | `’` | Right single quote | U+2019 | `&#x2019;` |
201
-
202
- ### Other
203
-
204
- - **Whitespace**: Add `xml:space="preserve"` to any `<a:t>` that has leading or trailing spaces
205
- - **XML parsing**: Go with `defusedxml.minidom` rather than `xml.etree.ElementTree`, which mangles namespaces
@@ -1,437 +0,0 @@
1
- # PptxGenJS Tutorial
2
-
3
- ## Setup & Basic Structure
4
-
5
- ```javascript
6
- const pptxgen = require("pptxgenjs");
7
-
8
- let pres = new pptxgen();
9
- pres.layout = 'LAYOUT_16x9'; // or 'LAYOUT_16x10', 'LAYOUT_4x3', 'LAYOUT_WIDE'
10
- pres.author = 'Your Name';
11
- pres.title = 'Presentation Title';
12
-
13
- let slide = pres.addSlide();
14
- slide.addText("Hello World!", { x: 0.5, y: 0.5, fontSize: 36, color: "363636" });
15
-
16
- pres.writeFile({ fileName: "Presentation.pptx" });
17
- ```
18
-
19
- ## Layout Dimensions
20
-
21
- Slide sizes (all coordinates measured in inches):
22
- - `LAYOUT_16x9`: 10" × 5.625" (default)
23
- - `LAYOUT_16x10`: 10" × 6.25"
24
- - `LAYOUT_4x3`: 10" × 7.5"
25
- - `LAYOUT_WIDE`: 13.3" × 7.5"
26
-
27
- ---
28
-
29
- ## Text & Formatting
30
-
31
- ```javascript
32
- // Basic text
33
- slide.addText("Simple Text", {
34
- x: 1, y: 1, w: 8, h: 2, fontSize: 24, fontFace: "Arial",
35
- color: "363636", bold: true, align: "center", valign: "middle"
36
- });
37
-
38
- // Character spacing (use charSpacing, not letterSpacing which is silently ignored)
39
- slide.addText("SPACED TEXT", { x: 1, y: 1, w: 8, h: 1, charSpacing: 6 });
40
-
41
- // Rich text arrays
42
- slide.addText([
43
- { text: "Bold ", options: { bold: true } },
44
- { text: "Italic ", options: { italic: true } }
45
- ], { x: 1, y: 3, w: 8, h: 1 });
46
-
47
- // Multi-line text (requires breakLine: true)
48
- slide.addText([
49
- { text: "Line 1", options: { breakLine: true } },
50
- { text: "Line 2", options: { breakLine: true } },
51
- { text: "Line 3" } // Last item doesn't need breakLine
52
- ], { x: 0.5, y: 0.5, w: 8, h: 2 });
53
-
54
- // Text box margin (internal padding)
55
- slide.addText("Title", {
56
- x: 0.5, y: 0.3, w: 9, h: 0.6,
57
- margin: 0 // Use 0 when aligning text with other elements like shapes or icons
58
- });
59
- ```
60
-
61
- **Tip:** Text boxes carry an internal margin out of the box. Set `margin: 0` whenever you need text to line up exactly with shapes, lines, or icons sharing the same x-position.
62
-
63
- ---
64
-
65
- ## Lists & Bullets
66
-
67
- ```javascript
68
- // ✅ CORRECT: Multiple bullets
69
- slide.addText([
70
- { text: "First item", options: { bullet: true, breakLine: true } },
71
- { text: "Second item", options: { bullet: true, breakLine: true } },
72
- { text: "Third item", options: { bullet: true } }
73
- ], { x: 0.5, y: 0.5, w: 8, h: 3 });
74
-
75
- // ❌ WRONG: Never use unicode bullets
76
- slide.addText("• First item", { ... }); // Creates double bullets
77
-
78
- // Sub-items and numbered lists
79
- { text: "Sub-item", options: { bullet: true, indentLevel: 1 } }
80
- { text: "First", options: { bullet: { type: "number" }, breakLine: true } }
81
- ```
82
-
83
- ---
84
-
85
- ## Shapes
86
-
87
- ```javascript
88
- slide.addShape(pres.shapes.RECTANGLE, {
89
- x: 0.5, y: 0.8, w: 1.5, h: 3.0,
90
- fill: { color: "FF0000" }, line: { color: "000000", width: 2 }
91
- });
92
-
93
- slide.addShape(pres.shapes.OVAL, { x: 4, y: 1, w: 2, h: 2, fill: { color: "0000FF" } });
94
-
95
- slide.addShape(pres.shapes.LINE, {
96
- x: 1, y: 3, w: 5, h: 0, line: { color: "FF0000", width: 3, dashType: "dash" }
97
- });
98
-
99
- // With transparency
100
- slide.addShape(pres.shapes.RECTANGLE, {
101
- x: 1, y: 1, w: 3, h: 2,
102
- fill: { color: "0088CC", transparency: 50 }
103
- });
104
-
105
- // Rounded rectangle (rectRadius only works with ROUNDED_RECTANGLE, not RECTANGLE)
106
- // ⚠️ Don't pair with rectangular accent overlays — they won't cover rounded corners. Use RECTANGLE instead.
107
- slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
108
- x: 1, y: 1, w: 3, h: 2,
109
- fill: { color: "FFFFFF" }, rectRadius: 0.1
110
- });
111
-
112
- // With shadow
113
- slide.addShape(pres.shapes.RECTANGLE, {
114
- x: 1, y: 1, w: 3, h: 2,
115
- fill: { color: "FFFFFF" },
116
- shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 }
117
- });
118
- ```
119
-
120
- Shadow options:
121
-
122
- | Property | Type | Range | Notes |
123
- |----------|------|-------|-------|
124
- | `type` | string | `"outer"`, `"inner"` | |
125
- | `color` | string | 6-char hex (e.g. `"000000"`) | No `#` prefix, no 8-char hex — see Common Pitfalls |
126
- | `blur` | number | 0-100 pt | |
127
- | `offset` | number | 0-200 pt | **Must be non-negative** — negative values corrupt the file |
128
- | `angle` | number | 0-359 degrees | Direction the shadow falls (135 = bottom-right, 270 = upward) |
129
- | `opacity` | number | 0.0-1.0 | Use this for transparency, never encode in color string |
130
-
131
- To throw a shadow upward (say, on a footer bar), combine `angle: 270` with a positive offset — **never** a negative one.
132
-
133
- **Note**: There's no built-in support for gradient fills. Drop in a gradient image as the background instead.
134
-
135
- ---
136
-
137
- ## Images
138
-
139
- ### Image Sources
140
-
141
- ```javascript
142
- // From file path
143
- slide.addImage({ path: "images/photo.jpg", x: 1, y: 1, w: 5, h: 3 });
144
-
145
- // From URL
146
- slide.addImage({ path: "https://example.com/image.jpg", x: 1, y: 1, w: 5, h: 3 });
147
-
148
- // From base64 (faster, no file I/O)
149
- slide.addImage({ data: "image/png;base64,iVBORw0KGgo...", x: 1, y: 1, w: 5, h: 3 });
150
- ```
151
-
152
- ### Image Options
153
-
154
- ```javascript
155
- slide.addImage({
156
- path: "image.png",
157
- x: 1, y: 1, w: 5, h: 3,
158
- rotate: 45, // 0-359 degrees
159
- rounding: true, // Circular crop
160
- transparency: 50, // 0-100
161
- flipH: true, // Horizontal flip
162
- flipV: false, // Vertical flip
163
- altText: "Description", // Accessibility
164
- hyperlink: { url: "https://example.com" }
165
- });
166
- ```
167
-
168
- ### Image Sizing Modes
169
-
170
- ```javascript
171
- // Contain - fit inside, preserve ratio
172
- { sizing: { type: 'contain', w: 4, h: 3 } }
173
-
174
- // Cover - fill area, preserve ratio (may crop)
175
- { sizing: { type: 'cover', w: 4, h: 3 } }
176
-
177
- // Crop - cut specific portion
178
- { sizing: { type: 'crop', x: 0.5, y: 0.5, w: 2, h: 2 } }
179
- ```
180
-
181
- ### Calculate Dimensions (preserve aspect ratio)
182
-
183
- ```javascript
184
- const origWidth = 1978, origHeight = 923, maxHeight = 3.0;
185
- const calcWidth = maxHeight * (origWidth / origHeight);
186
- const centerX = (10 - calcWidth) / 2;
187
-
188
- slide.addImage({ path: "image.png", x: centerX, y: 1.2, w: calcWidth, h: maxHeight });
189
- ```
190
-
191
- ### Supported Formats
192
-
193
- - **Standard**: PNG, JPG, GIF (animated GIFs work in Microsoft 365)
194
- - **SVG**: Works in modern PowerPoint/Microsoft 365
195
-
196
- ---
197
-
198
- ## Icons
199
-
200
- Generate SVG icons with react-icons, then rasterize them to PNG so they work everywhere.
201
-
202
- ### Setup
203
-
204
- ```javascript
205
- const React = require("react");
206
- const ReactDOMServer = require("react-dom/server");
207
- const sharp = require("sharp");
208
- const { FaCheckCircle, FaChartLine } = require("react-icons/fa");
209
-
210
- function renderIconSvg(IconComponent, color = "#000000", size = 256) {
211
- return ReactDOMServer.renderToStaticMarkup(
212
- React.createElement(IconComponent, { color, size: String(size) })
213
- );
214
- }
215
-
216
- async function iconToBase64Png(IconComponent, color, size = 256) {
217
- const svg = renderIconSvg(IconComponent, color, size);
218
- const pngBuffer = await sharp(Buffer.from(svg)).png().toBuffer();
219
- return "image/png;base64," + pngBuffer.toString("base64");
220
- }
221
- ```
222
-
223
- ### Add Icon to Slide
224
-
225
- ```javascript
226
- const iconData = await iconToBase64Png(FaCheckCircle, "#4472C4", 256);
227
-
228
- slide.addImage({
229
- data: iconData,
230
- x: 1, y: 1, w: 0.5, h: 0.5 // Size in inches
231
- });
232
- ```
233
-
234
- **Note**: Pick 256 or above for sharp icons. The size parameter sets the rasterization resolution — not the on-slide display size, which comes from `w` and `h` in inches.
235
-
236
- ### Icon Libraries
237
-
238
- Install: `npm install -g react-icons react react-dom sharp`
239
-
240
- Widely used icon sets within react-icons:
241
- - `react-icons/fa` - Font Awesome
242
- - `react-icons/md` - Material Design
243
- - `react-icons/hi` - Heroicons
244
- - `react-icons/bi` - Bootstrap Icons
245
-
246
- ---
247
-
248
- ## Slide Backgrounds
249
-
250
- ```javascript
251
- // Solid color
252
- slide.background = { color: "F1F1F1" };
253
-
254
- // Color with transparency
255
- slide.background = { color: "FF3399", transparency: 50 };
256
-
257
- // Image from URL
258
- slide.background = { path: "https://example.com/bg.jpg" };
259
-
260
- // Image from base64
261
- slide.background = { data: "image/png;base64,iVBORw0KGgo..." };
262
- ```
263
-
264
- ---
265
-
266
- ## Tables
267
-
268
- ```javascript
269
- slide.addTable([
270
- ["Header 1", "Header 2"],
271
- ["Cell 1", "Cell 2"]
272
- ], {
273
- x: 1, y: 1, w: 8, h: 2,
274
- border: { pt: 1, color: "999999" }, fill: { color: "F1F1F1" }
275
- });
276
-
277
- // Advanced with merged cells
278
- let tableData = [
279
- [{ text: "Header", options: { fill: { color: "6699CC" }, color: "FFFFFF", bold: true } }, "Cell"],
280
- [{ text: "Merged", options: { colspan: 2 } }]
281
- ];
282
- slide.addTable(tableData, { x: 1, y: 3.5, w: 8, colW: [4, 4] });
283
- ```
284
-
285
- ---
286
-
287
- ## Charts
288
-
289
- **Keep charts native and editable. Let what PowerPoint can actually represent drive your choice, not whatever is fastest to write:**
290
-
291
- 1. **Library-native** (bar, column, line, pie, area, scatter, bubble, radar, doughnut, combo): reach for `addChart()` below. Combo charts take an array of `{type, data, options}` objects. Never turn these into an image.
292
- 2. **PowerPoint-native but missing from the library** (trendlines, error bars): keep it native — either work out the extra series yourself (for example, a regression line as a second `LINE`/`SCATTER` series) or post-process the generated `.pptx` XML to insert the OOXML element (such as `<c:trendline>`). Do **not** drop back to a matplotlib PNG; that strips the user's ability to edit.
293
- 3. **Truly unrepresentable in native PowerPoint** (Sankey, network/graph, chord, intricate statistical plots): this is the only case where rendering to an image and placing it via `addImage()` makes sense.
294
-
295
- ```javascript
296
- // Bar chart
297
- slide.addChart(pres.charts.BAR, [{
298
- name: "Sales", labels: ["Q1", "Q2", "Q3", "Q4"], values: [4500, 5500, 6200, 7100]
299
- }], {
300
- x: 0.5, y: 0.6, w: 6, h: 3, barDir: 'col',
301
- showTitle: true, title: 'Quarterly Sales'
302
- });
303
-
304
- // Line chart
305
- slide.addChart(pres.charts.LINE, [{
306
- name: "Temp", labels: ["Jan", "Feb", "Mar"], values: [32, 35, 42]
307
- }], { x: 0.5, y: 4, w: 6, h: 3, lineSize: 3, lineSmooth: true });
308
-
309
- // Pie chart
310
- slide.addChart(pres.charts.PIE, [{
311
- name: "Share", labels: ["A", "B", "Other"], values: [35, 45, 20]
312
- }], { x: 7, y: 1, w: 5, h: 4, showPercent: true });
313
-
314
- // Scatter with a computed trend line (tier-2: stay native, add regression as a second series)
315
- const xs = [8, 12, 18, 22, 25, 31], ys = [102, 145, 198, 241, 267, 312];
316
- const n = xs.length, sx = xs.reduce((a,b)=>a+b), sy = ys.reduce((a,b)=>a+b);
317
- const sxy = xs.reduce((a,x,i)=>a+x*ys[i],0), sxx = xs.reduce((a,x)=>a+x*x,0);
318
- const m = (n*sxy - sx*sy)/(n*sxx - sx*sx), b = (sy - m*sx)/n;
319
- slide.addChart(pres.charts.SCATTER, [
320
- { name: "X", values: xs },
321
- { name: "Data", values: ys },
322
- { name: "Trend", values: xs.map(x => m*x + b) },
323
- ], { x: 0.5, y: 1, w: 9, h: 4 });
324
- ```
325
-
326
- ### Better-Looking Charts
327
-
328
- Out of the box, charts look dated. Layer on these options for a clean, modern look:
329
-
330
- ```javascript
331
- slide.addChart(pres.charts.BAR, chartData, {
332
- x: 0.5, y: 1, w: 9, h: 4, barDir: "col",
333
-
334
- // Custom colors (match your presentation palette)
335
- chartColors: ["0D9488", "14B8A6", "5EEAD4"],
336
-
337
- // Clean background
338
- chartArea: { fill: { color: "FFFFFF" }, roundedCorners: true },
339
-
340
- // Muted axis labels
341
- catAxisLabelColor: "64748B",
342
- valAxisLabelColor: "64748B",
343
-
344
- // Subtle grid (value axis only)
345
- valGridLine: { color: "E2E8F0", size: 0.5 },
346
- catGridLine: { style: "none" },
347
-
348
- // Data labels on bars
349
- showValue: true,
350
- dataLabelPosition: "outEnd",
351
- dataLabelColor: "1E293B",
352
-
353
- // Hide legend for single series
354
- showLegend: false,
355
- });
356
- ```
357
-
358
- **Key styling options:**
359
- - `chartColors: [...]` - hex colors for series/segments
360
- - `chartArea: { fill, border, roundedCorners }` - chart background
361
- - `catGridLine/valGridLine: { color, style, size }` - grid lines (`style: "none"` to hide)
362
- - `lineSmooth: true` - curved lines (line charts)
363
- - `legendPos: "r"` - legend position: "b", "t", "l", "r", "tr"
364
-
365
- ---
366
-
367
- ## Slide Masters
368
-
369
- ```javascript
370
- pres.defineSlideMaster({
371
- title: 'TITLE_SLIDE', background: { color: '283A5E' },
372
- objects: [{
373
- placeholder: { options: { name: 'title', type: 'title', x: 1, y: 2, w: 8, h: 2 } }
374
- }]
375
- });
376
-
377
- let titleSlide = pres.addSlide({ masterName: "TITLE_SLIDE" });
378
- titleSlide.addText("My Title", { placeholder: "title" });
379
- ```
380
-
381
- ---
382
-
383
- ## Common Pitfalls
384
-
385
- ⚠️ The items below lead to corrupted files, visual glitches, or broken output. Steer clear of them.
386
-
387
- 1. **NEVER use "#" with hex colors** - corrupts the file
388
- ```javascript
389
- color: "FF0000" // ✅ CORRECT
390
- color: "#FF0000" // ❌ WRONG
391
- ```
392
-
393
- 2. **NEVER bake opacity into hex color strings** - 8-char colors (such as `"00000020"`) corrupt the file. Reach for the `opacity` property instead.
394
- ```javascript
395
- shadow: { type: "outer", blur: 6, offset: 2, color: "00000020" } // ❌ CORRUPTS FILE
396
- shadow: { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.12 } // ✅ CORRECT
397
- ```
398
-
399
- 3. **Use `bullet: true`** - NEVER unicode symbols like "•" (they produce double bullets)
400
-
401
- 4. **Use `breakLine: true`** between array items, or the text runs together
402
-
403
- 5. **Skip `lineSpacing` with bullets** - it opens up oversized gaps; use `paraSpaceAfter` instead
404
-
405
- 6. **Every presentation needs its own fresh instance** - don't recycle `pptxgen()` objects
406
-
407
- 7. **NEVER reuse option objects across calls** - PptxGenJS mutates objects in place (for instance, converting shadow values to EMU). Passing one object to several calls corrupts the second shape.
408
- ```javascript
409
- const shadow = { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 };
410
- slide.addShape(pres.shapes.RECTANGLE, { shadow, ... }); // ❌ second call gets already-converted values
411
- slide.addShape(pres.shapes.RECTANGLE, { shadow, ... });
412
-
413
- const makeShadow = () => ({ type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 });
414
- slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... }); // ✅ fresh object each time
415
- slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... });
416
- ```
417
-
418
- 8. **Avoid `ROUNDED_RECTANGLE` with accent borders** - rectangular overlay bars can't reach the rounded corners. Go with `RECTANGLE` instead.
419
- ```javascript
420
- // ❌ WRONG: Accent bar doesn't cover rounded corners
421
- slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1, y: 1, w: 3, h: 1.5, fill: { color: "FFFFFF" } });
422
- slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 0.08, h: 1.5, fill: { color: "0891B2" } });
423
-
424
- // ✅ CORRECT: Use RECTANGLE for clean alignment
425
- slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 3, h: 1.5, fill: { color: "FFFFFF" } });
426
- slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 0.08, h: 1.5, fill: { color: "0891B2" } });
427
- ```
428
-
429
- ---
430
-
431
- ## Quick Reference
432
-
433
- - **Shapes**: RECTANGLE, OVAL, LINE, ROUNDED_RECTANGLE
434
- - **Charts**: BAR, COLUMN, LINE, AREA, PIE, DOUGHNUT, SCATTER, BUBBLE, RADAR, combo (array of `{type, data, options}`)
435
- - **Layouts**: LAYOUT_16x9 (10"×5.625"), LAYOUT_16x10, LAYOUT_4x3, LAYOUT_WIDE
436
- - **Alignment**: "left", "center", "right"
437
- - **Chart data labels**: "outEnd", "inEnd", "center"
File without changes