@alkimi.org/ui-kit 0.9.4 → 0.9.6

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
+ "use client";
2
+ import{useCallback as S,useEffect as L,useRef as P,useState as C}from"react";import{jsx as D,jsxs as N}from"react/jsx-runtime";function T(s){return typeof s=="object"&&"src"in s}function z(s){return T(s)?s.src:s}function J({src:s,alt:w,duration:I=600,steps:d=15,className:E,onAnimationComplete:M,objectFit:f="cover"}){let p=P(null),h=P(null),[y,x]=C("loading"),[r,H]=C(null),v=z(s),b=S((t,a,e,n)=>{t.imageSmoothingEnabled=!0,t.clearRect(0,0,e,n);let i=a.naturalWidth/a.naturalHeight,c=e/n,o,l,u,m;f==="contain"?(i>c?(o=e,l=e/i):(l=n,o=n*i),u=(e-o)/2,m=(n-l)/2):(i>c?(l=n,o=n*i):(o=e,l=e/i),u=(e-o)/2,m=(n-l)/2),t.drawImage(a,u,m,o,l)},[f]),g=S((t,a,e,n,i)=>{t.imageSmoothingEnabled=!1;let c=Math.max(1,Math.floor(n/e)),o=Math.max(1,Math.floor(i/e));t.clearRect(0,0,n,i),t.drawImage(a,0,0,c,o),t.drawImage(h.current,0,0,c,o,0,0,n,i)},[]),R=S((t,a,e,n)=>{let i=Math.max(e,n)/4,c=I/d,o=0;x("animating");let l=()=>{let u=o/d,m=Math.max(1,Math.floor(i*(1-u)));m<=1?b(t,a,e,n):g(t,a,m,e,n),o++,o<=d?window.setTimeout(l,c):(b(t,a,e,n),x("complete"),M?.())};l()},[I,d,g,b,M]);return L(()=>{let t=p.current;if(!t)return;let a=()=>{let{width:n,height:i}=t.getBoundingClientRect();H({width:Math.floor(n),height:Math.floor(i)})},e=new ResizeObserver(a);return e.observe(t),a(),()=>{e.disconnect()}},[]),L(()=>{if(!r||r.width<=0||r.height<=0)return;let t=h.current;if(!t)return;let a=t.getContext("2d");if(!a)return;t.width=r.width,t.height=r.height;let e=new window.Image;return e.crossOrigin="anonymous",e.onload=()=>{let n=Math.max(r.width,r.height)/4;g(a,e,n,r.width,r.height),R(a,e,r.width,r.height)},e.onerror=()=>{console.error("PixelLoad: Failed to load image")},e.src=v,()=>{e.onload=null,e.onerror=null}},[v,r,R,g]),N("div",{ref:p,className:`relative w-full h-full ${E||""}`,children:[D("canvas",{ref:h,className:"absolute top-0 left-0 w-full h-full",style:{objectFit:f},role:"img","aria-label":w}),y==="complete"&&D("img",{src:v,alt:w,className:"sr-only","aria-hidden":!0})]})}export{J as a};
3
+ //# sourceMappingURL=chunk-7ONK6HHN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/PixelLoad.tsx"],"sourcesContent":["\"use client\"\n\nimport { type StaticImageData } from \"next/image\"\nimport { JSX, useCallback, useEffect, useRef, useState } from \"react\"\n\ntype PixelLoadStatus = \"loading\" | \"animating\" | \"complete\"\n\ntype ImageSrc = string | StaticImageData\n\nexport interface PixelLoadProps {\n src: ImageSrc\n alt: string\n duration?: number\n steps?: number\n className?: string\n onAnimationComplete?: () => void\n objectFit?: \"contain\" | \"cover\" | \"fill\" | \"none\" | \"scale-down\"\n}\n\nfunction isStaticImageData(src: ImageSrc): src is StaticImageData {\n return typeof src === \"object\" && \"src\" in src\n}\n\nfunction getImageSrc(src: ImageSrc): string {\n return isStaticImageData(src) ? src.src : src\n}\n\nexport function PixelLoad({\n src,\n alt,\n duration = 600,\n steps = 15,\n className,\n onAnimationComplete,\n objectFit = \"cover\",\n}: PixelLoadProps): JSX.Element {\n const containerRef = useRef<HTMLDivElement>(null)\n const canvasRef = useRef<HTMLCanvasElement>(null)\n const [status, setStatus] = useState<PixelLoadStatus>(\"loading\")\n const [dimensions, setDimensions] = useState<{\n width: number\n height: number\n } | null>(null)\n\n const imageSrc = getImageSrc(src)\n\n const drawFull = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n w: number,\n h: number\n ): void => {\n ctx.imageSmoothingEnabled = true\n ctx.clearRect(0, 0, w, h)\n\n const imgRatio = img.naturalWidth / img.naturalHeight\n const containerRatio = w / h\n\n let drawW: number\n let drawH: number\n let drawX: number\n let drawY: number\n\n if (objectFit === \"contain\") {\n if (imgRatio > containerRatio) {\n drawW = w\n drawH = w / imgRatio\n } else {\n drawH = h\n drawW = h * imgRatio\n }\n drawX = (w - drawW) / 2\n drawY = (h - drawH) / 2\n } else {\n if (imgRatio > containerRatio) {\n drawH = h\n drawW = h * imgRatio\n } else {\n drawW = w\n drawH = w / imgRatio\n }\n drawX = (w - drawW) / 2\n drawY = (h - drawH) / 2\n }\n\n ctx.drawImage(img, drawX, drawY, drawW, drawH)\n },\n [objectFit]\n )\n\n const drawPixelated = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n pixelSize: number,\n w: number,\n h: number\n ): void => {\n ctx.imageSmoothingEnabled = false\n\n const sw = Math.max(1, Math.floor(w / pixelSize))\n const sh = Math.max(1, Math.floor(h / pixelSize))\n\n ctx.clearRect(0, 0, w, h)\n ctx.drawImage(img, 0, 0, sw, sh)\n ctx.drawImage(canvasRef.current!, 0, 0, sw, sh, 0, 0, w, h)\n },\n []\n )\n\n const runAnimation = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n w: number,\n h: number\n ): void => {\n const minPixelSize = Math.max(w, h) / 4\n const intervalMs = duration / steps\n let currentStep = 0\n\n setStatus(\"animating\")\n\n const animate = (): void => {\n const progress = currentStep / steps\n const pixelSize = Math.max(1, Math.floor(minPixelSize * (1 - progress)))\n\n if (pixelSize <= 1) {\n drawFull(ctx, img, w, h)\n } else {\n drawPixelated(ctx, img, pixelSize, w, h)\n }\n\n currentStep++\n\n if (currentStep <= steps) {\n window.setTimeout(animate, intervalMs)\n } else {\n drawFull(ctx, img, w, h)\n setStatus(\"complete\")\n onAnimationComplete?.()\n }\n }\n\n animate()\n },\n [duration, steps, drawPixelated, drawFull, onAnimationComplete]\n )\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const updateDimensions = (): void => {\n const { width, height } = container.getBoundingClientRect()\n setDimensions({ width: Math.floor(width), height: Math.floor(height) })\n }\n\n const resizeObserver = new ResizeObserver(updateDimensions)\n resizeObserver.observe(container)\n updateDimensions()\n\n return (): void => {\n resizeObserver.disconnect()\n }\n }, [])\n\n useEffect(() => {\n if (!dimensions) return\n\n if (dimensions.width <= 0 || dimensions.height <= 0) return\n\n const canvas = canvasRef.current\n if (!canvas) return\n\n const ctx = canvas.getContext(\"2d\")\n if (!ctx) return\n\n canvas.width = dimensions.width\n canvas.height = dimensions.height\n\n const img = new window.Image()\n img.crossOrigin = \"anonymous\"\n\n img.onload = (): void => {\n const minPixelSize = Math.max(dimensions.width, dimensions.height) / 4\n drawPixelated(ctx, img, minPixelSize, dimensions.width, dimensions.height)\n runAnimation(ctx, img, dimensions.width, dimensions.height)\n }\n\n img.onerror = (): void => {\n console.error(\"PixelLoad: Failed to load image\")\n }\n\n img.src = imageSrc\n\n return (): void => {\n img.onload = null\n img.onerror = null\n }\n }, [imageSrc, dimensions, runAnimation, drawPixelated])\n\n return (\n <div\n ref={containerRef}\n className={`relative w-full h-full ${className || \"\"}`}\n >\n <canvas\n ref={canvasRef}\n className=\"absolute top-0 left-0 w-full h-full\"\n style={{ objectFit }}\n role=\"img\"\n aria-label={alt}\n />\n {status === \"complete\" && (\n <img\n src={imageSrc}\n alt={alt}\n className=\"sr-only\"\n aria-hidden\n />\n )}\n </div>\n )\n}\n"],"mappings":";AAGA,OAAc,eAAAA,EAAa,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QAyM1D,OAIE,OAAAC,EAJF,QAAAC,MAAA,oBAzLJ,SAASC,EAAkBC,EAAuC,CAChE,OAAO,OAAOA,GAAQ,UAAY,QAASA,CAC7C,CAEA,SAASC,EAAYD,EAAuB,CAC1C,OAAOD,EAAkBC,CAAG,EAAIA,EAAI,IAAMA,CAC5C,CAEO,SAASE,EAAU,CACxB,IAAA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C,EAAQ,OAEb,IAAMzB,EAAMyB,EAAO,WAAW,IAAI,EAClC,GAAI,CAACzB,EAAK,OAEVyB,EAAO,MAAQ7B,EAAW,MAC1B6B,EAAO,OAAS7B,EAAW,OAE3B,IAAMK,EAAM,IAAI,OAAO,MACvB,OAAAA,EAAI,YAAc,YAElBA,EAAI,OAAS,IAAY,CACvB,IAAMc,EAAe,KAAK,IAAInB,EAAW,MAAOA,EAAW,MAAM,EAAI,EACrEc,EAAcV,EAAKC,EAAKc,EAAcnB,EAAW,MAAOA,EAAW,MAAM,EACzEkB,EAAad,EAAKC,EAAKL,EAAW,MAAOA,EAAW,MAAM,CAC5D,EAEAK,EAAI,QAAU,IAAY,CACxB,QAAQ,MAAM,iCAAiC,CACjD,EAEAA,EAAI,IAAMH,EAEH,IAAY,CACjBG,EAAI,OAAS,KACbA,EAAI,QAAU,IAChB,CACF,EAAG,CAACH,EAAUF,EAAYkB,EAAcJ,CAAa,CAAC,EAGpD7B,EAAC,OACC,IAAKW,EACL,UAAW,0BAA0BH,GAAa,EAAE,GAEpD,UAAAT,EAAC,UACC,IAAKa,EACL,UAAU,sCACV,MAAO,CAAE,UAAAF,CAAU,EACnB,KAAK,MACL,aAAYL,EACd,EACCQ,IAAW,YACVd,EAAC,OACC,IAAKkB,EACL,IAAKZ,EACL,UAAU,UACV,cAAW,GACb,GAEJ,CAEJ","names":["useCallback","useEffect","useRef","useState","jsx","jsxs","isStaticImageData","src","getImageSrc","PixelLoad","alt","duration","steps","className","onAnimationComplete","objectFit","containerRef","canvasRef","status","setStatus","dimensions","setDimensions","imageSrc","drawFull","ctx","img","w","h","imgRatio","containerRatio","drawW","drawH","drawX","drawY","drawPixelated","pixelSize","sw","sh","runAnimation","minPixelSize","intervalMs","currentStep","animate","progress","container","updateDimensions","width","height","resizeObserver","canvas"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _reactdropdownmenu = require('@radix-ui/react-dropdown-menu'); var e = _interopRequireWildcard(_reactdropdownmenu);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var g=e.Root,N= exports.b =e.Trigger,x= exports.c =e.Group,C= exports.d =e.Portal,I= exports.e =e.Sub,S= exports.f =e.RadioGroup,c= exports.g =d.forwardRef(({className:o,inset:t,children:n,...r},p)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:p,className:_chunkFUYXCJOQjs.a.call(void 0, "flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[state=open]:bg-secondary",t&&"pl-8",o),...r,children:[n,_jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight,{className:"ml-auto h-4 w-4"})]}));c.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:o,...t},n)=>_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...t}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:r,sideOffset:t,className:_chunkFUYXCJOQjs.a.call(void 0, "z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:o,inset:t,...n},r)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",o),...n}));M.displayName=e.Item.displayName;var D=d.forwardRef(({className:o,children:t,checked:n,...r},p)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:p,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",o),checked:n,...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:"h-4 w-4"})})}),t]}));D.displayName=e.CheckboxItem.displayName;var v=d.forwardRef(({className:o,children:t,...n},r)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",o),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _lucidereact.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));v.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:o,inset:t,...n},r)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));P.displayName=e.Label.displayName;var R=d.forwardRef(({className:o,...t},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "-mx-1 my-1 h-px bg-muted",o),...t}));R.displayName=e.Separator.displayName;var b=({className:o,...t})=>_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto text-xs tracking-widest opacity-60",o),...t});b.displayName="DropdownMenuShortcut";exports.a = g; exports.b = N; exports.c = x; exports.d = C; exports.e = I; exports.f = S; exports.g = c; exports.h = f; exports.i = w; exports.j = M; exports.k = D; exports.l = v; exports.m = P; exports.n = R; exports.o = b;
3
+ //# sourceMappingURL=chunk-JUB5C3UU.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LOFBMTPL.js","../src/components/dropdown-menu.tsx"],"names":["DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAAkC,uECCX,uHACgB,2CACK,+CAsB1C,IAlBIA,CAAAA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AA,CAA8B,CAAA,CAAA,UAAA,CAGlC,CAAC,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGG,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BG,6BAAAA,CAAuB,CAAA,SAAA,CAAtB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,gCAAAA,0BAAG,CAA4BN,CAAS,CAAA,CAClD,GAAGG,CAAAA,CACN,CACD,CAAA,CACDgB,CAAAA,CAAsB,WAAA,CAAoC,CAAA,CAAA,SAAA,CAAU,WAAA,CAEpE,IAAMC,CAAAA,CAAuB,CAAC,CAC5B,SAAA,CAAApB,CAAAA,CACA,GAAGG,CACL,CAAA,CAAA,EAEII,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWD,gCAAAA,4CAAG,CAA8CN,CAAS,CAAA,CACpE,GAAGG,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAqB,WAAA,CAAc,sBAAA,CAAA,gOAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LOFBMTPL.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-JUB5C3UU.js","../src/components/dropdown-menu.tsx"],"names":["DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAAkC,uECCX,uHACgB,2CACK,+CAsB1C,IAlBIA,CAAAA,CAAqC,CAAA,CAAA,IAAA,CAErCC,CAAAA,aAA4C,CAAA,CAAA,OAAA,CAE5CC,CAAAA,aAA0C,CAAA,CAAA,KAAA,CAE1CC,CAAAA,aAA2C,CAAA,CAAA,MAAA,CAE3CC,CAAAA,aAAwC,CAAA,CAAA,GAAA,CAExCC,CAAAA,aAA+C,CAAA,CAAA,UAAA,CAE/CC,CAAAA,aAA+B,CAAA,CAAA,UAAA,CAKnC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC3CC,8BAAAA,CAAuB,CAAA,UAAA,CAAtB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,qLACT,CACAL,CAAAA,EAAS,MAAA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CACN,CAAA,CAGJiB,CAAAA,CAAqB,WAAA,CAAc,sBAAA,CAAA,gOAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-JUB5C3UU.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a}from"./chunk-S5TKCF6T.mjs";import*as d from"react";import*as e from"@radix-ui/react-dropdown-menu";import{Check as m,ChevronRight as u,Circle as l}from"lucide-react";import{jsx as i,jsxs as s}from"react/jsx-runtime";var g=e.Root,N=e.Trigger,x=e.Group,C=e.Portal,I=e.Sub,S=e.RadioGroup,c=d.forwardRef(({className:o,inset:t,children:n,...r},p)=>s(e.SubTrigger,{ref:p,className:a("flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[state=open]:bg-secondary",t&&"pl-8",o),...r,children:[n,i(u,{className:"ml-auto h-4 w-4"})]}));c.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:o,...t},n)=>i(e.SubContent,{ref:n,className:a("z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...t}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:o,sideOffset:t=4,...n},r)=>i(e.Portal,{children:i(e.Content,{ref:r,sideOffset:t,className:a("z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Item,{ref:r,className:a("relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",o),...n}));M.displayName=e.Item.displayName;var D=d.forwardRef(({className:o,children:t,checked:n,...r},p)=>s(e.CheckboxItem,{ref:p,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",o),checked:n,...r,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(m,{className:"h-4 w-4"})})}),t]}));D.displayName=e.CheckboxItem.displayName;var v=d.forwardRef(({className:o,children:t,...n},r)=>s(e.RadioItem,{ref:r,className:a("relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50",o),...n,children:[i("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(l,{className:"h-2 w-2 fill-current"})})}),t]}));v.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:o,inset:t,...n},r)=>i(e.Label,{ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));P.displayName=e.Label.displayName;var R=d.forwardRef(({className:o,...t},n)=>i(e.Separator,{ref:n,className:a("-mx-1 my-1 h-px bg-muted",o),...t}));R.displayName=e.Separator.displayName;var b=({className:o,...t})=>i("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});b.displayName="DropdownMenuShortcut";export{g as a,N as b,x as c,C as d,I as e,S as f,c as g,f as h,w as i,M as j,D as k,v as l,P as m,R as n,b as o};
3
+ //# sourceMappingURL=chunk-TQJCIZQO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/dropdown-menu.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-[12px] px-2 py-1.5 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-[state=open]:bg-secondary\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-dropdown-menu p-1 text-dropdown-menu-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-[12px] p-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-[12px] py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-secondary focus:bg-secondary data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],"mappings":";oCAEA,UAAYA,MAAW,QACvB,UAAYC,MAA2B,gCACvC,OAAS,SAAAC,EAAO,gBAAAC,EAAc,UAAAC,MAAc,eAsB1C,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBAlBF,IAAMC,EAAqC,OAErCC,EAA4C,UAE5CC,EAA0C,QAE1CC,EAA2C,SAE3CC,EAAwC,MAExCC,EAA+C,aAE/CC,EAA+B,aAKnC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAC3CZ,EAAuB,aAAtB,CACC,IAAKY,EACL,UAAWC,EACT,sLACAJ,GAAS,OACTD,CACF,EACC,GAAGG,EAEH,UAAAD,EACDX,EAACe,EAAA,CAAa,UAAU,kBAAkB,GAC5C,CACD,EACDP,EAAuB,YACC,aAAW,YAEnC,IAAMQ,EAA+B,aAGnC,CAAC,CAAE,UAAAP,EAAW,GAAGG,CAAM,EAAGC,IAC1Bb,EAAuB,aAAtB,CACC,IAAKa,EACL,UAAWC,EACT,gcACAL,CACF,EACC,GAAGG,EACN,CACD,EACDI,EAAuB,YACC,aAAW,YAEnC,IAAMC,EAA4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AAKa,EACL,UAAWC,EACT,oCACAJ,GAAS,OACTD,CACF,EACC,GAAGG,EACN,CACD,EACDa,EAAkB,YAAoC,QAAM,YAE5D,IAAMC,EAA8B,aAGlC,CAAC,CAAE,UAAAjB,EAAW,GAAGG,CAAM,EAAGC,IAC1Bb,EAAuB,YAAtB,CACC,IAAKa,EACL,UAAWC,EAAG,2BAA4BL,CAAS,EAClD,GAAGG,EACN,CACD,EACDc,EAAsB,YAAoC,YAAU,YAEpE,IAAMC,EAAuB,CAAC,CAC5B,UAAAlB,EACA,GAAGG,CACL,IAEIZ,EAAC,QACC,UAAWc,EAAG,6CAA8CL,CAAS,EACpE,GAAGG,EACN,EAGJe,EAAqB,YAAc","names":["React","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","cn","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+ var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function T(s){return typeof s=="object"&&"src"in s}function z(s){return T(s)?s.src:s}function J({src:s,alt:w,duration:I=600,steps:d=15,className:E,onAnimationComplete:M,objectFit:f="cover"}){let p=_react.useRef.call(void 0, null),h=_react.useRef.call(void 0, null),[y,x]=_react.useState.call(void 0, "loading"),[r,H]=_react.useState.call(void 0, null),v=z(s),b=_react.useCallback.call(void 0, (t,a,e,n)=>{t.imageSmoothingEnabled=!0,t.clearRect(0,0,e,n);let i=a.naturalWidth/a.naturalHeight,c=e/n,o,l,u,m;f==="contain"?(i>c?(o=e,l=e/i):(l=n,o=n*i),u=(e-o)/2,m=(n-l)/2):(i>c?(l=n,o=n*i):(o=e,l=e/i),u=(e-o)/2,m=(n-l)/2),t.drawImage(a,u,m,o,l)},[f]),g=_react.useCallback.call(void 0, (t,a,e,n,i)=>{t.imageSmoothingEnabled=!1;let c=Math.max(1,Math.floor(n/e)),o=Math.max(1,Math.floor(i/e));t.clearRect(0,0,n,i),t.drawImage(a,0,0,c,o),t.drawImage(h.current,0,0,c,o,0,0,n,i)},[]),R=_react.useCallback.call(void 0, (t,a,e,n)=>{let i=Math.max(e,n)/4,c=I/d,o=0;x("animating");let l=()=>{let u=o/d,m=Math.max(1,Math.floor(i*(1-u)));m<=1?b(t,a,e,n):g(t,a,m,e,n),o++,o<=d?window.setTimeout(l,c):(b(t,a,e,n),x("complete"),_optionalChain([M, 'optionalCall', _ => _()]))};l()},[I,d,g,b,M]);return _react.useEffect.call(void 0, ()=>{let t=p.current;if(!t)return;let a=()=>{let{width:n,height:i}=t.getBoundingClientRect();H({width:Math.floor(n),height:Math.floor(i)})},e=new ResizeObserver(a);return e.observe(t),a(),()=>{e.disconnect()}},[]),_react.useEffect.call(void 0, ()=>{if(!r||r.width<=0||r.height<=0)return;let t=h.current;if(!t)return;let a=t.getContext("2d");if(!a)return;t.width=r.width,t.height=r.height;let e=new window.Image;return e.crossOrigin="anonymous",e.onload=()=>{let n=Math.max(r.width,r.height)/4;g(a,e,n,r.width,r.height),R(a,e,r.width,r.height)},e.onerror=()=>{console.error("PixelLoad: Failed to load image")},e.src=v,()=>{e.onload=null,e.onerror=null}},[v,r,R,g]),_jsxruntime.jsxs.call(void 0, "div",{ref:p,className:`relative w-full h-full ${E||""}`,children:[_jsxruntime.jsx.call(void 0, "canvas",{ref:h,className:"absolute top-0 left-0 w-full h-full",style:{objectFit:f},role:"img","aria-label":w}),y==="complete"&&_jsxruntime.jsx.call(void 0, "img",{src:v,alt:w,className:"sr-only","aria-hidden":!0})]})}exports.a = J;
3
+ //# sourceMappingURL=chunk-WFD523CV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WFD523CV.js","../src/components/PixelLoad.tsx"],"names":["isStaticImageData","src","getImageSrc","PixelLoad","alt","duration","steps","className","onAnimationComplete","objectFit","containerRef","useRef","canvasRef","status","setStatus","useState","dimensions","setDimensions","imageSrc","drawFull","useCallback","ctx","img","w","h","imgRatio","containerRatio","drawW","drawH","drawX","drawY","drawPixelated","pixelSize","sw","sh","runAnimation","minPixelSize","intervalMs","currentStep","animate","progress","useEffect","container","updateDimensions","width","height","resizeObserver","canvas","jsxs"],"mappings":"AAAA,ylBAAY;ACGZ,8BAA8D,+CAyM1D,SAzLKA,CAAAA,CAAkBC,CAAAA,CAAuC,CAChE,OAAO,OAAOA,CAAAA,EAAQ,QAAA,EAAY,KAAA,GAASA,CAC7C,CAEA,SAASC,CAAAA,CAAYD,CAAAA,CAAuB,CAC1C,OAAOD,CAAAA,CAAkBC,CAAG,CAAA,CAAIA,CAAAA,CAAI,GAAA,CAAMA,CAC5C,CAEO,SAASE,CAAAA,CAAU,CACxB,GAAA,CAAAF,CAAAA,CACA,GAAA,CAAAG,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,GAAA,CACX,KAAA,CAAAC,CAAAA,CAAQ,EAAA,CACR,SAAA,CAAAC,CAAAA,CACA,mBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,OACd,CAAA,CAAgC,CAC9B,IAAMC,CAAAA,CAAeC,2BAAAA,IAA2B,CAAA,CAC1CC,CAAAA,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,CAAad,CAAAA,CAAKC,CAAAA,CAAKN,CAAAA,CAAW,KAAA,CAAOA,CAAAA,CAAW,MAAM,CAC5D,CAAA,CAEAM,CAAAA,CAAI,OAAA,CAAU,CAAA,CAAA,EAAY,CACxB,OAAA,CAAQ,KAAA,CAAM,iCAAiC,CACjD,CAAA,CAEAA,CAAAA,CAAI,GAAA,CAAMJ,CAAAA,CAEH,CAAA,CAAA,EAAY,CACjBI,CAAAA,CAAI,MAAA,CAAS,IAAA,CACbA,CAAAA,CAAI,OAAA,CAAU,IAChB,CACF,CAAA,CAAG,CAACJ,CAAAA,CAAUF,CAAAA,CAAYmB,CAAAA,CAAcJ,CAAa,CAAC,CAAA,CAGpDiB,8BAAAA,KAAC,CAAA,CACC,GAAA,CAAKtC,CAAAA,CACL,SAAA,CAAW,CAAA,uBAAA,EAA0BH,CAAAA,EAAa,EAAE,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WFD523CV.js","sourcesContent":[null,"\"use client\"\n\nimport { type StaticImageData } from \"next/image\"\nimport { JSX, useCallback, useEffect, useRef, useState } from \"react\"\n\ntype PixelLoadStatus = \"loading\" | \"animating\" | \"complete\"\n\ntype ImageSrc = string | StaticImageData\n\nexport interface PixelLoadProps {\n src: ImageSrc\n alt: string\n duration?: number\n steps?: number\n className?: string\n onAnimationComplete?: () => void\n objectFit?: \"contain\" | \"cover\" | \"fill\" | \"none\" | \"scale-down\"\n}\n\nfunction isStaticImageData(src: ImageSrc): src is StaticImageData {\n return typeof src === \"object\" && \"src\" in src\n}\n\nfunction getImageSrc(src: ImageSrc): string {\n return isStaticImageData(src) ? src.src : src\n}\n\nexport function PixelLoad({\n src,\n alt,\n duration = 600,\n steps = 15,\n className,\n onAnimationComplete,\n objectFit = \"cover\",\n}: PixelLoadProps): JSX.Element {\n const containerRef = useRef<HTMLDivElement>(null)\n const canvasRef = useRef<HTMLCanvasElement>(null)\n const [status, setStatus] = useState<PixelLoadStatus>(\"loading\")\n const [dimensions, setDimensions] = useState<{\n width: number\n height: number\n } | null>(null)\n\n const imageSrc = getImageSrc(src)\n\n const drawFull = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n w: number,\n h: number\n ): void => {\n ctx.imageSmoothingEnabled = true\n ctx.clearRect(0, 0, w, h)\n\n const imgRatio = img.naturalWidth / img.naturalHeight\n const containerRatio = w / h\n\n let drawW: number\n let drawH: number\n let drawX: number\n let drawY: number\n\n if (objectFit === \"contain\") {\n if (imgRatio > containerRatio) {\n drawW = w\n drawH = w / imgRatio\n } else {\n drawH = h\n drawW = h * imgRatio\n }\n drawX = (w - drawW) / 2\n drawY = (h - drawH) / 2\n } else {\n if (imgRatio > containerRatio) {\n drawH = h\n drawW = h * imgRatio\n } else {\n drawW = w\n drawH = w / imgRatio\n }\n drawX = (w - drawW) / 2\n drawY = (h - drawH) / 2\n }\n\n ctx.drawImage(img, drawX, drawY, drawW, drawH)\n },\n [objectFit]\n )\n\n const drawPixelated = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n pixelSize: number,\n w: number,\n h: number\n ): void => {\n ctx.imageSmoothingEnabled = false\n\n const sw = Math.max(1, Math.floor(w / pixelSize))\n const sh = Math.max(1, Math.floor(h / pixelSize))\n\n ctx.clearRect(0, 0, w, h)\n ctx.drawImage(img, 0, 0, sw, sh)\n ctx.drawImage(canvasRef.current!, 0, 0, sw, sh, 0, 0, w, h)\n },\n []\n )\n\n const runAnimation = useCallback(\n (\n ctx: CanvasRenderingContext2D,\n img: HTMLImageElement,\n w: number,\n h: number\n ): void => {\n const minPixelSize = Math.max(w, h) / 4\n const intervalMs = duration / steps\n let currentStep = 0\n\n setStatus(\"animating\")\n\n const animate = (): void => {\n const progress = currentStep / steps\n const pixelSize = Math.max(1, Math.floor(minPixelSize * (1 - progress)))\n\n if (pixelSize <= 1) {\n drawFull(ctx, img, w, h)\n } else {\n drawPixelated(ctx, img, pixelSize, w, h)\n }\n\n currentStep++\n\n if (currentStep <= steps) {\n window.setTimeout(animate, intervalMs)\n } else {\n drawFull(ctx, img, w, h)\n setStatus(\"complete\")\n onAnimationComplete?.()\n }\n }\n\n animate()\n },\n [duration, steps, drawPixelated, drawFull, onAnimationComplete]\n )\n\n useEffect(() => {\n const container = containerRef.current\n if (!container) return\n\n const updateDimensions = (): void => {\n const { width, height } = container.getBoundingClientRect()\n setDimensions({ width: Math.floor(width), height: Math.floor(height) })\n }\n\n const resizeObserver = new ResizeObserver(updateDimensions)\n resizeObserver.observe(container)\n updateDimensions()\n\n return (): void => {\n resizeObserver.disconnect()\n }\n }, [])\n\n useEffect(() => {\n if (!dimensions) return\n\n if (dimensions.width <= 0 || dimensions.height <= 0) return\n\n const canvas = canvasRef.current\n if (!canvas) return\n\n const ctx = canvas.getContext(\"2d\")\n if (!ctx) return\n\n canvas.width = dimensions.width\n canvas.height = dimensions.height\n\n const img = new window.Image()\n img.crossOrigin = \"anonymous\"\n\n img.onload = (): void => {\n const minPixelSize = Math.max(dimensions.width, dimensions.height) / 4\n drawPixelated(ctx, img, minPixelSize, dimensions.width, dimensions.height)\n runAnimation(ctx, img, dimensions.width, dimensions.height)\n }\n\n img.onerror = (): void => {\n console.error(\"PixelLoad: Failed to load image\")\n }\n\n img.src = imageSrc\n\n return (): void => {\n img.onload = null\n img.onerror = null\n }\n }, [imageSrc, dimensions, runAnimation, drawPixelated])\n\n return (\n <div\n ref={containerRef}\n className={`relative w-full h-full ${className || \"\"}`}\n >\n <canvas\n ref={canvasRef}\n className=\"absolute top-0 left-0 w-full h-full\"\n style={{ objectFit }}\n role=\"img\"\n aria-label={alt}\n />\n {status === \"complete\" && (\n <img\n src={imageSrc}\n alt={alt}\n className=\"sr-only\"\n aria-hidden\n />\n )}\n </div>\n )\n}\n"]}
@@ -9,12 +9,8 @@ interface PixelLoadProps {
9
9
  steps?: number;
10
10
  className?: string;
11
11
  onAnimationComplete?: () => void;
12
- priority?: boolean;
13
- quality?: number;
14
- placeholder?: "blur" | "empty";
15
- blurDataURL?: string;
16
12
  objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
17
13
  }
