tailwind-styled-v4 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/animate.cjs +754 -235
  2. package/dist/animate.cjs.map +1 -1
  3. package/dist/animate.d.cts +55 -99
  4. package/dist/animate.d.ts +55 -99
  5. package/dist/animate.js +742 -235
  6. package/dist/animate.js.map +1 -1
  7. package/dist/chunk-VZEJV27B.js +11 -0
  8. package/dist/chunk-VZEJV27B.js.map +1 -0
  9. package/dist/chunk-Y5D3E72P.cjs +13 -0
  10. package/dist/chunk-Y5D3E72P.cjs.map +1 -0
  11. package/dist/css.cjs +61 -11
  12. package/dist/css.cjs.map +1 -1
  13. package/dist/css.d.cts +3 -18
  14. package/dist/css.d.ts +3 -18
  15. package/dist/css.js +61 -11
  16. package/dist/css.js.map +1 -1
  17. package/dist/devtools.cjs +200 -88
  18. package/dist/devtools.cjs.map +1 -1
  19. package/dist/devtools.js +200 -88
  20. package/dist/devtools.js.map +1 -1
  21. package/dist/index.cjs +430 -135
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +74 -3
  24. package/dist/index.d.ts +74 -3
  25. package/dist/index.js +415 -132
  26. package/dist/index.js.map +1 -1
  27. package/dist/next.cjs +118 -138
  28. package/dist/next.cjs.map +1 -1
  29. package/dist/next.d.cts +28 -19
  30. package/dist/next.d.ts +28 -19
  31. package/dist/next.js +111 -131
  32. package/dist/next.js.map +1 -1
  33. package/dist/preset.cjs +312 -18
  34. package/dist/preset.cjs.map +1 -1
  35. package/dist/preset.d.cts +29 -2
  36. package/dist/preset.d.ts +29 -2
  37. package/dist/preset.js +311 -19
  38. package/dist/preset.js.map +1 -1
  39. package/dist/turbopackLoader.cjs +24 -2676
  40. package/dist/turbopackLoader.cjs.map +1 -1
  41. package/dist/turbopackLoader.d.cts +3 -13
  42. package/dist/turbopackLoader.d.ts +3 -13
  43. package/dist/turbopackLoader.js +24 -2670
  44. package/dist/turbopackLoader.js.map +1 -1
  45. package/dist/vite.cjs +90 -57
  46. package/dist/vite.cjs.map +1 -1
  47. package/dist/vite.d.cts +35 -6
  48. package/dist/vite.d.ts +35 -6
  49. package/dist/vite.js +90 -58
  50. package/dist/vite.js.map +1 -1
  51. package/dist/webpackLoader.cjs +27 -2646
  52. package/dist/webpackLoader.cjs.map +1 -1
  53. package/dist/webpackLoader.d.cts +3 -10
  54. package/dist/webpackLoader.d.ts +3 -10
  55. package/dist/webpackLoader.js +27 -2640
  56. package/dist/webpackLoader.js.map +1 -1
  57. package/package.json +31 -28
  58. package/dist/astTransform-ua-eapqs.d.cts +0 -41
  59. package/dist/astTransform-ua-eapqs.d.ts +0 -41
  60. package/dist/compiler.cjs +0 -3594
  61. package/dist/compiler.cjs.map +0 -1
  62. package/dist/compiler.d.cts +0 -716
  63. package/dist/compiler.d.ts +0 -716
  64. package/dist/compiler.js +0 -3535
  65. package/dist/compiler.js.map +0 -1
  66. package/dist/plugins.cjs +0 -396
  67. package/dist/plugins.cjs.map +0 -1
  68. package/dist/plugins.d.cts +0 -231
  69. package/dist/plugins.d.ts +0 -231
  70. package/dist/plugins.js +0 -381
  71. package/dist/plugins.js.map +0 -1
  72. package/dist/theme.cjs +0 -154
  73. package/dist/theme.cjs.map +0 -1
  74. package/dist/theme.d.cts +0 -181
  75. package/dist/theme.d.ts +0 -181
  76. package/dist/theme.js +0 -148
  77. package/dist/theme.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../animate/src/index.ts"],"names":[],"mappings":";;;;;AA6EA,IAAM,SAAA,GAAoC;AAAA;AAAA,EAExC,WAAA,EAAa,YAAA;AAAA,EACb,WAAA,EAAa,eAAA;AAAA,EACb,YAAA,EAAc,cAAA;AAAA,EACd,YAAA,EAAc,cAAA;AAAA,EACd,YAAA,EAAc,eAAA;AAAA,EACd,YAAA,EAAc,cAAA;AAAA,EACd,YAAA,EAAc,cAAA;AAAA,EACd,YAAA,EAAc,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BAAA;AAAA,IACJ,QAAA,EAAU,GAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACT,CAAA;AAAA,EACD,QAAA,EAAU,QAAQ,EAAE,IAAA,EAAM,yBAAyB,EAAA,EAAI,oBAAA,EAAsB,QAAA,EAAU,GAAA,EAAK,CAAA;AAAA,EAC5F,MAAA,EAAQ,QAAQ,EAAE,IAAA,EAAM,qBAAqB,EAAA,EAAI,uBAAA,EAAyB,QAAA,EAAU,GAAA,EAAK,CAAA;AAAA,EACzF,UAAU,OAAA,CAAQ;AAAA,IAChB,IAAA,EAAM,oBAAA;AAAA,IACN,EAAA,EAAI,uBAAA;AAAA,IACJ,QAAA,EAAU,GAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACT,CAAA;AAAA,EACD,QAAQ,OAAA,CAAQ;AAAA,IACd,IAAA,EAAM,+BAAA;AAAA,IACN,EAAA,EAAI,gCAAA;AAAA,IACJ,QAAA,EAAU,GAAA;AAAA,IACV,MAAA,EAAQ;AAAA,GACT;AACH;AAUO,SAAS,mBAAA,GAA8B;AAC5C,EAAA,MAAM,QAAkB,EAAC;AACzB,EAAA,KAAA,MAAW,GAAG,QAAQ,CAAA,IAAK,aAAA,EAAe;AACxC,IAAA,KAAA,CAAM,IAAA,CAAK,SAAS,YAAY,CAAA;AAChC,IAAA,KAAA,CAAM,KAAK,CAAA,CAAA,EAAI,QAAA,CAAS,SAAS,CAAA,GAAA,EAAM,QAAA,CAAS,YAAY,CAAA,EAAA,CAAI,CAAA;AAAA,EAClE;AACA,EAAA,OAAO,KAAA,CAAM,KAAK,MAAM,CAAA;AAC1B","file":"animate.cjs","sourcesContent":["/**\n * tailwind-styled-v4 — Animation DSL\n *\n * Compile-time animation system. Define animations dengan Tailwind class,\n * compiler generate @keyframes — nol runtime, nol JS overhead.\n *\n * Usage:\n *\n * // Cara 1: .animate() chaining pada tw component\n * const FadeIn = tw.div.animate({\n * from: \"opacity-0 translate-y-2\",\n * to: \"opacity-100 translate-y-0\",\n * duration: 300,\n * easing: \"ease-out\"\n * })\n *\n * // Cara 2: standalone animate() utility\n * const fadeIn = animate({\n * from: \"opacity-0 scale-95\",\n * to: \"opacity-100 scale-100\",\n * duration: 200,\n * })\n * const Box = tw.div`${fadeIn}`\n *\n * // Cara 3: preset animations\n * const Card = tw.div`${animations.fadeIn} ${animations.slideUp}`\n *\n * // Cara 4: tw.keyframes() custom\n * const spin = tw.keyframes(\"spin\", {\n * \"0%\": \"rotate-0\",\n * \"100%\": \"rotate-180\",\n * })\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Types\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport interface AnimateOptions {\n /** Tailwind classes for animation start state */\n from: string\n /** Tailwind classes for animation end state */\n to: string\n /** Duration in ms. Default: 300 */\n duration?: number\n /** CSS easing. Default: \"ease-out\" */\n easing?: string\n /** Delay in ms. Default: 0 */\n delay?: number\n /** Fill mode. Default: \"both\" */\n fill?: \"none\" | \"forwards\" | \"backwards\" | \"both\"\n /** Iteration count. Default: 1 */\n iterations?: number | \"infinite\"\n /** Direction. Default: \"normal\" */\n direction?: \"normal\" | \"reverse\" | \"alternate\" | \"alternate-reverse\"\n /** Animation name override (auto-generated from from+to if not set) */\n name?: string\n}\n\nexport interface KeyframesDefinition {\n [stop: string]: string // \"0%\": \"opacity-0 translate-y-2\"\n}\n\nexport interface CompiledAnimation {\n /** CSS animation class name to apply */\n className: string\n /** @keyframes CSS to inject */\n keyframesCss: string\n /** animation CSS shorthand */\n animationCss: string\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Tailwind class → CSS property mapping\n// (for compile-time keyframe generation)\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst TW_TO_CSS: Record<string, string> = {\n // Opacity\n \"opacity-0\": \"opacity: 0\",\n \"opacity-5\": \"opacity: 0.05\",\n \"opacity-10\": \"opacity: 0.1\",\n \"opacity-20\": \"opacity: 0.2\",\n \"opacity-25\": \"opacity: 0.25\",\n \"opacity-30\": \"opacity: 0.3\",\n \"opacity-40\": \"opacity: 0.4\",\n \"opacity-50\": \"opacity: 0.5\",\n \"opacity-60\": \"opacity: 0.6\",\n \"opacity-70\": \"opacity: 0.7\",\n \"opacity-75\": \"opacity: 0.75\",\n \"opacity-80\": \"opacity: 0.8\",\n \"opacity-90\": \"opacity: 0.9\",\n \"opacity-95\": \"opacity: 0.95\",\n \"opacity-100\": \"opacity: 1\",\n\n // Translate Y\n \"translate-y-0\": \"transform: translateY(0px)\",\n \"translate-y-0.5\": \"transform: translateY(0.125rem)\",\n \"translate-y-1\": \"transform: translateY(0.25rem)\",\n \"translate-y-2\": \"transform: translateY(0.5rem)\",\n \"translate-y-3\": \"transform: translateY(0.75rem)\",\n \"translate-y-4\": \"transform: translateY(1rem)\",\n \"translate-y-6\": \"transform: translateY(1.5rem)\",\n \"translate-y-8\": \"transform: translateY(2rem)\",\n \"-translate-y-1\": \"transform: translateY(-0.25rem)\",\n \"-translate-y-2\": \"transform: translateY(-0.5rem)\",\n \"-translate-y-4\": \"transform: translateY(-1rem)\",\n \"-translate-y-8\": \"transform: translateY(-2rem)\",\n\n // Translate X\n \"translate-x-0\": \"transform: translateX(0px)\",\n \"translate-x-1\": \"transform: translateX(0.25rem)\",\n \"translate-x-2\": \"transform: translateX(0.5rem)\",\n \"translate-x-4\": \"transform: translateX(1rem)\",\n \"-translate-x-1\": \"transform: translateX(-0.25rem)\",\n \"-translate-x-2\": \"transform: translateX(-0.5rem)\",\n \"-translate-x-4\": \"transform: translateX(-1rem)\",\n\n // Scale\n \"scale-0\": \"transform: scale(0)\",\n \"scale-50\": \"transform: scale(0.5)\",\n \"scale-75\": \"transform: scale(0.75)\",\n \"scale-90\": \"transform: scale(0.9)\",\n \"scale-95\": \"transform: scale(0.95)\",\n \"scale-100\": \"transform: scale(1)\",\n \"scale-105\": \"transform: scale(1.05)\",\n \"scale-110\": \"transform: scale(1.1)\",\n \"scale-125\": \"transform: scale(1.25)\",\n \"scale-150\": \"transform: scale(1.5)\",\n\n // Rotate\n \"rotate-0\": \"transform: rotate(0deg)\",\n \"rotate-1\": \"transform: rotate(1deg)\",\n \"rotate-2\": \"transform: rotate(2deg)\",\n \"rotate-3\": \"transform: rotate(3deg)\",\n \"rotate-6\": \"transform: rotate(6deg)\",\n \"rotate-12\": \"transform: rotate(12deg)\",\n \"rotate-45\": \"transform: rotate(45deg)\",\n \"rotate-90\": \"transform: rotate(90deg)\",\n \"rotate-180\": \"transform: rotate(180deg)\",\n \"-rotate-1\": \"transform: rotate(-1deg)\",\n \"-rotate-2\": \"transform: rotate(-2deg)\",\n \"-rotate-6\": \"transform: rotate(-6deg)\",\n \"-rotate-12\": \"transform: rotate(-12deg)\",\n \"-rotate-45\": \"transform: rotate(-45deg)\",\n \"-rotate-90\": \"transform: rotate(-90deg)\",\n\n // Blur\n \"blur-none\": \"filter: blur(0)\",\n \"blur-sm\": \"filter: blur(4px)\",\n blur: \"filter: blur(8px)\",\n \"blur-md\": \"filter: blur(12px)\",\n \"blur-lg\": \"filter: blur(16px)\",\n \"blur-xl\": \"filter: blur(24px)\",\n \"blur-2xl\": \"filter: blur(40px)\",\n \"blur-3xl\": \"filter: blur(64px)\",\n}\n\n// Multi-transform classes need merging\nfunction classesToCss(classes: string): string {\n const parts = classes.split(/\\s+/).filter(Boolean)\n const transforms: string[] = []\n const others: string[] = []\n\n for (const cls of parts) {\n const css = TW_TO_CSS[cls]\n if (!css) continue\n\n if (css.startsWith(\"transform:\")) {\n transforms.push(css.replace(\"transform: \", \"\"))\n } else {\n others.push(css)\n }\n }\n\n const result = [...others]\n if (transforms.length > 0) {\n result.push(`transform: ${transforms.join(\" \")}`)\n }\n\n return result.join(\"; \")\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Animation ID generator\n// ─────────────────────────────────────────────────────────────────────────────\n\nlet _animCounter = 0\nfunction genAnimId(name?: string): string {\n if (name) return `tw-${name.replace(/[^a-zA-Z0-9]/g, \"-\")}`\n return `tw-anim-${++_animCounter}`\n}\n\n// Global registry of generated animations (for CSS extraction)\nconst _animRegistry = new Map<string, CompiledAnimation>()\n\nexport function getAnimationRegistry(): Map<string, CompiledAnimation> {\n return _animRegistry\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Core: compile animation options → CSS\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Compile AnimateOptions into CSS animation + @keyframes.\n *\n * Called at build time by the compiler, or at runtime in dev mode.\n */\nexport function compileAnimation(opts: AnimateOptions): CompiledAnimation {\n const {\n from,\n to,\n duration = 300,\n easing = \"ease-out\",\n delay = 0,\n fill = \"both\",\n iterations = 1,\n direction = \"normal\",\n name,\n } = opts\n\n const animId = genAnimId(\n name ?? `${from.replace(/\\s+/g, \"-\")}-${to.replace(/\\s+/g, \"-\")}`.slice(0, 30)\n )\n\n // Already compiled — return cached\n if (_animRegistry.has(animId)) {\n return _animRegistry.get(animId)!\n }\n\n const fromCss = classesToCss(from)\n const toCss = classesToCss(to)\n\n const keyframesCss = [\n `@keyframes ${animId} {`,\n fromCss ? ` from { ${fromCss} }` : ` from {}`,\n toCss ? ` to { ${toCss} }` : ` to {}`,\n `}`,\n ].join(\"\\n\")\n\n const iterStr = iterations === \"infinite\" ? \"infinite\" : String(iterations)\n const animationCss = [\n `animation-name: ${animId}`,\n `animation-duration: ${duration}ms`,\n `animation-timing-function: ${easing}`,\n `animation-delay: ${delay}ms`,\n `animation-fill-mode: ${fill}`,\n `animation-iteration-count: ${iterStr}`,\n `animation-direction: ${direction}`,\n ].join(\"; \")\n\n const className = animId\n\n const compiled: CompiledAnimation = { className, keyframesCss, animationCss }\n _animRegistry.set(animId, compiled)\n\n return compiled\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Public API: animate()\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Generate an animation class string to use in tw template literals.\n *\n * @example\n * const fadeIn = animate({ from: \"opacity-0\", to: \"opacity-100\", duration: 200 })\n * const Box = tw.div`${fadeIn} p-4 bg-white`\n */\nexport function animate(opts: AnimateOptions): string {\n const compiled = compileAnimation(opts)\n\n // In browser: inject keyframes into <style> if not already present\n if (typeof document !== \"undefined\") {\n const styleId = `__tw_anim_${compiled.className}`\n if (!document.getElementById(styleId)) {\n const style = document.createElement(\"style\")\n style.id = styleId\n style.textContent = `${compiled.keyframesCss}\\n.${compiled.className}{${compiled.animationCss}}`\n document.head.appendChild(style)\n }\n }\n\n return compiled.className\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// tw.keyframes() — custom multi-stop keyframes\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Define a custom keyframe animation with multiple stops.\n *\n * @example\n * const pulse = tw.keyframes(\"pulse\", {\n * \"0%, 100%\": \"opacity-100 scale-100\",\n * \"50%\": \"opacity-50 scale-95\",\n * })\n * const Dot = tw.div`${pulse} w-4 h-4 rounded-full bg-blue-500`\n */\nexport function keyframes(name: string, stops: KeyframesDefinition): string {\n const animId = genAnimId(name)\n\n if (_animRegistry.has(animId)) {\n return animId\n }\n\n const stopLines = Object.entries(stops)\n .map(([stop, classes]) => {\n const css = classesToCss(classes)\n return ` ${stop} { ${css} }`\n })\n .join(\"\\n\")\n\n const keyframesCss = `@keyframes ${animId} {\\n${stopLines}\\n}`\n\n // Inject in browser\n if (typeof document !== \"undefined\") {\n const styleId = `__tw_kf_${animId}`\n if (!document.getElementById(styleId)) {\n const style = document.createElement(\"style\")\n style.id = styleId\n style.textContent = keyframesCss\n document.head.appendChild(style)\n }\n }\n\n _animRegistry.set(animId, {\n className: animId,\n keyframesCss,\n animationCss: `animation-name: ${animId}`,\n })\n\n return animId\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Preset animations — ready to use\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Collection of ready-to-use animation class strings.\n *\n * @example\n * const Card = tw.div`${animations.fadeIn} p-4 bg-white`\n * const Modal = tw.div`${animations.scaleIn} fixed inset-0`\n */\nexport const animations = {\n fadeIn: animate({ from: \"opacity-0\", to: \"opacity-100\", duration: 200 }),\n fadeOut: animate({ from: \"opacity-100\", to: \"opacity-0\", duration: 200 }),\n slideUp: animate({\n from: \"opacity-0 translate-y-4\",\n to: \"opacity-100 translate-y-0\",\n duration: 300,\n }),\n slideDown: animate({\n from: \"opacity-0 -translate-y-4\",\n to: \"opacity-100 translate-y-0\",\n duration: 300,\n }),\n slideLeft: animate({\n from: \"opacity-0 translate-x-4\",\n to: \"opacity-100 translate-x-0\",\n duration: 300,\n }),\n slideRight: animate({\n from: \"opacity-0 -translate-x-4\",\n to: \"opacity-100 translate-x-0\",\n duration: 300,\n }),\n scaleIn: animate({\n from: \"opacity-0 scale-95\",\n to: \"opacity-100 scale-100\",\n duration: 200,\n easing: \"cubic-bezier(0.16,1,0.3,1)\",\n }),\n scaleOut: animate({ from: \"opacity-100 scale-100\", to: \"opacity-0 scale-95\", duration: 150 }),\n blurIn: animate({ from: \"opacity-0 blur-sm\", to: \"opacity-100 blur-none\", duration: 300 }),\n bounceIn: animate({\n from: \"opacity-0 scale-50\",\n to: \"opacity-100 scale-100\",\n duration: 400,\n easing: \"cubic-bezier(0.34,1.56,0.64,1)\",\n }),\n spinIn: animate({\n from: \"opacity-0 rotate-180 scale-50\",\n to: \"opacity-100 rotate-0 scale-100\",\n duration: 400,\n easing: \"cubic-bezier(0.16,1,0.3,1)\",\n }),\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Extract all animation CSS (for build-time injection)\n// ─────────────────────────────────────────────────────────────────────────────\n\n/**\n * Get all compiled animation CSS to inject into a stylesheet.\n * Called by the CSS extraction engine at build time.\n */\nexport function extractAnimationCss(): string {\n const lines: string[] = []\n for (const [, compiled] of _animRegistry) {\n lines.push(compiled.keyframesCss)\n lines.push(`.${compiled.className} { ${compiled.animationCss} }`)\n }\n return lines.join(\"\\n\\n\")\n}\n"]}
