@alkimi.org/ui-kit 0.1.19 → 0.1.21

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 (68) hide show
  1. package/README.github.md +174 -23
  2. package/dist/chunk-AEZ5XKKG.mjs +3 -0
  3. package/dist/chunk-AEZ5XKKG.mjs.map +1 -0
  4. package/dist/chunk-EJTY2ABY.js +3 -0
  5. package/dist/chunk-EJTY2ABY.js.map +1 -0
  6. package/dist/chunk-FLYTIYNE.js +3 -0
  7. package/dist/chunk-FLYTIYNE.js.map +1 -0
  8. package/dist/chunk-FUYXCJOQ.js.map +1 -1
  9. package/dist/chunk-KPAOPUY2.mjs +3 -0
  10. package/dist/chunk-KPAOPUY2.mjs.map +1 -0
  11. package/dist/chunk-LX3KCZOW.js.map +1 -1
  12. package/dist/chunk-MLULTZDS.js +3 -0
  13. package/dist/chunk-MLULTZDS.js.map +1 -0
  14. package/dist/chunk-R74QDO2Z.js.map +1 -1
  15. package/dist/chunk-RTHCEJYC.mjs +3 -0
  16. package/dist/chunk-RTHCEJYC.mjs.map +1 -0
  17. package/dist/chunk-SIGGW2CQ.js.map +1 -1
  18. package/dist/chunk-ULRJYLR3.mjs +3 -0
  19. package/dist/chunk-ULRJYLR3.mjs.map +1 -0
  20. package/dist/chunk-XYO4VLMF.js +3 -0
  21. package/dist/chunk-XYO4VLMF.js.map +1 -0
  22. package/dist/components/GeometricFluidGrid.d.mts +5 -0
  23. package/dist/components/GeometricFluidGrid.d.ts +5 -0
  24. package/dist/components/GeometricFluidGrid.js +3 -0
  25. package/dist/components/GeometricFluidGrid.js.map +1 -0
  26. package/dist/components/GeometricFluidGrid.mjs +3 -0
  27. package/dist/components/GeometricFluidGrid.mjs.map +1 -0
  28. package/dist/components/GlitchLink.d.mts +6 -5
  29. package/dist/components/GlitchLink.d.ts +6 -5
  30. package/dist/components/GlitchLink.js +1 -1
  31. package/dist/components/GlitchLink.js.map +1 -1
  32. package/dist/components/GlitchLink.mjs +1 -1
  33. package/dist/components/PixelLoad.js +1 -1
  34. package/dist/components/PixelLoad.js.map +1 -1
  35. package/dist/components/PixelLoad.mjs +1 -1
  36. package/dist/components/TextDecoder.d.mts +3 -4
  37. package/dist/components/TextDecoder.d.ts +3 -4
  38. package/dist/components/TextDecoder.js +1 -1
  39. package/dist/components/TextDecoder.js.map +1 -1
  40. package/dist/components/TextDecoder.mjs +1 -1
  41. package/dist/components/button.js +1 -1
  42. package/dist/components/button.js.map +1 -1
  43. package/dist/components/button.mjs +1 -1
  44. package/dist/components/card.js +1 -1
  45. package/dist/components/card.js.map +1 -1
  46. package/dist/components/card.mjs +1 -1
  47. package/dist/components/card.mjs.map +1 -1
  48. package/dist/components/tabs.js +1 -1
  49. package/dist/components/tabs.js.map +1 -1
  50. package/dist/components/tabs.mjs +1 -1
  51. package/dist/index.css +1 -1
  52. package/dist/index.css.map +1 -1
  53. package/dist/index.d.mts +1 -0
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +1 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.mjs +1 -1
  58. package/dist/styles.css +1 -1
  59. package/dist/styles.css.map +1 -1
  60. package/package.json +1 -1
  61. package/dist/chunk-IK3C7KV5.mjs +0 -3
  62. package/dist/chunk-IK3C7KV5.mjs.map +0 -1
  63. package/dist/chunk-JNEIOQGF.js +0 -3
  64. package/dist/chunk-JNEIOQGF.js.map +0 -1
  65. package/dist/chunk-KJFYVVDG.js +0 -3
  66. package/dist/chunk-KJFYVVDG.js.map +0 -1
  67. package/dist/chunk-PC2BSBO3.mjs +0 -3
  68. package/dist/chunk-PC2BSBO3.mjs.map +0 -1
package/README.github.md CHANGED
@@ -65,17 +65,20 @@ Create your `globals.css`:
65
65
  /* Optional: Override library CSS variables */
66
66
  :root {
67
67
  /* Example: Custom primary color */
68
- --primary: oklch(0.992 0.019 155.826);
69
- --primary-foreground: oklch(0.205 0 0);
68
+ --primary: 140 100% 97.1%;
69
+ --primary-foreground: 240 6% 10%;
70
70
 
71
71
  /* You can override any of these variables:
72
72
  --secondary, --secondary-foreground
73
73
  --background, --foreground
74
- --muted, --muted-foreground
74
+ --muted, --muted-foreground, --bg-muted
75
75
  --accent, --accent-foreground
76
76
  --destructive, --destructive-foreground
77
77
  --border, --input, --ring
78
+ --primary-accent
78
79
  --radius (border radius)
80
+
81
+ Format: H S% L% (Hue Saturation% Lightness%)
79
82
  */
80
83
  }
81
84
  ```
@@ -143,26 +146,28 @@ Create your `globals.css`:
143
146
  @source "../node_modules/@alkimi.org/ui-kit/dist/**/*.{js,mjs}";
144
147
 
145
148
  /* REQUIRED: Define ALL CSS variables the library needs */
149
+ /* Format: H S% L% (Hue Saturation% Lightness%) */
146
150
  :root {
147
- --background: oklch(0.992 0.019 155.826);
148
- --foreground: oklch(0.205 0 0);
149
- --card: oklch(0.992 0.019 155.826);
150
- --card-foreground: oklch(0.205 0 0);
151
- --popover: oklch(0.992 0.019 155.826);
152
- --popover-foreground: oklch(0.205 0 0);
153
- --primary: oklch(0.992 0.019 155.826);
154
- --primary-foreground: oklch(0.205 0 0);
155
- --secondary: oklch(0.269 0 0);
156
- --secondary-foreground: oklch(0.992 0.019 155.826);
157
- --muted: oklch(0.269 0 0);
158
- --muted-foreground: oklch(0.608 0 0);
159
- --accent: oklch(0.269 0 0);
160
- --accent-foreground: oklch(0.992 0.019 155.826);
161
- --destructive: oklch(0.576 0.214 25.467);
162
- --destructive-foreground: oklch(0.992 0.019 155.826);
163
- --border: #3f3f46;
164
- --input: #3f3f46;
165
- --ring: oklch(0.992 0.019 155.826);
151
+ --background: 240 10% 4%;
152
+ --foreground: 144 100% 97%;
153
+ --card: 0 0% 3.5%;
154
+ --card-foreground: 140 100% 97.1%;
155
+ --popover: 0 0% 3.5%;
156
+ --popover-foreground: 140 100% 97.1%;
157
+ --primary: 140 100% 97.1%;
158
+ --primary-foreground: 240 6% 10%;
159
+ --primary-accent: 140 100% 97.1%;
160
+ --secondary: 240 4.5% 15.88%;
161
+ --secondary-foreground: 140 100% 97.1%;
162
+ --muted: 240 10% 3.92%; /* #09090B */
163
+ --muted-foreground: 144 4.3% 54.9%;
164
+ --accent: 0 0% 15.3%;
165
+ --accent-foreground: 140 100% 97.1%;
166
+ --destructive: 0 62.8% 30.6%;
167
+ --destructive-foreground: 140 100% 97.1%;
168
+ --border: 240 3.7% 27.6%;
169
+ --input: 240 3.7% 27.6%;
170
+ --ring: 140 100% 97.1%;
166
171
  --radius: 0.625rem;
167
172
  --font-family: "Helvetica Now Display", "Helvetica", sans-serif;
168
173
  }
@@ -289,7 +294,153 @@ import {
289
294
  import { cn } from "@alkimi.org/ui-kit/utils"
290
295
  ```
291
296
 