18
- declare function PixelLoad({ src, alt, duration, steps, className, onAnimationComplete, priority, quality, placeholder, blurDataURL, objectFit, }: PixelLoadProps): JSX.Element;
14
+ declare function PixelLoad({ src, alt, duration, steps, className, onAnimationComplete, objectFit, }: PixelLoadProps): JSX.Element;
19
15
 
20
16
  export { PixelLoad, type PixelLoadProps };
@@ -9,12 +9,8 @@ interface PixelLoadProps {
9
9
  steps?: number;
10
10
  className?: string;
11
11
  onAnimationComplete?: () => void;
12
- priority?: boolean;
13
- quality?: number;
14
- placeholder?: "blur" | "empty";
15
- blurDataURL?: string;
16
12
  objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
17
13
  }
18
- declare function PixelLoad({ src, alt, duration, steps, className, onAnimationComplete, priority, quality, placeholder, blurDataURL, objectFit, }: PixelLoadProps): JSX.Element;
14
+ declare function PixelLoad({ src, alt, duration, steps, className, onAnimationComplete, objectFit, }: PixelLoadProps): JSX.Element;
19
15
 
20
16
  export { PixelLoad, type PixelLoadProps };
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- "use client";var _chunkR74QDO2Zjs = require('../chunk-R74QDO2Z.js');require('../chunk-XYO4VLMF.js');exports.PixelLoad = _chunkR74QDO2Zjs.a;
2
+ "use client";var _chunkWFD523CVjs = require('../chunk-WFD523CV.js');require('../chunk-XYO4VLMF.js');exports.PixelLoad = _chunkWFD523CVjs.a;
3
3
  //# sourceMappingURL=PixelLoad.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use client";import{a}from"../chunk-WF73K6X2.mjs";import"../chunk-KPAOPUY2.mjs";export{a as PixelLoad};
