tailwind-styled-v4 5.0.36 → 5.0.38

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 (163) hide show
  1. package/dist/analyzer.d.mts +152 -5
  2. package/dist/analyzer.d.ts +152 -5
  3. package/dist/analyzer.js +213 -161
  4. package/dist/analyzer.js.map +1 -1
  5. package/dist/analyzer.mjs +118 -82
  6. package/dist/analyzer.mjs.map +1 -1
  7. package/dist/animate.d.mts +30 -3
  8. package/dist/animate.d.ts +30 -3
  9. package/dist/animate.js +131 -87
  10. package/dist/animate.js.map +1 -1
  11. package/dist/animate.mjs +28 -14
  12. package/dist/animate.mjs.map +1 -1
  13. package/dist/atomic.js +105 -68
  14. package/dist/atomic.js.map +1 -1
  15. package/dist/atomic.mjs +40 -13
  16. package/dist/atomic.mjs.map +1 -1
  17. package/dist/cli.js +577 -426
  18. package/dist/cli.js.map +1 -1
  19. package/dist/cli.mjs +466 -304
  20. package/dist/cli.mjs.map +1 -1
  21. package/dist/compiler.d.mts +5 -0
  22. package/dist/compiler.d.ts +5 -0
  23. package/dist/compiler.js +826 -508
  24. package/dist/compiler.js.map +1 -1
  25. package/dist/compiler.mjs +287 -29
  26. package/dist/compiler.mjs.map +1 -1
  27. package/dist/dashboard.js +71 -41
  28. package/dist/dashboard.js.map +1 -1
  29. package/dist/dashboard.mjs +12 -6
  30. package/dist/dashboard.mjs.map +1 -1
  31. package/dist/devtools.d.mts +88 -2
  32. package/dist/devtools.d.ts +88 -2
  33. package/dist/devtools.js +333 -289
  34. package/dist/devtools.js.map +1 -1
  35. package/dist/devtools.mjs +26 -11
  36. package/dist/devtools.mjs.map +1 -1
  37. package/dist/engine.d.mts +557 -6
  38. package/dist/engine.d.ts +557 -6
  39. package/dist/engine.js +679 -502
  40. package/dist/engine.js.map +1 -1
  41. package/dist/engine.mjs +467 -307
  42. package/dist/engine.mjs.map +1 -1
  43. package/dist/index.d.mts +180 -127
  44. package/dist/index.d.ts +180 -127
  45. package/dist/index.js +1329 -7441
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1266 -7385
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/next.js +318 -243
  50. package/dist/next.js.map +1 -1
  51. package/dist/next.mjs +256 -181
  52. package/dist/next.mjs.map +1 -1
  53. package/dist/plugin-api.d.mts +4 -2
  54. package/dist/plugin-api.d.ts +4 -2
  55. package/dist/plugin-api.js +93 -49
  56. package/dist/plugin-api.js.map +1 -1
  57. package/dist/plugin-api.mjs +26 -6
  58. package/dist/plugin-api.mjs.map +1 -1
  59. package/dist/plugin-registry.js +103 -62
  60. package/dist/plugin-registry.js.map +1 -1
  61. package/dist/plugin-registry.mjs +53 -35
  62. package/dist/plugin-registry.mjs.map +1 -1
  63. package/dist/plugin.d.mts +165 -5
  64. package/dist/plugin.d.ts +165 -5
  65. package/dist/plugin.js +115 -50
  66. package/dist/plugin.js.map +1 -1
  67. package/dist/plugin.mjs +44 -6
  68. package/dist/plugin.mjs.map +1 -1
  69. package/dist/preset.js +47 -15
  70. package/dist/preset.js.map +1 -1
  71. package/dist/preset.mjs +13 -5
  72. package/dist/preset.mjs.map +1 -1
  73. package/dist/rspack.js +82 -50
  74. package/dist/rspack.js.map +1 -1
  75. package/dist/rspack.mjs +20 -12
  76. package/dist/rspack.mjs.map +1 -1
  77. package/dist/runtime-css.js +62 -24
  78. package/dist/runtime-css.js.map +1 -1
  79. package/dist/runtime-css.mjs +15 -7
  80. package/dist/runtime-css.mjs.map +1 -1
  81. package/dist/runtime.d.mts +38 -3
  82. package/dist/runtime.d.ts +38 -3
  83. package/dist/runtime.js +97 -44
  84. package/dist/runtime.js.map +1 -1
  85. package/dist/runtime.mjs +31 -8
  86. package/dist/runtime.mjs.map +1 -1
  87. package/dist/scanner.d.mts +58 -4
  88. package/dist/scanner.d.ts +58 -4
  89. package/dist/scanner.js +163 -120
  90. package/dist/scanner.js.map +1 -1
  91. package/dist/scanner.mjs +67 -39
  92. package/dist/scanner.mjs.map +1 -1
  93. package/dist/shared.d.mts +185 -3
  94. package/dist/shared.d.ts +185 -3
  95. package/dist/shared.js +441 -295
  96. package/dist/shared.js.map +1 -1
  97. package/dist/shared.mjs +253 -122
  98. package/dist/shared.mjs.map +1 -1
  99. package/dist/storybook-addon.d.mts +2 -2
  100. package/dist/storybook-addon.d.ts +2 -2
  101. package/dist/storybook-addon.js +39 -10
  102. package/dist/storybook-addon.js.map +1 -1
  103. package/dist/storybook-addon.mjs +8 -3
  104. package/dist/storybook-addon.mjs.map +1 -1
  105. package/dist/svelte.d.mts +2 -1
  106. package/dist/svelte.d.ts +2 -1
  107. package/dist/svelte.js +88 -64
  108. package/dist/svelte.js.map +1 -1
  109. package/dist/svelte.mjs +28 -13
  110. package/dist/svelte.mjs.map +1 -1
  111. package/dist/syntax.js +68 -37
  112. package/dist/syntax.js.map +1 -1
  113. package/dist/syntax.mjs +8 -7
  114. package/dist/syntax.mjs.map +1 -1
  115. package/dist/testing.js +55 -18
  116. package/dist/testing.js.map +1 -1
  117. package/dist/testing.mjs +16 -3
  118. package/dist/testing.mjs.map +1 -1
  119. package/dist/theme.d.mts +38 -3
  120. package/dist/theme.d.ts +38 -3
  121. package/dist/theme.js +131 -74
  122. package/dist/theme.js.map +1 -1
  123. package/dist/theme.mjs +42 -13
  124. package/dist/theme.mjs.map +1 -1
  125. package/dist/turbopackLoader.js +150 -116
  126. package/dist/turbopackLoader.js.map +1 -1
  127. package/dist/turbopackLoader.mjs +124 -81
  128. package/dist/turbopackLoader.mjs.map +1 -1
  129. package/dist/tw.js +560 -421
  130. package/dist/tw.js.map +1 -1
  131. package/dist/tw.mjs +460 -302
  132. package/dist/tw.mjs.map +1 -1
  133. package/dist/vite.js +561 -446
  134. package/dist/vite.js.map +1 -1
  135. package/dist/vite.mjs +433 -321
  136. package/dist/vite.mjs.map +1 -1
  137. package/dist/vue.d.mts +4 -1
  138. package/dist/vue.d.ts +4 -1
  139. package/dist/vue.js +95 -70
  140. package/dist/vue.js.map +1 -1
  141. package/dist/vue.mjs +30 -14
  142. package/dist/vue.mjs.map +1 -1
  143. package/dist/webpackLoader.js +110 -78
  144. package/dist/webpackLoader.js.map +1 -1
  145. package/dist/webpackLoader.mjs +45 -17
  146. package/dist/webpackLoader.mjs.map +1 -1
  147. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  148. package/native/tailwind-styled-native.node +0 -0
  149. package/package.json +3 -1
  150. package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
  151. package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
  152. package/dist/index-DQI6O24n.d.mts +0 -464
  153. package/dist/index-NDINUhLN.d.mts +0 -90
  154. package/dist/index-NDINUhLN.d.ts +0 -90
  155. package/dist/index-UkYbyBkR.d.ts +0 -464
  156. package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
  157. package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
  158. package/dist/schemas-DR-SLxZZ.d.mts +0 -59
  159. package/dist/schemas-DR-SLxZZ.d.ts +0 -59
  160. package/dist/trace-Dz4vmZdy.d.mts +0 -96
  161. package/dist/trace-Dz4vmZdy.d.ts +0 -96
  162. package/dist/types-DXr2PmGP.d.mts +0 -31
  163. package/dist/types-DXr2PmGP.d.ts +0 -31
