@takuma-hirai/hirai-method 0.1.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.
Files changed (822) hide show
  1. package/.claude/.stale-harness-state/last-check +0 -0
  2. package/.claude/CommonRules.md +121 -0
  3. package/.claude/agents/01-core-development/api-designer.md +237 -0
  4. package/.claude/agents/01-core-development/backend-developer.md +222 -0
  5. package/.claude/agents/01-core-development/design-bridge.md +127 -0
  6. package/.claude/agents/01-core-development/electron-pro.md +240 -0
  7. package/.claude/agents/01-core-development/frontend-developer.md +133 -0
  8. package/.claude/agents/01-core-development/fullstack-developer.md +235 -0
  9. package/.claude/agents/01-core-development/graphql-architect.md +238 -0
  10. package/.claude/agents/01-core-development/microservices-architect.md +239 -0
  11. package/.claude/agents/01-core-development/mobile-developer.md +283 -0
  12. package/.claude/agents/01-core-development/ui-designer.md +174 -0
  13. package/.claude/agents/01-core-development/websocket-engineer.md +150 -0
  14. package/.claude/agents/03-infrastructure/azure-infra-engineer.md +53 -0
  15. package/.claude/agents/03-infrastructure/cloud-architect.md +277 -0
  16. package/.claude/agents/03-infrastructure/database-administrator.md +287 -0
  17. package/.claude/agents/03-infrastructure/deployment-engineer.md +287 -0
  18. package/.claude/agents/03-infrastructure/devops-engineer.md +287 -0
  19. package/.claude/agents/03-infrastructure/devops-incident-responder.md +287 -0
  20. package/.claude/agents/03-infrastructure/docker-expert.md +278 -0
  21. package/.claude/agents/03-infrastructure/incident-responder.md +287 -0
  22. package/.claude/agents/03-infrastructure/kubernetes-specialist.md +287 -0
  23. package/.claude/agents/03-infrastructure/network-engineer.md +287 -0
  24. package/.claude/agents/03-infrastructure/platform-engineer.md +287 -0
  25. package/.claude/agents/03-infrastructure/security-engineer.md +277 -0
  26. package/.claude/agents/03-infrastructure/sre-engineer.md +287 -0
  27. package/.claude/agents/03-infrastructure/terraform-engineer.md +287 -0
  28. package/.claude/agents/03-infrastructure/terragrunt-expert.md +307 -0
  29. package/.claude/agents/03-infrastructure/windows-infra-admin.md +52 -0
  30. package/.claude/agents/04-quality-security/accessibility-tester.md +277 -0
  31. package/.claude/agents/04-quality-security/ad-security-reviewer.md +56 -0
  32. package/.claude/agents/04-quality-security/ai-writing-auditor.md +77 -0
  33. package/.claude/agents/04-quality-security/architect-reviewer.md +287 -0
  34. package/.claude/agents/04-quality-security/chaos-engineer.md +277 -0
  35. package/.claude/agents/04-quality-security/code-reviewer.md +287 -0
  36. package/.claude/agents/04-quality-security/compliance-auditor.md +277 -0
  37. package/.claude/agents/04-quality-security/debugger.md +287 -0
  38. package/.claude/agents/04-quality-security/error-detective.md +287 -0
  39. package/.claude/agents/04-quality-security/penetration-tester.md +287 -0
  40. package/.claude/agents/04-quality-security/performance-engineer.md +287 -0
  41. package/.claude/agents/04-quality-security/powershell-security-hardening.md +54 -0
  42. package/.claude/agents/04-quality-security/qa-expert.md +287 -0
  43. package/.claude/agents/04-quality-security/security-auditor.md +287 -0
  44. package/.claude/agents/04-quality-security/test-automator.md +287 -0
  45. package/.claude/agents/04-quality-security/ui-ux-tester.md +234 -0
  46. package/.claude/agents/06-developer-experience/build-engineer.md +286 -0
  47. package/.claude/agents/06-developer-experience/cli-developer.md +286 -0
  48. package/.claude/agents/06-developer-experience/dependency-manager.md +286 -0
  49. package/.claude/agents/06-developer-experience/documentation-engineer.md +276 -0
  50. package/.claude/agents/06-developer-experience/dx-optimizer.md +286 -0
  51. package/.claude/agents/06-developer-experience/git-workflow-manager.md +286 -0
  52. package/.claude/agents/06-developer-experience/legacy-modernizer.md +286 -0
  53. package/.claude/agents/06-developer-experience/mcp-developer.md +275 -0
  54. package/.claude/agents/06-developer-experience/powershell-module-architect.md +58 -0
  55. package/.claude/agents/06-developer-experience/powershell-ui-architect.md +135 -0
  56. package/.claude/agents/06-developer-experience/readme-generator.md +238 -0
  57. package/.claude/agents/06-developer-experience/refactoring-specialist.md +286 -0
  58. package/.claude/agents/06-developer-experience/slack-expert.md +232 -0
  59. package/.claude/agents/06-developer-experience/tooling-engineer.md +286 -0
  60. package/.claude/agents/09-meta-orchestration/agent-installer.md +97 -0
  61. package/.claude/agents/09-meta-orchestration/agent-organizer.md +287 -0
  62. package/.claude/agents/09-meta-orchestration/codebase-orchestrator.md +249 -0
  63. package/.claude/agents/09-meta-orchestration/context-manager.md +287 -0
  64. package/.claude/agents/09-meta-orchestration/error-coordinator.md +287 -0
  65. package/.claude/agents/09-meta-orchestration/it-ops-orchestrator.md +60 -0
  66. package/.claude/agents/09-meta-orchestration/knowledge-synthesizer.md +287 -0
  67. package/.claude/agents/09-meta-orchestration/multi-agent-coordinator.md +287 -0
  68. package/.claude/agents/09-meta-orchestration/performance-monitor.md +287 -0
  69. package/.claude/agents/09-meta-orchestration/task-distributor.md +287 -0
  70. package/.claude/agents/09-meta-orchestration/workflow-orchestrator.md +287 -0
  71. package/.claude/agents/10-research-analysis/competitive-analyst.md +287 -0
  72. package/.claude/agents/10-research-analysis/data-researcher.md +287 -0
  73. package/.claude/agents/10-research-analysis/market-researcher.md +287 -0
  74. package/.claude/agents/10-research-analysis/project-idea-validator.md +269 -0
  75. package/.claude/agents/10-research-analysis/research-analyst.md +287 -0
  76. package/.claude/agents/10-research-analysis/scientific-literature-researcher.md +151 -0
  77. package/.claude/agents/10-research-analysis/search-specialist.md +287 -0
  78. package/.claude/agents/10-research-analysis/trend-analyst.md +287 -0
  79. package/.claude/archive/README.md +47 -0
  80. package/.claude/archive/agents/02-language-specialists/angular-architect.md +287 -0
  81. package/.claude/archive/agents/02-language-specialists/cpp-pro.md +277 -0
  82. package/.claude/archive/agents/02-language-specialists/csharp-developer.md +287 -0
  83. package/.claude/archive/agents/02-language-specialists/django-developer.md +287 -0
  84. package/.claude/archive/agents/02-language-specialists/dotnet-core-expert.md +287 -0
  85. package/.claude/archive/agents/02-language-specialists/dotnet-framework-4.8-expert.md +306 -0
  86. package/.claude/archive/agents/02-language-specialists/elixir-expert.md +311 -0
  87. package/.claude/archive/agents/02-language-specialists/expo-react-native-expert.md +268 -0
  88. package/.claude/archive/agents/02-language-specialists/fastapi-developer.md +287 -0
  89. package/.claude/archive/agents/02-language-specialists/flutter-expert.md +287 -0
  90. package/.claude/archive/agents/02-language-specialists/golang-pro.md +277 -0
  91. package/.claude/archive/agents/02-language-specialists/java-architect.md +287 -0
  92. package/.claude/archive/agents/02-language-specialists/javascript-pro.md +277 -0
  93. package/.claude/archive/agents/02-language-specialists/kotlin-specialist.md +287 -0
  94. package/.claude/archive/agents/02-language-specialists/laravel-specialist.md +287 -0
  95. package/.claude/archive/agents/02-language-specialists/nextjs-developer.md +287 -0
  96. package/.claude/archive/agents/02-language-specialists/node-specialist.md +124 -0
  97. package/.claude/archive/agents/02-language-specialists/php-pro.md +287 -0
  98. package/.claude/archive/agents/02-language-specialists/powershell-5.1-expert.md +59 -0
  99. package/.claude/archive/agents/02-language-specialists/powershell-7-expert.md +57 -0
  100. package/.claude/archive/agents/02-language-specialists/python-pro.md +277 -0
  101. package/.claude/archive/agents/02-language-specialists/rails-expert.md +358 -0
  102. package/.claude/archive/agents/02-language-specialists/react-specialist.md +287 -0
  103. package/.claude/archive/agents/02-language-specialists/rust-engineer.md +287 -0
  104. package/.claude/archive/agents/02-language-specialists/spring-boot-engineer.md +287 -0
  105. package/.claude/archive/agents/02-language-specialists/sql-pro.md +287 -0
  106. package/.claude/archive/agents/02-language-specialists/swift-expert.md +287 -0
  107. package/.claude/archive/agents/02-language-specialists/symfony-specialist.md +354 -0
  108. package/.claude/archive/agents/02-language-specialists/typescript-pro.md +277 -0
  109. package/.claude/archive/agents/02-language-specialists/vue-expert.md +287 -0
  110. package/.claude/archive/agents/05-data-ai/ai-engineer.md +287 -0
  111. package/.claude/archive/agents/05-data-ai/data-analyst.md +277 -0
  112. package/.claude/archive/agents/05-data-ai/data-engineer.md +287 -0
  113. package/.claude/archive/agents/05-data-ai/data-scientist.md +287 -0
  114. package/.claude/archive/agents/05-data-ai/database-optimizer.md +287 -0
  115. package/.claude/archive/agents/05-data-ai/llm-architect.md +287 -0
  116. package/.claude/archive/agents/05-data-ai/machine-learning-engineer.md +277 -0
  117. package/.claude/archive/agents/05-data-ai/ml-engineer.md +287 -0
  118. package/.claude/archive/agents/05-data-ai/mlops-engineer.md +287 -0
  119. package/.claude/archive/agents/05-data-ai/nlp-engineer.md +287 -0
  120. package/.claude/archive/agents/05-data-ai/postgres-pro.md +287 -0
  121. package/.claude/archive/agents/05-data-ai/prompt-engineer.md +287 -0
  122. package/.claude/archive/agents/05-data-ai/reinforcement-learning-engineer.md +277 -0
  123. package/.claude/archive/agents/07-specialized-domains/api-documenter.md +277 -0
  124. package/.claude/archive/agents/07-specialized-domains/blockchain-developer.md +287 -0
  125. package/.claude/archive/agents/07-specialized-domains/embedded-systems.md +287 -0
  126. package/.claude/archive/agents/07-specialized-domains/fintech-engineer.md +287 -0
  127. package/.claude/archive/agents/07-specialized-domains/game-developer.md +287 -0
  128. package/.claude/archive/agents/07-specialized-domains/healthcare-admin.md +199 -0
  129. package/.claude/archive/agents/07-specialized-domains/iot-engineer.md +287 -0
  130. package/.claude/archive/agents/07-specialized-domains/m365-admin.md +48 -0
  131. package/.claude/archive/agents/07-specialized-domains/mobile-app-developer.md +287 -0
  132. package/.claude/archive/agents/07-specialized-domains/payment-integration.md +287 -0
  133. package/.claude/archive/agents/07-specialized-domains/quant-analyst.md +287 -0
  134. package/.claude/archive/agents/07-specialized-domains/risk-manager.md +287 -0
  135. package/.claude/archive/agents/07-specialized-domains/seo-specialist.md +184 -0
  136. package/.claude/archive/agents/08-business-product/business-analyst.md +287 -0
  137. package/.claude/archive/agents/08-business-product/content-marketer.md +287 -0
  138. package/.claude/archive/agents/08-business-product/customer-success-manager.md +287 -0
  139. package/.claude/archive/agents/08-business-product/legal-advisor.md +287 -0
  140. package/.claude/archive/agents/08-business-product/license-engineer.md +295 -0
  141. package/.claude/archive/agents/08-business-product/product-manager.md +287 -0
  142. package/.claude/archive/agents/08-business-product/project-manager.md +287 -0
  143. package/.claude/archive/agents/08-business-product/sales-engineer.md +287 -0
  144. package/.claude/archive/agents/08-business-product/scrum-master.md +287 -0
  145. package/.claude/archive/agents/08-business-product/technical-writer.md +287 -0
  146. package/.claude/archive/agents/08-business-product/ux-researcher.md +287 -0
  147. package/.claude/archive/agents/08-business-product/wordpress-master.md +316 -0
  148. package/.claude/archive/skills/competitive-ads-extractor/SKILL.md +293 -0
  149. package/.claude/archive/skills/developer-growth-analysis/SKILL.md +322 -0
  150. package/.claude/archive/skills/document-docx/LICENSE.txt +30 -0
  151. package/.claude/archive/skills/document-docx/SKILL.md +197 -0
  152. package/.claude/archive/skills/document-docx/docx-js.md +350 -0
  153. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  154. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  155. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  156. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  157. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  158. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  159. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  160. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  161. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  162. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  163. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  164. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  165. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  166. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  167. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  168. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  169. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  170. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  171. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  172. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  173. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  174. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  175. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  176. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  177. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  178. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  179. package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  180. package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  181. package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  182. package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  183. package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  184. package/.claude/archive/skills/document-docx/ooxml/schemas/mce/mc.xsd +75 -0
  185. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  186. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  187. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  188. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  189. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  190. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  191. package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  192. package/.claude/archive/skills/document-docx/ooxml/scripts/pack.py +159 -0
  193. package/.claude/archive/skills/document-docx/ooxml/scripts/unpack.py +29 -0
  194. package/.claude/archive/skills/document-docx/ooxml/scripts/validate.py +69 -0
  195. package/.claude/archive/skills/document-docx/ooxml/scripts/validation/__init__.py +15 -0
  196. package/.claude/archive/skills/document-docx/ooxml/scripts/validation/base.py +951 -0
  197. package/.claude/archive/skills/document-docx/ooxml/scripts/validation/docx.py +274 -0
  198. package/.claude/archive/skills/document-docx/ooxml/scripts/validation/pptx.py +315 -0
  199. package/.claude/archive/skills/document-docx/ooxml/scripts/validation/redlining.py +279 -0
  200. package/.claude/archive/skills/document-docx/ooxml.md +610 -0
  201. package/.claude/archive/skills/document-docx/scripts/__init__.py +1 -0
  202. package/.claude/archive/skills/document-docx/scripts/document.py +1276 -0
  203. package/.claude/archive/skills/document-docx/scripts/templates/comments.xml +3 -0
  204. package/.claude/archive/skills/document-docx/scripts/templates/commentsExtended.xml +3 -0
  205. package/.claude/archive/skills/document-docx/scripts/templates/commentsExtensible.xml +3 -0
  206. package/.claude/archive/skills/document-docx/scripts/templates/commentsIds.xml +3 -0
  207. package/.claude/archive/skills/document-docx/scripts/templates/people.xml +3 -0
  208. package/.claude/archive/skills/document-docx/scripts/utilities.py +374 -0
  209. package/.claude/archive/skills/document-pdf/LICENSE.txt +30 -0
  210. package/.claude/archive/skills/document-pdf/SKILL.md +294 -0
  211. package/.claude/archive/skills/document-pdf/forms.md +205 -0
  212. package/.claude/archive/skills/document-pdf/reference.md +612 -0
  213. package/.claude/archive/skills/document-pdf/scripts/check_bounding_boxes.py +70 -0
  214. package/.claude/archive/skills/document-pdf/scripts/check_bounding_boxes_test.py +226 -0
  215. package/.claude/archive/skills/document-pdf/scripts/check_fillable_fields.py +12 -0
  216. package/.claude/archive/skills/document-pdf/scripts/convert_pdf_to_images.py +35 -0
  217. package/.claude/archive/skills/document-pdf/scripts/create_validation_image.py +41 -0
  218. package/.claude/archive/skills/document-pdf/scripts/extract_form_field_info.py +152 -0
  219. package/.claude/archive/skills/document-pdf/scripts/fill_fillable_fields.py +114 -0
  220. package/.claude/archive/skills/document-pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
  221. package/.claude/archive/skills/document-pptx/LICENSE.txt +30 -0
  222. package/.claude/archive/skills/document-pptx/SKILL.md +484 -0
  223. package/.claude/archive/skills/document-pptx/html2pptx.md +625 -0
  224. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  225. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  226. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  227. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  228. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  229. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  230. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  231. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  232. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  233. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  234. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  235. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  236. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  237. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  238. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  239. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  240. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  241. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  242. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  243. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  244. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  245. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  246. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  247. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  248. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  249. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  250. package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  251. package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  252. package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  253. package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  254. package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  255. package/.claude/archive/skills/document-pptx/ooxml/schemas/mce/mc.xsd +75 -0
  256. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  257. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  258. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  259. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  260. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  261. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  262. package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  263. package/.claude/archive/skills/document-pptx/ooxml/scripts/pack.py +159 -0
  264. package/.claude/archive/skills/document-pptx/ooxml/scripts/unpack.py +29 -0
  265. package/.claude/archive/skills/document-pptx/ooxml/scripts/validate.py +69 -0
  266. package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/__init__.py +15 -0
  267. package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/base.py +951 -0
  268. package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/docx.py +274 -0
  269. package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/pptx.py +315 -0
  270. package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/redlining.py +279 -0
  271. package/.claude/archive/skills/document-pptx/ooxml.md +427 -0
  272. package/.claude/archive/skills/document-pptx/scripts/html2pptx.js +979 -0
  273. package/.claude/archive/skills/document-pptx/scripts/inventory.py +1020 -0
  274. package/.claude/archive/skills/document-pptx/scripts/rearrange.py +231 -0
  275. package/.claude/archive/skills/document-pptx/scripts/replace.py +385 -0
  276. package/.claude/archive/skills/document-pptx/scripts/thumbnail.py +450 -0
  277. package/.claude/archive/skills/document-xlsx/LICENSE.txt +30 -0
  278. package/.claude/archive/skills/document-xlsx/SKILL.md +289 -0
  279. package/.claude/archive/skills/document-xlsx/recalc.py +178 -0
  280. package/.claude/archive/skills/image-enhancer/SKILL.md +99 -0
  281. package/.claude/archive/skills/meeting-insights-analyzer/SKILL.md +327 -0
  282. package/.claude/archive/skills/slack-gif-creator/LICENSE.txt +202 -0
  283. package/.claude/archive/skills/slack-gif-creator/SKILL.md +646 -0
  284. package/.claude/archive/skills/slack-gif-creator/core/color_palettes.py +302 -0
  285. package/.claude/archive/skills/slack-gif-creator/core/easing.py +230 -0
  286. package/.claude/archive/skills/slack-gif-creator/core/frame_composer.py +469 -0
  287. package/.claude/archive/skills/slack-gif-creator/core/gif_builder.py +246 -0
  288. package/.claude/archive/skills/slack-gif-creator/core/typography.py +357 -0
  289. package/.claude/archive/skills/slack-gif-creator/core/validators.py +264 -0
  290. package/.claude/archive/skills/slack-gif-creator/core/visual_effects.py +494 -0
  291. package/.claude/archive/skills/slack-gif-creator/requirements.txt +4 -0
  292. package/.claude/archive/skills/slack-gif-creator/templates/bounce.py +106 -0
  293. package/.claude/archive/skills/slack-gif-creator/templates/explode.py +331 -0
  294. package/.claude/archive/skills/slack-gif-creator/templates/fade.py +329 -0
  295. package/.claude/archive/skills/slack-gif-creator/templates/flip.py +291 -0
  296. package/.claude/archive/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
  297. package/.claude/archive/skills/slack-gif-creator/templates/morph.py +329 -0
  298. package/.claude/archive/skills/slack-gif-creator/templates/move.py +293 -0
  299. package/.claude/archive/skills/slack-gif-creator/templates/pulse.py +268 -0
  300. package/.claude/archive/skills/slack-gif-creator/templates/shake.py +127 -0
  301. package/.claude/archive/skills/slack-gif-creator/templates/slide.py +291 -0
  302. package/.claude/archive/skills/slack-gif-creator/templates/spin.py +269 -0
  303. package/.claude/archive/skills/slack-gif-creator/templates/wiggle.py +300 -0
  304. package/.claude/archive/skills/slack-gif-creator/templates/zoom.py +312 -0
  305. package/.claude/archive/skills/twitter-algorithm-optimizer/SKILL.md +327 -0
  306. package/.claude/archive/skills/video-downloader/SKILL.md +99 -0
  307. package/.claude/archive/skills/video-downloader/scripts/download_video.py +145 -0
  308. package/.claude/bash-whitelist-requests/2026-05-28-grep-find-rg.md +68 -0
  309. package/.claude/bash-whitelist-requests/2026-06-01-readonly-filters.md +76 -0
  310. package/.claude/bash-whitelist.txt +124 -0
  311. package/.claude/commands/agent-introspect.md +89 -0
  312. package/.claude/commands/apply-rules.md +363 -0
  313. package/.claude/commands/approve-design.md +219 -0
  314. package/.claude/commands/approve-org-money.md +267 -0
  315. package/.claude/commands/build.md +234 -0
  316. package/.claude/commands/commit.md +97 -0
  317. package/.claude/commands/context-fetch.md +113 -0
  318. package/.claude/commands/create-tool.md +496 -0
  319. package/.claude/commands/design-review.md +138 -0
  320. package/.claude/commands/design.md +807 -0
  321. package/.claude/commands/discharge-byproduct.md +208 -0
  322. package/.claude/commands/doc-review.md +165 -0
  323. package/.claude/commands/document-pair.md +76 -0
  324. package/.claude/commands/error-triage.md +435 -0
  325. package/.claude/commands/eval.md +70 -0
  326. package/.claude/commands/evolve.md +49 -0
  327. package/.claude/commands/finish-task.md +105 -0
  328. package/.claude/commands/gan-build.md +91 -0
  329. package/.claude/commands/gan-design.md +82 -0
  330. package/.claude/commands/gate-bypass.md +77 -0
  331. package/.claude/commands/gate-clear.md +45 -0
  332. package/.claude/commands/gate-status.md +46 -0
  333. package/.claude/commands/harness-audit.md +151 -0
  334. package/.claude/commands/hearing.md +138 -0
  335. package/.claude/commands/impact-check.md +486 -0
  336. package/.claude/commands/init-tasks.md +49 -0
  337. package/.claude/commands/instinct-export.md +47 -0
  338. package/.claude/commands/instinct-import.md +41 -0
  339. package/.claude/commands/instinct-status.md +43 -0
  340. package/.claude/commands/investigate.md +547 -0
  341. package/.claude/commands/learn.md +55 -0
  342. package/.claude/commands/lint-rules.md +400 -0
  343. package/.claude/commands/mode.md +58 -0
  344. package/.claude/commands/modify-feature.md +209 -0
  345. package/.claude/commands/module-review.md +149 -0
  346. package/.claude/commands/move-section.md +67 -0
  347. package/.claude/commands/new-draft.md +67 -0
  348. package/.claude/commands/new-feature.md +286 -0
  349. package/.claude/commands/new-task.md +156 -0
  350. package/.claude/commands/notification.md +107 -0
  351. package/.claude/commands/pm-start.md +119 -0
  352. package/.claude/commands/projects.md +32 -0
  353. package/.claude/commands/promote.md +43 -0
  354. package/.claude/commands/rasis-report.md +1323 -0
  355. package/.claude/commands/release-note.md +130 -0
  356. package/.claude/commands/reply-watch.md +149 -0
  357. package/.claude/commands/requirement.md +352 -0
  358. package/.claude/commands/resume-state.md +187 -0
  359. package/.claude/commands/reviewpr.md +118 -0
  360. package/.claude/commands/save-state.md +100 -0
  361. package/.claude/commands/sentry-pr.md +157 -0
  362. package/.claude/commands/start-task.md +87 -0
  363. package/.claude/commands/system-review.md +147 -0
  364. package/.claude/commands/task-bypass.md +70 -0
  365. package/.claude/commands/task-estimate.md +100 -0
  366. package/.claude/commands/template-apply.md +89 -0
  367. package/.claude/commands/test-design.md +116 -0
  368. package/.claude/commands/transfer-mismatch.md +317 -0
  369. package/.claude/commands/verify.md +51 -0
  370. package/.claude/evals/grader-loop-mode-autonomy.sh +165 -0
  371. package/.claude/evals/grader-system-reminder-attention.sh +99 -0
  372. package/.claude/evals/loop-mode-autonomy.md +121 -0
  373. package/.claude/evals/loop-mode-autonomy.results.template.md +133 -0
  374. package/.claude/evals/system-reminder-attention.md +123 -0
  375. package/.claude/evals/system-reminder-attention.results.template.md +93 -0
  376. package/.claude/evals/system-reminder-attention.runner.md +353 -0
  377. package/.claude/harness-config.local.yml +48 -0
  378. package/.claude/harness-config.yml +534 -0
  379. package/.claude/hooks/agent-marker-clear.sh +43 -0
  380. package/.claude/hooks/agent-marker-set.sh +40 -0
  381. package/.claude/hooks/agent-router-suggest.sh +123 -0
  382. package/.claude/hooks/autonomous-action-guard.sh +242 -0
  383. package/.claude/hooks/byproduct-discharge-guard.sh +128 -0
  384. package/.claude/hooks/check-md-mermaid.sh +144 -0
  385. package/.claude/hooks/check-required-env.sh +95 -0
  386. package/.claude/hooks/check-serena-mcp.sh +123 -0
  387. package/.claude/hooks/confidence-gate.sh +139 -0
  388. package/.claude/hooks/context-budget.sh +233 -0
  389. package/.claude/hooks/delegation-guard.sh +99 -0
  390. package/.claude/hooks/dispatcher-manifest.tsv +38 -0
  391. package/.claude/hooks/draft-flow-guard.sh +304 -0
  392. package/.claude/hooks/failure-loop-detect.sh +139 -0
  393. package/.claude/hooks/gateguard.sh +209 -0
  394. package/.claude/hooks/improvement-proposal.sh +112 -0
  395. package/.claude/hooks/init-tasks-on-start.sh +34 -0
  396. package/.claude/hooks/lib/bypass-logger.sh +82 -0
  397. package/.claude/hooks/lib/confidence-gate/bypass.sh +48 -0
  398. package/.claude/hooks/lib/confidence-gate/extract.sh +99 -0
  399. package/.claude/hooks/lib/confidence-gate/major-agent-filter.sh +59 -0
  400. package/.claude/hooks/lib/confidence-gate/messages.sh +53 -0
  401. package/.claude/hooks/lib/config-loader.sh +784 -0
  402. package/.claude/hooks/lib/delegation-guard/bash-whitelist.sh +323 -0
  403. package/.claude/hooks/lib/delegation-guard/git-deny.sh +188 -0
  404. package/.claude/hooks/lib/delegation-guard/protected-paths.sh +105 -0
  405. package/.claude/hooks/lib/delegation-guard/subagent-detect.sh +40 -0
  406. package/.claude/hooks/lib/dispatcher-core.sh +454 -0
  407. package/.claude/hooks/lib/improvement-proposal/aggregate.py +466 -0
  408. package/.claude/hooks/lib/improvement-proposal/cache.sh +78 -0
  409. package/.claude/hooks/lib/mode-loader.sh +80 -0
  410. package/.claude/hooks/lib/next-actions-parser.sh +153 -0
  411. package/.claude/hooks/lib/project-root.sh +60 -0
  412. package/.claude/hooks/list-md-plan-first-reminder.sh +143 -0
  413. package/.claude/hooks/loop-auto-progress-reminder.sh +108 -0
  414. package/.claude/hooks/loop-confirmation-detector.sh +241 -0
  415. package/.claude/hooks/mode-asana-prompt.sh +61 -0
  416. package/.claude/hooks/mode-enforce.sh +57 -0
  417. package/.claude/hooks/mode-session-start.sh +93 -0
  418. package/.claude/hooks/next-actions-surface.sh +136 -0
  419. package/.claude/hooks/notification-dispatcher.sh +9 -0
  420. package/.claude/hooks/notify.sh +27 -0
  421. package/.claude/hooks/parallel-subagent-reminder.sh +469 -0
  422. package/.claude/hooks/post-tool-use-dispatcher.sh +9 -0
  423. package/.claude/hooks/pre-tool-use-dispatcher.sh +9 -0
  424. package/.claude/hooks/reviewer-count-guard.sh +313 -0
  425. package/.claude/hooks/session-help-surface.sh +192 -0
  426. package/.claude/hooks/session-start-dispatcher.sh +9 -0
  427. package/.claude/hooks/session-start-wrapper.sh +156 -0
  428. package/.claude/hooks/stale-harness-detect.sh +422 -0
  429. package/.claude/hooks/stop-dispatcher.sh +9 -0
  430. package/.claude/hooks/stop.sh +25 -0
  431. package/.claude/hooks/subagent-stop-dispatcher.sh +9 -0
  432. package/.claude/hooks/task-rule-guard.sh +317 -0
  433. package/.claude/hooks/tests/run-tests.sh +23 -0
  434. package/.claude/hooks/tests/test-agent-marker-warn.sh +86 -0
  435. package/.claude/hooks/tests/test-check-required-env.sh +138 -0
  436. package/.claude/hooks/tests/test-confidence-gate.sh +170 -0
  437. package/.claude/hooks/tests/test-config-env-override.sh +220 -0
  438. package/.claude/hooks/tests/test-gate-disable.sh +118 -0
  439. package/.claude/hooks/tests/test-improvement-proposal.sh +284 -0
  440. package/.claude/hooks/tool-call-slip-detector.sh +188 -0
  441. package/.claude/hooks/user-prompt-submit-dispatcher.sh +9 -0
  442. package/.claude/hooks/why-x5-reminder.sh +45 -0
  443. package/.claude/hooks/why-x5-violation-detect.sh +152 -0
  444. package/.claude/hooks/workflow-guard.sh +263 -0
  445. package/.claude/mode.yml +28 -0
  446. package/.claude/project-rules/development-process.md +8 -0
  447. package/.claude/project-rules/git-workflow.md +8 -0
  448. package/.claude/project-rules/modes.md +8 -0
  449. package/.claude/project-rules/self-improvement.md +8 -0
  450. package/.claude/project-rules/task-management.md +8 -0
  451. package/.claude/project-rules/why-x5-output.md +8 -0
  452. package/.claude/project-rules/workflow.md +8 -0
  453. package/.claude/rules/development-process.md +293 -0
  454. package/.claude/rules/git-workflow.md +71 -0
  455. package/.claude/rules/modes.md +189 -0
  456. package/.claude/rules/self-improvement.md +76 -0
  457. package/.claude/rules/task-management.md +261 -0
  458. package/.claude/rules/why-x5-output.md +97 -0
  459. package/.claude/rules/workflow.md +157 -0
  460. package/.claude/rules-details/README.md +67 -0
  461. package/.claude/rules-details/development-process/confidence-gate.md +22 -0
  462. package/.claude/rules-details/development-process/cross-repo-write.md +35 -0
  463. package/.claude/rules-details/development-process/delegation-requirements.md +158 -0
  464. package/.claude/rules-details/development-process/harness-sync.md +21 -0
  465. package/.claude/rules-details/development-process/origin.md +13 -0
  466. package/.claude/rules-details/development-process/parallelization-origin.md +22 -0
  467. package/.claude/rules-details/development-process/research-reuse.md +22 -0
  468. package/.claude/rules-details/development-process/staging-strategy.md +47 -0
  469. package/.claude/rules-details/modes/artifacts.md +34 -0
  470. package/.claude/rules-details/modes/compliance-items.md +120 -0
  471. package/.claude/rules-details/modes/five-layer-enforcement.md +46 -0
  472. package/.claude/rules-details/modes/mode-hooks.md +51 -0
  473. package/.claude/rules-details/modes/origin.md +17 -0
  474. package/.claude/rules-details/self-improvement/l4-mechanics.md +36 -0
  475. package/.claude/rules-details/self-improvement/origin.md +8 -0
  476. package/.claude/rules-details/self-improvement/related-skills.md +35 -0
  477. package/.claude/rules-details/self-improvement/when-to-use-layers.md +39 -0
  478. package/.claude/rules-details/task-management/hook-enforcement.md +25 -0
  479. package/.claude/rules-details/task-management/mandatory-reading.md +20 -0
  480. package/.claude/rules-details/task-management/origin.md +12 -0
  481. package/.claude/rules-details/task-management/parking-lot.md +26 -0
  482. package/.claude/rules-details/task-management/plan-first.md +44 -0
  483. package/.claude/rules-details/task-management/six-articles.md +68 -0
  484. package/.claude/rules-details/task-management/task-migration.md +16 -0
  485. package/.claude/rules-details/task-management/ui-detection.md +11 -0
  486. package/.claude/rules-details/why-x5-output/examples.md +41 -0
  487. package/.claude/rules-details/why-x5-output/feedback-memory.md +14 -0
  488. package/.claude/rules-details/why-x5-output/origin.md +10 -0
  489. package/.claude/rules-details/why-x5-output/v1-v10-history.md +19 -0
  490. package/.claude/rules-details/workflow/10-stage.md +43 -0
  491. package/.claude/rules-details/workflow/14-stage.md +52 -0
  492. package/.claude/rules-details/workflow/byproduct-discharge.md +39 -0
  493. package/.claude/rules-details/workflow/draft-flow-guard.md +31 -0
  494. package/.claude/rules-details/workflow/fan-out.md +70 -0
  495. package/.claude/rules-details/workflow/mece-20.md +36 -0
  496. package/.claude/rules-details/workflow/origin.md +14 -0
  497. package/.claude/rules-details/workflow/refactoring.md +48 -0
  498. package/.claude/rules-details/workflow/related-skills.md +22 -0
  499. package/.claude/rules-details/workflow/reviewer-prompt.md +100 -0
  500. package/.claude/rules-details/workflow/session-persistence.md +46 -0
  501. package/.claude/rules-details/workflow/workflow-guard.md +36 -0
  502. package/.claude/scripts/__pycache__/harness-audit.cpython-313.pyc +0 -0
  503. package/.claude/scripts/agent-stocktake.py +421 -0
  504. package/.claude/scripts/check-md-mermaid.mjs +138 -0
  505. package/.claude/scripts/generate-settings.sh +0 -0
  506. package/.claude/scripts/harness-audit.py +1547 -0
  507. package/.claude/scripts/hc-config.sh +2265 -0
  508. package/.claude/scripts/init-tasks.sh +117 -0
  509. package/.claude/scripts/lib/enforcement-matrix-parse.sh +81 -0
  510. package/.claude/scripts/lib/hc-config-metadata.sh +190 -0
  511. package/.claude/scripts/lib/hc-config-web-server.js +1528 -0
  512. package/.claude/scripts/lib/hc-config-web-ui/app.js +1054 -0
  513. package/.claude/scripts/lib/hc-config-web-ui/index.html +130 -0
  514. package/.claude/scripts/lib/hc-config-web-ui/style.css +522 -0
  515. package/.claude/scripts/new-task-helper.sh +432 -0
  516. package/.claude/scripts/observe-repair.sh +437 -0
  517. package/.claude/scripts/observe-rotate.sh +311 -0
  518. package/.claude/scripts/statusline.sh +239 -0
  519. package/.claude/settings.generated.preview.json +211 -0
  520. package/.claude/settings.json +215 -0
  521. package/.claude/settings.local.example.json +20 -0
  522. package/.claude/settings.local.json +36 -0
  523. package/.claude/skills/agent-introspection-debugging/SKILL.md +123 -0
  524. package/.claude/skills/agent-router/README.md +137 -0
  525. package/.claude/skills/agent-router/SKILL.md +74 -0
  526. package/.claude/skills/agent-router/dispatch-table.yml +352 -0
  527. package/.claude/skills/agent-router/router.py +1086 -0
  528. package/.claude/skills/agent-router/samples/representative_prompts.txt +24 -0
  529. package/.claude/skills/agent-router/tests/__init__.py +0 -0
  530. package/.claude/skills/agent-router/tests/test_router.py +762 -0
  531. package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
  532. package/.claude/skills/artifacts-builder/SKILL.md +74 -0
  533. package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  534. package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  535. package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  536. package/.claude/skills/brand-guidelines/LICENSE.txt +202 -0
  537. package/.claude/skills/brand-guidelines/SKILL.md +73 -0
  538. package/.claude/skills/canvas-design/LICENSE.txt +202 -0
  539. package/.claude/skills/canvas-design/SKILL.md +130 -0
  540. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  541. package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  542. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  543. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  544. package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  545. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  546. package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  547. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  548. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  549. package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  550. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  551. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  552. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  553. package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  554. package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  555. package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  556. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  557. package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  558. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  559. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  560. package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  561. package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  562. package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  563. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  564. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  565. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  566. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  567. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  568. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  569. package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  570. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  571. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  572. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  573. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  574. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  575. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  576. package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  577. package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  578. package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  579. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  580. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  581. package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  582. package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  583. package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  584. package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  585. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  586. package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  587. package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  588. package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  589. package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  590. package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  591. package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  592. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  593. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  594. package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  595. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  596. package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  597. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  598. package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  599. package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  600. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  601. package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  602. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  603. package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  604. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  605. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  606. package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  607. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  608. package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  609. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  610. package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  611. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  612. package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  613. package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  614. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  615. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  616. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  617. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  618. package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  619. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  620. package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  621. package/.claude/skills/changelog-generator/SKILL.md +104 -0
  622. package/.claude/skills/check-md-mermaid/SKILL.md +62 -0
  623. package/.claude/skills/connect/SKILL.md +156 -0
  624. package/.claude/skills/connect-apps/SKILL.md +80 -0
  625. package/.claude/skills/content-research-writer/SKILL.md +538 -0
  626. package/.claude/skills/continuous-agent-loop/SKILL.md +187 -0
  627. package/.claude/skills/continuous-learning-v2/SKILL.md +238 -0
  628. package/.claude/skills/continuous-learning-v2/config.json +35 -0
  629. package/.claude/skills/continuous-learning-v2/hooks/observe.sh +333 -0
  630. package/.claude/skills/continuous-learning-v2/instinct-cli.py +406 -0
  631. package/.claude/skills/domain-name-brainstormer/SKILL.md +212 -0
  632. package/.claude/skills/eval-harness/SKILL.md +100 -0
  633. package/.claude/skills/eval-harness/swe-bench/README.md +80 -0
  634. package/.claude/skills/eval-harness/swe-bench/config.yml +29 -0
  635. package/.claude/skills/eval-harness/swe-bench/docker/Dockerfile +25 -0
  636. package/.claude/skills/eval-harness/swe-bench/docker/docker-compose.yml +18 -0
  637. package/.claude/skills/eval-harness/swe-bench/results/dry-run-2026-05-04.json +137 -0
  638. package/.claude/skills/eval-harness/swe-bench/results/dry-run-comparison-2026-05-04.md +112 -0
  639. package/.claude/skills/eval-harness/swe-bench/results/dry-run-improved-2026-05-04.json +165 -0
  640. package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.patch +12 -0
  641. package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.txt +322 -0
  642. package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.whole-file.txt +322 -0
  643. package/.claude/skills/eval-harness/swe-bench/runner.py +845 -0
  644. package/.claude/skills/eval-harness/swe-bench/scoring.py +298 -0
  645. package/.claude/skills/eval-harness/swe-bench/tasks/fetch_tasks.py +81 -0
  646. package/.claude/skills/eval-harness/swe-bench/tasks/lite-50.json +702 -0
  647. package/.claude/skills/file-organizer/SKILL.md +433 -0
  648. package/.claude/skills/gan-style-harness/SKILL.md +111 -0
  649. package/.claude/skills/gateguard/.gateguard.yml +47 -0
  650. package/.claude/skills/gateguard/SKILL.md +99 -0
  651. package/.claude/skills/internal-comms/LICENSE.txt +202 -0
  652. package/.claude/skills/internal-comms/SKILL.md +32 -0
  653. package/.claude/skills/internal-comms/examples/3p-updates.md +47 -0
  654. package/.claude/skills/internal-comms/examples/company-newsletter.md +65 -0
  655. package/.claude/skills/internal-comms/examples/faq-answers.md +30 -0
  656. package/.claude/skills/internal-comms/examples/general-comms.md +16 -0
  657. package/.claude/skills/invoice-organizer/SKILL.md +446 -0
  658. package/.claude/skills/karpathy-guidelines/SKILL.md +67 -0
  659. package/.claude/skills/langsmith-fetch/SKILL.md +485 -0
  660. package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
  661. package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
  662. package/.claude/skills/mcp-builder/SKILL.md +328 -0
  663. package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
  664. package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
  665. package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
  666. package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
  667. package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
  668. package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
  669. package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  670. package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
  671. package/.claude/skills/raffle-winner-picker/SKILL.md +159 -0
  672. package/.claude/skills/repo-map/README.md +125 -0
  673. package/.claude/skills/repo-map/SKILL.md +128 -0
  674. package/.claude/skills/repo-map/examples/sample-output.md +1194 -0
  675. package/.claude/skills/repo-map/repo-map.py +715 -0
  676. package/.claude/skills/salesforce-e2e-testing/SKILL.md +116 -0
  677. package/.claude/skills/salesforce-e2e-testing/catalog-template.md +161 -0
  678. package/.claude/skills/salesforce-e2e-testing/methodology.md +179 -0
  679. package/.claude/skills/salesforce-e2e-testing/observation-rules.md +280 -0
  680. package/.claude/skills/salesforce-e2e-testing/pattern-taxonomy.md +392 -0
  681. package/.claude/skills/salesforce-e2e-testing/procedure-template.md +376 -0
  682. package/.claude/skills/skill-creator/LICENSE.txt +202 -0
  683. package/.claude/skills/skill-creator/SKILL.md +209 -0
  684. package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
  685. package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  686. package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
  687. package/.claude/skills/skill-share/SKILL.md +80 -0
  688. package/.claude/skills/tailored-resume-generator/SKILL.md +345 -0
  689. package/.claude/skills/template-skill/SKILL.md +6 -0
  690. package/.claude/skills/theme-factory/LICENSE.txt +202 -0
  691. package/.claude/skills/theme-factory/SKILL.md +59 -0
  692. package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
  693. package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
  694. package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
  695. package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
  696. package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
  697. package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
  698. package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  699. package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
  700. package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
  701. package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  702. package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
  703. package/.claude/skills/verification-loop/SKILL.md +129 -0
  704. package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
  705. package/.claude/skills/webapp-testing/SKILL.md +96 -0
  706. package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
  707. package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
  708. package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
  709. package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
  710. package/.claude/templates/docs/draft/_DRAFT_TEMPLATE.md +162 -0
  711. package/.claude/templates/docs/draft/_TEST_DESIGN_TEMPLATE.md +76 -0
  712. package/.claude/templates/docs/tasks/_TASK_TEMPLATE.md +276 -0
  713. package/.claude/templates/docs/tasks/list.md +80 -0
  714. package/.claude/templates/docs/tasks/parking-lot.md +82 -0
  715. package/.claude/templates/settings.user-level.json.template +306 -0
  716. package/.claude/tests/SMOKE-CLASSIFICATION.md +199 -0
  717. package/.claude/tests/action-space-count-smoke.sh +130 -0
  718. package/.claude/tests/agent-router-suggest-wiring-smoke.sh +188 -0
  719. package/.claude/tests/audit-followups-smoke.sh +158 -0
  720. package/.claude/tests/autonomous-action-guard-relaxation-smoke.sh +479 -0
  721. package/.claude/tests/autonomous-action-guard-smoke.sh +187 -0
  722. package/.claude/tests/check-serena-mcp-smoke.sh +156 -0
  723. package/.claude/tests/common-rules-import-smoke.sh +209 -0
  724. package/.claude/tests/confidence-gate-smoke.sh +220 -0
  725. package/.claude/tests/config-feature-toggles-smoke.sh +389 -0
  726. package/.claude/tests/context-budget-smoke.sh +222 -0
  727. package/.claude/tests/custom-pm-commands-smoke.sh +93 -0
  728. package/.claude/tests/delegation-guard-code-smoke.sh +244 -0
  729. package/.claude/tests/delegation-guard-deny-layers-smoke.sh +356 -0
  730. package/.claude/tests/delegation-guard-readonly-filter-smoke.sh +205 -0
  731. package/.claude/tests/delegation-guard-search-whitelist-smoke.sh +152 -0
  732. package/.claude/tests/delegation-guard-segment-smoke.sh +109 -0
  733. package/.claude/tests/dispatcher-blocker-invariance-smoke.sh +700 -0
  734. package/.claude/tests/dispatcher-core-smoke.sh +452 -0
  735. package/.claude/tests/dispatcher-merge-matrix-smoke.sh +825 -0
  736. package/.claude/tests/dispatcher-success-stdout-smoke.sh +290 -0
  737. package/.claude/tests/draft-flow-guard-approved-dir-smoke.sh +234 -0
  738. package/.claude/tests/draft-flow-guard-smoke.sh +194 -0
  739. package/.claude/tests/dual-mode-portability-smoke.sh +131 -0
  740. package/.claude/tests/effective-hook-matrix-smoke.sh +261 -0
  741. package/.claude/tests/enforcement-mismatch-smoke.sh +263 -0
  742. package/.claude/tests/fixtures/cascade-sample.jsonl +9 -0
  743. package/.claude/tests/fixtures/next-actions/case-clean.md +14 -0
  744. package/.claude/tests/fixtures/next-actions/case-with-red.md +16 -0
  745. package/.claude/tests/fixtures/next-actions/case-with-yellow-only.md +14 -0
  746. package/.claude/tests/fixtures/normal-broken-scatter.jsonl +5 -0
  747. package/.claude/tests/fixtures/task-71/blocker-baseline.tsv +24 -0
  748. package/.claude/tests/fixtures/task-71/settings-inventory.tsv +37 -0
  749. package/.claude/tests/fixtures/transcript-50pct.jsonl +2 -0
  750. package/.claude/tests/fixtures/transcript-60pct.jsonl +2 -0
  751. package/.claude/tests/fixtures/transcript-80pct.jsonl +2 -0
  752. package/.claude/tests/fixtures/transcript-95pct.jsonl +2 -0
  753. package/.claude/tests/fixtures/workflow-guard/case-2-mid.json +21 -0
  754. package/.claude/tests/fixtures/workflow-guard/case-3-blocked.json +33 -0
  755. package/.claude/tests/fixtures/workflow-guard/case-4-clean.json +27 -0
  756. package/.claude/tests/fixtures/workflow-guard/case-8-modify.json +23 -0
  757. package/.claude/tests/fixtures/workflow-guard/inputs/case-1.json +1 -0
  758. package/.claude/tests/fixtures/workflow-guard/inputs/case-2.json +1 -0
  759. package/.claude/tests/fixtures/workflow-guard/inputs/case-3.json +1 -0
  760. package/.claude/tests/fixtures/workflow-guard/inputs/case-4.json +1 -0
  761. package/.claude/tests/fixtures/workflow-guard/inputs/case-5.json +1 -0
  762. package/.claude/tests/fixtures/workflow-guard/inputs/case-6.json +1 -0
  763. package/.claude/tests/fixtures/workflow-guard/inputs/case-7.json +1 -0
  764. package/.claude/tests/fixtures/workflow-guard/inputs/case-8.json +1 -0
  765. package/.claude/tests/gateguard-smoke.sh +213 -0
  766. package/.claude/tests/git-deny-mainline-policy-smoke.sh +222 -0
  767. package/.claude/tests/harness-audit-c-batch-smoke.sh +270 -0
  768. package/.claude/tests/harness-audit-compare-smoke.sh +186 -0
  769. package/.claude/tests/harness-audit-pipeline-health-smoke.sh +326 -0
  770. package/.claude/tests/harness-config-local-smoke.sh +232 -0
  771. package/.claude/tests/hc-config-git-policy-smoke.sh +241 -0
  772. package/.claude/tests/hc-config-key-parity-smoke.sh +149 -0
  773. package/.claude/tests/hc-config-migration-smoke.sh +251 -0
  774. package/.claude/tests/hc-config-script-smoke.sh +1106 -0
  775. package/.claude/tests/hc-config-tui-smoke.sh +801 -0
  776. package/.claude/tests/hc-config-web-ui-smoke.sh +3224 -0
  777. package/.claude/tests/hook-cwd-robustness-smoke.sh +206 -0
  778. package/.claude/tests/hook-frequency-tweaks-smoke.sh +312 -0
  779. package/.claude/tests/improvement-proposal-cache-smoke.sh +238 -0
  780. package/.claude/tests/install-sh-overwrite-all-smoke.sh +274 -0
  781. package/.claude/tests/install-sh-regen-settings-smoke.sh +301 -0
  782. package/.claude/tests/install-sh-sync-drift-smoke.sh +285 -0
  783. package/.claude/tests/layer-b-context-isolation-smoke.sh +392 -0
  784. package/.claude/tests/list-md-plan-first-reminder-smoke.sh +313 -0
  785. package/.claude/tests/loop-auto-progress-smoke.sh +372 -0
  786. package/.claude/tests/loop-confirmation-detector-smoke.sh +674 -0
  787. package/.claude/tests/new-task-batch-update-smoke.sh +664 -0
  788. package/.claude/tests/next-actions-hooks-smoke.sh +283 -0
  789. package/.claude/tests/npx-cli-smoke.sh +696 -0
  790. package/.claude/tests/observe-flock-smoke.sh +223 -0
  791. package/.claude/tests/observe-jq-parse-smoke.sh +250 -0
  792. package/.claude/tests/observe-repair-smoke.sh +475 -0
  793. package/.claude/tests/observe-rotate-smoke.sh +428 -0
  794. package/.claude/tests/observe-subagent-stop-smoke.sh +476 -0
  795. package/.claude/tests/parallel-subagent-reminder-smoke.sh +918 -0
  796. package/.claude/tests/project-root-smoke.sh +140 -0
  797. package/.claude/tests/project-rules-protection-smoke.sh +199 -0
  798. package/.claude/tests/review-required-min-count-smoke.sh +286 -0
  799. package/.claude/tests/reviewer-count-guard-smoke.sh +490 -0
  800. package/.claude/tests/rule-architecture-smoke.sh +418 -0
  801. package/.claude/tests/rule-change-draft-flow-guard-smoke.sh +343 -0
  802. package/.claude/tests/run-all-smokes.sh +340 -0
  803. package/.claude/tests/session-help-surface-smoke.sh +224 -0
  804. package/.claude/tests/session-start-parallel-smoke.sh +165 -0
  805. package/.claude/tests/sessionstart-budget-smoke.sh +185 -0
  806. package/.claude/tests/sessionstart-footprint-smoke.sh +258 -0
  807. package/.claude/tests/settings-dispatcher-baseline-smoke.sh +709 -0
  808. package/.claude/tests/settings-generation-feature-pruning-smoke.sh +196 -0
  809. package/.claude/tests/stale-harness-detect-smoke.sh +974 -0
  810. package/.claude/tests/statusline-smoke.sh +180 -0
  811. package/.claude/tests/task-rule-guard-smoke.sh +656 -0
  812. package/.claude/tests/tool-call-slip-detector-smoke.sh +101 -0
  813. package/.claude/tests/wave-precheck-template-smoke.sh +159 -0
  814. package/.claude/tests/why-x5-violation-detect-smoke.sh +157 -0
  815. package/.claude/tests/workflow-guard-smoke.sh +266 -0
  816. package/CLAUDE.md +75 -0
  817. package/LICENSE +21 -0
  818. package/README.md +790 -0
  819. package/bin/cli.js +395 -0
  820. package/docs/INVENTORY.md +163 -0
  821. package/install.sh +769 -0
  822. package/package.json +25 -0