1
+ {"version":3,"sources":["../../shared/dist/index.js","../../animate/src/binding.ts","../../animate/src/preset.ts","../../analyzer/dist/index.js","../../animate/src/registry.ts","../../anim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\nvar LRUCache = class {\n constructor(max = 256, ttlMs = null) {\n this.map = /* @__PURE__ */ new Map();\n this.max = max;\n this.ttlMs = ttlMs;\n }\n get(key) {\n const entry = this.map.get(key);\n if (!entry) return void 0;\n if (this.ttlMs !== null && Date.now() - entry.ts > this.ttlMs) {\n this.map.delete(key);\n return void 0;\n }\n this.map.delete(key);\n this.map.set(key, entry);\n return entry.value;\n }\n set(key, value) {\n if (this.map.has(key)) this.map.delete(key);\n else if (this.map.size >= this.max) {\n this.map.delete(this.map.keys().next().value);\n }\n this.map.set(key, { value, ts: Date.now() });\n }\n has(key) {\n return this.get(key) !== void 0;\n }\n delete(key) {\n this.map.delete(key);\n }\n clear() {\n this.map.clear();\n }\n get size() {\n return this.map.size;\n }\n keys() {\n return this.map.keys();\n }\n *values() {\n for (const entry of this.map.values()) {\n yield entry.value;\n }\n }\n *entries() {\n for (const [key, entry] of this.map.entries()) {\n yield [key, entry.value];\n }\n }\n};\n\n// src/nativeBinding.ts\nimport fs from \"fs\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\nfunction formatErrorMessage(error) {\n return error instanceof Error ? error.message : String(error);\n}\nfunction resolveRuntimeDir(dirnameValue, moduleImportUrl) {\n if (typeof dirnameValue === \"string\" && dirnameValue.length > 0) return dirnameValue;\n return path.dirname(fileURLToPath(moduleImportUrl));\n}\nfunction resolveNativeBindingCandidates(options) {\n const out = [];\n const envVarNames = options.envVarNames ?? [];\n for (const envVarName of envVarNames) {\n const raw = process.env[envVarName]?.trim();\n if (!raw) continue;\n const resolved = path.resolve(raw);\n if (options.enforceNodeExtensionForEnvPath) {\n if (path.extname(resolved).toLowerCase() !== \".node\") {\n throw new Error(\n `Invalid native binding path from ${envVarName}=\"${raw}\". Expected a .node file.`\n );\n }\n }\n out.push(resolved);\n }\n if (options.includeDefaultCandidates !== false) {\n out.push(path.resolve(process.cwd(), \"native\", \"tailwind_styled_parser.node\"));\n out.push(path.resolve(options.runtimeDir, \"..\", \"..\", \"..\", \"native\", \"tailwind_styled_parser.node\"));\n }\n return Array.from(new Set(out));\n}\nfunction parseDebugToken(namespace, token) {\n if (token === \"*\" || token === namespace || token === \"tailwind-styled:*\") return true;\n return token.endsWith(\"*\") && namespace.startsWith(token.slice(0, -1));\n}\nfunction isDebugNamespaceEnabled(namespace) {\n if (process.env.TWS_DEBUG === \"1\" || process.env.TAILWIND_STYLED_DEBUG === \"1\") return true;\n const raw = process.env.DEBUG;\n if (!raw) return false;\n return raw.split(\",\").map((token) => token.trim()).some((token) => parseDebugToken(namespace, token));\n}\nfunction createDebugLogger(namespace, label = namespace) {\n const debugEnabled = isDebugNamespaceEnabled(namespace);\n return (message) => {\n if (!debugEnabled) return;\n console.debug(`[${label}] ${message}`);\n };\n}\nfunction loadNativeBinding(options) {\n const req = createRequire(path.join(options.runtimeDir, \"noop.cjs\"));\n const loadErrors = [];\n for (const candidate of options.candidates) {\n if (!fs.existsSync(candidate)) continue;\n try {\n const mod = req(candidate);\n if (options.isValid(mod)) {\n return {\n binding: mod,\n loadedPath: candidate,\n loadErrors\n };\n }\n loadErrors.push({\n path: candidate,\n message: options.invalidExportMessage\n });\n } catch (error) {\n loadErrors.push({\n path: candidate,\n message: formatErrorMessage(error)\n });\n }\n }\n return {\n binding: null,\n loadedPath: null,\n loadErrors\n };\n}\n\n// src/logger.ts\nvar LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };\nfunction getEnvLevel() {\n const env = process.env.TWS_LOG_LEVEL?.toLowerCase();\n if (env && env in LEVELS) return env;\n return process.env.TWS_DEBUG_SCANNER === \"1\" ? \"debug\" : \"info\";\n}\nfunction createLogger(prefix, level) {\n let currentLevel = level ?? getEnvLevel();\n const log = (msgLevel, stream, args) => {\n if (LEVELS[msgLevel] > LEVELS[currentLevel]) return;\n const line = `[${prefix}] ${args.map(String).join(\" \")}\n`;\n process[stream].write(line);\n };\n return {\n error: (...a) => log(\"error\", \"stderr\", a),\n warn: (...a) => log(\"warn\", \"stderr\", a),\n info: (...a) => log(\"info\", \"stdout\", a),\n debug: (...a) => log(\"debug\", \"stderr\", a),\n setLevel: (l) => {\n currentLevel = l;\n }\n };\n}\nvar logger = createLogger(\"tailwind-styled\");\n\n// src/hash.ts\nimport { createHash } from \"crypto\";\nimport fs2 from \"fs\";\nfunction hashContent(content, algorithm = \"md5\", length = 8) {\n return createHash(algorithm).update(content).digest(\"hex\").slice(0, length);\n}\nfunction hashFile(filePath, algorithm = \"md5\", length = 8) {\n try {\n const content = fs2.readFileSync(filePath, \"utf8\");\n return hashContent(content, algorithm, length);\n } catch {\n return \"00000000\";\n }\n}\n\n// src/timing.ts\nfunction debounce(fn, ms) {\n let timer = null;\n return ((...args) => {\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => {\n timer = null;\n fn(...args);\n }, ms);\n });\n}\nfunction throttle(fn, ms) {\n let last = 0;\n return ((...args) => {\n const now = Date.now();\n if (now - last >= ms) {\n last = now;\n fn(...args);\n }\n });\n}\n\n// src/version.ts\nfunction parseVersion(v) {\n const parts = v.replace(/^v/, \"\").split(\".\").map((p) => {\n const n = Number(p);\n return Number.isNaN(n) ? 0 : n;\n });\n const [major = 0, minor = 0, patch = 0] = parts;\n return { major, minor, patch };\n}\nfunction satisfiesMinVersion(version, minVersion) {\n const v = parseVersion(version);\n const min = parseVersion(minVersion);\n if (v.major !== min.major) return v.major > min.major;\n if (v.minor !== min.minor) return v.minor > min.minor;\n return v.patch >= min.patch;\n}\nexport {\n LRUCache,\n createDebugLogger,\n createLogger,\n debounce,\n formatErrorMessage,\n hashContent,\n hashFile,\n isDebugNamespaceEnabled,\n loadNativeBinding,\n logger,\n parseVersion,\n resolveNativeBindingCandidates,\n resolveRuntimeDir,\n satisfiesMinVersion,\n throttle\n};\n","import {\n createDebugLogger,\n loadNativeBinding,\n resolveNativeBindingCandidates,\n resolveRuntimeDir,\n} from \"@tailwind-styled/shared\"\n\nimport type { NativeAnimateBinding } from \"./types\"\n\nlet bindingPromise: Promise<NativeAnimateBinding> | null = null\nconst DEBUG_NAMESPACE = \"tailwind-styled:animate\"\nconst debugLog = createDebugLogger(DEBUG_NAMESPACE, \"tailwind-styled/animate\")\n\nfunction isAnimateModule(module: unknown): module is NativeAnimateBinding {\n const candidate = module as Partial<NativeAnimateBinding> | null | undefined\n return (\n typeof candidate?.compileAnimation === \"function\" &&\n typeof candidate?.compileKeyframes === \"function\"\n )\n}\n\nfunction resolveBindingCandidates(runtimeDir: string): string[] {\n return resolveNativeBindingCandidates({\n runtimeDir,\n envVarNames: [\"TWS_ANIMATE_NATIVE_PATH\", \"TWS_NATIVE_PATH\"],\n enforceNodeExtensionForEnvPath: true,\n })\n}\n\nfunction loadAnimateBinding(): NativeAnimateBinding {\n if (process.env.TWS_NO_NATIVE === \"1\" || process.env.TWS_NO_RUST === \"1\") {\n throw new Error(\"Native animate backend is required in v5. TWS_NO_NATIVE/TWS_NO_RUST is not supported.\")\n }\n\n const runtimeDir = resolveRuntimeDir(\n typeof __dirname === \"string\" ? __dirname : undefined,\n import.meta.url\n )\n const candidates = resolveBindingCandidates(runtimeDir)\n const { binding, loadErrors, loadedPath } = loadNativeBinding<NativeAnimateBinding>({\n runtimeDir,\n candidates,\n isValid: isAnimateModule,\n invalidExportMessage: \"Module loaded but missing compileAnimation/compileKeyframes exports.\",\n })\n\n if (binding) {\n debugLog(`native animate binding loaded from: ${loadedPath}`)\n return binding\n }\n\n if (loadErrors.length > 0) {\n debugLog(\n `native animate binding load failed for ${loadErrors.length} candidate(s): ${loadErrors\n .map((entry) => `${entry.path} (${entry.message})`)\n .join(\"; \")}`\n )\n } else {\n debugLog(\"native animate binding not found in any candidate path\")\n }\n\n const lines = [\n \"Native animate backend not found. Ensure `tailwind_styled_parser.node` is built.\",\n \"Checked paths:\",\n ...candidates.map((candidate) => `- ${candidate}`),\n ]\n if (loadErrors.length > 0) {\n lines.push(\"Load errors:\")\n for (const error of loadErrors) lines.push(`- ${error.path}: ${error.message}`)\n }\n throw new Error(lines.join(\"\\n\"))\n}\n\nexport async function getAnimateBinding(): Promise<NativeAnimateBinding> {\n if (!bindingPromise) {\n bindingPromise = Promise.resolve().then(loadAnimateBinding)\n }\n return bindingPromise\n}\n\nexport async function initAnimate(): Promise<void> {\n await getAnimateBinding()\n}\n","import { LRUCache } from \"@tailwind-styled/shared\"\n\nimport type { AnimationRegistry } from \"./registry\"\n\nconst DEFAULT_PRESET_CACHE_LIMIT = 32\n\nexport function createAnimationPresets(registry: AnimationRegistry) {\n const cache = new LRUCache<string, Promise<string>>(DEFAULT_PRESET_CACHE_LIMIT)\n\n const withCache = (\n cacheKey: string,\n factory: () => Promise<string>\n ): (() => Promise<string>) => async () => {\n const cached = cache.get(cacheKey)\n if (cached) {\n const className = await cached\n if (registry.has(className)) return className\n cache.delete(cacheKey)\n }\n\n const pending = factory()\n cache.set(cacheKey, pending)\n try {\n return await pending\n } catch (error) {\n cache.delete(cacheKey)\n throw error\n }\n }\n\n return {\n fadeIn: withCache(\n \"fadeIn\",\n async () =>\n (await registry.compileAnimation({ from: \"opacity-0\", to: \"opacity-100\", duration: 200 }))\n .className\n ),\n fadeOut: withCache(\n \"fadeOut\",\n async () =>\n (await registry.compileAnimation({ from: \"opacity-100\", to: \"opacity-0\", duration: 200 }))\n .className\n ),\n slideUp: withCache(\n \"slideUp\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 translate-y-4\",\n to: \"opacity-100 translate-y-0\",\n duration: 300,\n })\n ).className\n ),\n slideDown: withCache(\n \"slideDown\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 -translate-y-4\",\n to: \"opacity-100 translate-y-0\",\n duration: 300,\n })\n ).className\n ),\n slideLeft: withCache(\n \"slideLeft\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 translate-x-4\",\n to: \"opacity-100 translate-x-0\",\n duration: 300,\n })\n ).className\n ),\n slideRight: withCache(\n \"slideRight\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 -translate-x-4\",\n to: \"opacity-100 translate-x-0\",\n duration: 300,\n })\n ).className\n ),\n scaleIn: withCache(\n \"scaleIn\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 scale-95\",\n to: \"opacity-100 scale-100\",\n duration: 200,\n easing: \"cubic-bezier(0.16,1,0.3,1)\",\n })\n ).className\n ),\n scaleOut: withCache(\n \"scaleOut\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-100 scale-100\",\n to: \"opacity-0 scale-95\",\n duration: 150,\n })\n ).className\n ),\n blurIn: withCache(\n \"blurIn\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 blur-sm\",\n to: \"opacity-100 blur-none\",\n duration: 300,\n })\n ).className\n ),\n bounceIn: withCache(\n \"bounceIn\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 scale-50\",\n to: \"opacity-100 scale-100\",\n duration: 400,\n easing: \"cubic-bezier(0.34,1.56,0.64,1)\",\n })\n ).className\n ),\n spinIn: withCache(\n \"spinIn\",\n async () =>\n (\n await registry.compileAnimation({\n from: \"opacity-0 rotate-180 scale-50\",\n to: \"opacity-100 rotate-0 scale-100\",\n duration: 400,\n easing: \"cubic-bezier(0.16,1,0.3,1)\",\n })\n ).className\n ),\n } as const\n}\n","// src/analyzeWorkspace.ts\nimport path2 from \"path\";\nimport { scanWorkspaceAsync } from \"@tailwind-styled/scanner\";\n\n// src/binding.ts\nimport {\n loadNativeBinding,\n resolveNativeBindingCandidates,\n resolveRuntimeDir\n} from \"@tailwind-styled/shared\";\n\n// src/utils.ts\nimport fs from \"fs\";\nimport { createDebugLogger } from \"@tailwind-styled/shared\";\nvar DEFAULT_TOP_LIMIT = 10;\nvar DEFAULT_FREQUENT_THRESHOLD = 2;\nvar DEBUG_NAMESPACE = \"tailwind-styled:analyzer\";\nfunction formatErrorMessage(error) {\n return error instanceof Error ? error.message : String(error);\n}\nfunction isRecord(value) {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\nasync function pathExists(filePath) {\n try {\n await fs.promises.access(filePath, fs.constants.F_OK);\n return true;\n } catch {\n return false;\n }\n}\nvar debugLog = createDebugLogger(DEBUG_NAMESPACE, \"tailwind-styled/analyzer\");\nfunction sanitizeTopLimit(value) {\n if (!Number.isFinite(value)) return DEFAULT_TOP_LIMIT;\n return Math.max(1, Math.trunc(value));\n}\nfunction sanitizeFrequentThreshold(value) {\n if (!Number.isFinite(value)) return DEFAULT_FREQUENT_THRESHOLD;\n return Math.max(1, Math.trunc(value));\n}\n\n// src/binding.ts\nvar bindingCache;\nvar bindingCandidateCache = [];\nvar bindingLoadErrorsCache = [];\nvar loadedBindingPathCache = null;\nfunction isAnalyzerModule(module) {\n const candidate = module;\n return typeof candidate?.analyzeClasses === \"function\";\n}\nfunction getNativeBinding() {\n if (bindingCache !== void 0) return bindingCache;\n if (process.env.TWS_NO_NATIVE === \"1\" || process.env.TWS_NO_RUST === \"1\") {\n bindingCandidateCache = [];\n bindingLoadErrorsCache = [];\n loadedBindingPathCache = null;\n debugLog(\"native binding disabled by TWS_NO_NATIVE/TWS_NO_RUST\");\n bindingCache = null;\n return bindingCache;\n }\n const runtimeDir = resolveRuntimeDir(\n typeof __dirname === \"string\" ? __dirname : void 0,\n import.meta.url\n );\n const candidates = resolveNativeBindingCandidates({\n runtimeDir,\n envVarNames: [\"TWS_NATIVE_PATH\"]\n });\n const { binding, loadErrors, loadedPath } = loadNativeBinding({\n runtimeDir,\n candidates,\n isValid: isAnalyzerModule,\n invalidExportMessage: \"Module loaded but missing `analyzeClasses` export.\"\n });\n bindingCandidateCache = candidates;\n bindingLoadErrorsCache = loadErrors;\n loadedBindingPathCache = loadedPath;\n if (binding) {\n debugLog(`native binding loaded from: ${loadedPath}`);\n bindingCache = binding;\n return bindingCache;\n }\n if (bindingLoadErrorsCache.length > 0) {\n debugLog(\n `native binding load failed for ${bindingLoadErrorsCache.length} candidate(s): ${bindingLoadErrorsCache.map((entry) => `${entry.path} (${entry.message})`).join(\"; \")}`\n );\n } else {\n debugLog(\"native binding not found in any candidate path\");\n }\n bindingCache = null;\n return bindingCache;\n}\nfunction requireNativeBinding() {\n const binding = getNativeBinding();\n if (binding?.analyzeClasses) return binding;\n const lines = [\n \"Native analyzer binding not found. Ensure `tailwind_styled_parser.node` is built.\"\n ];\n if (process.env.TWS_NO_NATIVE === \"1\" || process.env.TWS_NO_RUST === \"1\") {\n lines.push(\"Native loading is disabled by TWS_NO_NATIVE/TWS_NO_RUST.\");\n } else {\n lines.push(\"Checked paths:\");\n for (const candidate of bindingCandidateCache) lines.push(`- ${candidate}`);\n if (bindingLoadErrorsCache.length > 0) {\n lines.push(\"Load errors:\");\n for (const failure of bindingLoadErrorsCache) {\n lines.push(`- ${failure.path}: ${failure.message}`);\n }\n }\n }\n throw new Error(lines.join(\"\\n\"));\n}\nfunction requireNativeCssCompiler() {\n const binding = requireNativeBinding();\n if (typeof binding.compileCss === \"function\") return binding;\n const loadedPathText = loadedBindingPathCache ? ` (${loadedBindingPathCache})` : \"\";\n throw new Error(`Native analyzer compileCss binding is missing in v5${loadedPathText}.`);\n}\n\n// src/semantic.ts\nimport fs2 from \"fs\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nvar SUPPORTED_TAILWIND_CONFIG_EXTENSIONS = /* @__PURE__ */ new Set([\".ts\", \".js\", \".cjs\", \".mjs\"]);\nvar KNOWN_UTILITY_PREFIXES = /* @__PURE__ */ new Set([\n \"absolute\",\n \"align\",\n \"animate\",\n \"arbitrary\",\n \"aspect\",\n \"backdrop\",\n \"basis\",\n \"bg\",\n \"block\",\n \"border\",\n \"bottom\",\n \"col\",\n \"container\",\n \"contents\",\n \"cursor\",\n \"dark\",\n \"display\",\n \"divide\",\n \"fill\",\n \"fixed\",\n \"flex\",\n \"float\",\n \"font\",\n \"from\",\n \"gap\",\n \"grid\",\n \"grow\",\n \"h\",\n \"hidden\",\n \"inset\",\n \"inline\",\n \"isolate\",\n \"items\",\n \"justify\",\n \"left\",\n \"leading\",\n \"line\",\n \"list\",\n \"m\",\n \"max-h\",\n \"max-w\",\n \"mb\",\n \"min-h\",\n \"min-w\",\n \"ml\",\n \"mr\",\n \"mt\",\n \"mx\",\n \"my\",\n \"object\",\n \"opacity\",\n \"order\",\n \"origin\",\n \"outline\",\n \"overflow\",\n \"overscroll\",\n \"p\",\n \"pb\",\n \"pe\",\n \"perspective\",\n \"place\",\n \"pl\",\n \"pointer\",\n \"position\",\n \"pr\",\n \"ps\",\n \"pt\",\n \"px\",\n \"py\",\n \"relative\",\n \"right\",\n \"ring\",\n \"rotate\",\n \"rounded\",\n \"row\",\n \"scale\",\n \"shadow\",\n \"shrink\",\n \"size\",\n \"skew\",\n \"snap\",\n \"space-x\",\n \"space-y\",\n \"sr\",\n \"start\",\n \"static\",\n \"sticky\",\n \"stroke\",\n \"table\",\n \"text\",\n \"to\",\n \"top\",\n \"touch\",\n \"tracking\",\n \"transform\",\n \"transition\",\n \"translate\",\n \"truncate\",\n \"underline\",\n \"via\",\n \"visible\",\n \"w\",\n \"whitespace\",\n \"z\"\n]);\nvar tailwindConfigCache = /* @__PURE__ */ new Map();\nfunction splitVariantAndBase(className) {\n const parts = className.split(\":\");\n if (parts.length <= 1) return { variantKey: \"\", base: className };\n const base = parts.pop() ?? className;\n return { variantKey: parts.join(\":\"), base };\n}\nfunction isArbitraryUtility(baseClass) {\n return baseClass.includes(\"[\") && baseClass.includes(\"]\");\n}\nfunction resolveConflictGroup(base) {\n if (isArbitraryUtility(base)) return null;\n if ([\"block\", \"inline\", \"inline-block\", \"inline-flex\", \"flex\", \"grid\", \"hidden\"].includes(base))\n return \"display\";\n if (base.startsWith(\"bg-\")) return \"bg\";\n if (base.startsWith(\"text-\")) return \"text\";\n if (base.startsWith(\"font-\")) return \"font\";\n if (base.startsWith(\"rounded\")) return \"rounded\";\n if (base.startsWith(\"shadow\")) return \"shadow\";\n if (base.startsWith(\"border-\")) return \"border\";\n if (base.startsWith(\"opacity-\")) return \"opacity\";\n if (base.startsWith(\"w-\") || base.startsWith(\"min-w-\") || base.startsWith(\"max-w-\")) return \"width\";\n if (base.startsWith(\"h-\") || base.startsWith(\"min-h-\") || base.startsWith(\"max-h-\")) return \"height\";\n if (base.startsWith(\"p-\") || base.startsWith(\"px-\") || base.startsWith(\"py-\")) return \"padding\";\n if (base.startsWith(\"m-\") || base.startsWith(\"mx-\") || base.startsWith(\"my-\")) return \"margin\";\n return null;\n}\nfunction detectConflicts(usages) {\n const buckets = /* @__PURE__ */ new Map();\n for (const usage of usages) {\n const { variantKey, base } = splitVariantAndBase(usage.name);\n const group = resolveConflictGroup(base);\n if (!group) continue;\n const key = `${variantKey}::${group}`;\n const bucket = buckets.get(key) ?? {\n variantKey,\n group,\n classes: /* @__PURE__ */ new Set()\n };\n bucket.classes.add(usage.name);\n buckets.set(key, bucket);\n }\n const conflicts = [];\n const conflictedClassNames = /* @__PURE__ */ new Set();\n for (const bucket of buckets.values()) {\n if (bucket.classes.size <= 1) continue;\n const classes = Array.from(bucket.classes).sort();\n for (const className of classes) conflictedClassNames.add(className);\n const variantLabel = bucket.variantKey.length > 0 ? bucket.variantKey : \"base\";\n conflicts.push({\n className: bucket.group,\n variants: bucket.variantKey.length > 0 ? bucket.variantKey.split(\":\") : [],\n classes,\n message: `Multiple ${bucket.group} utilities detected for \"${variantLabel}\".`\n });\n }\n conflicts.sort((left, right) => {\n if (right.classes.length !== left.classes.length) return right.classes.length - left.classes.length;\n return left.className.localeCompare(right.className);\n });\n return { conflicts, conflictedClassNames };\n}\nfunction isSupportedTailwindConfigPath(configPath) {\n return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(path.extname(configPath).toLowerCase());\n}\nasync function resolveTailwindConfigPath(root, explicitPath) {\n if (explicitPath) {\n const resolved = path.resolve(root, explicitPath);\n if (!await pathExists(resolved)) return null;\n return resolved;\n }\n const candidates = [\n \"tailwind.config.ts\",\n \"tailwind.config.js\",\n \"tailwind.config.cjs\",\n \"tailwind.config.mjs\"\n ];\n for (const candidate of candidates) {\n const fullPath = path.resolve(root, candidate);\n if (await pathExists(fullPath)) return fullPath;\n }\n return null;\n}\nfunction collectSafelistFromConfig(config) {\n const raw = config.safelist;\n if (!Array.isArray(raw)) return [];\n const out = /* @__PURE__ */ new Set();\n for (const entry of raw) {\n if (typeof entry === \"string\" && entry.length > 0) {\n out.add(entry);\n continue;\n }\n if (!entry || typeof entry !== \"object\") continue;\n const pattern = entry.pattern;\n if (typeof pattern === \"string\" && pattern.length > 0) {\n out.add(pattern);\n }\n }\n return Array.from(out);\n}\nfunction collectCustomUtilities(config) {\n const out = /* @__PURE__ */ new Set();\n const theme = config.theme;\n if (!theme || typeof theme !== \"object\") return out;\n const extend = theme.extend;\n if (!extend || typeof extend !== \"object\") return out;\n for (const [section, value] of Object.entries(extend)) {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) continue;\n for (const key of Object.keys(value)) {\n out.add(`${section}-${key}`);\n if (section === \"colors\") {\n out.add(`bg-${key}`);\n out.add(`text-${key}`);\n out.add(`border-${key}`);\n } else if (section === \"spacing\") {\n out.add(`p-${key}`);\n out.add(`m-${key}`);\n out.add(`gap-${key}`);\n out.add(`w-${key}`);\n out.add(`h-${key}`);\n } else if (section === \"fontSize\") {\n out.add(`text-${key}`);\n } else if (section === \"borderRadius\") {\n out.add(`rounded-${key}`);\n } else if (section === \"boxShadow\") {\n out.add(`shadow-${key}`);\n }\n }\n }\n return out;\n}\nasync function collectSafelistFromSource(configPath) {\n const source = await fs2.promises.readFile(configPath, \"utf8\");\n const safelistBlock = source.match(/safelist\\s*:\\s*\\[([\\s\\S]*?)\\]/m)?.[1];\n if (!safelistBlock) return [];\n const out = /* @__PURE__ */ new Set();\n const tokenRegex = /[\"'`]([^\"'`]+)[\"'`]/g;\n let token = tokenRegex.exec(safelistBlock);\n while (token) {\n const value = token[1].trim();\n if (value.length > 0) out.add(value);\n token = tokenRegex.exec(safelistBlock);\n }\n return Array.from(out);\n}\nasync function loadTailwindConfig(root, semanticOption) {\n const startMs = Date.now();\n const configPath = await resolveTailwindConfigPath(root, semanticOption?.tailwindConfigPath);\n if (!configPath) return null;\n if (!isSupportedTailwindConfigPath(configPath)) {\n return {\n path: configPath,\n loaded: false,\n warning: `Unsupported Tailwind config extension at \"${configPath}\". Supported extensions: .ts, .js, .cjs, .mjs.`,\n safelist: /* @__PURE__ */ new Set(),\n customUtilities: /* @__PURE__ */ new Set()\n };\n }\n const configStat = await fs2.promises.stat(configPath).catch(() => null);\n if (configStat) {\n const cached = tailwindConfigCache.get(configPath);\n if (cached && cached.mtimeMs === configStat.mtimeMs && cached.size === configStat.size) {\n debugLog(\n `tailwind config cache hit: ${configPath} (${cached.config.safelist.size} safelist entries)`\n );\n return cached.config;\n }\n }\n let config = null;\n let warning;\n try {\n const cacheBustToken = Math.trunc(configStat?.mtimeMs ?? Date.now());\n const imported = await import(`${pathToFileURL(configPath).href}?tws_mtime=${cacheBustToken}`);\n const candidate = imported.default ?? imported;\n if (isRecord(candidate)) {\n config = candidate;\n } else if (typeof candidate === \"function\") {\n const evaluated = candidate();\n if (isRecord(evaluated)) {\n config = evaluated;\n } else {\n warning = \"Tailwind config export function must return an object.\";\n }\n } else {\n warning = \"Tailwind config export must be an object or a function returning an object.\";\n }\n } catch (error) {\n warning = formatErrorMessage(error);\n }\n const safelist = /* @__PURE__ */ new Set();\n const customUtilities = /* @__PURE__ */ new Set();\n if (config) {\n for (const item of collectSafelistFromConfig(config)) safelist.add(item);\n for (const item of collectCustomUtilities(config)) customUtilities.add(item);\n }\n if (safelist.size === 0) {\n try {\n for (const item of await collectSafelistFromSource(configPath)) safelist.add(item);\n } catch (error) {\n debugLog(\n `failed to parse safelist from source at \"${configPath}\": ${formatErrorMessage(error)}`\n );\n }\n }\n const loaded = {\n path: configPath,\n loaded: config !== null,\n warning,\n safelist,\n customUtilities\n };\n if (configStat) {\n tailwindConfigCache.set(configPath, {\n mtimeMs: configStat.mtimeMs,\n size: configStat.size,\n config: loaded\n });\n }\n debugLog(\n `tailwind config loaded from \"${configPath}\" in ${Date.now() - startMs}ms (loaded=${loaded.loaded}, safelist=${loaded.safelist.size}, custom=${loaded.customUtilities.size})`\n );\n return loaded;\n}\nfunction utilityPrefix(baseClass) {\n const normalized = baseClass.startsWith(\"-\") ? baseClass.slice(1) : baseClass;\n if (normalized.includes(\"[\") && normalized.includes(\"]\")) return \"arbitrary\";\n if (normalized.startsWith(\"min-w-\")) return \"min-w\";\n if (normalized.startsWith(\"max-w-\")) return \"max-w\";\n if (normalized.startsWith(\"min-h-\")) return \"min-h\";\n if (normalized.startsWith(\"max-h-\")) return \"max-h\";\n if (normalized.startsWith(\"space-x-\")) return \"space-x\";\n if (normalized.startsWith(\"space-y-\")) return \"space-y\";\n if (normalized.startsWith(\"inline-\")) return \"inline\";\n if (normalized.startsWith(\"border-\")) return \"border\";\n if (normalized.startsWith(\"text-\")) return \"text\";\n if (normalized.startsWith(\"bg-\")) return \"bg\";\n if (normalized.startsWith(\"rounded\")) return \"rounded\";\n if (normalized.startsWith(\"shadow\")) return \"shadow\";\n const hyphen = normalized.indexOf(\"-\");\n if (hyphen < 0) return normalized;\n return normalized.slice(0, hyphen);\n}\nfunction isKnownTailwindClass(className, safelist, customUtilities) {\n if (safelist.has(className) || customUtilities.has(className)) return true;\n const { base } = splitVariantAndBase(className);\n if (customUtilities.has(base)) return true;\n const prefix = utilityPrefix(base);\n return KNOWN_UTILITY_PREFIXES.has(prefix);\n}\nasync function buildSemanticReport(usages, root, semanticOption) {\n const loadedConfig = await loadTailwindConfig(root, semanticOption);\n const safelist = loadedConfig?.safelist ?? /* @__PURE__ */ new Set();\n const customUtilities = loadedConfig?.customUtilities ?? /* @__PURE__ */ new Set();\n const usageNames = new Set(usages.map((usage) => usage.name));\n const unusedClasses = Array.from(safelist).filter((className) => !usageNames.has(className)).sort().map((className) => ({ name: className, count: 0, isUnused: true }));\n const unknownClasses = usages.filter((usage) => !isKnownTailwindClass(usage.name, safelist, customUtilities)).map((usage) => ({ ...usage, isUnused: true }));\n const { conflicts } = detectConflicts(usages);\n return {\n unusedClasses,\n unknownClasses,\n conflicts,\n ...loadedConfig ? {\n tailwindConfig: {\n path: loadedConfig.path,\n loaded: loadedConfig.loaded,\n safelistCount: loadedConfig.safelist.size,\n customUtilityCount: loadedConfig.customUtilities.size,\n ...loadedConfig.warning ? { warning: loadedConfig.warning } : {}\n }\n } : {}\n };\n}\n\n// src/analyzeWorkspace.ts\nfunction normalizeScan(scan, includeClass) {\n if (!includeClass) return scan;\n const filteredFiles = scan.files.map((file) => ({\n file: file.file,\n classes: file.classes.filter((className) => includeClass(className))\n }));\n const unique = /* @__PURE__ */ new Set();\n for (const file of filteredFiles) {\n for (const className of file.classes) unique.add(className);\n }\n return {\n files: filteredFiles,\n totalFiles: scan.totalFiles,\n uniqueClasses: Array.from(unique).sort()\n };\n}\nfunction collectClassCounts(scan) {\n const counts = /* @__PURE__ */ new Map();\n for (const file of scan.files) {\n for (const className of file.classes) {\n counts.set(className, (counts.get(className) ?? 0) + 1);\n }\n }\n return counts;\n}\nfunction buildClassUsage(counts) {\n return Array.from(counts.entries()).map(([name, count]) => ({ name, count })).sort((left, right) => {\n if (right.count !== left.count) return right.count - left.count;\n return left.name.localeCompare(right.name);\n });\n}\nfunction buildDistribution(usages) {\n const distribution = {\n \"1\": 0,\n \"2-3\": 0,\n \"4-7\": 0,\n \"8+\": 0\n };\n for (const usage of usages) {\n if (usage.count === 1) {\n distribution[\"1\"] += 1;\n continue;\n }\n if (usage.count <= 3) {\n distribution[\"2-3\"] += 1;\n continue;\n }\n if (usage.count <= 7) {\n distribution[\"4-7\"] += 1;\n continue;\n }\n distribution[\"8+\"] += 1;\n }\n return distribution;\n}\nasync function analyzeWorkspace(root, options = {}) {\n const startedAtMs = Date.now();\n const resolvedRoot = path2.resolve(root);\n const scanStartedAtMs = Date.now();\n let scan;\n try {\n scan = await scanWorkspaceAsync(resolvedRoot, options.scanner);\n } catch (error) {\n throw new Error(\n `Failed to scan workspace at \"${resolvedRoot}\": ${formatErrorMessage(error)}`,\n { cause: error }\n );\n }\n debugLog(`scanWorkspaceAsync processed ${scan.totalFiles} files in ${Date.now() - scanStartedAtMs}ms`);\n const normalizedScan = normalizeScan(scan, options.includeClass);\n const topLimit = sanitizeTopLimit(options.classStats?.top);\n const frequentThreshold = sanitizeFrequentThreshold(options.classStats?.frequentThreshold);\n const binding = requireNativeBinding();\n const filesJson = JSON.stringify(\n normalizedScan.files.map((file) => ({ file: file.file, classes: file.classes }))\n );\n let nativeReport = null;\n try {\n nativeReport = binding.analyzeClasses(filesJson, resolvedRoot, topLimit);\n } catch (error) {\n throw new Error(\n `Native analyzer failed for \"${resolvedRoot}\": ${formatErrorMessage(error)}`,\n { cause: error }\n );\n }\n if (!nativeReport) {\n throw new Error(`Native analyzer returned no report for \"${resolvedRoot}\".`);\n }\n const counts = collectClassCounts(normalizedScan);\n let all = buildClassUsage(counts);\n let semanticReport;\n if (options.semantic) {\n const semanticOption = typeof options.semantic === \"object\" ? options.semantic : void 0;\n const semanticStartedAtMs = Date.now();\n try {\n semanticReport = await buildSemanticReport(all, resolvedRoot, semanticOption);\n } catch (error) {\n throw new Error(\n `Failed to build semantic report for \"${resolvedRoot}\": ${formatErrorMessage(error)}`,\n { cause: error }\n );\n }\n debugLog(`semantic report built in ${Date.now() - semanticStartedAtMs}ms`);\n if (semanticReport.conflicts.length > 0) {\n const conflicted = new Set(\n semanticReport.conflicts.flatMap((conflict) => conflict.classes)\n );\n all = all.map(\n (usage) => conflicted.has(usage.name) ? { ...usage, isConflict: true } : usage\n );\n }\n }\n const top = all.slice(0, topLimit);\n const frequent = all.filter((usage) => usage.count >= frequentThreshold).slice(0, topLimit);\n const unique = all.filter((usage) => usage.count === 1);\n const totalClassOccurrences = all.reduce((sum, usage) => sum + usage.count, 0);\n debugLog(\n `analyzeWorkspace completed in ${Date.now() - startedAtMs}ms (files=${normalizedScan.totalFiles}, uniqueClasses=${all.length})`\n );\n return {\n root: nativeReport.root || resolvedRoot,\n totalFiles: nativeReport.totalFiles,\n uniqueClassCount: all.length,\n totalClassOccurrences,\n classStats: {\n all,\n top,\n frequent,\n unique,\n distribution: buildDistribution(all)\n },\n safelist: all.map((usage) => usage.name),\n ...semanticReport ? { semantic: semanticReport } : {}\n };\n}\n\n// src/classToCss.ts\nfunction normalizeClassInput(input) {\n if (typeof input === \"string\") {\n return input.split(/\\s+/).map((item) => item.trim()).filter((item) => item.length > 0);\n }\n if (!Array.isArray(input)) {\n throw new TypeError(\"classToCss input must be a string or an array of strings.\");\n }\n const out = [];\n for (const item of input) {\n if (typeof item !== \"string\") {\n throw new TypeError(\"classToCss input array must contain only strings.\");\n }\n const value = item.trim();\n if (value.length > 0) out.push(value);\n }\n return out;\n}\nfunction normalizeClassToCssOptions(options) {\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new TypeError(\"classToCss options must be an object.\");\n }\n const strict = options.strict ?? false;\n if (typeof strict !== \"boolean\") {\n throw new TypeError(\"classToCss options.strict must be a boolean when provided.\");\n }\n const prefix = options.prefix ?? null;\n if (prefix !== null && typeof prefix !== \"string\") {\n throw new TypeError(\"classToCss options.prefix must be a string or null when provided.\");\n }\n return { prefix, strict };\n}\nfunction mergeDeclarationMap(target, css) {\n const ruleRegex = /\\{([^}]*)\\}/g;\n let ruleMatch = ruleRegex.exec(css);\n while (ruleMatch) {\n const body = ruleMatch[1];\n for (const raw of body.split(\";\")) {\n const declaration = raw.trim();\n if (declaration.length === 0) continue;\n const colonIndex = declaration.indexOf(\":\");\n if (colonIndex <= 0) continue;\n const property = declaration.slice(0, colonIndex).trim();\n const value = declaration.slice(colonIndex + 1).trim();\n if (property.length === 0 || value.length === 0) continue;\n if (target.has(property)) target.delete(property);\n target.set(property, value);\n }\n ruleMatch = ruleRegex.exec(css);\n }\n}\nfunction declarationMapToString(declarationMap) {\n return Array.from(declarationMap.entries()).map(([property, value]) => `${property}: ${value}`).join(\"; \");\n}\nasync function classToCss(input, options = {}) {\n const inputClasses = normalizeClassInput(input);\n const normalizedOptions = normalizeClassToCssOptions(options);\n if (inputClasses.length === 0) {\n return {\n inputClasses: [],\n css: \"\",\n declarations: \"\",\n resolvedClasses: [],\n unknownClasses: [],\n sizeBytes: 0\n };\n }\n const binding = requireNativeCssCompiler();\n const prefix = normalizedOptions.prefix;\n const cssChunks = [];\n const resolvedClasses = [];\n const unknownClasses = [];\n let sizeBytes = 0;\n const declarationMap = /* @__PURE__ */ new Map();\n for (const className of inputClasses) {\n let compiled = null;\n try {\n compiled = binding.compileCss([className], prefix);\n } catch (error) {\n throw new Error(\n `Native analyzer failed while compiling class \"${className}\": ${formatErrorMessage(error)}`,\n { cause: error }\n );\n }\n if (!compiled) {\n throw new Error(`Native analyzer returned no result for class \"${className}\".`);\n }\n cssChunks.push(compiled.css);\n resolvedClasses.push(...compiled.resolvedClasses);\n unknownClasses.push(...compiled.unknownClasses);\n sizeBytes += compiled.sizeBytes;\n mergeDeclarationMap(declarationMap, compiled.css);\n }\n const uniqueUnknown = Array.from(new Set(unknownClasses));\n if (normalizedOptions.strict && uniqueUnknown.length > 0) {\n throw new Error(`Unknown Tailwind classes: ${uniqueUnknown.join(\", \")}`);\n }\n return {\n inputClasses,\n css: cssChunks.filter((chunk) => chunk.length > 0).join(\"\\n\"),\n declarations: declarationMapToString(declarationMap),\n resolvedClasses: Array.from(new Set(resolvedClasses)),\n unknownClasses: uniqueUnknown,\n sizeBytes\n };\n}\n\n// src/index.ts\nvar __internal = {\n normalizeClassInput,\n splitVariantAndBase,\n resolveConflictGroup,\n collectClassCounts,\n buildDistribution,\n utilityPrefix\n};\nexport {\n __internal,\n analyzeWorkspace,\n classToCss\n};\n","import { classToCss } from \"@tailwind-styled/analyzer\"\nimport { LRUCache, formatErrorMessage } from \"@tailwind-styled/shared\"\n\nimport { getAnimateBinding } from \"./binding\"\nimport type {\n AnimateOptions,\n AnimationRegistryOptions,\n CompiledAnimation,\n KeyframesDefinition,\n} from \"./types\"\n\nconst DEFAULT_DURATION = 300\nconst DEFAULT_EASING = \"ease-out\"\nconst DEFAULT_DELAY = 0\nconst DEFAULT_FILL = \"both\"\nconst DEFAULT_ITERATIONS = 1\nconst DEFAULT_DIRECTION = \"normal\"\nconst DEFAULT_CACHE_LIMIT = 512\n\nfunction normalizeNumber(value: number | undefined, fallback: number): number {\n if (!Number.isFinite(value)) return fallback\n return Math.max(0, Math.trunc(value as number))\n}\n\nfunction normalizeCacheLimit(value: number | undefined): number {\n if (!Number.isFinite(value)) return DEFAULT_CACHE_LIMIT\n return Math.max(1, Math.trunc(value as number))\n}\n\nfunction normalizeIterations(value: AnimateOptions[\"iterations\"]): string {\n if (value === \"infinite\") return \"infinite\"\n if (!Number.isFinite(value)) return String(DEFAULT_ITERATIONS)\n return String(Math.max(0, Math.trunc(value as number)))\n}\n\nfunction stableKeyframesEntries(stops: KeyframesDefinition): Array<{ offset: string; classes: string }> {\n return Object.entries(stops)\n .map(([offset, classes]) => ({ offset, classes }))\n .sort((left, right) => left.offset.localeCompare(right.offset))\n}\n\nfunction animationCacheKey(opts: AnimateOptions): string {\n const normalized = {\n from: opts.from.trim(),\n to: opts.to.trim(),\n duration: normalizeNumber(opts.duration, DEFAULT_DURATION),\n easing: (opts.easing ?? DEFAULT_EASING).trim(),\n delay: normalizeNumber(opts.delay, DEFAULT_DELAY),\n fill: opts.fill ?? DEFAULT_FILL,\n iterations: normalizeIterations(opts.iterations),\n direction: opts.direction ?? DEFAULT_DIRECTION,\n name: opts.name ?? \"\",\n }\n return JSON.stringify(normalized)\n}\n\nfunction keyframesCacheKey(name: string, stops: KeyframesDefinition): string {\n return `${name}::${JSON.stringify(stableKeyframesEntries(stops))}`\n}\n\nfunction splitClasses(classList: string): string[] {\n return classList\n .split(/\\s+/)\n .map((item) => item.trim())\n .filter((item) => item.length > 0)\n}\n\nasync function validateTailwindClasses(\n entries: Array<{ classList: string; context: string }>\n): Promise<void> {\n const binding = await getAnimateBinding()\n const unknownByContext = new Map<string, Set<string>>()\n const failures: string[] = []\n\n for (const entry of entries) {\n const classes = splitClasses(entry.classList)\n if (classes.length === 0) continue\n\n try {\n if (typeof binding.compileCss === \"function\") {\n const compiled = binding.compileCss(classes, null)\n if (!compiled) {\n failures.push(`Animation ${entry.context} failed validation: native compileCss returned no result.`)\n continue\n }\n if (compiled.unknownClasses.length > 0) {\n const bucket = unknownByContext.get(entry.context) ?? new Set<string>()\n for (const className of compiled.unknownClasses) bucket.add(className)\n unknownByContext.set(entry.context, bucket)\n }\n continue\n }\n\n const checked = await classToCss(classes, { strict: false })\n if (checked.unknownClasses.length > 0) {\n const bucket = unknownByContext.get(entry.context) ?? new Set<string>()\n for (const className of checked.unknownClasses) bucket.add(className)\n unknownByContext.set(entry.context, bucket)\n }\n } catch (error) {\n failures.push(`Animation ${entry.context} failed validation: ${formatErrorMessage(error)}`)\n }\n }\n\n const issues: string[] = []\n for (const [context, classes] of unknownByContext.entries()) {\n issues.push(`Animation ${context} contains unknown Tailwind classes: ${Array.from(classes).join(\", \")}`)\n }\n issues.push(...failures)\n\n if (issues.length > 0) {\n throw new Error(issues.join(\"\\n\"))\n }\n}\n\nexport class AnimationRegistry {\n private readonly animations: LRUCache<string, CompiledAnimation>\n private readonly animationBySignature: LRUCache<string, string>\n private readonly keyframesBySignature: LRUCache<string, string>\n\n constructor(options: AnimationRegistryOptions = {}) {\n const cacheLimit = normalizeCacheLimit(options.cacheLimit)\n this.animations = new LRUCache(cacheLimit)\n this.animationBySignature = new LRUCache(cacheLimit)\n this.keyframesBySignature = new LRUCache(cacheLimit)\n }\n\n async compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation> {\n const signature = animationCacheKey(opts)\n const existingClassName = this.animationBySignature.get(signature)\n if (existingClassName) {\n const cached = this.animations.get(existingClassName)\n if (cached) return cached\n this.animationBySignature.delete(signature)\n }\n\n await validateTailwindClasses([\n { classList: opts.from, context: `\"from\" in ${opts.name ?? \"anonymous animation\"}` },\n { classList: opts.to, context: `\"to\" in ${opts.name ?? \"anonymous animation\"}` },\n ])\n\n const binding = await getAnimateBinding()\n const duration = normalizeNumber(opts.duration, DEFAULT_DURATION)\n const easing = opts.easing ?? DEFAULT_EASING\n const delay = normalizeNumber(opts.delay, DEFAULT_DELAY)\n const fill = opts.fill ?? DEFAULT_FILL\n const iterations = normalizeIterations(opts.iterations)\n const direction = opts.direction ?? DEFAULT_DIRECTION\n\n const compiled = binding.compileAnimation?.(\n opts.from,\n opts.to,\n opts.name ?? null,\n duration,\n easing,\n delay,\n fill,\n iterations,\n direction\n )\n\n if (!compiled) {\n throw new Error(\n `Native animate backend failed to compile animation \"${opts.name ?? \"anonymous animation\"}\".`\n )\n }\n\n const result: CompiledAnimation = {\n className: compiled.className,\n keyframesCss: compiled.keyframesCss,\n animationCss: compiled.animationCss,\n }\n\n this.animations.set(result.className, result)\n this.animationBySignature.set(signature, result.className)\n return result\n }\n\n async compileKeyframes(name: string, stops: KeyframesDefinition): Promise<CompiledAnimation> {\n const signature = keyframesCacheKey(name, stops)\n const existingClassName = this.keyframesBySignature.get(signature)\n if (existingClassName) {\n const cached = this.animations.get(existingClassName)\n if (cached) return cached\n this.keyframesBySignature.delete(signature)\n }\n\n await validateTailwindClasses(\n Object.entries(stops).map(([offset, classes]) => ({\n classList: classes,\n context: `\"${offset}\" stop in keyframes \"${name}\"`,\n }))\n )\n\n const binding = await getAnimateBinding()\n const stopsJson = JSON.stringify(stableKeyframesEntries(stops))\n const compiled = binding.compileKeyframes?.(name, stopsJson)\n\n if (!compiled) {\n throw new Error(`Native animate backend failed to compile keyframes \"${name}\".`)\n }\n\n const result: CompiledAnimation = {\n className: compiled.className,\n keyframesCss: compiled.keyframesCss,\n animationCss: compiled.animationCss,\n }\n\n this.animations.set(result.className, result)\n this.keyframesBySignature.set(signature, result.className)\n return result\n }\n\n extractCss(): string {\n const lines: string[] = []\n for (const [, compiled] of this.animations.entries()) {\n lines.push(compiled.keyframesCss)\n lines.push(`.${compiled.className} { ${compiled.animationCss} }`)\n }\n return lines.join(\"\\n\\n\")\n }\n\n reset(): void {\n this.animations.clear()\n this.animationBySignature.clear()\n this.keyframesBySignature.clear()\n }\n\n has(className: string): boolean {\n return this.animations.has(className)\n }\n}\n\nexport function createAnimationRegistry(options: AnimationRegistryOptions = {}): AnimationRegistry {\n return new AnimationRegistry(options)\n}\n","import { initAnimate as initAnimateBackend } from \"./binding\"\nimport { createAnimationPresets } from \"./preset\"\nimport { AnimationRegistry, createAnimationRegistry } from \"./registry\"\nimport type {\n AnimateOptions,\n AnimationRegistryOptions,\n CompiledAnimation,\n KeyframesDefinition,\n} from \"./types\"\n\nexport type {\n AnimateOptions,\n AnimationRegistryOptions,\n CompiledAnimation,\n CSSDirection,\n CSSEasing,\n CSSFillMode,\n CSSIterationCount,\n CubicBezierEasing,\n KeyframesDefinition,\n PresetEasing,\n StepsEasing,\n} from \"./types\"\n\nconst defaultRegistry = createAnimationRegistry()\n\nexport async function initAnimate(): Promise<void> {\n await initAnimateBackend()\n}\n\nexport function getDefaultAnimationRegistry(): AnimationRegistry {\n return defaultRegistry\n}\n\nexport async function compileAnimation(\n opts: AnimateOptions,\n registry: AnimationRegistry = defaultRegistry\n): Promise<CompiledAnimation> {\n return registry.compileAnimation(opts)\n}\n\nexport async function compileKeyframes(\n name: string,\n stops: KeyframesDefinition,\n registry: AnimationRegistry = defaultRegistry\n): Promise<CompiledAnimation> {\n return registry.compileKeyframes(name, stops)\n}\n\nexport async function animate(\n opts: AnimateOptions,\n registry: AnimationRegistry = defaultRegistry\n): Promise<string> {\n return (await registry.compileAnimation(opts)).className\n}\n\nexport async function keyframes(\n name: string,\n stops: KeyframesDefinition,\n registry: AnimationRegistry = defaultRegistry\n): Promise<string> {\n return (await registry.compileKeyframes(name, stops)).className\n}\n\nexport function extractAnimationCss(registry: AnimationRegistry = defaultRegistry): string {\n return registry.extractCss()\n}\n\nexport function resetAnimationRegistry(registry: AnimationRegistry = defaultRegistry): void {\n registry.reset()\n}\n\nexport interface InjectAnimationCssOptions {\n document?: Document\n styleId?: string\n silent?: boolean\n}\n\nexport function injectAnimationCss(\n registry: AnimationRegistry = defaultRegistry,\n options: InjectAnimationCssOptions = {}\n): void {\n const targetDocument = options.document ?? (typeof document !== \"undefined\" ? document : undefined)\n if (!targetDocument) {\n if (options.silent) return\n throw new Error(\"injectAnimationCss requires a browser Document.\")\n }\n\n const styleId = options.styleId ?? \"__tw_animate_styles__\"\n let styleEl = targetDocument.getElementById(styleId) as HTMLStyleElement | null\n if (!styleEl) {\n if (!targetDocument.head) {\n if (options.silent) return\n throw new Error(\"injectAnimationCss requires document.head to exist.\")\n }\n styleEl = targetDocument.createElement(\"style\")\n styleEl.id = styleId\n targetDocument.head.appendChild(styleEl)\n }\n\n styleEl.textContent = registry.extractCss()\n}\n\nexport { AnimationRegistry, createAnimationRegistry } from \"./registry\"\n\nexport const animations = createAnimationPresets(defaultRegistry)\n"]}
@@ -1,117 +1,73 @@
1
- /**
2
- * tailwind-styled-v4 Animation DSL
3
- *
4
- * Compile-time animation system. Define animations dengan Tailwind class,
5
- * compiler generate @keyframes — nol runtime, nol JS overhead.
6
- *
7
- * Usage:
8
- *
9
- * // Cara 1: .animate() chaining pada tw component
10
- * const FadeIn = tw.div.animate({
11
- * from: "opacity-0 translate-y-2",
12
- * to: "opacity-100 translate-y-0",
13
- * duration: 300,
14
- * easing: "ease-out"
15
- * })
16
- *
17
- * // Cara 2: standalone animate() utility
18
- * const fadeIn = animate({
19
- * from: "opacity-0 scale-95",
20
- * to: "opacity-100 scale-100",
21
- * duration: 200,
22
- * })
23
- * const Box = tw.div`${fadeIn}`
24
- *
25
- * // Cara 3: preset animations
26
- * const Card = tw.div`${animations.fadeIn} ${animations.slideUp}`
27
- *
28
- * // Cara 4: tw.keyframes() custom
29
- * const spin = tw.keyframes("spin", {
30
- * "0%": "rotate-0",
31
- * "100%": "rotate-180",
32
- * })
33
- */
1
+ type CSSFillMode = "none" | "forwards" | "backwards" | "both";
2
+ type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
3
+ type CSSIterationCount = number | "infinite";
4
+ type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
5
+ type CubicBezierEasing = `cubic-bezier(${string})`;
6
+ type StepsEasing = `steps(${string})`;
7
+ type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
34
8
  interface AnimateOptions {
35
- /** Tailwind classes for animation start state */
36
9
  from: string;
37
- /** Tailwind classes for animation end state */
38
10
  to: string;
39
- /** Duration in ms. Default: 300 */
40
11
  duration?: number;
41
- /** CSS easing. Default: "ease-out" */
42
- easing?: string;
43
- /** Delay in ms. Default: 0 */
12
+ easing?: CSSEasing;
44
13
  delay?: number;
45
- /** Fill mode. Default: "both" */
46
- fill?: "none" | "forwards" | "backwards" | "both";
47
- /** Iteration count. Default: 1 */
48
- iterations?: number | "infinite";
49
- /** Direction. Default: "normal" */
50
- direction?: "normal" | "reverse" | "alternate" | "alternate-reverse";
51
- /** Animation name override (auto-generated from from+to if not set) */
14
+ fill?: CSSFillMode;
15
+ iterations?: CSSIterationCount;
16
+ direction?: CSSDirection;
52
17
  name?: string;
53
18
  }