@@ -1 +1 @@
1
- {"version":3,"sources":["../packages/domain/preset/src/defaultPreset.ts","../packages/domain/preset/src/presetExtension.ts"],"names":[],"mappings":";;;;;AAuBA,IAAM,sBAAA,GAAyB;AAAA;AAAA,EAE7B,gCAAA;AAAA,EACA,gCAAA;AAAA,EACA,kCAAA;AAAA,EACA,uCAAA;AAAA;AAAA,EAEA,4BAAA;AAAA,EACA,cAAA;AAAA;AAAA,EAEA;AACF,CAAA;AAMO,IAAM,YAAA,GAAe;AAAA,EAC1B,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,EAAE,OAAA,EAAS,SAAA,EAAW,OAAO,SAAA,EAAW,MAAA,EAAQ,SAAA,EAAW,UA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aAAA,CAAc,OAAA,IAAyB,EAAC,EAAI,GAAI,SAAA,CAAU,OAAA,IAAW,EAAG;AAAA,GACzF;AACF;AAYO,SAAS,YAAA,CACd,MACA,SAAA,EACsB;AACtB,EAAA,MAAM,OAAA,GAAU,IAAA;AAChB,EAAA,MAAM,SAAA,GAAa,OAAA,CAAQ,KAAA,IAAqC,EAAC;AACjE,EAAA,MAAM,UAAA,GAAc,SAAA,CAAU,MAAA,IAAsC,EAAC;AAErE,EAAA,OAAO;AAAA,IACL,GAAG,IAAA;AAAA,IACH,OAAA,EAAS;AAAA,MACP,GAAK,IAAA,CAAK,OAAA,IAAwB,EAAC;AAAA,MACnC,GAAI,SAAA,CAAU,OAAA,IAAW;AAAC,KAC5B;AAAA,IACA,QAAA,EAAU,SAAA,CAAU,QAAA,IAAY,IAAA,CAAK,QAAA;AAAA,IACrC,KAAA,EAAO;AAAA,MACL,GAAG,SAAA;AAAA,MACH,MAAA,EAAQ;AAAA,QACN,GAAG,UAAA;AAAA,QACH,MAAA,EAAQ;AAAA,UACN,GAAI,UAAA,CAAW,MAAA;AAAA,UACf,GAAI,SAAA,CAAU,MAAA,IAAU;AAAC;AAC3B;AACF,KACF;AAAA,IACA,OAAA,EAAS,CAAC,GAAK,IAAA,CAAK,OAAA,IAAyB,EAAC,EAAI,GAAI,SAAA,CAAU,OAAA,IAAW,EAAG;AAAA,GAChF;AACF;AAMO,SAAS,gBAAgB,OAAA,EAA4D;AAC1F,EAAA,OAAO,QAAQ,MAAA,CAAO,CAAC,GAAA,EAAK,MAAA,KAAW,aAAa,GAAA,EAAK;AAAA,IACvD,OAAA,EAAU,MAAA,CAAO,OAAA,IAAwB,EAAC;AAAA,IAC1C,OAAA,EAAU,MAAA,CAAO,OAAA,IAAyB;AAAC,GAC5C,CAAC,CAAA;AACJ","file":"preset.js","sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n","/**\n * Preset extension API — jalur ekspansi untuk custom presets.\n * Dari monorepo checklist: \"Siapkan jalur ekspansi preset tanpa memaksa perubahan compiler besar\"\n *\n * Pattern: buat preset custom dengan extend/merge tanpa menyentuh compiler.\n */\nimport { defaultPreset, designTokens } from \"./defaultPreset\"\n\n// Keep preset typing local so preset does not depend on core-only component contracts.\nexport interface PresetComponentConfig {\n readonly base?: string\n readonly variants?: Record<string, Record<string, string>>\n readonly defaultVariants?: Record<string, string>\n readonly compoundVariants?: Array<{ class: string; [key: string]: string }>\n readonly state?: Record<string, Record<string, string>>\n readonly container?: Record<string, string>\n readonly containerName?: string\n}\n\nexport interface PresetExtension {\n /** Token tambahan (akan di-merge dengan defaultPreset tokens) */\n tokens?: Record<string, string>\n /** Component configs default yang bisa di-override */\n components?: Record<string, PresetComponentConfig>\n /** CSS tambahan yang di-inject setelah @theme default */\n additionalCss?: string\n /** Override dark mode strategy */\n darkMode?: \"class\" | \"media\"\n /** Plugin tambahan untuk Tailwind config */\n plugins?: unknown[]\n /** Extend content paths */\n content?: string[]\n}\n\nexport interface PresetOptions {\n /** Nama preset (untuk debugging) */\n name?: string\n /** Override dark mode dari default */\n darkMode?: \"class\" | \"media\"\n /** Custom content paths (merged dengan default) */\n content?: string[]\n}\n\n/** Buat preset custom dari scratch */\nexport function createPreset(\n extension: PresetExtension,\n opts: PresetOptions = {}\n): typeof defaultPreset {\n const { name = \"custom-preset\", darkMode, content = [] } = opts\n\n const mergedTokens = {\n ...designTokens,\n ...extension.tokens,\n }\n\n const base = defaultPreset as Record<string, unknown>\n const baseTheme = (base.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...defaultPreset,\n darkMode: darkMode ?? defaultPreset.darkMode,\n content: [...(defaultPreset.content as string[]), ...content],\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens\n ? Object.fromEntries(\n Object.entries(extension.tokens).map(([k, v]) => [k, v])\n )\n : {}),\n },\n },\n },\n plugins: [...((defaultPreset.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Extend existing preset dengan tokens/components tambahan.\n * Tidak memerlukan perubahan compiler — semua di Tailwind config layer.\n *\n * @example\n * const myPreset = extendPreset(defaultPreset, {\n * tokens: { \"brand-blue\": \"#1d4ed8\", \"brand-red\": \"#dc2626\" },\n * additionalCss: \".btn { @apply px-4 py-2 rounded; }\",\n * })\n */\nexport function extendPreset(\n base: typeof defaultPreset,\n extension: PresetExtension\n): typeof defaultPreset {\n const baseObj = base as Record<string, unknown>\n const baseTheme = (baseObj.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...base,\n content: [\n ...((base.content as string[]) ?? []),\n ...(extension.content ?? []),\n ],\n darkMode: extension.darkMode ?? base.darkMode,\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens ?? {}),\n },\n },\n },\n plugins: [...((base.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Merge dua atau lebih presets — tokens, plugins, dan content di-merge.\n * Preset terakhir menang untuk keys yang konflik.\n */\nexport function mergePresets(...presets: Array<typeof defaultPreset>): typeof defaultPreset {\n return presets.reduce((acc, preset) => extendPreset(acc, {\n content: (preset.content as string[]) ?? [],\n plugins: (preset.plugins as unknown[]) ?? [],\n }))\n}\n"]}
1
+ {"version":3,"sources":["../src/umbrella/preset.ts","../packages/domain/preset/src/defaultPreset.ts","../packages/domain/preset/src/presetExtension.ts"],"sourcesContent":["export * from \"@tailwind-styled/preset\"\n","/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n","/**\n * Preset extension API — jalur ekspansi untuk custom presets.\n * Dari monorepo checklist: \"Siapkan jalur ekspansi preset tanpa memaksa perubahan compiler besar\"\n *\n * Pattern: buat preset custom dengan extend/merge tanpa menyentuh compiler.\n */\nimport { defaultPreset, designTokens } from \"./defaultPreset\"\n\n// Keep preset typing local so preset does not depend on core-only component contracts.\nexport interface PresetComponentConfig {\n readonly base?: string\n readonly variants?: Record<string, Record<string, string>>\n readonly defaultVariants?: Record<string, string>\n readonly compoundVariants?: Array<{ class: string; [key: string]: string }>\n readonly state?: Record<string, Record<string, string>>\n readonly container?: Record<string, string>\n readonly containerName?: string\n}\n\nexport interface PresetExtension {\n /** Token tambahan (akan di-merge dengan defaultPreset tokens) */\n tokens?: Record<string, string>\n /** Component configs default yang bisa di-override */\n components?: Record<string, PresetComponentConfig>\n /** CSS tambahan yang di-inject setelah @theme default */\n additionalCss?: string\n /** Override dark mode strategy */\n darkMode?: \"class\" | \"media\"\n /** Plugin tambahan untuk Tailwind config */\n plugins?: unknown[]\n /** Extend content paths */\n content?: string[]\n}\n\nexport interface PresetOptions {\n /** Nama preset (untuk debugging) */\n name?: string\n /** Override dark mode dari default */\n darkMode?: \"class\" | \"media\"\n /** Custom content paths (merged dengan default) */\n content?: string[]\n}\n\n/** Buat preset custom dari scratch */\nexport function createPreset(\n extension: PresetExtension,\n opts: PresetOptions = {}\n): typeof defaultPreset {\n const { name = \"custom-preset\", darkMode, content = [] } = opts\n\n const mergedTokens = {\n ...designTokens,\n ...extension.tokens,\n }\n\n const base = defaultPreset as Record<string, unknown>\n const baseTheme = (base.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...defaultPreset,\n darkMode: darkMode ?? defaultPreset.darkMode,\n content: [...(defaultPreset.content as string[]), ...content],\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens\n ? Object.fromEntries(\n Object.entries(extension.tokens).map(([k, v]) => [k, v])\n )\n : {}),\n },\n },\n },\n plugins: [...((defaultPreset.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Extend existing preset dengan tokens/components tambahan.\n * Tidak memerlukan perubahan compiler — semua di Tailwind config layer.\n *\n * @example\n * const myPreset = extendPreset(defaultPreset, {\n * tokens: { \"brand-blue\": \"#1d4ed8\", \"brand-red\": \"#dc2626\" },\n * additionalCss: \".btn { @apply px-4 py-2 rounded; }\",\n * })\n */\nexport function extendPreset(\n base: typeof defaultPreset,\n extension: PresetExtension\n): typeof defaultPreset {\n const baseObj = base as Record<string, unknown>\n const baseTheme = (baseObj.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...base,\n content: [\n ...((base.content as string[]) ?? []),\n ...(extension.content ?? []),\n ],\n darkMode: extension.darkMode ?? base.darkMode,\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens ?? {}),\n },\n },\n },\n plugins: [...((base.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Merge dua atau lebih presets — tokens, plugins, dan content di-merge.\n * Preset terakhir menang untuk keys yang konflik.\n */\nexport function mergePresets(...presets: Array<typeof defaultPreset>): typeof defaultPreset {\n return presets.reduce((acc, preset) => extendPreset(acc, {\n content: (preset.content as string[]) ?? [],\n plugins: (preset.plugins as unknown[]) ?? [],\n }))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACuBA,IAAM,yBAAyB;AAAA;AAAA,EAE7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AACF;AAMO,IAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,IACN,SAAS,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,WAAW,YAAY,UAAU;AAAA,IAC1F,WAAW,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,WAAW,YAAY,UAAU;AAAA,IAC5F,QAAQ,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,WAAW,YAAY,UAAU;AAAA,IACzF,SAAS,EAAE,SAAS,WAAW,YAAY,UAAU;AAAA,IACrD,SAAS,EAAE,SAAS,WAAW,YAAY,UAAU;AAAA,IACrD,QAAQ,EAAE,SAAS,WAAW,YAAY,UAAU;AAAA,IACpD,MAAM,E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;AAAA,MACL,GAAG;AAAA,MACH,QAAQ;AAAA,QACN,GAAG;AAAA,QACH,QAAQ;AAAA,UACN,GAAI,WAAW;AAAA,UACf,GAAI,UAAU,UAAU,CAAC;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS,CAAC,GAAK,KAAK,WAAyB,CAAC,GAAI,GAAI,UAAU,WAAW,CAAC,CAAE;AAAA,EAChF;AACF;AAMO,SAAS,gBAAgB,SAA4D;AAC1F,SAAO,QAAQ,OAAO,CAAC,KAAK,WAAW,aAAa,KAAK;AAAA,IACvD,SAAU,OAAO,WAAwB,CAAC;AAAA,IAC1C,SAAU,OAAO,WAAyB,CAAC;AAAA,EAC7C,CAAC,CAAC;AACJ;","names":[]}
package/dist/preset.mjs CHANGED
@@ -412,10 +412,10 @@ export default {
412
412
  // packages/domain/preset/src/presetExtension.ts
413
413
  function createPreset(extension, opts = {}) {
414
414
  const { name = "custom-preset", darkMode, content = [] } = opts;
415
- ({
415
+ const mergedTokens = {
416
416
  ...designTokens,
417
417
  ...extension.tokens
418
- });
418
+ };
419
419
  const base = defaultPreset;
420
420
  const baseTheme = base.theme ?? {};
421
421
  const baseExtend = baseTheme.extend ?? {};
@@ -468,7 +468,15 @@ function mergePresets(...presets) {
468
468
  plugins: preset.plugins ?? []
469
469
  }));
470
470
  }
