drivn 1.17.0 → 1.19.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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5708,7 +5708,7 @@ import { cn } from '@/utils/cn'
|
|
|
5708
5708
|
- Components declare internal deps (other Drivn components)
|
|
5709
5709
|
- Some components need npm packages (react-day-picker, cmdk, embla-carousel-react, sonner)
|
|
5710
5710
|
- The CLI resolves and installs all dependencies automatically
|
|
5711
|
-
`;var L={version:"1.
|
|
5711
|
+
`;var L={version:"1.19.0"};var nt=["npm","pnpm","yarn"];function O(e){return v.find(r=>r.name===e)}function ot(e){let r=new Set,t=s=>{if(r.has(s))return;let l=O(s);l&&(l.dependencies.forEach(d=>t(d)),r.add(s));};return t(e),r.delete(e),[...r]}async function Ge(){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 s=O(t);if(!s)return {content:[{type:"text",text:`Component "${t}" not found. Use list_components to see available components.`}],isError:true};let l=R[t];return {content:[{type:"text",text:JSON.stringify({name:s.name,description:s.description,dependencies:s.dependencies,npmDependencies:s.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 s=O(t);if(!s)return {content:[{type:"text",text:`Component "${t}" not found. Use list_components to see available components.`}],isError:true};let l=ot(t);return {content:[{type:"text",text:JSON.stringify({name:s.name,description:s.description,dependencies:s.dependencies,npmDependencies:s.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 s=t.toLowerCase(),l=v.filter(d=>d.name.includes(s)||d.description.toLowerCase().includes(s));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(nt).optional().describe("Package manager (default: npm)")},async({components:t,packageManager:s})=>{let l=s??"npm",d=new Set,u=new Set,f=[],g=p=>{if(d.has(p))return;let x=O(p);if(!x){f.push(p);return}x.dependencies.forEach(o=>g(o)),x.npmDependencies.forEach(o=>u.add(o)),d.add(p);};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 b=[];return b.push(`# Install components via CLI
|
|
5712
5712
|
${M(l)} drivn@latest add ${[...d].join(" ")}`),u.size&&b.push(`# Install required npm dependencies
|
|
5713
5713
|
${C(l,[...u])}`),b.push(`# Components will be installed to your configured components directory
|
|
5714
5714
|
# (default: src/components/ui/)`),{content:[{type:"text",text:JSON.stringify({componentsToInstall:[...d],npmDependencies:[...u],steps:b},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 === */
|