@thorprovider/storefront 0.3.1 → 0.4.0-mvp.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +321 -152
  2. package/VENDOR.md +69 -0
  3. package/assets/openspec/config.yaml +38 -0
  4. package/assets/templates/AGENTS.md +76 -0
  5. package/assets/templates/app/app/[[...slug]]/page.tsx +54 -2
  6. package/assets/templates/app/app/[[...slug]]/renderer.tsx +13 -2
  7. package/assets/templates/app/app/globals.css +5 -8
  8. package/assets/templates/app/app/layout.tsx +17 -7
  9. package/assets/templates/app/app/robots.ts +19 -0
  10. package/assets/templates/app/app/sitemap.ts +71 -0
  11. package/assets/templates/app/lib/__STOREFRONT__/actions.ts +612 -0
  12. package/assets/templates/app/lib/__STOREFRONT__/cart-state.ts +66 -0
  13. package/assets/templates/app/lib/__STOREFRONT__/catalog.ts +50 -57
  14. package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +679 -0
  15. package/assets/templates/app/lib/__STOREFRONT__/composition.ts +26 -0
  16. package/assets/templates/app/lib/__STOREFRONT__/handlers.core.ts +197 -0
  17. package/assets/templates/app/lib/__STOREFRONT__/handlers.ts +5 -36
  18. package/assets/templates/app/lib/__STOREFRONT__/icon-map.ts +27 -0
  19. package/assets/templates/app/lib/__STOREFRONT__/mappers.ts +13 -11
  20. package/assets/templates/app/lib/__STOREFRONT__/registry.tsx +264 -51
  21. package/assets/templates/app/lib/__STOREFRONT__/runtime.ts +6 -3
  22. package/assets/templates/app/lib/__STOREFRONT__/schema.ts +136 -0
  23. package/assets/templates/app/lib/__STOREFRONT__/section-observation.ts +182 -0
  24. package/assets/templates/app/lib/__STOREFRONT__/section-sources.ts +130 -0
  25. package/assets/templates/app/lib/__STOREFRONT__/session.core.ts +470 -0
  26. package/assets/templates/app/lib/__STOREFRONT__/session.ts +169 -0
  27. package/assets/templates/app/lib/__STOREFRONT__/shell/content.ts +120 -0
  28. package/assets/templates/app/lib/__STOREFRONT__/shell/props.ts +38 -0
  29. package/assets/templates/app/lib/__STOREFRONT__/spec/index.ts +129 -10
  30. package/assets/templates/app/lib/__STOREFRONT__/spec/page-root.ts +5 -1
  31. package/assets/templates/app/lib/__STOREFRONT__/spec/seo.ts +191 -0
  32. package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +257 -0
  33. package/assets/templates/app/lib/__STOREFRONT__/state.ts +7 -31
  34. package/assets/templates/app/lib/__STOREFRONT__/store-context.ts +161 -0
  35. package/assets/templates/app/lib/__STOREFRONT__/views/sections/cta.client.tsx +25 -0
  36. package/assets/templates/app/lib/__STOREFRONT__/views/sections/cta.tsx +16 -0
  37. package/assets/templates/app/lib/__STOREFRONT__/views/sections/faq.client.tsx +24 -0
  38. package/assets/templates/app/lib/__STOREFRONT__/views/sections/faq.tsx +5 -18
  39. package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +18 -0
  40. package/assets/templates/app/lib/__STOREFRONT__/views/sections/logoCloud.tsx +26 -14
  41. package/assets/templates/app/lib/__STOREFRONT__/views/sections/pricing.tsx +36 -18
  42. package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.client.tsx +100 -0
  43. package/assets/templates/app/lib/__STOREFRONT__/views/sections/products.tsx +19 -0
  44. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.cta.ts +19 -0
  45. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.faq.ts +18 -0
  46. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.products.ts +39 -0
  47. package/assets/templates/app/lib/__STOREFRONT__/views/sections/statistics.tsx +35 -14
  48. package/assets/templates/app/lib/__STOREFRONT__/views/sections/testimonials.tsx +31 -13
  49. package/assets/templates/app/lib/__STOREFRONT__/views/types.ts +5 -3
  50. package/assets/templates/features/checkout/handlers.ts +159 -0
  51. package/assets/templates/features/checkout/state.ts +61 -0
  52. package/assets/templates/features/customer-auth/handlers.ts +59 -0
  53. package/assets/templates/features/customer-auth/state.ts +45 -0
  54. package/assets/templates/features/recommendations/state.ts +11 -0
  55. package/assets/templates/views/account/content.ts +35 -0
  56. package/assets/templates/views/account/index.tsx +114 -0
  57. package/assets/templates/views/account/registry.tsx +439 -0
  58. package/assets/templates/views/account/schema.ts +53 -0
  59. package/assets/templates/views/cart/content.ts +11 -0
  60. package/assets/templates/views/cart/data.ts +23 -0
  61. package/assets/templates/views/cart/index.tsx +53 -0
  62. package/assets/templates/views/cart/props.ts +12 -0
  63. package/assets/templates/views/cart/registry.tsx +81 -0
  64. package/assets/templates/views/cart/schema.ts +52 -0
  65. package/assets/templates/views/category/assembly/assembly.json +29 -0
  66. package/assets/templates/views/category/assembly/index.skeleton.tsx +251 -0
  67. package/assets/templates/views/category/assembly/registry.skeleton.tsx +34 -0
  68. package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/binding.json +5 -0
  69. package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/catalog.part +4 -0
  70. package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/element.part +7 -0
  71. package/assets/templates/views/category/assembly/slots/breadcrumb/Breadcrumb/registry.part +18 -0
  72. package/assets/templates/views/category/assembly/slots/filter/CategoryFilter2/catalog.part +5 -0
  73. package/assets/templates/views/category/assembly/slots/filter/CategoryFilter2/element.part +34 -0
  74. package/assets/templates/views/category/assembly/slots/filter/CategoryFilter2/registry.part +71 -0
  75. package/assets/templates/views/category/content.ts +30 -0
  76. package/assets/templates/views/category/data.ts +12 -0
  77. package/assets/templates/views/category/index.tsx +299 -0
  78. package/assets/templates/views/category/props.ts +23 -0
  79. package/assets/templates/views/category/registry.tsx +122 -0
  80. package/assets/templates/views/category/schema.ts +91 -0
  81. package/assets/templates/views/checkout/content.ts +105 -0
  82. package/assets/templates/views/checkout/data.ts +23 -0
  83. package/assets/templates/views/checkout/index.tsx +111 -0
  84. package/assets/templates/views/checkout/props.ts +49 -0
  85. package/assets/templates/views/checkout/registry.tsx +217 -0
  86. package/assets/templates/views/checkout/schema.ts +229 -0
  87. package/assets/templates/views/home/assembly/assembly.json +33 -0
  88. package/assets/templates/views/home/assembly/index.skeleton.tsx +90 -0
  89. package/assets/templates/views/home/assembly/registry.skeleton.tsx +25 -0
  90. package/assets/templates/views/home/assembly/slots/benefits/Feature1/binding.json +5 -0
  91. package/assets/templates/views/home/assembly/slots/benefits/Feature1/catalog.part +4 -0
  92. package/assets/templates/views/home/assembly/slots/benefits/Feature1/element.part +4 -0
  93. package/assets/templates/views/home/assembly/slots/benefits/Feature1/registry.part +11 -0
  94. package/assets/templates/views/home/assembly/slots/benefits/Feature2/binding.json +5 -0
  95. package/assets/templates/views/home/assembly/slots/benefits/Feature2/catalog.part +4 -0
  96. package/assets/templates/views/home/assembly/slots/benefits/Feature2/element.part +4 -0
  97. package/assets/templates/views/home/assembly/slots/benefits/Feature2/registry.part +10 -0
  98. package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/binding.json +5 -0
  99. package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/catalog.part +4 -0
  100. package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/element.part +5 -0
  101. package/assets/templates/views/home/assembly/slots/categories/ProductCategory2/registry.part +16 -0
  102. package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/binding.json +5 -0
  103. package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/catalog.part +4 -0
  104. package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/element.part +5 -0
  105. package/assets/templates/views/home/assembly/slots/hero/StorefrontHero1/registry.part +26 -0
  106. package/assets/templates/views/home/content.ts +70 -0
  107. package/assets/templates/views/home/data.ts +24 -0
  108. package/assets/templates/views/home/index.tsx +57 -85
  109. package/assets/templates/views/home/props.ts +22 -0
  110. package/assets/templates/views/home/registry.tsx +38 -22
  111. package/assets/templates/views/home/schema.ts +93 -0
  112. package/assets/templates/views/product/content.ts +25 -0
  113. package/assets/templates/views/product/data.ts +50 -0
  114. package/assets/templates/views/product/index.tsx +148 -0
  115. package/assets/templates/views/product/props.ts +27 -0
  116. package/assets/templates/views/product/registry.tsx +103 -0
  117. package/assets/templates/views/product/schema.ts +121 -0
  118. package/assets/templates/views/static/content.ts +99 -0
  119. package/assets/templates/views/static/index.tsx +60 -0
  120. package/assets/templates/views/static/registry.tsx +66 -0
  121. package/assets/templates/views/static/schema.ts +45 -0
  122. package/bin/storefront.js +2424 -148
  123. package/examples/merchandising/category-led.json +37 -0
  124. package/examples/merchandising/collection-led.json +37 -0
  125. package/package.json +15 -9
  126. package/recipes/archetypes.json +28 -14
  127. package/recipes/catalog.json +400 -0
  128. package/recipes/catalog.mjs +128 -0
  129. package/recipes/catalog.schema.json +64 -0
  130. package/recipes/feature.schema.json +89 -0
  131. package/recipes/features.json +162 -0
  132. package/recipes/manifest.schema.json +69 -0
  133. package/recipes/operations.schema.json +43 -0
  134. package/recipes/recipe.schema.json +11 -2
  135. package/recipes/recipes.json +76 -19
  136. package/recipes/sections.json +34 -5
  137. package/recipes/validate.mjs +838 -32
  138. package/scripts/candidate.mjs +236 -0
  139. package/scripts/composers.mjs +160 -0
  140. package/scripts/env-file.mjs +86 -0
  141. package/scripts/file-classes.mjs +121 -0
  142. package/scripts/logical-controls.mjs +61 -0
  143. package/scripts/manifest.mjs +298 -0
  144. package/scripts/migrate-english-routes.mjs +276 -0
  145. package/scripts/operation-registry.mjs +256 -0
  146. package/scripts/operations.mjs +720 -0
  147. package/scripts/ownership-conflict.mjs +356 -0
  148. package/scripts/pinning.mjs +573 -0
  149. package/scripts/plan-apply.mjs +987 -0
  150. package/scripts/preflight.mjs +51 -0
  151. package/scripts/reconcile.mjs +549 -0
  152. package/scripts/render-templates.mjs +338 -68
  153. package/scripts/schema-validate.mjs +132 -0
  154. package/scripts/section-compat.mjs +300 -0
  155. package/scripts/section-config.mjs +253 -0
  156. package/scripts/section-operations.mjs +508 -0
  157. package/scripts/starter.mjs +17 -0
  158. package/scripts/sync-assets.mjs +22 -15
  159. package/scripts/theme/color.mjs +185 -0
  160. package/scripts/theme/css-theme.mjs +233 -0
  161. package/scripts/theme/fonts.mjs +123 -0
  162. package/scripts/theme/import-export.mjs +125 -0
  163. package/scripts/theme/preset.mjs +93 -0
  164. package/scripts/theme/theme-plan.mjs +292 -0
  165. package/scripts/theme/tokens.mjs +137 -0
  166. package/scripts/view-assembly.mjs +337 -0
  167. package/scripts/view-selection.mjs +211 -0
  168. package/skills/sf-feature/SKILL.md +80 -0
  169. package/skills/sf-setup/SKILL.md +79 -0
  170. package/skills/sf-theme-gen/SKILL.md +100 -30
  171. package/skills/sf-theme-gen/references/shadcn-theming.md +87 -0
  172. package/skills/{shadcn-theming/references/templates → sf-theme-gen/references}/theme-setup.md +15 -19
  173. package/skills/{shadcn-theming → sf-theme-gen}/references/theming-guide.md +6 -11
  174. package/skills/sf-view-gen/SKILL.md +146 -93
  175. package/skills/sf-view-gen/assets/recipes/archetypes.json +28 -14
  176. package/skills/sf-view-gen/assets/recipes/catalog.json +400 -0
  177. package/skills/sf-view-gen/assets/recipes/catalog.schema.json +64 -0
  178. package/skills/sf-view-gen/assets/recipes/features.json +162 -0
  179. package/skills/sf-view-gen/assets/recipes/recipes.json +76 -19
  180. package/skills/sf-view-gen/assets/recipes/sections.json +34 -5
  181. package/skills/sf-view-gen/assets/templates/views/sections/cta.client.tsx +25 -0
  182. package/skills/sf-view-gen/assets/templates/views/sections/cta.tsx +16 -0
  183. package/skills/sf-view-gen/assets/templates/views/sections/faq.client.tsx +13 -9
  184. package/skills/sf-view-gen/assets/templates/views/sections/faq.tsx +2 -7
  185. package/skills/sf-view-gen/assets/templates/views/sections/logoCloud.client.tsx +12 -8
  186. package/skills/sf-view-gen/assets/templates/views/sections/logoCloud.tsx +2 -7
  187. package/skills/sf-view-gen/assets/templates/views/sections/pricing.client.tsx +14 -10
  188. package/skills/sf-view-gen/assets/templates/views/sections/pricing.tsx +2 -9
  189. package/skills/sf-view-gen/assets/templates/views/sections/products.client.tsx +100 -0
  190. package/skills/sf-view-gen/assets/templates/views/sections/products.tsx +19 -0
  191. package/skills/sf-view-gen/assets/templates/views/sections/schema.cta.ts +19 -0
  192. package/skills/sf-view-gen/assets/templates/views/sections/schema.faq.ts +18 -0
  193. package/skills/sf-view-gen/assets/templates/views/sections/schema.logoCloud.ts +19 -0
  194. package/skills/sf-view-gen/assets/templates/views/sections/schema.pricing.ts +26 -0
  195. package/skills/sf-view-gen/assets/templates/views/sections/schema.products.ts +39 -0
  196. package/skills/sf-view-gen/assets/templates/views/sections/schema.statistics.ts +25 -0
  197. package/skills/sf-view-gen/assets/templates/views/sections/schema.testimonials.ts +23 -0
  198. package/skills/sf-view-gen/assets/templates/views/sections/statistics.client.tsx +16 -8
  199. package/skills/sf-view-gen/assets/templates/views/sections/statistics.tsx +2 -7
  200. package/skills/sf-view-gen/assets/templates/views/sections/testimonials.client.tsx +13 -9
  201. package/skills/sf-view-gen/assets/templates/views/sections/testimonials.tsx +2 -5
  202. package/skills/{json-render-core/SKILL.md → sf-view-gen/references/json-render-core.md} +4 -27
  203. package/skills/{json-render-next/SKILL.md → sf-view-gen/references/json-render-next.md} +5 -8
  204. package/skills/{json-render-react/SKILL.md → sf-view-gen/references/json-render-react.md} +3 -5
  205. package/skills/{json-render-shadcn/SKILL.md → sf-view-gen/references/json-render-shadcn.md} +3 -5
  206. package/skills/sf-view-gen/references/views.md +58 -33
  207. package/skills/sf-view-gen/scripts/catalog.mjs +128 -0
  208. package/skills/sf-view-gen/scripts/schema-validate.mjs +132 -0
  209. package/skills/sf-view-gen/scripts/validate.mjs +838 -32
  210. package/skills/storefront-workflow/SKILL.md +179 -0
  211. package/skills/{storefront-best-practices/reference/design.md → storefront-workflow/references/design-consistency.md} +13 -29
  212. package/CHANGELOG.md +0 -61
  213. package/commands/sf-add-view.md +0 -26
  214. package/commands/sf-theme.md +0 -20
  215. package/commands/sf-view.md +0 -25
  216. package/skills/building-storefronts/SKILL.md +0 -178
  217. package/skills/building-storefronts/references/frontend-integration.md +0 -229
  218. package/skills/json-render-remotion/SKILL.md +0 -111
  219. package/skills/json-render-solid/SKILL.md +0 -204
  220. package/skills/nextjs-shadcn/SKILL.md +0 -367
  221. package/skills/nextjs-shadcn/references/architecture.md +0 -499
  222. package/skills/nextjs-shadcn/references/project-setup.md +0 -162
  223. package/skills/nextjs-shadcn/references/shadcn-platform.md +0 -261
  224. package/skills/nextjs-shadcn/references/sidebar.md +0 -274
  225. package/skills/nextjs-shadcn/references/styling.md +0 -555
  226. package/skills/sf-view-gen/assets/templates/views/category/index.tsx +0 -86
  227. package/skills/sf-view-gen/assets/templates/views/category/registry.tsx +0 -48
  228. package/skills/sf-view-gen/assets/templates/views/checkout/index.tsx +0 -192
  229. package/skills/sf-view-gen/assets/templates/views/checkout/registry.tsx +0 -45
  230. package/skills/sf-view-gen/assets/templates/views/product/index.tsx +0 -122
  231. package/skills/sf-view-gen/assets/templates/views/product/registry.tsx +0 -49
  232. package/skills/sf-view-gen/assets/templates/views/user-panel/index.tsx +0 -168
  233. package/skills/sf-view-gen/assets/templates/views/user-panel/registry.tsx +0 -49
  234. package/skills/shadcn-component-discovery/SKILL.md +0 -273
  235. package/skills/shadcn-component-discovery/references/registries.md +0 -226
  236. package/skills/shadcn-theming/SKILL.md +0 -104
  237. package/skills/storefront-best-practices/SKILL.md +0 -421
  238. package/skills/storefront-best-practices/reference/components/breadcrumbs.md +0 -123
  239. package/skills/storefront-best-practices/reference/components/cart-popup.md +0 -189
  240. package/skills/storefront-best-practices/reference/components/country-selector.md +0 -298
  241. package/skills/storefront-best-practices/reference/components/footer.md +0 -112
  242. package/skills/storefront-best-practices/reference/components/hero.md +0 -241
  243. package/skills/storefront-best-practices/reference/components/megamenu.md +0 -239
  244. package/skills/storefront-best-practices/reference/components/navbar.md +0 -397
  245. package/skills/storefront-best-practices/reference/components/popups.md +0 -221
  246. package/skills/storefront-best-practices/reference/components/product-card.md +0 -125
  247. package/skills/storefront-best-practices/reference/components/product-reviews.md +0 -217
  248. package/skills/storefront-best-practices/reference/components/product-slider.md +0 -174
  249. package/skills/storefront-best-practices/reference/components/search.md +0 -101
  250. package/skills/storefront-best-practices/reference/connecting-to-backend.md +0 -391
  251. package/skills/storefront-best-practices/reference/features/promotions.md +0 -307
  252. package/skills/storefront-best-practices/reference/features/wishlist.md +0 -230
  253. package/skills/storefront-best-practices/reference/layouts/account.md +0 -380
  254. package/skills/storefront-best-practices/reference/layouts/cart.md +0 -316
  255. package/skills/storefront-best-practices/reference/layouts/checkout.md +0 -486
  256. package/skills/storefront-best-practices/reference/layouts/home-page.md +0 -264
  257. package/skills/storefront-best-practices/reference/layouts/order-confirmation.md +0 -231
  258. package/skills/storefront-best-practices/reference/layouts/product-details.md +0 -527
  259. package/skills/storefront-best-practices/reference/layouts/product-listing.md +0 -520
  260. package/skills/storefront-best-practices/reference/layouts/static-pages.md +0 -356
  261. package/skills/storefront-best-practices/reference/medusa.md +0 -307
  262. /package/skills/{storefront-best-practices/reference → storefront-workflow/references}/mobile-responsiveness.md +0 -0
  263. /package/skills/{storefront-best-practices/reference → storefront-workflow/references}/seo.md +0 -0