471
-
472
- export { createPreset, defaultGlobalCss, defaultPreset, defaultThemeCss, designTokens, extendPreset, generateTailwindConfig, generateTailwindCss, mergePresets };
473
- //# sourceMappingURL=preset.mjs.map
471
+ export {
472
+ createPreset,
473
+ defaultGlobalCss,
474
+ defaultPreset,
475
+ defaultThemeCss,
476
+ designTokens,
477
+ extendPreset,
478
+ generateTailwindConfig,
479
+ generateTailwindCss,
480
+ mergePresets
481
+ };
474
482
  //# sourceMappingURL=preset.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../packages/domain/preset/src/defaultPreset.ts","../packages/domain/preset/src/presetExtension.ts"],"names":[],"mappings":";;;AAuB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A,OAAO,QAAQ,MAAA,CAAO,CAAC,GAAA,EAAK,MAAA,KAAW,aAAa,GAAA,EAAK;AAAA,IACvD,OAAA,EAAU,MAAA,CAAO,OAAA,IAAwB,EAAC;AAAA,IAC1C,OAAA,EAAU,MAAA,CAAO,OAAA,IAAyB;AAAC,GAC5C,CAAC,CAAA;AACJ","file":"preset.mjs","sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n","/**\n * Preset extension API — jalur ekspansi untuk custom presets.\n * Dari monorepo checklist: \"Siapkan jalur ekspansi preset tanpa memaksa perubahan compiler besar\"\n *\n * Pattern: buat preset custom dengan extend/merge tanpa menyentuh compiler.\n */\nimport { defaultPreset, designTokens } from \"./defaultPreset\"\n\n// Keep preset typing local so preset does not depend on core-only component contracts.\nexport interface PresetComponentConfig {\n readonly base?: string\n readonly variants?: Record<string, Record<string, string>>\n readonly defaultVariants?: Record<string, string>\n readonly compoundVariants?: Array<{ class: string; [key: string]: string }>\n readonly state?: Record<string, Record<string, string>>\n readonly container?: Record<string, string>\n readonly containerName?: string\n}\n\nexport interface PresetExtension {\n /** Token tambahan (akan di-merge dengan defaultPreset tokens) */\n tokens?: Record<string, string>\n /** Component configs default yang bisa di-override */\n components?: Record<string, PresetComponentConfig>\n /** CSS tambahan yang di-inject setelah @theme default */\n additionalCss?: string\n /** Override dark mode strategy */\n darkMode?: \"class\" | \"media\"\n /** Plugin tambahan untuk Tailwind config */\n plugins?: unknown[]\n /** Extend content paths */\n content?: string[]\n}\n\nexport interface PresetOptions {\n /** Nama preset (untuk debugging) */\n name?: string\n /** Override dark mode dari default */\n darkMode?: \"class\" | \"media\"\n /** Custom content paths (merged dengan default) */\n content?: string[]\n}\n\n/** Buat preset custom dari scratch */\nexport function createPreset(\n extension: PresetExtension,\n opts: PresetOptions = {}\n): typeof defaultPreset {\n const { name = \"custom-preset\", darkMode, content = [] } = opts\n\n const mergedTokens = {\n ...designTokens,\n ...extension.tokens,\n }\n\n const base = defaultPreset as Record<string, unknown>\n const baseTheme = (base.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...defaultPreset,\n darkMode: darkMode ?? defaultPreset.darkMode,\n content: [...(defaultPreset.content as string[]), ...content],\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens\n ? Object.fromEntries(\n Object.entries(extension.tokens).map(([k, v]) => [k, v])\n )\n : {}),\n },\n },\n },\n plugins: [...((defaultPreset.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Extend existing preset dengan tokens/components tambahan.\n * Tidak memerlukan perubahan compiler — semua di Tailwind config layer.\n *\n * @example\n * const myPreset = extendPreset(defaultPreset, {\n * tokens: { \"brand-blue\": \"#1d4ed8\", \"brand-red\": \"#dc2626\" },\n * additionalCss: \".btn { @apply px-4 py-2 rounded; }\",\n * })\n */\nexport function extendPreset(\n base: typeof defaultPreset,\n extension: PresetExtension\n): typeof defaultPreset {\n const baseObj = base as Record<string, unknown>\n const baseTheme = (baseObj.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...base,\n content: [\n ...((base.content as string[]) ?? []),\n ...(extension.content ?? []),\n ],\n darkMode: extension.darkMode ?? base.darkMode,\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens ?? {}),\n },\n },\n },\n plugins: [...((base.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Merge dua atau lebih presets — tokens, plugins, dan content di-merge.\n * Preset terakhir menang untuk keys yang konflik.\n */\nexport function mergePresets(...presets: Array<typeof defaultPreset>): typeof defaultPreset {\n return presets.reduce((acc, preset) => extendPreset(acc, {\n content: (preset.content as string[]) ?? [],\n plugins: (preset.plugins as unknown[]) ?? [],\n }))\n}\n"]}