54
19
  interface KeyframesDefinition {
55
20
  [stop: string]: string;
56
21
  }
57
22
  interface CompiledAnimation {
58
- /** CSS animation class name to apply */
59
23
  className: string;
60
- /** @keyframes CSS to inject */
61
24
  keyframesCss: string;
62
- /** animation CSS shorthand */
63
25
  animationCss: string;
64
26
  }
65
- declare function getAnimationRegistry(): Map<string, CompiledAnimation>;
66
- /**
67
- * Compile AnimateOptions into CSS animation + @keyframes.
68
- *
69
- * Called at build time by the compiler, or at runtime in dev mode.
70
- */
71
- declare function compileAnimation(opts: AnimateOptions): CompiledAnimation;
72
- /**
73
- * Generate an animation class string to use in tw template literals.
74
- *
75
- * @example
76
- * const fadeIn = animate({ from: "opacity-0", to: "opacity-100", duration: 200 })
77
- * const Box = tw.div`${fadeIn} p-4 bg-white`
78
- */
79
- declare function animate(opts: AnimateOptions): string;
80
- /**
81
- * Define a custom keyframe animation with multiple stops.
82
- *
83
- * @example
84
- * const pulse = tw.keyframes("pulse", {
85
- * "0%, 100%": "opacity-100 scale-100",
86
- * "50%": "opacity-50 scale-95",
87
- * })
88
- * const Dot = tw.div`${pulse} w-4 h-4 rounded-full bg-blue-500`
89
- */
90
- declare function keyframes(name: string, stops: KeyframesDefinition): string;
91
- /**
92
- * Collection of ready-to-use animation class strings.
93
- *
94
- * @example
95
- * const Card = tw.div`${animations.fadeIn} p-4 bg-white`
96
- * const Modal = tw.div`${animations.scaleIn} fixed inset-0`
97
- */
27
+ interface AnimationRegistryOptions {
28
+ cacheLimit?: number;
29
+ }
30
+
31
+ declare class AnimationRegistry {
32
+ private readonly animations;
33
+ private readonly animationBySignature;
34
+ private readonly keyframesBySignature;
35
+ constructor(options?: AnimationRegistryOptions);
36
+ compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
37
+ compileKeyframes(name: string, stops: KeyframesDefinition): Promise<CompiledAnimation>;
38
+ extractCss(): string;
39
+ reset(): void;
40
+ has(className: string): boolean;
41
+ }
42
+ declare function createAnimationRegistry(options?: AnimationRegistryOptions): AnimationRegistry;
43
+
44
+ declare function initAnimate(): Promise<void>;
45
+ declare function getDefaultAnimationRegistry(): AnimationRegistry;
46
+ declare function compileAnimation(opts: AnimateOptions, registry?: AnimationRegistry): Promise<CompiledAnimation>;
47
+ declare function compileKeyframes(name: string, stops: KeyframesDefinition, registry?: AnimationRegistry): Promise<CompiledAnimation>;
48
+ declare function animate(opts: AnimateOptions, registry?: AnimationRegistry): Promise<string>;
49
+ declare function keyframes(name: string, stops: KeyframesDefinition, registry?: AnimationRegistry): Promise<string>;
50
+ declare function extractAnimationCss(registry?: AnimationRegistry): string;
51
+ declare function resetAnimationRegistry(registry?: AnimationRegistry): void;
52
+ interface InjectAnimationCssOptions {
53
+ document?: Document;
54
+ styleId?: string;
55
+ silent?: boolean;
56
+ }
57
+ declare function injectAnimationCss(registry?: AnimationRegistry, options?: InjectAnimationCssOptions): void;
58
+
98
59
  declare const animations: {
99
- readonly fadeIn: string;
100
- readonly fadeOut: string;
101
- readonly slideUp: string;
102
- readonly slideDown: string;
103
- readonly slideLeft: string;
104
- readonly slideRight: string;
105
- readonly scaleIn: string;
106
- readonly scaleOut: string;
107
- readonly blurIn: string;
108
- readonly bounceIn: string;
109
- readonly spinIn: string;
60
+ readonly fadeIn: () => Promise<string>;
61
+ readonly fadeOut: () => Promise<string>;
62
+ readonly slideUp: () => Promise<string>;
63
+ readonly slideDown: () => Promise<string>;
64
+ readonly slideLeft: () => Promise<string>;
65
+ readonly slideRight: () => Promise<string>;
66
+ readonly scaleIn: () => Promise<string>;
67
+ readonly scaleOut: () => Promise<string>;
68
+ readonly blurIn: () => Promise<string>;
69
+ readonly bounceIn: () => Promise<string>;
70
+ readonly spinIn: () => Promise<string>;
110
71
  };