2
+ "use client";import{a}from"../chunk-7ONK6HHN.mjs";import"../chunk-KPAOPUY2.mjs";export{a as PixelLoad};
3
3
  //# sourceMappingURL=PixelLoad.mjs.map
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
- "use client";var _chunkLOFBMTPLjs = require('../chunk-LOFBMTPL.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.DropdownMenu = _chunkLOFBMTPLjs.a; exports.DropdownMenuCheckboxItem = _chunkLOFBMTPLjs.k; exports.DropdownMenuContent = _chunkLOFBMTPLjs.i; exports.DropdownMenuGroup = _chunkLOFBMTPLjs.c; exports.DropdownMenuItem = _chunkLOFBMTPLjs.j; exports.DropdownMenuLabel = _chunkLOFBMTPLjs.m; exports.DropdownMenuPortal = _chunkLOFBMTPLjs.d; exports.DropdownMenuRadioGroup = _chunkLOFBMTPLjs.f; exports.DropdownMenuRadioItem = _chunkLOFBMTPLjs.l; exports.DropdownMenuSeparator = _chunkLOFBMTPLjs.n; exports.DropdownMenuShortcut = _chunkLOFBMTPLjs.o; exports.DropdownMenuSub = _chunkLOFBMTPLjs.e; exports.DropdownMenuSubContent = _chunkLOFBMTPLjs.h; exports.DropdownMenuSubTrigger = _chunkLOFBMTPLjs.g; exports.DropdownMenuTrigger = _chunkLOFBMTPLjs.b;
2
+ "use client";var _chunkJUB5C3UUjs = require('../chunk-JUB5C3UU.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.DropdownMenu = _chunkJUB5C3UUjs.a; exports.DropdownMenuCheckboxItem = _chunkJUB5C3UUjs.k; exports.DropdownMenuContent = _chunkJUB5C3UUjs.i; exports.DropdownMenuGroup = _chunkJUB5C3UUjs.c; exports.DropdownMenuItem = _chunkJUB5C3UUjs.j; exports.DropdownMenuLabel = _chunkJUB5C3UUjs.m; exports.DropdownMenuPortal = _chunkJUB5C3UUjs.d; exports.DropdownMenuRadioGroup = _chunkJUB5C3UUjs.f; exports.DropdownMenuRadioItem = _chunkJUB5C3UUjs.l; exports.DropdownMenuSeparator = _chunkJUB5C3UUjs.n; exports.DropdownMenuShortcut = _chunkJUB5C3UUjs.o; exports.DropdownMenuSub = _chunkJUB5C3UUjs.e; exports.DropdownMenuSubContent = _chunkJUB5C3UUjs.h; exports.DropdownMenuSubTrigger = _chunkJUB5C3UUjs.g; exports.DropdownMenuTrigger = _chunkJUB5C3UUjs.b;
3
3
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-HGKFS62N.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as DropdownMenu,k as DropdownMenuCheckboxItem,i as DropdownMenuContent,c as DropdownMenuGroup,j as DropdownMenuItem,m as DropdownMenuLabel,d as DropdownMenuPortal,f as DropdownMenuRadioGroup,l as DropdownMenuRadioItem,n as DropdownMenuSeparator,o as DropdownMenuShortcut,e as DropdownMenuSub,h as DropdownMenuSubContent,g as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
2
+ "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"../chunk-TQJCIZQO.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as DropdownMenu,k as DropdownMenuCheckboxItem,i as DropdownMenuContent,c as DropdownMenuGroup,j as DropdownMenuItem,m as DropdownMenuLabel,d as DropdownMenuPortal,f as DropdownMenuRadioGroup,l as DropdownMenuRadioItem,n as DropdownMenuSeparator,o as DropdownMenuShortcut,e as DropdownMenuSub,h as DropdownMenuSubContent,g as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
3
3
  //# sourceMappingURL=dropdown-menu.mjs.map