1
+ {"version":3,"sources":["../packages/domain/preset/src/defaultPreset.ts","../packages/domain/preset/src/presetExtension.ts"],"sourcesContent":["/**\n * tailwind-styled-v4 — Default Preset\n *\n * Tailwind config built-in yang dipakai ketika developer tidak punya\n * tailwind.config.ts / tailwind.config.js di project mereka.\n *\n * Developer tidak perlu setup apapun:\n * npm install tailwind-styled-v4\n * → langsung bisa tw.div`p-4 bg-blue-500`\n *\n * Preset ini juga menyediakan design tokens yang consistent\n * untuk semua project yang pakai tailwind-styled-v4.\n *\n * Override per-project:\n * // tailwind.config.ts\n * import { defaultPreset } from \"tailwind-styled-v4/preset\"\n * export default { presets: [defaultPreset], theme: { extend: {...} } }\n */\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Content paths — auto-detect berdasarkan project structure\n// ─────────────────────────────────────────────────────────────────────────────\n\nconst STANDARD_CONTENT_PATHS = [\n // Next.js App Router\n \"./src/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./app/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./pages/**/*.{tsx,ts,jsx,js,mdx}\",\n \"./components/**/*.{tsx,ts,jsx,js,mdx}\",\n // Vite / React\n \"./src/**/*.{tsx,ts,jsx,js}\",\n \"./index.html\",\n // Monorepo\n \"../../packages/**/src/**/*.{tsx,ts,jsx,js}\",\n]\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Design tokens — consistent across all tailwind-styled-v4 projects\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const designTokens = {\n colors: {\n primary: { DEFAULT: \"#3b82f6\", hover: \"#2563eb\", active: \"#1d4ed8\", foreground: \"#ffffff\" },\n secondary: { DEFAULT: \"#6366f1\", hover: \"#4f46e5\", active: \"#4338ca\", foreground: \"#ffffff\" },\n accent: { DEFAULT: \"#f59e0b\", hover: \"#d97706\", active: \"#b45309\", foreground: \"#000000\" },\n success: { DEFAULT: \"#10b981\", foreground: \"#ffffff\" },\n warning: { DEFAULT: \"#f59e0b\", foreground: \"#000000\" },\n danger: { DEFAULT: \"#ef4444\", foreground: \"#ffffff\" },\n info: { DEFAULT: \"#3b82f6\", foreground: \"#ffffff\" },\n surface: \"#18181b\",\n border: \"#27272a\",\n muted: \"#71717a\",\n subtle: \"#3f3f46\",\n },\n\n spacing: {\n 1: \"0.25rem\",\n 2: \"0.5rem\",\n 3: \"0.75rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 8: \"2rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 16: \"4rem\",\n },\n\n breakpoints: {\n sm: \"40rem\",\n md: \"48rem\",\n lg: \"64rem\",\n xl: \"80rem\",\n \"2xl\": \"96rem\",\n },\n\n fontWeight: {\n normal: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n },\n\n fontFamily: {\n sans: [\"InterVariable\", \"Inter\", \"system-ui\", \"sans-serif\"],\n mono: [\"JetBrains Mono\", \"Fira Code\", \"Consolas\", \"monospace\"],\n },\n\n borderRadius: {\n sm: \"0.25rem\",\n DEFAULT: \"0.5rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n\n animation: {\n \"fade-in\": \"fadeIn 0.2s ease-out\",\n \"fade-out\": \"fadeOut 0.2s ease-in\",\n \"slide-up\": \"slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"slide-down\": \"slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1)\",\n \"scale-in\": \"scaleIn 0.2s ease-out\",\n },\n\n keyframes: {\n fadeIn: { from: { opacity: \"0\" }, to: { opacity: \"1\" } },\n fadeOut: { from: { opacity: \"1\" }, to: { opacity: \"0\" } },\n slideUp: {\n from: { transform: \"translateY(8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n slideDown: {\n from: { transform: \"translateY(-8px)\", opacity: \"0\" },\n to: { transform: \"translateY(0)\", opacity: \"1\" },\n },\n scaleIn: {\n from: { transform: \"scale(0.95)\", opacity: \"0\" },\n to: { transform: \"scale(1)\", opacity: \"1\" },\n },\n },\n} as const\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Tailwind Config — dipakai sebagai fallback + preset\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultPreset = {\n content: STANDARD_CONTENT_PATHS,\n\n darkMode: \"class\" as const,\n\n theme: {\n extend: {\n colors: designTokens.colors,\n fontFamily: designTokens.fontFamily,\n borderRadius: designTokens.borderRadius,\n animation: designTokens.animation,\n keyframes: designTokens.keyframes,\n },\n },\n\n plugins: [],\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Default Theme CSS — Tailwind v4 @theme block\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultThemeCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config globals.css — tidak perlu @tailwind base dll\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const defaultGlobalCss = `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n/* tailwind-styled-v4 — zero-config base styles */\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nhtml {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n}\n\nbody {\n margin: 0;\n font-family: var(--font-sans, system-ui, sans-serif);\n background: var(--color-surface, #18181b);\n color: var(--color-foreground, #fafafa);\n}\n`\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config Tailwind v4 CSS generator\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindCss(contentPaths = STANDARD_CONTENT_PATHS): string {\n return `@import \"tailwindcss\";\n\n@theme {\n /* colors */\n --color-primary: #3b82f6;\n --color-primary-hover: #2563eb;\n --color-primary-active: #1d4ed8;\n --color-primary-foreground: #ffffff;\n --color-secondary: #6366f1;\n --color-secondary-hover: #4f46e5;\n --color-secondary-active: #4338ca;\n --color-secondary-foreground: #ffffff;\n --color-accent: #f59e0b;\n --color-accent-hover: #d97706;\n --color-accent-active: #b45309;\n --color-accent-foreground: #000000;\n --color-success: #10b981;\n --color-success-foreground: #ffffff;\n --color-warning: #f59e0b;\n --color-warning-foreground: #000000;\n --color-danger: #ef4444;\n --color-danger-foreground: #ffffff;\n --color-info: #3b82f6;\n --color-info-foreground: #ffffff;\n --color-surface: #18181b;\n --color-border: #27272a;\n --color-muted: #71717a;\n --color-subtle: #3f3f46;\n\n /* fonts */\n --font-sans: InterVariable, Inter, system-ui, sans-serif;\n --font-mono: JetBrains Mono, Fira Code, Consolas, monospace;\n\n /* spacing */\n --spacing-1: 0.25rem;\n --spacing-2: 0.5rem;\n --spacing-3: 0.75rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-8: 2rem;\n --spacing-10: 2.5rem;\n --spacing-12: 3rem;\n --spacing-16: 4rem;\n\n /* breakpoints */\n --breakpoint-sm: 40rem;\n --breakpoint-md: 48rem;\n --breakpoint-lg: 64rem;\n --breakpoint-xl: 80rem;\n --breakpoint-2xl: 96rem;\n\n /* border radius */\n --radius-sm: 0.25rem;\n --radius-md: 0.5rem;\n --radius-lg: 0.75rem;\n --radius-xl: 1rem;\n --radius-2xl: 1.5rem;\n --radius-full: 9999px;\n\n /* animations */\n --animate-fade-in: fadeIn 0.2s ease-out;\n --animate-fade-out: fadeOut 0.2s ease-in;\n --animate-slide-up: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-slide-down: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);\n --animate-scale-in: scaleIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes fadeOut {\n from { opacity: 1; }\n to { opacity: 0; }\n}\n@keyframes slideUp {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes slideDown {\n from { transform: translateY(-8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n@keyframes scaleIn {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n@source ${contentPaths.join(\"\\n@source \")}\n`\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Zero-config tailwind.config.ts generator\n// DEPRECATED: Use generateTailwindCss for Tailwind v4 instead\n// Dipakai oleh CLI dan withTailwindStyled saat tidak ada user config\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport function generateTailwindConfig(\n safelistPath = \".tailwind-styled-safelist.json\",\n contentPaths = STANDARD_CONTENT_PATHS\n): string {\n return `import type { Config } from \"tailwindcss\"\nimport { defaultPreset } from \"tailwind-styled-v4/preset\"\n\n// Auto-generated safelist dari tailwind-styled-v4 compiler\nconst safelist = (() => {\n try { return require(${JSON.stringify(safelistPath)}) as string[] }\n catch { return [] }\n})()\n\nexport default {\n presets: [defaultPreset],\n content: ${JSON.stringify(contentPaths, null, 2)},\n safelist,\n} satisfies Config\n`\n}\n","/**\n * Preset extension API — jalur ekspansi untuk custom presets.\n * Dari monorepo checklist: \"Siapkan jalur ekspansi preset tanpa memaksa perubahan compiler besar\"\n *\n * Pattern: buat preset custom dengan extend/merge tanpa menyentuh compiler.\n */\nimport { defaultPreset, designTokens } from \"./defaultPreset\"\n\n// Keep preset typing local so preset does not depend on core-only component contracts.\nexport interface PresetComponentConfig {\n readonly base?: string\n readonly variants?: Record<string, Record<string, string>>\n readonly defaultVariants?: Record<string, string>\n readonly compoundVariants?: Array<{ class: string; [key: string]: string }>\n readonly state?: Record<string, Record<string, string>>\n readonly container?: Record<string, string>\n readonly containerName?: string\n}\n\nexport interface PresetExtension {\n /** Token tambahan (akan di-merge dengan defaultPreset tokens) */\n tokens?: Record<string, string>\n /** Component configs default yang bisa di-override */\n components?: Record<string, PresetComponentConfig>\n /** CSS tambahan yang di-inject setelah @theme default */\n additionalCss?: string\n /** Override dark mode strategy */\n darkMode?: \"class\" | \"media\"\n /** Plugin tambahan untuk Tailwind config */\n plugins?: unknown[]\n /** Extend content paths */\n content?: string[]\n}\n\nexport interface PresetOptions {\n /** Nama preset (untuk debugging) */\n name?: string\n /** Override dark mode dari default */\n darkMode?: \"class\" | \"media\"\n /** Custom content paths (merged dengan default) */\n content?: string[]\n}\n\n/** Buat preset custom dari scratch */\nexport function createPreset(\n extension: PresetExtension,\n opts: PresetOptions = {}\n): typeof defaultPreset {\n const { name = \"custom-preset\", darkMode, content = [] } = opts\n\n const mergedTokens = {\n ...designTokens,\n ...extension.tokens,\n }\n\n const base = defaultPreset as Record<string, unknown>\n const baseTheme = (base.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...defaultPreset,\n darkMode: darkMode ?? defaultPreset.darkMode,\n content: [...(defaultPreset.content as string[]), ...content],\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens\n ? Object.fromEntries(\n Object.entries(extension.tokens).map(([k, v]) => [k, v])\n )\n : {}),\n },\n },\n },\n plugins: [...((defaultPreset.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Extend existing preset dengan tokens/components tambahan.\n * Tidak memerlukan perubahan compiler — semua di Tailwind config layer.\n *\n * @example\n * const myPreset = extendPreset(defaultPreset, {\n * tokens: { \"brand-blue\": \"#1d4ed8\", \"brand-red\": \"#dc2626\" },\n * additionalCss: \".btn { @apply px-4 py-2 rounded; }\",\n * })\n */\nexport function extendPreset(\n base: typeof defaultPreset,\n extension: PresetExtension\n): typeof defaultPreset {\n const baseObj = base as Record<string, unknown>\n const baseTheme = (baseObj.theme as Record<string, unknown>) ?? {}\n const baseExtend = (baseTheme.extend as Record<string, unknown>) ?? {}\n\n return {\n ...base,\n content: [\n ...((base.content as string[]) ?? []),\n ...(extension.content ?? []),\n ],\n darkMode: extension.darkMode ?? base.darkMode,\n theme: {\n ...baseTheme,\n extend: {\n ...baseExtend,\n colors: {\n ...(baseExtend.colors as Record<string, unknown>),\n ...(extension.tokens ?? {}),\n },\n },\n },\n plugins: [...((base.plugins as unknown[]) ?? []), ...(extension.plugins ?? [])],\n } as typeof defaultPreset\n}\n\n/**\n * Merge dua atau lebih presets — tokens, plugins, dan content di-merge.\n * Preset terakhir menang untuk keys yang konflik.\n */\nexport function mergePresets(...presets: Array<typeof defaultPreset>): typeof defaultPreset {\n return presets.reduce((acc, preset) => extendPreset(acc, {\n content: (preset.content as string[]) ?? [],\n plugins: (preset.plugins as unknown[]) ?? [],\n }))\n}\n"],"mappings":";;;AAuBA,IAAM,yBAAyB;AAAA;AAAA,EAE7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA;AAAA,EAEA;AACF;AAMO,IAAM,eAAe;AAAA,EAC1B,QAAQ;AAAA,IACN,SAAS,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,WAAW,YAAY,UAAU;AAAA,IAC1F,WAAW,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,WAAW,YAAY,UAAU;AAAA,IAC5F,QAAQ,EAAE,SAAS,WAAW,OAAO,WAAW,QAAQ,W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AErE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAK,KAAK,WAAwB,CAAC;AAAA,MACnC,GAAI,UAAU,WAAW,CAAC;AAAA,IAC5B;AAAA,IACA,UAAU,UAAU,YAAY,KAAK;AAAA,IACrC,OAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ;AAAA,QACN,GAAG;AAAA,QACH,QAAQ;AAAA,UACN,GAAI,WAAW;AAAA,UACf,GAAI,UAAU,UAAU,CAAC;AAAA,QAC3B;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS,CAAC,GAAK,KAAK,WAAyB,CAAC,GAAI,GAAI,UAAU,WAAW,CAAC,CAAE;AAAA,EAChF;AACF;AAMO,SAAS,gBAAgB,SAA4D;AAC1F,SAAO,QAAQ,OAAO,CAAC,KAAK,WAAW,aAAa,KAAK;AAAA,IACvD,SAAU,OAAO,WAAwB,CAAC;AAAA,IAC1C,SAAU,OAAO,WAAyB,CAAC;AAAA,EAC7C,CAAC,CAAC;AACJ;","names":[]}
package/dist/rspack.js CHANGED
@@ -1,36 +1,42 @@
1
- 'use strict';
2
-
3
- require('crypto');
4
- var fs2 = require('fs');
5
- var path2 = require('path');
6
- require('url');
7
- var module$1 = require('module');
8
- var zod = require('zod');
9
-
10
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var fs2__default = /*#__PURE__*/_interopDefault(fs2);
14
- var path2__default = /*#__PURE__*/_interopDefault(path2);
15
-
16
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
18
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
19
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
20
- }) : x)(function(x) {
21
- if (typeof require !== "undefined") return require.apply(this, arguments);
22
- throw Error('Dynamic require of "' + x + '" is not supported');
23
- });
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
24
9
  var __esm = (fn, res) => function __init() {
25
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
26
11
  };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