@@ -1,273 +0,0 @@
1
- ---
2
- name: shadcn-component-discovery
3
- description: Discover shadcn-compatible components and registries across the entire ecosystem before writing any custom UI. Use PROACTIVELY before building tables, forms, modals, animations, dashboards, auth pages, or any UI component. Use when the user says "find a component for...", "is there something for...", "search registries", "what exists for...", or asks about shadcn blocks, Magic UI, Aceternity, ReUI, Animate UI, DiceUI, Tailark, AI Elements, or any other shadcn-compatible registry. Complements the official shadcn skill by surfacing registries beyond the user's configured `components.json` — use when exploring what's available to add, not just what's already installed.
4
- ---
5
-
6
- # shadcn Component Discovery
7
-
8
- Surface existing components from across the shadcn ecosystem — including registries the user hasn't configured yet — before spending effort on custom implementations.
9
-
10
- ## How This Complements the Official shadcn Skill
11
-
12
- The official `shadcn` skill (shipped with CLI v4) searches the registries declared in the user's `components.json`. That's the right tool once the user has decided which registries to use.
13
-
14
- This skill fills the *upstream* gap: ecosystem-wide awareness. It helps the user find and choose registries they may not yet have configured — Magic UI for animations, Aceternity for hero sections, AI Elements for chat interfaces, ElevenLabs UI for voice components, and so on. Use this skill for "what exists out there"; let the official skill handle "install this thing I know about."
15
-
16
- When both skills apply, this one runs first (discovery), then the official skill takes over for installation and project-aware work.
17
-
18
- ## Core Principle
19
-
20
- Search before building. Most UI needs have been solved in the shadcn ecosystem. The cost of a 10-second registry check is almost always less than custom-building something that already exists.
21
-
22
- ## When to Trigger
23
-
24
- **Proactive triggers** (activate before writing any component code):
25
-
26
- - User asks to build a table, form, modal, sidebar, dashboard, auth page, landing section, animation, carousel, chart, or any standard UI pattern
27
- - User describes a feature that implies UI (e.g. "add user accounts management" → table; "let users pick a date range" → date picker)
28
- - User mentions building something "like X" where X is a common pattern
29
-
30
- **Explicit triggers** (user directly requests search):
31
-
32
- - "Find a component for..."
33
- - "Is there a shadcn component for..."
34
- - "Search registries for..."
35
- - "What exists for..."
36
- - "Any good [category] components?"
37
- - Direct mentions of specific registries (@animate-ui, Magic UI, Aceternity, Tailark, etc.)
38
-
39
- ## Workflow
40
-
41
- ### Step 1: Clarify the Need
42
-
43
- Before searching, confirm:
44
-
45
- - **Functionality**: What must it do? (e.g. sortable + filterable + paginated table)
46
- - **Style**: Animated, minimal, accessible-first, dense, brutalist?
47
- - **Constraints**: Must support keyboard nav? Drag-drop? Mobile-first? SSR?
48
-
49
- A two-sentence clarification beats five searches with the wrong query.
50
-
51
- ### Step 2: Search
52
-
53
- Three paths depending on tool availability. The **official shadcn MCP** is strongly preferred when the user has a shadcn project — it returns real results with code examples.
54
-
55
- #### Path A: Official shadcn MCP (preferred)
56
-
57
- If the shadcn MCP server is running (configured via `npx shadcn@latest mcp init` or equivalent), use its tools directly:
58
-
59
- ```text
60
- 1. mcp__shadcn__search_items_in_registries
61
- - registries: ["@shadcn", "@blocks", "@animate-ui", "@reui", "@diceui"]
62
- - query: "<search term>"
63
- - limit: 10
64
-
65
- 2. For promising results, get full details:
66
- mcp__shadcn__view_items_in_registries
67
- - items: ["@registry/component-name", "@registry/other"]
68
-
69
- 3. For implementation examples:
70
- mcp__shadcn__get_item_examples_from_registries
71
- - query: "<component>-demo"
72
-
73
- 4. For the install command:
74
- mcp__shadcn__get_add_command_for_items
75
- - items: ["@registry/chosen-component"]
76
- ```
77
-
78
- The MCP only searches registries configured in the user's `components.json`. If the user is looking for something specialized, suggest adding a relevant registry to `components.json` first — see `references/registries.md` for recommendations and configuration snippets.
79
-
80
- #### Path B: shadcn CLI (no MCP, but shadcn project)
81
-
82
- If there's a `components.json` but no MCP is configured, use the CLI commands that shipped with CLI v3:
83
-
84
- ```bash
85
- # Search across configured registries
86
- npx shadcn@latest search "<term>"
87
-
88
- # Preview a component before installing
89
- npx shadcn@latest view @registry/component-name
90
-
91
- # List everything available in a registry
92
- npx shadcn@latest list @registry
93
- ```
94
-
95
- Suggest adding the MCP for better agent integration: `npx shadcn@latest mcp init`.
96
-
97
- #### Path C: No project context
98
-
99
- If there's no shadcn project yet, or the user is just exploring:
100
-
101
- - Recommend registries from `references/registries.md` based on their described need
102
- - Link directly to the registry's website so they can browse
103
- - Offer to help set up a shadcn project (`npx shadcn@latest init`) once they've picked direction
104
-
105
- ### Step 3: Present Findings
106
-
107
- Match the response format to the context. Keep it scannable — the user is about to make a decision, not read an essay.
108
-
109
- #### Proactive check (during build flow)
110
-
111
- When the user didn't explicitly ask to search but you searched anyway:
112
-
113
- ```markdown
114
- Before building custom, I found existing options:
115
-
116
- 1. **@registry/component-name** — [one-line description]
117
- 2. **@registry/alternative** — [one-line description]
118
-
119
- Want me to install one, or build custom?
120
- ```
121
-
122
- Keep it under five lines. The user is in flow; don't derail them.
123
-
124
- #### Explicit search (user asked)
125
-
126
- ```markdown
127
- ## Results for "<query>"
128
-
129
- **Top matches:**
130
-
131
- ### @registry/component-name ⭐
132
- [What it does in one sentence]
133
- - Fits because: [specific to their need]
134
- - Install: `npx shadcn@latest add @registry/component-name`
135
-
136
- ### @registry/alternative
137
- [What it does in one sentence]
138
- - Fits because: [specific to their need]
139
- - Install: `npx shadcn@latest add @registry/alternative`
140
-
141
- ---
142
- Install [1] or [2], see more results, view code example, or build custom?
143
- ```
144
-
145
- #### Comparison (multiple good options, choice matters)
146
-
147
- Use a short table when 3+ options are genuinely viable and trade off differently. Follow with a recommendation and the install command for the recommended one. Don't table-ify everything — it's heavier than plain prose and should earn its place.
148
-
149
- ### Step 4: Execute the Choice
150
-
151
- - **Install chosen**: Run the `add` command, then customize via props / composition as needed
152
- - **See more**: Return additional matches, continue pagination
153
- - **View code**: Fetch example via `get_item_examples_from_registries` or the registry's demo URL
154
- - **Build custom**: Proceed — but reference the closest existing component for composition patterns (CVA, `cn()`, `data-slot`, semantic tokens)
155
-
156
- ## Search Strategy
157
-
158
- ### Effective Query Terms
159
-
160
- Short, concrete nouns work best. Keep queries to 1–3 words.
161
-
162
- | Looking for… | Try searching… |
163
- |---|---|
164
- | Data display | `table`, `data-grid`, `list` |
165
- | User input | `form`, `input`, `field`, `select`, `combobox` |
166
- | Navigation | `sidebar`, `nav`, `menu`, `tabs`, `breadcrumb` |
167
- | Feedback | `toast`, `sonner`, `alert`, `notification` |
168
- | Overlays | `dialog`, `modal`, `sheet`, `popover`, `drawer` |
169
- | Media | `carousel`, `gallery`, `image` |
170
- | Animation | `animate`, `motion`, `transition` |
171
- | Layout | `card`, `section`, `hero`, `grid`, `stack` |
172
- | Date/time | `calendar`, `date-picker`, `date-range` |
173
-
174
- ### Registry Specialties (Quick Pick)
175
-
176
- | Need | Check first |
177
- |---|---|
178
- | Core UI primitives | `@shadcn` |
179
- | Page sections, pre-built blocks | `@blocks`, Tailark, HextaUI |
180
- | Data grids, advanced tables | `@reui` |
181
- | Animated components | `@animate-ui`, Magic UI, Aceternity UI |
182
- | AI / chat interfaces | AI Elements, assistant-ui |
183
- | Accessibility-first (React Aria) | `@diceui`, JollyUI, Intent UI |
184
- | Voice / audio | ElevenLabs UI |
185
- | Marketing / landing pages | Tailark, Eldora UI |
186
- | Style variants (brutalist, retro, glass) | See `references/registries.md` |
187
-
188
- For the full catalog including URLs, configuration snippets, and registry specialties, see [references/registries.md](references/registries.md).
189
-
190
- ## Response Requirements
191
-
192
- Every discovery response should surface:
193
-
194
- 1. **What was searched** — the query used
195
- 2. **Top 2–3 recommendations** — registry-qualified name, one-line description, why it fits
196
- 3. **Install command** — ready to copy
197
- 4. **A recommendation** — which to pick, when there's a clear fit
198
- 5. **Next-step options** — install, view code, see more, build custom
199
-
200
- Skip anything beyond this unless the user asks. Brevity respects flow.
201
-
202
- ## Examples
203
-
204
- ### Proactive check
205
-
206
- **User:** "Add a table showing user accounts with sorting"
207
-
208
- **Response:**
209
-
210
- > Before building custom, I found existing options:
211
- >
212
- > 1. **@reui/data-grid-table** — Full-featured grid with sorting, filtering, pagination
213
- > 2. **@shadcn/table** — Unstyled primitives (pair with TanStack Table for sorting)
214
- >
215
- > `@reui/data-grid-table` looks like the fit — install it?
216
-
217
- ### Explicit search
218
-
219
- **User:** "Find me an animated accordion"
220
-
221
- **Response:**
222
-
223
- > ## Results for "animated accordion"
224
- >
225
- > ### @animate-ui/components-base-accordion ⭐
226
- > Accordion with smooth enter/exit transitions built on Motion.
227
- > - Fits because: Animation is built-in, accessible, keyboard nav included
228
- > - Install: `npx shadcn@latest add @animate-ui/components-base-accordion`
229
- >
230
- > ### @shadcn/accordion
231
- > Standard Radix-based accordion, unanimated by default.
232
- > - Fits because: Lighter dependency footprint; you add your own motion
233
- > - Install: `npx shadcn@latest add @shadcn/accordion`
234
- >
235
- > ---
236
- > Install animated [1], install plain [2], or see more?
237
-
238
- ### No good match
239
-
240
- **User:** "Find a component for visualizing git commit lineage"
241
-
242
- **Response:**
243
-
244
- > ## Results for "git commit lineage"
245
- >
246
- > No directly matching components in the shadcn ecosystem. Closest adjacencies:
247
- > - `@reui/tree` — tree visualizations (could adapt)
248
- > - `@shadcn/chart` — generic charting (Recharts-based)
249
- >
250
- > This is a custom build. Want me to sketch an approach using one of these as a foundation, or look at non-shadcn libraries like `@gitgraph/react`?
251
-
252
- ## Best Practices
253
-
254
- **Do:**
255
- - Search before writing component code — always
256
- - Surface 2–3 options, not 10
257
- - Explain *why* each fits the specific need
258
- - Include the install command, not just the name
259
- - Recommend when the choice is clear
260
-
261
- **Don't:**
262
- - Skip searching because "it's faster to build" (it usually isn't)
263
- - Dump the full search-result list — curate
264
- - Present registries the user hasn't configured without mentioning the `components.json` step
265
- - Recommend unmaintained or abandoned registries (check `references/registries.md` for current status)
266
-
267
- ## Resources
268
-
269
- - **Registry catalog**: [references/registries.md](references/registries.md)
270
- - **Official shadcn docs**: https://ui.shadcn.com
271
- - **Official shadcn MCP docs**: https://ui.shadcn.com/docs/mcp
272
- - **Registry browser**: https://registry.directory
273
- - **Component index**: https://shadcnregistry.com
@@ -1,226 +0,0 @@
1
- # shadcn-Compatible Registry Catalog
2
-
3
- Curated catalog of registries that work with the shadcn CLI and MCP, organized by specialty. Recommendations here are for narrowing the field quickly — for an exhaustive live list, see the canonical aggregator at [shadcn.io/awesome/registries](https://www.shadcn.io/awesome/registries).
4
-
5
- ## Core Registries
6
-
7
- Well-maintained registries that cover most project needs. Start here.
8
-
9
- ### @shadcn — Official primitives
10
- **URL:** [ui.shadcn.com](https://ui.shadcn.com)
11
- **Focus:** Core UI primitives built on Radix or Base UI
12
- **Best for:** Buttons, inputs, cards, dialogs, tables, the foundational layer of any project
13
-
14
- ### @blocks — Official blocks
15
- **URL:** [ui.shadcn.com/blocks](https://ui.shadcn.com/blocks)
16
- **Focus:** Pre-built page sections using official primitives
17
- **Best for:** Dashboards, auth pages, sidebars, settings layouts — production-ready starting points
18
-
19
- ### @reui
20
- **URL:** [reui.io](https://reui.io)
21
- **Focus:** Advanced components and full app templates
22
- **Best for:** Data grids, complex forms, admin panels, full page templates beyond basic primitives
23
-
24
- ### @animate-ui
25
- **URL:** [animate-ui.com](https://animate-ui.com)
26
- **Focus:** Animated components built with Motion (formerly Framer Motion)
27
- **Best for:** Transitions, micro-interactions, animated backgrounds, polished UI
28
-
29
- ### @aceternity
30
- **URL:** [ui.aceternity.com](https://ui.aceternity.com)
31
- **Focus:** Effect-heavy animated components and landing page elements
32
- **Best for:** Hero sections, 3D cards, spotlight effects, visually striking marketing pages
33
-
34
- ### @diceui
35
- **URL:** [diceui.com](https://diceui.com)
36
- **Focus:** Accessibility-first components (React Aria based)
37
- **Best for:** Enterprise apps, WCAG-compliant projects, keyboard-heavy UIs
38
-
39
- ---
40
-
41
- ## Specialty Registries
42
-
43
- ### AI & Chat Interfaces
44
-
45
- | Registry | Focus | URL |
46
- |---|---|---|
47
- | AI Elements | Radix-style primitives for AI chat, message threads, streaming | [aielements.dev](https://aielements.dev) |
48
- | assistant-ui | AI assistant interfaces with backend adapters (AI SDK, LangGraph, Mastra) | [assistant-ui.com](https://assistant-ui.com) |
49
- | Manifest UI | ChatGPT-style application patterns | [manifest-ui.com](https://manifest-ui.com) |
50
-
51
- **Search terms:** `chat`, `message`, `conversation`, `ai`, `assistant`, `streaming`, `thread`
52
-
53
- ### Animation & Motion
54
-
55
- | Registry | Focus | URL |
56
- |---|---|---|
57
- | Magic UI | Animated components, especially landing-page focused | [magicui.design](https://magicui.design) |
58
- | Cult UI | Design-engineer animations and interactions | [cult-ui.com](https://cult-ui.com) |
59
- | Motion Primitives | Low-level motion building blocks | [motion-primitives.com](https://motion-primitives.com) |
60
- | Kokonut UI | Stylized animated UI components | [kokonutui.com](https://kokonutui.com) |
61
-
62
- **Search terms:** `animate`, `motion`, `transition`, `hover`, `entrance`, `particles`
63
-
64
- ### Marketing & Landing Pages
65
-
66
- | Registry | Focus | URL |
67
- |---|---|---|
68
- | Tailark | Marketing-focused blocks | [tailark.com](https://tailark.com) |
69
- | Shadcnblocks | Premium block library with 1000+ blocks and templates (paid) | [shadcnblocks.com](https://shadcnblocks.com) |
70
- | Eldora UI | Landing page components | [eldoraui.com](https://eldoraui.com) |
71
- | HextaUI | Extended blocks and components | [hextaui.com](https://hextaui.com) |
72
-
73
- **Search terms:** `hero`, `cta`, `pricing`, `features`, `testimonial`, `landing`
74
-
75
- ### Data & Tables
76
-
77
- | Registry | Focus | URL |
78
- |---|---|---|
79
- | @reui | Advanced data grids with sorting/filtering/DnD | [reui.io](https://reui.io) |
80
-
81
- **Search terms:** `table`, `data-grid`, `column`, `sort`, `filter`, `pagination`, `virtualized`
82
-
83
- **Note:** For very large or complex tables, `@shadcn/table` + TanStack Table is often the better path than a pre-built grid. The shadcn Data Table docs cover this pattern.
84
-
85
- ### Forms & Validation
86
-
87
- | Registry | Focus | URL |
88
- |---|---|---|
89
- | @shadcn | Core form primitives (`form`, `input`, `field`, `field-group`, `input-group`) | [ui.shadcn.com](https://ui.shadcn.com) |
90
- | Shadcn Form Builder | Form-generation utilities | [shadcn-form-builder.vercel.app](https://shadcn-form-builder.vercel.app) |
91
-
92
- **Search terms:** `form`, `input`, `field`, `validation`, `submit`
93
-
94
- ### Voice & Audio
95
-
96
- | Registry | Focus | URL |
97
- |---|---|---|
98
- | ElevenLabs UI | Voice agents, audio players, waveform visualizations | [elevenlabs.io](https://elevenlabs.io) |
99
-
100
- **Search terms:** `audio`, `voice`, `waveform`, `player`, `orb`
101
-
102
- ### Style Variants
103
-
104
- | Registry | Style | URL |
105
- |---|---|---|
106
- | 8bitcn | Retro 8-bit pixel style | [8bitcn.com](https://8bitcn.com) |
107
- | RetroUI | Neobrutalism | [retroui.dev](https://retroui.dev) |
108
- | Neobrutalism UI | Bold brutalist aesthetic | [neobrutalism.dev](https://neobrutalism.dev) |
109
-
110
- **Search terms:** `retro`, `brutalist`, `glass`, `pixel`, `8bit`
111
-
112
- ### Accessibility-First
113
-
114
- | Registry | Focus | URL |
115
- |---|---|---|
116
- | JollyUI | React Aria based | [jollyui.dev](https://jollyui.dev) |
117
- | Intent UI | Accessible, customizable | [intent-ui.com](https://intent-ui.com) |
118
- | Kibo UI | Composable, accessible patterns | [kibo-ui.com](https://kibo-ui.com) |
119
-
120
- **Search terms:** `accessible`, `aria`, `a11y`, `keyboard`
121
-
122
- ### Icons
123
-
124
- | Registry | Focus | URL |
125
- |---|---|---|
126
- | pqoqubbw/icons | Animated Lucide icons | [icons.pqoqubbw.dev](https://icons.pqoqubbw.dev) |
127
-
128
- **Search terms:** `icon`, `animated-icon`, `lucide`
129
-
130
- ---
131
-
132
- ## Quick-Pick by Project Type
133
-
134
- | Building… | Start with |
135
- |---|---|
136
- | SaaS dashboard | `@shadcn`, `@blocks`, `@reui` |
137
- | Marketing site | Tailark, Aceternity, Magic UI |
138
- | AI application | AI Elements, assistant-ui, `@animate-ui` |
139
- | Admin panel | `@reui`, `@blocks`, `@diceui` |
140
- | E-commerce | `@shadcn`, `@blocks`, `@reui` |
141
- | Portfolio | Aceternity, Magic UI, Cult UI |
142
- | Enterprise app | `@diceui`, JollyUI, `@shadcn` |
143
- | Voice / audio app | ElevenLabs UI, `@shadcn` |
144
-
145
- ---
146
-
147
- ## Configuring Registries
148
-
149
- Since shadcn CLI 3.0, registries are declared with namespaces in `components.json` using a `{name}` URL template:
150
-
151
- ```json
152
- {
153
- "registries": {
154
- "@animate-ui": "https://animate-ui.com/r/{name}.json",
155
- "@aceternity": "https://ui.aceternity.com/registry/{name}.json",
156
- "@reui": "https://reui.io/r/{name}.json",
157
- "@magicui": "https://magicui.design/r/{name}.json"
158
- }
159
- }
160
- ```
161
-
162
- For each registry, check the registry's own docs for the exact URL — templates occasionally differ. Once registered, install with `npx shadcn@latest add @namespace/component-name`.
163
-
164
- ### Authenticated Registries
165
-
166
- Paid or private registries take a config object with headers:
167
-
168
- ```json
169
- {
170
- "registries": {
171
- "@shadcnblocks": {
172
- "url": "https://shadcnblocks.com/r/{name}.json",
173
- "headers": {
174
- "Authorization": "Bearer ${SHADCNBLOCKS_API_KEY}"
175
- }
176
- }
177
- }
178
- }
179
- ```
180
-
181
- The `${ENV_VAR}` syntax reads from the environment at CLI/MCP invocation time. Never commit raw tokens.
182
-
183
- ---
184
-
185
- ## Discovery Commands (CLI)
186
-
187
- shadcn CLI ships search and discovery commands that complement MCP-based discovery:
188
-
189
- ```bash
190
- # Search configured registries
191
- npx shadcn@latest search "data table"
192
-
193
- # Preview a component before installing
194
- npx shadcn@latest view @reui/data-grid-table
195
-
196
- # List everything in a registry
197
- npx shadcn@latest list @animate-ui
198
-
199
- # Get documentation and examples for an installed component
200
- npx shadcn@latest docs combobox
201
- ```
202
-
203
- ---
204
-
205
- ## Browsing Registries Manually
206
-
207
- When the MCP or CLI isn't available (or the user wants to browse visually):
208
-
209
- - **[shadcn.io/awesome/registries](https://www.shadcn.io/awesome/registries)** — Canonical aggregator, maintained alongside the docs
210
- - **[registry.directory](https://registry.directory)** — Third-party registry browser
211
- - **[shadcnregistry.com](https://shadcnregistry.com)** — Searchable component index across registries
212
- - **[ui.shadcn.com/blocks](https://ui.shadcn.com/blocks)** — Official blocks gallery
213
-
214
- Each registry's own site typically has demos and copy-pasteable snippets.
215
-
216
- ---
217
-
218
- ## Notes on Registry Health
219
-
220
- Registry quality and maintenance varies. When recommending a registry, favor:
221
-
222
- - Registries referenced on the official shadcn.io/awesome list (signals active maintenance)
223
- - Registries with clear `{name}.json` URL schemas (signals MCP/CLI compatibility)
224
- - Registries with demos and example code (signals commitment to usability)
225
-
226
- Avoid recommending registries without recent updates, without clear documentation, or with broken install flows. When in doubt, fall back to `@shadcn` + `@blocks` + build custom.
@@ -1,104 +0,0 @@
1
- ---
2
- name: shadcn-theming
3
- description: "Use when defining or auditing shadcn/ui design tokens, OKLCH colors, or dark/light mode CSS variables."
4
- versions:
5
- shadcn-ui: "2.x"
6
- tailwindcss: "4.1"
7
- user-invocable: true
8
- allowed-tools: Read, Write, Edit, Glob, Grep
9
- references: references/theming-guide.md, references/templates/theme-setup.md
10
- related-skills: shadcn-registries, shadcn-components
11
- ---
12
-
13
- <objective>
14
- Design tokens and theming for shadcn/ui: CSS custom properties (`--background`, `--primary`, etc.), OKLCH wide-gamut colors, dark/light mode via the `.dark` class or `prefers-color-scheme`, and Tailwind v4 `@theme` directive integration — for both Radix and Base UI primitives.
15
-
16
- Documents the token hierarchy (component → semantic → primitive OKLCH values) and the validation checklist (dark-mode overrides, chart/sidebar variables, no hard-coded hex).
17
- </objective>
18
-
19
- # shadcn Theming
20
-
21
- ## Agent Workflow (MANDATORY)
22
-
23
- Before theming work, use `TeamCreate`:
24
-
25
- 1. **fuse-ai-pilot:explore-codebase** - Find existing theme tokens
26
- 2. **fuse-ai-pilot:research-expert** - Verify OKLCH patterns via Context7
27
-
28
- After: Run **fuse-ai-pilot:sniper** for validation.
29
-
30
- ## Overview
31
-
32
- | Feature | Description |
33
- |---------|-------------|
34
- | **CSS Variables** | `--background`, `--foreground`, `--primary` |
35
- | **OKLCH Colors** | Wide-gamut P3 color space |
36
- | **Dark Mode** | `.dark` class or `prefers-color-scheme` |
37
- | **Tailwind v4** | `@theme` directive integration |
38
-
39
- ## Critical Rules
40
-
41
- 1. **ALWAYS use OKLCH** color space for all tokens
42
- 2. **ALWAYS define dark mode** overrides for every token
43
- 3. **NEVER hard-code** hex or rgb in components
44
- 4. **USE @theme** directive for Tailwind v4 integration
45
- 5. **MAP semantic tokens** to primitive OKLCH values
46
-
47
- ## Architecture
48
-
49
- ```
50
- app/
51
- ├── globals.css # :root + .dark token definitions
52
- └── tailwind.config.ts # Optional (v3) or @theme (v4)
53
- ```
54
-
55
- -> See [theme-setup.md](references/templates/theme-setup.md) for complete theme
56
-
57
- ## Token Hierarchy
58
-
59
- ```
60
- Component: --card, --card-foreground, --button-*
61
- ↑
62
- Semantic: --primary, --secondary, --accent, --muted
63
- ↑
64
- Primitive: oklch(55% 0.20 260), oklch(98% 0.01 260)
65
- ```
66
-
67
- ## Validation Checklist
68
-
69
- ```
70
- [ ] CSS variables defined in :root
71
- [ ] Dark mode overrides in .dark
72
- [ ] OKLCH color space used
73
- [ ] Chart variables (--chart-1 to --chart-5)
74
- [ ] Sidebar variables if applicable
75
- [ ] No hard-coded hex in components
76
- ```
77
-
78
- ## Best Practices
79
-
80
- ### DO
81
- - Use OKLCH for all colors
82
- - Define semantic tokens mapped to primitives
83
- - Provide dark mode overrides for all tokens
84
- - Use `@theme` for Tailwind v4 integration
85
-
86
- ### DON'T
87
- - Hard-code hex or rgb values
88
- - Skip dark mode definitions
89
- - Mix color spaces (hex + oklch)
90
- - Define tokens only in Tailwind config
91
-
92
- ## Reference Guide
93
-
94
- ### Concepts
95
-
96
- | Topic | Reference | When to Consult |
97
- |-------|-----------|-----------------|
98
- | **Theming Guide** | [theming-guide.md](references/theming-guide.md) | CSS variables and OKLCH setup |
99
-
100
- ### Templates
101
-
102
- | Template | When to Use |
103
- |----------|-------------|
104
- | [theme-setup.md](references/templates/theme-setup.md) | Complete theme configuration |