@papert-code/papert-code 0.3.95 → 0.3.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/chunks/{chunk-Q5TJEKUL.js → chunk-HSYOWGEB.js} +1 -1
- package/dist/chunks/{chunk-KDPC3L34.js → chunk-IK4ISYCE.js} +4 -4
- package/dist/chunks/{chunk-JATIVKZP.js → chunk-KBPFDUTA.js} +55 -10
- package/dist/chunks/{chunk-DQ32BMUI.js → chunk-TNDQXJLA.js} +924 -335
- package/dist/chunks/{gemini-SUVKHYG5.js → gemini-MVJNXCFF.js} +3910 -1535
- package/dist/chunks/{openaiContentGenerator-P6VRBRRB.js → openaiContentGenerator-GTG5MK5E.js} +2 -2
- package/dist/chunks/{papertContentGenerator-E64QQV3K.js → papertContentGenerator-Q5TTXUE6.js} +3 -3
- package/dist/chunks/{server-N2U4FF55.js → server-6D3KYATG.js} +7 -1
- package/dist/cli.js +5 -4
- package/dist/sandbox-macos-permissive-proxied.sb +1 -1
- package/dist/sandbox-macos-restrictive-proxied.sb +1 -1
- package/dist/skills/algorithmic-art/SKILL.md +405 -0
- package/dist/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/dist/skills/algorithmic-art/templates/viewer.html +599 -0
- package/dist/skills/brand-guidelines/SKILL.md +73 -0
- package/dist/skills/canvas-design/SKILL.md +130 -0
- package/dist/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/dist/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/dist/skills/doc-coauthoring/SKILL.md +375 -0
- package/dist/skills/docx/SKILL.md +481 -0
- package/dist/skills/docx/scripts/__init__.py +1 -0
- package/dist/skills/docx/scripts/accept_changes.py +135 -0
- package/dist/skills/docx/scripts/comment.py +318 -0
- package/dist/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/docx/scripts/office/pack.py +159 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/docx/scripts/office/soffice.py +183 -0
- package/dist/skills/docx/scripts/office/unpack.py +132 -0
- package/dist/skills/docx/scripts/office/validate.py +111 -0
- package/dist/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/docx/scripts/office/validators/base.py +847 -0
- package/dist/skills/docx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/docx/scripts/templates/comments.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/dist/skills/docx/scripts/templates/people.xml +3 -0
- package/dist/skills/frontend-design/SKILL.md +42 -0
- package/dist/skills/internal-comms/SKILL.md +32 -0
- package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/internal-comms/examples/general-comms.md +16 -0
- package/dist/skills/mcp-builder/SKILL.md +236 -0
- package/dist/skills/mcp-builder/reference/evaluation.md +602 -0
- package/dist/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/dist/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/dist/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/dist/skills/mcp-builder/scripts/connections.py +151 -0
- package/dist/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/dist/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/dist/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/dist/skills/papert-code/SKILL.md +561 -0
- package/dist/skills/pdf/SKILL.md +314 -0
- package/dist/skills/pdf/forms.md +294 -0
- package/dist/skills/pdf/reference.md +612 -0
- package/dist/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/dist/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/dist/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/dist/skills/pdf/scripts/create_validation_image.py +37 -0
- package/dist/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/dist/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/dist/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/dist/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/dist/skills/pptx/SKILL.md +232 -0
- package/dist/skills/pptx/editing.md +205 -0
- package/dist/skills/pptx/pptxgenjs.md +420 -0
- package/dist/skills/pptx/scripts/__init__.py +0 -0
- package/dist/skills/pptx/scripts/add_slide.py +195 -0
- package/dist/skills/pptx/scripts/clean.py +286 -0
- package/dist/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/pptx/scripts/office/pack.py +159 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/pptx/scripts/office/soffice.py +183 -0
- package/dist/skills/pptx/scripts/office/unpack.py +132 -0
- package/dist/skills/pptx/scripts/office/validate.py +111 -0
- package/dist/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/pptx/scripts/office/validators/base.py +847 -0
- package/dist/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/pptx/scripts/thumbnail.py +289 -0
- package/dist/skills/skill-creator/SKILL.md +357 -0
- package/dist/skills/skill-creator/references/output-patterns.md +82 -0
- package/dist/skills/skill-creator/references/workflows.md +28 -0
- package/dist/skills/skill-creator/scripts/init_skill.py +303 -0
- package/dist/skills/skill-creator/scripts/package_skill.py +110 -0
- package/dist/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/dist/skills/slack-gif-creator/SKILL.md +254 -0
- package/dist/skills/slack-gif-creator/core/easing.py +234 -0
- package/dist/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/dist/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/dist/skills/slack-gif-creator/core/validators.py +136 -0
- package/dist/skills/slack-gif-creator/requirements.txt +4 -0
- package/dist/skills/theme-factory/SKILL.md +59 -0
- package/dist/skills/theme-factory/theme-showcase.pdf +0 -0
- package/dist/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/dist/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/dist/skills/theme-factory/themes/desert-rose.md +19 -0
- package/dist/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/dist/skills/theme-factory/themes/golden-hour.md +19 -0
- package/dist/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/dist/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/dist/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/dist/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/dist/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/dist/skills/web-artifacts-builder/SKILL.md +74 -0
- package/dist/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/dist/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/dist/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/dist/skills/webapp-testing/SKILL.md +96 -0
- package/dist/skills/webapp-testing/examples/console_logging.py +35 -0
- package/dist/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/dist/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/dist/skills/webapp-testing/scripts/with_server.py +106 -0
- package/dist/skills/xlsx/SKILL.md +292 -0
- package/dist/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/xlsx/scripts/office/pack.py +159 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/xlsx/scripts/office/soffice.py +183 -0
- package/dist/skills/xlsx/scripts/office/unpack.py +132 -0
- package/dist/skills/xlsx/scripts/office/validate.py +111 -0
- package/dist/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/dist/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/xlsx/scripts/recalc.py +184 -0
- package/package.json +5 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-artifacts-builder
|
|
3
|
+
description: Suite of tools for creating elaborate, multi-component Papert-code.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Web Artifacts Builder
|
|
8
|
+
|
|
9
|
+
To build powerful frontend Papert-code.ai artifacts, follow these steps:
|
|
10
|
+
1. Initialize the frontend repo using `scripts/init-artifact.sh`
|
|
11
|
+
2. Develop your artifact by editing the generated code
|
|
12
|
+
3. Bundle all code into a single HTML file using `scripts/bundle-artifact.sh`
|
|
13
|
+
4. Display artifact to user
|
|
14
|
+
5. (Optional) Test the artifact
|
|
15
|
+
|
|
16
|
+
**Stack**: React 18 + TypeScript + Vite + Parcel (bundling) + Tailwind CSS + shadcn/ui
|
|
17
|
+
|
|
18
|
+
## Design & Style Guidelines
|
|
19
|
+
|
|
20
|
+
VERY IMPORTANT: To avoid what is often referred to as "AI slop", avoid using excessive centered layouts, purple gradients, uniform rounded corners, and Inter font.
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
### Step 1: Initialize Project
|
|
25
|
+
|
|
26
|
+
Run the initialization script to create a new React project:
|
|
27
|
+
```bash
|
|
28
|
+
bash scripts/init-artifact.sh <project-name>
|
|
29
|
+
cd <project-name>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This creates a fully configured project with:
|
|
33
|
+
- ✅ React + TypeScript (via Vite)
|
|
34
|
+
- ✅ Tailwind CSS 3.4.1 with shadcn/ui theming system
|
|
35
|
+
- ✅ Path aliases (`@/`) configured
|
|
36
|
+
- ✅ 40+ shadcn/ui components pre-installed
|
|
37
|
+
- ✅ All Radix UI dependencies included
|
|
38
|
+
- ✅ Parcel configured for bundling (via .parcelrc)
|
|
39
|
+
- ✅ Node 18+ compatibility (auto-detects and pins Vite version)
|
|
40
|
+
|
|
41
|
+
### Step 2: Develop Your Artifact
|
|
42
|
+
|
|
43
|
+
To build the artifact, edit the generated files. See **Common Development Tasks** below for guidance.
|
|
44
|
+
|
|
45
|
+
### Step 3: Bundle to Single HTML File
|
|
46
|
+
|
|
47
|
+
To bundle the React app into a single HTML artifact:
|
|
48
|
+
```bash
|
|
49
|
+
bash scripts/bundle-artifact.sh
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This creates `bundle.html` - a self-contained artifact with all JavaScript, CSS, and dependencies inlined. This file can be directly shared in Papert-code conversations as an artifact.
|
|
53
|
+
|
|
54
|
+
**Requirements**: Your project must have an `index.html` in the root directory.
|
|
55
|
+
|
|
56
|
+
**What the script does**:
|
|
57
|
+
- Installs bundling dependencies (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
|
|
58
|
+
- Creates `.parcelrc` config with path alias support
|
|
59
|
+
- Builds with Parcel (no source maps)
|
|
60
|
+
- Inlines all assets into single HTML using html-inline
|
|
61
|
+
|
|
62
|
+
### Step 4: Share Artifact with User
|
|
63
|
+
|
|
64
|
+
Finally, share the bundled HTML file in conversation with the user so they can view it as an artifact.
|
|
65
|
+
|
|
66
|
+
### Step 5: Testing/Visualizing the Artifact (Optional)
|
|
67
|
+
|
|
68
|
+
Note: This is a completely optional step. Only perform if necessary or requested.
|
|
69
|
+
|
|
70
|
+
To test/visualize the artifact, use available tools (including other Skills or built-in tools like Playwright or Puppeteer). In general, avoid testing the artifact upfront as it adds latency between the request and when the finished artifact can be seen. Test later, after presenting the artifact, if requested or if issues arise.
|
|
71
|
+
|
|
72
|
+
## Reference
|
|
73
|
+
|
|
74
|
+
- **shadcn/ui components**: https://ui.shadcn.com/docs/components
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
echo "📦 Bundling React app to single HTML artifact..."
|
|
5
|
+
|
|
6
|
+
# Check if we're in a project directory
|
|
7
|
+
if [ ! -f "package.json" ]; then
|
|
8
|
+
echo "❌ Error: No package.json found. Run this script from your project root."
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Check if index.html exists
|
|
13
|
+
if [ ! -f "index.html" ]; then
|
|
14
|
+
echo "❌ Error: No index.html found in project root."
|
|
15
|
+
echo " This script requires an index.html entry point."
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Install bundling dependencies
|
|
20
|
+
echo "📦 Installing bundling dependencies..."
|
|
21
|
+
pnpm add -D parcel @parcel/config-default parcel-resolver-tspaths html-inline
|
|
22
|
+
|
|
23
|
+
# Create Parcel config with tspaths resolver
|
|
24
|
+
if [ ! -f ".parcelrc" ]; then
|
|
25
|
+
echo "🔧 Creating Parcel configuration with path alias support..."
|
|
26
|
+
cat > .parcelrc << 'EOF'
|
|
27
|
+
{
|
|
28
|
+
"extends": "@parcel/config-default",
|
|
29
|
+
"resolvers": ["parcel-resolver-tspaths", "..."]
|
|
30
|
+
}
|
|
31
|
+
EOF
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# Clean previous build
|
|
35
|
+
echo "🧹 Cleaning previous build..."
|
|
36
|
+
rm -rf dist bundle.html
|
|
37
|
+
|
|
38
|
+
# Build with Parcel
|
|
39
|
+
echo "🔨 Building with Parcel..."
|
|
40
|
+
pnpm exec parcel build index.html --dist-dir dist --no-source-maps
|
|
41
|
+
|
|
42
|
+
# Inline everything into single HTML
|
|
43
|
+
echo "🎯 Inlining all assets into single HTML file..."
|
|
44
|
+
pnpm exec html-inline dist/index.html > bundle.html
|
|
45
|
+
|
|
46
|
+
# Get file size
|
|
47
|
+
FILE_SIZE=$(du -h bundle.html | cut -f1)
|
|
48
|
+
|
|
49
|
+
echo ""
|
|
50
|
+
echo "✅ Bundle complete!"
|
|
51
|
+
echo "📄 Output: bundle.html ($FILE_SIZE)"
|
|
52
|
+
echo ""
|
|
53
|
+
echo "You can now use this single HTML file as an artifact in Claude conversations."
|
|
54
|
+
echo "To test locally: open bundle.html in your browser"
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Exit on error
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
# Detect Node version
|
|
7
|
+
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
|
|
8
|
+
|
|
9
|
+
echo "🔍 Detected Node.js version: $NODE_VERSION"
|
|
10
|
+
|
|
11
|
+
if [ "$NODE_VERSION" -lt 18 ]; then
|
|
12
|
+
echo "❌ Error: Node.js 18 or higher is required"
|
|
13
|
+
echo " Current version: $(node -v)"
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Set Vite version based on Node version
|
|
18
|
+
if [ "$NODE_VERSION" -ge 20 ]; then
|
|
19
|
+
VITE_VERSION="latest"
|
|
20
|
+
echo "✅ Using Vite latest (Node 20+)"
|
|
21
|
+
else
|
|
22
|
+
VITE_VERSION="5.4.11"
|
|
23
|
+
echo "✅ Using Vite $VITE_VERSION (Node 18 compatible)"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Detect OS and set sed syntax
|
|
27
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
28
|
+
SED_INPLACE="sed -i ''"
|
|
29
|
+
else
|
|
30
|
+
SED_INPLACE="sed -i"
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Check if pnpm is installed
|
|
34
|
+
if ! command -v pnpm &> /dev/null; then
|
|
35
|
+
echo "📦 pnpm not found. Installing pnpm..."
|
|
36
|
+
npm install -g pnpm
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Check if project name is provided
|
|
40
|
+
if [ -z "$1" ]; then
|
|
41
|
+
echo "❌ Usage: ./create-react-shadcn-complete.sh <project-name>"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
PROJECT_NAME="$1"
|
|
46
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
47
|
+
COMPONENTS_TARBALL="$SCRIPT_DIR/shadcn-components.tar.gz"
|
|
48
|
+
|
|
49
|
+
# Check if components tarball exists
|
|
50
|
+
if [ ! -f "$COMPONENTS_TARBALL" ]; then
|
|
51
|
+
echo "❌ Error: shadcn-components.tar.gz not found in script directory"
|
|
52
|
+
echo " Expected location: $COMPONENTS_TARBALL"
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
echo "🚀 Creating new React + Vite project: $PROJECT_NAME"
|
|
57
|
+
|
|
58
|
+
# Create new Vite project (always use latest create-vite, pin vite version later)
|
|
59
|
+
pnpm create vite "$PROJECT_NAME" --template react-ts
|
|
60
|
+
|
|
61
|
+
# Navigate into project directory
|
|
62
|
+
cd "$PROJECT_NAME"
|
|
63
|
+
|
|
64
|
+
echo "🧹 Cleaning up Vite template..."
|
|
65
|
+
$SED_INPLACE '/<link rel="icon".*vite\.svg/d' index.html
|
|
66
|
+
$SED_INPLACE 's/<title>.*<\/title>/<title>'"$PROJECT_NAME"'<\/title>/' index.html
|
|
67
|
+
|
|
68
|
+
echo "📦 Installing base dependencies..."
|
|
69
|
+
pnpm install
|
|
70
|
+
|
|
71
|
+
# Pin Vite version for Node 18
|
|
72
|
+
if [ "$NODE_VERSION" -lt 20 ]; then
|
|
73
|
+
echo "📌 Pinning Vite to $VITE_VERSION for Node 18 compatibility..."
|
|
74
|
+
pnpm add -D vite@$VITE_VERSION
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
echo "📦 Installing Tailwind CSS and dependencies..."
|
|
78
|
+
pnpm install -D tailwindcss@3.4.1 postcss autoprefixer @types/node tailwindcss-animate
|
|
79
|
+
pnpm install class-variance-authority clsx tailwind-merge lucide-react next-themes
|
|
80
|
+
|
|
81
|
+
echo "⚙️ Creating Tailwind and PostCSS configuration..."
|
|
82
|
+
cat > postcss.config.js << 'EOF'
|
|
83
|
+
export default {
|
|
84
|
+
plugins: {
|
|
85
|
+
tailwindcss: {},
|
|
86
|
+
autoprefixer: {},
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
EOF
|
|
90
|
+
|
|
91
|
+
echo "📝 Configuring Tailwind with shadcn theme..."
|
|
92
|
+
cat > tailwind.config.js << 'EOF'
|
|
93
|
+
/** @type {import('tailwindcss').Config} */
|
|
94
|
+
module.exports = {
|
|
95
|
+
darkMode: ["class"],
|
|
96
|
+
content: [
|
|
97
|
+
"./index.html",
|
|
98
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
99
|
+
],
|
|
100
|
+
theme: {
|
|
101
|
+
extend: {
|
|
102
|
+
colors: {
|
|
103
|
+
border: "hsl(var(--border))",
|
|
104
|
+
input: "hsl(var(--input))",
|
|
105
|
+
ring: "hsl(var(--ring))",
|
|
106
|
+
background: "hsl(var(--background))",
|
|
107
|
+
foreground: "hsl(var(--foreground))",
|
|
108
|
+
primary: {
|
|
109
|
+
DEFAULT: "hsl(var(--primary))",
|
|
110
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
111
|
+
},
|
|
112
|
+
secondary: {
|
|
113
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
114
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
115
|
+
},
|
|
116
|
+
destructive: {
|
|
117
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
118
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
119
|
+
},
|
|
120
|
+
muted: {
|
|
121
|
+
DEFAULT: "hsl(var(--muted))",
|
|
122
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
123
|
+
},
|
|
124
|
+
accent: {
|
|
125
|
+
DEFAULT: "hsl(var(--accent))",
|
|
126
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
127
|
+
},
|
|
128
|
+
popover: {
|
|
129
|
+
DEFAULT: "hsl(var(--popover))",
|
|
130
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
131
|
+
},
|
|
132
|
+
card: {
|
|
133
|
+
DEFAULT: "hsl(var(--card))",
|
|
134
|
+
foreground: "hsl(var(--card-foreground))",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
borderRadius: {
|
|
138
|
+
lg: "var(--radius)",
|
|
139
|
+
md: "calc(var(--radius) - 2px)",
|
|
140
|
+
sm: "calc(var(--radius) - 4px)",
|
|
141
|
+
},
|
|
142
|
+
keyframes: {
|
|
143
|
+
"accordion-down": {
|
|
144
|
+
from: { height: "0" },
|
|
145
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
146
|
+
},
|
|
147
|
+
"accordion-up": {
|
|
148
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
149
|
+
to: { height: "0" },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
animation: {
|
|
153
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
154
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
plugins: [require("tailwindcss-animate")],
|
|
159
|
+
}
|
|
160
|
+
EOF
|
|
161
|
+
|
|
162
|
+
# Add Tailwind directives and CSS variables to index.css
|
|
163
|
+
echo "🎨 Adding Tailwind directives and CSS variables..."
|
|
164
|
+
cat > src/index.css << 'EOF'
|
|
165
|
+
@tailwind base;
|
|
166
|
+
@tailwind components;
|
|
167
|
+
@tailwind utilities;
|
|
168
|
+
|
|
169
|
+
@layer base {
|
|
170
|
+
:root {
|
|
171
|
+
--background: 0 0% 100%;
|
|
172
|
+
--foreground: 0 0% 3.9%;
|
|
173
|
+
--card: 0 0% 100%;
|
|
174
|
+
--card-foreground: 0 0% 3.9%;
|
|
175
|
+
--popover: 0 0% 100%;
|
|
176
|
+
--popover-foreground: 0 0% 3.9%;
|
|
177
|
+
--primary: 0 0% 9%;
|
|
178
|
+
--primary-foreground: 0 0% 98%;
|
|
179
|
+
--secondary: 0 0% 96.1%;
|
|
180
|
+
--secondary-foreground: 0 0% 9%;
|
|
181
|
+
--muted: 0 0% 96.1%;
|
|
182
|
+
--muted-foreground: 0 0% 45.1%;
|
|
183
|
+
--accent: 0 0% 96.1%;
|
|
184
|
+
--accent-foreground: 0 0% 9%;
|
|
185
|
+
--destructive: 0 84.2% 60.2%;
|
|
186
|
+
--destructive-foreground: 0 0% 98%;
|
|
187
|
+
--border: 0 0% 89.8%;
|
|
188
|
+
--input: 0 0% 89.8%;
|
|
189
|
+
--ring: 0 0% 3.9%;
|
|
190
|
+
--radius: 0.5rem;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.dark {
|
|
194
|
+
--background: 0 0% 3.9%;
|
|
195
|
+
--foreground: 0 0% 98%;
|
|
196
|
+
--card: 0 0% 3.9%;
|
|
197
|
+
--card-foreground: 0 0% 98%;
|
|
198
|
+
--popover: 0 0% 3.9%;
|
|
199
|
+
--popover-foreground: 0 0% 98%;
|
|
200
|
+
--primary: 0 0% 98%;
|
|
201
|
+
--primary-foreground: 0 0% 9%;
|
|
202
|
+
--secondary: 0 0% 14.9%;
|
|
203
|
+
--secondary-foreground: 0 0% 98%;
|
|
204
|
+
--muted: 0 0% 14.9%;
|
|
205
|
+
--muted-foreground: 0 0% 63.9%;
|
|
206
|
+
--accent: 0 0% 14.9%;
|
|
207
|
+
--accent-foreground: 0 0% 98%;
|
|
208
|
+
--destructive: 0 62.8% 30.6%;
|
|
209
|
+
--destructive-foreground: 0 0% 98%;
|
|
210
|
+
--border: 0 0% 14.9%;
|
|
211
|
+
--input: 0 0% 14.9%;
|
|
212
|
+
--ring: 0 0% 83.1%;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@layer base {
|
|
217
|
+
* {
|
|
218
|
+
@apply border-border;
|
|
219
|
+
}
|
|
220
|
+
body {
|
|
221
|
+
@apply bg-background text-foreground;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
EOF
|
|
225
|
+
|
|
226
|
+
# Add path aliases to tsconfig.json
|
|
227
|
+
echo "🔧 Adding path aliases to tsconfig.json..."
|
|
228
|
+
node -e "
|
|
229
|
+
const fs = require('fs');
|
|
230
|
+
const config = JSON.parse(fs.readFileSync('tsconfig.json', 'utf8'));
|
|
231
|
+
config.compilerOptions = config.compilerOptions || {};
|
|
232
|
+
config.compilerOptions.baseUrl = '.';
|
|
233
|
+
config.compilerOptions.paths = { '@/*': ['./src/*'] };
|
|
234
|
+
fs.writeFileSync('tsconfig.json', JSON.stringify(config, null, 2));
|
|
235
|
+
"
|
|
236
|
+
|
|
237
|
+
# Add path aliases to tsconfig.app.json
|
|
238
|
+
echo "🔧 Adding path aliases to tsconfig.app.json..."
|
|
239
|
+
node -e "
|
|
240
|
+
const fs = require('fs');
|
|
241
|
+
const path = 'tsconfig.app.json';
|
|
242
|
+
const content = fs.readFileSync(path, 'utf8');
|
|
243
|
+
// Remove comments manually
|
|
244
|
+
const lines = content.split('\n').filter(line => !line.trim().startsWith('//'));
|
|
245
|
+
const jsonContent = lines.join('\n');
|
|
246
|
+
const config = JSON.parse(jsonContent.replace(/\/\*[\s\S]*?\*\//g, '').replace(/,(\s*[}\]])/g, '\$1'));
|
|
247
|
+
config.compilerOptions = config.compilerOptions || {};
|
|
248
|
+
config.compilerOptions.baseUrl = '.';
|
|
249
|
+
config.compilerOptions.paths = { '@/*': ['./src/*'] };
|
|
250
|
+
fs.writeFileSync(path, JSON.stringify(config, null, 2));
|
|
251
|
+
"
|
|
252
|
+
|
|
253
|
+
# Update vite.config.ts
|
|
254
|
+
echo "⚙️ Updating Vite configuration..."
|
|
255
|
+
cat > vite.config.ts << 'EOF'
|
|
256
|
+
import path from "path";
|
|
257
|
+
import react from "@vitejs/plugin-react";
|
|
258
|
+
import { defineConfig } from "vite";
|
|
259
|
+
|
|
260
|
+
export default defineConfig({
|
|
261
|
+
plugins: [react()],
|
|
262
|
+
resolve: {
|
|
263
|
+
alias: {
|
|
264
|
+
"@": path.resolve(__dirname, "./src"),
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
EOF
|
|
269
|
+
|
|
270
|
+
# Install all shadcn/ui dependencies
|
|
271
|
+
echo "📦 Installing shadcn/ui dependencies..."
|
|
272
|
+
pnpm install @radix-ui/react-accordion @radix-ui/react-aspect-ratio @radix-ui/react-avatar @radix-ui/react-checkbox @radix-ui/react-collapsible @radix-ui/react-context-menu @radix-ui/react-dialog @radix-ui/react-dropdown-menu @radix-ui/react-hover-card @radix-ui/react-label @radix-ui/react-menubar @radix-ui/react-navigation-menu @radix-ui/react-popover @radix-ui/react-progress @radix-ui/react-radio-group @radix-ui/react-scroll-area @radix-ui/react-select @radix-ui/react-separator @radix-ui/react-slider @radix-ui/react-slot @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-toggle @radix-ui/react-toggle-group @radix-ui/react-tooltip
|
|
273
|
+
pnpm install sonner cmdk vaul embla-carousel-react react-day-picker react-resizable-panels date-fns react-hook-form @hookform/resolvers zod
|
|
274
|
+
|
|
275
|
+
# Extract shadcn components from tarball
|
|
276
|
+
echo "📦 Extracting shadcn/ui components..."
|
|
277
|
+
tar -xzf "$COMPONENTS_TARBALL" -C src/
|
|
278
|
+
|
|
279
|
+
# Create components.json for reference
|
|
280
|
+
echo "📝 Creating components.json config..."
|
|
281
|
+
cat > components.json << 'EOF'
|
|
282
|
+
{
|
|
283
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
284
|
+
"style": "default",
|
|
285
|
+
"rsc": false,
|
|
286
|
+
"tsx": true,
|
|
287
|
+
"tailwind": {
|
|
288
|
+
"config": "tailwind.config.js",
|
|
289
|
+
"css": "src/index.css",
|
|
290
|
+
"baseColor": "slate",
|
|
291
|
+
"cssVariables": true,
|
|
292
|
+
"prefix": ""
|
|
293
|
+
},
|
|
294
|
+
"aliases": {
|
|
295
|
+
"components": "@/components",
|
|
296
|
+
"utils": "@/lib/utils",
|
|
297
|
+
"ui": "@/components/ui",
|
|
298
|
+
"lib": "@/lib",
|
|
299
|
+
"hooks": "@/hooks"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
EOF
|
|
303
|
+
|
|
304
|
+
echo "✅ Setup complete! You can now use Tailwind CSS and shadcn/ui in your project."
|
|
305
|
+
echo ""
|
|
306
|
+
echo "📦 Included components (40+ total):"
|
|
307
|
+
echo " - accordion, alert, aspect-ratio, avatar, badge, breadcrumb"
|
|
308
|
+
echo " - button, calendar, card, carousel, checkbox, collapsible"
|
|
309
|
+
echo " - command, context-menu, dialog, drawer, dropdown-menu"
|
|
310
|
+
echo " - form, hover-card, input, label, menubar, navigation-menu"
|
|
311
|
+
echo " - popover, progress, radio-group, resizable, scroll-area"
|
|
312
|
+
echo " - select, separator, sheet, skeleton, slider, sonner"
|
|
313
|
+
echo " - switch, table, tabs, textarea, toast, toggle, toggle-group, tooltip"
|
|
314
|
+
echo ""
|
|
315
|
+
echo "To start developing:"
|
|
316
|
+
echo " cd $PROJECT_NAME"
|
|
317
|
+
echo " pnpm dev"
|
|
318
|
+
echo ""
|
|
319
|
+
echo "📚 Import components like:"
|
|
320
|
+
echo " import { Button } from '@/components/ui/button'"
|
|
321
|
+
echo " import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card'"
|
|
322
|
+
echo " import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog'"
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webapp-testing
|
|
3
|
+
description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Web Application Testing
|
|
8
|
+
|
|
9
|
+
To test local web applications, write native Python Playwright scripts.
|
|
10
|
+
|
|
11
|
+
**Helper Scripts Available**:
|
|
12
|
+
- `scripts/with_server.py` - Manages server lifecycle (supports multiple servers)
|
|
13
|
+
|
|
14
|
+
**Always run scripts with `--help` first** to see usage. DO NOT read the source until you try running the script first and find that a customized solution is abslutely necessary. These scripts can be very large and thus pollute your context window. They exist to be called directly as black-box scripts rather than ingested into your context window.
|
|
15
|
+
|
|
16
|
+
## Decision Tree: Choosing Your Approach
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
User task → Is it static HTML?
|
|
20
|
+
├─ Yes → Read HTML file directly to identify selectors
|
|
21
|
+
│ ├─ Success → Write Playwright script using selectors
|
|
22
|
+
│ └─ Fails/Incomplete → Treat as dynamic (below)
|
|
23
|
+
│
|
|
24
|
+
└─ No (dynamic webapp) → Is the server already running?
|
|
25
|
+
├─ No → Run: python scripts/with_server.py --help
|
|
26
|
+
│ Then use the helper + write simplified Playwright script
|
|
27
|
+
│
|
|
28
|
+
└─ Yes → Reconnaissance-then-action:
|
|
29
|
+
1. Navigate and wait for networkidle
|
|
30
|
+
2. Take screenshot or inspect DOM
|
|
31
|
+
3. Identify selectors from rendered state
|
|
32
|
+
4. Execute actions with discovered selectors
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Example: Using with_server.py
|
|
36
|
+
|
|
37
|
+
To start a server, run `--help` first, then use the helper:
|
|
38
|
+
|
|
39
|
+
**Single server:**
|
|
40
|
+
```bash
|
|
41
|
+
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Multiple servers (e.g., backend + frontend):**
|
|
45
|
+
```bash
|
|
46
|
+
python scripts/with_server.py \
|
|
47
|
+
--server "cd backend && python server.py" --port 3000 \
|
|
48
|
+
--server "cd frontend && npm run dev" --port 5173 \
|
|
49
|
+
-- python your_automation.py
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
To create an automation script, include only Playwright logic (servers are managed automatically):
|
|
53
|
+
```python
|
|
54
|
+
from playwright.sync_api import sync_playwright
|
|
55
|
+
|
|
56
|
+
with sync_playwright() as p:
|
|
57
|
+
browser = p.chromium.launch(headless=True) # Always launch chromium in headless mode
|
|
58
|
+
page = browser.new_page()
|
|
59
|
+
page.goto('http://localhost:5173') # Server already running and ready
|
|
60
|
+
page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS to execute
|
|
61
|
+
# ... your automation logic
|
|
62
|
+
browser.close()
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Reconnaissance-Then-Action Pattern
|
|
66
|
+
|
|
67
|
+
1. **Inspect rendered DOM**:
|
|
68
|
+
```python
|
|
69
|
+
page.screenshot(path='/tmp/inspect.png', full_page=True)
|
|
70
|
+
content = page.content()
|
|
71
|
+
page.locator('button').all()
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
2. **Identify selectors** from inspection results
|
|
75
|
+
|
|
76
|
+
3. **Execute actions** using discovered selectors
|
|
77
|
+
|
|
78
|
+
## Common Pitfall
|
|
79
|
+
|
|
80
|
+
❌ **Don't** inspect the DOM before waiting for `networkidle` on dynamic apps
|
|
81
|
+
✅ **Do** wait for `page.wait_for_load_state('networkidle')` before inspection
|
|
82
|
+
|
|
83
|
+
## Best Practices
|
|
84
|
+
|
|
85
|
+
- **Use bundled scripts as black boxes** - To accomplish a task, consider whether one of the scripts available in `scripts/` can help. These scripts handle common, complex workflows reliably without cluttering the context window. Use `--help` to see usage, then invoke directly.
|
|
86
|
+
- Use `sync_playwright()` for synchronous scripts
|
|
87
|
+
- Always close the browser when done
|
|
88
|
+
- Use descriptive selectors: `text=`, `role=`, CSS selectors, or IDs
|
|
89
|
+
- Add appropriate waits: `page.wait_for_selector()` or `page.wait_for_timeout()`
|
|
90
|
+
|
|
91
|
+
## Reference Files
|
|
92
|
+
|
|
93
|
+
- **examples/** - Examples showing common patterns:
|
|
94
|
+
- `element_discovery.py` - Discovering buttons, links, and inputs on a page
|
|
95
|
+
- `static_html_automation.py` - Using file:// URLs for local HTML
|
|
96
|
+
- `console_logging.py` - Capturing console logs during automation
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from playwright.sync_api import sync_playwright
|
|
2
|
+
|
|
3
|
+
# Example: Capturing console logs during browser automation
|
|
4
|
+
|
|
5
|
+
url = 'http://localhost:5173' # Replace with your URL
|
|
6
|
+
|
|
7
|
+
console_logs = []
|
|
8
|
+
|
|
9
|
+
with sync_playwright() as p:
|
|
10
|
+
browser = p.chromium.launch(headless=True)
|
|
11
|
+
page = browser.new_page(viewport={'width': 1920, 'height': 1080})
|
|
12
|
+
|
|
13
|
+
# Set up console log capture
|
|
14
|
+
def handle_console_message(msg):
|
|
15
|
+
console_logs.append(f"[{msg.type}] {msg.text}")
|
|
16
|
+
print(f"Console: [{msg.type}] {msg.text}")
|
|
17
|
+
|
|
18
|
+
page.on("console", handle_console_message)
|
|
19
|
+
|
|
20
|
+
# Navigate to page
|
|
21
|
+
page.goto(url)
|
|
22
|
+
page.wait_for_load_state('networkidle')
|
|
23
|
+
|
|
24
|
+
# Interact with the page (triggers console logs)
|
|
25
|
+
page.click('text=Dashboard')
|
|
26
|
+
page.wait_for_timeout(1000)
|
|
27
|
+
|
|
28
|
+
browser.close()
|
|
29
|
+
|
|
30
|
+
# Save console logs to file
|
|
31
|
+
with open('/mnt/user-data/outputs/console.log', 'w') as f:
|
|
32
|
+
f.write('\n'.join(console_logs))
|
|
33
|
+
|
|
34
|
+
print(f"\nCaptured {len(console_logs)} console messages")
|
|
35
|
+
print(f"Logs saved to: /mnt/user-data/outputs/console.log")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from playwright.sync_api import sync_playwright
|
|
2
|
+
|
|
3
|
+
# Example: Discovering buttons and other elements on a page
|
|
4
|
+
|
|
5
|
+
with sync_playwright() as p:
|
|
6
|
+
browser = p.chromium.launch(headless=True)
|
|
7
|
+
page = browser.new_page()
|
|
8
|
+
|
|
9
|
+
# Navigate to page and wait for it to fully load
|
|
10
|
+
page.goto('http://localhost:5173')
|
|
11
|
+
page.wait_for_load_state('networkidle')
|
|
12
|
+
|
|
13
|
+
# Discover all buttons on the page
|
|
14
|
+
buttons = page.locator('button').all()
|
|
15
|
+
print(f"Found {len(buttons)} buttons:")
|
|
16
|
+
for i, button in enumerate(buttons):
|
|
17
|
+
text = button.inner_text() if button.is_visible() else "[hidden]"
|
|
18
|
+
print(f" [{i}] {text}")
|
|
19
|
+
|
|
20
|
+
# Discover links
|
|
21
|
+
links = page.locator('a[href]').all()
|
|
22
|
+
print(f"\nFound {len(links)} links:")
|
|
23
|
+
for link in links[:5]: # Show first 5
|
|
24
|
+
text = link.inner_text().strip()
|
|
25
|
+
href = link.get_attribute('href')
|
|
26
|
+
print(f" - {text} -> {href}")
|
|
27
|
+
|
|
28
|
+
# Discover input fields
|
|
29
|
+
inputs = page.locator('input, textarea, select').all()
|
|
30
|
+
print(f"\nFound {len(inputs)} input fields:")
|
|
31
|
+
for input_elem in inputs:
|
|
32
|
+
name = input_elem.get_attribute('name') or input_elem.get_attribute('id') or "[unnamed]"
|
|
33
|
+
input_type = input_elem.get_attribute('type') or 'text'
|
|
34
|
+
print(f" - {name} ({input_type})")
|
|
35
|
+
|
|
36
|
+
# Take screenshot for visual reference
|
|
37
|
+
page.screenshot(path='/tmp/page_discovery.png', full_page=True)
|
|
38
|
+
print("\nScreenshot saved to /tmp/page_discovery.png")
|
|
39
|
+
|
|
40
|
+
browser.close()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from playwright.sync_api import sync_playwright
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
# Example: Automating interaction with static HTML files using file:// URLs
|
|
5
|
+
|
|
6
|
+
html_file_path = os.path.abspath('path/to/your/file.html')
|
|
7
|
+
file_url = f'file://{html_file_path}'
|
|
8
|
+
|
|
9
|
+
with sync_playwright() as p:
|
|
10
|
+
browser = p.chromium.launch(headless=True)
|
|
11
|
+
page = browser.new_page(viewport={'width': 1920, 'height': 1080})
|
|
12
|
+
|
|
13
|
+
# Navigate to local HTML file
|
|
14
|
+
page.goto(file_url)
|
|
15
|
+
|
|
16
|
+
# Take screenshot
|
|
17
|
+
page.screenshot(path='/mnt/user-data/outputs/static_page.png', full_page=True)
|
|
18
|
+
|
|
19
|
+
# Interact with elements
|
|
20
|
+
page.click('text=Click Me')
|
|
21
|
+
page.fill('#name', 'John Doe')
|
|
22
|
+
page.fill('#email', 'john@example.com')
|
|
23
|
+
|
|
24
|
+
# Submit form
|
|
25
|
+
page.click('button[type="submit"]')
|
|
26
|
+
page.wait_for_timeout(500)
|
|
27
|
+
|
|
28
|
+
# Take final screenshot
|
|
29
|
+
page.screenshot(path='/mnt/user-data/outputs/after_submit.png', full_page=True)
|
|
30
|
+
|
|
31
|
+
browser.close()
|
|
32
|
+
|
|
33
|
+
print("Static HTML automation completed!")
|