33
 
28
34
  // packages/domain/shared/src/esmHelpers.ts
29
35
  function getNodeModuleRef() {
30
36
  if (isBrowser) return null;
31
37
  if (nodeModuleRef !== null) return nodeModuleRef;
32
38
  try {
33
- const test = typeof __require === "function" ? __require("module") : null;
39
+ const test = typeof require === "function" ? require("module") : null;
34
40
  nodeModuleRef = test;
35
41
  return test;
36
42
  } catch {
@@ -42,14 +48,14 @@ function getNodePath() {
42
48
  if (isBrowser) throw new Error("node:path not available in browser");
43
49
  const nodeRequire = getNodeModuleRef();
44
50
  if (!nodeRequire) throw new Error("require not available");
45
- if (!_nodePath) _nodePath = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href)))("node:path");
51
+ if (!_nodePath) _nodePath = nodeRequire.createRequire(import_meta.url)("node:path");
46
52
  return _nodePath;
47
53
  }
48
54
  function getNodeUrl() {
49
55
  if (isBrowser) throw new Error("node:url not available in browser");
50
56
  const nodeRequire = getNodeModuleRef();
51
57
  if (!nodeRequire) throw new Error("require not available");
52
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href)))("node:url");
58
+ if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import_meta.url)("node:url");
53
59
  return _nodeUrl;
