@alkimi.org/ui-kit 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.github.md +174 -23
- package/dist/chunk-FUYXCJOQ.js.map +1 -1
- package/dist/chunk-HGY6TDJ2.js +3 -0
- package/dist/chunk-HGY6TDJ2.js.map +1 -0
- package/dist/chunk-KPAOPUY2.mjs +3 -0
- package/dist/chunk-KPAOPUY2.mjs.map +1 -0
- package/dist/chunk-LX3KCZOW.js.map +1 -1
- package/dist/chunk-MLULTZDS.js +3 -0
- package/dist/chunk-MLULTZDS.js.map +1 -0
- package/dist/chunk-NLKTP7EJ.mjs +3 -0
- package/dist/chunk-NLKTP7EJ.mjs.map +1 -0
- package/dist/chunk-NZDJHFEG.js +3 -0
- package/dist/chunk-NZDJHFEG.js.map +1 -0
- package/dist/chunk-P7ACUHYG.mjs +3 -0
- package/dist/chunk-P7ACUHYG.mjs.map +1 -0
- package/dist/chunk-R74QDO2Z.js.map +1 -1
- package/dist/chunk-RTHCEJYC.mjs +3 -0
- package/dist/chunk-RTHCEJYC.mjs.map +1 -0
- package/dist/chunk-SIGGW2CQ.js.map +1 -1
- package/dist/chunk-XYO4VLMF.js +3 -0
- package/dist/chunk-XYO4VLMF.js.map +1 -0
- package/dist/components/GeometricFluidGrid.d.mts +5 -0
- package/dist/components/GeometricFluidGrid.d.ts +5 -0
- package/dist/components/GeometricFluidGrid.js +3 -0
- package/dist/components/GeometricFluidGrid.js.map +1 -0
- package/dist/components/GeometricFluidGrid.mjs +3 -0
- package/dist/components/GeometricFluidGrid.mjs.map +1 -0
- package/dist/components/GlitchLink.d.mts +6 -5
- package/dist/components/GlitchLink.d.ts +6 -5
- package/dist/components/GlitchLink.js +1 -1
- package/dist/components/GlitchLink.js.map +1 -1
- package/dist/components/GlitchLink.mjs +1 -1
- package/dist/components/PixelLoad.js +1 -1
- package/dist/components/PixelLoad.js.map +1 -1
- package/dist/components/PixelLoad.mjs +1 -1
- package/dist/components/TextDecoder.d.mts +3 -4
- package/dist/components/TextDecoder.d.ts +3 -4
- package/dist/components/TextDecoder.js +1 -1
- package/dist/components/TextDecoder.js.map +1 -1
- package/dist/components/TextDecoder.mjs +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/button.mjs +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/card.mjs +1 -1
- package/dist/components/card.mjs.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tabs.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-IK3C7KV5.mjs +0 -3
- package/dist/chunk-IK3C7KV5.mjs.map +0 -1
- package/dist/chunk-JNEIOQGF.js +0 -3
- package/dist/chunk-JNEIOQGF.js.map +0 -1
- package/dist/chunk-KJFYVVDG.js +0 -3
- package/dist/chunk-KJFYVVDG.js.map +0 -1
- package/dist/chunk-PC2BSBO3.mjs +0 -3
- package/dist/chunk-PC2BSBO3.mjs.map +0 -1
package/dist/chunk-KJFYVVDG.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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 P=["\\","-","?","/","#","!","_","+","<",">"],J=4,_=50,V=(e,r=P)=>e?e.split(" ").map(t=>t?r[Math.floor(Math.random()*r.length)].repeat(t.length):"").join(" "):"",R=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(R).join("");if(_react2.default.isValidElement(e)){let r=e.props,t="";return typeof r.text=="string"&&(t+=r.text),typeof r.label=="string"&&(t+=r.label),typeof r.title=="string"&&(t+=r.title),r.children&&(t+=R(r.children)),t}return""},E=(e,r,t)=>{if(typeof e=="string"||typeof e=="number"){let l=String(e),o="";for(let n=0;n<l.length;n++)t.current<r.length?(o+=r[t.current],t.current++):o+=l[n];return o}if(Array.isArray(e))return e.map((l,o)=>{let n=E(l,r,t);if(_react2.default.isValidElement(n)){let s=_react2.default.isValidElement(l)?l.key:null;if(n.key==null&&s==null)return _react2.default.cloneElement(n,{key:`decoded-${o}`});if(n.key==null&&s!=null)return _react2.default.cloneElement(n,{key:s})}return n});if(_react2.default.isValidElement(e)){let l=e.props,o={...l};if(typeof l.text=="string"){let n=l.text,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.text=s}if(typeof l.label=="string"){let n=l.label,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.label=s}if(typeof l.title=="string"){let n=l.title,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.title=s}return l.children&&(o.children=E(l.children,r,t)),_react2.default.cloneElement(e,o)}return e},j=({children:e,className:r,delay:t=0,speed:l=_,maxIterations:o=J,symbols:n=P})=>{let[s,i]=_react.useState.call(void 0, null),[y,k]=_react.useState.call(void 0, !1),[H,f]=_react.useState.call(void 0, !0),v=_react.useRef.call(void 0, null),c=_react.useMemo.call(void 0, ()=>R(e),[e]),w=_react.useMemo.call(void 0, ()=>V(c,n),[c,n]);_react.useEffect.call(void 0, ()=>{if(!c){i(null),f(!1),k(!1);return}k(!1);let d=E(e,w,{current:0});i(d),f(!0)},[c,e,w,n]),_react.useEffect.call(void 0, ()=>{if(!c){i(null),f(!1);return}if(y){f(!1);return}let b=v.current;if(!b)return;let d=0,a=null,p=null,D=()=>{p=setTimeout(()=>{f(!0),a=setInterval(()=>{if(d++,d>=o)k(!0),f(!1),a&&clearInterval(a);else{let g=V(c,n),C=E(e,g,{current:0});i(C)}},l)},t)},h=b.getBoundingClientRect();if(h.top<window.innerHeight&&h.bottom>0&&h.left<window.innerWidth&&h.right>0)D();else{let g=new IntersectionObserver(T=>{T[0].isIntersecting&&!y&&(D(),g.disconnect())},{threshold:.1});return g.observe(b),()=>{g.disconnect(),a&&clearInterval(a),p&&clearTimeout(p)}}return()=>{a&&clearInterval(a),p&&clearTimeout(p)}},[e,c,w,y,t,l,o,n]);let L=_react.useMemo.call(void 0, ()=>R(e),[e]);return _jsxruntime.jsxs.call(void 0, "span",{ref:v,"aria-label":L,className:_chunkFUYXCJOQjs.a.call(void 0, "relative block",r),children:[_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, y?"opacity-100":"opacity-0"),children:e}),H&&s&&_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 ",children:s})]})},I=e=>_jsxruntime.jsx.call(void 0, _react.Suspense,{fallback:_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "opacity-0",e.className),children:e.children}),children:_jsxruntime.jsx.call(void 0, j,{...e})}),q= exports.a =I;exports.a = q;
|
|
3
|
-
//# sourceMappingURL=chunk-KJFYVVDG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-KJFYVVDG.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","MAX_ITERATIONS","SPEED","scrambleText","input","symbols","word","extractText","node","React","props","result","scrambleReactNode","scrambledText","textStartIndex","text","scrambled","i","child","index","scrambledChild","originalKey"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECQhC,+CAoVH,IAjVEA,CAAAA,CAAU,CAAC,IAAA,CAAM,GAAA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AAAA,CAAM,YAAA,CAAaW,CAAAA,CAAgB,CAAE,GAAA,CAAK,CAAA,QAAA,EAAWD,CAAK,CAAA,CAAA","file":"/Users/aktoriukas/Documents/Projects/alkimi/alkimi-ui-kit/dist/chunk-KJFYVVDG.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\n// The symbols to use for the scrambling effect (moved outside to avoid recreation)\nconst SYMBOLS = [\"\\\\\", \"-\", \"?\", \"/\", \"#\", \"!\", \"_\", \"+\", \"<\", \">\"]\nconst MAX_ITERATIONS = 4 // How many times to scramble\nconst SPEED = 50 // Speed in milliseconds between scrambles\n\n// Helper function moved outside component to avoid recreation\nconst scrambleText = (input: string, symbols: string[] = SYMBOLS): string => {\n if (!input) return \"\"\n\n return input\n .split(\" \")\n .map((word: string) => {\n if (!word) return \"\"\n const randomSymbol = symbols[Math.floor(Math.random() * symbols.length)]\n return randomSymbol.repeat(word.length)\n })\n .join(\" \")\n}\n\n// Extract text content from React nodes recursively\n// Also checks common text props like 'text', 'label', 'title', etc.\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(extractText).join(\"\")\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n\n let result = \"\"\n\n // Extract text from props first (in order: text, label, title)\n if (typeof props.text === \"string\") {\n result += props.text\n }\n if (typeof props.label === \"string\") {\n result += props.label\n }\n if (typeof props.title === \"string\") {\n result += props.title\n }\n\n // Then extract from children\n if (props.children) {\n result += extractText(props.children)\n }\n\n return result\n }\n\n return \"\"\n}\n\n// Clone React nodes and replace text content with scrambled text\n// This function maps scrambled text back to the original structure\nconst scrambleReactNode = (\n node: ReactNode,\n scrambledText: string,\n textStartIndex: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n // For each character in the original text, take the corresponding scrambled character\n // This preserves the length and structure\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n // Fallback if scrambled text is shorter (shouldn't happen, but safety check)\n scrambled += text[i]\n }\n }\n return scrambled\n }\n\n if (Array.isArray(node)) {\n return node.map((child, index) => {\n const scrambledChild = scrambleReactNode(\n child,\n scrambledText,\n textStartIndex\n )\n // Preserve original key if it exists, otherwise add one for React elements\n if (React.isValidElement(scrambledChild)) {\n const originalKey = React.isValidElement(child) ? child.key : null\n if (scrambledChild.key == null && originalKey == null) {\n return React.cloneElement(scrambledChild, { key: `decoded-${index}` })\n }\n // If original had a key but scrambled doesn't, preserve it\n if (scrambledChild.key == null && originalKey != null) {\n return React.cloneElement(scrambledChild, { key: originalKey })\n }\n }\n return scrambledChild\n })\n }\n\n if (React.isValidElement(node)) {\n // Regular element handling - works for all components\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n const newProps = { ...props }\n\n // Handle text props in the same order as extraction (text, label, title)\n if (typeof props.text === \"string\") {\n const text = props.text\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += text[i]\n }\n }\n newProps.text = scrambled\n }\n\n if (typeof props.label === \"string\") {\n const label = props.label\n let scrambled = \"\"\n for (let i = 0; i < label.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += label[i]\n }\n }\n newProps.label = scrambled\n }\n\n if (typeof props.title === \"string\") {\n const title = props.title\n let scrambled = \"\"\n for (let i = 0; i < title.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += title[i]\n }\n }\n newProps.title = scrambled\n }\n\n // Handle children after props\n if (props.children) {\n newProps.children = scrambleReactNode(\n props.children,\n scrambledText,\n textStartIndex\n )\n }\n return React.cloneElement(node, newProps)\n }\n\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n delay?: number // Delay in milliseconds before starting animation\n speed?: number // Speed in milliseconds between scrambles\n maxIterations?: number // How many times to scramble\n symbols?: string[] // The symbols to use for the scrambling effect\n}\n\nconst TextDecoder = ({\n children,\n className,\n delay = 0,\n speed = SPEED,\n maxIterations = MAX_ITERATIONS,\n symbols = SYMBOLS,\n}: TextDecoderProps) => {\n const [displayContent, setDisplayContent] = useState<ReactNode>(null)\n const [hasAnimated, setHasAnimated] = useState(false)\n const [showDecoded, setShowDecoded] = useState(true)\n const elementRef = useRef<HTMLSpanElement>(null)\n\n // Extract full text for scrambling\n const fullText = useMemo(() => extractText(children), [children])\n\n // Memoize initial scrambled text\n const initialScrambled = useMemo(\n () => scrambleText(fullText, symbols),\n [fullText, symbols]\n )\n\n // Reset animation state and immediately set up new scrambled content when content changes\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n setHasAnimated(false)\n return\n }\n\n // Reset animation state\n setHasAnimated(false)\n\n // Immediately set up new scrambled content to prevent flash of new content\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n }, [fullText, children, initialScrambled, symbols])\n\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n return\n }\n\n // If already animated, hide decoded and show children\n if (hasAnimated) {\n setShowDecoded(false)\n return\n }\n\n const element = elementRef.current\n if (!element) return\n\n let iteration = 0\n let intervalId: NodeJS.Timeout | null = null\n let delayTimeoutId: NodeJS.Timeout | null = null\n\n // Function to start the animation\n const startAnimation = () => {\n // Start animation after delay\n delayTimeoutId = setTimeout(() => {\n // 1. Initial scramble (already set up, but ensure it's visible)\n setShowDecoded(true)\n\n // 2. Set up the interval\n intervalId = setInterval(() => {\n iteration++\n\n if (iteration >= maxIterations) {\n // Stop scrambling, fade out decoded and fade in children\n setHasAnimated(true)\n setShowDecoded(false)\n if (intervalId) clearInterval(intervalId)\n } else {\n // Continue scrambling\n const newScrambled = scrambleText(fullText, symbols)\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n newScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n }\n }, speed)\n }, delay)\n }\n\n // Check if element is already visible\n const rect = element.getBoundingClientRect()\n const isVisible =\n rect.top < window.innerHeight &&\n rect.bottom > 0 &&\n rect.left < window.innerWidth &&\n rect.right > 0\n\n if (isVisible) {\n // Element is already visible, start animation immediately\n startAnimation()\n } else {\n // Use Intersection Observer to detect when element becomes visible\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0]\n if (entry.isIntersecting && !hasAnimated) {\n startAnimation()\n // Disconnect observer once animation starts\n observer.disconnect()\n }\n },\n {\n threshold: 0.1, // Trigger when 10% of the element is visible\n }\n )\n\n observer.observe(element)\n\n // Cleanup function\n return () => {\n observer.disconnect()\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }\n\n // Cleanup function for immediate start case\n return () => {\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }, [\n children,\n fullText,\n initialScrambled,\n hasAnimated,\n delay,\n speed,\n maxIterations,\n symbols,\n ])\n\n const ariaLabel = useMemo(() => extractText(children), [children])\n\n return (\n <span\n ref={elementRef}\n aria-label={ariaLabel} // Accessibility: Screen readers read the real text\n className={cn(\"relative block\", className)}\n >\n {/* Children always rendered but with opacity-0 initially */}\n <span className={cn(hasAnimated ? \"opacity-100\" : \"opacity-0\")}>\n {children}\n </span>\n {/* Decoded animation overlay */}\n {showDecoded && displayContent && (\n <span className=\"absolute inset-0 \">{displayContent}</span>\n )}\n </span>\n )\n}\n\nconst SuspenseDecodedText = (props: TextDecoderProps) => {\n return (\n <Suspense\n fallback={\n <span className={cn(\"opacity-0\", props.className)}>\n {props.children}\n </span>\n }\n >\n <TextDecoder {...props} />\n </Suspense>\n )\n}\n\nexport default SuspenseDecodedText\n"]}
|
package/dist/chunk-PC2BSBO3.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as N}from"./chunk-S5TKCF6T.mjs";import u,{useState as A,useEffect as M,useMemo as S,useRef as O,Suspense as B}from"react";import{jsx as m,jsxs as K}from"react/jsx-runtime";var P=["\\","-","?","/","#","!","_","+","<",">"],J=4,_=50,V=(e,r=P)=>e?e.split(" ").map(t=>t?r[Math.floor(Math.random()*r.length)].repeat(t.length):"").join(" "):"",R=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(R).join("");if(u.isValidElement(e)){let r=e.props,t="";return typeof r.text=="string"&&(t+=r.text),typeof r.label=="string"&&(t+=r.label),typeof r.title=="string"&&(t+=r.title),r.children&&(t+=R(r.children)),t}return""},E=(e,r,t)=>{if(typeof e=="string"||typeof e=="number"){let l=String(e),o="";for(let n=0;n<l.length;n++)t.current<r.length?(o+=r[t.current],t.current++):o+=l[n];return o}if(Array.isArray(e))return e.map((l,o)=>{let n=E(l,r,t);if(u.isValidElement(n)){let s=u.isValidElement(l)?l.key:null;if(n.key==null&&s==null)return u.cloneElement(n,{key:`decoded-${o}`});if(n.key==null&&s!=null)return u.cloneElement(n,{key:s})}return n});if(u.isValidElement(e)){let l=e.props,o={...l};if(typeof l.text=="string"){let n=l.text,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.text=s}if(typeof l.label=="string"){let n=l.label,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.label=s}if(typeof l.title=="string"){let n=l.title,s="";for(let i=0;i<n.length;i++)t.current<r.length?(s+=r[t.current],t.current++):s+=n[i];o.title=s}return l.children&&(o.children=E(l.children,r,t)),u.cloneElement(e,o)}return e},j=({children:e,className:r,delay:t=0,speed:l=_,maxIterations:o=J,symbols:n=P})=>{let[s,i]=A(null),[y,k]=A(!1),[H,f]=A(!0),v=O(null),c=S(()=>R(e),[e]),w=S(()=>V(c,n),[c,n]);M(()=>{if(!c){i(null),f(!1),k(!1);return}k(!1);let d=E(e,w,{current:0});i(d),f(!0)},[c,e,w,n]),M(()=>{if(!c){i(null),f(!1);return}if(y){f(!1);return}let b=v.current;if(!b)return;let d=0,a=null,p=null,D=()=>{p=setTimeout(()=>{f(!0),a=setInterval(()=>{if(d++,d>=o)k(!0),f(!1),a&&clearInterval(a);else{let g=V(c,n),C=E(e,g,{current:0});i(C)}},l)},t)},h=b.getBoundingClientRect();if(h.top<window.innerHeight&&h.bottom>0&&h.left<window.innerWidth&&h.right>0)D();else{let g=new IntersectionObserver(T=>{T[0].isIntersecting&&!y&&(D(),g.disconnect())},{threshold:.1});return g.observe(b),()=>{g.disconnect(),a&&clearInterval(a),p&&clearTimeout(p)}}return()=>{a&&clearInterval(a),p&&clearTimeout(p)}},[e,c,w,y,t,l,o,n]);let L=S(()=>R(e),[e]);return K("span",{ref:v,"aria-label":L,className:N("relative block",r),children:[m("span",{className:N(y?"opacity-100":"opacity-0"),children:e}),H&&s&&m("span",{className:"absolute inset-0 ",children:s})]})},I=e=>m(B,{fallback:m("span",{className:N("opacity-0",e.className),children:e.children}),children:m(j,{...e})}),q=I;export{q as a};
|
|
3
|
-
//# sourceMappingURL=chunk-PC2BSBO3.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TextDecoder.tsx"],"sourcesContent":["\"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\n// The symbols to use for the scrambling effect (moved outside to avoid recreation)\nconst SYMBOLS = [\"\\\\\", \"-\", \"?\", \"/\", \"#\", \"!\", \"_\", \"+\", \"<\", \">\"]\nconst MAX_ITERATIONS = 4 // How many times to scramble\nconst SPEED = 50 // Speed in milliseconds between scrambles\n\n// Helper function moved outside component to avoid recreation\nconst scrambleText = (input: string, symbols: string[] = SYMBOLS): string => {\n if (!input) return \"\"\n\n return input\n .split(\" \")\n .map((word: string) => {\n if (!word) return \"\"\n const randomSymbol = symbols[Math.floor(Math.random() * symbols.length)]\n return randomSymbol.repeat(word.length)\n })\n .join(\" \")\n}\n\n// Extract text content from React nodes recursively\n// Also checks common text props like 'text', 'label', 'title', etc.\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(extractText).join(\"\")\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n\n let result = \"\"\n\n // Extract text from props first (in order: text, label, title)\n if (typeof props.text === \"string\") {\n result += props.text\n }\n if (typeof props.label === \"string\") {\n result += props.label\n }\n if (typeof props.title === \"string\") {\n result += props.title\n }\n\n // Then extract from children\n if (props.children) {\n result += extractText(props.children)\n }\n\n return result\n }\n\n return \"\"\n}\n\n// Clone React nodes and replace text content with scrambled text\n// This function maps scrambled text back to the original structure\nconst scrambleReactNode = (\n node: ReactNode,\n scrambledText: string,\n textStartIndex: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n // For each character in the original text, take the corresponding scrambled character\n // This preserves the length and structure\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n // Fallback if scrambled text is shorter (shouldn't happen, but safety check)\n scrambled += text[i]\n }\n }\n return scrambled\n }\n\n if (Array.isArray(node)) {\n return node.map((child, index) => {\n const scrambledChild = scrambleReactNode(\n child,\n scrambledText,\n textStartIndex\n )\n // Preserve original key if it exists, otherwise add one for React elements\n if (React.isValidElement(scrambledChild)) {\n const originalKey = React.isValidElement(child) ? child.key : null\n if (scrambledChild.key == null && originalKey == null) {\n return React.cloneElement(scrambledChild, { key: `decoded-${index}` })\n }\n // If original had a key but scrambled doesn't, preserve it\n if (scrambledChild.key == null && originalKey != null) {\n return React.cloneElement(scrambledChild, { key: originalKey })\n }\n }\n return scrambledChild\n })\n }\n\n if (React.isValidElement(node)) {\n // Regular element handling - works for all components\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n const newProps = { ...props }\n\n // Handle text props in the same order as extraction (text, label, title)\n if (typeof props.text === \"string\") {\n const text = props.text\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += text[i]\n }\n }\n newProps.text = scrambled\n }\n\n if (typeof props.label === \"string\") {\n const label = props.label\n let scrambled = \"\"\n for (let i = 0; i < label.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += label[i]\n }\n }\n newProps.label = scrambled\n }\n\n if (typeof props.title === \"string\") {\n const title = props.title\n let scrambled = \"\"\n for (let i = 0; i < title.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += title[i]\n }\n }\n newProps.title = scrambled\n }\n\n // Handle children after props\n if (props.children) {\n newProps.children = scrambleReactNode(\n props.children,\n scrambledText,\n textStartIndex\n )\n }\n return React.cloneElement(node, newProps)\n }\n\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n delay?: number // Delay in milliseconds before starting animation\n speed?: number // Speed in milliseconds between scrambles\n maxIterations?: number // How many times to scramble\n symbols?: string[] // The symbols to use for the scrambling effect\n}\n\nconst TextDecoder = ({\n children,\n className,\n delay = 0,\n speed = SPEED,\n maxIterations = MAX_ITERATIONS,\n symbols = SYMBOLS,\n}: TextDecoderProps) => {\n const [displayContent, setDisplayContent] = useState<ReactNode>(null)\n const [hasAnimated, setHasAnimated] = useState(false)\n const [showDecoded, setShowDecoded] = useState(true)\n const elementRef = useRef<HTMLSpanElement>(null)\n\n // Extract full text for scrambling\n const fullText = useMemo(() => extractText(children), [children])\n\n // Memoize initial scrambled text\n const initialScrambled = useMemo(\n () => scrambleText(fullText, symbols),\n [fullText, symbols]\n )\n\n // Reset animation state and immediately set up new scrambled content when content changes\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n setHasAnimated(false)\n return\n }\n\n // Reset animation state\n setHasAnimated(false)\n\n // Immediately set up new scrambled content to prevent flash of new content\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n }, [fullText, children, initialScrambled, symbols])\n\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n return\n }\n\n // If already animated, hide decoded and show children\n if (hasAnimated) {\n setShowDecoded(false)\n return\n }\n\n const element = elementRef.current\n if (!element) return\n\n let iteration = 0\n let intervalId: NodeJS.Timeout | null = null\n let delayTimeoutId: NodeJS.Timeout | null = null\n\n // Function to start the animation\n const startAnimation = () => {\n // Start animation after delay\n delayTimeoutId = setTimeout(() => {\n // 1. Initial scramble (already set up, but ensure it's visible)\n setShowDecoded(true)\n\n // 2. Set up the interval\n intervalId = setInterval(() => {\n iteration++\n\n if (iteration >= maxIterations) {\n // Stop scrambling, fade out decoded and fade in children\n setHasAnimated(true)\n setShowDecoded(false)\n if (intervalId) clearInterval(intervalId)\n } else {\n // Continue scrambling\n const newScrambled = scrambleText(fullText, symbols)\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n newScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n }\n }, speed)\n }, delay)\n }\n\n // Check if element is already visible\n const rect = element.getBoundingClientRect()\n const isVisible =\n rect.top < window.innerHeight &&\n rect.bottom > 0 &&\n rect.left < window.innerWidth &&\n rect.right > 0\n\n if (isVisible) {\n // Element is already visible, start animation immediately\n startAnimation()\n } else {\n // Use Intersection Observer to detect when element becomes visible\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0]\n if (entry.isIntersecting && !hasAnimated) {\n startAnimation()\n // Disconnect observer once animation starts\n observer.disconnect()\n }\n },\n {\n threshold: 0.1, // Trigger when 10% of the element is visible\n }\n )\n\n observer.observe(element)\n\n // Cleanup function\n return () => {\n observer.disconnect()\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }\n\n // Cleanup function for immediate start case\n return () => {\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }, [\n children,\n fullText,\n initialScrambled,\n hasAnimated,\n delay,\n speed,\n maxIterations,\n symbols,\n ])\n\n const ariaLabel = useMemo(() => extractText(children), [children])\n\n return (\n <span\n ref={elementRef}\n aria-label={ariaLabel} // Accessibility: Screen readers read the real text\n className={cn(\"relative block\", className)}\n >\n {/* Children always rendered but with opacity-0 initially */}\n <span className={cn(hasAnimated ? \"opacity-100\" : \"opacity-0\")}>\n {children}\n </span>\n {/* Decoded animation overlay */}\n {showDecoded && displayContent && (\n <span className=\"absolute inset-0 \">{displayContent}</span>\n )}\n </span>\n )\n}\n\nconst SuspenseDecodedText = (props: TextDecoderProps) => {\n return (\n <Suspense\n fallback={\n <span className={cn(\"opacity-0\", props.className)}>\n {props.children}\n </span>\n }\n >\n <TextDecoder {...props} />\n </Suspense>\n )\n}\n\nexport default SuspenseDecodedText\n"],"mappings":";yCAEA,OAAOA,GACL,YAAA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GAExD,CAEJ,EAEMqB,EAAuB1C,GAEzBX,EAACD,EAAA,CACC,SACEC,EAAC,QAAK,UAAWoD,EAAG,YAAazC,EAAM,SAAS,EAC7C,SAAAA,EAAM,SACT,EAGF,SAAAX,EAAC0B,EAAA,CAAa,GAAGf,EAAO,EAC1B,EAIG2C,EAAQD","names":["React","useState","useEffect","useMemo","useRef","Suspense","jsx","jsxs","SYMBOLS","MAX_ITERATIONS","SPEED","scrambleText","input","symbols","word","extractText","node","props","result","scrambleReactNode","scrambledText","textStartIndex","text","scrambled","i","child","index","scrambledChild","originalKey","newProps","label","title","TextDecoder","children","className","delay","speed","maxIterations","displayContent","setDisplayContent","hasAnimated","setHasAnimated","showDecoded","setShowDecoded","elementRef","fullText","initialScrambled","scrambledContent","element","iteration","intervalId","delayTimeoutId","startAnimation","newScrambled","rect","observer","entries","ariaLabel","cn","SuspenseDecodedText","TextDecoder_default"]}
|