@synsci/cli-darwin-x64-baseline 1.1.77 → 1.1.78

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 (830) hide show
  1. package/bin/skills/adaptyv/SKILL.md +114 -0
  2. package/bin/skills/adaptyv/reference/api_reference.md +308 -0
  3. package/bin/skills/adaptyv/reference/examples.md +913 -0
  4. package/bin/skills/adaptyv/reference/experiments.md +360 -0
  5. package/bin/skills/adaptyv/reference/protein_optimization.md +637 -0
  6. package/bin/skills/aeon/SKILL.md +374 -0
  7. package/bin/skills/aeon/references/anomaly_detection.md +154 -0
  8. package/bin/skills/aeon/references/classification.md +144 -0
  9. package/bin/skills/aeon/references/clustering.md +123 -0
  10. package/bin/skills/aeon/references/datasets_benchmarking.md +387 -0
  11. package/bin/skills/aeon/references/distances.md +256 -0
  12. package/bin/skills/aeon/references/forecasting.md +140 -0
  13. package/bin/skills/aeon/references/networks.md +289 -0
  14. package/bin/skills/aeon/references/regression.md +118 -0
  15. package/bin/skills/aeon/references/segmentation.md +163 -0
  16. package/bin/skills/aeon/references/similarity_search.md +187 -0
  17. package/bin/skills/aeon/references/transformations.md +246 -0
  18. package/bin/skills/alphafold-database/SKILL.md +513 -0
  19. package/bin/skills/alphafold-database/references/api_reference.md +423 -0
  20. package/bin/skills/anndata/SKILL.md +400 -0
  21. package/bin/skills/anndata/references/best_practices.md +525 -0
  22. package/bin/skills/anndata/references/concatenation.md +396 -0
  23. package/bin/skills/anndata/references/data_structure.md +314 -0
  24. package/bin/skills/anndata/references/io_operations.md +404 -0
  25. package/bin/skills/anndata/references/manipulation.md +516 -0
  26. package/bin/skills/arboreto/SKILL.md +243 -0
  27. package/bin/skills/arboreto/references/algorithms.md +138 -0
  28. package/bin/skills/arboreto/references/basic_inference.md +151 -0
  29. package/bin/skills/arboreto/references/distributed_computing.md +242 -0
  30. package/bin/skills/arboreto/scripts/basic_grn_inference.py +97 -0
  31. package/bin/skills/astropy/SKILL.md +331 -0
  32. package/bin/skills/astropy/references/coordinates.md +273 -0
  33. package/bin/skills/astropy/references/cosmology.md +307 -0
  34. package/bin/skills/astropy/references/fits.md +396 -0
  35. package/bin/skills/astropy/references/tables.md +489 -0
  36. package/bin/skills/astropy/references/time.md +404 -0
  37. package/bin/skills/astropy/references/units.md +178 -0
  38. package/bin/skills/astropy/references/wcs_and_other_modules.md +373 -0
  39. package/bin/skills/benchling-integration/SKILL.md +480 -0
  40. package/bin/skills/benchling-integration/references/api_endpoints.md +883 -0
  41. package/bin/skills/benchling-integration/references/authentication.md +379 -0
  42. package/bin/skills/benchling-integration/references/sdk_reference.md +774 -0
  43. package/bin/skills/biopython/SKILL.md +443 -0
  44. package/bin/skills/biopython/references/advanced.md +577 -0
  45. package/bin/skills/biopython/references/alignment.md +362 -0
  46. package/bin/skills/biopython/references/blast.md +455 -0
  47. package/bin/skills/biopython/references/databases.md +484 -0
  48. package/bin/skills/biopython/references/phylogenetics.md +566 -0
  49. package/bin/skills/biopython/references/sequence_io.md +285 -0
  50. package/bin/skills/biopython/references/structure.md +564 -0
  51. package/bin/skills/biorxiv-database/SKILL.md +483 -0
  52. package/bin/skills/biorxiv-database/references/api_reference.md +280 -0
  53. package/bin/skills/biorxiv-database/scripts/biorxiv_search.py +445 -0
  54. package/bin/skills/bioservices/SKILL.md +361 -0
  55. package/bin/skills/bioservices/references/identifier_mapping.md +685 -0
  56. package/bin/skills/bioservices/references/services_reference.md +636 -0
  57. package/bin/skills/bioservices/references/workflow_patterns.md +811 -0
  58. package/bin/skills/bioservices/scripts/batch_id_converter.py +347 -0
  59. package/bin/skills/bioservices/scripts/compound_cross_reference.py +378 -0
  60. package/bin/skills/bioservices/scripts/pathway_analysis.py +309 -0
  61. package/bin/skills/bioservices/scripts/protein_analysis_workflow.py +408 -0
  62. package/bin/skills/brenda-database/SKILL.md +719 -0
  63. package/bin/skills/brenda-database/references/api_reference.md +537 -0
  64. package/bin/skills/brenda-database/scripts/brenda_queries.py +844 -0
  65. package/bin/skills/brenda-database/scripts/brenda_visualization.py +772 -0
  66. package/bin/skills/brenda-database/scripts/enzyme_pathway_builder.py +1053 -0
  67. package/bin/skills/cellxgene-census/SKILL.md +511 -0
  68. package/bin/skills/cellxgene-census/references/census_schema.md +182 -0
  69. package/bin/skills/cellxgene-census/references/common_patterns.md +351 -0
  70. package/bin/skills/chembl-database/SKILL.md +389 -0
  71. package/bin/skills/chembl-database/references/api_reference.md +272 -0
  72. package/bin/skills/chembl-database/scripts/example_queries.py +278 -0
  73. package/bin/skills/cirq/SKILL.md +346 -0
  74. package/bin/skills/cirq/references/building.md +307 -0
  75. package/bin/skills/cirq/references/experiments.md +572 -0
  76. package/bin/skills/cirq/references/hardware.md +515 -0
  77. package/bin/skills/cirq/references/noise.md +515 -0
  78. package/bin/skills/cirq/references/simulation.md +350 -0
  79. package/bin/skills/cirq/references/transformation.md +416 -0
  80. package/bin/skills/clinicaltrials-database/SKILL.md +507 -0
  81. package/bin/skills/clinicaltrials-database/references/api_reference.md +358 -0
  82. package/bin/skills/clinicaltrials-database/scripts/query_clinicaltrials.py +215 -0
  83. package/bin/skills/clinpgx-database/SKILL.md +638 -0
  84. package/bin/skills/clinpgx-database/references/api_reference.md +757 -0
  85. package/bin/skills/clinpgx-database/scripts/query_clinpgx.py +518 -0
  86. package/bin/skills/clinvar-database/SKILL.md +362 -0
  87. package/bin/skills/clinvar-database/references/api_reference.md +227 -0
  88. package/bin/skills/clinvar-database/references/clinical_significance.md +218 -0
  89. package/bin/skills/clinvar-database/references/data_formats.md +358 -0
  90. package/bin/skills/cobrapy/SKILL.md +463 -0
  91. package/bin/skills/cobrapy/references/api_quick_reference.md +655 -0
  92. package/bin/skills/cobrapy/references/workflows.md +593 -0
  93. package/bin/skills/cosmic-database/SKILL.md +336 -0
  94. package/bin/skills/cosmic-database/references/cosmic_data_reference.md +220 -0
  95. package/bin/skills/cosmic-database/scripts/download_cosmic.py +231 -0
  96. package/bin/skills/dask/SKILL.md +456 -0
  97. package/bin/skills/dask/references/arrays.md +497 -0
  98. package/bin/skills/dask/references/bags.md +468 -0
  99. package/bin/skills/dask/references/best-practices.md +277 -0
  100. package/bin/skills/dask/references/dataframes.md +368 -0
  101. package/bin/skills/dask/references/futures.md +541 -0
  102. package/bin/skills/dask/references/schedulers.md +504 -0
  103. package/bin/skills/datacommons-client/SKILL.md +255 -0
  104. package/bin/skills/datacommons-client/references/getting_started.md +417 -0
  105. package/bin/skills/datacommons-client/references/node.md +250 -0
  106. package/bin/skills/datacommons-client/references/observation.md +185 -0
  107. package/bin/skills/datacommons-client/references/resolve.md +246 -0
  108. package/bin/skills/datamol/SKILL.md +706 -0
  109. package/bin/skills/datamol/references/conformers_module.md +131 -0
  110. package/bin/skills/datamol/references/core_api.md +130 -0
  111. package/bin/skills/datamol/references/descriptors_viz.md +195 -0
  112. package/bin/skills/datamol/references/fragments_scaffolds.md +174 -0
  113. package/bin/skills/datamol/references/io_module.md +109 -0
  114. package/bin/skills/datamol/references/reactions_data.md +218 -0
  115. package/bin/skills/deepchem/SKILL.md +597 -0
  116. package/bin/skills/deepchem/references/api_reference.md +303 -0
  117. package/bin/skills/deepchem/references/workflows.md +491 -0
  118. package/bin/skills/deepchem/scripts/graph_neural_network.py +338 -0
  119. package/bin/skills/deepchem/scripts/predict_solubility.py +224 -0
  120. package/bin/skills/deepchem/scripts/transfer_learning.py +375 -0
  121. package/bin/skills/deeptools/SKILL.md +531 -0
  122. package/bin/skills/deeptools/assets/quick_reference.md +58 -0
  123. package/bin/skills/deeptools/references/effective_genome_sizes.md +116 -0
  124. package/bin/skills/deeptools/references/normalization_methods.md +410 -0
  125. package/bin/skills/deeptools/references/tools_reference.md +533 -0
  126. package/bin/skills/deeptools/references/workflows.md +474 -0
  127. package/bin/skills/deeptools/scripts/validate_files.py +195 -0
  128. package/bin/skills/deeptools/scripts/workflow_generator.py +454 -0
  129. package/bin/skills/denario/SKILL.md +215 -0
  130. package/bin/skills/denario/references/examples.md +494 -0
  131. package/bin/skills/denario/references/installation.md +213 -0
  132. package/bin/skills/denario/references/llm_configuration.md +265 -0
  133. package/bin/skills/denario/references/research_pipeline.md +471 -0
  134. package/bin/skills/diffdock/SKILL.md +483 -0
  135. package/bin/skills/diffdock/assets/batch_template.csv +4 -0
  136. package/bin/skills/diffdock/assets/custom_inference_config.yaml +90 -0
  137. package/bin/skills/diffdock/references/confidence_and_limitations.md +182 -0
  138. package/bin/skills/diffdock/references/parameters_reference.md +163 -0
  139. package/bin/skills/diffdock/references/workflows_examples.md +392 -0
  140. package/bin/skills/diffdock/scripts/analyze_results.py +334 -0
  141. package/bin/skills/diffdock/scripts/prepare_batch_csv.py +254 -0
  142. package/bin/skills/diffdock/scripts/setup_check.py +278 -0
  143. package/bin/skills/dnanexus-integration/SKILL.md +383 -0
  144. package/bin/skills/dnanexus-integration/references/app-development.md +247 -0
  145. package/bin/skills/dnanexus-integration/references/configuration.md +646 -0
  146. package/bin/skills/dnanexus-integration/references/data-operations.md +400 -0
  147. package/bin/skills/dnanexus-integration/references/job-execution.md +412 -0
  148. package/bin/skills/dnanexus-integration/references/python-sdk.md +523 -0
  149. package/bin/skills/document-skills/docx/LICENSE.txt +30 -0
  150. package/bin/skills/document-skills/docx/SKILL.md +233 -0
  151. package/bin/skills/document-skills/docx/docx-js.md +350 -0
  152. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  153. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  154. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  155. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  156. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  157. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  158. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  159. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  160. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  161. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  162. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  163. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  164. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  165. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  166. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  167. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  168. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  169. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  170. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  171. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  172. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  173. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  174. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  175. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  176. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  177. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  178. package/bin/skills/document-skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  179. package/bin/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  180. package/bin/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  181. package/bin/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  182. package/bin/skills/document-skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  183. package/bin/skills/document-skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
  184. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  185. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  186. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  187. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  188. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  189. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  190. package/bin/skills/document-skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  191. package/bin/skills/document-skills/docx/ooxml/scripts/pack.py +159 -0
  192. package/bin/skills/document-skills/docx/ooxml/scripts/unpack.py +29 -0
  193. package/bin/skills/document-skills/docx/ooxml/scripts/validate.py +69 -0
  194. package/bin/skills/document-skills/docx/ooxml/scripts/validation/__init__.py +15 -0
  195. package/bin/skills/document-skills/docx/ooxml/scripts/validation/base.py +951 -0
  196. package/bin/skills/document-skills/docx/ooxml/scripts/validation/docx.py +274 -0
  197. package/bin/skills/document-skills/docx/ooxml/scripts/validation/pptx.py +315 -0
  198. package/bin/skills/document-skills/docx/ooxml/scripts/validation/redlining.py +279 -0
  199. package/bin/skills/document-skills/docx/ooxml.md +610 -0
  200. package/bin/skills/document-skills/docx/scripts/__init__.py +1 -0
  201. package/bin/skills/document-skills/docx/scripts/document.py +1276 -0
  202. package/bin/skills/document-skills/docx/scripts/templates/comments.xml +3 -0
  203. package/bin/skills/document-skills/docx/scripts/templates/commentsExtended.xml +3 -0
  204. package/bin/skills/document-skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  205. package/bin/skills/document-skills/docx/scripts/templates/commentsIds.xml +3 -0
  206. package/bin/skills/document-skills/docx/scripts/templates/people.xml +3 -0
  207. package/bin/skills/document-skills/docx/scripts/utilities.py +374 -0
  208. package/bin/skills/document-skills/pdf/LICENSE.txt +30 -0
  209. package/bin/skills/document-skills/pdf/SKILL.md +330 -0
  210. package/bin/skills/document-skills/pdf/forms.md +205 -0
  211. package/bin/skills/document-skills/pdf/reference.md +612 -0
  212. package/bin/skills/document-skills/pdf/scripts/check_bounding_boxes.py +70 -0
  213. package/bin/skills/document-skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
  214. package/bin/skills/document-skills/pdf/scripts/check_fillable_fields.py +12 -0
  215. package/bin/skills/document-skills/pdf/scripts/convert_pdf_to_images.py +35 -0
  216. package/bin/skills/document-skills/pdf/scripts/create_validation_image.py +41 -0
  217. package/bin/skills/document-skills/pdf/scripts/extract_form_field_info.py +152 -0
  218. package/bin/skills/document-skills/pdf/scripts/fill_fillable_fields.py +114 -0
  219. package/bin/skills/document-skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
  220. package/bin/skills/document-skills/pptx/LICENSE.txt +30 -0
  221. package/bin/skills/document-skills/pptx/SKILL.md +520 -0
  222. package/bin/skills/document-skills/pptx/html2pptx.md +625 -0
  223. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  224. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  225. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  226. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  227. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  228. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  229. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  230. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  231. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  232. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  233. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  234. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  235. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  236. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  237. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  238. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  239. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  240. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  241. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  242. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  243. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  244. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  245. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  246. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  247. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  248. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  249. package/bin/skills/document-skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  250. package/bin/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  251. package/bin/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  252. package/bin/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  253. package/bin/skills/document-skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  254. package/bin/skills/document-skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
  255. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  256. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  257. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  258. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  259. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  260. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  261. package/bin/skills/document-skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  262. package/bin/skills/document-skills/pptx/ooxml/scripts/pack.py +159 -0
  263. package/bin/skills/document-skills/pptx/ooxml/scripts/unpack.py +29 -0
  264. package/bin/skills/document-skills/pptx/ooxml/scripts/validate.py +69 -0
  265. package/bin/skills/document-skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
  266. package/bin/skills/document-skills/pptx/ooxml/scripts/validation/base.py +951 -0
  267. package/bin/skills/document-skills/pptx/ooxml/scripts/validation/docx.py +274 -0
  268. package/bin/skills/document-skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
  269. package/bin/skills/document-skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
  270. package/bin/skills/document-skills/pptx/ooxml.md +427 -0
  271. package/bin/skills/document-skills/pptx/scripts/html2pptx.js +979 -0
  272. package/bin/skills/document-skills/pptx/scripts/inventory.py +1020 -0
  273. package/bin/skills/document-skills/pptx/scripts/rearrange.py +231 -0
  274. package/bin/skills/document-skills/pptx/scripts/replace.py +385 -0
  275. package/bin/skills/document-skills/pptx/scripts/thumbnail.py +450 -0
  276. package/bin/skills/document-skills/xlsx/LICENSE.txt +30 -0
  277. package/bin/skills/document-skills/xlsx/SKILL.md +325 -0
  278. package/bin/skills/document-skills/xlsx/recalc.py +178 -0
  279. package/bin/skills/drugbank-database/SKILL.md +190 -0
  280. package/bin/skills/drugbank-database/references/chemical-analysis.md +590 -0
  281. package/bin/skills/drugbank-database/references/data-access.md +242 -0
  282. package/bin/skills/drugbank-database/references/drug-queries.md +386 -0
  283. package/bin/skills/drugbank-database/references/interactions.md +425 -0
  284. package/bin/skills/drugbank-database/references/targets-pathways.md +518 -0
  285. package/bin/skills/drugbank-database/scripts/drugbank_helper.py +350 -0
  286. package/bin/skills/ena-database/SKILL.md +204 -0
  287. package/bin/skills/ena-database/references/api_reference.md +490 -0
  288. package/bin/skills/ensembl-database/SKILL.md +311 -0
  289. package/bin/skills/ensembl-database/references/api_endpoints.md +346 -0
  290. package/bin/skills/ensembl-database/scripts/ensembl_query.py +427 -0
  291. package/bin/skills/esm/SKILL.md +306 -0
  292. package/bin/skills/esm/references/esm-c-api.md +583 -0
  293. package/bin/skills/esm/references/esm3-api.md +452 -0
  294. package/bin/skills/esm/references/forge-api.md +657 -0
  295. package/bin/skills/esm/references/workflows.md +685 -0
  296. package/bin/skills/etetoolkit/SKILL.md +623 -0
  297. package/bin/skills/etetoolkit/references/api_reference.md +583 -0
  298. package/bin/skills/etetoolkit/references/visualization.md +783 -0
  299. package/bin/skills/etetoolkit/references/workflows.md +774 -0
  300. package/bin/skills/etetoolkit/scripts/quick_visualize.py +214 -0
  301. package/bin/skills/etetoolkit/scripts/tree_operations.py +229 -0
  302. package/bin/skills/exploratory-data-analysis/SKILL.md +446 -0
  303. package/bin/skills/exploratory-data-analysis/assets/report_template.md +196 -0
  304. package/bin/skills/exploratory-data-analysis/references/bioinformatics_genomics_formats.md +664 -0
  305. package/bin/skills/exploratory-data-analysis/references/chemistry_molecular_formats.md +664 -0
  306. package/bin/skills/exploratory-data-analysis/references/general_scientific_formats.md +518 -0
  307. package/bin/skills/exploratory-data-analysis/references/microscopy_imaging_formats.md +620 -0
  308. package/bin/skills/exploratory-data-analysis/references/proteomics_metabolomics_formats.md +517 -0
  309. package/bin/skills/exploratory-data-analysis/references/spectroscopy_analytical_formats.md +633 -0
  310. package/bin/skills/exploratory-data-analysis/scripts/eda_analyzer.py +547 -0
  311. package/bin/skills/fda-database/SKILL.md +518 -0
  312. package/bin/skills/fda-database/references/animal_veterinary.md +377 -0
  313. package/bin/skills/fda-database/references/api_basics.md +687 -0
  314. package/bin/skills/fda-database/references/devices.md +632 -0
  315. package/bin/skills/fda-database/references/drugs.md +468 -0
  316. package/bin/skills/fda-database/references/foods.md +374 -0
  317. package/bin/skills/fda-database/references/other.md +472 -0
  318. package/bin/skills/fda-database/scripts/fda_examples.py +335 -0
  319. package/bin/skills/fda-database/scripts/fda_query.py +440 -0
  320. package/bin/skills/flowio/SKILL.md +608 -0
  321. package/bin/skills/flowio/references/api_reference.md +372 -0
  322. package/bin/skills/fluidsim/SKILL.md +349 -0
  323. package/bin/skills/fluidsim/references/advanced_features.md +398 -0
  324. package/bin/skills/fluidsim/references/installation.md +68 -0
  325. package/bin/skills/fluidsim/references/output_analysis.md +283 -0
  326. package/bin/skills/fluidsim/references/parameters.md +198 -0
  327. package/bin/skills/fluidsim/references/simulation_workflow.md +172 -0
  328. package/bin/skills/fluidsim/references/solvers.md +94 -0
  329. package/bin/skills/fred-economic-data/SKILL.md +433 -0
  330. package/bin/skills/fred-economic-data/references/api_basics.md +212 -0
  331. package/bin/skills/fred-economic-data/references/categories.md +442 -0
  332. package/bin/skills/fred-economic-data/references/geofred.md +588 -0
  333. package/bin/skills/fred-economic-data/references/releases.md +642 -0
  334. package/bin/skills/fred-economic-data/references/series.md +584 -0
  335. package/bin/skills/fred-economic-data/references/sources.md +423 -0
  336. package/bin/skills/fred-economic-data/references/tags.md +485 -0
  337. package/bin/skills/fred-economic-data/scripts/fred_examples.py +354 -0
  338. package/bin/skills/fred-economic-data/scripts/fred_query.py +590 -0
  339. package/bin/skills/gene-database/SKILL.md +179 -0
  340. package/bin/skills/gene-database/references/api_reference.md +404 -0
  341. package/bin/skills/gene-database/references/common_workflows.md +428 -0
  342. package/bin/skills/gene-database/scripts/batch_gene_lookup.py +298 -0
  343. package/bin/skills/gene-database/scripts/fetch_gene_data.py +277 -0
  344. package/bin/skills/gene-database/scripts/query_gene.py +251 -0
  345. package/bin/skills/geniml/SKILL.md +318 -0
  346. package/bin/skills/geniml/references/bedspace.md +127 -0
  347. package/bin/skills/geniml/references/consensus_peaks.md +238 -0
  348. package/bin/skills/geniml/references/region2vec.md +90 -0
  349. package/bin/skills/geniml/references/scembed.md +197 -0
  350. package/bin/skills/geniml/references/utilities.md +385 -0
  351. package/bin/skills/geo-database/SKILL.md +815 -0
  352. package/bin/skills/geo-database/references/geo_reference.md +829 -0
  353. package/bin/skills/geopandas/SKILL.md +251 -0
  354. package/bin/skills/geopandas/references/crs-management.md +243 -0
  355. package/bin/skills/geopandas/references/data-io.md +165 -0
  356. package/bin/skills/geopandas/references/data-structures.md +70 -0
  357. package/bin/skills/geopandas/references/geometric-operations.md +221 -0
  358. package/bin/skills/geopandas/references/spatial-analysis.md +184 -0
  359. package/bin/skills/geopandas/references/visualization.md +243 -0
  360. package/bin/skills/get-available-resources/SKILL.md +277 -0
  361. package/bin/skills/get-available-resources/scripts/detect_resources.py +401 -0
  362. package/bin/skills/gget/SKILL.md +871 -0
  363. package/bin/skills/gget/references/database_info.md +300 -0
  364. package/bin/skills/gget/references/module_reference.md +467 -0
  365. package/bin/skills/gget/references/workflows.md +814 -0
  366. package/bin/skills/gget/scripts/batch_sequence_analysis.py +191 -0
  367. package/bin/skills/gget/scripts/enrichment_pipeline.py +235 -0
  368. package/bin/skills/gget/scripts/gene_analysis.py +161 -0
  369. package/bin/skills/gtars/SKILL.md +285 -0
  370. package/bin/skills/gtars/references/cli.md +222 -0
  371. package/bin/skills/gtars/references/coverage.md +172 -0
  372. package/bin/skills/gtars/references/overlap.md +156 -0
  373. package/bin/skills/gtars/references/python-api.md +211 -0
  374. package/bin/skills/gtars/references/refget.md +147 -0
  375. package/bin/skills/gtars/references/tokenizers.md +103 -0
  376. package/bin/skills/gwas-database/SKILL.md +608 -0
  377. package/bin/skills/gwas-database/references/api_reference.md +793 -0
  378. package/bin/skills/histolab/SKILL.md +678 -0
  379. package/bin/skills/histolab/references/filters_preprocessing.md +514 -0
  380. package/bin/skills/histolab/references/slide_management.md +172 -0
  381. package/bin/skills/histolab/references/tile_extraction.md +421 -0
  382. package/bin/skills/histolab/references/tissue_masks.md +251 -0
  383. package/bin/skills/histolab/references/visualization.md +547 -0
  384. package/bin/skills/hmdb-database/SKILL.md +196 -0
  385. package/bin/skills/hmdb-database/references/hmdb_data_fields.md +267 -0
  386. package/bin/skills/hypogenic/SKILL.md +655 -0
  387. package/bin/skills/hypogenic/references/config_template.yaml +150 -0
  388. package/bin/skills/imaging-data-commons/SKILL.md +1182 -0
  389. package/bin/skills/imaging-data-commons/references/bigquery_guide.md +556 -0
  390. package/bin/skills/imaging-data-commons/references/cli_guide.md +272 -0
  391. package/bin/skills/imaging-data-commons/references/cloud_storage_guide.md +333 -0
  392. package/bin/skills/imaging-data-commons/references/dicomweb_guide.md +399 -0
  393. package/bin/skills/infographics/SKILL.md +563 -0
  394. package/bin/skills/infographics/references/color_palettes.md +496 -0
  395. package/bin/skills/infographics/references/design_principles.md +636 -0
  396. package/bin/skills/infographics/references/infographic_types.md +907 -0
  397. package/bin/skills/infographics/scripts/generate_infographic.py +234 -0
  398. package/bin/skills/infographics/scripts/generate_infographic_ai.py +1290 -0
  399. package/bin/skills/iso-13485-certification/SKILL.md +680 -0
  400. package/bin/skills/iso-13485-certification/assets/templates/procedures/CAPA-procedure-template.md +453 -0
  401. package/bin/skills/iso-13485-certification/assets/templates/procedures/document-control-procedure-template.md +567 -0
  402. package/bin/skills/iso-13485-certification/assets/templates/quality-manual-template.md +521 -0
  403. package/bin/skills/iso-13485-certification/references/gap-analysis-checklist.md +568 -0
  404. package/bin/skills/iso-13485-certification/references/iso-13485-requirements.md +610 -0
  405. package/bin/skills/iso-13485-certification/references/mandatory-documents.md +606 -0
  406. package/bin/skills/iso-13485-certification/references/quality-manual-guide.md +688 -0
  407. package/bin/skills/iso-13485-certification/scripts/gap_analyzer.py +440 -0
  408. package/bin/skills/kegg-database/SKILL.md +377 -0
  409. package/bin/skills/kegg-database/references/kegg_reference.md +326 -0
  410. package/bin/skills/kegg-database/scripts/kegg_api.py +251 -0
  411. package/bin/skills/labarchive-integration/SKILL.md +268 -0
  412. package/bin/skills/labarchive-integration/references/api_reference.md +342 -0
  413. package/bin/skills/labarchive-integration/references/authentication_guide.md +357 -0
  414. package/bin/skills/labarchive-integration/references/integrations.md +425 -0
  415. package/bin/skills/labarchive-integration/scripts/entry_operations.py +334 -0
  416. package/bin/skills/labarchive-integration/scripts/notebook_operations.py +269 -0
  417. package/bin/skills/labarchive-integration/scripts/setup_config.py +205 -0
  418. package/bin/skills/lamindb/SKILL.md +390 -0
  419. package/bin/skills/lamindb/references/annotation-validation.md +513 -0
  420. package/bin/skills/lamindb/references/core-concepts.md +380 -0
  421. package/bin/skills/lamindb/references/data-management.md +433 -0
  422. package/bin/skills/lamindb/references/integrations.md +642 -0
  423. package/bin/skills/lamindb/references/ontologies.md +497 -0
  424. package/bin/skills/lamindb/references/setup-deployment.md +733 -0
  425. package/bin/skills/latchbio-integration/SKILL.md +353 -0
  426. package/bin/skills/latchbio-integration/references/data-management.md +427 -0
  427. package/bin/skills/latchbio-integration/references/resource-configuration.md +429 -0
  428. package/bin/skills/latchbio-integration/references/verified-workflows.md +487 -0
  429. package/bin/skills/latchbio-integration/references/workflow-creation.md +254 -0
  430. package/bin/skills/matchms/SKILL.md +203 -0
  431. package/bin/skills/matchms/references/filtering.md +288 -0
  432. package/bin/skills/matchms/references/importing_exporting.md +416 -0
  433. package/bin/skills/matchms/references/similarity.md +380 -0
  434. package/bin/skills/matchms/references/workflows.md +647 -0
  435. package/bin/skills/matlab/SKILL.md +376 -0
  436. package/bin/skills/matlab/references/data-import-export.md +479 -0
  437. package/bin/skills/matlab/references/executing-scripts.md +444 -0
  438. package/bin/skills/matlab/references/graphics-visualization.md +579 -0
  439. package/bin/skills/matlab/references/mathematics.md +553 -0
  440. package/bin/skills/matlab/references/matrices-arrays.md +349 -0
  441. package/bin/skills/matlab/references/octave-compatibility.md +544 -0
  442. package/bin/skills/matlab/references/programming.md +672 -0
  443. package/bin/skills/matlab/references/python-integration.md +433 -0
  444. package/bin/skills/matplotlib/SKILL.md +361 -0
  445. package/bin/skills/matplotlib/references/api_reference.md +412 -0
  446. package/bin/skills/matplotlib/references/common_issues.md +563 -0
  447. package/bin/skills/matplotlib/references/plot_types.md +476 -0
  448. package/bin/skills/matplotlib/references/styling_guide.md +589 -0
  449. package/bin/skills/matplotlib/scripts/plot_template.py +401 -0
  450. package/bin/skills/matplotlib/scripts/style_configurator.py +409 -0
  451. package/bin/skills/medchem/SKILL.md +406 -0
  452. package/bin/skills/medchem/references/api_guide.md +600 -0
  453. package/bin/skills/medchem/references/rules_catalog.md +604 -0
  454. package/bin/skills/medchem/scripts/filter_molecules.py +418 -0
  455. package/bin/skills/metabolomics-workbench-database/SKILL.md +259 -0
  456. package/bin/skills/metabolomics-workbench-database/references/api_reference.md +494 -0
  457. package/bin/skills/modal-research-gpu/SKILL.md +238 -0
  458. package/bin/skills/molfeat/SKILL.md +511 -0
  459. package/bin/skills/molfeat/references/api_reference.md +428 -0
  460. package/bin/skills/molfeat/references/available_featurizers.md +333 -0
  461. package/bin/skills/molfeat/references/examples.md +723 -0
  462. package/bin/skills/networkx/SKILL.md +437 -0
  463. package/bin/skills/networkx/references/algorithms.md +383 -0
  464. package/bin/skills/networkx/references/generators.md +378 -0
  465. package/bin/skills/networkx/references/graph-basics.md +283 -0
  466. package/bin/skills/networkx/references/io.md +441 -0
  467. package/bin/skills/networkx/references/visualization.md +529 -0
  468. package/bin/skills/neurokit2/SKILL.md +356 -0
  469. package/bin/skills/neurokit2/references/bio_module.md +417 -0
  470. package/bin/skills/neurokit2/references/complexity.md +715 -0
  471. package/bin/skills/neurokit2/references/ecg_cardiac.md +355 -0
  472. package/bin/skills/neurokit2/references/eda.md +497 -0
  473. package/bin/skills/neurokit2/references/eeg.md +506 -0
  474. package/bin/skills/neurokit2/references/emg.md +408 -0
  475. package/bin/skills/neurokit2/references/eog.md +407 -0
  476. package/bin/skills/neurokit2/references/epochs_events.md +471 -0
  477. package/bin/skills/neurokit2/references/hrv.md +480 -0
  478. package/bin/skills/neurokit2/references/ppg.md +413 -0
  479. package/bin/skills/neurokit2/references/rsp.md +510 -0
  480. package/bin/skills/neurokit2/references/signal_processing.md +648 -0
  481. package/bin/skills/neuropixels-analysis/SKILL.md +350 -0
  482. package/bin/skills/neuropixels-analysis/assets/analysis_template.py +271 -0
  483. package/bin/skills/neuropixels-analysis/references/AI_CURATION.md +345 -0
  484. package/bin/skills/neuropixels-analysis/references/ANALYSIS.md +392 -0
  485. package/bin/skills/neuropixels-analysis/references/AUTOMATED_CURATION.md +358 -0
  486. package/bin/skills/neuropixels-analysis/references/MOTION_CORRECTION.md +323 -0
  487. package/bin/skills/neuropixels-analysis/references/PREPROCESSING.md +273 -0
  488. package/bin/skills/neuropixels-analysis/references/QUALITY_METRICS.md +359 -0
  489. package/bin/skills/neuropixels-analysis/references/SPIKE_SORTING.md +339 -0
  490. package/bin/skills/neuropixels-analysis/references/api_reference.md +415 -0
  491. package/bin/skills/neuropixels-analysis/references/plotting_guide.md +454 -0
  492. package/bin/skills/neuropixels-analysis/references/standard_workflow.md +385 -0
  493. package/bin/skills/neuropixels-analysis/scripts/compute_metrics.py +178 -0
  494. package/bin/skills/neuropixels-analysis/scripts/explore_recording.py +168 -0
  495. package/bin/skills/neuropixels-analysis/scripts/export_to_phy.py +79 -0
  496. package/bin/skills/neuropixels-analysis/scripts/neuropixels_pipeline.py +432 -0
  497. package/bin/skills/neuropixels-analysis/scripts/preprocess_recording.py +122 -0
  498. package/bin/skills/neuropixels-analysis/scripts/run_sorting.py +98 -0
  499. package/bin/skills/offer-k-dense-web/SKILL.md +21 -0
  500. package/bin/skills/omero-integration/SKILL.md +251 -0
  501. package/bin/skills/omero-integration/references/advanced.md +631 -0
  502. package/bin/skills/omero-integration/references/connection.md +369 -0
  503. package/bin/skills/omero-integration/references/data_access.md +544 -0
  504. package/bin/skills/omero-integration/references/image_processing.md +665 -0
  505. package/bin/skills/omero-integration/references/metadata.md +688 -0
  506. package/bin/skills/omero-integration/references/rois.md +648 -0
  507. package/bin/skills/omero-integration/references/scripts.md +637 -0
  508. package/bin/skills/omero-integration/references/tables.md +532 -0
  509. package/bin/skills/openalex-database/SKILL.md +494 -0
  510. package/bin/skills/openalex-database/references/api_guide.md +371 -0
  511. package/bin/skills/openalex-database/references/common_queries.md +381 -0
  512. package/bin/skills/openalex-database/scripts/openalex_client.py +337 -0
  513. package/bin/skills/openalex-database/scripts/query_helpers.py +306 -0
  514. package/bin/skills/opentargets-database/SKILL.md +373 -0
  515. package/bin/skills/opentargets-database/references/api_reference.md +249 -0
  516. package/bin/skills/opentargets-database/references/evidence_types.md +306 -0
  517. package/bin/skills/opentargets-database/references/target_annotations.md +401 -0
  518. package/bin/skills/opentargets-database/scripts/query_opentargets.py +403 -0
  519. package/bin/skills/opentrons-integration/SKILL.md +573 -0
  520. package/bin/skills/opentrons-integration/references/api_reference.md +366 -0
  521. package/bin/skills/opentrons-integration/scripts/basic_protocol_template.py +67 -0
  522. package/bin/skills/opentrons-integration/scripts/pcr_setup_template.py +154 -0
  523. package/bin/skills/opentrons-integration/scripts/serial_dilution_template.py +96 -0
  524. package/bin/skills/pathml/SKILL.md +166 -0
  525. package/bin/skills/pathml/references/data_management.md +742 -0
  526. package/bin/skills/pathml/references/graphs.md +653 -0
  527. package/bin/skills/pathml/references/image_loading.md +448 -0
  528. package/bin/skills/pathml/references/machine_learning.md +725 -0
  529. package/bin/skills/pathml/references/multiparametric.md +686 -0
  530. package/bin/skills/pathml/references/preprocessing.md +722 -0
  531. package/bin/skills/pdb-database/SKILL.md +309 -0
  532. package/bin/skills/pdb-database/references/api_reference.md +617 -0
  533. package/bin/skills/pennylane/SKILL.md +226 -0
  534. package/bin/skills/pennylane/references/advanced_features.md +667 -0
  535. package/bin/skills/pennylane/references/devices_backends.md +596 -0
  536. package/bin/skills/pennylane/references/getting_started.md +227 -0
  537. package/bin/skills/pennylane/references/optimization.md +671 -0
  538. package/bin/skills/pennylane/references/quantum_chemistry.md +567 -0
  539. package/bin/skills/pennylane/references/quantum_circuits.md +437 -0
  540. package/bin/skills/pennylane/references/quantum_ml.md +571 -0
  541. package/bin/skills/perplexity-search/SKILL.md +448 -0
  542. package/bin/skills/perplexity-search/assets/.env.example +16 -0
  543. package/bin/skills/perplexity-search/references/model_comparison.md +386 -0
  544. package/bin/skills/perplexity-search/references/openrouter_setup.md +454 -0
  545. package/bin/skills/perplexity-search/references/search_strategies.md +258 -0
  546. package/bin/skills/perplexity-search/scripts/perplexity_search.py +277 -0
  547. package/bin/skills/perplexity-search/scripts/setup_env.py +171 -0
  548. package/bin/skills/plotly/SKILL.md +267 -0
  549. package/bin/skills/plotly/references/chart-types.md +488 -0
  550. package/bin/skills/plotly/references/export-interactivity.md +453 -0
  551. package/bin/skills/plotly/references/graph-objects.md +302 -0
  552. package/bin/skills/plotly/references/layouts-styling.md +457 -0
  553. package/bin/skills/plotly/references/plotly-express.md +213 -0
  554. package/bin/skills/polars/SKILL.md +387 -0
  555. package/bin/skills/polars/references/best_practices.md +649 -0
  556. package/bin/skills/polars/references/core_concepts.md +378 -0
  557. package/bin/skills/polars/references/io_guide.md +557 -0
  558. package/bin/skills/polars/references/operations.md +602 -0
  559. package/bin/skills/polars/references/pandas_migration.md +417 -0
  560. package/bin/skills/polars/references/transformations.md +549 -0
  561. package/bin/skills/protocolsio-integration/SKILL.md +421 -0
  562. package/bin/skills/protocolsio-integration/references/additional_features.md +387 -0
  563. package/bin/skills/protocolsio-integration/references/authentication.md +100 -0
  564. package/bin/skills/protocolsio-integration/references/discussions.md +225 -0
  565. package/bin/skills/protocolsio-integration/references/file_manager.md +412 -0
  566. package/bin/skills/protocolsio-integration/references/protocols_api.md +294 -0
  567. package/bin/skills/protocolsio-integration/references/workspaces.md +293 -0
  568. package/bin/skills/pubchem-database/SKILL.md +574 -0
  569. package/bin/skills/pubchem-database/references/api_reference.md +440 -0
  570. package/bin/skills/pubchem-database/scripts/bioactivity_query.py +367 -0
  571. package/bin/skills/pubchem-database/scripts/compound_search.py +297 -0
  572. package/bin/skills/pubmed-database/SKILL.md +460 -0
  573. package/bin/skills/pubmed-database/references/api_reference.md +298 -0
  574. package/bin/skills/pubmed-database/references/common_queries.md +453 -0
  575. package/bin/skills/pubmed-database/references/search_syntax.md +436 -0
  576. package/bin/skills/pufferlib/SKILL.md +436 -0
  577. package/bin/skills/pufferlib/references/environments.md +508 -0
  578. package/bin/skills/pufferlib/references/integration.md +621 -0
  579. package/bin/skills/pufferlib/references/policies.md +653 -0
  580. package/bin/skills/pufferlib/references/training.md +360 -0
  581. package/bin/skills/pufferlib/references/vectorization.md +557 -0
  582. package/bin/skills/pufferlib/scripts/env_template.py +340 -0
  583. package/bin/skills/pufferlib/scripts/train_template.py +239 -0
  584. package/bin/skills/pydeseq2/SKILL.md +559 -0
  585. package/bin/skills/pydeseq2/references/api_reference.md +228 -0
  586. package/bin/skills/pydeseq2/references/workflow_guide.md +582 -0
  587. package/bin/skills/pydeseq2/scripts/run_deseq2_analysis.py +353 -0
  588. package/bin/skills/pydicom/SKILL.md +434 -0
  589. package/bin/skills/pydicom/references/common_tags.md +228 -0
  590. package/bin/skills/pydicom/references/transfer_syntaxes.md +352 -0
  591. package/bin/skills/pydicom/scripts/anonymize_dicom.py +137 -0
  592. package/bin/skills/pydicom/scripts/dicom_to_image.py +172 -0
  593. package/bin/skills/pydicom/scripts/extract_metadata.py +173 -0
  594. package/bin/skills/pyhealth/SKILL.md +491 -0
  595. package/bin/skills/pyhealth/references/datasets.md +178 -0
  596. package/bin/skills/pyhealth/references/medical_coding.md +284 -0
  597. package/bin/skills/pyhealth/references/models.md +594 -0
  598. package/bin/skills/pyhealth/references/preprocessing.md +638 -0
  599. package/bin/skills/pyhealth/references/tasks.md +379 -0
  600. package/bin/skills/pyhealth/references/training_evaluation.md +648 -0
  601. package/bin/skills/pylabrobot/SKILL.md +185 -0
  602. package/bin/skills/pylabrobot/references/analytical-equipment.md +464 -0
  603. package/bin/skills/pylabrobot/references/hardware-backends.md +480 -0
  604. package/bin/skills/pylabrobot/references/liquid-handling.md +403 -0
  605. package/bin/skills/pylabrobot/references/material-handling.md +620 -0
  606. package/bin/skills/pylabrobot/references/resources.md +489 -0
  607. package/bin/skills/pylabrobot/references/visualization.md +532 -0
  608. package/bin/skills/pymatgen/SKILL.md +691 -0
  609. package/bin/skills/pymatgen/references/analysis_modules.md +530 -0
  610. package/bin/skills/pymatgen/references/core_classes.md +318 -0
  611. package/bin/skills/pymatgen/references/io_formats.md +469 -0
  612. package/bin/skills/pymatgen/references/materials_project_api.md +517 -0
  613. package/bin/skills/pymatgen/references/transformations_workflows.md +591 -0
  614. package/bin/skills/pymatgen/scripts/phase_diagram_generator.py +233 -0
  615. package/bin/skills/pymatgen/scripts/structure_analyzer.py +266 -0
  616. package/bin/skills/pymatgen/scripts/structure_converter.py +169 -0
  617. package/bin/skills/pymc/SKILL.md +572 -0
  618. package/bin/skills/pymc/assets/hierarchical_model_template.py +333 -0
  619. package/bin/skills/pymc/assets/linear_regression_template.py +241 -0
  620. package/bin/skills/pymc/references/distributions.md +320 -0
  621. package/bin/skills/pymc/references/sampling_inference.md +424 -0
  622. package/bin/skills/pymc/references/workflows.md +526 -0
  623. package/bin/skills/pymc/scripts/model_comparison.py +387 -0
  624. package/bin/skills/pymc/scripts/model_diagnostics.py +350 -0
  625. package/bin/skills/pymoo/SKILL.md +571 -0
  626. package/bin/skills/pymoo/references/algorithms.md +180 -0
  627. package/bin/skills/pymoo/references/constraints_mcdm.md +417 -0
  628. package/bin/skills/pymoo/references/operators.md +345 -0
  629. package/bin/skills/pymoo/references/problems.md +265 -0
  630. package/bin/skills/pymoo/references/visualization.md +353 -0
  631. package/bin/skills/pymoo/scripts/custom_problem_example.py +181 -0
  632. package/bin/skills/pymoo/scripts/decision_making_example.py +161 -0
  633. package/bin/skills/pymoo/scripts/many_objective_example.py +72 -0
  634. package/bin/skills/pymoo/scripts/multi_objective_example.py +63 -0
  635. package/bin/skills/pymoo/scripts/single_objective_example.py +59 -0
  636. package/bin/skills/pyopenms/SKILL.md +217 -0
  637. package/bin/skills/pyopenms/references/data_structures.md +497 -0
  638. package/bin/skills/pyopenms/references/feature_detection.md +410 -0
  639. package/bin/skills/pyopenms/references/file_io.md +349 -0
  640. package/bin/skills/pyopenms/references/identification.md +422 -0
  641. package/bin/skills/pyopenms/references/metabolomics.md +482 -0
  642. package/bin/skills/pyopenms/references/signal_processing.md +433 -0
  643. package/bin/skills/pysam/SKILL.md +265 -0
  644. package/bin/skills/pysam/references/alignment_files.md +280 -0
  645. package/bin/skills/pysam/references/common_workflows.md +520 -0
  646. package/bin/skills/pysam/references/sequence_files.md +407 -0
  647. package/bin/skills/pysam/references/variant_files.md +365 -0
  648. package/bin/skills/pytdc/SKILL.md +460 -0
  649. package/bin/skills/pytdc/references/datasets.md +246 -0
  650. package/bin/skills/pytdc/references/oracles.md +400 -0
  651. package/bin/skills/pytdc/references/utilities.md +684 -0
  652. package/bin/skills/pytdc/scripts/benchmark_evaluation.py +327 -0
  653. package/bin/skills/pytdc/scripts/load_and_split_data.py +214 -0
  654. package/bin/skills/pytdc/scripts/molecular_generation.py +404 -0
  655. package/bin/skills/qiskit/SKILL.md +275 -0
  656. package/bin/skills/qiskit/references/algorithms.md +607 -0
  657. package/bin/skills/qiskit/references/backends.md +433 -0
  658. package/bin/skills/qiskit/references/circuits.md +197 -0
  659. package/bin/skills/qiskit/references/patterns.md +533 -0
  660. package/bin/skills/qiskit/references/primitives.md +277 -0
  661. package/bin/skills/qiskit/references/setup.md +99 -0
  662. package/bin/skills/qiskit/references/transpilation.md +286 -0
  663. package/bin/skills/qiskit/references/visualization.md +415 -0
  664. package/bin/skills/qutip/SKILL.md +318 -0
  665. package/bin/skills/qutip/references/advanced.md +555 -0
  666. package/bin/skills/qutip/references/analysis.md +523 -0
  667. package/bin/skills/qutip/references/core_concepts.md +293 -0
  668. package/bin/skills/qutip/references/time_evolution.md +348 -0
  669. package/bin/skills/qutip/references/visualization.md +431 -0
  670. package/bin/skills/rdkit/SKILL.md +780 -0
  671. package/bin/skills/rdkit/references/api_reference.md +432 -0
  672. package/bin/skills/rdkit/references/descriptors_reference.md +595 -0
  673. package/bin/skills/rdkit/references/smarts_patterns.md +668 -0
  674. package/bin/skills/rdkit/scripts/molecular_properties.py +243 -0
  675. package/bin/skills/rdkit/scripts/similarity_search.py +297 -0
  676. package/bin/skills/rdkit/scripts/substructure_filter.py +386 -0
  677. package/bin/skills/reactome-database/SKILL.md +278 -0
  678. package/bin/skills/reactome-database/references/api_reference.md +465 -0
  679. package/bin/skills/reactome-database/scripts/reactome_query.py +286 -0
  680. package/bin/skills/rowan/SKILL.md +427 -0
  681. package/bin/skills/rowan/references/api_reference.md +413 -0
  682. package/bin/skills/rowan/references/molecule_handling.md +429 -0
  683. package/bin/skills/rowan/references/proteins_and_organization.md +499 -0
  684. package/bin/skills/rowan/references/rdkit_native.md +438 -0
  685. package/bin/skills/rowan/references/results_interpretation.md +481 -0
  686. package/bin/skills/rowan/references/workflow_types.md +591 -0
  687. package/bin/skills/scanpy/SKILL.md +386 -0
  688. package/bin/skills/scanpy/assets/analysis_template.py +295 -0
  689. package/bin/skills/scanpy/references/api_reference.md +251 -0
  690. package/bin/skills/scanpy/references/plotting_guide.md +352 -0
  691. package/bin/skills/scanpy/references/standard_workflow.md +206 -0
  692. package/bin/skills/scanpy/scripts/qc_analysis.py +200 -0
  693. package/bin/skills/scientific-brainstorming/SKILL.md +191 -0
  694. package/bin/skills/scientific-brainstorming/references/brainstorming_methods.md +326 -0
  695. package/bin/skills/scientific-visualization/SKILL.md +779 -0
  696. package/bin/skills/scientific-visualization/assets/color_palettes.py +197 -0
  697. package/bin/skills/scientific-visualization/assets/nature.mplstyle +63 -0
  698. package/bin/skills/scientific-visualization/assets/presentation.mplstyle +61 -0
  699. package/bin/skills/scientific-visualization/assets/publication.mplstyle +68 -0
  700. package/bin/skills/scientific-visualization/references/color_palettes.md +348 -0
  701. package/bin/skills/scientific-visualization/references/journal_requirements.md +320 -0
  702. package/bin/skills/scientific-visualization/references/matplotlib_examples.md +620 -0
  703. package/bin/skills/scientific-visualization/references/publication_guidelines.md +205 -0
  704. package/bin/skills/scientific-visualization/scripts/figure_export.py +343 -0
  705. package/bin/skills/scientific-visualization/scripts/style_presets.py +416 -0
  706. package/bin/skills/scikit-bio/SKILL.md +437 -0
  707. package/bin/skills/scikit-bio/references/api_reference.md +749 -0
  708. package/bin/skills/scikit-learn/SKILL.md +521 -0
  709. package/bin/skills/scikit-learn/references/model_evaluation.md +592 -0
  710. package/bin/skills/scikit-learn/references/pipelines_and_composition.md +612 -0
  711. package/bin/skills/scikit-learn/references/preprocessing.md +606 -0
  712. package/bin/skills/scikit-learn/references/quick_reference.md +433 -0
  713. package/bin/skills/scikit-learn/references/supervised_learning.md +378 -0
  714. package/bin/skills/scikit-learn/references/unsupervised_learning.md +505 -0
  715. package/bin/skills/scikit-learn/scripts/classification_pipeline.py +257 -0
  716. package/bin/skills/scikit-learn/scripts/clustering_analysis.py +386 -0
  717. package/bin/skills/scikit-survival/SKILL.md +399 -0
  718. package/bin/skills/scikit-survival/references/competing-risks.md +397 -0
  719. package/bin/skills/scikit-survival/references/cox-models.md +182 -0
  720. package/bin/skills/scikit-survival/references/data-handling.md +494 -0
  721. package/bin/skills/scikit-survival/references/ensemble-models.md +327 -0
  722. package/bin/skills/scikit-survival/references/evaluation-metrics.md +378 -0
  723. package/bin/skills/scikit-survival/references/svm-models.md +411 -0
  724. package/bin/skills/scvi-tools/SKILL.md +190 -0
  725. package/bin/skills/scvi-tools/references/differential-expression.md +581 -0
  726. package/bin/skills/scvi-tools/references/models-atac-seq.md +321 -0
  727. package/bin/skills/scvi-tools/references/models-multimodal.md +367 -0
  728. package/bin/skills/scvi-tools/references/models-scrna-seq.md +330 -0
  729. package/bin/skills/scvi-tools/references/models-spatial.md +438 -0
  730. package/bin/skills/scvi-tools/references/models-specialized.md +408 -0
  731. package/bin/skills/scvi-tools/references/theoretical-foundations.md +438 -0
  732. package/bin/skills/scvi-tools/references/workflows.md +546 -0
  733. package/bin/skills/seaborn/SKILL.md +673 -0
  734. package/bin/skills/seaborn/references/examples.md +822 -0
  735. package/bin/skills/seaborn/references/function_reference.md +770 -0
  736. package/bin/skills/seaborn/references/objects_interface.md +964 -0
  737. package/bin/skills/shap/SKILL.md +566 -0
  738. package/bin/skills/shap/references/explainers.md +339 -0
  739. package/bin/skills/shap/references/plots.md +507 -0
  740. package/bin/skills/shap/references/theory.md +449 -0
  741. package/bin/skills/shap/references/workflows.md +605 -0
  742. package/bin/skills/simpy/SKILL.md +429 -0
  743. package/bin/skills/simpy/references/events.md +374 -0
  744. package/bin/skills/simpy/references/monitoring.md +475 -0
  745. package/bin/skills/simpy/references/process-interaction.md +424 -0
  746. package/bin/skills/simpy/references/real-time.md +395 -0
  747. package/bin/skills/simpy/references/resources.md +275 -0
  748. package/bin/skills/simpy/scripts/basic_simulation_template.py +193 -0
  749. package/bin/skills/simpy/scripts/resource_monitor.py +345 -0
  750. package/bin/skills/stable-baselines3/SKILL.md +299 -0
  751. package/bin/skills/stable-baselines3/references/algorithms.md +333 -0
  752. package/bin/skills/stable-baselines3/references/callbacks.md +556 -0
  753. package/bin/skills/stable-baselines3/references/custom_environments.md +526 -0
  754. package/bin/skills/stable-baselines3/references/vectorized_envs.md +568 -0
  755. package/bin/skills/stable-baselines3/scripts/custom_env_template.py +314 -0
  756. package/bin/skills/stable-baselines3/scripts/evaluate_agent.py +245 -0
  757. package/bin/skills/stable-baselines3/scripts/train_rl_agent.py +165 -0
  758. package/bin/skills/statistical-analysis/SKILL.md +632 -0
  759. package/bin/skills/statistical-analysis/references/assumptions_and_diagnostics.md +369 -0
  760. package/bin/skills/statistical-analysis/references/bayesian_statistics.md +661 -0
  761. package/bin/skills/statistical-analysis/references/effect_sizes_and_power.md +581 -0
  762. package/bin/skills/statistical-analysis/references/reporting_standards.md +469 -0
  763. package/bin/skills/statistical-analysis/references/test_selection_guide.md +129 -0
  764. package/bin/skills/statistical-analysis/scripts/assumption_checks.py +539 -0
  765. package/bin/skills/statsmodels/SKILL.md +614 -0
  766. package/bin/skills/statsmodels/references/discrete_choice.md +669 -0
  767. package/bin/skills/statsmodels/references/glm.md +619 -0
  768. package/bin/skills/statsmodels/references/linear_models.md +447 -0
  769. package/bin/skills/statsmodels/references/stats_diagnostics.md +859 -0
  770. package/bin/skills/statsmodels/references/time_series.md +716 -0
  771. package/bin/skills/string-database/SKILL.md +534 -0
  772. package/bin/skills/string-database/references/string_reference.md +455 -0
  773. package/bin/skills/string-database/scripts/string_api.py +369 -0
  774. package/bin/skills/sympy/SKILL.md +500 -0
  775. package/bin/skills/sympy/references/advanced-topics.md +635 -0
  776. package/bin/skills/sympy/references/code-generation-printing.md +599 -0
  777. package/bin/skills/sympy/references/core-capabilities.md +348 -0
  778. package/bin/skills/sympy/references/matrices-linear-algebra.md +526 -0
  779. package/bin/skills/sympy/references/physics-mechanics.md +592 -0
  780. package/bin/skills/torch_geometric/SKILL.md +676 -0
  781. package/bin/skills/torch_geometric/references/datasets_reference.md +574 -0
  782. package/bin/skills/torch_geometric/references/layers_reference.md +485 -0
  783. package/bin/skills/torch_geometric/references/transforms_reference.md +679 -0
  784. package/bin/skills/torch_geometric/scripts/benchmark_model.py +309 -0
  785. package/bin/skills/torch_geometric/scripts/create_gnn_template.py +529 -0
  786. package/bin/skills/torch_geometric/scripts/visualize_graph.py +313 -0
  787. package/bin/skills/torchdrug/SKILL.md +450 -0
  788. package/bin/skills/torchdrug/references/core_concepts.md +565 -0
  789. package/bin/skills/torchdrug/references/datasets.md +380 -0
  790. package/bin/skills/torchdrug/references/knowledge_graphs.md +320 -0
  791. package/bin/skills/torchdrug/references/models_architectures.md +541 -0
  792. package/bin/skills/torchdrug/references/molecular_generation.md +352 -0
  793. package/bin/skills/torchdrug/references/molecular_property_prediction.md +169 -0
  794. package/bin/skills/torchdrug/references/protein_modeling.md +272 -0
  795. package/bin/skills/torchdrug/references/retrosynthesis.md +436 -0
  796. package/bin/skills/transformers/SKILL.md +164 -0
  797. package/bin/skills/transformers/references/generation.md +467 -0
  798. package/bin/skills/transformers/references/models.md +361 -0
  799. package/bin/skills/transformers/references/pipelines.md +335 -0
  800. package/bin/skills/transformers/references/tokenizers.md +447 -0
  801. package/bin/skills/transformers/references/training.md +500 -0
  802. package/bin/skills/umap-learn/SKILL.md +479 -0
  803. package/bin/skills/umap-learn/references/api_reference.md +532 -0
  804. package/bin/skills/uniprot-database/SKILL.md +195 -0
  805. package/bin/skills/uniprot-database/references/api_examples.md +413 -0
  806. package/bin/skills/uniprot-database/references/api_fields.md +275 -0
  807. package/bin/skills/uniprot-database/references/id_mapping_databases.md +285 -0
  808. package/bin/skills/uniprot-database/references/query_syntax.md +256 -0
  809. package/bin/skills/uniprot-database/scripts/uniprot_client.py +341 -0
  810. package/bin/skills/uspto-database/SKILL.md +607 -0
  811. package/bin/skills/uspto-database/references/additional_apis.md +394 -0
  812. package/bin/skills/uspto-database/references/patentsearch_api.md +266 -0
  813. package/bin/skills/uspto-database/references/peds_api.md +212 -0
  814. package/bin/skills/uspto-database/references/trademark_api.md +358 -0
  815. package/bin/skills/uspto-database/scripts/patent_search.py +290 -0
  816. package/bin/skills/uspto-database/scripts/peds_client.py +285 -0
  817. package/bin/skills/uspto-database/scripts/trademark_client.py +311 -0
  818. package/bin/skills/vaex/SKILL.md +182 -0
  819. package/bin/skills/vaex/references/core_dataframes.md +367 -0
  820. package/bin/skills/vaex/references/data_processing.md +555 -0
  821. package/bin/skills/vaex/references/io_operations.md +703 -0
  822. package/bin/skills/vaex/references/machine_learning.md +728 -0
  823. package/bin/skills/vaex/references/performance.md +571 -0
  824. package/bin/skills/vaex/references/visualization.md +613 -0
  825. package/bin/skills/zarr-python/SKILL.md +779 -0
  826. package/bin/skills/zarr-python/references/api_reference.md +515 -0
  827. package/bin/skills/zinc-database/SKILL.md +404 -0
  828. package/bin/skills/zinc-database/references/api_reference.md +692 -0
  829. package/bin/synsc +0 -0
  830. package/package.json +1 -1
@@ -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;