54
60
  }
55
61
  function getDirname(importMetaUrl) {
@@ -58,25 +64,36 @@ function getDirname(importMetaUrl) {
58
64
  const nodeUrl = getNodeUrl();
59
65
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
60
66
  }
61
- var isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
67
+ var import_meta, isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
62
68
  var init_esmHelpers = __esm({
63
69
  "packages/domain/shared/src/esmHelpers.ts"() {
70
+ "use strict";
71
+ import_meta = {};
64
72
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
65
73
  nodeModuleRef = null;
66
74
  _nodePath = null;
67
75
  _nodeUrl = null;
68
76
  }
69
77
  });
78
+
79
+ // packages/domain/shared/src/index.ts
70
80
  function formatIssuePath(path3) {
71
81
  if (!path3 || path3.length === 0) return "(root)";
72
82
  return path3.map(
73
83
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
74
84
  ).join(".");
75
85
  }
76
- var TwError;
86
+ var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module, import_meta2, TwError, _require;
77
87
  var init_src = __esm({
78
88
  "packages/domain/shared/src/index.ts"() {
89
+ "use strict";
90
+ import_node_crypto = require("crypto");
91
+ import_node_fs = __toESM(require("fs"));
92
+ import_node_path = __toESM(require("path"));
93
+ import_node_url = require("url");
94
+ import_node_module = require("module");
79
95
  init_esmHelpers();
96
+ import_meta2 = {};
80
97
  TwError = class _TwError extends Error {
81
98
  /** @deprecated Gunakan source */
82
99
  domain;
@@ -129,14 +146,27 @@ var init_src = __esm({
129
146
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
130
147
  }
131
148
  };
132
- module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href)));
149
+ _require = (0, import_node_module.createRequire)(import_meta2.url);
133
150
  }
134
151
  });
