@caddis/cli 0.0.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/LICENSE +21 -0
- package/README.md +163 -1
- package/bundles/antigravity-plugin/agents/code-reviewer.md +47 -0
- package/bundles/antigravity-plugin/agents/preflight.md +53 -0
- package/bundles/antigravity-plugin/guard_agy.py +338 -0
- package/bundles/antigravity-plugin/hooks.json +36 -0
- package/bundles/antigravity-plugin/mcp_config.json +8 -0
- package/bundles/antigravity-plugin/mcp_ping_server.py +55 -0
- package/bundles/antigravity-plugin/plugin.json +5 -0
- package/bundles/antigravity-plugin/session_end_agy.py +57 -0
- package/bundles/antigravity-plugin/skills/_registry.md +115 -0
- package/bundles/antigravity-plugin/skills/add-rules/SKILL.md +45 -0
- package/bundles/antigravity-plugin/skills/api-design/SKILL.md +249 -0
- package/bundles/antigravity-plugin/skills/backend-development/SKILL.md +305 -0
- package/bundles/antigravity-plugin/skills/best-practices/SKILL.md +500 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/best-practices-referencer.md +263 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/codebase-context-builder.md +326 -0
- package/bundles/antigravity-plugin/skills/best-practices/agents/task-intent-analyzer.md +245 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/anti-patterns.md +571 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/before-after-examples.md +1114 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/best-practices-guide.md +513 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/common-workflows.md +692 -0
- package/bundles/antigravity-plugin/skills/best-practices/references/prompt-patterns.md +547 -0
- package/bundles/antigravity-plugin/skills/brainstorming/SKILL.md +57 -0
- package/bundles/antigravity-plugin/skills/ci-cd-pipeline/SKILL.md +315 -0
- package/bundles/antigravity-plugin/skills/code-documentation/SKILL.md +271 -0
- package/bundles/antigravity-plugin/skills/code-review/SKILL.md +122 -0
- package/bundles/antigravity-plugin/skills/codebase-audit/SKILL.md +204 -0
- package/bundles/antigravity-plugin/skills/context-curator/SKILL.md +157 -0
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +40 -0
- package/bundles/antigravity-plugin/skills/css-architecture/SKILL.md +305 -0
- package/bundles/antigravity-plugin/skills/css-architecture/references/RESPONSIVE-DESIGN.md +604 -0
- package/bundles/antigravity-plugin/skills/database-design/SKILL.md +177 -0
- package/bundles/antigravity-plugin/skills/db-diagram/SKILL.md +148 -0
- package/bundles/antigravity-plugin/skills/db-diagram/scripts/sql_to_graph.py +1212 -0
- package/bundles/antigravity-plugin/skills/digress/SKILL.md +61 -0
- package/bundles/antigravity-plugin/skills/draw-io/SKILL.md +162 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/aws-icons.md +677 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/layout-guidelines.md +142 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/troubleshooting.md +118 -0
- package/bundles/antigravity-plugin/skills/draw-io/references/workflows.md +103 -0
- package/bundles/antigravity-plugin/skills/draw-io/scripts/convert-drawio-to-png.sh +25 -0
- package/bundles/antigravity-plugin/skills/draw-io/scripts/find_aws_icon.py +79 -0
- package/bundles/antigravity-plugin/skills/error-handling/SKILL.md +260 -0
- package/bundles/antigravity-plugin/skills/excalidraw-db/SKILL.md +38 -0
- package/bundles/antigravity-plugin/skills/fastapi-dev/SKILL.md +300 -0
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +198 -0
- package/bundles/antigravity-plugin/skills/frontend-design/SKILL.md +193 -0
- package/bundles/antigravity-plugin/skills/frontend-design/references/my-tech-stack.md +127 -0
- package/bundles/antigravity-plugin/skills/gh-cli/SKILL.md +195 -0
- package/bundles/antigravity-plugin/skills/git-commit/SKILL.md +285 -0
- package/bundles/antigravity-plugin/skills/golden-plan/SKILL.md +577 -0
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +100 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +114 -0
- package/bundles/antigravity-plugin/skills/javascript-typescript/SKILL.md +142 -0
- package/bundles/antigravity-plugin/skills/kb/SKILL.md +60 -0
- package/bundles/antigravity-plugin/skills/mermaid-db/SKILL.md +33 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/SKILL.md +236 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/ENHANCEMENTS.md +264 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/MERMAID-SUMMARY.md +137 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/advanced-features.md +556 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/architecture-diagrams.md +192 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/c4-diagrams.md +410 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/class-diagrams.md +361 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/erd-diagrams.md +510 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/flowcharts.md +450 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/sequence-diagrams.md +394 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/troubleshooting.md +335 -0
- package/bundles/antigravity-plugin/skills/mermaid-diagrams/references/workflows.md +418 -0
- package/bundles/antigravity-plugin/skills/migrate-dir/SKILL.md +68 -0
- package/bundles/antigravity-plugin/skills/mockup/SKILL.md +242 -0
- package/bundles/antigravity-plugin/skills/particle-art/SKILL.md +243 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/canvas-utils.ts +171 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/dot-field.template.tsx +203 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/flow-field.template.tsx +263 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/node-shape.template.tsx +261 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/shape-sampler.ts +281 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/stipple-morph.template.tsx +167 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/stipple.template.tsx +175 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/trail-ghost.template.tsx +266 -0
- package/bundles/antigravity-plugin/skills/particle-art/references/usage-examples.md +320 -0
- package/bundles/antigravity-plugin/skills/playwright/API_REFERENCE.md +653 -0
- package/bundles/antigravity-plugin/skills/playwright/SKILL.md +454 -0
- package/bundles/antigravity-plugin/skills/playwright/lib/helpers.js +441 -0
- package/bundles/antigravity-plugin/skills/playwright/package.json +26 -0
- package/bundles/antigravity-plugin/skills/playwright/run.js +228 -0
- package/bundles/antigravity-plugin/skills/prd/SKILL.md +107 -0
- package/bundles/antigravity-plugin/skills/preflight/SKILL.md +435 -0
- package/bundles/antigravity-plugin/skills/python/SKILL.md +388 -0
- package/bundles/antigravity-plugin/skills/react-best-practices/SKILL.md +269 -0
- package/bundles/antigravity-plugin/skills/react-dev/README.md +404 -0
- package/bundles/antigravity-plugin/skills/react-dev/SKILL.md +459 -0
- package/bundles/antigravity-plugin/skills/react-dev/examples/generic-components.md +579 -0
- package/bundles/antigravity-plugin/skills/react-dev/examples/server-components.md +579 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/event-handlers.md +574 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/hooks.md +456 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/react-19-patterns.md +638 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/react-router.md +1002 -0
- package/bundles/antigravity-plugin/skills/react-dev/references/tanstack-router.md +587 -0
- package/bundles/antigravity-plugin/skills/refactoring/SKILL.md +486 -0
- package/bundles/antigravity-plugin/skills/resume/SKILL.md +36 -0
- package/bundles/antigravity-plugin/skills/security-review/SKILL.md +196 -0
- package/bundles/antigravity-plugin/skills/setup-project-ai/SKILL.md +61 -0
- package/bundles/antigravity-plugin/skills/ship/SKILL.md +107 -0
- package/bundles/antigravity-plugin/skills/ship-merge/SKILL.md +103 -0
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +102 -0
- package/bundles/antigravity-plugin/skills/skill-creator/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin/skills/skill-creator/SKILL.md +491 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/analyzer.md +274 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/comparator.md +202 -0
- package/bundles/antigravity-plugin/skills/skill-creator/agents/grader.md +223 -0
- package/bundles/antigravity-plugin/skills/skill-creator/assets/eval_review.html +146 -0
- package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundles/antigravity-plugin/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundles/antigravity-plugin/skills/skill-creator/references/schemas.md +430 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/__init__.py +0 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/generate_report.py +326 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/improve_description.py +247 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/package_skill.py +136 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_eval.py +310 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/run_loop.py +328 -0
- package/bundles/antigravity-plugin/skills/skill-creator/scripts/utils.py +47 -0
- package/bundles/antigravity-plugin/skills/sql/SKILL.md +321 -0
- package/bundles/antigravity-plugin/skills/tdd/SKILL.md +37 -0
- package/bundles/antigravity-plugin/skills/tdd-workflow/SKILL.md +188 -0
- package/bundles/antigravity-plugin/skills/technical-writing/SKILL.md +286 -0
- package/bundles/antigravity-plugin/skills/test-strategy/SKILL.md +155 -0
- package/bundles/antigravity-plugin/skills/ui-brief/SKILL.md +84 -0
- package/bundles/antigravity-plugin/skills/ui-review/SKILL.md +176 -0
- package/bundles/antigravity-plugin/skills/ui-review/references/framework-fixes.md +471 -0
- package/bundles/antigravity-plugin/skills/ui-review/references/visual-checklist.md +236 -0
- package/bundles/antigravity-plugin/skills/usage-review/SKILL.md +77 -0
- package/bundles/antigravity-plugin/skills/use-model/SKILL.md +64 -0
- package/bundles/antigravity-plugin/skills/using-git-worktrees/SKILL.md +217 -0
- package/bundles/antigravity-plugin/skills/version/SKILL.md +18 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/DESIGN_TOKENS.md +487 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/IMPLEMENTATION_GUIDE.md +177 -0
- package/bundles/antigravity-plugin/skills/warm-editorial-ui/SKILL.md +732 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/SKILL.md +97 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/console_logging.py +35 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/bundles/antigravity-plugin/skills/webapp-testing/scripts/with_server.py +106 -0
- package/bundles/antigravity-plugin/skills/windows-deployment/SKILL.md +880 -0
- package/bundles/antigravity-plugin/skills/writing-plans/SKILL.md +384 -0
- package/bundles/antigravity-plugin/statusline-command-agy.sh +91 -0
- package/bundles/antigravity-plugin/warm_start_agy.py +149 -0
- 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 +7 -0
- package/dist/cli.js +5492 -0
- package/package.json +61 -4
|
@@ -0,0 +1,1002 @@
|
|
|
1
|
+
# React Router v7 - Comprehensive Reference Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
React Router is a modern routing library that provides flexible client-side and server-side routing for React applications. It offers two primary modes of operation: Framework Mode and Data Mode, with first-class TypeScript support through automatic type generation.
|
|
6
|
+
|
|
7
|
+
## Installation and Setup
|
|
8
|
+
|
|
9
|
+
### Basic Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install react-router
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### TypeScript Configuration
|
|
16
|
+
|
|
17
|
+
React Router generates type-specific files for each route. Configure your `tsconfig.json`:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"include": [".react-router/types/**/*"],
|
|
22
|
+
"compilerOptions": {
|
|
23
|
+
"rootDirs": [".", "./.react-router/types"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Add `.react-router/` to `.gitignore`:
|
|
29
|
+
|
|
30
|
+
```txt
|
|
31
|
+
.react-router/
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Extending AppLoadContext
|
|
35
|
+
|
|
36
|
+
Define your app's context type in a `.ts` or `.d.ts` file:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import "react-router";
|
|
40
|
+
|
|
41
|
+
declare module "react-router" {
|
|
42
|
+
interface AppLoadContext {
|
|
43
|
+
// add context properties here
|
|
44
|
+
apiClient?: APIClient;
|
|
45
|
+
userId?: string;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Route Definition Patterns
|
|
51
|
+
|
|
52
|
+
### Basic Route Configuration
|
|
53
|
+
|
|
54
|
+
Routes are defined as objects passed to `createBrowserRouter`:
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { createBrowserRouter } from "react-router";
|
|
58
|
+
|
|
59
|
+
const router = createBrowserRouter([
|
|
60
|
+
{
|
|
61
|
+
path: "/",
|
|
62
|
+
Component: Root
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
path: "/about",
|
|
66
|
+
Component: About
|
|
67
|
+
},
|
|
68
|
+
]);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Nested Routes
|
|
72
|
+
|
|
73
|
+
Child routes are rendered through an `<Outlet/>` in the parent component:
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
createBrowserRouter([
|
|
77
|
+
{
|
|
78
|
+
path: "/dashboard",
|
|
79
|
+
Component: Dashboard,
|
|
80
|
+
children: [
|
|
81
|
+
{ index: true, Component: DashboardHome },
|
|
82
|
+
{ path: "settings", Component: Settings },
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
]);
|
|
86
|
+
|
|
87
|
+
function Dashboard() {
|
|
88
|
+
return (
|
|
89
|
+
<div>
|
|
90
|
+
<h1>Dashboard</h1>
|
|
91
|
+
<Outlet /> {/* Renders child route */}
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Layout Routes (No Path)
|
|
98
|
+
|
|
99
|
+
Create layout containers without adding URL segments:
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
createBrowserRouter([
|
|
103
|
+
{
|
|
104
|
+
// no path - just a layout
|
|
105
|
+
Component: MarketingLayout,
|
|
106
|
+
children: [
|
|
107
|
+
{ index: true, Component: Home },
|
|
108
|
+
{ path: "contact", Component: Contact },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
]);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Index Routes
|
|
115
|
+
|
|
116
|
+
Define default routes at a path:
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
createBrowserRouter([
|
|
120
|
+
{
|
|
121
|
+
path: "/",
|
|
122
|
+
Component: Root,
|
|
123
|
+
children: [
|
|
124
|
+
{ index: true, Component: Home }, // renders at "/"
|
|
125
|
+
{ path: "about", Component: About },
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
]);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Dynamic Segments
|
|
132
|
+
|
|
133
|
+
Use colons to define dynamic parameters:
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
{
|
|
137
|
+
path: "teams/:teamId",
|
|
138
|
+
loader: async ({ params }) => {
|
|
139
|
+
return await fetchTeam(params.teamId);
|
|
140
|
+
},
|
|
141
|
+
Component: Team,
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Multiple dynamic segments:
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
{
|
|
149
|
+
path: "posts/:postId/comments/:commentId",
|
|
150
|
+
// params.postId and params.commentId available
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Optional Segments
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
{
|
|
158
|
+
path: ":lang?/categories" // lang is optional
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Splat Routes (Catchall)
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
{
|
|
166
|
+
path: "files/*",
|
|
167
|
+
loader: async ({ params }) => {
|
|
168
|
+
const splat = params["*"]; // remaining URL after "files/"
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## TypeScript Typing
|
|
174
|
+
|
|
175
|
+
### Route Type Imports
|
|
176
|
+
|
|
177
|
+
In Framework Mode, import route-specific types from the generated `+types` directory:
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
import type { Route } from "./+types/product";
|
|
181
|
+
|
|
182
|
+
export async function loader({ params }: Route.LoaderArgs) {
|
|
183
|
+
// params is typed as { id: string }
|
|
184
|
+
return { planet: `world #${params.id}` };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export default function Product({
|
|
188
|
+
loaderData, // typed from loader
|
|
189
|
+
}: Route.ComponentProps) {
|
|
190
|
+
return <h1>{loaderData.planet}</h1>;
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Generated Types
|
|
195
|
+
|
|
196
|
+
React Router generates these types for each route:
|
|
197
|
+
|
|
198
|
+
- `Route.LoaderArgs` - Loader function arguments
|
|
199
|
+
- `Route.ClientLoaderArgs` - Client loader arguments
|
|
200
|
+
- `Route.ActionArgs` - Action function arguments
|
|
201
|
+
- `Route.ClientActionArgs` - Client action arguments
|
|
202
|
+
- `Route.ComponentProps` - Props for default export
|
|
203
|
+
- `Route.ErrorBoundaryProps` - Props for ErrorBoundary
|
|
204
|
+
- `Route.HydrateFallbackProps` - Props for HydrateFallback
|
|
205
|
+
|
|
206
|
+
### Manual Loader Data Typing
|
|
207
|
+
|
|
208
|
+
In Data Mode, type loader data manually:
|
|
209
|
+
|
|
210
|
+
```tsx
|
|
211
|
+
export async function loader() {
|
|
212
|
+
return { invoices: await getInvoices() };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export default function Invoices() {
|
|
216
|
+
const data = useLoaderData<typeof loader>();
|
|
217
|
+
// data is typed as { invoices: ... }
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Action Data Typing
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
export async function action({ request }: Route.ActionArgs) {
|
|
225
|
+
const formData = await request.formData();
|
|
226
|
+
return { message: `Hello, ${formData.get("name")}` };
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export default function Form() {
|
|
230
|
+
const actionData = useActionData<typeof action>();
|
|
231
|
+
// actionData is typed correctly
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Data Loading with Loaders
|
|
236
|
+
|
|
237
|
+
### Basic Loader Pattern
|
|
238
|
+
|
|
239
|
+
Loaders provide data to route components before rendering:
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
createBrowserRouter([
|
|
243
|
+
{
|
|
244
|
+
path: "/posts/:postId",
|
|
245
|
+
loader: async ({ params }) => {
|
|
246
|
+
const post = await fetchPost(params.postId);
|
|
247
|
+
return { post };
|
|
248
|
+
},
|
|
249
|
+
Component: Post,
|
|
250
|
+
},
|
|
251
|
+
]);
|
|
252
|
+
|
|
253
|
+
function Post() {
|
|
254
|
+
const { post } = useLoaderData();
|
|
255
|
+
return <h1>{post.title}</h1>;
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Loader Arguments
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
type LoaderFunctionArgs = {
|
|
263
|
+
params: Params; // URL parameters
|
|
264
|
+
request: Request; // fetch API Request
|
|
265
|
+
context?: AppLoadContext; // shared context
|
|
266
|
+
};
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Error Handling in Loaders
|
|
270
|
+
|
|
271
|
+
Throw errors with `data()` function for client-side error boundaries:
|
|
272
|
+
|
|
273
|
+
```tsx
|
|
274
|
+
import { data } from "react-router";
|
|
275
|
+
|
|
276
|
+
export async function loader({ params }: Route.LoaderArgs) {
|
|
277
|
+
const record = await fakeDb.getRecord(params.id);
|
|
278
|
+
|
|
279
|
+
if (!record) {
|
|
280
|
+
throw data("Record Not Found", { status: 404 });
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
return record;
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Revalidation Control
|
|
288
|
+
|
|
289
|
+
Control when loaders rerun:
|
|
290
|
+
|
|
291
|
+
```tsx
|
|
292
|
+
export const shouldRevalidate: ShouldRevalidateFunctionArgs = (args) => {
|
|
293
|
+
// Return true to revalidate, false to skip
|
|
294
|
+
// Default: true when params change or after successful action
|
|
295
|
+
return true;
|
|
296
|
+
};
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Lazy Loading
|
|
300
|
+
|
|
301
|
+
Load components and loaders on-demand:
|
|
302
|
+
|
|
303
|
+
```tsx
|
|
304
|
+
{
|
|
305
|
+
path: "/app",
|
|
306
|
+
lazy: async () => {
|
|
307
|
+
const { Component, loader } = await import("./app");
|
|
308
|
+
return { Component, loader };
|
|
309
|
+
},
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Actions and Form Handling
|
|
314
|
+
|
|
315
|
+
### Basic Action Pattern
|
|
316
|
+
|
|
317
|
+
Actions handle form submissions and mutations:
|
|
318
|
+
|
|
319
|
+
```tsx
|
|
320
|
+
createBrowserRouter([
|
|
321
|
+
{
|
|
322
|
+
path: "/projects",
|
|
323
|
+
action: async ({ request }) => {
|
|
324
|
+
const formData = await request.formData();
|
|
325
|
+
const title = formData.get("title");
|
|
326
|
+
const project = await createProject({ title });
|
|
327
|
+
return project; // data available via useActionData
|
|
328
|
+
},
|
|
329
|
+
Component: Projects,
|
|
330
|
+
},
|
|
331
|
+
]);
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Form Submission Methods
|
|
335
|
+
|
|
336
|
+
#### Using `<Form>` Component
|
|
337
|
+
|
|
338
|
+
Causes navigation and adds history entry:
|
|
339
|
+
|
|
340
|
+
```tsx
|
|
341
|
+
import { Form } from "react-router";
|
|
342
|
+
|
|
343
|
+
export default function CreateEvent() {
|
|
344
|
+
return (
|
|
345
|
+
<Form action="/events" method="post">
|
|
346
|
+
<input type="text" name="title" />
|
|
347
|
+
<button type="submit">Create</button>
|
|
348
|
+
</Form>
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
#### Using `useSubmit` Hook
|
|
354
|
+
|
|
355
|
+
Imperative form submission:
|
|
356
|
+
|
|
357
|
+
```tsx
|
|
358
|
+
import { useSubmit } from "react-router";
|
|
359
|
+
|
|
360
|
+
export default function Timer() {
|
|
361
|
+
const submit = useSubmit();
|
|
362
|
+
|
|
363
|
+
const handleTimeout = () => {
|
|
364
|
+
submit(
|
|
365
|
+
{ quizTimedOut: true },
|
|
366
|
+
{ action: "/end-quiz", method: "post" }
|
|
367
|
+
);
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
return <div>{/* ... */}</div>;
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
#### Using `useFetcher` Hook
|
|
375
|
+
|
|
376
|
+
Submit without navigation (no history entry):
|
|
377
|
+
|
|
378
|
+
```tsx
|
|
379
|
+
import { useFetcher } from "react-router";
|
|
380
|
+
|
|
381
|
+
export default function Task() {
|
|
382
|
+
const fetcher = useFetcher();
|
|
383
|
+
|
|
384
|
+
return (
|
|
385
|
+
<fetcher.Form method="post" action="/update-task/123">
|
|
386
|
+
<input type="text" name="title" />
|
|
387
|
+
<button type="submit">Save</button>
|
|
388
|
+
</fetcher.Form>
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Form Validation
|
|
394
|
+
|
|
395
|
+
Return errors with non-2xx status codes:
|
|
396
|
+
|
|
397
|
+
```tsx
|
|
398
|
+
export async function action({ request }: Route.ActionArgs) {
|
|
399
|
+
const formData = await request.formData();
|
|
400
|
+
const email = String(formData.get("email"));
|
|
401
|
+
|
|
402
|
+
const errors: Record<string, string> = {};
|
|
403
|
+
|
|
404
|
+
if (!email.includes("@")) {
|
|
405
|
+
errors.email = "Invalid email";
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (Object.keys(errors).length > 0) {
|
|
409
|
+
return data({ errors }, { status: 400 }); // Don't revalidate
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
await createUser({ email });
|
|
413
|
+
return redirect("/dashboard");
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export default function Signup() {
|
|
417
|
+
const fetcher = useFetcher();
|
|
418
|
+
const errors = fetcher.data?.errors;
|
|
419
|
+
|
|
420
|
+
return (
|
|
421
|
+
<fetcher.Form method="post">
|
|
422
|
+
<input name="email" />
|
|
423
|
+
{errors?.email && <span>{errors.email}</span>}
|
|
424
|
+
<button>Sign Up</button>
|
|
425
|
+
</fetcher.Form>
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Accessing Action Data
|
|
431
|
+
|
|
432
|
+
```tsx
|
|
433
|
+
import { useActionData } from "react-router";
|
|
434
|
+
|
|
435
|
+
export default function Project() {
|
|
436
|
+
const actionData = useActionData<typeof action>();
|
|
437
|
+
|
|
438
|
+
return (
|
|
439
|
+
<div>
|
|
440
|
+
<Form method="post">
|
|
441
|
+
{/* form fields */}
|
|
442
|
+
</Form>
|
|
443
|
+
{actionData && <p>Success: {actionData.message}</p>}
|
|
444
|
+
</div>
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
## Navigation Patterns
|
|
450
|
+
|
|
451
|
+
### Link Component
|
|
452
|
+
|
|
453
|
+
For client-side navigation without active styling:
|
|
454
|
+
|
|
455
|
+
```tsx
|
|
456
|
+
import { Link } from "react-router";
|
|
457
|
+
|
|
458
|
+
<Link to="/dashboard">Dashboard</Link>
|
|
459
|
+
|
|
460
|
+
<Link to={{
|
|
461
|
+
pathname: "/search",
|
|
462
|
+
search: "?q=react",
|
|
463
|
+
hash: "#results"
|
|
464
|
+
}}>
|
|
465
|
+
Search
|
|
466
|
+
</Link>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### NavLink Component
|
|
470
|
+
|
|
471
|
+
For navigation with active/pending states:
|
|
472
|
+
|
|
473
|
+
```tsx
|
|
474
|
+
import { NavLink } from "react-router";
|
|
475
|
+
|
|
476
|
+
<NavLink to="/messages">
|
|
477
|
+
{({ isActive, isPending }) => (
|
|
478
|
+
<span className={isActive ? "active" : ""}>
|
|
479
|
+
Messages
|
|
480
|
+
</span>
|
|
481
|
+
)}
|
|
482
|
+
</NavLink>
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Programmatic Navigation
|
|
486
|
+
|
|
487
|
+
```tsx
|
|
488
|
+
import { useNavigate } from "react-router";
|
|
489
|
+
|
|
490
|
+
export default function LogoutButton() {
|
|
491
|
+
const navigate = useNavigate();
|
|
492
|
+
|
|
493
|
+
return (
|
|
494
|
+
<button onClick={() => navigate("/")}>
|
|
495
|
+
Go Home
|
|
496
|
+
</button>
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Navigate Options
|
|
502
|
+
|
|
503
|
+
```tsx
|
|
504
|
+
navigate("/path", {
|
|
505
|
+
replace: true, // Don't add to history
|
|
506
|
+
state: { from: "/" }, // Pass state
|
|
507
|
+
relative: "route", // Or "path"
|
|
508
|
+
preventScrollReset: true, // Don't scroll to top
|
|
509
|
+
viewTransition: true, // Enable view transition
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
navigate(-1); // Go back
|
|
513
|
+
navigate(1); // Go forward
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Redirect in Loaders/Actions
|
|
517
|
+
|
|
518
|
+
```tsx
|
|
519
|
+
import { redirect } from "react-router";
|
|
520
|
+
|
|
521
|
+
export async function loader({ request }: Route.LoaderArgs) {
|
|
522
|
+
const user = await getUser(request);
|
|
523
|
+
if (!user) {
|
|
524
|
+
return redirect("/login");
|
|
525
|
+
}
|
|
526
|
+
return { user };
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export async function action() {
|
|
530
|
+
const project = await createProject();
|
|
531
|
+
return redirect(`/projects/${project.id}`);
|
|
532
|
+
}
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
## URL Parameters and Search Params
|
|
536
|
+
|
|
537
|
+
### Route Parameters
|
|
538
|
+
|
|
539
|
+
Access dynamic route parameters:
|
|
540
|
+
|
|
541
|
+
```tsx
|
|
542
|
+
import { useParams } from "react-router";
|
|
543
|
+
|
|
544
|
+
export default function Post() {
|
|
545
|
+
const params = useParams<{ postId: string }>();
|
|
546
|
+
// params.postId is typed as string
|
|
547
|
+
|
|
548
|
+
return <h1>Post: {params.postId}</h1>;
|
|
549
|
+
}
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
### Search Parameters
|
|
553
|
+
|
|
554
|
+
Handle query strings:
|
|
555
|
+
|
|
556
|
+
```tsx
|
|
557
|
+
import { useSearchParams } from "react-router";
|
|
558
|
+
|
|
559
|
+
export default function Search() {
|
|
560
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
561
|
+
|
|
562
|
+
const query = searchParams.get("q");
|
|
563
|
+
const page = searchParams.get("page") || "1";
|
|
564
|
+
|
|
565
|
+
return (
|
|
566
|
+
<div>
|
|
567
|
+
<input value={query} />
|
|
568
|
+
<button onClick={() => setSearchParams({ q: "react" })}>
|
|
569
|
+
Search
|
|
570
|
+
</button>
|
|
571
|
+
</div>
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
### Setting Search Params
|
|
577
|
+
|
|
578
|
+
```tsx
|
|
579
|
+
// String
|
|
580
|
+
setSearchParams("?tab=1");
|
|
581
|
+
|
|
582
|
+
// Object
|
|
583
|
+
setSearchParams({ tab: "1" });
|
|
584
|
+
|
|
585
|
+
// Multiple values
|
|
586
|
+
setSearchParams({ brand: ["nike", "reebok"] });
|
|
587
|
+
|
|
588
|
+
// Callback
|
|
589
|
+
setSearchParams((prev) => {
|
|
590
|
+
prev.set("tab", "2");
|
|
591
|
+
return prev;
|
|
592
|
+
});
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
## Error Handling
|
|
596
|
+
|
|
597
|
+
### Framework Mode Error Boundaries
|
|
598
|
+
|
|
599
|
+
```tsx
|
|
600
|
+
import { Route } from "./+types/root";
|
|
601
|
+
import { isRouteErrorResponse } from "react-router";
|
|
602
|
+
|
|
603
|
+
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
|
604
|
+
if (isRouteErrorResponse(error)) {
|
|
605
|
+
return (
|
|
606
|
+
<div>
|
|
607
|
+
<h1>{error.status} {error.statusText}</h1>
|
|
608
|
+
<p>{error.data}</p>
|
|
609
|
+
</div>
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
if (error instanceof Error) {
|
|
614
|
+
return (
|
|
615
|
+
<div>
|
|
616
|
+
<h1>Error</h1>
|
|
617
|
+
<p>{error.message}</p>
|
|
618
|
+
</div>
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
return <h1>Unknown Error</h1>;
|
|
623
|
+
}
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### Data Mode Error Boundaries
|
|
627
|
+
|
|
628
|
+
```tsx
|
|
629
|
+
import { useRouteError, isRouteErrorResponse } from "react-router";
|
|
630
|
+
|
|
631
|
+
function RootErrorBoundary() {
|
|
632
|
+
const error = useRouteError();
|
|
633
|
+
|
|
634
|
+
if (isRouteErrorResponse(error)) {
|
|
635
|
+
return (
|
|
636
|
+
<div>
|
|
637
|
+
<h1>{error.status}</h1>
|
|
638
|
+
<p>{error.data}</p>
|
|
639
|
+
</div>
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
return <h1>Error</h1>;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
createBrowserRouter([
|
|
647
|
+
{
|
|
648
|
+
path: "/",
|
|
649
|
+
Component: Root,
|
|
650
|
+
ErrorBoundary: RootErrorBoundary,
|
|
651
|
+
},
|
|
652
|
+
]);
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
### Throwing Errors
|
|
656
|
+
|
|
657
|
+
Unintentional errors are caught:
|
|
658
|
+
|
|
659
|
+
```tsx
|
|
660
|
+
export async function loader() {
|
|
661
|
+
return undefined(); // Error thrown and caught
|
|
662
|
+
}
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
Intentional errors with status codes:
|
|
666
|
+
|
|
667
|
+
```tsx
|
|
668
|
+
import { data } from "react-router";
|
|
669
|
+
|
|
670
|
+
export async function loader({ params }: Route.LoaderArgs) {
|
|
671
|
+
const post = await getPost(params.id);
|
|
672
|
+
if (!post) {
|
|
673
|
+
throw data("Not Found", { status: 404 });
|
|
674
|
+
}
|
|
675
|
+
return post;
|
|
676
|
+
}
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
## Advanced Hooks
|
|
680
|
+
|
|
681
|
+
### useLoaderData
|
|
682
|
+
|
|
683
|
+
Get data from the route's loader:
|
|
684
|
+
|
|
685
|
+
```tsx
|
|
686
|
+
export default function Component() {
|
|
687
|
+
const data = useLoaderData<typeof loader>();
|
|
688
|
+
// fully typed
|
|
689
|
+
}
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
### useActionData
|
|
693
|
+
|
|
694
|
+
Get data from the last action submission:
|
|
695
|
+
|
|
696
|
+
```tsx
|
|
697
|
+
export default function Form() {
|
|
698
|
+
const actionData = useActionData<typeof action>();
|
|
699
|
+
return actionData ? <p>{actionData.message}</p> : null;
|
|
700
|
+
}
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### useFetcher
|
|
704
|
+
|
|
705
|
+
Independent data submission without navigation:
|
|
706
|
+
|
|
707
|
+
```tsx
|
|
708
|
+
const fetcher = useFetcher();
|
|
709
|
+
|
|
710
|
+
fetcher.state; // "idle" | "loading" | "submitting"
|
|
711
|
+
fetcher.data; // data from action/loader
|
|
712
|
+
fetcher.Form; // component for forms
|
|
713
|
+
fetcher.load(path); // load data
|
|
714
|
+
fetcher.submit(data, options); // submit data
|
|
715
|
+
fetcher.reset(); // reset state
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
Keyed fetchers (access from other components):
|
|
719
|
+
|
|
720
|
+
```tsx
|
|
721
|
+
const fetcher = useFetcher({ key: "my-fetcher" });
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
### useMatches
|
|
725
|
+
|
|
726
|
+
Get all active route matches:
|
|
727
|
+
|
|
728
|
+
```tsx
|
|
729
|
+
const matches = useMatches();
|
|
730
|
+
// Array of: { route, pathname, params, data, handle }
|
|
731
|
+
|
|
732
|
+
matches.forEach(match => {
|
|
733
|
+
console.log(match.data); // Loader data
|
|
734
|
+
console.log(match.handle); // Route handle metadata
|
|
735
|
+
});
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### useLocation
|
|
739
|
+
|
|
740
|
+
Get current location:
|
|
741
|
+
|
|
742
|
+
```tsx
|
|
743
|
+
const location = useLocation();
|
|
744
|
+
// {
|
|
745
|
+
// pathname: "/posts/123",
|
|
746
|
+
// search: "?tab=1",
|
|
747
|
+
// hash: "#section",
|
|
748
|
+
// state: { from: "/" }
|
|
749
|
+
// }
|
|
750
|
+
```
|
|
751
|
+
|
|
752
|
+
### useNavigation
|
|
753
|
+
|
|
754
|
+
Track navigation state:
|
|
755
|
+
|
|
756
|
+
```tsx
|
|
757
|
+
const navigation = useNavigation();
|
|
758
|
+
|
|
759
|
+
navigation.state; // "idle" | "loading" | "submitting"
|
|
760
|
+
navigation.location; // new location during navigation
|
|
761
|
+
navigation.formData; // form data being submitted
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
## Advanced Route Features
|
|
765
|
+
|
|
766
|
+
### Route Handle Property
|
|
767
|
+
|
|
768
|
+
Attach metadata to routes for use in ancestor components:
|
|
769
|
+
|
|
770
|
+
```tsx
|
|
771
|
+
// Route definition
|
|
772
|
+
export const handle = {
|
|
773
|
+
breadcrumb: () => <Link to="/posts">Posts</Link>,
|
|
774
|
+
icon: "📝",
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
// Access in ancestor
|
|
778
|
+
function Root() {
|
|
779
|
+
const matches = useMatches();
|
|
780
|
+
|
|
781
|
+
return (
|
|
782
|
+
<header>
|
|
783
|
+
{matches
|
|
784
|
+
.filter(m => m.handle?.breadcrumb)
|
|
785
|
+
.map(m => m.handle.breadcrumb())}
|
|
786
|
+
</header>
|
|
787
|
+
);
|
|
788
|
+
}
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
### Middleware
|
|
792
|
+
|
|
793
|
+
Run code before/after navigations:
|
|
794
|
+
|
|
795
|
+
```tsx
|
|
796
|
+
export async function middleware({ request }, next) {
|
|
797
|
+
console.log(`Starting: ${request.url}`);
|
|
798
|
+
await next();
|
|
799
|
+
console.log("Complete");
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
createBrowserRouter([
|
|
803
|
+
{
|
|
804
|
+
path: "/",
|
|
805
|
+
middleware: [middleware],
|
|
806
|
+
loader: rootLoader,
|
|
807
|
+
Component: Root,
|
|
808
|
+
},
|
|
809
|
+
]);
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
### Outlet Component
|
|
813
|
+
|
|
814
|
+
Render child routes:
|
|
815
|
+
|
|
816
|
+
```tsx
|
|
817
|
+
import { Outlet } from "react-router";
|
|
818
|
+
|
|
819
|
+
function Layout() {
|
|
820
|
+
return (
|
|
821
|
+
<div>
|
|
822
|
+
<nav>{/* navigation */}</nav>
|
|
823
|
+
<Outlet /> {/* Child routes render here */}
|
|
824
|
+
</div>
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
### OutletContext
|
|
830
|
+
|
|
831
|
+
Pass data to child routes via Outlet:
|
|
832
|
+
|
|
833
|
+
```tsx
|
|
834
|
+
// Parent
|
|
835
|
+
function Parent() {
|
|
836
|
+
return <Outlet context={{ user: { name: "John" } }} />;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// Child
|
|
840
|
+
import { useOutletContext } from "react-router";
|
|
841
|
+
|
|
842
|
+
function Child() {
|
|
843
|
+
const { user } = useOutletContext<{ user: User }>();
|
|
844
|
+
return <p>{user.name}</p>;
|
|
845
|
+
}
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
## Comparison with TanStack Router
|
|
849
|
+
|
|
850
|
+
### Type Safety Similarities
|
|
851
|
+
|
|
852
|
+
Both React Router v7 and TanStack Router offer first-class TypeScript support:
|
|
853
|
+
|
|
854
|
+
| Feature | React Router v7 | TanStack Router |
|
|
855
|
+
|---------|-----------------|-----------------|
|
|
856
|
+
| Route type generation | ✓ Automatic `.react-router/types/` | ✓ Automatic |
|
|
857
|
+
| Param typing | ✓ Auto-inferred from path | ✓ Auto-inferred |
|
|
858
|
+
| Loader data typing | ✓ Via `Route.LoaderArgs` | ✓ Via `loader()` return type |
|
|
859
|
+
| Action typing | ✓ Via `Route.ActionArgs` | ✓ Via `action()` return type |
|
|
860
|
+
| Search params typing | ✓ Manual with `useSearchParams` | ✓ Route-level definition |
|
|
861
|
+
| Redirect typing | ✓ Standard function | ✓ Standard function |
|
|
862
|
+
|
|
863
|
+
### Key Differences
|
|
864
|
+
|
|
865
|
+
**Type Definition Level:**
|
|
866
|
+
- React Router: File-based type generation (`.d.ts` files)
|
|
867
|
+
- TanStack Router: Route-level type registration
|
|
868
|
+
|
|
869
|
+
**Search Params:**
|
|
870
|
+
- React Router: Runtime `URLSearchParams` API
|
|
871
|
+
- TanStack Router: Compile-time schema validation
|
|
872
|
+
|
|
873
|
+
**Nested Route Typing:**
|
|
874
|
+
- React Router: Inherited from parent context
|
|
875
|
+
- TanStack Router: Explicit inheritance patterns
|
|
876
|
+
|
|
877
|
+
**Error Typing:**
|
|
878
|
+
- React Router: `isRouteErrorResponse()` utility
|
|
879
|
+
- TanStack Router: Built-in discriminated unions
|
|
880
|
+
|
|
881
|
+
**Learning Curve:**
|
|
882
|
+
- React Router: Familiar to those migrating from v6
|
|
883
|
+
- TanStack Router: More opinionated, explicit type patterns
|
|
884
|
+
|
|
885
|
+
## Best Practices
|
|
886
|
+
|
|
887
|
+
### 1. Type Your Routes Consistently
|
|
888
|
+
|
|
889
|
+
```tsx
|
|
890
|
+
// In Framework Mode, always use the generated types
|
|
891
|
+
import type { Route } from "./+types/my-route";
|
|
892
|
+
|
|
893
|
+
export async function loader({ params }: Route.LoaderArgs) {
|
|
894
|
+
// params is typed
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export default function Component({ loaderData }: Route.ComponentProps) {
|
|
898
|
+
// loaderData is typed
|
|
899
|
+
}
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
### 2. Use Forms for Navigation-Causing Mutations
|
|
903
|
+
|
|
904
|
+
```tsx
|
|
905
|
+
// Good: Uses <Form> for main app actions
|
|
906
|
+
<Form method="post" action="/projects">
|
|
907
|
+
<input name="title" />
|
|
908
|
+
<button>Create</button>
|
|
909
|
+
</Form>
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
### 3. Use Fetchers for Non-Navigation Mutations
|
|
913
|
+
|
|
914
|
+
```tsx
|
|
915
|
+
// Good: Uses fetcher for secondary updates
|
|
916
|
+
const fetcher = useFetcher();
|
|
917
|
+
|
|
918
|
+
<fetcher.Form method="post" action="/task/123">
|
|
919
|
+
<input name="status" />
|
|
920
|
+
<button>Update</button>
|
|
921
|
+
</fetcher.Form>
|
|
922
|
+
```
|
|
923
|
+
|
|
924
|
+
### 4. Handle Validation Errors Properly
|
|
925
|
+
|
|
926
|
+
```tsx
|
|
927
|
+
// Return with 4xx status to prevent revalidation
|
|
928
|
+
if (validationFailed) {
|
|
929
|
+
return data({ errors }, { status: 400 });
|
|
930
|
+
}
|
|
931
|
+
```
|
|
932
|
+
|
|
933
|
+
### 5. Use `redirect()` in Loaders/Actions
|
|
934
|
+
|
|
935
|
+
```tsx
|
|
936
|
+
// Prefer redirect in loaders/actions
|
|
937
|
+
if (!user) {
|
|
938
|
+
return redirect("/login");
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// Over useNavigate in components
|
|
942
|
+
const navigate = useNavigate(); // Reserve for rare cases
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### 6. Leverage `useMatches()` for Layout Data
|
|
946
|
+
|
|
947
|
+
```tsx
|
|
948
|
+
// Access parent route data in nested components
|
|
949
|
+
const matches = useMatches();
|
|
950
|
+
const parentData = matches[matches.length - 2]?.data;
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
## Router Creation
|
|
954
|
+
|
|
955
|
+
### Data Mode (createBrowserRouter)
|
|
956
|
+
|
|
957
|
+
```tsx
|
|
958
|
+
import { createBrowserRouter, RouterProvider } from "react-router";
|
|
959
|
+
|
|
960
|
+
const router = createBrowserRouter([
|
|
961
|
+
{ path: "/", Component: Home },
|
|
962
|
+
{ path: "/about", Component: About },
|
|
963
|
+
]);
|
|
964
|
+
|
|
965
|
+
export default function App() {
|
|
966
|
+
return <RouterProvider router={router} />;
|
|
967
|
+
}
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
### Framework Mode Setup
|
|
971
|
+
|
|
972
|
+
Use the framework convention with `routes.ts`:
|
|
973
|
+
|
|
974
|
+
```ts filename=app/routes.ts
|
|
975
|
+
import { route, type RouteConfig } from "@react-router/dev/routes";
|
|
976
|
+
|
|
977
|
+
export default [
|
|
978
|
+
route("/", "./routes/index.tsx"),
|
|
979
|
+
route("about", "./routes/about.tsx"),
|
|
980
|
+
route("posts/:id", "./routes/post.tsx"),
|
|
981
|
+
] satisfies RouteConfig;
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
### Router Options
|
|
985
|
+
|
|
986
|
+
```tsx
|
|
987
|
+
const router = createBrowserRouter(routes, {
|
|
988
|
+
basename: "/app", // URL base path
|
|
989
|
+
future: { v7_... }, // Future flags
|
|
990
|
+
hydrationData: serverData, // SSR hydration
|
|
991
|
+
dataStrategy: customStrategy, // Custom data loading
|
|
992
|
+
getContext: createContext, // Custom context
|
|
993
|
+
patchRoutesOnNavigation: patchFn, // Dynamic routes
|
|
994
|
+
unstable_instrumentations: [logger] // Instrumentation
|
|
995
|
+
});
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
## Conclusion
|
|
999
|
+
|
|
1000
|
+
React Router v7 provides a mature, type-safe routing solution with automatic TypeScript support. Its familiar API for v6 users, combined with modern features like middleware, server-side rendering support, and comprehensive type generation, makes it a strong choice for building scalable React applications.
|
|
1001
|
+
|
|
1002
|
+
The key advantage over alternatives is the seamless integration with existing React patterns (hooks, components) and the framework's approach to type safety through automatic code generation rather than manual annotations.
|