drivn 1.8.0 → 1.9.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/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import {Command}from'commander';import*as n from'@clack/prompts';import m from'p
|
|
|
7
7
|
--foreground: hsl(222 47% 11%);
|
|
8
8
|
--card: hsl(0 0% 100%);
|
|
9
9
|
--card-foreground: hsl(222 47% 11%);
|
|
10
|
-
--muted: hsl(
|
|
10
|
+
--muted: hsl(0 0% 95.3%);
|
|
11
11
|
--muted-foreground: hsl(220 17% 17%);
|
|
12
|
-
--accent: hsl(
|
|
12
|
+
--accent: hsl(240 5% 96.5%);
|
|
13
13
|
--accent-foreground: hsl(222 47% 11%);
|
|
14
14
|
|
|
15
15
|
/* Brand */
|
|
@@ -111,9 +111,9 @@ body {
|
|
|
111
111
|
--foreground: hsl(222 47% 11%);
|
|
112
112
|
--card: hsl(0 0% 100%);
|
|
113
113
|
--card-foreground: hsl(222 47% 11%);
|
|
114
|
-
--muted: hsl(
|
|
114
|
+
--muted: hsl(0 0% 95.3%);
|
|
115
115
|
--muted-foreground: hsl(220 17% 17%);
|
|
116
|
-
--accent: hsl(
|
|
116
|
+
--accent: hsl(240 5% 96.5%);
|
|
117
117
|
--accent-foreground: hsl(222 47% 11%);
|
|
118
118
|
|
|
119
119
|
/* Brand */
|
|
@@ -3916,7 +3916,7 @@ import { cn } from '@/utils/cn'
|
|
|
3916
3916
|
- Components declare internal deps (other Drivn components)
|
|
3917
3917
|
- Some components need npm packages (react-day-picker, cmdk, embla-carousel-react, sonner)
|
|
3918
3918
|
- The CLI resolves and installs all dependencies automatically
|
|
3919
|
-
`;var L={version:"1.
|
|
3919
|
+
`;var L={version:"1.9.0"};function O(e){return v.find(r=>r.name===e)}function Ke(e){let r=new Set,t=a=>{if(r.has(a))return;let l=O(a);l&&(l.dependencies.forEach(d=>t(d)),r.add(a));};return t(e),r.delete(e),[...r]}async function Ie(){let e=new McpServer({name:"drivn",version:L.version});e.tool("list_components","List all available Drivn UI components with descriptions",{},async()=>({content:[{type:"text",text:JSON.stringify(v.map(t=>({name:t.name,description:t.description})),null,2)}]})),e.tool("get_component","Get the full source code and metadata for a Drivn component",{name:z$1.string().describe('Component name (e.g. "button", "dialog")')},async({name:t})=>{let a=O(t);if(!a)return {content:[{type:"text",text:`Component "${t}" not found. Use list_components to see available components.`}],isError:true};let l=w[t];return {content:[{type:"text",text:JSON.stringify({name:a.name,description:a.description,dependencies:a.dependencies,npmDependencies:a.npmDependencies,source:l},null,2)}]}}),e.tool("get_component_metadata","Get metadata only (no source code) for a Drivn component \u2014 useful for planning",{name:z$1.string().describe("Component name")},async({name:t})=>{let a=O(t);if(!a)return {content:[{type:"text",text:`Component "${t}" not found. Use list_components to see available components.`}],isError:true};let l=Ke(t);return {content:[{type:"text",text:JSON.stringify({name:a.name,description:a.description,dependencies:a.dependencies,npmDependencies:a.npmDependencies,allResolvedDependencies:l},null,2)}]}}),e.tool("search_components","Search Drivn components by name or description",{query:z$1.string().describe("Search query")},async({query:t})=>{let a=t.toLowerCase(),l=v.filter(d=>d.name.includes(a)||d.description.toLowerCase().includes(a));return {content:[{type:"text",text:l.length?JSON.stringify(l.map(d=>({name:d.name,description:d.description})),null,2):`No components matching "${t}".`}]}}),e.tool("get_installation_instructions","Get step-by-step installation instructions for one or more components",{components:z$1.array(z$1.string()).describe("Component names to install"),packageManager:z$1.enum(["npm","pnpm"]).optional().describe("Package manager (default: npm)")},async({components:t,packageManager:a})=>{let l=a??"npm",d=new Set,p=new Set,f=[],g=o=>{if(d.has(o))return;let s=O(o);if(!s){f.push(o);return}s.dependencies.forEach(i=>g(i)),s.npmDependencies.forEach(i=>p.add(i)),d.add(o);};if(t.forEach(g),f.length)return {content:[{type:"text",text:`Unknown components: ${f.join(", ")}. Use list_components to see available components.`}],isError:true};let N=l==="pnpm"?"pnpm dlx":"npx",u=l==="pnpm"?"pnpm add":"npm install",h=[];return h.push(`# Install components via CLI
|
|
3920
3920
|
${N} drivn@latest add ${[...d].join(" ")}`),p.size&&h.push(`# Install required npm dependencies
|
|
3921
3921
|
${u} ${[...p].join(" ")}`),h.push(`# Components will be installed to your configured components directory
|
|
3922
3922
|
# (default: src/components/ui/)`),{content:[{type:"text",text:JSON.stringify({componentsToInstall:[...d],npmDependencies:[...p],steps:h},null,2)}]}}),e.tool("get_design_tokens","Get the Drivn CSS design tokens (base globals and theme tokens)",{},async()=>({content:[{type:"text",text:`/* === Base Globals === */
|