135
152
 
153
+ // src/umbrella/rspack.ts
154
+ var rspack_exports = {};
155
+ __export(rspack_exports, {
156
+ RspackPluginOptionsSchema: () => RspackPluginOptionsSchema,
157
+ TailwindStyledRspackPlugin: () => TailwindStyledRspackPlugin,
158
+ parseRspackPluginOptions: () => parseRspackPluginOptions,
159
+ tailwindStyledRspackPlugin: () => tailwindStyledRspackPlugin
160
+ });
161
+ module.exports = __toCommonJS(rspack_exports);
162
+
136
163
  // packages/presentation/rspack/src/index.ts
164
+ var import_node_fs2 = __toESM(require("fs"), 1);
165
+ var import_node_path2 = __toESM(require("path"), 1);
137
166
  init_src();
138
167
 
139
168
  // packages/presentation/rspack/src/schemas.ts
169
+ var import_zod = require("zod");
140
170
  init_src();
141
171
  var formatIssuePath2 = (path3) => path3.length > 0 ? path3.map(
142
172
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
@@ -156,24 +186,25 @@ var parseWithSchema = (schema, data, label) => {
156
186
  parsed.error
157
187
  );
158
188
  };
159
- var RspackPluginOptionsSchema = zod.z.object({
160
- include: zod.z.instanceof(RegExp).optional(),
161
- exclude: zod.z.instanceof(RegExp).optional(),
162
- addDataAttr: zod.z.boolean().optional(),
163
- analyze: zod.z.boolean().optional(),
164
- cssEntry: zod.z.string().optional(),
189
+ var RspackPluginOptionsSchema = import_zod.z.object({
190
+ include: import_zod.z.instanceof(RegExp).optional(),
191
+ exclude: import_zod.z.instanceof(RegExp).optional(),
192
+ addDataAttr: import_zod.z.boolean().optional(),
193
+ analyze: import_zod.z.boolean().optional(),
194
+ cssEntry: import_zod.z.string().optional(),
165
195
  /** Path ke safelist CSS file. Default: <cwd>/__tw_safelist.css */
166
- safelistPath: zod.z.string().optional()
196
+ safelistPath: import_zod.z.string().optional()
167
197
  });
168
198
  var parseRspackPluginOptions = (options) => parseWithSchema(RspackPluginOptionsSchema, options ?? {}, "rspack plugin options are invalid");
169
199
 
170
200
  // packages/presentation/rspack/src/index.ts
201
+ var import_meta3 = {};
171
202
  function getDirname2() {
172
203
  if (typeof __dirname !== "undefined") {
173
204
  return __dirname;
174
205
  }
175
- if (typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href)) }) !== "undefined" && (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href))) {
176
- return getDirname((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('rspack.js', document.baseURI).href)));
206
+ if (typeof import_meta3 !== "undefined" && import_meta3.url) {
207
+ return getDirname(import_meta3.url);
177
208
  }
