@caddis/cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -16
- package/bundles/antigravity-plugin-extras/plugin.json +5 -0
- package/bundles/antigravity-plugin-extras/skills/_registry.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/agent-md-refactor/SKILL.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/algorithmic-art/SKILL.md +293 -0
- package/bundles/antigravity-plugin-extras/skills/anchor-review/SKILL.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/api-client-patterns/SKILL.md +367 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +244 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-diagram/SKILL.md +156 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-document/SKILL.md +321 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/bundles/antigravity-plugin-extras/skills/ascii-art/SKILL.md +144 -0
- package/bundles/antigravity-plugin-extras/skills/asking-questions/SKILL.md +81 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/cross-service/credential-management.md +450 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/browser/README.md +363 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/code-interpreter/README.md +232 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/README.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deploy-template.sh +117 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deployment-strategies.md +416 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/troubleshooting-guide.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/validate-deployment.sh +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/identity/README.md +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/memory/README.md +253 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/observability/README.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/runtime/README.md +215 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/SKILL.md +279 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md +431 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh +240 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/SKILL.md +318 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/cloudwatch-alarms.md +567 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/operations-patterns.md +394 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/SKILL.md +758 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/deployment-best-practices.md +830 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/eda-patterns.md +1002 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/observability-best-practices.md +770 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/performance-optimization.md +671 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/security-best-practices.md +625 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/serverless-patterns.md +838 -0
- package/bundles/antigravity-plugin-extras/skills/backend-to-frontend-handoff/SKILL.md +139 -0
- package/bundles/antigravity-plugin-extras/skills/banner-design/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/brand-design/SKILL.md +298 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/brand-voice/SKILL.md +93 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +392 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md +461 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/examples.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/state-patterns.md +360 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/troubleshooting.md +362 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +266 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/examples.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +317 -0
- package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +385 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/changelog-generator/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/code-explainer/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/competitive-ads-extractor/SKILL.md +294 -0
- package/bundles/antigravity-plugin-extras/skills/component-testing/SKILL.md +310 -0
- package/bundles/antigravity-plugin-extras/skills/content-research-writer/SKILL.md +539 -0
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-analysis/SKILL.md +111 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/README.md +248 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +203 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/adapter.py.template +44 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/api-router.py.template +43 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/contract-test.py.template +384 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/display-dto.py.template +39 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-service.ts.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-types.ts.template +38 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/ingestion-model.py.template +42 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/mapping-doc.md.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/normalizer.py.template +48 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_requirements.md +36 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_ui_demand.md +35 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/reconcile_mapping.md +66 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/query-catalog.md.template +62 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/consumer-driven-contracts.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/drift-check-catalog.md +305 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/layer-responsibilities.md +333 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_connections.py +170 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_sources.py +161 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/drift_check.py +171 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/extract_schema.py +1363 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_gap_report.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_mapping_doc.py +294 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/ts_dto_compare.py +214 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/validate_lineage.py +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-loader/SKILL.md +753 -0
- package/bundles/antigravity-plugin-extras/skills/data-validation/SKILL.md +220 -0
- package/bundles/antigravity-plugin-extras/skills/db-testing/SKILL.md +117 -0
- package/bundles/antigravity-plugin-extras/skills/deploy-local/SKILL.md +259 -0
- package/bundles/antigravity-plugin-extras/skills/design-md/SKILL.md +167 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/SKILL.md +240 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/references/DESIGN-SYSTEM-TEMPLATE.md +577 -0
- package/bundles/antigravity-plugin-extras/skills/developer-growth-analysis/SKILL.md +323 -0
- package/bundles/antigravity-plugin-extras/skills/doc-coauthoring/SKILL.md +378 -0
- package/bundles/antigravity-plugin-extras/skills/documentation-analyzer/SKILL.md +78 -0
- package/bundles/antigravity-plugin-extras/skills/domain-name-brainstormer/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/enterprise-dashboard-aesthetic-system/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/SKILL.md +193 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/element-types.md +497 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/excalidraw-schema.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/reliable-diagrams.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/README.md +60 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-arrow.py +354 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-icon-to-diagram.py +412 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py +183 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/business-flow-swimlane-template.excalidraw +334 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/class-diagram-template.excalidraw +558 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/data-flow-diagram-template.excalidraw +279 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/er-diagram-template.excalidraw +662 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/flowchart-template.excalidraw +179 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/mindmap-template.excalidraw +244 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/relationship-template.excalidraw +145 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/reliable-flowchart.excalidraw +1 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/sequence-diagram-template.excalidraw +509 -0
- package/bundles/antigravity-plugin-extras/skills/file-organizer/SKILL.md +434 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/README.md +221 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/SKILL.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/SKILL.md +359 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/references/templates.md +90 -0
- package/bundles/antigravity-plugin-extras/skills/golden-nuggets/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/humanizer/SKILL.md +194 -0
- package/bundles/antigravity-plugin-extras/skills/image-enhancer/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/intent-writer/SKILL.md +201 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/SKILL.md +124 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/3p-updates.md +47 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/faq-answers.md +30 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/general-comms.md +16 -0
- package/bundles/antigravity-plugin-extras/skills/invoice-organizer/SKILL.md +447 -0
- package/bundles/antigravity-plugin-extras/skills/jira-issues/SKILL.md +182 -0
- package/bundles/antigravity-plugin-extras/skills/job-application/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/lead-research-assistant/SKILL.md +200 -0
- package/bundles/antigravity-plugin-extras/skills/llm-application-dev/SKILL.md +217 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/evaluation.md +602 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/mcp_best_practices.md +915 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/node_mcp_server.md +916 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/python_mcp_server.md +752 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/connections.py +151 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/bundles/antigravity-plugin-extras/skills/meeting-insights-analyzer/SKILL.md +328 -0
- package/bundles/antigravity-plugin-extras/skills/monorepo/SKILL.md +267 -0
- package/bundles/antigravity-plugin-extras/skills/naming-analyzer/SKILL.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/nextjs-app-router/SKILL.md +271 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/AUTHENTICATION.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/SKILL.md +270 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/api_reference.md +309 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/troubleshooting.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/usage_patterns.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/__init__.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/ask_question.py +256 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/auth_manager.py +358 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_session.py +255 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_utils.py +107 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/cleanup_manager.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/config.py +44 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/notebook_manager.py +410 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/run.py +102 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/setup_environment.py +204 -0
- package/bundles/antigravity-plugin-extras/skills/observability/SKILL.md +371 -0
- package/bundles/antigravity-plugin-extras/skills/onboard-project/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/performance-testing/SKILL.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/pipeline-state/SKILL.md +208 -0
- package/bundles/antigravity-plugin-extras/skills/plantuml/SKILL.md +228 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/SKILL.md +142 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/linear.app.md +196 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/stripe.md +214 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/vercel.md +218 -0
- package/bundles/antigravity-plugin-extras/skills/prd-to-code/SKILL.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/raffle-winner-picker/SKILL.md +159 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/README.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/SKILL.md +53 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/alternatives.md +258 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/anti-patterns.md +290 -0
- package/bundles/antigravity-plugin-extras/skills/receiving-code-review/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/relay/SKILL.md +246 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/code-reviewer.md +146 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +350 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/pwa-checklist.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/touch-and-interaction.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/transformation-catalogue.md +326 -0
- package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +275 -0
- package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/shadcn-radix/SKILL.md +330 -0
- package/bundles/antigravity-plugin-extras/skills/sketch/SKILL.md +104 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/SKILL.md +646 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/color_palettes.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/easing.py +230 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/frame_composer.py +469 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/gif_builder.py +246 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/typography.py +357 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/validators.py +264 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/visual_effects.py +494 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/requirements.txt +4 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/bounce.py +106 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/explode.py +331 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/fade.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/flip.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/morph.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/move.py +293 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/pulse.py +268 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/shake.py +127 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/slide.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/spin.py +269 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/wiggle.py +300 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/zoom.py +312 -0
- package/bundles/antigravity-plugin-extras/skills/slides/SKILL.md +38 -0
- package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/streamlit-dev/SKILL.md +268 -0
- package/bundles/antigravity-plugin-extras/skills/svg-create/SKILL.md +251 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/SKILL.md +59 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/theme-showcase.pdf +0 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/desert-rose.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/golden-hour.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/SKILL.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/ui-testing/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/_sync_all.py +414 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/app-interface.csv +31 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/charts.csv +26 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/colors.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/design.csv +1776 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/draft.csv +1779 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/google-fonts.csv +1924 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/icons.csv +106 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/landing.csv +35 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/products.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/react-performance.csv +45 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/styles.csv +85 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/typography.csv +74 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ui-reasoning.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ux-guidelines.csv +100 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/core.py +247 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/design_system.py +1067 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/search.py +114 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +140 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/commands.md +252 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/graph-schema.md +116 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/pipeline.md +331 -0
- package/bundles/antigravity-plugin-extras/skills/update-readme/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/verification-loop/SKILL.md +209 -0
- package/bundles/antigravity-plugin-extras/skills/video-downloader/SKILL.md +107 -0
- package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +288 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/SKILL.md +339 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/agents/agent-interface.md +175 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/html.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/nlp-keywords.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/palettes.md +149 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/python.md +249 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/react.md +427 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/shapes.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/stopwords.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/youtube-transcript/SKILL.md +416 -0
- package/bundles/manifest.json +2 -1
- package/dist/cli.js +166 -37
- package/package.json +1 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Add icons from Excalidraw libraries to diagrams.
|
|
4
|
+
|
|
5
|
+
This script reads an icon JSON file from an Excalidraw library, transforms its coordinates
|
|
6
|
+
to a target position, generates unique IDs, and adds it to an existing Excalidraw diagram.
|
|
7
|
+
Works with any Excalidraw library (AWS, GCP, Azure, Kubernetes, etc.).
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
python add-icon-to-diagram.py <diagram_path> <icon_name> <x> <y> [OPTIONS]
|
|
11
|
+
|
|
12
|
+
Options:
|
|
13
|
+
--library-path PATH Path to the icon library directory (default: same folder as script, ../libraries/aws-architecture-icons)
|
|
14
|
+
--label TEXT Add a text label below the icon
|
|
15
|
+
--use-edit-suffix Edit via .excalidraw.edit to avoid editor overwrite issues (enabled by default; use --no-use-edit-suffix to disable)
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
python add-icon-to-diagram.py diagram.excalidraw EC2 500 300
|
|
19
|
+
python add-icon-to-diagram.py diagram.excalidraw EC2 500 300 --label "Web Server"
|
|
20
|
+
python add-icon-to-diagram.py diagram.excalidraw VPC 200 150 --library-path libraries/gcp-icons
|
|
21
|
+
python add-icon-to-diagram.py diagram.excalidraw EC2 500 300 --use-edit-suffix
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
import json
|
|
25
|
+
import sys
|
|
26
|
+
import uuid
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
from typing import Dict, List, Any, Tuple
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def generate_unique_id() -> str:
|
|
32
|
+
"""Generate a unique ID for Excalidraw elements."""
|
|
33
|
+
return str(uuid.uuid4()).replace('-', '')[:16]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def calculate_bounding_box(elements: List[Dict[str, Any]]) -> Tuple[float, float, float, float]:
|
|
37
|
+
"""Calculate the bounding box (min_x, min_y, max_x, max_y) of icon elements."""
|
|
38
|
+
if not elements:
|
|
39
|
+
return (0, 0, 0, 0)
|
|
40
|
+
|
|
41
|
+
min_x = float('inf')
|
|
42
|
+
min_y = float('inf')
|
|
43
|
+
max_x = float('-inf')
|
|
44
|
+
max_y = float('-inf')
|
|
45
|
+
|
|
46
|
+
for element in elements:
|
|
47
|
+
if 'x' in element and 'y' in element:
|
|
48
|
+
x = element['x']
|
|
49
|
+
y = element['y']
|
|
50
|
+
width = element.get('width', 0)
|
|
51
|
+
height = element.get('height', 0)
|
|
52
|
+
|
|
53
|
+
min_x = min(min_x, x)
|
|
54
|
+
min_y = min(min_y, y)
|
|
55
|
+
max_x = max(max_x, x + width)
|
|
56
|
+
max_y = max(max_y, y + height)
|
|
57
|
+
|
|
58
|
+
return (min_x, min_y, max_x, max_y)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def transform_icon_elements(
|
|
62
|
+
elements: List[Dict[str, Any]],
|
|
63
|
+
target_x: float,
|
|
64
|
+
target_y: float
|
|
65
|
+
) -> List[Dict[str, Any]]:
|
|
66
|
+
"""
|
|
67
|
+
Transform icon elements to target coordinates with unique IDs.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
elements: Icon elements from JSON file
|
|
71
|
+
target_x: Target X coordinate (top-left position)
|
|
72
|
+
target_y: Target Y coordinate (top-left position)
|
|
73
|
+
|
|
74
|
+
Returns:
|
|
75
|
+
Transformed elements with new coordinates and IDs
|
|
76
|
+
"""
|
|
77
|
+
if not elements:
|
|
78
|
+
return []
|
|
79
|
+
|
|
80
|
+
# Calculate bounding box
|
|
81
|
+
min_x, min_y, max_x, max_y = calculate_bounding_box(elements)
|
|
82
|
+
|
|
83
|
+
# Calculate offset
|
|
84
|
+
offset_x = target_x - min_x
|
|
85
|
+
offset_y = target_y - min_y
|
|
86
|
+
|
|
87
|
+
# Create ID mapping: old_id -> new_id
|
|
88
|
+
id_mapping = {}
|
|
89
|
+
for element in elements:
|
|
90
|
+
if 'id' in element:
|
|
91
|
+
old_id = element['id']
|
|
92
|
+
id_mapping[old_id] = generate_unique_id()
|
|
93
|
+
|
|
94
|
+
# Create group ID mapping
|
|
95
|
+
group_id_mapping = {}
|
|
96
|
+
for element in elements:
|
|
97
|
+
if 'groupIds' in element:
|
|
98
|
+
for old_group_id in element['groupIds']:
|
|
99
|
+
if old_group_id not in group_id_mapping:
|
|
100
|
+
group_id_mapping[old_group_id] = generate_unique_id()
|
|
101
|
+
|
|
102
|
+
# Transform elements
|
|
103
|
+
transformed = []
|
|
104
|
+
for element in elements:
|
|
105
|
+
new_element = element.copy()
|
|
106
|
+
|
|
107
|
+
# Update coordinates
|
|
108
|
+
if 'x' in new_element:
|
|
109
|
+
new_element['x'] = new_element['x'] + offset_x
|
|
110
|
+
if 'y' in new_element:
|
|
111
|
+
new_element['y'] = new_element['y'] + offset_y
|
|
112
|
+
|
|
113
|
+
# Update ID
|
|
114
|
+
if 'id' in new_element:
|
|
115
|
+
new_element['id'] = id_mapping[new_element['id']]
|
|
116
|
+
|
|
117
|
+
# Update group IDs
|
|
118
|
+
if 'groupIds' in new_element:
|
|
119
|
+
new_element['groupIds'] = [
|
|
120
|
+
group_id_mapping[gid] for gid in new_element['groupIds']
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
# Update binding references if they exist
|
|
124
|
+
if 'startBinding' in new_element and new_element['startBinding']:
|
|
125
|
+
if 'elementId' in new_element['startBinding']:
|
|
126
|
+
old_id = new_element['startBinding']['elementId']
|
|
127
|
+
if old_id in id_mapping:
|
|
128
|
+
new_element['startBinding']['elementId'] = id_mapping[old_id]
|
|
129
|
+
|
|
130
|
+
if 'endBinding' in new_element and new_element['endBinding']:
|
|
131
|
+
if 'elementId' in new_element['endBinding']:
|
|
132
|
+
old_id = new_element['endBinding']['elementId']
|
|
133
|
+
if old_id in id_mapping:
|
|
134
|
+
new_element['endBinding']['elementId'] = id_mapping[old_id]
|
|
135
|
+
|
|
136
|
+
# Update containerId if it exists
|
|
137
|
+
if 'containerId' in new_element and new_element['containerId']:
|
|
138
|
+
old_id = new_element['containerId']
|
|
139
|
+
if old_id in id_mapping:
|
|
140
|
+
new_element['containerId'] = id_mapping[old_id]
|
|
141
|
+
|
|
142
|
+
# Update boundElements if they exist
|
|
143
|
+
if 'boundElements' in new_element and new_element['boundElements']:
|
|
144
|
+
new_bound_elements = []
|
|
145
|
+
for bound_elem in new_element['boundElements']:
|
|
146
|
+
if isinstance(bound_elem, dict) and 'id' in bound_elem:
|
|
147
|
+
old_id = bound_elem['id']
|
|
148
|
+
if old_id in id_mapping:
|
|
149
|
+
bound_elem['id'] = id_mapping[old_id]
|
|
150
|
+
new_bound_elements.append(bound_elem)
|
|
151
|
+
new_element['boundElements'] = new_bound_elements
|
|
152
|
+
|
|
153
|
+
transformed.append(new_element)
|
|
154
|
+
|
|
155
|
+
return transformed
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def load_icon(icon_name: str, library_path: Path) -> List[Dict[str, Any]]:
|
|
159
|
+
"""
|
|
160
|
+
Load icon elements from library.
|
|
161
|
+
|
|
162
|
+
Args:
|
|
163
|
+
icon_name: Name of the icon (e.g., "EC2", "VPC")
|
|
164
|
+
library_path: Path to the icon library directory
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
List of icon elements
|
|
168
|
+
"""
|
|
169
|
+
icon_file = library_path / "icons" / f"{icon_name}.json"
|
|
170
|
+
|
|
171
|
+
if not icon_file.exists():
|
|
172
|
+
raise FileNotFoundError(f"Icon file not found: {icon_file}")
|
|
173
|
+
|
|
174
|
+
with open(icon_file, 'r', encoding='utf-8') as f:
|
|
175
|
+
icon_data = json.load(f)
|
|
176
|
+
|
|
177
|
+
return icon_data.get('elements', [])
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def prepare_edit_path(diagram_path: Path, use_edit_suffix: bool) -> tuple[Path, Path | None]:
|
|
181
|
+
"""
|
|
182
|
+
Prepare a safe edit path to avoid editor overwrite issues.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
(work_path, final_path)
|
|
186
|
+
- work_path: file path to read/write during edit
|
|
187
|
+
- final_path: file path to rename back to (or None if not used)
|
|
188
|
+
"""
|
|
189
|
+
if not use_edit_suffix:
|
|
190
|
+
return diagram_path, None
|
|
191
|
+
|
|
192
|
+
if diagram_path.suffix != ".excalidraw":
|
|
193
|
+
return diagram_path, None
|
|
194
|
+
|
|
195
|
+
edit_path = diagram_path.with_suffix(diagram_path.suffix + ".edit")
|
|
196
|
+
|
|
197
|
+
if diagram_path.exists():
|
|
198
|
+
if edit_path.exists():
|
|
199
|
+
raise FileExistsError(f"Edit file already exists: {edit_path}")
|
|
200
|
+
diagram_path.rename(edit_path)
|
|
201
|
+
|
|
202
|
+
return edit_path, diagram_path
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def finalize_edit_path(work_path: Path, final_path: Path | None) -> None:
|
|
206
|
+
"""Finalize edit by renaming .edit back to .excalidraw if needed."""
|
|
207
|
+
if final_path is None:
|
|
208
|
+
return
|
|
209
|
+
|
|
210
|
+
if final_path.exists():
|
|
211
|
+
final_path.unlink()
|
|
212
|
+
|
|
213
|
+
work_path.rename(final_path)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def create_text_label(text: str, x: float, y: float) -> Dict[str, Any]:
|
|
217
|
+
"""
|
|
218
|
+
Create a text label element.
|
|
219
|
+
|
|
220
|
+
Args:
|
|
221
|
+
text: Label text
|
|
222
|
+
x: X coordinate
|
|
223
|
+
y: Y coordinate
|
|
224
|
+
|
|
225
|
+
Returns:
|
|
226
|
+
Text element dictionary
|
|
227
|
+
"""
|
|
228
|
+
# Text sizing based on reliable-diagrams.md (width/height with padding)
|
|
229
|
+
font_size = 16
|
|
230
|
+
lines = text.split("\n")
|
|
231
|
+
max_line_len = max(len(line) for line in lines) if lines else 0
|
|
232
|
+
base_width = max_line_len * font_size * 0.7
|
|
233
|
+
width = int(base_width) + 16
|
|
234
|
+
base_height = font_size * 1.2 * max(len(lines), 1)
|
|
235
|
+
height = int(base_height * 1.1)
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
"id": generate_unique_id(),
|
|
239
|
+
"type": "text",
|
|
240
|
+
"x": x,
|
|
241
|
+
"y": y,
|
|
242
|
+
"width": width,
|
|
243
|
+
"height": height,
|
|
244
|
+
"angle": 0,
|
|
245
|
+
"strokeColor": "#1e1e1e",
|
|
246
|
+
"backgroundColor": "transparent",
|
|
247
|
+
"fillStyle": "solid",
|
|
248
|
+
"strokeWidth": 2,
|
|
249
|
+
"strokeStyle": "solid",
|
|
250
|
+
"roughness": 1,
|
|
251
|
+
"opacity": 100,
|
|
252
|
+
"groupIds": [],
|
|
253
|
+
"frameId": None,
|
|
254
|
+
"index": "a0",
|
|
255
|
+
"roundness": None,
|
|
256
|
+
"seed": 1000000000 + hash(text) % 1000000000,
|
|
257
|
+
"version": 1,
|
|
258
|
+
"versionNonce": 2000000000 + hash(text) % 1000000000,
|
|
259
|
+
"isDeleted": False,
|
|
260
|
+
"boundElements": [],
|
|
261
|
+
"updated": 1738195200000,
|
|
262
|
+
"link": None,
|
|
263
|
+
"locked": False,
|
|
264
|
+
"text": text,
|
|
265
|
+
"fontSize": font_size,
|
|
266
|
+
"fontFamily": 5, # Excalifont
|
|
267
|
+
"textAlign": "center",
|
|
268
|
+
"verticalAlign": "top",
|
|
269
|
+
"containerId": None,
|
|
270
|
+
"originalText": text,
|
|
271
|
+
"autoResize": True,
|
|
272
|
+
"lineHeight": 1.25
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def add_icon_to_diagram(
|
|
277
|
+
diagram_path: Path,
|
|
278
|
+
icon_name: str,
|
|
279
|
+
x: float,
|
|
280
|
+
y: float,
|
|
281
|
+
library_path: Path,
|
|
282
|
+
label: str = None
|
|
283
|
+
) -> None:
|
|
284
|
+
"""
|
|
285
|
+
Add an icon to an Excalidraw diagram.
|
|
286
|
+
|
|
287
|
+
Args:
|
|
288
|
+
diagram_path: Path to the Excalidraw diagram file
|
|
289
|
+
icon_name: Name of the icon to add
|
|
290
|
+
x: Target X coordinate
|
|
291
|
+
y: Target Y coordinate
|
|
292
|
+
library_path: Path to the icon library directory
|
|
293
|
+
label: Optional text label to add below the icon
|
|
294
|
+
"""
|
|
295
|
+
# Load icon elements
|
|
296
|
+
print(f"Loading icon: {icon_name}")
|
|
297
|
+
icon_elements = load_icon(icon_name, library_path)
|
|
298
|
+
print(f" Loaded {len(icon_elements)} elements")
|
|
299
|
+
|
|
300
|
+
# Transform icon elements
|
|
301
|
+
print(f"Transforming to position ({x}, {y})")
|
|
302
|
+
transformed_elements = transform_icon_elements(icon_elements, x, y)
|
|
303
|
+
|
|
304
|
+
# Calculate icon bounding box for label positioning
|
|
305
|
+
if label and transformed_elements:
|
|
306
|
+
min_x, min_y, max_x, max_y = calculate_bounding_box(transformed_elements)
|
|
307
|
+
icon_width = max_x - min_x
|
|
308
|
+
icon_height = max_y - min_y
|
|
309
|
+
|
|
310
|
+
# Position label below icon, centered
|
|
311
|
+
label_x = min_x + (icon_width / 2) - (len(label) * 5)
|
|
312
|
+
label_y = max_y + 10
|
|
313
|
+
|
|
314
|
+
label_element = create_text_label(label, label_x, label_y)
|
|
315
|
+
transformed_elements.append(label_element)
|
|
316
|
+
print(f" Added label: '{label}'")
|
|
317
|
+
|
|
318
|
+
# Load diagram
|
|
319
|
+
print(f"Loading diagram: {diagram_path}")
|
|
320
|
+
with open(diagram_path, 'r', encoding='utf-8') as f:
|
|
321
|
+
diagram = json.load(f)
|
|
322
|
+
|
|
323
|
+
# Add transformed elements
|
|
324
|
+
if 'elements' not in diagram:
|
|
325
|
+
diagram['elements'] = []
|
|
326
|
+
|
|
327
|
+
original_count = len(diagram['elements'])
|
|
328
|
+
diagram['elements'].extend(transformed_elements)
|
|
329
|
+
print(f" Added {len(transformed_elements)} elements (total: {original_count} -> {len(diagram['elements'])})")
|
|
330
|
+
|
|
331
|
+
# Save diagram
|
|
332
|
+
print(f"Saving diagram")
|
|
333
|
+
with open(diagram_path, 'w', encoding='utf-8') as f:
|
|
334
|
+
json.dump(diagram, f, indent=2, ensure_ascii=False)
|
|
335
|
+
|
|
336
|
+
print(f"✓ Successfully added '{icon_name}' icon to diagram")
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
def main():
|
|
340
|
+
"""Main entry point."""
|
|
341
|
+
if len(sys.argv) < 5:
|
|
342
|
+
print("Usage: python add-icon-to-diagram.py <diagram_path> <icon_name> <x> <y> [OPTIONS]")
|
|
343
|
+
print("\nOptions:")
|
|
344
|
+
print(" --library-path PATH Path to icon library directory")
|
|
345
|
+
print(" --label TEXT Add text label below icon")
|
|
346
|
+
print(" --use-edit-suffix Edit via .excalidraw.edit to avoid editor overwrite issues (enabled by default; use --no-use-edit-suffix to disable)")
|
|
347
|
+
print("\nExamples:")
|
|
348
|
+
print(" python add-icon-to-diagram.py diagram.excalidraw EC2 500 300")
|
|
349
|
+
print(" python add-icon-to-diagram.py diagram.excalidraw EC2 500 300 --label 'Web Server'")
|
|
350
|
+
sys.exit(1)
|
|
351
|
+
|
|
352
|
+
diagram_path = Path(sys.argv[1])
|
|
353
|
+
icon_name = sys.argv[2]
|
|
354
|
+
x = float(sys.argv[3])
|
|
355
|
+
y = float(sys.argv[4])
|
|
356
|
+
|
|
357
|
+
# Default library path: same skill folder, libraries/aws-architecture-icons
|
|
358
|
+
script_dir = Path(__file__).resolve().parent
|
|
359
|
+
default_library_path = script_dir.parent / "libraries" / "aws-architecture-icons"
|
|
360
|
+
|
|
361
|
+
# Parse optional arguments
|
|
362
|
+
library_path = default_library_path
|
|
363
|
+
label = None
|
|
364
|
+
# Default: use edit suffix to avoid editor overwrite issues
|
|
365
|
+
use_edit_suffix = True
|
|
366
|
+
|
|
367
|
+
i = 5
|
|
368
|
+
while i < len(sys.argv):
|
|
369
|
+
if sys.argv[i] == '--library-path':
|
|
370
|
+
if i + 1 < len(sys.argv):
|
|
371
|
+
library_path = Path(sys.argv[i + 1])
|
|
372
|
+
i += 2
|
|
373
|
+
else:
|
|
374
|
+
print("Error: --library-path requires a path argument")
|
|
375
|
+
sys.exit(1)
|
|
376
|
+
elif sys.argv[i] == '--label':
|
|
377
|
+
if i + 1 < len(sys.argv):
|
|
378
|
+
label = sys.argv[i + 1]
|
|
379
|
+
i += 2
|
|
380
|
+
else:
|
|
381
|
+
print("Error: --label requires a text argument")
|
|
382
|
+
sys.exit(1)
|
|
383
|
+
elif sys.argv[i] == '--use-edit-suffix':
|
|
384
|
+
use_edit_suffix = True
|
|
385
|
+
i += 1
|
|
386
|
+
elif sys.argv[i] == '--no-use-edit-suffix':
|
|
387
|
+
use_edit_suffix = False
|
|
388
|
+
i += 1
|
|
389
|
+
else:
|
|
390
|
+
print(f"Error: Unknown option: {sys.argv[i]}")
|
|
391
|
+
sys.exit(1)
|
|
392
|
+
|
|
393
|
+
# Validate inputs
|
|
394
|
+
if not diagram_path.exists():
|
|
395
|
+
print(f"Error: Diagram file not found: {diagram_path}")
|
|
396
|
+
sys.exit(1)
|
|
397
|
+
|
|
398
|
+
if not library_path.exists():
|
|
399
|
+
print(f"Error: Library path not found: {library_path}")
|
|
400
|
+
sys.exit(1)
|
|
401
|
+
|
|
402
|
+
try:
|
|
403
|
+
work_path, final_path = prepare_edit_path(diagram_path, use_edit_suffix)
|
|
404
|
+
add_icon_to_diagram(work_path, icon_name, x, y, library_path, label)
|
|
405
|
+
finalize_edit_path(work_path, final_path)
|
|
406
|
+
except Exception as e:
|
|
407
|
+
print(f"Error: {e}")
|
|
408
|
+
sys.exit(1)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
if __name__ == '__main__':
|
|
412
|
+
main()
|
package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Excalidraw Library Splitter
|
|
4
|
+
|
|
5
|
+
This script splits an Excalidraw library file (*.excalidrawlib) into individual
|
|
6
|
+
icon JSON files and generates a reference.md file for easy lookup.
|
|
7
|
+
|
|
8
|
+
The script expects the following structure:
|
|
9
|
+
<path-to-library-directory>/
|
|
10
|
+
<library-name>.excalidrawlib (place this file first)
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
python split-excalidraw-library.py <path-to-library-directory>
|
|
14
|
+
|
|
15
|
+
Example:
|
|
16
|
+
python split-excalidraw-library.py path/to/libraries/aws-architecture-icons/
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import re
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def sanitize_filename(name: str) -> str:
|
|
27
|
+
"""
|
|
28
|
+
Sanitize icon name to create a valid filename.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
name: Original icon name
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
Sanitized filename safe for all platforms
|
|
35
|
+
"""
|
|
36
|
+
# Replace spaces with hyphens
|
|
37
|
+
filename = name.replace(' ', '-')
|
|
38
|
+
|
|
39
|
+
# Remove or replace special characters
|
|
40
|
+
filename = re.sub(r'[^\w\-.]', '', filename)
|
|
41
|
+
|
|
42
|
+
# Remove multiple consecutive hyphens
|
|
43
|
+
filename = re.sub(r'-+', '-', filename)
|
|
44
|
+
|
|
45
|
+
# Remove leading/trailing hyphens
|
|
46
|
+
filename = filename.strip('-')
|
|
47
|
+
|
|
48
|
+
return filename
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def find_library_file(directory: Path) -> Path:
|
|
52
|
+
"""
|
|
53
|
+
Find the .excalidrawlib file in the given directory.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
directory: Directory to search
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Path to the library file
|
|
60
|
+
|
|
61
|
+
Raises:
|
|
62
|
+
SystemExit: If no library file or multiple library files found
|
|
63
|
+
"""
|
|
64
|
+
library_files = list(directory.glob('*.excalidrawlib'))
|
|
65
|
+
|
|
66
|
+
if len(library_files) == 0:
|
|
67
|
+
print(f"Error: No .excalidrawlib file found in {directory}")
|
|
68
|
+
print(f"Please place a .excalidrawlib file in {directory} first.")
|
|
69
|
+
sys.exit(1)
|
|
70
|
+
|
|
71
|
+
if len(library_files) > 1:
|
|
72
|
+
print(f"Error: Multiple .excalidrawlib files found in {directory}")
|
|
73
|
+
print(f"Please keep only one library file in {directory}.")
|
|
74
|
+
sys.exit(1)
|
|
75
|
+
|
|
76
|
+
return library_files[0]
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def split_library(library_dir: str) -> None:
|
|
80
|
+
"""
|
|
81
|
+
Split an Excalidraw library file into individual icon files.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
library_dir: Path to the directory containing the .excalidrawlib file
|
|
85
|
+
"""
|
|
86
|
+
library_dir = Path(library_dir)
|
|
87
|
+
|
|
88
|
+
if not library_dir.exists():
|
|
89
|
+
print(f"Error: Directory not found: {library_dir}")
|
|
90
|
+
sys.exit(1)
|
|
91
|
+
|
|
92
|
+
if not library_dir.is_dir():
|
|
93
|
+
print(f"Error: Path is not a directory: {library_dir}")
|
|
94
|
+
sys.exit(1)
|
|
95
|
+
|
|
96
|
+
# Find the library file
|
|
97
|
+
library_path = find_library_file(library_dir)
|
|
98
|
+
print(f"Found library: {library_path.name}")
|
|
99
|
+
|
|
100
|
+
# Load library file
|
|
101
|
+
print(f"Loading library data...")
|
|
102
|
+
with open(library_path, 'r', encoding='utf-8') as f:
|
|
103
|
+
library_data = json.load(f)
|
|
104
|
+
|
|
105
|
+
# Validate library structure
|
|
106
|
+
if 'libraryItems' not in library_data:
|
|
107
|
+
print("Error: Invalid library file format (missing 'libraryItems')")
|
|
108
|
+
sys.exit(1)
|
|
109
|
+
|
|
110
|
+
# Create icons directory
|
|
111
|
+
icons_dir = library_dir / 'icons'
|
|
112
|
+
icons_dir.mkdir(exist_ok=True)
|
|
113
|
+
print(f"Output directory: {library_dir}")
|
|
114
|
+
|
|
115
|
+
# Process each library item (icon)
|
|
116
|
+
library_items = library_data['libraryItems']
|
|
117
|
+
icon_list = []
|
|
118
|
+
|
|
119
|
+
print(f"Processing {len(library_items)} icons...")
|
|
120
|
+
|
|
121
|
+
for item in library_items:
|
|
122
|
+
# Get icon name
|
|
123
|
+
icon_name = item.get('name', 'Unnamed')
|
|
124
|
+
|
|
125
|
+
# Create sanitized filename
|
|
126
|
+
filename = sanitize_filename(icon_name) + '.json'
|
|
127
|
+
|
|
128
|
+
# Save icon data
|
|
129
|
+
icon_path = icons_dir / filename
|
|
130
|
+
with open(icon_path, 'w', encoding='utf-8') as f:
|
|
131
|
+
json.dump(item, f, ensure_ascii=False, indent=2)
|
|
132
|
+
|
|
133
|
+
# Add to reference list
|
|
134
|
+
icon_list.append({
|
|
135
|
+
'name': icon_name,
|
|
136
|
+
'filename': filename
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
print(f" ✓ {icon_name} → {filename}")
|
|
140
|
+
|
|
141
|
+
# Sort icon list by name
|
|
142
|
+
icon_list.sort(key=lambda x: x['name'])
|
|
143
|
+
|
|
144
|
+
# Generate reference.md
|
|
145
|
+
library_name = library_path.stem
|
|
146
|
+
reference_path = library_dir / 'reference.md'
|
|
147
|
+
with open(reference_path, 'w', encoding='utf-8') as f:
|
|
148
|
+
f.write(f"# {library_name} Reference\n\n")
|
|
149
|
+
f.write(f"This directory contains {len(icon_list)} icons extracted from `{library_path.name}`.\n\n")
|
|
150
|
+
f.write("## Available Icons\n\n")
|
|
151
|
+
f.write("| Icon Name | Filename |\n")
|
|
152
|
+
f.write("|-----------|----------|\n")
|
|
153
|
+
|
|
154
|
+
for icon in icon_list:
|
|
155
|
+
f.write(f"| {icon['name']} | `icons/{icon['filename']}` |\n")
|
|
156
|
+
|
|
157
|
+
f.write("\n## Usage\n\n")
|
|
158
|
+
f.write("Each icon JSON file contains the complete `elements` array needed to render that icon in Excalidraw.\n")
|
|
159
|
+
f.write("You can copy the elements from these files into your Excalidraw diagrams.\n")
|
|
160
|
+
|
|
161
|
+
print(f"\n✅ Successfully split library into {len(icon_list)} icons")
|
|
162
|
+
print(f"📄 Reference file created: {reference_path}")
|
|
163
|
+
print(f"📁 Icons directory: {icons_dir}")
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def main():
|
|
167
|
+
"""Main entry point."""
|
|
168
|
+
if hasattr(sys.stdout, "reconfigure"):
|
|
169
|
+
# Ensure consistent UTF-8 output on Windows consoles.
|
|
170
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
171
|
+
if len(sys.argv) != 2:
|
|
172
|
+
print("Usage: python split-excalidraw-library.py <path-to-library-directory>")
|
|
173
|
+
print("\nExample:")
|
|
174
|
+
print(" python split-excalidraw-library.py path/to/libraries/aws-architecture-icons/")
|
|
175
|
+
print("\nNote: The directory should contain a .excalidrawlib file.")
|
|
176
|
+
sys.exit(1)
|
|
177
|
+
|
|
178
|
+
library_dir = sys.argv[1]
|
|
179
|
+
split_library(library_dir)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
if __name__ == '__main__':
|
|
183
|
+
main()
|