mtxuilib 0.0.407 → 0.0.408

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.
@@ -0,0 +1,3 @@
1
+ import { Style } from "@/registry/styles";
2
+ export declare function getAllBlockIds(style?: Style["name"]): Promise<any[]>;
3
+ export declare function getBlock(name: string, style?: Style["name"]): Promise<any>;
@@ -0,0 +1 @@
1
+ "use server";var F=Object.defineProperty,C=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var y=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,f=(t,e)=>{for(var r in e||(e={}))B.call(e,r)&&y(t,r,e[r]);if(S)for(var r of S(e))T.call(e,r)&&y(t,r,e[r]);return t},h=(t,e)=>C(t,j(e));var s=(t,e,r)=>new Promise((n,o)=>{var a=i=>{try{l(r.next(i))}catch(c){o(c)}},p=i=>{try{l(r.throw(i))}catch(c){o(c)}},l=i=>i.done?n(i.value):Promise.resolve(i.value).then(a,p);l((r=r.apply(t,e)).next())});import{Index as u}from"@/__registry__";import{promises as k}from"fs";import{tmpdir as _}from"os";import d from"path";import{Project as v,ScriptKind as A,SyntaxKind as K}from"ts-morph";import{z as L}from"zod";import{highlightCode as I}from"@/lib/highlight-code";import{blockSchema as O,registryEntrySchema as w}from"@/registry/schema";const m="default",E=new v({compilerOptions:{}});function R(){return s(this,arguments,function*(t=m){return(yield N(t)).map(r=>r.name)})}function W(r){return s(this,arguments,function*(t,e=m){const n=u[e][t],o=yield z(t,e);return O.parse(h(f(f({style:e,highlightedCode:o.code?yield I(o.code):""},n),o),{type:"components:block"}))})}function N(){return s(this,arguments,function*(t=m){const e=L.record(w).parse(u[t]);return Object.values(e).filter(r=>r.type==="components:block")})}function V(r){return s(this,arguments,function*(t,e=m){const n=u[e][t],o=w.parse(n),a=d.join(process.cwd(),o.files[0]);return yield k.readFile(a,"utf-8")})}function z(t,e){return s(this,null,function*(){function r(x){return s(this,null,function*(){const b=yield k.mkdtemp(d.join(_(),"codex-"));return d.join(b,x)})}const n=yield V(t,e),o=yield r(`${t}.tsx`),a=E.createSourceFile(o,n,{scriptKind:A.TSX}),p=g(a,"description"),l=g(a,"iframeHeight"),i=g(a,"containerClassName");let c=a.getText();return c=c.replaceAll(`@/registry/${e}/`,"@/components/"),c=c.replaceAll("export default","export"),{description:p,code:c,container:{height:l,className:i}}})}function g(t,e){const r=t.getVariableDeclaration(e);if(!r)return null;const n=r.getInitializerIfKindOrThrow(K.StringLiteral).getLiteralValue();return r.remove(),n}export{R as getAllBlockIds,W as getBlock};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const description = "An application shell with a header and main content area. The header has a navbar, a search input and and a user nav dropdown. The user nav is toggled by a button with an avatar image.";
3
+ export declare const iframeHeight = "825px";
4
+ export declare const containerClassName = "w-full h-full";
5
+ export default function Dashboard(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Avatar as r,AvatarFallback as i,AvatarImage as c}from"@radix-ui/react-avatar";import{Activity as v,ArrowUpRight as h,CircleUser as b,CreditCard as C,DollarSign as T,Menu as w,Package2 as g,Search as A,Table as k,Users as y}from"lucide-react";import t from"next/link";import{Badge as u}from"../../../ui/badge";import{Button as p}from"../../../ui/button";import{Card as s,CardContent as d,CardDescription as D,CardHeader as m,CardTitle as n}from"../../../ui/card";import{DropdownMenu as S,DropdownMenuContent as L,DropdownMenuItem as f,DropdownMenuLabel as M,DropdownMenuSeparator as N,DropdownMenuTrigger as H}from"../../../ui/dropdown-menu";import{Input as B}from"../../../ui/input";import{Sheet as R,SheetContent as $,SheetTrigger as I}from"../../../ui/sheet";import{TableBody as F,TableCell as l,TableHead as x,TableHeader as O,TableRow as o}from"../../../ui/table";const Q="An application shell with a header and main content area. The header has a navbar, a search input and and a user nav dropdown. The user nav is toggled by a button with an avatar image.",X="825px",Y="w-full h-full";function j(){return a("div",{className:"flex min-h-screen w-full flex-col",children:[a("header",{className:"bg-background sticky top-0 flex h-16 items-center gap-4 border-b px-4 md:px-6",children:[a("nav",{className:"hidden flex-col gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6",children:[a(t,{href:"#",className:"flex items-center gap-2 text-lg font-semibold md:text-base",children:[e(g,{className:"h-6 w-6"}),e("span",{className:"sr-only",children:"Acme Inc"})]}),e(t,{href:"#",className:"text-foreground hover:text-foreground transition-colors",children:"Dashboard"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Orders"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Products"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Customers"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground transition-colors",children:"Analytics"})]}),a(R,{children:[e(I,{asChild:!0,children:a(p,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[e(w,{className:"h-5 w-5"}),e("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),e($,{side:"left",children:a("nav",{className:"grid gap-6 text-lg font-medium",children:[a(t,{href:"#",className:"flex items-center gap-2 text-lg font-semibold",children:[e(g,{className:"h-6 w-6"}),e("span",{className:"sr-only",children:"Acme Inc"})]}),e(t,{href:"#",className:"hover:text-foreground",children:"Dashboard"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground",children:"Orders"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground",children:"Products"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground",children:"Customers"}),e(t,{href:"#",className:"text-muted-foreground hover:text-foreground",children:"Analytics"})]})})]}),a("div",{className:"flex w-full items-center gap-4 md:ml-auto md:gap-2 lg:gap-4",children:[e("form",{className:"ml-auto flex-1 sm:flex-initial",children:a("div",{className:"relative",children:[e(A,{className:"text-muted-foreground absolute left-2.5 top-2.5 h-4 w-4"}),e(B,{type:"search",placeholder:"Search products...",className:"pl-8 sm:w-[300px] md:w-[200px] lg:w-[300px]"})]})}),a(S,{children:[e(H,{asChild:!0,children:a(p,{variant:"secondary",size:"icon",className:"rounded-full",children:[e(b,{className:"h-5 w-5"}),e("span",{className:"sr-only",children:"Toggle user menu"})]})}),a(L,{align:"end",children:[e(M,{children:"My Account"}),e(N,{}),e(f,{children:"Settings"}),e(f,{children:"Support"}),e(N,{}),e(f,{children:"Logout"})]})]})]})]}),a("main",{className:"flex flex-1 flex-col gap-4 p-4 md:gap-8 md:p-8",children:[a("div",{className:"grid gap-4 md:grid-cols-2 md:gap-8 lg:grid-cols-4",children:[a(s,{children:[a(m,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(n,{className:"text-sm font-medium",children:"Total Revenue"}),e(T,{className:"text-muted-foreground h-4 w-4"})]}),a(d,{children:[e("div",{className:"text-2xl font-bold",children:"$45,231.89"}),e("p",{className:"text-muted-foreground text-xs",children:"+20.1% from last month"})]})]}),a(s,{children:[a(m,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(n,{className:"text-sm font-medium",children:"Subscriptions"}),e(y,{className:"text-muted-foreground h-4 w-4"})]}),a(d,{children:[e("div",{className:"text-2xl font-bold",children:"+2350"}),e("p",{className:"text-muted-foreground text-xs",children:"+180.1% from last month"})]})]}),a(s,{children:[a(m,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(n,{className:"text-sm font-medium",children:"Sales"}),e(C,{className:"text-muted-foreground h-4 w-4"})]}),a(d,{children:[e("div",{className:"text-2xl font-bold",children:"+12,234"}),e("p",{className:"text-muted-foreground text-xs",children:"+19% from last month"})]})]}),a(s,{children:[a(m,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(n,{className:"text-sm font-medium",children:"Active Now"}),e(v,{className:"text-muted-foreground h-4 w-4"})]}),a(d,{children:[e("div",{className:"text-2xl font-bold",children:"+573"}),e("p",{className:"text-muted-foreground text-xs",children:"+201 since last hour"})]})]})]}),a("div",{className:"grid gap-4 md:gap-8 lg:grid-cols-2 xl:grid-cols-3",children:[a(s,{className:"xl:col-span-2",children:[a(m,{className:"flex flex-row items-center",children:[a("div",{className:"grid gap-2",children:[e(n,{children:"Transactions"}),e(D,{children:"Recent transactions from your store."})]}),e(p,{asChild:!0,size:"sm",className:"ml-auto gap-1",children:a(t,{href:"#",children:["View All",e(h,{className:"h-4 w-4"})]})})]}),e(d,{children:a(k,{children:[e(O,{children:a(o,{children:[e(x,{children:"Customer"}),e(x,{className:"hidden xl:table-column",children:"Type"}),e(x,{className:"hidden xl:table-column",children:"Status"}),e(x,{className:"hidden xl:table-column",children:"Date"}),e(x,{className:"text-right",children:"Amount"})]})}),a(F,{children:[a(o,{children:[a(l,{children:[e("div",{className:"font-medium",children:"Liam Johnson"}),e("div",{className:"text-muted-foreground hidden text-sm md:inline",children:"liam@example.com"})]}),e(l,{className:"hidden xl:table-column",children:"Sale"}),e(l,{className:"hidden xl:table-column",children:e(u,{className:"text-xs",variant:"outline",children:"Approved"})}),e(l,{className:"hidden md:table-cell lg:hidden xl:table-column",children:"2023-06-23"}),e(l,{className:"text-right",children:"$250.00"})]}),a(o,{children:[a(l,{children:[e("div",{className:"font-medium",children:"Olivia Smith"}),e("div",{className:"text-muted-foreground hidden text-sm md:inline",children:"olivia@example.com"})]}),e(l,{className:"hidden xl:table-column",children:"Refund"}),e(l,{className:"hidden xl:table-column",children:e(u,{className:"text-xs",variant:"outline",children:"Declined"})}),e(l,{className:"hidden md:table-cell lg:hidden xl:table-column",children:"2023-06-24"}),e(l,{className:"text-right",children:"$150.00"})]}),a(o,{children:[a(l,{children:[e("div",{className:"font-medium",children:"Noah Williams"}),e("div",{className:"text-muted-foreground hidden text-sm md:inline",children:"noah@example.com"})]}),e(l,{className:"hidden xl:table-column",children:"Subscription"}),e(l,{className:"hidden xl:table-column",children:e(u,{className:"text-xs",variant:"outline",children:"Approved"})}),e(l,{className:"hidden md:table-cell lg:hidden xl:table-column",children:"2023-06-25"}),e(l,{className:"text-right",children:"$350.00"})]}),a(o,{children:[a(l,{children:[e("div",{className:"font-medium",children:"Emma Brown"}),e("div",{className:"text-muted-foreground hidden text-sm md:inline",children:"emma@example.com"})]}),e(l,{className:"hidden xl:table-column",children:"Sale"}),e(l,{className:"hidden xl:table-column",children:e(u,{className:"text-xs",variant:"outline",children:"Approved"})}),e(l,{className:"hidden md:table-cell lg:hidden xl:table-column",children:"2023-06-26"}),e(l,{className:"text-right",children:"$450.00"})]}),a(o,{children:[a(l,{children:[e("div",{className:"font-medium",children:"Liam Johnson"}),e("div",{className:"text-muted-foreground hidden text-sm md:inline",children:"liam@example.com"})]}),e(l,{className:"hidden xl:table-column",children:"Sale"}),e(l,{className:"hidden xl:table-column",children:e(u,{className:"text-xs",variant:"outline",children:"Approved"})}),e(l,{className:"hidden md:table-cell lg:hidden xl:table-column",children:"2023-06-27"}),e(l,{className:"text-right",children:"$550.00"})]})]})]})})]}),a(s,{children:[e(m,{children:e(n,{children:"Recent Sales"})}),a(d,{className:"grid gap-8",children:[a("div",{className:"flex items-center gap-4",children:[a(r,{className:"hidden h-9 w-9 sm:flex",children:[e(c,{src:"/avatars/01.png",alt:"Avatar"}),e(i,{children:"OM"})]}),a("div",{className:"grid gap-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"Olivia Martin"}),e("p",{className:"text-muted-foreground text-sm",children:"olivia.martin@email.com"})]}),e("div",{className:"ml-auto font-medium",children:"+$1,999.00"})]}),a("div",{className:"flex items-center gap-4",children:[a(r,{className:"hidden h-9 w-9 sm:flex",children:[e(c,{src:"/avatars/02.png",alt:"Avatar"}),e(i,{children:"JL"})]}),a("div",{className:"grid gap-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"Jackson Lee"}),e("p",{className:"text-muted-foreground text-sm",children:"jackson.lee@email.com"})]}),e("div",{className:"ml-auto font-medium",children:"+$39.00"})]}),a("div",{className:"flex items-center gap-4",children:[a(r,{className:"hidden h-9 w-9 sm:flex",children:[e(c,{src:"/avatars/03.png",alt:"Avatar"}),e(i,{children:"IN"})]}),a("div",{className:"grid gap-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"Isabella Nguyen"}),e("p",{className:"text-muted-foreground text-sm",children:"isabella.nguyen@email.com"})]}),e("div",{className:"ml-auto font-medium",children:"+$299.00"})]}),a("div",{className:"flex items-center gap-4",children:[a(r,{className:"hidden h-9 w-9 sm:flex",children:[e(c,{src:"/avatars/04.png",alt:"Avatar"}),e(i,{children:"WK"})]}),a("div",{className:"grid gap-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"William Kim"}),e("p",{className:"text-muted-foreground text-sm",children:"will@email.com"})]}),e("div",{className:"ml-auto font-medium",children:"+$99.00"})]}),a("div",{className:"flex items-center gap-4",children:[a(r,{className:"hidden h-9 w-9 sm:flex",children:[e(c,{src:"/avatars/05.png",alt:"Avatar"}),e(i,{children:"SD"})]}),a("div",{className:"grid gap-1",children:[e("p",{className:"text-sm font-medium leading-none",children:"Sofia Davis"}),e("p",{className:"text-muted-foreground text-sm",children:"sofia.davis@email.com"})]}),e("div",{className:"ml-auto font-medium",children:"+$39.00"})]})]})]})]})]})]})}export{Y as containerClassName,j as default,Q as description,X as iframeHeight};