@@ -0,0 +1,979 @@
1
+ /**
2
+ * html2pptx - Convert HTML slide to pptxgenjs slide with positioned elements
3
+ *
4
+ * USAGE:
5
+ * const pptx = new pptxgen();
6
+ * pptx.layout = 'LAYOUT_16x9'; // Must match HTML body dimensions
7
+ *
8
+ * const { slide, placeholders } = await html2pptx('slide.html', pptx);
9
+ * slide.addChart(pptx.charts.LINE, data, placeholders[0]);
10
+ *
11
+ * await pptx.writeFile('output.pptx');
12
+ *
13
+ * FEATURES:
14
+ * - Converts HTML to PowerPoint with accurate positioning
15
+ * - Supports text, images, shapes, and bullet lists
16
+ * - Extracts placeholder elements (class="placeholder") with positions
17
+ * - Handles CSS gradients, borders, and margins
18
+ *
19
+ * VALIDATION:
20
+ * - Uses body width/height from HTML for viewport sizing
21
+ * - Throws error if HTML dimensions don't match presentation layout
22
+ * - Throws error if content overflows body (with overflow details)
23
+ *
24
+ * RETURNS:
25
+ * { slide, placeholders } where placeholders is an array of { id, x, y, w, h }
26
+ */
27
+
28
+ const { chromium } = require('playwright');
29
+ const path = require('path');
30
+ const sharp = require('sharp');
31
+
32
+ const PT_PER_PX = 0.75;
33
+ const PX_PER_IN = 96;
34
+ const EMU_PER_IN = 914400;
35
+
36
+ // Helper: Get body dimensions and check for overflow
37
+ async function getBodyDimensions(page) {
38
+ const bodyDimensions = await page.evaluate(() => {
39
+ const body = document.body;
40
+ const style = window.getComputedStyle(body);
41
+
42
+ return {
43
+ width: parseFloat(style.width),
44
+ height: parseFloat(style.height),
45
+ scrollWidth: body.scrollWidth,
46
+ scrollHeight: body.scrollHeight
47
+ };
48
+ });
49
+
50
+ const errors = [];
51
+ const widthOverflowPx = Math.max(0, bodyDimensions.scrollWidth - bodyDimensions.width - 1);
52
+ const heightOverflowPx = Math.max(0, bodyDimensions.scrollHeight - bodyDimensions.height - 1);
53
+
54
+ const widthOverflowPt = widthOverflowPx * PT_PER_PX;
55
+ const heightOverflowPt = heightOverflowPx * PT_PER_PX;
56
+
57
+ if (widthOverflowPt > 0 || heightOverflowPt > 0) {
58
+ const directions = [];
59
+ if (widthOverflowPt > 0) directions.push(`${widthOverflowPt.toFixed(1)}pt horizontally`);
60
+ if (heightOverflowPt > 0) directions.push(`${heightOverflowPt.toFixed(1)}pt vertically`);
61
+ const reminder = heightOverflowPt > 0 ? ' (Remember: leave 0.5" margin at bottom of slide)' : '';
62
+ errors.push(`HTML content overflows body by ${directions.join(' and ')}${reminder}`);
63
+ }
64
+
65
+ return { ...bodyDimensions, errors };
66
+ }
67
+
68
+ // Helper: Validate dimensions match presentation layout
69
+ function validateDimensions(bodyDimensions, pres) {
70
+ const errors = [];
71
+ const widthInches = bodyDimensions.width / PX_PER_IN;
72
+ const heightInches = bodyDimensions.height / PX_PER_IN;
73
+
74
+ if (pres.presLayout) {
75
+ const layoutWidth = pres.presLayout.width / EMU_PER_IN;
76
+ const layoutHeight = pres.presLayout.height / EMU_PER_IN;
77
+
78
+ if (Math.abs(layoutWidth - widthInches) > 0.1 || Math.abs(layoutHeight - heightInches) > 0.1) {
79
+ errors.push(
80
+ `HTML dimensions (${widthInches.toFixed(1)}" × ${heightInches.toFixed(1)}") ` +
81
+ `don't match presentation layout (${layoutWidth.toFixed(1)}" × ${layoutHeight.toFixed(1)}")`
82
+ );
83
+ }
84
+ }
85
+ return errors;
86
+ }
87
+
88
+ function validateTextBoxPosition(slideData, bodyDimensions) {
89
+ const errors = [];
90
+ const slideHeightInches = bodyDimensions.height / PX_PER_IN;
91
+ const minBottomMargin = 0.5; // 0.5 inches from bottom
92
+
93
+ for (const el of slideData.elements) {
94
+ // Check text elements (p, h1-h6, list)
95
+ if (['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'list'].includes(el.type)) {
96
+ const fontSize = el.style?.fontSize || 0;
97
+ const bottomEdge = el.position.y + el.position.h;
98
+ const distanceFromBottom = slideHeightInches - bottomEdge;
99
+
100
+ if (fontSize > 12 && distanceFromBottom < minBottomMargin) {
101
+ const getText = () => {
102
+ if (typeof el.text === 'string') return el.text;
103
+ if (Array.isArray(el.text)) return el.text.find(t => t.text)?.text || '';
104
+ if (Array.isArray(el.items)) return el.items.find(item => item.text)?.text || '';
105
+ return '';
106
+ };
107
+ const textPrefix = getText().substring(0, 50) + (getText().length > 50 ? '...' : '');
108
+
109
+ errors.push(
110
+ `Text box "${textPrefix}" ends too close to bottom edge ` +
111
+ `(${distanceFromBottom.toFixed(2)}" from bottom, minimum ${minBottomMargin}" required)`
112
+ );
113
+ }
114
+ }
115
+ }
116
+
117
+ return errors;
118
+ }
119
+
120
+ // Helper: Add background to slide
121
+ async function addBackground(slideData, targetSlide, tmpDir) {
122
+ if (slideData.background.type === 'image' && slideData.background.path) {
123
+ let imagePath = slideData.background.path.startsWith('file://')
124
+ ? slideData.background.path.replace('file://', '')
125
+ : slideData.background.path;
126
+ targetSlide.background = { path: imagePath };
127
+ } else if (slideData.background.type === 'color' && slideData.background.value) {
128
+ targetSlide.background = { color: slideData.background.value };
129
+ }
130
+ }
131
+
132
+ // Helper: Add elements to slide
133
+ function addElements(slideData, targetSlide, pres) {
134
+ for (const el of slideData.elements) {
135
+ if (el.type === 'image') {
136
+ let imagePath = el.src.startsWith('file://') ? el.src.replace('file://', '') : el.src;
137
+ targetSlide.addImage({
138
+ path: imagePath,
139
+ x: el.position.x,
140
+ y: el.position.y,
141
+ w: el.position.w,
142
+ h: el.position.h
143
+ });
144
+ } else if (el.type === 'line') {
145
+ targetSlide.addShape(pres.ShapeType.line, {
146
+ x: el.x1,
147
+ y: el.y1,
148
+ w: el.x2 - el.x1,
149
+ h: el.y2 - el.y1,
150
+ line: { color: el.color, width: el.width }
151
+ });
152
+ } else if (el.type === 'shape') {
153
+ const shapeOptions = {
154
+ x: el.position.x,
155
+ y: el.position.y,
156
+ w: el.position.w,
157
+ h: el.position.h,
158
+ shape: el.shape.rectRadius > 0 ? pres.ShapeType.roundRect : pres.ShapeType.rect
159
+ };
160
+
161
+ if (el.shape.fill) {
162
+ shapeOptions.fill = { color: el.shape.fill };
163
+ if (el.shape.transparency != null) shapeOptions.fill.transparency = el.shape.transparency;
164
+ }
165
+ if (el.shape.line) shapeOptions.line = el.shape.line;
166
+ if (el.shape.rectRadius > 0) shapeOptions.rectRadius = el.shape.rectRadius;
167
+ if (el.shape.shadow) shapeOptions.shadow = el.shape.shadow;
168
+
169
+ targetSlide.addText(el.text || '', shapeOptions);
170
+ } else if (el.type === 'list') {
171
+ const listOptions = {
172
+ x: el.position.x,
173
+ y: el.position.y,
174
+ w: el.position.w,
175
+ h: el.position.h,
176
+ fontSize: el.style.fontSize,
177
+ fontFace: el.style.fontFace,
178
+ color: el.style.color,
179
+ align: el.style.align,
180
+ valign: 'top',
181
+ lineSpacing: el.style.lineSpacing,
182
+ paraSpaceBefore: el.style.paraSpaceBefore,
183
+ paraSpaceAfter: el.style.paraSpaceAfter,
184
+ margin: el.style.margin
185
+ };
186
+ if (el.style.margin) listOptions.margin = el.style.margin;
187
+ targetSlide.addText(el.items, listOptions);
188
+ } else {
189
+ // Check if text is single-line (height suggests one line)
190
+ const lineHeight = el.style.lineSpacing || el.style.fontSize * 1.2;
191
+ const isSingleLine = el.position.h <= lineHeight * 1.5;
192
+
193
+ let adjustedX = el.position.x;
194
+ let adjustedW = el.position.w;
195
+
196
+ // Make single-line text 2% wider to account for underestimate
197
+ if (isSingleLine) {
198
+ const widthIncrease = el.position.w * 0.02;
199
+ const align = el.style.align;
200
+
201
+ if (align === 'center') {
202
+ // Center: expand both sides
203
+ adjustedX = el.position.x - (widthIncrease / 2);
204
+ adjustedW = el.position.w + widthIncrease;
205
+ } else if (align === 'right') {
206
+ // Right: expand to the left
207
+ adjustedX = el.position.x - widthIncrease;
208
+ adjustedW = el.position.w + widthIncrease;
209
+ } else {
210
+ // Left (default): expand to the right
211
+ adjustedW = el.position.w + widthIncrease;
212
+ }
213
+ }
214
+
215
+ const textOptions = {
216
+ x: adjustedX,
217
+ y: el.position.y,
218
+ w: adjustedW,
219
+ h: el.position.h,
220
+ fontSize: el.style.fontSize,
221
+ fontFace: el.style.fontFace,
222
+ color: el.style.color,
223
+ bold: el.style.bold,
224
+ italic: el.style.italic,
225
+ underline: el.style.underline,
226
+ valign: 'top',
227
+ lineSpacing: el.style.lineSpacing,
228
+ paraSpaceBefore: el.style.paraSpaceBefore,
229
+ paraSpaceAfter: el.style.paraSpaceAfter,
230
+ inset: 0 // Remove default PowerPoint internal padding
231
+ };
232
+
233
+ if (el.style.align) textOptions.align = el.style.align;
234
+ if (el.style.margin) textOptions.margin = el.style.margin;
235
+ if (el.style.rotate !== undefined) textOptions.rotate = el.style.rotate;
236
+ if (el.style.transparency !== null && el.style.transparency !== undefined) textOptions.transparency = el.style.transparency;
237
+
238
+ targetSlide.addText(el.text, textOptions);
239
+ }
240
+ }
241
+ }
242
+
243
+ // Helper: Extract slide data from HTML page
244
+ async function extractSlideData(page) {
245
+ return await page.evaluate(() => {
246
+ const PT_PER_PX = 0.75;
247
+ const PX_PER_IN = 96;
248
+
249
+ // Fonts that are single-weight and should not have bold applied
250
+ // (applying bold causes PowerPoint to use faux bold which makes text wider)
251
+ const SINGLE_WEIGHT_FONTS = ['impact'];
252
+
253
+ // Helper: Check if a font should skip bold formatting
254
+ const shouldSkipBold = (fontFamily) => {
255
+ if (!fontFamily) return false;
256
+ const normalizedFont = fontFamily.toLowerCase().replace(/['"]/g, '').split(',')[0].trim();
257
+ return SINGLE_WEIGHT_FONTS.includes(normalizedFont);
258
+ };
259
+
260
+ // Unit conversion helpers
261
+ const pxToInch = (px) => px / PX_PER_IN;
262
+ const pxToPoints = (pxStr) => parseFloat(pxStr) * PT_PER_PX;
263
+ const rgbToHex = (rgbStr) => {
264
+ // Handle transparent backgrounds by defaulting to white
265
+ if (rgbStr === 'rgba(0, 0, 0, 0)' || rgbStr === 'transparent') return 'FFFFFF';
266
+
267
+ const match = rgbStr.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
268
+ if (!match) return 'FFFFFF';
269
+ return match.slice(1).map(n => parseInt(n).toString(16).padStart(2, '0')).join('');
270
+ };
271
+
272
+ const extractAlpha = (rgbStr) => {
273
+ const match = rgbStr.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
274
+ if (!match || !match[4]) return null;
275
+ const alpha = parseFloat(match[4]);
276
+ return Math.round((1 - alpha) * 100);
277
+ };
278
+
279
+ const applyTextTransform = (text, textTransform) => {
280
+ if (textTransform === 'uppercase') return text.toUpperCase();
281
+ if (textTransform === 'lowercase') return text.toLowerCase();
282
+ if (textTransform === 'capitalize') {
283
+ return text.replace(/\b\w/g, c => c.toUpperCase());
284
+ }
285
+ return text;
286
+ };
287
+
288
+ // Extract rotation angle from CSS transform and writing-mode
289
+ const getRotation = (transform, writingMode) => {
290
+ let angle = 0;
291
+
292
+ // Handle writing-mode first
293
+ // PowerPoint: 90° = text rotated 90° clockwise (reads top to bottom, letters upright)
294
+ // PowerPoint: 270° = text rotated 270° clockwise (reads bottom to top, letters upright)
295
+ if (writingMode === 'vertical-rl') {
296
+ // vertical-rl alone = text reads top to bottom = 90° in PowerPoint
297
+ angle = 90;
298
+ } else if (writingMode === 'vertical-lr') {
299
+ // vertical-lr alone = text reads bottom to top = 270° in PowerPoint
300
+ angle = 270;
301
+ }
302
+
303
+ // Then add any transform rotation
304
+ if (transform && transform !== 'none') {
305
+ // Try to match rotate() function
306
+ const rotateMatch = transform.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/);
307
+ if (rotateMatch) {
308
+ angle += parseFloat(rotateMatch[1]);
309
+ } else {
310
+ // Browser may compute as matrix - extract rotation from matrix
311
+ const matrixMatch = transform.match(/matrix\(([^)]+)\)/);
312
+ if (matrixMatch) {
313
+ const values = matrixMatch[1].split(',').map(parseFloat);
314
+ // matrix(a, b, c, d, e, f) where rotation = atan2(b, a)
315
+ const matrixAngle = Math.atan2(values[1], values[0]) * (180 / Math.PI);
316
+ angle += Math.round(matrixAngle);
317
+ }
318
+ }
319
+ }
320
+
321
+ // Normalize to 0-359 range
322
+ angle = angle % 360;
323
+ if (angle < 0) angle += 360;
324
+
325
+ return angle === 0 ? null : angle;
326
+ };
327
+
328
+ // Get position/dimensions accounting for rotation
329
+ const getPositionAndSize = (el, rect, rotation) => {
330
+ if (rotation === null) {
331
+ return { x: rect.left, y: rect.top, w: rect.width, h: rect.height };
332
+ }
333
+
334
+ // For 90° or 270° rotations, swap width and height
335
+ // because PowerPoint applies rotation to the original (unrotated) box
336
+ const isVertical = rotation === 90 || rotation === 270;
337
+
338
+ if (isVertical) {
339
+ // The browser shows us the rotated dimensions (tall box for vertical text)
340
+ // But PowerPoint needs the pre-rotation dimensions (wide box that will be rotated)
341
+ // So we swap: browser's height becomes PPT's width, browser's width becomes PPT's height
342
+ const centerX = rect.left + rect.width / 2;
343
+ const centerY = rect.top + rect.height / 2;
344
+
345
+ return {
346
+ x: centerX - rect.height / 2,
347
+ y: centerY - rect.width / 2,
348
+ w: rect.height,
349
+ h: rect.width
350
+ };
351
+ }
352
+
353
+ // For other rotations, use element's offset dimensions
354
+ const centerX = rect.left + rect.width / 2;
355
+ const centerY = rect.top + rect.height / 2;
356
+ return {
357
+ x: centerX - el.offsetWidth / 2,
358
+ y: centerY - el.offsetHeight / 2,
359
+ w: el.offsetWidth,
360
+ h: el.offsetHeight
361
+ };
362
+ };
363
+
364
+ // Parse CSS box-shadow into PptxGenJS shadow properties
365
+ const parseBoxShadow = (boxShadow) => {
366
+ if (!boxShadow || boxShadow === 'none') return null;
367
+
368
+ // Browser computed style format: "rgba(0, 0, 0, 0.3) 2px 2px 8px 0px [inset]"
369
+ // CSS format: "[inset] 2px 2px 8px 0px rgba(0, 0, 0, 0.3)"
370
+
371
+ const insetMatch = boxShadow.match(/inset/);
372
+
373
+ // IMPORTANT: PptxGenJS/PowerPoint doesn't properly support inset shadows
374
+ // Only process outer shadows to avoid file corruption
375
+ if (insetMatch) return null;
376
+
377
+ // Extract color first (rgba or rgb at start)
378
+ const colorMatch = boxShadow.match(/rgba?\([^)]+\)/);
379
+
380
+ // Extract numeric values (handles both px and pt units)
381
+ const parts = boxShadow.match(/([-\d.]+)(px|pt)/g);
382
+
383
+ if (!parts || parts.length < 2) return null;
384
+
385
+ const offsetX = parseFloat(parts[0]);
386
+ const offsetY = parseFloat(parts[1]);
387
+ const blur = parts.length > 2 ? parseFloat(parts[2]) : 0;
388
+
389
+ // Calculate angle from offsets (in degrees, 0 = right, 90 = down)
390
+ let angle = 0;
391
+ if (offsetX !== 0 || offsetY !== 0) {
392
+ angle = Math.atan2(offsetY, offsetX) * (180 / Math.PI);
393
+ if (angle < 0) angle += 360;
394
+ }
395
+
396
+ // Calculate offset distance (hypotenuse)
397
+ const offset = Math.sqrt(offsetX * offsetX + offsetY * offsetY) * PT_PER_PX;
398
+
399
+ // Extract opacity from rgba
400
+ let opacity = 0.5;
401
+ if (colorMatch) {
402
+ const opacityMatch = colorMatch[0].match(/[\d.]+\)$/);
403
+ if (opacityMatch) {
404
+ opacity = parseFloat(opacityMatch[0].replace(')', ''));
405
+ }
406
+ }
407
+
408
+ return {
409
+ type: 'outer',
410
+ angle: Math.round(angle),
411
+ blur: blur * 0.75, // Convert to points
412
+ color: colorMatch ? rgbToHex(colorMatch[0]) : '000000',
413
+ offset: offset,
414
+ opacity
415
+ };
416
+ };
417
+
418
+ // Parse inline formatting tags (<b>, <i>, <u>, <strong>, <em>, <span>) into text runs
419
+ const parseInlineFormatting = (element, baseOptions = {}, runs = [], baseTextTransform = (x) => x) => {
420
+ let prevNodeIsText = false;
421
+
422
+ element.childNodes.forEach((node) => {
423
+ let textTransform = baseTextTransform;
424
+
425
+ const isText = node.nodeType === Node.TEXT_NODE || node.tagName === 'BR';
426
+ if (isText) {
427
+ const text = node.tagName === 'BR' ? '\n' : textTransform(node.textContent.replace(/\s+/g, ' '));
428
+ const prevRun = runs[runs.length - 1];
429
+ if (prevNodeIsText && prevRun) {
430
+ prevRun.text += text;
431
+ } else {
432
+ runs.push({ text, options: { ...baseOptions } });
433
+ }
434
+
435
+ } else if (node.nodeType === Node.ELEMENT_NODE && node.textContent.trim()) {
436
+ const options = { ...baseOptions };
437
+ const computed = window.getComputedStyle(node);
438
+
439
+ // Handle inline elements with computed styles
440
+ if (node.tagName === 'SPAN' || node.tagName === 'B' || node.tagName === 'STRONG' || node.tagName === 'I' || node.tagName === 'EM' || node.tagName === 'U') {
441
+ const isBold = computed.fontWeight === 'bold' || parseInt(computed.fontWeight) >= 600;
442
+ if (isBold && !shouldSkipBold(computed.fontFamily)) options.bold = true;
443
+ if (computed.fontStyle === 'italic') options.italic = true;
444
+ if (computed.textDecoration && computed.textDecoration.includes('underline')) options.underline = true;
445
+ if (computed.color && computed.color !== 'rgb(0, 0, 0)') {
446
+ options.color = rgbToHex(computed.color);
447
+ const transparency = extractAlpha(computed.color);
448
+ if (transparency !== null) options.transparency = transparency;
449
+ }
450
+ if (computed.fontSize) options.fontSize = pxToPoints(computed.fontSize);
451
+
452
+ // Apply text-transform on the span element itself
453
+ if (computed.textTransform && computed.textTransform !== 'none') {
454
+ const transformStr = computed.textTransform;
455
+ textTransform = (text) => applyTextTransform(text, transformStr);
456
+ }
457
+
458
+ // Validate: Check for margins on inline elements
459
+ if (computed.marginLeft && parseFloat(computed.marginLeft) > 0) {
460
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-left which is not supported in PowerPoint. Remove margin from inline elements.`);
461
+ }
462
+ if (computed.marginRight && parseFloat(computed.marginRight) > 0) {
463
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-right which is not supported in PowerPoint. Remove margin from inline elements.`);
464
+ }
465
+ if (computed.marginTop && parseFloat(computed.marginTop) > 0) {
466
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-top which is not supported in PowerPoint. Remove margin from inline elements.`);
467
+ }
468
+ if (computed.marginBottom && parseFloat(computed.marginBottom) > 0) {
469
+ errors.push(`Inline element <${node.tagName.toLowerCase()}> has margin-bottom which is not supported in PowerPoint. Remove margin from inline elements.`);
470
+ }
471
+
472
+ // Recursively process the child node. This will flatten nested spans into multiple runs.
473
+ parseInlineFormatting(node, options, runs, textTransform);
474
+ }
475
+ }
476
+
477
+ prevNodeIsText = isText;
478
+ });
479
+
480
+ // Trim leading space from first run and trailing space from last run
481
+ if (runs.length > 0) {
482
+ runs[0].text = runs[0].text.replace(/^\s+/, '');
483
+ runs[runs.length - 1].text = runs[runs.length - 1].text.replace(/\s+$/, '');
484
+ }
485
+
486
+ return runs.filter(r => r.text.length > 0);
487
+ };
488
+
489
+ // Extract background from body (image or color)
490
+ const body = document.body;
491
+ const bodyStyle = window.getComputedStyle(body);
492
+ const bgImage = bodyStyle.backgroundImage;
493
+ const bgColor = bodyStyle.backgroundColor;
494
+
495
+ // Collect validation errors
496
+ const errors = [];
497
+
498
+ // Validate: Check for CSS gradients
499
+ if (bgImage && (bgImage.includes('linear-gradient') || bgImage.includes('radial-gradient'))) {
500
+ errors.push(
501
+ 'CSS gradients are not supported. Use Sharp to rasterize gradients as PNG images first, ' +
502
+ 'then reference with background-image: url(\'gradient.png\')'
503
+ );
504
+ }
505
+
506
+ let background;
507
+ if (bgImage && bgImage !== 'none') {
508
+ // Extract URL from url("...") or url(...)
509
+ const urlMatch = bgImage.match(/url\(["']?([^"')]+)["']?\)/);
510
+ if (urlMatch) {
511
+ background = {
512
+ type: 'image',
513
+ path: urlMatch[1]
514
+ };
515
+ } else {
516
+ background = {
517
+ type: 'color',
518
+ value: rgbToHex(bgColor)
519
+ };
520
+ }
521
+ } else {
522
+ background = {
523
+ type: 'color',
524
+ value: rgbToHex(bgColor)
525
+ };
526
+ }
527
+
528
+ // Process all elements
529
+ const elements = [];
530
+ const placeholders = [];
531
+ const textTags = ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'UL', 'OL', 'LI'];
532
+ const processed = new Set();
533
+
534
+ document.querySelectorAll('*').forEach((el) => {
535
+ if (processed.has(el)) return;
536
+
537
+ // Validate text elements don't have backgrounds, borders, or shadows
538
+ if (textTags.includes(el.tagName)) {
539
+ const computed = window.getComputedStyle(el);
540
+ const hasBg = computed.backgroundColor && computed.backgroundColor !== 'rgba(0, 0, 0, 0)';
541
+ const hasBorder = (computed.borderWidth && parseFloat(computed.borderWidth) > 0) ||
542
+ (computed.borderTopWidth && parseFloat(computed.borderTopWidth) > 0) ||
543
+ (computed.borderRightWidth && parseFloat(computed.borderRightWidth) > 0) ||
544
+ (computed.borderBottomWidth && parseFloat(computed.borderBottomWidth) > 0) ||
545
+ (computed.borderLeftWidth && parseFloat(computed.borderLeftWidth) > 0);
546
+ const hasShadow = computed.boxShadow && computed.boxShadow !== 'none';
547
+
548
+ if (hasBg || hasBorder || hasShadow) {
549
+ errors.push(
550
+ `Text element <${el.tagName.toLowerCase()}> has ${hasBg ? 'background' : hasBorder ? 'border' : 'shadow'}. ` +
551
+ 'Backgrounds, borders, and shadows are only supported on <div> elements, not text elements.'
552
+ );
553
+ return;
554
+ }
555
+ }
556
+
557
+ // Extract placeholder elements (for charts, etc.)
558
+ if (el.className && el.className.includes('placeholder')) {
559
+ const rect = el.getBoundingClientRect();
560
+ if (rect.width === 0 || rect.height === 0) {
561
+ errors.push(
562
+ `Placeholder "${el.id || 'unnamed'}" has ${rect.width === 0 ? 'width: 0' : 'height: 0'}. Check the layout CSS.`
563
+ );
564
+ } else {
565
+ placeholders.push({
566
+ id: el.id || `placeholder-${placeholders.length}`,
567
+ x: pxToInch(rect.left),
568
+ y: pxToInch(rect.top),
569
+ w: pxToInch(rect.width),
570
+ h: pxToInch(rect.height)
571
+ });
572
+ }
573
+ processed.add(el);
574
+ return;
575
+ }
576
+
577
+ // Extract images
578
+ if (el.tagName === 'IMG') {
579
+ const rect = el.getBoundingClientRect();
580
+ if (rect.width > 0 && rect.height > 0) {
581
+ elements.push({
582
+ type: 'image',
583
+ src: el.src,
584
+ position: {
585
+ x: pxToInch(rect.left),
586
+ y: pxToInch(rect.top),
587
+ w: pxToInch(rect.width),
588
+ h: pxToInch(rect.height)
589
+ }
590
+ });
591
+ processed.add(el);
592
+ return;
593
+ }
594
+ }
595
+
596
+ // Extract DIVs with backgrounds/borders as shapes
597
+ const isContainer = el.tagName === 'DIV' && !textTags.includes(el.tagName);
598
+ if (isContainer) {
599
+ const computed = window.getComputedStyle(el);
600
+ const hasBg = computed.backgroundColor && computed.backgroundColor !== 'rgba(0, 0, 0, 0)';
601
+
602
+ // Validate: Check for unwrapped text content in DIV
603
+ for (const node of el.childNodes) {
604
+ if (node.nodeType === Node.TEXT_NODE) {
605
+ const text = node.textContent.trim();
606
+ if (text) {
607
+ errors.push(
608
+ `DIV element contains unwrapped text "${text.substring(0, 50)}${text.length > 50 ? '...' : ''}". ` +
609
+ 'All text must be wrapped in <p>, <h1>-<h6>, <ul>, or <ol> tags to appear in PowerPoint.'
610
+ );
611
+ }
612
+ }
613
+ }
614
+
615
+ // Check for background images on shapes
616
+ const bgImage = computed.backgroundImage;
617
+ if (bgImage && bgImage !== 'none') {
618
+ errors.push(
619
+ 'Background images on DIV elements are not supported. ' +
620
+ 'Use solid colors or borders for shapes, or use slide.addImage() in PptxGenJS to layer images.'
621
+ );
622
+ return;
623
+ }
624
+
625
+ // Check for borders - both uniform and partial
626
+ const borderTop = computed.borderTopWidth;
627
+ const borderRight = computed.borderRightWidth;
628
+ const borderBottom = computed.borderBottomWidth;
629
+ const borderLeft = computed.borderLeftWidth;
630
+ const borders = [borderTop, borderRight, borderBottom, borderLeft].map(b => parseFloat(b) || 0);
631
+ const hasBorder = borders.some(b => b > 0);
632
+ const hasUniformBorder = hasBorder && borders.every(b => b === borders[0]);
633
+ const borderLines = [];
634
+
635
+ if (hasBorder && !hasUniformBorder) {
636
+ const rect = el.getBoundingClientRect();
637
+ const x = pxToInch(rect.left);
638
+ const y = pxToInch(rect.top);
639
+ const w = pxToInch(rect.width);
640
+ const h = pxToInch(rect.height);
641
+
642
+ // Collect lines to add after shape (inset by half the line width to center on edge)
643
+ if (parseFloat(borderTop) > 0) {
644
+ const widthPt = pxToPoints(borderTop);
645
+ const inset = (widthPt / 72) / 2; // Convert points to inches, then half
646
+ borderLines.push({
647
+ type: 'line',
648
+ x1: x, y1: y + inset, x2: x + w, y2: y + inset,
649
+ width: widthPt,
650
+ color: rgbToHex(computed.borderTopColor)
651
+ });
652
+ }
653
+ if (parseFloat(borderRight) > 0) {
654
+ const widthPt = pxToPoints(borderRight);
655
+ const inset = (widthPt / 72) / 2;
656
+ borderLines.push({
657
+ type: 'line',
658
+ x1: x + w - inset, y1: y, x2: x + w - inset, y2: y + h,
659
+ width: widthPt,
660
+ color: rgbToHex(computed.borderRightColor)
661
+ });
662
+ }
663
+ if (parseFloat(borderBottom) > 0) {
664
+ const widthPt = pxToPoints(borderBottom);
665
+ const inset = (widthPt / 72) / 2;
666
+ borderLines.push({
667
+ type: 'line',
668
+ x1: x, y1: y + h - inset, x2: x + w, y2: y + h - inset,
669
+ width: widthPt,
670
+ color: rgbToHex(computed.borderBottomColor)
671
+ });
672
+ }
673
+ if (parseFloat(borderLeft) > 0) {
674
+ const widthPt = pxToPoints(borderLeft);
675
+ const inset = (widthPt / 72) / 2;
676
+ borderLines.push({
677
+ type: 'line',
678
+ x1: x + inset, y1: y, x2: x + inset, y2: y + h,
679
+ width: widthPt,
680
+ color: rgbToHex(computed.borderLeftColor)
681
+ });
682
+ }
683
+ }
684
+
685
+ if (hasBg || hasBorder) {
686
+ const rect = el.getBoundingClientRect();
687
+ if (rect.width > 0 && rect.height > 0) {
688
+ const shadow = parseBoxShadow(computed.boxShadow);
689
+
690
+ // Only add shape if there's background or uniform border
691
+ if (hasBg || hasUniformBorder) {
692
+ elements.push({
693
+ type: 'shape',
694
+ text: '', // Shape only - child text elements render on top
695
+ position: {
696
+ x: pxToInch(rect.left),
697
+ y: pxToInch(rect.top),
698
+ w: pxToInch(rect.width),
699
+ h: pxToInch(rect.height)
700
+ },
701
+ shape: {
702
+ fill: hasBg ? rgbToHex(computed.backgroundColor) : null,
703
+ transparency: hasBg ? extractAlpha(computed.backgroundColor) : null,
704
+ line: hasUniformBorder ? {
705
+ color: rgbToHex(computed.borderColor),
706
+ width: pxToPoints(computed.borderWidth)
707
+ } : null,
708
+ // Convert border-radius to rectRadius (in inches)
709
+ // % values: 50%+ = circle (1), <50% = percentage of min dimension
710
+ // pt values: divide by 72 (72pt = 1 inch)
711
+ // px values: divide by 96 (96px = 1 inch)
712
+ rectRadius: (() => {
713
+ const radius = computed.borderRadius;
714
+ const radiusValue = parseFloat(radius);
715
+ if (radiusValue === 0) return 0;
716
+
717
+ if (radius.includes('%')) {
718
+ if (radiusValue >= 50) return 1;
719
+ // Calculate percentage of smaller dimension
720
+ const minDim = Math.min(rect.width, rect.height);
721
+ return (radiusValue / 100) * pxToInch(minDim);
722
+ }
723
+
724
+ if (radius.includes('pt')) return radiusValue / 72;
725
+ return radiusValue / PX_PER_IN;
726
+ })(),
727
+ shadow: shadow
728
+ }
729
+ });
730
+ }
731
+
732
+ // Add partial border lines
733
+ elements.push(...borderLines);
734
+
735
+ processed.add(el);
736
+ return;
737
+ }
738
+ }
739
+ }
740
+
741
+ // Extract bullet lists as single text block
742
+ if (el.tagName === 'UL' || el.tagName === 'OL') {
743
+ const rect = el.getBoundingClientRect();
744
+ if (rect.width === 0 || rect.height === 0) return;
745
+
746
+ const liElements = Array.from(el.querySelectorAll('li'));
747
+ const items = [];
748
+ const ulComputed = window.getComputedStyle(el);
749
+ const ulPaddingLeftPt = pxToPoints(ulComputed.paddingLeft);
750
+
751
+ // Split: margin-left for bullet position, indent for text position
752
+ // margin-left + indent = ul padding-left
753
+ const marginLeft = ulPaddingLeftPt * 0.5;
754
+ const textIndent = ulPaddingLeftPt * 0.5;
755
+
756
+ liElements.forEach((li, idx) => {
757
+ const isLast = idx === liElements.length - 1;
758
+ const runs = parseInlineFormatting(li, { breakLine: false });
759
+ // Clean manual bullets from first run
760
+ if (runs.length > 0) {
761
+ runs[0].text = runs[0].text.replace(/^[•\-\*▪▸]\s*/, '');
762
+ runs[0].options.bullet = { indent: textIndent };
763
+ }
764
+ // Set breakLine on last run
765
+ if (runs.length > 0 && !isLast) {
766
+ runs[runs.length - 1].options.breakLine = true;
767
+ }
768
+ items.push(...runs);
769
+ });
770
+
771
+ const computed = window.getComputedStyle(liElements[0] || el);
772
+
773
+ elements.push({
774
+ type: 'list',
775
+ items: items,
776
+ position: {
777
+ x: pxToInch(rect.left),
778
+ y: pxToInch(rect.top),
779
+ w: pxToInch(rect.width),
780
+ h: pxToInch(rect.height)
781
+ },
782
+ style: {
783
+ fontSize: pxToPoints(computed.fontSize),
784
+ fontFace: computed.fontFamily.split(',')[0].replace(/['"]/g, '').trim(),
785
+ color: rgbToHex(computed.color),
786
+ transparency: extractAlpha(computed.color),
787
+ align: computed.textAlign === 'start' ? 'left' : computed.textAlign,
788
+ lineSpacing: computed.lineHeight && computed.lineHeight !== 'normal' ? pxToPoints(computed.lineHeight) : null,
789
+ paraSpaceBefore: 0,
790
+ paraSpaceAfter: pxToPoints(computed.marginBottom),
791
+ // PptxGenJS margin array is [left, right, bottom, top]
792
+ margin: [marginLeft, 0, 0, 0]
793
+ }
794
+ });
795
+
796
+ liElements.forEach(li => processed.add(li));
797
+ processed.add(el);
798
+ return;
799
+ }
800
+
801
+ // Extract text elements (P, H1, H2, etc.)
802
+ if (!textTags.includes(el.tagName)) return;
803
+
804
+ const rect = el.getBoundingClientRect();
805
+ const text = el.textContent.trim();
806
+ if (rect.width === 0 || rect.height === 0 || !text) return;
807
+
808
+ // Validate: Check for manual bullet symbols in text elements (not in lists)
809
+ if (el.tagName !== 'LI' && /^[•\-\*▪▸○●◆◇■□]\s/.test(text.trimStart())) {
810
+ errors.push(
811
+ `Text element <${el.tagName.toLowerCase()}> starts with bullet symbol "${text.substring(0, 20)}...". ` +
812
+ 'Use <ul> or <ol> lists instead of manual bullet symbols.'
813
+ );
814
+ return;
815
+ }
816
+
817
+ const computed = window.getComputedStyle(el);
818
+ const rotation = getRotation(computed.transform, computed.writingMode);
819
+ const { x, y, w, h } = getPositionAndSize(el, rect, rotation);
820
+
821
+ const baseStyle = {
822
+ fontSize: pxToPoints(computed.fontSize),
823
+ fontFace: computed.fontFamily.split(',')[0].replace(/['"]/g, '').trim(),
824
+ color: rgbToHex(computed.color),
825
+ align: computed.textAlign === 'start' ? 'left' : computed.textAlign,
826
+ lineSpacing: pxToPoints(computed.lineHeight),
827
+ paraSpaceBefore: pxToPoints(computed.marginTop),
828
+ paraSpaceAfter: pxToPoints(computed.marginBottom),
829
+ // PptxGenJS margin array is [left, right, bottom, top] (not [top, right, bottom, left] as documented)
830
+ margin: [
831
+ pxToPoints(computed.paddingLeft),
832
+ pxToPoints(computed.paddingRight),
833
+ pxToPoints(computed.paddingBottom),
834
+ pxToPoints(computed.paddingTop)
835
+ ]
836
+ };
837
+
838
+ const transparency = extractAlpha(computed.color);
839
+ if (transparency !== null) baseStyle.transparency = transparency;
840
+
841
+ if (rotation !== null) baseStyle.rotate = rotation;
842
+
843
+ const hasFormatting = el.querySelector('b, i, u, strong, em, span, br');
844
+
845
+ if (hasFormatting) {
846
+ // Text with inline formatting
847
+ const transformStr = computed.textTransform;
848
+ const runs = parseInlineFormatting(el, {}, [], (str) => applyTextTransform(str, transformStr));
849
+
850
+ // Adjust lineSpacing based on largest fontSize in runs
851
+ const adjustedStyle = { ...baseStyle };
852
+ if (adjustedStyle.lineSpacing) {
853
+ const maxFontSize = Math.max(
854
+ adjustedStyle.fontSize,
855
+ ...runs.map(r => r.options?.fontSize || 0)
856
+ );
857
+ if (maxFontSize > adjustedStyle.fontSize) {
858
+ const lineHeightMultiplier = adjustedStyle.lineSpacing / adjustedStyle.fontSize;
859
+ adjustedStyle.lineSpacing = maxFontSize * lineHeightMultiplier;
860
+ }
861
+ }
862
+
863
+ elements.push({
864
+ type: el.tagName.toLowerCase(),
865
+ text: runs,
866
+ position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
867
+ style: adjustedStyle
868
+ });
869
+ } else {
870
+ // Plain text - inherit CSS formatting
871
+ const textTransform = computed.textTransform;
872
+ const transformedText = applyTextTransform(text, textTransform);
873
+
874
+ const isBold = computed.fontWeight === 'bold' || parseInt(computed.fontWeight) >= 600;
875
+
876
+ elements.push({
877
+ type: el.tagName.toLowerCase(),
878
+ text: transformedText,
879
+ position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
880
+ style: {
881
+ ...baseStyle,
882
+ bold: isBold && !shouldSkipBold(computed.fontFamily),
883
+ italic: computed.fontStyle === 'italic',
884
+ underline: computed.textDecoration.includes('underline')
885
+ }
886
+ });
887
+ }
888
+
889
+ processed.add(el);
890
+ });
891
+
892
+ return { background, elements, placeholders, errors };
893
+ });
894
+ }
895
+
896
+ async function html2pptx(htmlFile, pres, options = {}) {
897
+ const {
898
+ tmpDir = process.env.TMPDIR || '/tmp',
899
+ slide = null
900
+ } = options;
901
+
902
+ try {
903
+ // Use Chrome on macOS, default Chromium on Unix
904
+ const launchOptions = { env: { TMPDIR: tmpDir } };
905
+ if (process.platform === 'darwin') {
906
+ launchOptions.channel = 'chrome';
907
+ }
908
+
909
+ const browser = await chromium.launch(launchOptions);
910
+
911
+ let bodyDimensions;
912
+ let slideData;
913
+
914
+ const filePath = path.isAbsolute(htmlFile) ? htmlFile : path.join(process.cwd(), htmlFile);
915
+ const validationErrors = [];
916
+
917
+ try {
918
+ const page = await browser.newPage();
919
+ page.on('console', (msg) => {
920
+ // Log the message text to your test runner's console
921
+ console.log(`Browser console: ${msg.text()}`);
922
+ });
923
+
924
+ await page.goto(`file://${filePath}`);
925
+
926
+ bodyDimensions = await getBodyDimensions(page);
927
+
928
+ await page.setViewportSize({
929
+ width: Math.round(bodyDimensions.width),
930
+ height: Math.round(bodyDimensions.height)
931
+ });
932
+
933
+ slideData = await extractSlideData(page);
934
+ } finally {
935
+ await browser.close();
936
+ }
937
+
938
+ // Collect all validation errors
939
+ if (bodyDimensions.errors && bodyDimensions.errors.length > 0) {
940
+ validationErrors.push(...bodyDimensions.errors);
941
+ }
942
+
943
+ const dimensionErrors = validateDimensions(bodyDimensions, pres);
944
+ if (dimensionErrors.length > 0) {
945
+ validationErrors.push(...dimensionErrors);
946
+ }
947
+
948
+ const textBoxPositionErrors = validateTextBoxPosition(slideData, bodyDimensions);
949
+ if (textBoxPositionErrors.length > 0) {
950
+ validationErrors.push(...textBoxPositionErrors);
951
+ }
952
+
953
+ if (slideData.errors && slideData.errors.length > 0) {
954
+ validationErrors.push(...slideData.errors);
955
+ }
956
+
957
+ // Throw all errors at once if any exist
958
+ if (validationErrors.length > 0) {
959
+ const errorMessage = validationErrors.length === 1
960
+ ? validationErrors[0]
961
+ : `Multiple validation errors found:\n${validationErrors.map((e, i) => ` ${i + 1}. ${e}`).join('\n')}`;
962
+ throw new Error(errorMessage);
963
+ }
964
+
965
+ const targetSlide = slide || pres.addSlide();
966
+
967
+ await addBackground(slideData, targetSlide, tmpDir);
968
+ addElements(slideData, targetSlide, pres);
969
+
970
+ return { slide: targetSlide, placeholders: slideData.placeholders };
971
+ } catch (error) {
972
+ if (!error.message.startsWith(htmlFile)) {
973
+ throw new Error(`${htmlFile}: ${error.message}`);
974
+ }
975
+ throw error;
976
+ }
977
+ }
978
+
979
+ module.exports = html2pptx;