178
209
  return process.cwd();
179
210
  }
@@ -181,10 +212,10 @@ function resolveLoaderPath(basename) {
181
212
  const runtimeDir = getDirname2();
182
213
  const preferredExtensions = typeof __dirname !== "undefined" && __dirname.length > 0 ? [".cjs", ".js"] : [".js", ".cjs"];
183
214
  for (const ext of preferredExtensions) {
184
- const candidate = path2__default.default.resolve(runtimeDir, `${basename}${ext}`);
185
- if (fs2__default.default.existsSync(candidate)) return candidate;
215
+ const candidate = import_node_path2.default.resolve(runtimeDir, `${basename}${ext}`);
216
+ if (import_node_fs2.default.existsSync(candidate)) return candidate;
186
217
  }
187
- return path2__default.default.resolve(runtimeDir, `${basename}.js`);
218
+ return import_node_path2.default.resolve(runtimeDir, `${basename}.js`);
188
219
  }
189
220
  var TailwindStyledRspackPlugin = class {
190
221
  opts;
@@ -199,12 +230,12 @@ var TailwindStyledRspackPlugin = class {
199
230
  (rule2) => typeof rule2 === "object" && rule2 !== null && rule2._tailwindStyledRspackMarker === true
200
231
  );
201
232
  if (alreadyRegistered) return;
202
- const safelistPath = this.opts.safelistPath ?? path2__default.default.join(process.cwd(), "__tw_safelist.css");
203
- const stateStaticPath = path2__default.default.join(path2__default.default.dirname(safelistPath), "_tw-state-static.css");
204
- if (!fs2__default.default.existsSync(stateStaticPath)) {
233
+ const safelistPath = this.opts.safelistPath ?? import_node_path2.default.join(process.cwd(), "__tw_safelist.css");
234
+ const stateStaticPath = import_node_path2.default.join(import_node_path2.default.dirname(safelistPath), "_tw-state-static.css");
235
+ if (!import_node_fs2.default.existsSync(stateStaticPath)) {
205
236
  try {
206
- fs2__default.default.mkdirSync(path2__default.default.dirname(stateStaticPath), { recursive: true });
207
- fs2__default.default.writeFileSync(
237
+ import_node_fs2.default.mkdirSync(import_node_path2.default.dirname(stateStaticPath), { recursive: true });
238
+ import_node_fs2.default.writeFileSync(
208
239
  stateStaticPath,
209
240
  `/* _tw-state-static.css \u2014 Auto-generated by tailwind-styled-v4. DO NOT EDIT.
210
241
  * Import di CSS entry: @import "./_tw-state-static.css";
@@ -240,10 +271,11 @@ var TailwindStyledRspackPlugin = class {
240
271
  function tailwindStyledRspackPlugin(opts = {}) {
241
272
  return new TailwindStyledRspackPlugin(opts);
242
273
  }
243
-
244
- exports.RspackPluginOptionsSchema = RspackPluginOptionsSchema;
245
- exports.TailwindStyledRspackPlugin = TailwindStyledRspackPlugin;
246
- exports.parseRspackPluginOptions = parseRspackPluginOptions;
247
- exports.tailwindStyledRspackPlugin = tailwindStyledRspackPlugin;
248
- //# sourceMappingURL=rspack.js.map
274
+ // Annotate the CommonJS export names for ESM import in node:
275
+ 0 && (module.exports = {
276
+ RspackPluginOptionsSchema,
277
+ TailwindStyledRspackPlugin,
278
+ parseRspackPluginOptions,
279
+ tailwindStyledRspackPlugin
280
+ });
249
281
  //# sourceMappingURL=rspack.js.map