111
- /**
112
- * Get all compiled animation CSS to inject into a stylesheet.
113
- * Called by the CSS extraction engine at build time.
114
- */
115
- declare function extractAnimationCss(): string;
116
72
 
117
- export { type AnimateOptions, type CompiledAnimation, type KeyframesDefinition, animate, animations, compileAnimation, extractAnimationCss, getAnimationRegistry, keyframes };
73
+ export { type AnimateOptions, AnimationRegistry, type AnimationRegistryOptions, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
package/dist/animate.d.ts CHANGED
@@ -1,117 +1,73 @@
1
- /**
2
- * tailwind-styled-v4 Animation DSL
3
- *
4
- * Compile-time animation system. Define animations dengan Tailwind class,
5
- * compiler generate @keyframes — nol runtime, nol JS overhead.
6
- *
7
- * Usage:
8
- *
9
- * // Cara 1: .animate() chaining pada tw component
10
- * const FadeIn = tw.div.animate({
11
- * from: "opacity-0 translate-y-2",
12
- * to: "opacity-100 translate-y-0",
13
- * duration: 300,
14
- * easing: "ease-out"
15
- * })
16
- *
17
- * // Cara 2: standalone animate() utility
18
- * const fadeIn = animate({
19
- * from: "opacity-0 scale-95",
20
- * to: "opacity-100 scale-100",
21
- * duration: 200,
22
- * })
23
- * const Box = tw.div`${fadeIn}`
24
- *
25
- * // Cara 3: preset animations
26
- * const Card = tw.div`${animations.fadeIn} ${animations.slideUp}`
27
- *
28
- * // Cara 4: tw.keyframes() custom
29
- * const spin = tw.keyframes("spin", {
30
- * "0%": "rotate-0",
31
- * "100%": "rotate-180",
32
- * })
33
- */
1
+ type CSSFillMode = "none" | "forwards" | "backwards" | "both";
2
+ type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
3
+ type CSSIterationCount = number | "infinite";
4
+ type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
5
+ type CubicBezierEasing = `cubic-bezier(${string})`;
6
+ type StepsEasing = `steps(${string})`;
7
+ type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
34
8
  interface AnimateOptions {
35
- /** Tailwind classes for animation start state */
36
9
  from: string;
37
- /** Tailwind classes for animation end state */
38
10
  to: string;
39
- /** Duration in ms. Default: 300 */
40
11
  duration?: number;
41
- /** CSS easing. Default: "ease-out" */
42
- easing?: string;
43
- /** Delay in ms. Default: 0 */
12
+ easing?: CSSEasing;
44
13
  delay?: number;
45
- /** Fill mode. Default: "both" */
46
- fill?: "none" | "forwards" | "backwards" | "both";
47
- /** Iteration count. Default: 1 */
48
- iterations?: number | "infinite";
49
- /** Direction. Default: "normal" */
50
- direction?: "normal" | "reverse" | "alternate" | "alternate-reverse";
51
- /** Animation name override (auto-generated from from+to if not set) */
14
+ fill?: CSSFillMode;
15
+ iterations?: CSSIterationCount;
16
+ direction?: CSSDirection;
52
17
  name?: string;
53
18
  }
54
19
  interface KeyframesDefinition {
55
20
  [stop: string]: string;
56
21
  }
57
22
  interface CompiledAnimation {
58
- /** CSS animation class name to apply */
59
23
  className: string;
60
- /** @keyframes CSS to inject */
61
24
  keyframesCss: string;
62
- /** animation CSS shorthand */
63
25
  animationCss: string;
64
26
  }
65
- declare function getAnimationRegistry(): Map<string, CompiledAnimation>;
66
- /**
67
- * Compile AnimateOptions into CSS animation + @keyframes.
68
- *
69
- * Called at build time by the compiler, or at runtime in dev mode.
70
- */
71
- declare function compileAnimation(opts: AnimateOptions): CompiledAnimation;
72
- /**
73
- * Generate an animation class string to use in tw template literals.
74
- *
75
- * @example
76
- * const fadeIn = animate({ from: "opacity-0", to: "opacity-100", duration: 200 })
77
- * const Box = tw.div`${fadeIn} p-4 bg-white`
78
- */
79
- declare function animate(opts: AnimateOptions): string;
80
- /**
81
- * Define a custom keyframe animation with multiple stops.
82
- *
83
- * @example
84
- * const pulse = tw.keyframes("pulse", {
85
- * "0%, 100%": "opacity-100 scale-100",
86
- * "50%": "opacity-50 scale-95",
87
- * })
88
- * const Dot = tw.div`${pulse} w-4 h-4 rounded-full bg-blue-500`
89
- */
90
- declare function keyframes(name: string, stops: KeyframesDefinition): string;
91
- /**
92
- * Collection of ready-to-use animation class strings.
93
- *
94
- * @example
95
- * const Card = tw.div`${animations.fadeIn} p-4 bg-white`
96
- * const Modal = tw.div`${animations.scaleIn} fixed inset-0`
97
- */
27
+ interface AnimationRegistryOptions {
28
+ cacheLimit?: number;
29
+ }
30
+
31
+ declare class AnimationRegistry {
32
+ private readonly animations;
33
+ private readonly animationBySignature;
34
+ private readonly keyframesBySignature;
35
+ constructor(options?: AnimationRegistryOptions);
36
+ compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
37
+ compileKeyframes(name: string, stops: KeyframesDefinition): Promise<CompiledAnimation>;
38
+ extractCss(): string;
39
+ reset(): void;
40
+ has(className: string): boolean;
41
+ }
42
+ declare function createAnimationRegistry(options?: AnimationRegistryOptions): AnimationRegistry;
43
+
44
+ declare function initAnimate(): Promise<void>;
45
+ declare function getDefaultAnimationRegistry(): AnimationRegistry;
46
+ declare function compileAnimation(opts: AnimateOptions, registry?: AnimationRegistry): Promise<CompiledAnimation>;
47
+ declare function compileKeyframes(name: string, stops: KeyframesDefinition, registry?: AnimationRegistry): Promise<CompiledAnimation>;
48
+ declare function animate(opts: AnimateOptions, registry?: AnimationRegistry): Promise<string>;
49
+ declare function keyframes(name: string, stops: KeyframesDefinition, registry?: AnimationRegistry): Promise<string>;
50
+ declare function extractAnimationCss(registry?: AnimationRegistry): string;
51
+ declare function resetAnimationRegistry(registry?: AnimationRegistry): void;
52
+ interface InjectAnimationCssOptions {
53
+ document?: Document;
54
+ styleId?: string;
55
+ silent?: boolean;
56
+ }
57
+ declare function injectAnimationCss(registry?: AnimationRegistry, options?: InjectAnimationCssOptions): void;
58
+
98
59
  declare const animations: {
99
- readonly fadeIn: string;
100
- readonly fadeOut: string;
101
- readonly slideUp: string;
102
- readonly slideDown: string;
103
- readonly slideLeft: string;
104
- readonly slideRight: string;
105
- readonly scaleIn: string;
106
- readonly scaleOut: string;
107
- readonly blurIn: string;
108
- readonly bounceIn: string;
109
- readonly spinIn: string;
60
+ readonly fadeIn: () => Promise<string>;
61
+ readonly fadeOut: () => Promise<string>;
62
+ readonly slideUp: () => Promise<string>;
63
+ readonly slideDown: () => Promise<string>;
64
+ readonly slideLeft: () => Promise<string>;
65
+ readonly slideRight: () => Promise<string>;
66
+ readonly scaleIn: () => Promise<string>;
67
+ readonly scaleOut: () => Promise<string>;
68
+ readonly blurIn: () => Promise<string>;
69
+ readonly bounceIn: () => Promise<string>;
70
+ readonly spinIn: () => Promise<string>;
110
71
  };
111
- /**
112
- * Get all compiled animation CSS to inject into a stylesheet.
113
- * Called by the CSS extraction engine at build time.
114
- */
115
- declare function extractAnimationCss(): string;
116
72
 
117
- export { type AnimateOptions, type CompiledAnimation, type KeyframesDefinition, animate, animations, compileAnimation, extractAnimationCss, getAnimationRegistry, keyframes };
73
+ export { type AnimateOptions, AnimationRegistry, type AnimationRegistryOptions, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };