@baselane/packs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -0
- package/NOTICE +6 -0
- package/README.md +15 -0
- package/dist/ai-merge.d.ts +26 -0
- package/dist/ai-merge.js +165 -0
- package/dist/aliases.d.ts +7 -0
- package/dist/aliases.js +9 -0
- package/dist/compose-draft.d.ts +19 -0
- package/dist/compose-draft.js +170 -0
- package/dist/drift-detect.d.ts +8 -0
- package/dist/drift-detect.js +21 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +21 -0
- package/dist/ingest.d.ts +25 -0
- package/dist/ingest.js +262 -0
- package/dist/load.d.ts +7 -0
- package/dist/load.js +29 -0
- package/dist/manifest.d.ts +71 -0
- package/dist/manifest.js +208 -0
- package/dist/materialize-harness.d.ts +15 -0
- package/dist/materialize-harness.js +48 -0
- package/dist/merge-region.d.ts +60 -0
- package/dist/merge-region.js +166 -0
- package/dist/overlap.d.ts +32 -0
- package/dist/overlap.js +49 -0
- package/dist/pack-from-fileset.d.ts +13 -0
- package/dist/pack-from-fileset.js +133 -0
- package/dist/render/adapters.d.ts +6 -0
- package/dist/render/adapters.js +43 -0
- package/dist/render/agents-md.d.ts +3 -0
- package/dist/render/agents-md.js +49 -0
- package/dist/render/bundle-union.d.ts +10 -0
- package/dist/render/bundle-union.js +87 -0
- package/dist/render/bundle.d.ts +3 -0
- package/dist/render/bundle.js +51 -0
- package/dist/render/capabilities.d.ts +19 -0
- package/dist/render/capabilities.js +86 -0
- package/dist/render/claude.d.ts +3 -0
- package/dist/render/claude.js +92 -0
- package/dist/render/design.d.ts +27 -0
- package/dist/render/design.js +443 -0
- package/dist/render/graph.d.ts +11 -0
- package/dist/render/graph.js +245 -0
- package/dist/render/memory.d.ts +35 -0
- package/dist/render/memory.js +353 -0
- package/dist/render/render-pack.d.ts +3 -0
- package/dist/render/render-pack.js +43 -0
- package/dist/render/repo-union.d.ts +14 -0
- package/dist/render/repo-union.js +94 -0
- package/dist/render/rollout-files.d.ts +18 -0
- package/dist/render/rollout-files.js +39 -0
- package/dist/render/system-map.d.ts +8 -0
- package/dist/render/system-map.js +73 -0
- package/dist/render/tasks.d.ts +32 -0
- package/dist/render/tasks.js +327 -0
- package/dist/render/wiki.d.ts +30 -0
- package/dist/render/wiki.js +288 -0
- package/dist/seed/graph-seed.d.ts +17 -0
- package/dist/seed/graph-seed.js +18 -0
- package/dist/seed/wiki-seed.d.ts +23 -0
- package/dist/seed/wiki-seed.js +133 -0
- package/dist/seed-skills.d.ts +18 -0
- package/dist/seed-skills.js +134 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.js +1 -0
- package/dist/validate.d.ts +30 -0
- package/dist/validate.js +397 -0
- package/package.json +38 -0
- package/packs/database-review/pack.json +44 -0
- package/packs/database-review/rendered/.baselane/capabilities.json +10 -0
- package/packs/database-review/rendered/.baselane/system-map/README.md +18 -0
- package/packs/database-review/rendered/.claude/agents/database-reviewer.md +8 -0
- package/packs/database-review/rendered/.claude/commands/db-review.md +6 -0
- package/packs/database-review/rendered/.claude/commands/map.md +6 -0
- package/packs/database-review/rendered/.claude/settings.json +26 -0
- package/packs/database-review/rendered/.github/copilot-instructions.md +48 -0
- package/packs/database-review/rendered/AGENTS.md +66 -0
- package/packs/database-review/rendered/CLAUDE.md +9 -0
- package/packs/database-review/rendered/GEMINI.md +3 -0
- package/packs/disciplined-workflow/pack.json +63 -0
- package/packs/disciplined-workflow/rendered/.baselane/capabilities.json +10 -0
- package/packs/disciplined-workflow/rendered/.baselane/tasks/README.md +36 -0
- package/packs/disciplined-workflow/rendered/.claude/agents/plan-reviewer.md +8 -0
- package/packs/disciplined-workflow/rendered/.claude/agents/task-reviewer.md +8 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/brainstorm.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/execute-plan.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/plan-work.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/write-plan.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/settings.json +24 -0
- package/packs/disciplined-workflow/rendered/.github/copilot-instructions.md +24 -0
- package/packs/disciplined-workflow/rendered/AGENTS.md +43 -0
- package/packs/disciplined-workflow/rendered/CLAUDE.md +12 -0
- package/packs/disciplined-workflow/rendered/GEMINI.md +3 -0
- package/packs/frontend-design/pack.json +129 -0
- package/packs/frontend-design/rendered/.claude/skills/clone/SKILL.md +39 -0
- package/packs/frontend-design/rendered/.claude/skills/functional-ui/SKILL.md +78 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/SKILL.md +36 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-core.md +254 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-frameworks.md +266 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-performance.md +79 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-plugins.md +433 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-react.md +136 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-scrolltrigger.md +296 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-timeline.md +107 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-utils.md +284 -0
- package/packs/frontend-design/rendered/.claude/skills/marketing-ui/SKILL.md +36 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/SKILL.md +267 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/base-vs-radix.md +306 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/cli.md +290 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/composition.md +195 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/customization.md +209 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/forms.md +192 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/icons.md +101 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/mcp.md +105 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/registry.md +277 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/styling.md +162 -0
- package/packs/frontend-design/rendered/.github/copilot-instructions.md +474 -0
- package/packs/frontend-design/rendered/AGENTS.md +33 -0
- package/packs/frontend-design/rendered/CLAUDE.md +10 -0
- package/packs/frontend-design/rendered/GEMINI.md +456 -0
- package/packs/frontend-taste/pack.json +43 -0
- package/packs/frontend-taste/rendered/.baselane/capabilities.json +16 -0
- package/packs/frontend-taste/rendered/.claude/agents/taste-reviewer.md +8 -0
- package/packs/frontend-taste/rendered/.claude/commands/design-review.md +6 -0
- package/packs/frontend-taste/rendered/.claude/settings.json +15 -0
- package/packs/frontend-taste/rendered/.github/copilot-instructions.md +51 -0
- package/packs/frontend-taste/rendered/AGENTS.md +68 -0
- package/packs/frontend-taste/rendered/CLAUDE.md +8 -0
- package/packs/frontend-taste/rendered/DESIGN.md +72 -0
- package/packs/frontend-taste/rendered/GEMINI.md +3 -0
- package/packs/go-rules/pack.json +38 -0
- package/packs/go-rules/rendered/.claude/agents/go-reviewer.md +8 -0
- package/packs/go-rules/rendered/.claude/commands/go-review.md +6 -0
- package/packs/go-rules/rendered/.claude/settings.json +15 -0
- package/packs/go-rules/rendered/.github/copilot-instructions.md +44 -0
- package/packs/go-rules/rendered/AGENTS.md +54 -0
- package/packs/go-rules/rendered/CLAUDE.md +8 -0
- package/packs/go-rules/rendered/GEMINI.md +3 -0
- package/packs/python-rules/pack.json +38 -0
- package/packs/python-rules/rendered/.claude/agents/python-reviewer.md +8 -0
- package/packs/python-rules/rendered/.claude/commands/python-review.md +6 -0
- package/packs/python-rules/rendered/.claude/settings.json +15 -0
- package/packs/python-rules/rendered/.github/copilot-instructions.md +43 -0
- package/packs/python-rules/rendered/AGENTS.md +53 -0
- package/packs/python-rules/rendered/CLAUDE.md +8 -0
- package/packs/python-rules/rendered/GEMINI.md +3 -0
- package/packs/second-brain/pack.json +36 -0
- package/packs/second-brain/rendered/.baselane/capabilities.json +25 -0
- package/packs/second-brain/rendered/.baselane/memory/README.md +34 -0
- package/packs/second-brain/rendered/.baselane/wiki/README.md +62 -0
- package/packs/second-brain/rendered/.claude/agents/librarian.md +14 -0
- package/packs/second-brain/rendered/.claude/commands/remember.md +6 -0
- package/packs/second-brain/rendered/.claude/commands/wiki.md +6 -0
- package/packs/second-brain/rendered/.claude/settings.json +35 -0
- package/packs/second-brain/rendered/.github/copilot-instructions.md +24 -0
- package/packs/second-brain/rendered/AGENTS.md +41 -0
- package/packs/second-brain/rendered/CLAUDE.md +9 -0
- package/packs/second-brain/rendered/GEMINI.md +3 -0
- package/packs/security-review/pack.json +72 -0
- package/packs/security-review/rendered/.claude/agents/security-reviewer.md +8 -0
- package/packs/security-review/rendered/.claude/commands/security-audit.md +6 -0
- package/packs/security-review/rendered/.claude/commands/security-scan.md +6 -0
- package/packs/security-review/rendered/.claude/settings.json +35 -0
- package/packs/security-review/rendered/.claude/skills/security-audit/SKILL.md +44 -0
- package/packs/security-review/rendered/.claude/skills/validate-at-boundaries/SKILL.md +41 -0
- package/packs/security-review/rendered/.github/copilot-instructions.md +137 -0
- package/packs/security-review/rendered/AGENTS.md +66 -0
- package/packs/security-review/rendered/CLAUDE.md +11 -0
- package/packs/security-review/rendered/GEMINI.md +90 -0
- package/packs/software-engineer-harness/pack.json +98 -0
- package/packs/software-engineer-harness/rendered/.baselane/capabilities.json +15 -0
- package/packs/software-engineer-harness/rendered/.baselane/system-map/README.md +18 -0
- package/packs/software-engineer-harness/rendered/.baselane/tasks/README.md +36 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/architect.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/checker.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/code-reviewer.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/code-simplifier.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/planner.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/reviewer.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/build-and-check.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/map.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/plan-change.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/plan-work.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/review-change.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/tdd-task.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/settings.json +35 -0
- package/packs/software-engineer-harness/rendered/.github/copilot-instructions.md +37 -0
- package/packs/software-engineer-harness/rendered/AGENTS.md +58 -0
- package/packs/software-engineer-harness/rendered/CLAUDE.md +18 -0
- package/packs/software-engineer-harness/rendered/GEMINI.md +3 -0
- package/packs/systematic-debugging/pack.json +44 -0
- package/packs/systematic-debugging/rendered/.claude/agents/debugger.md +8 -0
- package/packs/systematic-debugging/rendered/.claude/commands/debug.md +6 -0
- package/packs/systematic-debugging/rendered/.claude/commands/root-cause.md +6 -0
- package/packs/systematic-debugging/rendered/.claude/settings.json +15 -0
- package/packs/systematic-debugging/rendered/.github/copilot-instructions.md +20 -0
- package/packs/systematic-debugging/rendered/AGENTS.md +31 -0
- package/packs/systematic-debugging/rendered/CLAUDE.md +9 -0
- package/packs/systematic-debugging/rendered/GEMINI.md +3 -0
- package/packs/token-efficiency-harness/pack.json +49 -0
- package/packs/token-efficiency-harness/rendered/.baselane/capabilities.json +10 -0
- package/packs/token-efficiency-harness/rendered/.baselane/memory/README.md +34 -0
- package/packs/token-efficiency-harness/rendered/.claude/agents/scout.md +8 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/handoff.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/remember.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/usage-audit.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/settings.json +26 -0
- package/packs/token-efficiency-harness/rendered/.github/copilot-instructions.md +26 -0
- package/packs/token-efficiency-harness/rendered/AGENTS.md +44 -0
- package/packs/token-efficiency-harness/rendered/CLAUDE.md +10 -0
- package/packs/token-efficiency-harness/rendered/GEMINI.md +3 -0
- package/packs/typescript-rules/pack.json +46 -0
- package/packs/typescript-rules/rendered/.claude/agents/typescript-reviewer.md +8 -0
- package/packs/typescript-rules/rendered/.claude/commands/typescript-review.md +6 -0
- package/packs/typescript-rules/rendered/.claude/settings.json +15 -0
- package/packs/typescript-rules/rendered/.claude/skills/immutable-updates/SKILL.md +46 -0
- package/packs/typescript-rules/rendered/.github/copilot-instructions.md +89 -0
- package/packs/typescript-rules/rendered/AGENTS.md +55 -0
- package/packs/typescript-rules/rendered/CLAUDE.md +9 -0
- package/packs/typescript-rules/rendered/GEMINI.md +51 -0
- package/skills/algorithmic-art/LICENSE +202 -0
- package/skills/algorithmic-art/LICENSE.txt +202 -0
- package/skills/algorithmic-art/SKILL.md +405 -0
- package/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/skills/algorithmic-art/templates/viewer.html +599 -0
- package/skills/brainstorming/LICENSE +21 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +291 -0
- package/skills/brand-guidelines/LICENSE +202 -0
- package/skills/brand-guidelines/LICENSE.txt +202 -0
- package/skills/brand-guidelines/SKILL.md +73 -0
- package/skills/canvas-design/LICENSE +202 -0
- package/skills/canvas-design/LICENSE.txt +202 -0
- package/skills/canvas-design/SKILL.md +130 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/dispatching-parallel-agents/LICENSE +21 -0
- package/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/skills/executing-plans/LICENSE +21 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/LICENSE +21 -0
- package/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/skills/first-party/README.md +32 -0
- package/skills/first-party/append-only-jsonl-stores/SKILL.md +50 -0
- package/skills/first-party/golden-snapshot-discipline/SKILL.md +45 -0
- package/skills/first-party/immutable-updates/SKILL.md +46 -0
- package/skills/first-party/manifest.json +10 -0
- package/skills/first-party/ts-extension-imports/SKILL.md +49 -0
- package/skills/first-party/validate-at-boundaries/SKILL.md +41 -0
- package/skills/first-party/zero-dependency-discipline/SKILL.md +41 -0
- package/skills/frontend-design/LICENSE +177 -0
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/SKILL.md +55 -0
- package/skills/internal-comms/LICENSE +202 -0
- package/skills/internal-comms/LICENSE.txt +202 -0
- package/skills/internal-comms/SKILL.md +32 -0
- package/skills/internal-comms/examples/3p-updates.md +47 -0
- package/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/skills/internal-comms/examples/faq-answers.md +30 -0
- package/skills/internal-comms/examples/general-comms.md +16 -0
- package/skills/mcp-builder/LICENSE +202 -0
- package/skills/mcp-builder/LICENSE.txt +202 -0
- package/skills/mcp-builder/SKILL.md +236 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/receiving-code-review/LICENSE +21 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/LICENSE +21 -0
- package/skills/requesting-code-review/SKILL.md +103 -0
- package/skills/requesting-code-review/code-reviewer.md +172 -0
- package/skills/seed-manifest.json +185 -0
- package/skills/skill-creator/LICENSE +202 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +247 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/slack-gif-creator/LICENSE +202 -0
- package/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/skills/slack-gif-creator/SKILL.md +254 -0
- package/skills/slack-gif-creator/core/easing.py +234 -0
- package/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/skills/slack-gif-creator/core/validators.py +136 -0
- package/skills/slack-gif-creator/requirements.txt +4 -0
- package/skills/subagent-driven-development/LICENSE +21 -0
- package/skills/subagent-driven-development/SKILL.md +418 -0
- package/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/skills/subagent-driven-development/scripts/review-package +44 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/skills/subagent-driven-development/scripts/task-brief +40 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/LICENSE +21 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/LICENSE +21 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/theme-factory/LICENSE +202 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/using-git-worktrees/LICENSE +21 -0
- package/skills/using-git-worktrees/SKILL.md +202 -0
- package/skills/using-superpowers/LICENSE +21 -0
- package/skills/using-superpowers/SKILL.md +62 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/codex-tools.md +39 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/LICENSE +21 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/web-artifacts-builder/LICENSE +202 -0
- package/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills/web-artifacts-builder/SKILL.md +74 -0
- package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/webapp-testing/LICENSE +202 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/writing-plans/LICENSE +21 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Component Composition
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Items always inside their Group component
|
|
6
|
+
- Callouts use Alert
|
|
7
|
+
- Empty states use Empty component
|
|
8
|
+
- Toast notifications use sonner
|
|
9
|
+
- Choosing between overlay components
|
|
10
|
+
- Dialog, Sheet, and Drawer always need a Title
|
|
11
|
+
- Card structure
|
|
12
|
+
- Button has no isPending or isLoading prop
|
|
13
|
+
- TabsTrigger must be inside TabsList
|
|
14
|
+
- Avatar always needs AvatarFallback
|
|
15
|
+
- Use Separator instead of raw hr or border divs
|
|
16
|
+
- Use Skeleton for loading placeholders
|
|
17
|
+
- Use Badge instead of custom styled spans
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Items always inside their Group component
|
|
22
|
+
|
|
23
|
+
Never render items directly inside the content container.
|
|
24
|
+
|
|
25
|
+
**Incorrect:**
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<SelectContent>
|
|
29
|
+
<SelectItem value="apple">Apple</SelectItem>
|
|
30
|
+
<SelectItem value="banana">Banana</SelectItem>
|
|
31
|
+
</SelectContent>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Correct:**
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<SelectContent>
|
|
38
|
+
<SelectGroup>
|
|
39
|
+
<SelectItem value="apple">Apple</SelectItem>
|
|
40
|
+
<SelectItem value="banana">Banana</SelectItem>
|
|
41
|
+
</SelectGroup>
|
|
42
|
+
</SelectContent>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This applies to all group-based components:
|
|
46
|
+
|
|
47
|
+
| Item | Group |
|
|
48
|
+
|------|-------|
|
|
49
|
+
| `SelectItem`, `SelectLabel` | `SelectGroup` |
|
|
50
|
+
| `DropdownMenuItem`, `DropdownMenuLabel`, `DropdownMenuSub` | `DropdownMenuGroup` |
|
|
51
|
+
| `MenubarItem` | `MenubarGroup` |
|
|
52
|
+
| `ContextMenuItem` | `ContextMenuGroup` |
|
|
53
|
+
| `CommandItem` | `CommandGroup` |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Callouts use Alert
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<Alert>
|
|
61
|
+
<AlertTitle>Warning</AlertTitle>
|
|
62
|
+
<AlertDescription>Something needs attention.</AlertDescription>
|
|
63
|
+
</Alert>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Empty states use Empty component
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<Empty>
|
|
72
|
+
<EmptyHeader>
|
|
73
|
+
<EmptyMedia variant="icon"><FolderIcon /></EmptyMedia>
|
|
74
|
+
<EmptyTitle>No projects yet</EmptyTitle>
|
|
75
|
+
<EmptyDescription>Get started by creating a new project.</EmptyDescription>
|
|
76
|
+
</EmptyHeader>
|
|
77
|
+
<EmptyContent>
|
|
78
|
+
<Button>Create Project</Button>
|
|
79
|
+
</EmptyContent>
|
|
80
|
+
</Empty>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Toast notifications use sonner
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
import { toast } from "sonner"
|
|
89
|
+
|
|
90
|
+
toast.success("Changes saved.")
|
|
91
|
+
toast.error("Something went wrong.")
|
|
92
|
+
toast("File deleted.", {
|
|
93
|
+
action: { label: "Undo", onClick: () => undoDelete() },
|
|
94
|
+
})
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Choosing between overlay components
|
|
100
|
+
|
|
101
|
+
| Use case | Component |
|
|
102
|
+
|----------|-----------|
|
|
103
|
+
| Focused task that requires input | `Dialog` |
|
|
104
|
+
| Destructive action confirmation | `AlertDialog` |
|
|
105
|
+
| Side panel with details or filters | `Sheet` |
|
|
106
|
+
| Mobile-first bottom panel | `Drawer` |
|
|
107
|
+
| Quick info on hover | `HoverCard` |
|
|
108
|
+
| Small contextual content on click | `Popover` |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Dialog, Sheet, and Drawer always need a Title
|
|
113
|
+
|
|
114
|
+
`DialogTitle`, `SheetTitle`, `DrawerTitle` are required for accessibility. Use `className="sr-only"` if visually hidden.
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
<DialogContent>
|
|
118
|
+
<DialogHeader>
|
|
119
|
+
<DialogTitle>Edit Profile</DialogTitle>
|
|
120
|
+
<DialogDescription>Update your profile.</DialogDescription>
|
|
121
|
+
</DialogHeader>
|
|
122
|
+
...
|
|
123
|
+
</DialogContent>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Card structure
|
|
129
|
+
|
|
130
|
+
Use full composition — don't dump everything into `CardContent`:
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
<Card>
|
|
134
|
+
<CardHeader>
|
|
135
|
+
<CardTitle>Team Members</CardTitle>
|
|
136
|
+
<CardDescription>Manage your team.</CardDescription>
|
|
137
|
+
</CardHeader>
|
|
138
|
+
<CardContent>...</CardContent>
|
|
139
|
+
<CardFooter>
|
|
140
|
+
<Button>Invite</Button>
|
|
141
|
+
</CardFooter>
|
|
142
|
+
</Card>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Button has no isPending or isLoading prop
|
|
148
|
+
|
|
149
|
+
Compose with `Spinner` + `data-icon` + `disabled`:
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
<Button disabled>
|
|
153
|
+
<Spinner data-icon="inline-start" />
|
|
154
|
+
Saving...
|
|
155
|
+
</Button>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## TabsTrigger must be inside TabsList
|
|
161
|
+
|
|
162
|
+
Never render `TabsTrigger` directly inside `Tabs` — always wrap in `TabsList`:
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
<Tabs defaultValue="account">
|
|
166
|
+
<TabsList>
|
|
167
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
168
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
169
|
+
</TabsList>
|
|
170
|
+
<TabsContent value="account">...</TabsContent>
|
|
171
|
+
</Tabs>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Avatar always needs AvatarFallback
|
|
177
|
+
|
|
178
|
+
Always include `AvatarFallback` for when the image fails to load:
|
|
179
|
+
|
|
180
|
+
```tsx
|
|
181
|
+
<Avatar>
|
|
182
|
+
<AvatarImage src="/avatar.png" alt="User" />
|
|
183
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
184
|
+
</Avatar>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Use existing components instead of custom markup
|
|
190
|
+
|
|
191
|
+
| Instead of | Use |
|
|
192
|
+
|---|---|
|
|
193
|
+
| `<hr>` or `<div className="border-t">` | `<Separator />` |
|
|
194
|
+
| `<div className="animate-pulse">` with styled divs | `<Skeleton className="h-4 w-3/4" />` |
|
|
195
|
+
| `<span className="rounded-full bg-green-100 ...">` | `<Badge variant="secondary">` |
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Customization & Theming
|
|
2
|
+
|
|
3
|
+
Components reference semantic CSS variable tokens. Change the variables to change every component.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- How it works (CSS variables → Tailwind utilities → components)
|
|
8
|
+
- Color variables and OKLCH format
|
|
9
|
+
- Dark mode setup
|
|
10
|
+
- Changing the theme (presets, CSS variables)
|
|
11
|
+
- Adding custom colors (Tailwind v3 and v4)
|
|
12
|
+
- Border radius
|
|
13
|
+
- Customizing components (variants, className, wrappers)
|
|
14
|
+
- Checking for updates
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
1. CSS variables defined in `:root` (light) and `.dark` (dark mode).
|
|
21
|
+
2. Tailwind maps them to utilities: `bg-primary`, `text-muted-foreground`, etc.
|
|
22
|
+
3. Components use these utilities — changing a variable changes all components that reference it.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Color Variables
|
|
27
|
+
|
|
28
|
+
Every color follows the `name` / `name-foreground` convention. The base variable is for backgrounds, `-foreground` is for text/icons on that background.
|
|
29
|
+
|
|
30
|
+
| Variable | Purpose |
|
|
31
|
+
| -------------------------------------------- | -------------------------------- |
|
|
32
|
+
| `--background` / `--foreground` | Page background and default text |
|
|
33
|
+
| `--card` / `--card-foreground` | Card surfaces |
|
|
34
|
+
| `--primary` / `--primary-foreground` | Primary buttons and actions |
|
|
35
|
+
| `--secondary` / `--secondary-foreground` | Secondary actions |
|
|
36
|
+
| `--muted` / `--muted-foreground` | Muted/disabled states |
|
|
37
|
+
| `--accent` / `--accent-foreground` | Hover and accent states |
|
|
38
|
+
| `--destructive` / `--destructive-foreground` | Error and destructive actions |
|
|
39
|
+
| `--border` | Default border color |
|
|
40
|
+
| `--input` | Form input borders |
|
|
41
|
+
| `--ring` | Focus ring color |
|
|
42
|
+
| `--chart-1` through `--chart-5` | Chart/data visualization |
|
|
43
|
+
| `--sidebar-*` | Sidebar-specific colors |
|
|
44
|
+
| `--surface` / `--surface-foreground` | Secondary surface |
|
|
45
|
+
|
|
46
|
+
Colors use OKLCH: `--primary: oklch(0.205 0 0)` where values are lightness (0–1), chroma (0 = gray), and hue (0–360).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Dark Mode
|
|
51
|
+
|
|
52
|
+
Class-based toggle via `.dark` on the root element. In Next.js, use `next-themes`:
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { ThemeProvider } from "next-themes"
|
|
56
|
+
|
|
57
|
+
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
58
|
+
{children}
|
|
59
|
+
</ThemeProvider>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Changing the Theme
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Apply a preset code from ui.shadcn.com.
|
|
68
|
+
npx shadcn@latest apply --preset a2r6bw
|
|
69
|
+
|
|
70
|
+
# Positional shorthand also works.
|
|
71
|
+
npx shadcn@latest apply a2r6bw
|
|
72
|
+
|
|
73
|
+
# Switch to a named preset and overwrite existing components.
|
|
74
|
+
npx shadcn@latest apply --preset nova
|
|
75
|
+
|
|
76
|
+
# Preserve existing components instead.
|
|
77
|
+
npx shadcn@latest init --preset nova --force --no-reinstall
|
|
78
|
+
|
|
79
|
+
# Use a custom theme URL.
|
|
80
|
+
npx shadcn@latest apply --preset "https://ui.shadcn.com/init?base=radix&style=nova&theme=blue&..."
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Or edit CSS variables directly in `globals.css`.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Adding Custom Colors
|
|
88
|
+
|
|
89
|
+
Add variables to the file at `tailwindCssFile` from `npx shadcn@latest info` (typically `globals.css`). Never create a new CSS file for this.
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
/* 1. Define in the global CSS file. */
|
|
93
|
+
:root {
|
|
94
|
+
--warning: oklch(0.84 0.16 84);
|
|
95
|
+
--warning-foreground: oklch(0.28 0.07 46);
|
|
96
|
+
}
|
|
97
|
+
.dark {
|
|
98
|
+
--warning: oklch(0.41 0.11 46);
|
|
99
|
+
--warning-foreground: oklch(0.99 0.02 95);
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```css
|
|
104
|
+
/* 2a. Register with Tailwind v4 (@theme inline). */
|
|
105
|
+
@theme inline {
|
|
106
|
+
--color-warning: var(--warning);
|
|
107
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
When `tailwindVersion` is `"v3"` (check via `npx shadcn@latest info`), register in `tailwind.config.js` instead:
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
// 2b. Register with Tailwind v3 (tailwind.config.js).
|
|
115
|
+
module.exports = {
|
|
116
|
+
theme: {
|
|
117
|
+
extend: {
|
|
118
|
+
colors: {
|
|
119
|
+
warning: "oklch(var(--warning) / <alpha-value>)",
|
|
120
|
+
"warning-foreground":
|
|
121
|
+
"oklch(var(--warning-foreground) / <alpha-value>)",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```tsx
|
|
129
|
+
// 3. Use in components.
|
|
130
|
+
<div className="bg-warning text-warning-foreground">Warning</div>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Border Radius
|
|
136
|
+
|
|
137
|
+
`--radius` controls border radius globally. Components derive values from it (`rounded-lg` = `var(--radius)`, `rounded-md` = `calc(var(--radius) - 2px)`).
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Customizing Components
|
|
142
|
+
|
|
143
|
+
See also: [rules/styling.md](./rules/styling.md) for Incorrect/Correct examples.
|
|
144
|
+
|
|
145
|
+
Prefer these approaches in order:
|
|
146
|
+
|
|
147
|
+
### 1. Built-in variants
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
<Button variant="outline" size="sm">
|
|
151
|
+
Click
|
|
152
|
+
</Button>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 2. Tailwind classes via `className`
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
<Card className="mx-auto max-w-md">...</Card>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 3. Add a new variant
|
|
162
|
+
|
|
163
|
+
Edit the component source to add a variant via `cva`:
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
// components/ui/button.tsx
|
|
167
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90",
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 4. Wrapper components
|
|
171
|
+
|
|
172
|
+
Compose shadcn/ui primitives into higher-level components:
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
export function ConfirmDialog({ title, description, onConfirm, children }) {
|
|
176
|
+
return (
|
|
177
|
+
<AlertDialog>
|
|
178
|
+
<AlertDialogTrigger asChild>{children}</AlertDialogTrigger>
|
|
179
|
+
<AlertDialogContent>
|
|
180
|
+
<AlertDialogHeader>
|
|
181
|
+
<AlertDialogTitle>{title}</AlertDialogTitle>
|
|
182
|
+
<AlertDialogDescription>{description}</AlertDialogDescription>
|
|
183
|
+
</AlertDialogHeader>
|
|
184
|
+
<AlertDialogFooter>
|
|
185
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
186
|
+
<AlertDialogAction onClick={onConfirm}>Confirm</AlertDialogAction>
|
|
187
|
+
</AlertDialogFooter>
|
|
188
|
+
</AlertDialogContent>
|
|
189
|
+
</AlertDialog>
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Checking for Updates
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npx shadcn@latest add button --diff
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
To preview exactly what would change before updating, use `--dry-run` and `--diff`:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npx shadcn@latest add button --dry-run # see all affected files
|
|
206
|
+
npx shadcn@latest add button --diff button.tsx # see the diff for a specific file
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
See [Updating Components in SKILL.md](./SKILL.md#updating-components) for the full smart merge workflow.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Forms & Inputs
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Forms use FieldGroup + Field
|
|
6
|
+
- InputGroup requires InputGroupInput/InputGroupTextarea
|
|
7
|
+
- Buttons inside inputs use InputGroup + InputGroupAddon
|
|
8
|
+
- Option sets (2–7 choices) use ToggleGroup
|
|
9
|
+
- FieldSet + FieldLegend for grouping related fields
|
|
10
|
+
- Field validation and disabled states
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Forms use FieldGroup + Field
|
|
15
|
+
|
|
16
|
+
Always use `FieldGroup` + `Field` — never raw `div` with `space-y-*`:
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
<FieldGroup>
|
|
20
|
+
<Field>
|
|
21
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
22
|
+
<Input id="email" type="email" />
|
|
23
|
+
</Field>
|
|
24
|
+
<Field>
|
|
25
|
+
<FieldLabel htmlFor="password">Password</FieldLabel>
|
|
26
|
+
<Input id="password" type="password" />
|
|
27
|
+
</Field>
|
|
28
|
+
</FieldGroup>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use `Field orientation="horizontal"` for settings pages. Use `FieldLabel className="sr-only"` for visually hidden labels.
|
|
32
|
+
|
|
33
|
+
**Choosing form controls:**
|
|
34
|
+
|
|
35
|
+
- Simple text input → `Input`
|
|
36
|
+
- Dropdown with predefined options → `Select`
|
|
37
|
+
- Searchable dropdown → `Combobox`
|
|
38
|
+
- Native HTML select (no JS) → `native-select`
|
|
39
|
+
- Boolean toggle → `Switch` (for settings) or `Checkbox` (for forms)
|
|
40
|
+
- Single choice from few options → `RadioGroup`
|
|
41
|
+
- Toggle between 2–5 options → `ToggleGroup` + `ToggleGroupItem`
|
|
42
|
+
- OTP/verification code → `InputOTP`
|
|
43
|
+
- Multi-line text → `Textarea`
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## InputGroup requires InputGroupInput/InputGroupTextarea
|
|
48
|
+
|
|
49
|
+
Never use raw `Input` or `Textarea` inside an `InputGroup`.
|
|
50
|
+
|
|
51
|
+
**Incorrect:**
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
<InputGroup>
|
|
55
|
+
<Input placeholder="Search..." />
|
|
56
|
+
</InputGroup>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Correct:**
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { InputGroup, InputGroupInput } from "@/components/ui/input-group"
|
|
63
|
+
|
|
64
|
+
<InputGroup>
|
|
65
|
+
<InputGroupInput placeholder="Search..." />
|
|
66
|
+
</InputGroup>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Buttons inside inputs use InputGroup + InputGroupAddon
|
|
72
|
+
|
|
73
|
+
Never place a `Button` directly inside or adjacent to an `Input` with custom positioning.
|
|
74
|
+
|
|
75
|
+
**Incorrect:**
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<div className="relative">
|
|
79
|
+
<Input placeholder="Search..." className="pr-10" />
|
|
80
|
+
<Button className="absolute right-0 top-0" size="icon">
|
|
81
|
+
<SearchIcon />
|
|
82
|
+
</Button>
|
|
83
|
+
</div>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Correct:**
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import { InputGroup, InputGroupInput, InputGroupAddon } from "@/components/ui/input-group"
|
|
90
|
+
|
|
91
|
+
<InputGroup>
|
|
92
|
+
<InputGroupInput placeholder="Search..." />
|
|
93
|
+
<InputGroupAddon>
|
|
94
|
+
<Button size="icon">
|
|
95
|
+
<SearchIcon data-icon="inline-start" />
|
|
96
|
+
</Button>
|
|
97
|
+
</InputGroupAddon>
|
|
98
|
+
</InputGroup>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Option sets (2–7 choices) use ToggleGroup
|
|
104
|
+
|
|
105
|
+
Don't manually loop `Button` components with active state.
|
|
106
|
+
|
|
107
|
+
**Incorrect:**
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
const [selected, setSelected] = useState("daily")
|
|
111
|
+
|
|
112
|
+
<div className="flex gap-2">
|
|
113
|
+
{["daily", "weekly", "monthly"].map((option) => (
|
|
114
|
+
<Button
|
|
115
|
+
key={option}
|
|
116
|
+
variant={selected === option ? "default" : "outline"}
|
|
117
|
+
onClick={() => setSelected(option)}
|
|
118
|
+
>
|
|
119
|
+
{option}
|
|
120
|
+
</Button>
|
|
121
|
+
))}
|
|
122
|
+
</div>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Correct:**
|
|
126
|
+
|
|
127
|
+
```tsx
|
|
128
|
+
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"
|
|
129
|
+
|
|
130
|
+
<ToggleGroup spacing={2}>
|
|
131
|
+
<ToggleGroupItem value="daily">Daily</ToggleGroupItem>
|
|
132
|
+
<ToggleGroupItem value="weekly">Weekly</ToggleGroupItem>
|
|
133
|
+
<ToggleGroupItem value="monthly">Monthly</ToggleGroupItem>
|
|
134
|
+
</ToggleGroup>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Combine with `Field` for labelled toggle groups:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
<Field orientation="horizontal">
|
|
141
|
+
<FieldTitle id="theme-label">Theme</FieldTitle>
|
|
142
|
+
<ToggleGroup aria-labelledby="theme-label" spacing={2}>
|
|
143
|
+
<ToggleGroupItem value="light">Light</ToggleGroupItem>
|
|
144
|
+
<ToggleGroupItem value="dark">Dark</ToggleGroupItem>
|
|
145
|
+
<ToggleGroupItem value="system">System</ToggleGroupItem>
|
|
146
|
+
</ToggleGroup>
|
|
147
|
+
</Field>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
> **Note:** `defaultValue` and `type`/`multiple` props differ between base and radix. See [base-vs-radix.md](./base-vs-radix.md#togglegroup).
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## FieldSet + FieldLegend for grouping related fields
|
|
155
|
+
|
|
156
|
+
Use `FieldSet` + `FieldLegend` for related checkboxes, radios, or switches — not `div` with a heading:
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
<FieldSet>
|
|
160
|
+
<FieldLegend variant="label">Preferences</FieldLegend>
|
|
161
|
+
<FieldDescription>Select all that apply.</FieldDescription>
|
|
162
|
+
<FieldGroup className="gap-3">
|
|
163
|
+
<Field orientation="horizontal">
|
|
164
|
+
<Checkbox id="dark" />
|
|
165
|
+
<FieldLabel htmlFor="dark" className="font-normal">Dark mode</FieldLabel>
|
|
166
|
+
</Field>
|
|
167
|
+
</FieldGroup>
|
|
168
|
+
</FieldSet>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Field validation and disabled states
|
|
174
|
+
|
|
175
|
+
Both attributes are needed — `data-invalid`/`data-disabled` styles the field (label, description), while `aria-invalid`/`disabled` styles the control.
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
// Invalid.
|
|
179
|
+
<Field data-invalid>
|
|
180
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
181
|
+
<Input id="email" aria-invalid />
|
|
182
|
+
<FieldDescription>Invalid email address.</FieldDescription>
|
|
183
|
+
</Field>
|
|
184
|
+
|
|
185
|
+
// Disabled.
|
|
186
|
+
<Field data-disabled>
|
|
187
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
188
|
+
<Input id="email" disabled />
|
|
189
|
+
</Field>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Works for all controls: `Input`, `Textarea`, `Select`, `Checkbox`, `RadioGroupItem`, `Switch`, `Slider`, `NativeSelect`, `InputOTP`.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Icons
|
|
2
|
+
|
|
3
|
+
**Always use the project's configured `iconLibrary` for imports.** Check the `iconLibrary` field from project context: `lucide` → `lucide-react`, `tabler` → `@tabler/icons-react`, etc. Never assume `lucide-react`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Icons in Button use data-icon attribute
|
|
8
|
+
|
|
9
|
+
Add `data-icon="inline-start"` (prefix) or `data-icon="inline-end"` (suffix) to the icon. No sizing classes on the icon.
|
|
10
|
+
|
|
11
|
+
**Incorrect:**
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Button>
|
|
15
|
+
<SearchIcon className="mr-2 size-4" />
|
|
16
|
+
Search
|
|
17
|
+
</Button>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Correct:**
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<Button>
|
|
24
|
+
<SearchIcon data-icon="inline-start"/>
|
|
25
|
+
Search
|
|
26
|
+
</Button>
|
|
27
|
+
|
|
28
|
+
<Button>
|
|
29
|
+
Next
|
|
30
|
+
<ArrowRightIcon data-icon="inline-end"/>
|
|
31
|
+
</Button>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## No sizing classes on icons inside components
|
|
37
|
+
|
|
38
|
+
Components handle icon sizing via CSS. Don't add `size-4`, `w-4 h-4`, or other sizing classes to icons inside `Button`, `DropdownMenuItem`, `Alert`, `Sidebar*`, or other shadcn components. Unless the user explicitly asks for custom icon sizes.
|
|
39
|
+
|
|
40
|
+
**Incorrect:**
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<Button>
|
|
44
|
+
<SearchIcon className="size-4" data-icon="inline-start" />
|
|
45
|
+
Search
|
|
46
|
+
</Button>
|
|
47
|
+
|
|
48
|
+
<DropdownMenuItem>
|
|
49
|
+
<SettingsIcon className="mr-2 size-4" />
|
|
50
|
+
Settings
|
|
51
|
+
</DropdownMenuItem>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Correct:**
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
<Button>
|
|
58
|
+
<SearchIcon data-icon="inline-start" />
|
|
59
|
+
Search
|
|
60
|
+
</Button>
|
|
61
|
+
|
|
62
|
+
<DropdownMenuItem>
|
|
63
|
+
<SettingsIcon />
|
|
64
|
+
Settings
|
|
65
|
+
</DropdownMenuItem>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Pass icons as component objects, not string keys
|
|
71
|
+
|
|
72
|
+
Use `icon={CheckIcon}`, not a string key to a lookup map.
|
|
73
|
+
|
|
74
|
+
**Incorrect:**
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
const iconMap = {
|
|
78
|
+
check: CheckIcon,
|
|
79
|
+
alert: AlertIcon,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function StatusBadge({ icon }: { icon: string }) {
|
|
83
|
+
const Icon = iconMap[icon]
|
|
84
|
+
return <Icon />
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
<StatusBadge icon="check" />
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Correct:**
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
// Import from the project's configured iconLibrary (e.g. lucide-react, @tabler/icons-react).
|
|
94
|
+
import { CheckIcon } from "lucide-react"
|
|
95
|
+
|
|
96
|
+
function StatusBadge({ icon: Icon }: { icon: React.ComponentType }) {
|
|
97
|
+
return <Icon />
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
<StatusBadge icon={CheckIcon} />
|
|
101
|
+
```
|