292
- **Note**: Both import methods require installing the full `@alkimi.org/ui-kit` package. The individual imports help optimize your production bundle size (only used components are included), but don't reduce installation size.
297
+ ## Adding More Components
298
+
299
+ To add more shadcn/ui components to this library:
300
+
301
+ 1. Use the shadcn CLI to add components:
302
+
303
+ ```bash
304
+ npx shadcn-ui@latest add [component-name]
305
+ ```
306
+
307
+ 2. Export the new component in [src/index.ts](src/index.ts):
308
+
309
+ ```tsx
310
+ export { ComponentName } from "./components/component-name"
311
+ ```
312
+
313
+ 3. Create a story file in the `stories/` folder:
314
+
315
+ ```tsx
316
+ // stories/ComponentName.stories.tsx
317
+ import type { Meta, StoryObj } from "@storybook/react"
318
+ import { ComponentName } from "../src/components/component-name"
319
+
320
+ const meta = {
321
+ title: "Components/ComponentName",
322
+ component: ComponentName,
323
+ parameters: {
324
+ layout: "centered",
325
+ },
326
+ tags: ["autodocs"],
327
+ } satisfies Meta<typeof ComponentName>
328
+
329
+ export default meta
330
+ type Story = StoryObj<typeof meta>
331
+
332
+ export const Default: Story = {
333
+ args: {
334
+ // your component props
335
+ },
336
+ }
337
+ ```
338
+
339
+ 4. Test locally with Storybook:
340
+
341
+ ```bash
342
+ npm run storybook
343
+ ```
344
+
345
+ 5. Commit and push to main:
346
+
347
+ ```bash
348
+ git add .
349
+ git commit -m "feat: add ComponentName"
350
+ git push
351
+ ```
352
+
353
+ 6. Update the Storybook deployment:
354
+
355
+ ```bash
356
+ git checkout storybook
357
+ git merge main
358
+ git push
359
+ ```
360
+
361
+ Vercel will automatically rebuild and deploy the updated Storybook.
362
+
363
+ 7. (Optional) Publish to npm:
364
+ ```bash
365
+ git checkout main
366
+ # Update version in package.json
367
+ npm run build
368
+ npm publish
369
+ ```
370
+
371
+ ## Development
372
+
373
+ ### Running the Demo
374
+
375
+ To see the components in action, run the demo application:
376
+
377
+ ```bash
378
+ cd demo
379
+ pnpm install
380
+ pnpm run dev
381
+ ```
382
+
383
+ Then open [http://localhost:3000](http://localhost:3000) in your browser.
384
+
385
+ The demo showcases all available components with interactive examples, including:
386
+
387
+ - All button variants and sizes
388
+ - Card layouts and compositions
389
+ - Dark mode toggle
390
+ - Interactive component states
391
+
392
+ ### Build
393
+
394
+ Build the library for production:
395
+
396
+ ```bash
397
+ npm run build
398
+ ```
399
+
400
+ ### Watch Mode
401
+
402
+ Build the library in watch mode during development:
403
+
404
+ ```bash
405
+ npm run dev
406
+ ```
407
+
408
+ ### Type Check
409
+
410
+ Run TypeScript type checking:
411
+
412
+ ```bash
413
+ npm run type-check
414
+ ```
415
+
416
+ ### Storybook
417
+
418
+ View and develop components in isolation using Storybook:
419
+
420
+ ```bash
421
+ npm run storybook
422
+ ```
423
+
424
+ This will start Storybook on [http://localhost:6006](http://localhost:6006).
425
+
426
+ #### Building Storybook for Deployment
427
+
428
+ To build a static version of Storybook for deployment:
429
+
430
+ ```bash
431
+ npm run build-storybook
432
+ ```
433
+
434
+ This will generate a static site in the `storybook-static` directory that you can deploy to any static hosting service.
435
+
436
+ ## Publishing to npm
437
+
438
+ 1. Update the version number in [package.json](package.json) (e.g., from `0.1.3` to `0.1.4`)
439
+ 2. Build the library: `npm run build`
440
+ 3. Login to npm (if not already logged in): `npm login`
441
+ 4. Publish: `npm publish`
442
+
443
+ **Note:** Make sure to bump the version in [package.json](package.json) before publishing any changes to avoid conflicts with existing versions on npm.
293
444
 
294
445
  ## License
295
446
 
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as k}from"./chunk-S5TKCF6T.mjs";import S from"next/link";import w,{useState as b,useEffect as x,useRef as _,isValidElement as L,useMemo as A}from"react";import{Slot as T}from"@radix-ui/react-slot";import{jsx as r,jsxs as G}from"react/jsx-runtime";var q="!<>-_\\/[]{}\u2014=+*^?#________",C=({href:f,children:a,symbols:m=q,className:N,asChild:R=!1,duration:p=40,...E})=>{let[i,h]=b(!1),[g,c]=b(0),s=_(null),d=_([]),y=t=>{if(typeof t=="string"||typeof t=="number")return String(t);if(L(t)){let e=t.props.children;if(e)return y(e)}return""},o=A(()=>y(a),[a]),v=()=>{let t=[];for(let e=0;e<o.length;e++){let n=o[e],M=Math.floor(Math.random()*(p*.5)),F=M+Math.floor(Math.random()*(p*.5));t.push({to:n,start:M,end:F})}d.current=t,c(0)};x(()=>{if(i&&o){v();let t=()=>{c(e=>e+1),s.current=requestAnimationFrame(t)};s.current=requestAnimationFrame(t)}else s.current&&cancelAnimationFrame(s.current),c(0);return()=>{s.current&&cancelAnimationFrame(s.current)}},[i,o]);let u=()=>i?o.split("").map((t,e)=>{let n=d.current[e];return!n||g>=n.end?r("span",{children:t},e):g>=n.start?t===" "?r("span",{children:" "},e):((!n.char||Math.random()<.28)&&(n.char=m[Math.floor(Math.random()*m.length)]),G("span",{className:"relative inline-block",children:[r("span",{className:"invisible opacity-0","aria-hidden":"true",children:t}),r("span",{className:"absolute inset-0 flex items-center justify-center font-mono opacity-50",children:n.char})]},e)):r("span",{children:t},e)}):a,l={className:k("inline-block whitespace-nowrap",N),onMouseEnter:t=>{let e=t.currentTarget;e&&!e.style.width&&(e.style.width=`${e.offsetWidth}px`),h(!0)},onMouseLeave:()=>h(!1),...E};return R&&L(a)?r(T,{...l,children:w.cloneElement(a,{},u())}):f?r(S,{href:f,...l,children:u()}):r("span",{...l,children:u()})},I=C;export{q as a,I as b};
3
+ //# sourceMappingURL=chunk-AEZ5XKKG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/GlitchLink.tsx"],"sourcesContent":["\"use client\"\nimport Link from \"next/link\"\nimport React, {\n useState,\n useEffect,\n useRef,\n ReactNode,\n isValidElement,\n useMemo,\n} from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cn } from \"@/lib/utils\"\n\nexport const DEFAULT_SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\ntype GlitchLinkProps = {\n href?: string\n children: ReactNode\n symbols?: string\n className?: string\n asChild?: boolean\n duration?: number\n}\n\nconst GlitchLink = ({\n href,\n children,\n symbols = DEFAULT_SYMBOLS,\n className,\n asChild = false,\n duration = 40,\n ...props\n}: GlitchLinkProps) => {\n const [isHovering, setIsHovering] = useState(false)\n const [frame, setFrame] = useState(0)\n const rafRef = useRef<number | null>(null)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n\n const getTextContent = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\")\n return String(node)\n if (isValidElement(node)) {\n const children = (node.props as any).children\n if (children) return getTextContent(children)\n }\n return \"\"\n }\n\n const originalText = useMemo(() => getTextContent(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < originalText.length; i++) {\n const to = originalText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n setFrame(0)\n }\n\n useEffect(() => {\n if (isHovering && originalText) {\n setupQueue()\n const update = () => {\n setFrame((prev) => prev + 1)\n rafRef.current = requestAnimationFrame(update)\n }\n rafRef.current = requestAnimationFrame(update)\n } else {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n setFrame(0)\n }\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [isHovering, originalText])\n\n const renderContent = () => {\n // When not hovering, just render children as-is\n if (!isHovering) {\n return children\n }\n\n // When hovering, apply glitch effect to the text\n return originalText.split(\"\").map((char, i) => {\n const item = queueRef.current[i]\n\n // If animation for this char hasn't started, or it's finished\n if (!item || frame >= item.end) {\n return <span key={i}>{char}</span>\n }\n\n // If we are in the scrambling phase for this specific character\n if (frame >= item.start) {\n // Don't scramble spaces, just render them\n if (char === \" \") {\n return <span key={i}> </span>\n }\n\n if (!item.char || Math.random() < 0.28) {\n item.char = symbols[Math.floor(Math.random() * symbols.length)]\n }\n return (\n <span key={i} className=\"relative inline-block\">\n {/* The invisible real character preserves the exact width */}\n <span className=\"invisible opacity-0\" aria-hidden=\"true\">\n {char}\n </span>\n {/* The absolute symbol sits exactly on top of that width */}\n <span className=\"absolute inset-0 flex items-center justify-center font-mono opacity-50\">\n {item.char}\n </span>\n </span>\n )\n }\n\n // Default: show original character\n return <span key={i}>{char}</span>\n })\n }\n\n const commonProps = {\n className: cn(\"inline-block whitespace-nowrap\", className),\n onMouseEnter: (e: React.MouseEvent<HTMLElement>) => {\n const target = e.currentTarget\n if (target && !target.style.width) {\n target.style.width = `${target.offsetWidth}px`\n }\n setIsHovering(true)\n },\n onMouseLeave: () => setIsHovering(false),\n ...props,\n }\n\n if (asChild && isValidElement(children)) {\n return (\n <Slot {...commonProps}>\n {React.cloneElement(children as any, {}, renderContent())}\n </Slot>\n )\n }\n\n // If no href is provided, render as a span instead of a Link\n if (!href) {\n return <span {...commonProps}>{renderContent()}</span>\n }\n\n return (\n <Link href={href} {...commonProps}>\n {renderContent()}\n </Link>\n )\n}\n\nexport default GlitchLink\n"],"mappings":";yCACA,OAAOA,MAAU,YACjB,OAAOC,GACL,YAAAC,EACA,aAAAC,EACA,UAAAC,EAEA,kBAAAC,EACA,WAAAC,MACK,QACP,OAAS,QAAAC,MAAY,uBAmFN,cAAAC,EAcL,QAAAC,MAdK,oBAhFR,IAAMC,EAAkB,mCAWzBC,EAAa,CAAC,CAClB,KAAAC,EACA,SAAAC,EACA,QAAAC,EAAUJ,EACV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","isValidElement","useMemo","Slot","jsx","jsxs","DEFAULT_SYMBOLS","GlitchLink","href","children","symbols","className","asChild","duration","props","isHovering","setIsHovering","useState","frame","setFrame","rafRef","useRef","queueRef","getTextContent","node","isValidElement","originalText","useMemo","setupQueue","newQueue","i","to","start","end","useEffect","update","prev","renderContent","char","item","commonProps","cn","e","target","Slot","React","Link","GlitchLink_default"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _link = require('next/link'); var _link2 = _interopRequireDefault(_link);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _reactslot = require('@radix-ui/react-slot');var _jsxruntime = require('react/jsx-runtime');var q="!<>-_\\/[]{}\u2014=+*^?#________",C=({href:f,children:a,symbols:m=q,className:N,asChild:R=!1,duration:p=40,...E})=>{let[i,h]=_react.useState.call(void 0, !1),[g,c]=_react.useState.call(void 0, 0),s=_react.useRef.call(void 0, null),d=_react.useRef.call(void 0, []),y=t=>{if(typeof t=="string"||typeof t=="number")return String(t);if(_react.isValidElement.call(void 0, t)){let e=t.props.children;if(e)return y(e)}return""},o=_react.useMemo.call(void 0, ()=>y(a),[a]),v=()=>{let t=[];for(let e=0;e<o.length;e++){let n=o[e],M=Math.floor(Math.random()*(p*.5)),F=M+Math.floor(Math.random()*(p*.5));t.push({to:n,start:M,end:F})}d.current=t,c(0)};_react.useEffect.call(void 0, ()=>{if(i&&o){v();let t=()=>{c(e=>e+1),s.current=requestAnimationFrame(t)};s.current=requestAnimationFrame(t)}else s.current&&cancelAnimationFrame(s.current),c(0);return()=>{s.current&&cancelAnimationFrame(s.current)}},[i,o]);let u=()=>i?o.split("").map((t,e)=>{let n=d.current[e];return!n||g>=n.end?_jsxruntime.jsx.call(void 0, "span",{children:t},e):g>=n.start?t===" "?_jsxruntime.jsx.call(void 0, "span",{children:" "},e):((!n.char||Math.random()<.28)&&(n.char=m[Math.floor(Math.random()*m.length)]),_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible opacity-0","aria-hidden":"true",children:t}),_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center font-mono opacity-50",children:n.char})]},e)):_jsxruntime.jsx.call(void 0, "span",{children:t},e)}):a,l={className:_chunkFUYXCJOQjs.a.call(void 0, "inline-block whitespace-nowrap",N),onMouseEnter:t=>{let e=t.currentTarget;e&&!e.style.width&&(e.style.width=`${e.offsetWidth}px`),h(!0)},onMouseLeave:()=>h(!1),...E};return R&&_react.isValidElement.call(void 0, a)?_jsxruntime.jsx.call(void 0, _reactslot.Slot,{...l,children:_react2.default.cloneElement(a,{},u())}):f?_jsxruntime.jsx.call(void 0, _link2.default,{href:f,...l,children:u()}):_jsxruntime.jsx.call(void 0, "span",{...l,children:u()})},I= exports.b =C;exports.a = q; exports.b = I;
3
+ //# sourceMappingURL=chunk-EJTY2ABY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-EJTY2ABY.js","../src/components/GlitchLink.tsx"],"names":["DEFAULT_SYMBOLS","GlitchLink","href","children","symbols","className","asChild","duration","props","isHovering","setIsHovering","useState","frame","setFrame","rafRef","useRef","queueRef","getTextContent","node","isValidElement","originalText","useMemo","setupQueue","newQueue","i","to","start","end","useEffect","update","prev","renderContent","char","item","jsx","jsxs","commonProps","cn","e","target"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,6ECAtB,4EAQV,iDACc,+CAmFN,IAhFFA,CAAAA,CAAkB,kCAAA,CAWzBC,CAAAA,CAAa,CAAC,CAClB,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAUJ,CAAAA,CACV,SAAA,CAAAK,CAAAA,CACA,OAAA,C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"use client\"\nimport Link from \"next/link\"\nimport React, {\n useState,\n useEffect,\n useRef,\n ReactNode,\n isValidElement,\n useMemo,\n} from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cn } from \"@/lib/utils\"\n\nexport const DEFAULT_SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\ntype GlitchLinkProps = {\n href?: string\n children: ReactNode\n symbols?: string\n className?: string\n asChild?: boolean\n duration?: number\n}\n\nconst GlitchLink = ({\n href,\n children,\n symbols = DEFAULT_SYMBOLS,\n className,\n asChild = false,\n duration = 40,\n ...props\n}: GlitchLinkProps) => {\n const [isHovering, setIsHovering] = useState(false)\n const [frame, setFrame] = useState(0)\n const rafRef = useRef<number | null>(null)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n\n const getTextContent = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\")\n return String(node)\n if (isValidElement(node)) {\n const children = (node.props as any).children\n if (children) return getTextContent(children)\n }\n return \"\"\n }\n\n const originalText = useMemo(() => getTextContent(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < originalText.length; i++) {\n const to = originalText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n setFrame(0)\n }\n\n useEffect(() => {\n if (isHovering && originalText) {\n setupQueue()\n const update = () => {\n setFrame((prev) => prev + 1)\n rafRef.current = requestAnimationFrame(update)\n }\n rafRef.current = requestAnimationFrame(update)\n } else {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n setFrame(0)\n }\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [isHovering, originalText])\n\n const renderContent = () => {\n // When not hovering, just render children as-is\n if (!isHovering) {\n return children\n }\n\n // When hovering, apply glitch effect to the text\n return originalText.split(\"\").map((char, i) => {\n const item = queueRef.current[i]\n\n // If animation for this char hasn't started, or it's finished\n if (!item || frame >= item.end) {\n return <span key={i}>{char}</span>\n }\n\n // If we are in the scrambling phase for this specific character\n if (frame >= item.start) {\n // Don't scramble spaces, just render them\n if (char === \" \") {\n return <span key={i}> </span>\n }\n\n if (!item.char || Math.random() < 0.28) {\n item.char = symbols[Math.floor(Math.random() * symbols.length)]\n }\n return (\n <span key={i} className=\"relative inline-block\">\n {/* The invisible real character preserves the exact width */}\n <span className=\"invisible opacity-0\" aria-hidden=\"true\">\n {char}\n </span>\n {/* The absolute symbol sits exactly on top of that width */}\n <span className=\"absolute inset-0 flex items-center justify-center font-mono opacity-50\">\n {item.char}\n </span>\n </span>\n )\n }\n\n // Default: show original character\n return <span key={i}>{char}</span>\n })\n }\n\n const commonProps = {\n className: cn(\"inline-block whitespace-nowrap\", className),\n onMouseEnter: (e: React.MouseEvent<HTMLElement>) => {\n const target = e.currentTarget\n if (target && !target.style.width) {\n target.style.width = `${target.offsetWidth}px`\n }\n setIsHovering(true)\n },\n onMouseLeave: () => setIsHovering(false),\n ...props,\n }\n\n if (asChild && isValidElement(children)) {\n return (\n <Slot {...commonProps}>\n {React.cloneElement(children as any, {}, renderContent())}\n </Slot>\n )\n }\n\n // If no href is provided, render as a span instead of a Link\n if (!href) {\n return <span {...commonProps}>{renderContent()}</span>\n }\n\n return (\n <Link href={href} {...commonProps}>\n {renderContent()}\n </Link>\n )\n}\n\nexport default GlitchLink\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _jsxruntime = require('react/jsx-runtime');var E="!<>-_\\/[]{}\u2014=+*^?#________",I=e=>e[Math.floor(Math.random()*e.length)],y=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(y).join("");if(_react2.default.isValidElement(e)){let r=e.props;return(r.text||"")+(r.label||"")+(r.title||"")+y(r.children)}return""},b=(e,r,s)=>{if(typeof e=="string"||typeof e=="number"){let a=String(e),n=[];for(let f=0;f<a.length;f++)n.push(_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:r[s.current]||""},`char-${s.current}`)),s.current++;return n}if(Array.isArray(e))return e.map((a,n)=>_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:b(a,r,s)},`arr-${n}-${s.current}`));if(_react2.default.isValidElement(e)){let a=e.props,n={};return a.children&&(n.children=b(a.children,r,s)),_react2.default.cloneElement(e,n)}return e},P=({children:e,className:r,duration:s=40,symbols:a=E,delay:n=0})=>{let[f,_]=_react.useState.call(void 0, null),[F,x]=_react.useState.call(void 0, !1),R=_react.useRef.call(void 0, null),l=_react.useRef.call(void 0, 0),h=_react.useRef.call(void 0, []),g=_react.useRef.call(void 0, null),S=_react.useRef.call(void 0, !1),N=_react.useMemo.call(void 0, ()=>y(e),[e]),k=()=>{let o=[];for(let c=0;c<N.length;c++){let d=N[c],i=Math.floor(Math.random()*(s*.5)),t=i+Math.floor(Math.random()*(s*.5));o.push({to:d,start:i,end:t})}h.current=o,l.current=0,x(!1)},T=()=>{let o=0,c=[];for(let i=0;i<h.current.length;i++){let t=h.current[i];l.current>=t.end?(o++,c.push(t.to)):(l.current>=t.start&&(!t.char||Math.random()<.28)&&(t.char=I(a)),c.push(_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible select-none","aria-hidden":"true",children:t.to===" "?"\xA0":t.to}),l.current>=t.start&&_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center opacity-50 font-mono text-[1em] leading-none",children:t.char})]},i)))}_(b(e,c,{current:0})),o===h.current.length?x(!0):(l.current++,g.current=requestAnimationFrame(T))};return _react.useEffect.call(void 0, ()=>{let o=new IntersectionObserver(c=>{if(c[0].isIntersecting&&!S.current){S.current=!0;let d=setTimeout(()=>{k(),g.current=requestAnimationFrame(T)},n);return()=>clearTimeout(d)}},{threshold:.1});return R.current&&o.observe(R.current),()=>{o.disconnect(),g.current&&cancelAnimationFrame(g.current)}},[N,n]),_jsxruntime.jsx.call(void 0, "span",{ref:R,className:_chunkFUYXCJOQjs.a.call(void 0, "inline-block whitespace-pre-wrap",r),children:F?e:f})};function q(e){return _jsxruntime.jsx.call(void 0, _react.Suspense,{fallback:_jsxruntime.jsx.call(void 0, "span",{className:"invisible",children:e.children}),children:_jsxruntime.jsx.call(void 0, P,{...e})})}exports.a = q;
3
+ //# sourceMappingURL=chunk-FLYTIYNE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-FLYTIYNE.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","randomChar","symbols","extractText","node","React","props","injectScrambledText","scrambledChars","indexObj","text","result","i","jsx"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECQhC,+CAgCC,IA9BFA,CAAAA,CAAU,kCAAA,CAEVC,CAAAA,CAAcC,CAAAA,EAClBA,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CAE9CC,CAAAA,CAAeC,CAAAA,EAA4B,CAC/C,EAAA,CAAI,OAAOA,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,OAAO,MAAA,CAAOA,CAAI,CAAA,CAC5E,EAAA,CAAI,KAAA,CAAM,OAAA,CAAQA,CAAI,CAAA,CAAG,OAAOA,CAAAA,CAAK,GAAA,CAAID,CAAW,CAAA,CAAE,IAAA,CAAK,EAAE,CAAA,CAC7D,EAAA,CAAIE,eAAAA,CAAM,cAAA,CAAeD,CAAI,CAAA,CAAG,CAC9B,IAAME,CAAAA,CAAQF,CAAAA,CAAK,KAAA,CACnB,MAAA,CACGE,CAAAA,CAAM,IAAA,EAAQ,EAAA,CAAA,CAAA,CACdA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAAA,CACfA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAChBH,CAAAA,CAAYG,CAAAA,CAAM,QAAQ,CAE9B,CACA,MAAO,EACT,CAAA,CAEMC,CAAAA,CAAsB,CAC1BH,CAAAA,CACAI,CAAAA,CACAC,CAAAA,CAAAA,EACc,CACd,EAAA,CAAI,OAAOL,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,CACxD,IAAMM,CAAAA,CAAO,MAAA,CAAON,CAAI,CAAA,CAClBO,CAAAA,CAAiC,CAAC,CAAA,CACxC,GAAA,CAAA,IAASC,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAK,MAAA,CAAQE,CAAAA,EAAAA,CAC/BD,CAAAA,CAAO,IAAA,CACLE,6BAAAA,eAACR,CAAM,QAAA,CAAN,CACE,QAAA,CAAAG,CAAAA,CAAeC,CAAAA,CAAS,OAAO,CAAA,EAAK,EAAA,CAAA,CADlB,CAAA,KAAA,EAAQA,CAAAA,CAAS,OAAO,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-FLYTIYNE.js","sourcesContent":[null,"\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n Suspense,\n ReactNode,\n} from \"react\"\n\nconst SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\nconst randomChar = (symbols: string) =>\n symbols[Math.floor(Math.random() * symbols.length)]\n\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(extractText).join(\"\")\n if (React.isValidElement(node)) {\n const props = node.props as any\n return (\n (props.text || \"\") +\n (props.label || \"\") +\n (props.title || \"\") +\n extractText(props.children)\n )\n }\n return \"\"\n}\n\nconst injectScrambledText = (\n node: ReactNode,\n scrambledChars: (string | ReactNode)[],\n indexObj: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n const result: (string | ReactNode)[] = []\n for (let i = 0; i < text.length; i++) {\n result.push(\n <React.Fragment key={`char-${indexObj.current}`}>\n {scrambledChars[indexObj.current] || \"\"}\n </React.Fragment>\n )\n indexObj.current++\n }\n return result\n }\n\n if (Array.isArray(node)) {\n return node.map((child, idx) => (\n <React.Fragment key={`arr-${idx}-${indexObj.current}`}>\n {injectScrambledText(child, scrambledChars, indexObj)}\n </React.Fragment>\n ))\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as any\n const newProps: any = {}\n\n if (props.children) {\n newProps.children = injectScrambledText(\n props.children,\n scrambledChars,\n indexObj\n )\n }\n return React.cloneElement(node, newProps)\n }\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n duration?: number\n symbols?: string\n delay?: number\n}\n\nconst TextDecoder = ({\n children,\n className,\n duration = 40,\n symbols = SYMBOLS,\n delay = 0,\n}: TextDecoderProps) => {\n const [outputNodes, setOutputNodes] = useState<ReactNode>(null)\n const [isComplete, setIsComplete] = useState(false)\n const elementRef = useRef<HTMLSpanElement>(null)\n const frameRef = useRef(0)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n const rafRef = useRef<number | null>(null)\n const hasAnimatedRef = useRef(false)\n\n const fullText = useMemo(() => extractText(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < fullText.length; i++) {\n const to = fullText[i]\n // Every character starts within the first 50% of duration\n // and resolves within the second 50%\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n frameRef.current = 0\n setIsComplete(false)\n }\n\n const update = () => {\n let complete = 0\n const currentScrambledChars: (string | ReactNode)[] = []\n\n for (let i = 0; i < queueRef.current.length; i++) {\n const item = queueRef.current[i]\n\n if (frameRef.current >= item.end) {\n // Animation finished for this letter\n complete++\n currentScrambledChars.push(item.to)\n } else {\n // Character is either waiting (invisible ghost) or scrambling\n if (frameRef.current >= item.start) {\n if (!item.char || Math.random() < 0.28) {\n item.char = randomChar(symbols)\n }\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n {/* The Ghost: Locks the exact width/height of the specific character */}\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {item.to === \" \" ? \"\\u00A0\" : item.to}\n </span>\n {/* The Scramble: Overlays the ghost without affecting document flow */}\n {frameRef.current >= item.start && (\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono text-[1em] leading-none\">\n {item.char}\n </span>\n )}\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n if (complete === queueRef.current.length) {\n setIsComplete(true)\n } else {\n frameRef.current++\n rafRef.current = requestAnimationFrame(update)\n }\n }\n\n useEffect(() => {\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !hasAnimatedRef.current) {\n hasAnimatedRef.current = true\n const timeoutId = setTimeout(() => {\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n }, delay)\n return () => clearTimeout(timeoutId)\n }\n },\n { threshold: 0.1 }\n )\n\n if (elementRef.current) observer.observe(elementRef.current)\n\n return () => {\n observer.disconnect()\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [fullText, delay])\n\n return (\n <span\n ref={elementRef}\n className={cn(\"inline-block whitespace-pre-wrap\", className)}\n >\n {isComplete ? children : outputNodes}\n </span>\n )\n}\n\nexport default function SuspenseDecodedText(props: TextDecoderProps) {\n return (\n <Suspense fallback={<span className=\"invisible\">{props.children}</span>}>\n <TextDecoder {...props} />\n </Suspense>\n )\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","../src/lib/utils.ts"],"names":["cn","inputs","twMerge","clsx"],"mappings":"AAAA,qFAAY;ACAZ,4BAAsC,+CACd,SAERA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,oCAAAA,wBAAQC,CAAW,CAAC,CAC7B,CAAA,cAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","sourcesContent":[null,"import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","../src/lib/utils.ts"],"names":["cn","inputs","twMerge","clsx"],"mappings":"AAAA,qFAAY;ACAZ,4BAAsC,+CACd,SAERA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,oCAAAA,wBAAQC,CAAW,CAAC,CAC7B,CAAA,cAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-FUYXCJOQ.js","sourcesContent":[null,"import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ var d=Object.defineProperty;var e=(b,a,c)=>a in b?d(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var f=(b,a,c)=>e(b,typeof a!="symbol"?a+"":a,c);export{f as a};
3
+ //# sourceMappingURL=chunk-KPAOPUY2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-LX3KCZOW.js","../src/components/button.tsx"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","jsxs","Slot","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,iDACF,kEACkB,+CAuDjC,IAnDAA,CAAAA,CAAiBC,yCAAAA,gSACrB,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,wDAAA,CACT,WAAA,CACE,oEAAA,CACF,OAAA,CACE,gFAAA,CACF,SAAA,CAAW,iDAAA,CACX,KAAA,CAAO,8CAAA,CACP,IAAA,CAAM,iDACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,yBAAA,CACT,EAAA,CAAI,uBAAA,CACJ,EAAA,CAAI,0BAAA,CACJ,IAAA,CAAM,SACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,CAAA,CAUMC,CAAAA,aAAe,CAAA,CAAA,UAAA,CACnB,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAIEC,8BAAAA,CAFWL,CAAUM,eAAAA,CAAO,QAAA,CAE3B,CACC,SAAA,CAAWC,gCAAAA,CAAGb,CAAe,CAAE,OAAA,CAAAI,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAC1D,GAAA,CAAKO,CAAAA,CACL,QAAA,CAAUH,CAAAA,EAAWE,CAAAA,CAAM,QAAA,CAC1B,GAAGA,CAAAA,CAEH,QAAA,CAAA,CAAAF,CAAAA,EACCO,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,8FAAA,CAA+F,CAAA,CAE/G,CAACP,CAAAA,EAAWC,CAAAA,EAAQM,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,QAAA,CAAAN,CAAAA,CAAK,CAAA,CACjDC,CAAAA,CAAM,QAAA,CAAA,CACT,CAGN,CAAA,CACAP,CAAAA,CAAO,WAAA,CAAc,QAAA,CAAA,6BAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-LX3KCZOW.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-3xl font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-primary-accent hover:bg-muted\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-base\",\n sm: \"h-8 text-sm px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-base\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LX3KCZOW.js","../src/components/button.tsx"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","jsxs","Slot","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,iDACF,kEACkB,+CAuDjC,IAnDAA,CAAAA,CAAiBC,yCAAAA,gSACrB,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,wDAAA,CACT,WAAA,CACE,oEAAA,CACF,OAAA,CACE,gFAAA,CACF,SAAA,CAAW,iDAAA,CACX,KAAA,CAAO,8CAAA,CACP,IAAA,CAAM,iDACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,yBAAA,CACT,EAAA,CAAI,uBAAA,CACJ,EAAA,CAAI,0BAAA,CACJ,IAAA,CAAM,SACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,CAAA,CAUMC,CAAAA,aAAe,CAAA,CAAA,UAAA,CACnB,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAIEC,8BAAAA,CAFWL,CAAUM,eAAAA,CAAO,QAAA,CAE3B,CACC,SAAA,CAAWC,gCAAAA,CAAGb,CAAe,CAAE,OAAA,CAAAI,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAC1D,GAAA,CAAKO,CAAAA,CACL,QAAA,CAAUH,CAAAA,EAAWE,CAAAA,CAAM,QAAA,CAC1B,GAAGA,CAAAA,CAEH,QAAA,CAAA,CAAAF,CAAAA,EACCO,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,8FAAA,CAA+F,CAAA,CAE/G,CAACP,CAAAA,EAAWC,CAAAA,EAAQM,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,QAAA,CAAAN,CAAAA,CAAK,CAAA,CACjDC,CAAAA,CAAM,QAAA,CAAA,CACT,CAGN,CAAA,CACAP,CAAAA,CAAO,WAAA,CAAc,QAAA,CAAA,6BAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LX3KCZOW.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-3xl font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-primary-accent hover:bg-muted\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-base\",\n sm: \"h-8 text-sm px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-base\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+ var _chunkXYO4VLMFjs = require('./chunk-XYO4VLMF.js');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var x=14,S=1,F=5,$=(b,t)=>{if(b<t){let e=1-b/t;return e*e*(3-2*e)}return 0},v=class{constructor(t){_chunkXYO4VLMFjs.a.call(void 0, this,"x",0);_chunkXYO4VLMFjs.a.call(void 0, this,"y",0);_chunkXYO4VLMFjs.a.call(void 0, this,"anchorX",0);_chunkXYO4VLMFjs.a.call(void 0, this,"anchorY",0);_chunkXYO4VLMFjs.a.call(void 0, this,"vx",0);_chunkXYO4VLMFjs.a.call(void 0, this,"vy",0);_chunkXYO4VLMFjs.a.call(void 0, this,"nodes",[]);_chunkXYO4VLMFjs.a.call(void 0, this,"opacity",0);_chunkXYO4VLMFjs.a.call(void 0, this,"glitchZones",[]);_chunkXYO4VLMFjs.a.call(void 0, this,"maxReach",180);this.anchorX=t.x,this.anchorY=t.y,this.x=this.anchorX,this.y=this.anchorY,this.init()}init(){this.nodes=[];let t=3+Math.floor(Math.random()*3);for(let e=0;e<t;e++){let d=15+Math.random()*25,h=(Math.random()-.5)*60,u=(Math.random()-.5)*60;this.nodes.push({offsetX:h,offsetY:u,vx:(Math.random()-.5)*.1,vy:(Math.random()-.5)*.1,radius:d,t:Math.random()*100})}this.opacity=1}update(){let t=this.anchorX-this.x,e=this.anchorY-this.y,d=5e-4,h=t*d,u=e*d,a=(Math.random()-.5)*.01,Y=(Math.random()-.5)*.01;if(this.vx+=h+a,this.vy+=u+Y,this.vx*=.96,this.vy*=.96,this.x+=this.vx,this.y+=this.vy,this.nodes.forEach(s=>{s.t+=.005,s.offsetX+=Math.sin(s.t)*.1+s.vx,s.offsetY+=Math.cos(s.t*.9)*.1+s.vy;let m=70;(s.offsetX>m||s.offsetX<-m)&&(s.vx*=-1),(s.offsetY>m||s.offsetY<-m)&&(s.vy*=-1),s.radius+=Math.sin(s.t*2)*.1}),this.glitchZones=this.glitchZones.filter(s=>s.life>0),this.glitchZones.forEach(s=>s.life--),Math.random()<.03){let m=f=>Math.round((f-x/2)/x)*x+x/2,p=this.x+(Math.random()-.5)*80,w=this.y+(Math.random()-.5)*80,i=m(p),c=m(w);if((Math.random()>.6?"line":"dot")==="line"){let f=Math.random()>.5,n=40+Math.random()*80,l=2;this.glitchZones.push({x:f?i-l/2:i-n/2,y:f?c-n/2:c-l/2,w:f?l:n,h:f?n:l,life:8+Math.random()*12})}else this.glitchZones.push({x:i-4/2,y:c-4/2,w:4,h:4,life:6+Math.random()*10})}}},B=class{constructor(t,e){_chunkXYO4VLMFjs.a.call(void 0, this,"x");_chunkXYO4VLMFjs.a.call(void 0, this,"y");_chunkXYO4VLMFjs.a.call(void 0, this,"opacity");_chunkXYO4VLMFjs.a.call(void 0, this,"decay");_chunkXYO4VLMFjs.a.call(void 0, this,"nodes");_chunkXYO4VLMFjs.a.call(void 0, this,"maxReach",60);this.x=t,this.y=e,this.opacity=.8,this.decay=.03,this.nodes=[];let d=2;for(let h=0;h<d;h++)this.nodes.push({offsetX:(Math.random()-.5)*10,offsetY:(Math.random()-.5)*10,vx:(Math.random()-.5)*1,vy:(Math.random()-.5)*1,radius:5+Math.random()*10,t:0})}update(){this.opacity-=this.decay,this.nodes.forEach(t=>{t.offsetX+=t.vx,t.offsetY+=t.vy,t.radius*=.95})}},q=()=>{let b=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=b.current;if(!t)return;let e=t.getContext("2d");if(!e)return;let d,h=[],u=[],a={x:-1e3,y:-1e3,lastX:-1e3,lastY:-1e3},Y=()=>{h=[];let i=t.width,c=t.height;h.push(new v({x:i-i*.15,y:c*.15})),h.push(new v({x:i*.4,y:c*.4})),h.push(new v({x:i*.05+50,y:c-c*.15})),h.push(new v({x:i-i*.05-50,y:c-c*.05-50}))},s=()=>{let i=t.getBoundingClientRect();t.width=i.width,t.height=i.height,Y()},m=i=>{let c=t.getBoundingClientRect();a.x=i.clientX-c.left,a.y=i.clientY-c.top,a.lastX===-1e3&&(a.lastX=a.x,a.lastY=a.y);let M=a.x-a.lastX,f=a.y-a.lastY;Math.sqrt(M*M+f*f)>20&&(u.push(new B(a.x,a.y)),a.lastX=a.x,a.lastY=a.y)},p=()=>{s()},w=()=>{let i=t.width,c=t.height;h.forEach(n=>n.update());for(let n=u.length-1;n>=0;n--)u[n].update(),u[n].opacity<=0&&u.splice(n,1);e.fillStyle="#050505",e.fillRect(0,0,i,c);let M=[...h,...u],f=[];h.forEach(n=>f.push(...n.glitchZones));for(let n=x/2;n<i;n+=x)for(let l=x/2;l<c;l+=x){let C=!1;for(let o of f)if(n>=o.x&&n<=o.x+o.w&&l>=o.y&&l<=o.y+o.h){C=!0;break}if(C){if(e.fillStyle="rgba(182, 243, 191, 0.95)",Math.random()>.1){let o=Math.random()>.5?F*.7:S*2;e.beginPath(),e.arc(n,l,o/2,0,Math.PI*2),e.fill()}continue}let y=0,I=!1;for(let o of M)if(Math.abs(n-o.x)<o.maxReach&&Math.abs(l-o.y)<o.maxReach){I=!0;break}if(!I){e.fillStyle="rgba(255, 255, 255, 0.03)",e.fillRect(n-.5,l-.5,1,1);continue}for(let o of M){let E=n-o.x,G=l-o.y;if(Math.abs(E)>o.maxReach||Math.abs(G)>o.maxReach)continue;let g=0;for(let R of o.nodes){let z=E-R.offsetX,X=G-R.offsetY,Z=Math.sqrt(z*z+X*X);g+=$(Z,R.radius)}g>1&&(g=1),y+=g*o.opacity}if(y>1&&(y=1),y>.01){let X=Math.floor(255+-73*y),Z=Math.floor(255+-12*y),L=Math.floor(255+-64*y),A=y*.5,P=S+y*(F-S);e.fillStyle=`rgba(${X}, ${Z}, ${L}, ${A})`,e.beginPath(),e.arc(n,l,P/2,0,Math.PI*2),e.fill()}else e.fillStyle="rgba(255, 255, 255, 0.03)",e.fillRect(n-.5,l-.5,1,1)}d=requestAnimationFrame(w)};return window.addEventListener("resize",p),window.addEventListener("mousemove",m),s(),w(),()=>{window.removeEventListener("resize",p),window.removeEventListener("mousemove",m),cancelAnimationFrame(d)}},[]),_jsxruntime.jsx.call(void 0, "canvas",{ref:b,className:"fixed inset-0 -z-10 w-full h-full pointer-events-none"})},T= exports.a =q;exports.a = T;
3
+ //# sourceMappingURL=chunk-MLULTZDS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-MLULTZDS.js","../src/components/GeometricFluidGrid.tsx"],"names":["GAP","BASE_SIZE","MAX_SIZE","getFalloff","dist","radius","val","AnchoredBlob","anchorConfig","__publicField","nodeCount","i","r","ox","oy","dx","dy","k","ax","ay","wx","wy","node","maxDist","g","snap","v","rawCx","rawCy","cx","cy","isVert","len","thickness","TrailBlob","x","y","count","GeometricFluidGrid","canvasRef","useRef","useEffect","canvas","ctx","animationFrameId","orbs","trail","mouse","initWorld","w","h","resize","rect","handleMouseMove","e","handleResize","draw","orb","renderList","allGlitches","o","isGlitching","size","totalInfluence","nearby","entity","localInf","nx","ny","b","alpha","jsx","GeometricFluidGrid_default"],"mappings":"AAAA,qFAAY;AACZ,sDAAuC,8BCAE,+CAycrC,IAtcEA,CAAAA,CAAM,EAAA,CACNC,CAAAA,CAAY,CAAA,CACZC,CAAAA,CAAW,CAAA,CA4BXC,CAAAA,CAAa,CAACC,CAAAA,CAAcC,CAAAA,CAAAA,EAA2B,CAC3D,EAAA,CAAID,CAAAA,CAAOC,CAAAA,CAAQ,CACjB,IAAMC,CAAAA,CAAM,CAAA,CAAIF,CAAAA,CAAOC,CAAAA,CACvB,OAAOC,CAAAA,CAAMA,CAAAA,CAAAA,CAAO,CAAA,CAAI,CAAA,CAAIA,CAAAA,CAC9B,CACA,OAAO,CACT,CAAA,CAGMC,CAAAA,CAAN,KAAmB,CAqBjB,WAAA,CAAYC,CAAAA,CAAwC,CAnBpDC,gCAAAA,IAAA,CAAA,GAAA,CAAY,CAAA,CAAA,CACZA,gCAAAA,IAAA,CAAA,GAAA,CAAY,CAAA,CAAA,CAGZA,gCAAAA,IAAA,CAAA,SAAA,CAAkB,CAAA,CAAA,CAClBA,gCAAAA,IAAA,CAAA,SAAA,CAAkB,CAAA,CAAA,CAGlBA,gCAAAA,IAAA,CAAA,IAAA,CAAa,CAAA,CAAA,CACbA,gCAAAA,IAAA,CAAA,IAAA,CAAa,CAAA,CAAA,CAGbA,gCAAAA,IAAA,CAAA,OAAA,CAAgB,CAAC,CAAA,CAAA,CACjBA,gCAAAA,IAAA,CAAA,SAAA,CAAkB,CAAA,CAAA,CAGlBA,gCAAAA,IAAA,CAAA,aAAA,CAA4B,CAAC,CAAA,CAAA,CAC7BA,gCAAAA,IAAA,CAAA,UAAA,CAAmB,GAAA,CAAA,CAGjB,IAAA,CAAK,OAAA,CAAUD,CAAAA,CAAa,CAAA,CAC5B,IAAA,CAAK,OAAA,CAAUA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i-ui-kit/dist/chunk-MLULTZDS.js","sourcesContent":[null,"\"use client\"\nimport React, { useEffect, useRef } from \"react\"\n\n// --- CONFIGURATION ---\nconst GAP = 14\nconst BASE_SIZE = 1\nconst MAX_SIZE = 5\n\n// --- TYPES ---\ninterface Node {\n offsetX: number\n offsetY: number\n vx: number\n vy: number\n radius: number\n t: number\n}\n\ninterface GlitchZone {\n x: number\n y: number\n w: number\n h: number\n life: number\n}\n\ninterface MouseState {\n x: number\n y: number\n lastX: number\n lastY: number\n}\n\n// --- MATH HELPERS ---\nconst getFalloff = (dist: number, radius: number): number => {\n if (dist < radius) {\n const val = 1 - dist / radius\n return val * val * (3 - 2 * val)\n }\n return 0\n}\n\n// --- CLASSES ---\nclass AnchoredBlob {\n // Current Position\n x: number = 0\n y: number = 0\n\n // Anchor Position (Home base)\n anchorX: number = 0\n anchorY: number = 0\n\n // Movement\n vx: number = 0\n vy: number = 0\n\n // Appearance\n nodes: Node[] = []\n opacity: number = 0\n\n // Glitch State\n glitchZones: GlitchZone[] = []\n maxReach: number = 180\n\n constructor(anchorConfig: { x: number; y: number }) {\n this.anchorX = anchorConfig.x\n this.anchorY = anchorConfig.y\n this.x = this.anchorX\n this.y = this.anchorY\n this.init()\n }\n\n init() {\n // 1. Create Internal Nodes (The \"Blob\" composition)\n this.nodes = []\n const nodeCount = 3 + Math.floor(Math.random() * 3) // 3 to 5 nodes\n\n for (let i = 0; i < nodeCount; i++) {\n // Significantly smaller radius (15-40px) to reduce central bulk\n const r = 15 + Math.random() * 25\n // Wider initial spread\n const ox = (Math.random() - 0.5) * 60\n const oy = (Math.random() - 0.5) * 60\n\n this.nodes.push({\n offsetX: ox,\n offsetY: oy,\n vx: (Math.random() - 0.5) * 0.1, // Slower internal movement (was 0.4)\n vy: (Math.random() - 0.5) * 0.1,\n radius: r,\n t: Math.random() * 100,\n })\n }\n\n this.opacity = 1\n }\n\n update() {\n // --- 1. Tethered Movement Logic ---\n const dx = this.anchorX - this.x\n const dy = this.anchorY - this.y\n\n // Spring constant (very loose)\n const k = 0.0005\n const ax = dx * k\n const ay = dy * k\n\n // Random wandering force - Reduced significantly for slower drift\n const wx = (Math.random() - 0.5) * 0.01 // was 0.05\n const wy = (Math.random() - 0.5) * 0.01 // was 0.05\n\n this.vx += ax + wx\n this.vy += ay + wy\n\n this.vx *= 0.96\n this.vy *= 0.96\n\n this.x += this.vx\n this.y += this.vy\n\n // --- 2. Internal Node Animation ---\n this.nodes.forEach((node) => {\n // Slow down time step\n node.t += 0.005 // was 0.02\n\n // Slower oscillation and movement\n node.offsetX += Math.sin(node.t) * 0.1 + node.vx // amp was 0.4\n node.offsetY += Math.cos(node.t * 0.9) * 0.1 + node.vy\n\n // Constrain to \"nucleus\"\n const maxDist = 70\n if (node.offsetX > maxDist || node.offsetX < -maxDist) node.vx *= -1\n if (node.offsetY > maxDist || node.offsetY < -maxDist) node.vy *= -1\n\n // Pulse size\n node.radius += Math.sin(node.t * 2) * 0.1\n })\n\n // --- 3. Manage Glitch Zones ---\n // Remove dead glitches\n this.glitchZones = this.glitchZones.filter((g) => g.life > 0)\n this.glitchZones.forEach((g) => g.life--)\n\n // Randomly spawn new glitches\n if (Math.random() < 0.03) {\n // 3% chance per frame\n const spread = 80\n\n // Snap random positions to exact grid points to ensure clean lines\n const snap = (v: number) =>\n Math.round((v - GAP / 2) / GAP) * GAP + GAP / 2\n\n const rawCx = this.x + (Math.random() - 0.5) * spread\n const rawCy = this.y + (Math.random() - 0.5) * spread\n\n const cx = snap(rawCx)\n const cy = snap(rawCy)\n\n const type = Math.random() > 0.6 ? \"line\" : \"dot\"\n\n if (type === \"line\") {\n const isVert = Math.random() > 0.5\n // Medium length: 40-120px\n const len = 40 + Math.random() * 80\n\n // Thickness is essentially zero (just a sliver) centered on the grid line\n // to guarantee we only pick up exactly one row/column of dots\n const thickness = 2\n\n this.glitchZones.push({\n x: isVert ? cx - thickness / 2 : cx - len / 2,\n y: isVert ? cy - len / 2 : cy - thickness / 2,\n w: isVert ? thickness : len,\n h: isVert ? len : thickness,\n life: 8 + Math.random() * 12,\n })\n } else {\n // Single dot\n // Box just large enough to catch one grid point\n const size = 4\n\n this.glitchZones.push({\n x: cx - size / 2,\n y: cy - size / 2,\n w: size,\n h: size,\n life: 6 + Math.random() * 10,\n })\n }\n }\n }\n}\n\nclass TrailBlob {\n x: number\n y: number\n opacity: number\n decay: number\n nodes: Node[]\n maxReach: number = 60\n\n constructor(x: number, y: number) {\n this.x = x\n this.y = y\n this.opacity = 0.8\n this.decay = 0.03\n\n this.nodes = []\n const count = 2\n for (let i = 0; i < count; i++) {\n this.nodes.push({\n offsetX: (Math.random() - 0.5) * 10,\n offsetY: (Math.random() - 0.5) * 10,\n vx: (Math.random() - 0.5) * 1,\n vy: (Math.random() - 0.5) * 1,\n radius: 5 + Math.random() * 10,\n t: 0,\n })\n }\n }\n\n update() {\n this.opacity -= this.decay\n this.nodes.forEach((node) => {\n node.offsetX += node.vx\n node.offsetY += node.vy\n node.radius *= 0.95\n })\n }\n}\n\nconst GeometricFluidGrid: React.FC = () => {\n const canvasRef = useRef<HTMLCanvasElement>(null)\n\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) return\n\n const ctx = canvas.getContext(\"2d\")\n if (!ctx) return\n\n let animationFrameId: number\n let orbs: AnchoredBlob[] = []\n let trail: TrailBlob[] = []\n let mouse: MouseState = { x: -1000, y: -1000, lastX: -1000, lastY: -1000 }\n\n const initWorld = () => {\n orbs = []\n const w = canvas.width\n const h = canvas.height\n\n // 1. Top Right\n orbs.push(\n new AnchoredBlob({\n x: w - w * 0.15,\n y: h * 0.15,\n })\n )\n\n // 2. ~40% from top and ~40% from left\n orbs.push(\n new AnchoredBlob({\n x: w * 0.4,\n y: h * 0.4,\n })\n )\n\n // 3. Bottom Left\n orbs.push(\n new AnchoredBlob({\n x: w * 0.05 + 50,\n y: h - h * 0.15,\n })\n )\n\n // 4. Bottom Right\n orbs.push(\n new AnchoredBlob({\n x: w - w * 0.05 - 50,\n y: h - h * 0.05 - 50,\n })\n )\n }\n\n const resize = () => {\n const rect = canvas.getBoundingClientRect()\n canvas.width = rect.width\n canvas.height = rect.height\n initWorld()\n }\n\n const handleMouseMove = (e: MouseEvent) => {\n const rect = canvas.getBoundingClientRect()\n mouse.x = e.clientX - rect.left\n mouse.y = e.clientY - rect.top\n\n if (mouse.lastX === -1000) {\n mouse.lastX = mouse.x\n mouse.lastY = mouse.y\n }\n\n const dx = mouse.x - mouse.lastX\n const dy = mouse.y - mouse.lastY\n const dist = Math.sqrt(dx * dx + dy * dy)\n\n if (dist > 20) {\n trail.push(new TrailBlob(mouse.x, mouse.y))\n mouse.lastX = mouse.x\n mouse.lastY = mouse.y\n }\n }\n\n const handleResize = () => {\n resize()\n }\n\n const draw = () => {\n const w = canvas.width\n const h = canvas.height\n\n // Update Logic\n orbs.forEach((orb) => orb.update())\n for (let i = trail.length - 1; i >= 0; i--) {\n trail[i].update()\n if (trail[i].opacity <= 0) trail.splice(i, 1)\n }\n\n // Clear Screen\n ctx.fillStyle = \"#050505\"\n ctx.fillRect(0, 0, w, h)\n\n const renderList = [...orbs, ...trail]\n\n // Collect all glitch zones for easier checking inside the loop\n // We flat map them to a simple array to iterate quickly\n const allGlitches: GlitchZone[] = []\n orbs.forEach((o) => allGlitches.push(...o.glitchZones))\n\n for (let x = GAP / 2; x < w; x += GAP) {\n for (let y = GAP / 2; y < h; y += GAP) {\n // --- GLITCH CHECK ---\n // Check if this specific grid dot is inside a glitch zone\n let isGlitching = false\n for (const g of allGlitches) {\n // Simple AABB check\n if (x >= g.x && x <= g.x + g.w && y >= g.y && y <= g.y + g.h) {\n isGlitching = true\n break\n }\n }\n\n if (isGlitching) {\n // Glitched Dot: Bright\n // We use the grid itself to manifest the glitch\n ctx.fillStyle = \"rgba(182, 243, 191, 0.95)\"\n\n // Randomly skip some dots in the glitch line for a \"broken\" look\n if (Math.random() > 0.1) {\n const size = Math.random() > 0.5 ? MAX_SIZE * 0.7 : BASE_SIZE * 2\n ctx.beginPath()\n ctx.arc(x, y, size / 2, 0, Math.PI * 2)\n ctx.fill()\n }\n continue // Skip standard influence calculation for this dot\n }\n\n // --- STANDARD INFLUENCE CHECK ---\n let totalInfluence = 0\n\n // Optimization: Is near blob?\n let nearby = false\n for (const entity of renderList) {\n if (\n Math.abs(x - entity.x) < entity.maxReach &&\n Math.abs(y - entity.y) < entity.maxReach\n ) {\n nearby = true\n break\n }\n }\n\n if (!nearby) {\n // Passive Background Dot\n ctx.fillStyle = \"rgba(255, 255, 255, 0.03)\"\n ctx.fillRect(x - 0.5, y - 0.5, 1, 1)\n continue\n }\n\n // Calculate Influence\n for (const entity of renderList) {\n const dx = x - entity.x\n const dy = y - entity.y\n\n if (\n Math.abs(dx) > entity.maxReach ||\n Math.abs(dy) > entity.maxReach\n )\n continue\n\n let localInf = 0\n for (const node of entity.nodes) {\n const nx = dx - node.offsetX\n const ny = dy - node.offsetY\n const dist = Math.sqrt(nx * nx + ny * ny)\n localInf += getFalloff(dist, node.radius)\n }\n if (localInf > 1) localInf = 1\n totalInfluence += localInf * entity.opacity\n }\n\n if (totalInfluence > 1) totalInfluence = 1\n\n // Draw Cell\n if (totalInfluence > 0.01) {\n // Gradient: White (Edge) to Green (#B6F3BF - Center)\n const edgeR = 255,\n centerR = 182\n const edgeG = 255,\n centerG = 243\n const edgeB = 255,\n centerB = 191\n\n // Interpolate from White (0 influence) to Green (1 influence)\n const r = Math.floor(edgeR + (centerR - edgeR) * totalInfluence)\n const g = Math.floor(edgeG + (centerG - edgeG) * totalInfluence)\n const b = Math.floor(edgeB + (centerB - edgeB) * totalInfluence)\n\n const alpha = totalInfluence * 0.5\n const size = BASE_SIZE + totalInfluence * (MAX_SIZE - BASE_SIZE)\n\n ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${alpha})`\n ctx.beginPath()\n ctx.arc(x, y, size / 2, 0, Math.PI * 2)\n ctx.fill()\n } else {\n ctx.fillStyle = \"rgba(255, 255, 255, 0.03)\"\n ctx.fillRect(x - 0.5, y - 0.5, 1, 1)\n }\n }\n }\n\n animationFrameId = requestAnimationFrame(draw)\n }\n\n window.addEventListener(\"resize\", handleResize)\n window.addEventListener(\"mousemove\", handleMouseMove)\n\n resize()\n draw()\n\n return () => {\n window.removeEventListener(\"resize\", handleResize)\n window.removeEventListener(\"mousemove\", handleMouseMove)\n cancelAnimationFrame(animationFrameId)\n }\n }, [])\n\n return (\n <canvas\n ref={canvasRef}\n className=\"fixed inset-0 -z-10 w-full h-full pointer-events-none\"\n />\n )\n}\n\nexport default GeometricFluidGrid\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-R74QDO2Z.js","../src/components/PixelLoad.tsx"],"names":["isStaticImageData","src","getImageSrc","PixelLoad","alt","duration","steps","className","onAnimationComplete","priority","quality","placeholder","blurDataURL","objectFit","containerRef","useRef","canvasRef","status","setStatus","useState","dimensions","setDimensions","imageSrc","drawPixelated","useCallback","ctx","img","pixelSize","w","h","sw","sh","runAnimation","minPixelSize","intervalMs","currentStep","animate","progress","useEffect","container","updateDimensions","width","height","resizeObserver","canvas","isComplete","isAnimating","jsxs"],"mappings":"AAAA,yrBAAY;ACEZ,iFAA4C,8BACkB,+CAsK1D,SAlJKA,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,Q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AAA,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,CAAYY,CAAAA,CAAcT,CAAa,CAAC,CAAA,CAEtD,IAAMsB,CAAAA,CAAa5B,CAAAA,GAAW,UAAA,CACxB6B,CAAAA,CAAc7B,CAAAA,GAAW,WAAA,EAAeA,CAAAA,GAAW,SAAA,CAEzD,OACE8B,8BAAAA,KAAC,CAAA,CACC,GAAA,CAAKjC,CAAAA,CACL,SAAA,CAAW,CAAA,uBAAA,EAA0BP,CAAAA,EAAa,EAAE,CAAA,CAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-R74QDO2Z.js","sourcesContent":[null,"\"use client\"\n\nimport Image, { 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 priority?: boolean\n quality?: number\n placeholder?: \"blur\" | \"empty\"\n blurDataURL?: string\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 priority,\n quality,\n placeholder = \"empty\",\n blurDataURL,\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 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 drawPixelated(ctx, img, pixelSize, w, h)\n\n currentStep++\n\n if (currentStep <= steps) {\n window.setTimeout(animate, intervalMs)\n } else {\n setStatus(\"complete\")\n onAnimationComplete?.()\n }\n }\n\n animate()\n },\n [duration, steps, drawPixelated, 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 // Guard against invalid dimensions\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 // Set canvas dimensions immediately to ensure it covers the area\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 // Draw first frame immediately to prevent original image from showing\n const minPixelSize = Math.max(dimensions.width, dimensions.height) / 4\n drawPixelated(ctx, img, minPixelSize, dimensions.width, dimensions.height)\n // Then start animation\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 const isComplete = status === \"complete\"\n const isAnimating = status === \"animating\" || status === \"loading\"\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={{\n objectFit,\n opacity: isComplete ? 0 : 1,\n zIndex: isAnimating ? 2 : 1,\n }}\n aria-hidden={isComplete}\n />\n {isComplete && (\n <Image\n src={src}\n alt={alt}\n fill\n priority={priority}\n quality={quality}\n placeholder={placeholder}\n blurDataURL={blurDataURL}\n className=\"opacity-100 transition-opacity duration-150 ease-out z-[1]\"\n style={{\n objectFit,\n }}\n />\n )}\n </div>\n )\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-R74QDO2Z.js","../src/components/PixelLoad.tsx"],"names":["isStaticImageData","src","getImageSrc","PixelLoad","alt","duration","steps","className","onAnimationComplete","priority","quality","placeholder","blurDataURL","objectFit","containerRef","useRef","canvasRef","status","setStatus","useState","dimensions","setDimensions","imageSrc","drawPixelated","useCallback","ctx","img","pixelSize","w","h","sw","sh","runAnimation","minPixelSize","intervalMs","currentStep","animate","progress","useEffect","container","updateDimensions","width","height","resizeObserver","canvas","isComplete","isAnimating","jsxs"],"mappings":"AAAA,yrBAAY;ACEZ,iFAA4C,8BACkB,+CAsK1D,SAlJKA,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,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,OAAA,CACd,WAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,OACd,CAAA,CAAgC,CAC9B,IAAMC,CAAAA,CAAeC,2BAAAA,IAA2B,CAAA,CAC1CC,CAAAA,CAAYD,2BAAAA,IAA8B,CAAA,CAC1C,CAACE,CAAAA,CAAQC,CAAS,CAAA,CAAIC,6BAAAA,SAAmC,CAAA,CACzD,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAIF,6BAAAA,IAGtB,CAAA,CAERG,CAAAA,CAAWpB,CAAAA,CAAYD,CAAG,CAAA,CAE1BsB,CAAAA,CAAgBC,gCAAAA,CAElBC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CAAAA,EACS,CACTJ,CAAAA,CAAI,qBAAA,CAAwB,CAAA,CAAA,CAE5B,IAAMK,CAAAA,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A,uBAAA,EAA0BP,CAAAA,EAAa,EAAE,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-R74QDO2Z.js","sourcesContent":[null,"\"use client\"\n\nimport Image, { 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 priority?: boolean\n quality?: number\n placeholder?: \"blur\" | \"empty\"\n blurDataURL?: string\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 priority,\n quality,\n placeholder = \"empty\",\n blurDataURL,\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 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 drawPixelated(ctx, img, pixelSize, w, h)\n\n currentStep++\n\n if (currentStep <= steps) {\n window.setTimeout(animate, intervalMs)\n } else {\n setStatus(\"complete\")\n onAnimationComplete?.()\n }\n }\n\n animate()\n },\n [duration, steps, drawPixelated, 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 // Guard against invalid dimensions\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 // Set canvas dimensions immediately to ensure it covers the area\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 // Draw first frame immediately to prevent original image from showing\n const minPixelSize = Math.max(dimensions.width, dimensions.height) / 4\n drawPixelated(ctx, img, minPixelSize, dimensions.width, dimensions.height)\n // Then start animation\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 const isComplete = status === \"complete\"\n const isAnimating = status === \"animating\" || status === \"loading\"\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={{\n objectFit,\n opacity: isComplete ? 0 : 1,\n zIndex: isAnimating ? 2 : 1,\n }}\n aria-hidden={isComplete}\n />\n {isComplete && (\n <Image\n src={src}\n alt={alt}\n fill\n priority={priority}\n quality={quality}\n placeholder={placeholder}\n blurDataURL={blurDataURL}\n className=\"opacity-100 transition-opacity duration-150 ease-out z-[1]\"\n style={{\n objectFit,\n }}\n />\n )}\n </div>\n )\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as r}from"./chunk-KPAOPUY2.mjs";import{useEffect as k,useRef as N}from"react";import{jsx as _}from"react/jsx-runtime";var x=14,S=1,F=5,$=(b,t)=>{if(b<t){let e=1-b/t;return e*e*(3-2*e)}return 0},v=class{constructor(t){r(this,"x",0);r(this,"y",0);r(this,"anchorX",0);r(this,"anchorY",0);r(this,"vx",0);r(this,"vy",0);r(this,"nodes",[]);r(this,"opacity",0);r(this,"glitchZones",[]);r(this,"maxReach",180);this.anchorX=t.x,this.anchorY=t.y,this.x=this.anchorX,this.y=this.anchorY,this.init()}init(){this.nodes=[];let t=3+Math.floor(Math.random()*3);for(let e=0;e<t;e++){let d=15+Math.random()*25,h=(Math.random()-.5)*60,u=(Math.random()-.5)*60;this.nodes.push({offsetX:h,offsetY:u,vx:(Math.random()-.5)*.1,vy:(Math.random()-.5)*.1,radius:d,t:Math.random()*100})}this.opacity=1}update(){let t=this.anchorX-this.x,e=this.anchorY-this.y,d=5e-4,h=t*d,u=e*d,a=(Math.random()-.5)*.01,Y=(Math.random()-.5)*.01;if(this.vx+=h+a,this.vy+=u+Y,this.vx*=.96,this.vy*=.96,this.x+=this.vx,this.y+=this.vy,this.nodes.forEach(s=>{s.t+=.005,s.offsetX+=Math.sin(s.t)*.1+s.vx,s.offsetY+=Math.cos(s.t*.9)*.1+s.vy;let m=70;(s.offsetX>m||s.offsetX<-m)&&(s.vx*=-1),(s.offsetY>m||s.offsetY<-m)&&(s.vy*=-1),s.radius+=Math.sin(s.t*2)*.1}),this.glitchZones=this.glitchZones.filter(s=>s.life>0),this.glitchZones.forEach(s=>s.life--),Math.random()<.03){let m=f=>Math.round((f-x/2)/x)*x+x/2,p=this.x+(Math.random()-.5)*80,w=this.y+(Math.random()-.5)*80,i=m(p),c=m(w);if((Math.random()>.6?"line":"dot")==="line"){let f=Math.random()>.5,n=40+Math.random()*80,l=2;this.glitchZones.push({x:f?i-l/2:i-n/2,y:f?c-n/2:c-l/2,w:f?l:n,h:f?n:l,life:8+Math.random()*12})}else this.glitchZones.push({x:i-4/2,y:c-4/2,w:4,h:4,life:6+Math.random()*10})}}},B=class{constructor(t,e){r(this,"x");r(this,"y");r(this,"opacity");r(this,"decay");r(this,"nodes");r(this,"maxReach",60);this.x=t,this.y=e,this.opacity=.8,this.decay=.03,this.nodes=[];let d=2;for(let h=0;h<d;h++)this.nodes.push({offsetX:(Math.random()-.5)*10,offsetY:(Math.random()-.5)*10,vx:(Math.random()-.5)*1,vy:(Math.random()-.5)*1,radius:5+Math.random()*10,t:0})}update(){this.opacity-=this.decay,this.nodes.forEach(t=>{t.offsetX+=t.vx,t.offsetY+=t.vy,t.radius*=.95})}},q=()=>{let b=N(null);return k(()=>{let t=b.current;if(!t)return;let e=t.getContext("2d");if(!e)return;let d,h=[],u=[],a={x:-1e3,y:-1e3,lastX:-1e3,lastY:-1e3},Y=()=>{h=[];let i=t.width,c=t.height;h.push(new v({x:i-i*.15,y:c*.15})),h.push(new v({x:i*.4,y:c*.4})),h.push(new v({x:i*.05+50,y:c-c*.15})),h.push(new v({x:i-i*.05-50,y:c-c*.05-50}))},s=()=>{let i=t.getBoundingClientRect();t.width=i.width,t.height=i.height,Y()},m=i=>{let c=t.getBoundingClientRect();a.x=i.clientX-c.left,a.y=i.clientY-c.top,a.lastX===-1e3&&(a.lastX=a.x,a.lastY=a.y);let M=a.x-a.lastX,f=a.y-a.lastY;Math.sqrt(M*M+f*f)>20&&(u.push(new B(a.x,a.y)),a.lastX=a.x,a.lastY=a.y)},p=()=>{s()},w=()=>{let i=t.width,c=t.height;h.forEach(n=>n.update());for(let n=u.length-1;n>=0;n--)u[n].update(),u[n].opacity<=0&&u.splice(n,1);e.fillStyle="#050505",e.fillRect(0,0,i,c);let M=[...h,...u],f=[];h.forEach(n=>f.push(...n.glitchZones));for(let n=x/2;n<i;n+=x)for(let l=x/2;l<c;l+=x){let C=!1;for(let o of f)if(n>=o.x&&n<=o.x+o.w&&l>=o.y&&l<=o.y+o.h){C=!0;break}if(C){if(e.fillStyle="rgba(182, 243, 191, 0.95)",Math.random()>.1){let o=Math.random()>.5?F*.7:S*2;e.beginPath(),e.arc(n,l,o/2,0,Math.PI*2),e.fill()}continue}let y=0,I=!1;for(let o of M)if(Math.abs(n-o.x)<o.maxReach&&Math.abs(l-o.y)<o.maxReach){I=!0;break}if(!I){e.fillStyle="rgba(255, 255, 255, 0.03)",e.fillRect(n-.5,l-.5,1,1);continue}for(let o of M){let E=n-o.x,G=l-o.y;if(Math.abs(E)>o.maxReach||Math.abs(G)>o.maxReach)continue;let g=0;for(let R of o.nodes){let z=E-R.offsetX,X=G-R.offsetY,Z=Math.sqrt(z*z+X*X);g+=$(Z,R.radius)}g>1&&(g=1),y+=g*o.opacity}if(y>1&&(y=1),y>.01){let X=Math.floor(255+-73*y),Z=Math.floor(255+-12*y),L=Math.floor(255+-64*y),A=y*.5,P=S+y*(F-S);e.fillStyle=`rgba(${X}, ${Z}, ${L}, ${A})`,e.beginPath(),e.arc(n,l,P/2,0,Math.PI*2),e.fill()}else e.fillStyle="rgba(255, 255, 255, 0.03)",e.fillRect(n-.5,l-.5,1,1)}d=requestAnimationFrame(w)};return window.addEventListener("resize",p),window.addEventListener("mousemove",m),s(),w(),()=>{window.removeEventListener("resize",p),window.removeEventListener("mousemove",m),cancelAnimationFrame(d)}},[]),_("canvas",{ref:b,className:"fixed inset-0 -z-10 w-full h-full pointer-events-none"})},T=q;export{T as a};
3
+ //# sourceMappingURL=chunk-RTHCEJYC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/GeometricFluidGrid.tsx"],"sourcesContent":["\"use client\"\nimport React, { useEffect, useRef } from \"react\"\n\n// --- CONFIGURATION ---\nconst GAP = 14\nconst BASE_SIZE = 1\nconst MAX_SIZE = 5\n\n// --- TYPES ---\ninterface Node {\n offsetX: number\n offsetY: number\n vx: number\n vy: number\n radius: number\n t: number\n}\n\ninterface GlitchZone {\n x: number\n y: number\n w: number\n h: number\n life: number\n}\n\ninterface MouseState {\n x: number\n y: number\n lastX: number\n lastY: number\n}\n\n// --- MATH HELPERS ---\nconst getFalloff = (dist: number, radius: number): number => {\n if (dist < radius) {\n const val = 1 - dist / radius\n return val * val * (3 - 2 * val)\n }\n return 0\n}\n\n// --- CLASSES ---\nclass AnchoredBlob {\n // Current Position\n x: number = 0\n y: number = 0\n\n // Anchor Position (Home base)\n anchorX: number = 0\n anchorY: number = 0\n\n // Movement\n vx: number = 0\n vy: number = 0\n\n // Appearance\n nodes: Node[] = []\n opacity: number = 0\n\n // Glitch State\n glitchZones: GlitchZone[] = []\n maxReach: number = 180\n\n constructor(anchorConfig: { x: number; y: number }) {\n this.anchorX = anchorConfig.x\n this.anchorY = anchorConfig.y\n this.x = this.anchorX\n this.y = this.anchorY\n this.init()\n }\n\n init() {\n // 1. Create Internal Nodes (The \"Blob\" composition)\n this.nodes = []\n const nodeCount = 3 + Math.floor(Math.random() * 3) // 3 to 5 nodes\n\n for (let i = 0; i < nodeCount; i++) {\n // Significantly smaller radius (15-40px) to reduce central bulk\n const r = 15 + Math.random() * 25\n // Wider initial spread\n const ox = (Math.random() - 0.5) * 60\n const oy = (Math.random() - 0.5) * 60\n\n this.nodes.push({\n offsetX: ox,\n offsetY: oy,\n vx: (Math.random() - 0.5) * 0.1, // Slower internal movement (was 0.4)\n vy: (Math.random() - 0.5) * 0.1,\n radius: r,\n t: Math.random() * 100,\n })\n }\n\n this.opacity = 1\n }\n\n update() {\n // --- 1. Tethered Movement Logic ---\n const dx = this.anchorX - this.x\n const dy = this.anchorY - this.y\n\n // Spring constant (very loose)\n const k = 0.0005\n const ax = dx * k\n const ay = dy * k\n\n // Random wandering force - Reduced significantly for slower drift\n const wx = (Math.random() - 0.5) * 0.01 // was 0.05\n const wy = (Math.random() - 0.5) * 0.01 // was 0.05\n\n this.vx += ax + wx\n this.vy += ay + wy\n\n this.vx *= 0.96\n this.vy *= 0.96\n\n this.x += this.vx\n this.y += this.vy\n\n // --- 2. Internal Node Animation ---\n this.nodes.forEach((node) => {\n // Slow down time step\n node.t += 0.005 // was 0.02\n\n // Slower oscillation and movement\n node.offsetX += Math.sin(node.t) * 0.1 + node.vx // amp was 0.4\n node.offsetY += Math.cos(node.t * 0.9) * 0.1 + node.vy\n\n // Constrain to \"nucleus\"\n const maxDist = 70\n if (node.offsetX > maxDist || node.offsetX < -maxDist) node.vx *= -1\n if (node.offsetY > maxDist || node.offsetY < -maxDist) node.vy *= -1\n\n // Pulse size\n node.radius += Math.sin(node.t * 2) * 0.1\n })\n\n // --- 3. Manage Glitch Zones ---\n // Remove dead glitches\n this.glitchZones = this.glitchZones.filter((g) => g.life > 0)\n this.glitchZones.forEach((g) => g.life--)\n\n // Randomly spawn new glitches\n if (Math.random() < 0.03) {\n // 3% chance per frame\n const spread = 80\n\n // Snap random positions to exact grid points to ensure clean lines\n const snap = (v: number) =>\n Math.round((v - GAP / 2) / GAP) * GAP + GAP / 2\n\n const rawCx = this.x + (Math.random() - 0.5) * spread\n const rawCy = this.y + (Math.random() - 0.5) * spread\n\n const cx = snap(rawCx)\n const cy = snap(rawCy)\n\n const type = Math.random() > 0.6 ? \"line\" : \"dot\"\n\n if (type === \"line\") {\n const isVert = Math.random() > 0.5\n // Medium length: 40-120px\n const len = 40 + Math.random() * 80\n\n // Thickness is essentially zero (just a sliver) centered on the grid line\n // to guarantee we only pick up exactly one row/column of dots\n const thickness = 2\n\n this.glitchZones.push({\n x: isVert ? cx - thickness / 2 : cx - len / 2,\n y: isVert ? cy - len / 2 : cy - thickness / 2,\n w: isVert ? thickness : len,\n h: isVert ? len : thickness,\n life: 8 + Math.random() * 12,\n })\n } else {\n // Single dot\n // Box just large enough to catch one grid point\n const size = 4\n\n this.glitchZones.push({\n x: cx - size / 2,\n y: cy - size / 2,\n w: size,\n h: size,\n life: 6 + Math.random() * 10,\n })\n }\n }\n }\n}\n\nclass TrailBlob {\n x: number\n y: number\n opacity: number\n decay: number\n nodes: Node[]\n maxReach: number = 60\n\n constructor(x: number, y: number) {\n this.x = x\n this.y = y\n this.opacity = 0.8\n this.decay = 0.03\n\n this.nodes = []\n const count = 2\n for (let i = 0; i < count; i++) {\n this.nodes.push({\n offsetX: (Math.random() - 0.5) * 10,\n offsetY: (Math.random() - 0.5) * 10,\n vx: (Math.random() - 0.5) * 1,\n vy: (Math.random() - 0.5) * 1,\n radius: 5 + Math.random() * 10,\n t: 0,\n })\n }\n }\n\n update() {\n this.opacity -= this.decay\n this.nodes.forEach((node) => {\n node.offsetX += node.vx\n node.offsetY += node.vy\n node.radius *= 0.95\n })\n }\n}\n\nconst GeometricFluidGrid: React.FC = () => {\n const canvasRef = useRef<HTMLCanvasElement>(null)\n\n useEffect(() => {\n const canvas = canvasRef.current\n if (!canvas) return\n\n const ctx = canvas.getContext(\"2d\")\n if (!ctx) return\n\n let animationFrameId: number\n let orbs: AnchoredBlob[] = []\n let trail: TrailBlob[] = []\n let mouse: MouseState = { x: -1000, y: -1000, lastX: -1000, lastY: -1000 }\n\n const initWorld = () => {\n orbs = []\n const w = canvas.width\n const h = canvas.height\n\n // 1. Top Right\n orbs.push(\n new AnchoredBlob({\n x: w - w * 0.15,\n y: h * 0.15,\n })\n )\n\n // 2. ~40% from top and ~40% from left\n orbs.push(\n new AnchoredBlob({\n x: w * 0.4,\n y: h * 0.4,\n })\n )\n\n // 3. Bottom Left\n orbs.push(\n new AnchoredBlob({\n x: w * 0.05 + 50,\n y: h - h * 0.15,\n })\n )\n\n // 4. Bottom Right\n orbs.push(\n new AnchoredBlob({\n x: w - w * 0.05 - 50,\n y: h - h * 0.05 - 50,\n })\n )\n }\n\n const resize = () => {\n const rect = canvas.getBoundingClientRect()\n canvas.width = rect.width\n canvas.height = rect.height\n initWorld()\n }\n\n const handleMouseMove = (e: MouseEvent) => {\n const rect = canvas.getBoundingClientRect()\n mouse.x = e.clientX - rect.left\n mouse.y = e.clientY - rect.top\n\n if (mouse.lastX === -1000) {\n mouse.lastX = mouse.x\n mouse.lastY = mouse.y\n }\n\n const dx = mouse.x - mouse.lastX\n const dy = mouse.y - mouse.lastY\n const dist = Math.sqrt(dx * dx + dy * dy)\n\n if (dist > 20) {\n trail.push(new TrailBlob(mouse.x, mouse.y))\n mouse.lastX = mouse.x\n mouse.lastY = mouse.y\n }\n }\n\n const handleResize = () => {\n resize()\n }\n\n const draw = () => {\n const w = canvas.width\n const h = canvas.height\n\n // Update Logic\n orbs.forEach((orb) => orb.update())\n for (let i = trail.length - 1; i >= 0; i--) {\n trail[i].update()\n if (trail[i].opacity <= 0) trail.splice(i, 1)\n }\n\n // Clear Screen\n ctx.fillStyle = \"#050505\"\n ctx.fillRect(0, 0, w, h)\n\n const renderList = [...orbs, ...trail]\n\n // Collect all glitch zones for easier checking inside the loop\n // We flat map them to a simple array to iterate quickly\n const allGlitches: GlitchZone[] = []\n orbs.forEach((o) => allGlitches.push(...o.glitchZones))\n\n for (let x = GAP / 2; x < w; x += GAP) {\n for (let y = GAP / 2; y < h; y += GAP) {\n // --- GLITCH CHECK ---\n // Check if this specific grid dot is inside a glitch zone\n let isGlitching = false\n for (const g of allGlitches) {\n // Simple AABB check\n if (x >= g.x && x <= g.x + g.w && y >= g.y && y <= g.y + g.h) {\n isGlitching = true\n break\n }\n }\n\n if (isGlitching) {\n // Glitched Dot: Bright\n // We use the grid itself to manifest the glitch\n ctx.fillStyle = \"rgba(182, 243, 191, 0.95)\"\n\n // Randomly skip some dots in the glitch line for a \"broken\" look\n if (Math.random() > 0.1) {\n const size = Math.random() > 0.5 ? MAX_SIZE * 0.7 : BASE_SIZE * 2\n ctx.beginPath()\n ctx.arc(x, y, size / 2, 0, Math.PI * 2)\n ctx.fill()\n }\n continue // Skip standard influence calculation for this dot\n }\n\n // --- STANDARD INFLUENCE CHECK ---\n let totalInfluence = 0\n\n // Optimization: Is near blob?\n let nearby = false\n for (const entity of renderList) {\n if (\n Math.abs(x - entity.x) < entity.maxReach &&\n Math.abs(y - entity.y) < entity.maxReach\n ) {\n nearby = true\n break\n }\n }\n\n if (!nearby) {\n // Passive Background Dot\n ctx.fillStyle = \"rgba(255, 255, 255, 0.03)\"\n ctx.fillRect(x - 0.5, y - 0.5, 1, 1)\n continue\n }\n\n // Calculate Influence\n for (const entity of renderList) {\n const dx = x - entity.x\n const dy = y - entity.y\n\n if (\n Math.abs(dx) > entity.maxReach ||\n Math.abs(dy) > entity.maxReach\n )\n continue\n\n let localInf = 0\n for (const node of entity.nodes) {\n const nx = dx - node.offsetX\n const ny = dy - node.offsetY\n const dist = Math.sqrt(nx * nx + ny * ny)\n localInf += getFalloff(dist, node.radius)\n }\n if (localInf > 1) localInf = 1\n totalInfluence += localInf * entity.opacity\n }\n\n if (totalInfluence > 1) totalInfluence = 1\n\n // Draw Cell\n if (totalInfluence > 0.01) {\n // Gradient: White (Edge) to Green (#B6F3BF - Center)\n const edgeR = 255,\n centerR = 182\n const edgeG = 255,\n centerG = 243\n const edgeB = 255,\n centerB = 191\n\n // Interpolate from White (0 influence) to Green (1 influence)\n const r = Math.floor(edgeR + (centerR - edgeR) * totalInfluence)\n const g = Math.floor(edgeG + (centerG - edgeG) * totalInfluence)\n const b = Math.floor(edgeB + (centerB - edgeB) * totalInfluence)\n\n const alpha = totalInfluence * 0.5\n const size = BASE_SIZE + totalInfluence * (MAX_SIZE - BASE_SIZE)\n\n ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${alpha})`\n ctx.beginPath()\n ctx.arc(x, y, size / 2, 0, Math.PI * 2)\n ctx.fill()\n } else {\n ctx.fillStyle = \"rgba(255, 255, 255, 0.03)\"\n ctx.fillRect(x - 0.5, y - 0.5, 1, 1)\n }\n }\n }\n\n animationFrameId = requestAnimationFrame(draw)\n }\n\n window.addEventListener(\"resize\", handleResize)\n window.addEventListener(\"mousemove\", handleMouseMove)\n\n resize()\n draw()\n\n return () => {\n window.removeEventListener(\"resize\", handleResize)\n window.removeEventListener(\"mousemove\", handleMouseMove)\n cancelAnimationFrame(animationFrameId)\n }\n }, [])\n\n return (\n <canvas\n ref={canvasRef}\n className=\"fixed inset-0 -z-10 w-full h-full pointer-events-none\"\n />\n )\n}\n\nexport default GeometricFluidGrid\n"],"mappings":";yCACA,OAAgB,aAAAA,EAAW,UAAAC,MAAc,QAycrC,cAAAC,MAAA,oBAtcJ,IAAMC,EAAM,GACNC,EAAY,EACZC,EAAW,EA4BXC,EAAa,CAACC,EAAcC,IAA2B,CAC3D,GAAID,EAAOC,EAAQ,CACjB,IAAMC,EAAM,EAAIF,EAAOC,EACvB,OAAOC,EAAMA,GAAO,EAAI,EAAIA,EAC9B,CACA,MAAO,EACT,EAGMC,EAAN,KAAmB,CAqBjB,YAAYC,EAAwC,CAnBpDC,EAAA,SAAY,GACZA,EAAA,SAAY,GAGZA,EAAA,eAAkB,GAClBA,EAAA,eAAkB,GAGlBA,EAAA,UAAa,GACbA,EAAA,UAAa,GAGbA,EAAA,aAAgB,CAAC,GACjBA,EAAA,eAAkB,GAGlBA,EAAA,mBAA4B,CAAC,GAC7BA,EAAA,gBAAmB,KAGjB,KAAK,QAAUD,EAAa,EAC5B,KAAK,QAAUA,EAAa,EAC5B,KAAK,EAAI,KAAK,QACd,KAAK,EAAI,KAAK,QACd,KAAK,KAAK,CACZ,CAEA,MAAO,CAEL,KAAK,MAAQ,CAAC,EACd,IAAME,EAAY,EAAI,KAAK,MAAM,KAAK,OAAO,EAAI,CAAC,EAElD,QAASC,E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K,MAAM,IAAS,IAAmBuC,CAAc,EACzDM,EAAI,KAAK,MAAM,IAAS,IAAmBN,CAAc,EAEzDO,EAAQP,EAAiB,GACzBD,EAAO7D,EAAY8D,GAAkB7D,EAAWD,GAEtD0C,EAAI,UAAY,QAAQ/B,CAAC,KAAKY,CAAC,KAAK6C,CAAC,KAAKC,CAAK,IAC/C3B,EAAI,UAAU,EACdA,EAAI,IAAIR,EAAGC,EAAG0B,EAAO,EAAG,EAAG,KAAK,GAAK,CAAC,EACtCnB,EAAI,KAAK,CACX,MACEA,EAAI,UAAY,4BAChBA,EAAI,SAASR,EAAI,GAAKC,EAAI,GAAK,EAAG,CAAC,CAEvC,CAGFQ,EAAmB,sBAAsBY,CAAI,CAC/C,EAEA,cAAO,iBAAiB,SAAUD,CAAY,EAC9C,OAAO,iBAAiB,YAAaF,CAAe,EAEpDF,EAAO,EACPK,EAAK,EAEE,IAAM,CACX,OAAO,oBAAoB,SAAUD,CAAY,EACjD,OAAO,oBAAoB,YAAaF,CAAe,EACvD,qBAAqBT,CAAgB,CACvC,CACF,EAAG,CAAC,CAAC,EAGH7C,EAAC,UACC,IAAKwC,EACL,UAAU,wDACZ,CAEJ,EAEOgC,EAAQjC","names":["useEffect","useRef","jsx","GAP","BASE_SIZE","MAX_SIZE","getFalloff","dist","radius","val","AnchoredBlob","anchorConfig","__publicField","nodeCount","i","r","ox","oy","dx","dy","k","ax","ay","wx","wy","node","maxDist","g","snap","v","rawCx","rawCy","cx","cy","isVert","len","thickness","TrailBlob","x","y","count","GeometricFluidGrid","canvasRef","useRef","useEffect","canvas","ctx","animationFrameId","orbs","trail","mouse","initWorld","w","h","resize","rect","handleMouseMove","e","handleResize","draw","orb","renderList","allGlitches","o","isGlitching","size","totalInfluence","nearby","entity","localInf","nx","ny","b","alpha","GeometricFluidGrid_default"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-SIGGW2CQ.js","../src/components/tabs.tsx"],"names":["Tabs","TabsList","forwardRef","className","props","ref","indicatorStyle","setIndicatorStyle","useState","listRef","useRef","useEffect","updateIndicator","activeTab","listRect","tabRect","observer","combinedRef","useCallback","node","jsxs","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,8FCDR,8BAGsC,+CAsEjE,IApEEA,CAAAA,CAAqB,CAAA,CAAA,IAAA,CAErBC,CAAAA,aAAWC,+BAAAA,CAGd,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAQ,CAClC,GAAM,CAACC,CAAAA,CAAgBC,CAAiB,CAAA,CAAIC,6BAAAA,CAC1C,IAAA,CAAM,CAAA,CACN,KAAA,CAAO,CACT,CAAC,CAAA,CACKC,CAAAA,CAAUC,2BAAAA,IAA2B,CAAA,CAE3CC,8BAAAA,CAAU,CAAA,EAAM,CACd,IAAMC,CAAAA,CAAkB,CAAA,CAAA,EAAM,CAC5B,EAAA,CAAI,CAACH,CAAAA,CAAQ,OAAA,CAAS,MAAA,CAEtB,IAAMI,CAAAA,CAAYJ,CAAAA,CAAQ,OAAA,CAAQ,aAAA,CAChC,uBACF,CAAA,CAEA,EAAA,CAAII,CAAAA,CAAW,CACb,IAAMC,CAAAA,CAAWL,CAAAA,CAAQ,OAAA,CAAQ,qBAAA,CAAsB,CAAA,CACjDM,CAAAA,CAAUF,CAAAA,CAAU,qBAAA,CAAsB,CAAA,CAEhDN,CAAAA,CAAkB,CAChB,IAAA,CAAMQ,CAAAA,CAAQ,IAAA,CAAOD,CAAAA,CAAS,IAAA,CAC9B,KAAA,CAAOC,CAAAA,CAAQ,KACjB,CAAC,CACH,CACF,CAAA,CAEAH,CAAAA,CAAgB,CAAA,CAGhB,IAAMI,CAAAA,CAAW,IAAI,gBAAA,CAAiBJ,CAAe,CAAA,CAErD,OAAIH,CAAAA,CAAQ,OAAA,EACVO,CAAAA,CAAS,OAAA,CAAQP,CAAAA,CAAQ,OAAA,CAAS,CAChC,UAAA,CAAY,CAAA,CAAA,CACZ,eAAA,CAAiB,CAAC,YAAY,CAAA,CAC9B,OAAA,CAAS,CAAA,CACX,CAAC,CAAA,CAIH,MAAA,CAAO,gBAAA,CAAiB,QAAA,CAAUG,CAAe,CAAA,CAE1C,CAAA,CAAA,EAAM,CACXI,CAAAA,CAAS,UAAA,CAAW,CAAA,CACpB,MAAA,CAAO,mBAAA,CAAoB,QAAA,CAAUJ,CAAe,CACtD,CACF,CAAA,CAAG,CAAC,CAAC,CAAA,CAGL,IAAMK,CAAAA,CAAcC,gCAAAA,CACjBC,EAAgC,CAC7BV,CAAAA,CAA0D,OAAA,CAAUU,CAAAA,CAElE,OAAOd,CAAAA,EAAQ,UAAA,CACjBA,CAAAA,CAAIc,CAAI,CAAA,CACCd,CAAAA,EAAAA,CACPA,CAAAA,CAAsD,OAAA,CAAUc,CAAAA,CAEtE,CAAA,CACA,CAACd,CAAG,CACN,CAAA,CAEA,OACEe,8BAAAA,CAAe,CAAA,IAAA,CAAd,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWI,gCAAAA,qGACT,CACAlB,CACF,CAAA,CACC,GAAGC,CAAAA,CAGJ,QAAA,CAAA,CAAAkB,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAU,yGAAA,CACV,KAAA,CAAO,CACL,IAAA,CAAM,CAAA,EAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-SIGGW2CQ.js","sourcesContent":[null,"import * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\nimport { forwardRef, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const [indicatorStyle, setIndicatorStyle] = useState({\n left: 0,\n width: 0,\n })\n const listRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const updateIndicator = () => {\n if (!listRef.current) return\n\n const activeTab = listRef.current.querySelector(\n '[data-state=\"active\"]'\n ) as HTMLElement\n\n if (activeTab) {\n const listRect = listRef.current.getBoundingClientRect()\n const tabRect = activeTab.getBoundingClientRect()\n\n setIndicatorStyle({\n left: tabRect.left - listRect.left,\n width: tabRect.width,\n })\n }\n }\n\n updateIndicator()\n\n // Use MutationObserver to detect when data-state changes\n const observer = new MutationObserver(updateIndicator)\n\n if (listRef.current) {\n observer.observe(listRef.current, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n subtree: true,\n })\n }\n\n // Also update on window resize\n window.addEventListener(\"resize\", updateIndicator)\n\n return () => {\n observer.disconnect()\n window.removeEventListener(\"resize\", updateIndicator)\n }\n }, [])\n\n // Combine refs\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n ;(listRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n\n if (typeof ref === \"function\") {\n ref(node)\n } else if (ref) {\n ;(ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n }\n },\n [ref]\n )\n\n return (\n <TabsPrimitive.List\n ref={combinedRef}\n className={cn(\n \"relative inline-flex items-center justify-center rounded-3xl bg-secondary p-1 text-muted-foreground\",\n className\n )}\n {...props}\n >\n {/* Animated indicator */}\n <span\n className=\"absolute h-[calc(100%-0.5rem)] rounded-3xl bg-background shadow-sm transition-all duration-200 ease-out\"\n style={{\n left: `${indicatorStyle.left}px`,\n width: `${indicatorStyle.width}px`,\n }}\n />\n {props.children}\n </TabsPrimitive.List>\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-3xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground z-10\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-SIGGW2CQ.js","../src/components/tabs.tsx"],"names":["Tabs","TabsList","forwardRef","className","props","ref","indicatorStyle","setIndicatorStyle","useState","listRef","useRef","useEffect","updateIndicator","activeTab","listRect","tabRect","observer","combinedRef","useCallback","node","jsxs","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,8FCDR,8BAGsC,+CAsEjE,IApEEA,CAAAA,CAAqB,CAAA,CAAA,IAAA,CAErBC,CAAAA,aAAWC,+BAAAA,CAGd,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAQ,CAClC,GAAM,CAACC,CAAAA,CAAgBC,CAAiB,CAAA,CAAIC,6BAAAA,CAC1C,IAAA,CAAM,CAAA,CACN,KAAA,CAAO,CACT,CAAC,CAAA,CACKC,CAAAA,CAAUC,2BAAAA,IAA2B,CAAA,CAE3CC,8BAAAA,CAAU,CAAA,EAAM,CACd,IAAMC,CAAAA,CAAkB,CAAA,CAAA,EAAM,CAC5B,EAAA,CA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e,CAAA,IAAA,CAAd,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWI,gCAAAA,qGACT,CACAlB,CACF,CAAA,CACC,GAAGC,CAAAA,CAGJ,QAAA,CAAA,CAAAkB,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAU,yGAAA,CACV,KAAA,CAAO,CACL,IAAA,CAAM,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-SIGGW2CQ.js","sourcesContent":[null,"import * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\nimport { forwardRef, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const [indicatorStyle, setIndicatorStyle] = useState({\n left: 0,\n width: 0,\n })\n const listRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const updateIndicator = () => {\n if (!listRef.current) return\n\n const activeTab = listRef.current.querySelector(\n '[data-state=\"active\"]'\n ) as HTMLElement\n\n if (activeTab) {\n const listRect = listRef.current.getBoundingClientRect()\n const tabRect = activeTab.getBoundingClientRect()\n\n setIndicatorStyle({\n left: tabRect.left - listRect.left,\n width: tabRect.width,\n })\n }\n }\n\n updateIndicator()\n\n // Use MutationObserver to detect when data-state changes\n const observer = new MutationObserver(updateIndicator)\n\n if (listRef.current) {\n observer.observe(listRef.current, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n subtree: true,\n })\n }\n\n // Also update on window resize\n window.addEventListener(\"resize\", updateIndicator)\n\n return () => {\n observer.disconnect()\n window.removeEventListener(\"resize\", updateIndicator)\n }\n }, [])\n\n // Combine refs\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n ;(listRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n\n if (typeof ref === \"function\") {\n ref(node)\n } else if (ref) {\n ;(ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n }\n },\n [ref]\n )\n\n return (\n <TabsPrimitive.List\n ref={combinedRef}\n className={cn(\n \"relative inline-flex items-center justify-center rounded-3xl bg-secondary p-1 text-muted-foreground\",\n className\n )}\n {...props}\n >\n {/* Animated indicator */}\n <span\n className=\"absolute h-[calc(100%-0.5rem)] rounded-3xl bg-background shadow-sm transition-all duration-200 ease-out\"\n style={{\n left: `${indicatorStyle.left}px`,\n width: `${indicatorStyle.width}px`,\n }}\n />\n {props.children}\n </TabsPrimitive.List>\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-3xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground z-10\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"]}