@bookklik/senangstart-css 0.1.8 → 0.2.3

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 (350) hide show
  1. package/README.md +38 -0
  2. package/dist/senangstart-css.js +2346 -1955
  3. package/dist/senangstart-css.min.js +143 -1479
  4. package/docs/.vitepress/config.js +9 -4
  5. package/docs/SYNTAX-REFERENCE.md +1590 -1555
  6. package/docs/guide/responsive.md +25 -0
  7. package/docs/index.md +7 -1
  8. package/docs/ms/guide/responsive.md +25 -0
  9. package/docs/ms/index.md +7 -1
  10. package/docs/ms/reference/breakpoints.md +23 -0
  11. package/docs/ms/reference/layout/align-content.md +57 -4
  12. package/docs/ms/reference/layout/align-items.md +81 -4
  13. package/docs/ms/reference/layout/align-self.md +25 -4
  14. package/docs/ms/reference/layout/aspect-ratio.md +27 -8
  15. package/docs/ms/reference/layout/border-collapse.md +81 -4
  16. package/docs/ms/reference/layout/border-spacing.md +43 -8
  17. package/docs/ms/reference/layout/box-sizing.md +21 -4
  18. package/docs/ms/reference/layout/caption-side.md +69 -4
  19. package/docs/ms/reference/layout/columns.md +21 -4
  20. package/docs/ms/reference/layout/container.md +21 -4
  21. package/docs/ms/reference/layout/display.md +39 -7
  22. package/docs/ms/reference/layout/flex-basis.md +29 -8
  23. package/docs/ms/reference/layout/flex-direction.md +81 -4
  24. package/docs/ms/reference/layout/flex-items.md +51 -4
  25. package/docs/ms/reference/layout/flex-wrap.md +55 -4
  26. package/docs/ms/reference/layout/flex.md +54 -7
  27. package/docs/ms/reference/layout/float-clear.md +23 -4
  28. package/docs/ms/reference/layout/grid-auto-flow.md +57 -4
  29. package/docs/ms/reference/layout/grid-auto-sizing.md +25 -4
  30. package/docs/ms/reference/layout/grid-column-span.md +59 -4
  31. package/docs/ms/reference/layout/grid-columns.md +61 -4
  32. package/docs/ms/reference/layout/grid-row-span.md +29 -4
  33. package/docs/ms/reference/layout/grid-rows.md +31 -4
  34. package/docs/ms/reference/layout/inset.md +56 -7
  35. package/docs/ms/reference/layout/isolation.md +21 -4
  36. package/docs/ms/reference/layout/justify-content.md +81 -4
  37. package/docs/ms/reference/layout/justify-items.md +25 -4
  38. package/docs/ms/reference/layout/justify-self.md +25 -4
  39. package/docs/ms/reference/layout/object-fit.md +57 -4
  40. package/docs/ms/reference/layout/object-position.md +29 -8
  41. package/docs/ms/reference/layout/order.md +53 -4
  42. package/docs/ms/reference/layout/overflow.md +45 -4
  43. package/docs/ms/reference/layout/overscroll.md +21 -4
  44. package/docs/ms/reference/layout/place-content.md +23 -4
  45. package/docs/ms/reference/layout/place-items.md +25 -4
  46. package/docs/ms/reference/layout/place-self.md +25 -4
  47. package/docs/ms/reference/layout/position.md +47 -4
  48. package/docs/ms/reference/layout/shorthand-alignment.md +47 -4
  49. package/docs/ms/reference/layout/table-layout.md +69 -4
  50. package/docs/ms/reference/layout/visibility.md +25 -4
  51. package/docs/ms/reference/layout/z-index.md +27 -4
  52. package/docs/ms/reference/space/gap.md +71 -7
  53. package/docs/ms/reference/space/height.md +61 -7
  54. package/docs/ms/reference/space/margin.md +61 -7
  55. package/docs/ms/reference/space/padding.md +65 -7
  56. package/docs/ms/reference/space/width.md +61 -7
  57. package/docs/ms/reference/visual/accent-color.md +29 -8
  58. package/docs/ms/reference/visual/animation-builtin.md +29 -8
  59. package/docs/ms/reference/visual/animation-delay.md +27 -8
  60. package/docs/ms/reference/visual/animation-direction.md +25 -4
  61. package/docs/ms/reference/visual/animation-duration.md +27 -8
  62. package/docs/ms/reference/visual/animation-fill.md +49 -4
  63. package/docs/ms/reference/visual/animation-iteration.md +23 -4
  64. package/docs/ms/reference/visual/animation-play.md +23 -4
  65. package/docs/ms/reference/visual/appearance.md +23 -4
  66. package/docs/ms/reference/visual/backdrop-blur.md +29 -8
  67. package/docs/ms/reference/visual/backdrop-brightness.md +29 -8
  68. package/docs/ms/reference/visual/backdrop-contrast.md +29 -8
  69. package/docs/ms/reference/visual/backdrop-grayscale.md +27 -8
  70. package/docs/ms/reference/visual/backdrop-hue-rotate.md +29 -8
  71. package/docs/ms/reference/visual/backdrop-invert.md +27 -8
  72. package/docs/ms/reference/visual/backdrop-opacity.md +29 -8
  73. package/docs/ms/reference/visual/backdrop-saturate.md +29 -8
  74. package/docs/ms/reference/visual/backdrop-sepia.md +27 -8
  75. package/docs/ms/reference/visual/background-attachment.md +23 -4
  76. package/docs/ms/reference/visual/background-blend-mode.md +25 -4
  77. package/docs/ms/reference/visual/background-clip.md +21 -4
  78. package/docs/ms/reference/visual/background-color.md +33 -8
  79. package/docs/ms/reference/visual/background-image.md +27 -8
  80. package/docs/ms/reference/visual/background-origin.md +25 -4
  81. package/docs/ms/reference/visual/background-position.md +29 -8
  82. package/docs/ms/reference/visual/background-repeat.md +25 -4
  83. package/docs/ms/reference/visual/background-size.md +29 -8
  84. package/docs/ms/reference/visual/blend-modes.md +23 -4
  85. package/docs/ms/reference/visual/border-radius.md +36 -4
  86. package/docs/ms/reference/visual/border-style.md +25 -4
  87. package/docs/ms/reference/visual/border-width.md +29 -8
  88. package/docs/ms/reference/visual/border.md +56 -7
  89. package/docs/ms/reference/visual/box-shadow.md +34 -4
  90. package/docs/ms/reference/visual/caret-color.md +25 -8
  91. package/docs/ms/reference/visual/color-scheme.md +23 -4
  92. package/docs/ms/reference/visual/cursor.md +25 -4
  93. package/docs/ms/reference/visual/field-sizing.md +23 -4
  94. package/docs/ms/reference/visual/fill.md +29 -8
  95. package/docs/ms/reference/visual/filter-blur.md +29 -8
  96. package/docs/ms/reference/visual/filter-brightness.md +29 -8
  97. package/docs/ms/reference/visual/filter-contrast.md +29 -8
  98. package/docs/ms/reference/visual/filter-drop-shadow.md +29 -8
  99. package/docs/ms/reference/visual/filter-grayscale.md +29 -8
  100. package/docs/ms/reference/visual/filter-hue-rotate.md +29 -8
  101. package/docs/ms/reference/visual/filter-invert.md +27 -8
  102. package/docs/ms/reference/visual/filter-saturate.md +29 -8
  103. package/docs/ms/reference/visual/filter-sepia.md +29 -8
  104. package/docs/ms/reference/visual/font-family.md +25 -4
  105. package/docs/ms/reference/visual/font-smoothing.md +23 -4
  106. package/docs/ms/reference/visual/font-style.md +23 -4
  107. package/docs/ms/reference/visual/font-variant-numeric.md +25 -4
  108. package/docs/ms/reference/visual/font-weight.md +35 -4
  109. package/docs/ms/reference/visual/forced-color-adjust.md +23 -4
  110. package/docs/ms/reference/visual/hyphens.md +25 -4
  111. package/docs/ms/reference/visual/letter-spacing.md +29 -8
  112. package/docs/ms/reference/visual/line-clamp.md +29 -8
  113. package/docs/ms/reference/visual/line-height.md +29 -8
  114. package/docs/ms/reference/visual/list-style.md +25 -4
  115. package/docs/ms/reference/visual/mask.md +29 -8
  116. package/docs/ms/reference/visual/opacity.md +27 -4
  117. package/docs/ms/reference/visual/outline.md +25 -8
  118. package/docs/ms/reference/visual/pointer-events.md +23 -4
  119. package/docs/ms/reference/visual/resize.md +27 -4
  120. package/docs/ms/reference/visual/scroll-behavior.md +23 -4
  121. package/docs/ms/reference/visual/scroll-margin.md +25 -8
  122. package/docs/ms/reference/visual/scroll-padding.md +25 -8
  123. package/docs/ms/reference/visual/scroll-snap-align.md +25 -4
  124. package/docs/ms/reference/visual/scroll-snap-stop.md +23 -4
  125. package/docs/ms/reference/visual/scroll-snap-type.md +25 -4
  126. package/docs/ms/reference/visual/state-prefixes.md +23 -4
  127. package/docs/ms/reference/visual/stroke-width.md +29 -8
  128. package/docs/ms/reference/visual/stroke.md +27 -8
  129. package/docs/ms/reference/visual/text-alignment.md +25 -4
  130. package/docs/ms/reference/visual/text-color.md +31 -8
  131. package/docs/ms/reference/visual/text-decoration.md +25 -4
  132. package/docs/ms/reference/visual/text-indent.md +29 -8
  133. package/docs/ms/reference/visual/text-overflow.md +23 -4
  134. package/docs/ms/reference/visual/text-shadow.md +31 -8
  135. package/docs/ms/reference/visual/text-size.md +84 -32
  136. package/docs/ms/reference/visual/text-transform.md +25 -4
  137. package/docs/ms/reference/visual/text-wrap.md +25 -4
  138. package/docs/ms/reference/visual/touch-action.md +25 -4
  139. package/docs/ms/reference/visual/transform-backface.md +45 -6
  140. package/docs/ms/reference/visual/transform-origin.md +27 -8
  141. package/docs/ms/reference/visual/transform-perspective-origin.md +61 -10
  142. package/docs/ms/reference/visual/transform-perspective.md +61 -10
  143. package/docs/ms/reference/visual/transform-rotate-3d.md +93 -0
  144. package/docs/ms/reference/visual/transform-rotate.md +29 -8
  145. package/docs/ms/reference/visual/transform-scale.md +29 -8
  146. package/docs/ms/reference/visual/transform-skew.md +29 -8
  147. package/docs/ms/reference/visual/transform-style.md +47 -8
  148. package/docs/ms/reference/visual/transform-translate-z.md +90 -0
  149. package/docs/ms/reference/visual/transform-translate.md +60 -13
  150. package/docs/ms/reference/visual/transition-delay.md +27 -8
  151. package/docs/ms/reference/visual/transition-duration.md +27 -8
  152. package/docs/ms/reference/visual/transition-property.md +21 -4
  153. package/docs/ms/reference/visual/transition-timing.md +29 -8
  154. package/docs/ms/reference/visual/typography-keywords.md +27 -4
  155. package/docs/ms/reference/visual/user-select.md +23 -4
  156. package/docs/ms/reference/visual/vertical-align.md +27 -4
  157. package/docs/ms/reference/visual/whitespace.md +25 -4
  158. package/docs/ms/reference/visual/will-change.md +23 -4
  159. package/docs/ms/reference/visual/word-break.md +25 -4
  160. package/docs/public/assets/senangstart-css-logo.svg +1 -0
  161. package/docs/public/assets/ss-logo.svg +83 -0
  162. package/docs/reference/breakpoints.md +23 -0
  163. package/docs/reference/layout/align-content.md +57 -4
  164. package/docs/reference/layout/align-items.md +81 -4
  165. package/docs/reference/layout/align-self.md +25 -4
  166. package/docs/reference/layout/aspect-ratio.md +27 -8
  167. package/docs/reference/layout/border-collapse.md +81 -4
  168. package/docs/reference/layout/border-spacing.md +43 -8
  169. package/docs/reference/layout/box-sizing.md +21 -4
  170. package/docs/reference/layout/caption-side.md +69 -4
  171. package/docs/reference/layout/columns.md +21 -4
  172. package/docs/reference/layout/container.md +21 -4
  173. package/docs/reference/layout/display.md +39 -7
  174. package/docs/reference/layout/flex-basis.md +29 -8
  175. package/docs/reference/layout/flex-direction.md +81 -4
  176. package/docs/reference/layout/flex-items.md +51 -4
  177. package/docs/reference/layout/flex-wrap.md +55 -4
  178. package/docs/reference/layout/flex.md +54 -7
  179. package/docs/reference/layout/float-clear.md +23 -4
  180. package/docs/reference/layout/grid-auto-flow.md +57 -4
  181. package/docs/reference/layout/grid-auto-sizing.md +25 -4
  182. package/docs/reference/layout/grid-column-span.md +59 -4
  183. package/docs/reference/layout/grid-columns.md +61 -4
  184. package/docs/reference/layout/grid-row-span.md +29 -4
  185. package/docs/reference/layout/grid-rows.md +31 -4
  186. package/docs/reference/layout/inset.md +56 -7
  187. package/docs/reference/layout/isolation.md +21 -4
  188. package/docs/reference/layout/justify-content.md +81 -4
  189. package/docs/reference/layout/justify-items.md +25 -4
  190. package/docs/reference/layout/justify-self.md +25 -4
  191. package/docs/reference/layout/object-fit.md +57 -4
  192. package/docs/reference/layout/object-position.md +29 -8
  193. package/docs/reference/layout/order.md +53 -4
  194. package/docs/reference/layout/overflow.md +45 -4
  195. package/docs/reference/layout/overscroll.md +21 -4
  196. package/docs/reference/layout/place-content.md +23 -4
  197. package/docs/reference/layout/place-items.md +25 -4
  198. package/docs/reference/layout/place-self.md +25 -4
  199. package/docs/reference/layout/position.md +47 -4
  200. package/docs/reference/layout/shorthand-alignment.md +47 -4
  201. package/docs/reference/layout/table-layout.md +69 -4
  202. package/docs/reference/layout/visibility.md +25 -4
  203. package/docs/reference/layout/z-index.md +27 -4
  204. package/docs/reference/space/gap.md +71 -7
  205. package/docs/reference/space/height.md +61 -7
  206. package/docs/reference/space/margin.md +61 -7
  207. package/docs/reference/space/padding.md +65 -7
  208. package/docs/reference/space/width.md +61 -7
  209. package/docs/reference/visual/accent-color.md +29 -8
  210. package/docs/reference/visual/animation-builtin.md +29 -8
  211. package/docs/reference/visual/animation-delay.md +27 -8
  212. package/docs/reference/visual/animation-direction.md +25 -4
  213. package/docs/reference/visual/animation-duration.md +27 -8
  214. package/docs/reference/visual/animation-fill.md +49 -4
  215. package/docs/reference/visual/animation-iteration.md +23 -4
  216. package/docs/reference/visual/animation-play.md +23 -4
  217. package/docs/reference/visual/appearance.md +23 -4
  218. package/docs/reference/visual/backdrop-blur.md +29 -8
  219. package/docs/reference/visual/backdrop-brightness.md +29 -8
  220. package/docs/reference/visual/backdrop-contrast.md +29 -8
  221. package/docs/reference/visual/backdrop-grayscale.md +27 -8
  222. package/docs/reference/visual/backdrop-hue-rotate.md +29 -8
  223. package/docs/reference/visual/backdrop-invert.md +27 -8
  224. package/docs/reference/visual/backdrop-opacity.md +29 -8
  225. package/docs/reference/visual/backdrop-saturate.md +29 -8
  226. package/docs/reference/visual/backdrop-sepia.md +27 -8
  227. package/docs/reference/visual/background-attachment.md +23 -4
  228. package/docs/reference/visual/background-blend-mode.md +25 -4
  229. package/docs/reference/visual/background-clip.md +21 -4
  230. package/docs/reference/visual/background-color.md +33 -8
  231. package/docs/reference/visual/background-image.md +27 -8
  232. package/docs/reference/visual/background-origin.md +25 -4
  233. package/docs/reference/visual/background-position.md +29 -8
  234. package/docs/reference/visual/background-repeat.md +25 -4
  235. package/docs/reference/visual/background-size.md +29 -8
  236. package/docs/reference/visual/blend-modes.md +23 -4
  237. package/docs/reference/visual/border-radius.md +36 -4
  238. package/docs/reference/visual/border-style.md +25 -4
  239. package/docs/reference/visual/border-width.md +29 -8
  240. package/docs/reference/visual/border.md +56 -7
  241. package/docs/reference/visual/box-shadow.md +34 -4
  242. package/docs/reference/visual/caret-color.md +25 -8
  243. package/docs/reference/visual/color-scheme.md +23 -4
  244. package/docs/reference/visual/cursor.md +25 -4
  245. package/docs/reference/visual/field-sizing.md +23 -4
  246. package/docs/reference/visual/fill.md +29 -8
  247. package/docs/reference/visual/filter-blur.md +29 -8
  248. package/docs/reference/visual/filter-brightness.md +29 -8
  249. package/docs/reference/visual/filter-contrast.md +29 -8
  250. package/docs/reference/visual/filter-drop-shadow.md +29 -8
  251. package/docs/reference/visual/filter-grayscale.md +29 -8
  252. package/docs/reference/visual/filter-hue-rotate.md +29 -8
  253. package/docs/reference/visual/filter-invert.md +27 -8
  254. package/docs/reference/visual/filter-saturate.md +29 -8
  255. package/docs/reference/visual/filter-sepia.md +29 -8
  256. package/docs/reference/visual/font-family.md +25 -4
  257. package/docs/reference/visual/font-smoothing.md +23 -4
  258. package/docs/reference/visual/font-style.md +23 -4
  259. package/docs/reference/visual/font-variant-numeric.md +25 -4
  260. package/docs/reference/visual/font-weight.md +35 -4
  261. package/docs/reference/visual/forced-color-adjust.md +23 -4
  262. package/docs/reference/visual/hyphens.md +25 -4
  263. package/docs/reference/visual/letter-spacing.md +29 -8
  264. package/docs/reference/visual/line-clamp.md +29 -8
  265. package/docs/reference/visual/line-height.md +29 -8
  266. package/docs/reference/visual/list-style.md +25 -4
  267. package/docs/reference/visual/mask.md +29 -8
  268. package/docs/reference/visual/opacity.md +27 -4
  269. package/docs/reference/visual/outline.md +25 -8
  270. package/docs/reference/visual/pointer-events.md +23 -4
  271. package/docs/reference/visual/resize.md +27 -4
  272. package/docs/reference/visual/scroll-behavior.md +23 -4
  273. package/docs/reference/visual/scroll-margin.md +25 -8
  274. package/docs/reference/visual/scroll-padding.md +25 -8
  275. package/docs/reference/visual/scroll-snap-align.md +25 -4
  276. package/docs/reference/visual/scroll-snap-stop.md +23 -4
  277. package/docs/reference/visual/scroll-snap-type.md +25 -4
  278. package/docs/reference/visual/state-prefixes.md +23 -4
  279. package/docs/reference/visual/stroke-width.md +29 -8
  280. package/docs/reference/visual/stroke.md +27 -8
  281. package/docs/reference/visual/text-alignment.md +25 -4
  282. package/docs/reference/visual/text-color.md +31 -8
  283. package/docs/reference/visual/text-decoration.md +25 -4
  284. package/docs/reference/visual/text-indent.md +29 -8
  285. package/docs/reference/visual/text-overflow.md +23 -4
  286. package/docs/reference/visual/text-shadow.md +31 -8
  287. package/docs/reference/visual/text-size.md +84 -32
  288. package/docs/reference/visual/text-transform.md +25 -4
  289. package/docs/reference/visual/text-wrap.md +25 -4
  290. package/docs/reference/visual/touch-action.md +25 -4
  291. package/docs/reference/visual/transform-backface.md +45 -6
  292. package/docs/reference/visual/transform-origin.md +27 -8
  293. package/docs/reference/visual/transform-perspective-origin.md +61 -10
  294. package/docs/reference/visual/transform-perspective.md +61 -10
  295. package/docs/reference/visual/transform-rotate-3d.md +93 -0
  296. package/docs/reference/visual/transform-rotate.md +29 -8
  297. package/docs/reference/visual/transform-scale.md +29 -8
  298. package/docs/reference/visual/transform-skew.md +29 -8
  299. package/docs/reference/visual/transform-style.md +47 -8
  300. package/docs/reference/visual/transform-translate-z.md +90 -0
  301. package/docs/reference/visual/transform-translate.md +60 -13
  302. package/docs/reference/visual/transition-delay.md +27 -8
  303. package/docs/reference/visual/transition-duration.md +27 -8
  304. package/docs/reference/visual/transition-property.md +21 -4
  305. package/docs/reference/visual/transition-timing.md +29 -8
  306. package/docs/reference/visual/typography-keywords.md +27 -4
  307. package/docs/reference/visual/user-select.md +23 -4
  308. package/docs/reference/visual/vertical-align.md +27 -4
  309. package/docs/reference/visual/whitespace.md +25 -4
  310. package/docs/reference/visual/will-change.md +23 -4
  311. package/docs/reference/visual/word-break.md +25 -4
  312. package/docs/syntax-reference.json +2009 -1972
  313. package/package.json +3 -2
  314. package/playground/index.html +37 -38
  315. package/playground/jit-tw-mix-test.html +238 -0
  316. package/playground/sample_code.txt +23 -0
  317. package/playground/tw-convertor.html +696 -0
  318. package/scripts/build-dist.js +34 -29
  319. package/scripts/bundle-jit.js +45 -0
  320. package/scripts/convert-tailwind.js +759 -0
  321. package/scripts/generate-docs.js +74 -23
  322. package/src/cdn/jit.js +364 -109
  323. package/src/cli/commands/build.js +14 -6
  324. package/src/cli/commands/dev.js +28 -10
  325. package/src/compiler/generators/css.js +211 -30
  326. package/src/compiler/parser.js +23 -10
  327. package/src/compiler/tokenizer.js +19 -137
  328. package/src/config/defaults.js +76 -25
  329. package/src/core/constants.js +427 -0
  330. package/src/core/tokenizer-core.js +233 -0
  331. package/src/definitions/layout-alignment.js +210 -0
  332. package/src/definitions/layout-flex.js +155 -0
  333. package/src/definitions/layout-grid.js +134 -0
  334. package/src/definitions/layout-positioning.js +64 -0
  335. package/src/definitions/layout-table.js +129 -0
  336. package/src/definitions/layout-utilities.js +164 -0
  337. package/src/definitions/space.js +172 -0
  338. package/src/definitions/visual-backgrounds.js +231 -0
  339. package/src/definitions/visual-borders.js +66 -0
  340. package/src/definitions/visual-filters.js +111 -0
  341. package/src/definitions/visual-interactivity.js +159 -0
  342. package/src/definitions/visual-svg.js +41 -0
  343. package/src/definitions/visual-transform3d.js +255 -15
  344. package/src/definitions/visual-transforms.js +92 -6
  345. package/src/definitions/visual-transitions.js +158 -0
  346. package/src/definitions/visual-typography.js +223 -0
  347. package/src/definitions/visual.js +321 -1
  348. package/tests/integration/compiler.test.js +63 -2
  349. package/tests/unit/convert-tailwind.test.js +324 -0
  350. package/tests/unit/security.test.js +206 -0
@@ -1,1545 +1,209 @@
1
- (function() {
2
- 'use strict';
3
- const defaultConfig = {
4
- theme: {
5
- spacing: {
6
- 'none': '0px',
7
- 'tiny': '4px',
8
- 'small': '8px',
9
- 'medium': '16px',
10
- 'big': '32px',
11
- 'giant': '64px',
12
- 'vast': '128px'
13
- },
14
- radius: {
15
- 'none': '0px',
16
- 'small': '4px',
17
- 'medium': '8px',
18
- 'big': '16px',
19
- 'round': '9999px'
20
- },
21
- shadow: {
22
- 'none': 'none',
23
- 'small': '0 1px 2px rgba(0,0,0,0.05)',
24
- 'medium': '0 4px 6px rgba(0,0,0,0.1)',
25
- 'big': '0 10px 15px rgba(0,0,0,0.15)',
26
- 'giant': '0 25px 50px rgba(0,0,0,0.25)'
27
- },
28
- fontSize: {
29
- 'tiny': '12px',
30
- 'small': '14px',
31
- 'medium': '16px',
32
- 'big': '20px',
33
- 'giant': '32px',
34
- 'vast': '48px'
35
- },
36
- fontWeight: {
37
- 'normal': '400',
38
- 'medium': '500',
39
- 'bold': '700'
40
- },
41
- screens: {
42
- 'mob': '480px',
43
- 'tab': '768px',
44
- 'lap': '1024px',
45
- 'desk': '1280px'
46
- },
47
- colors: {
48
- 'white': '#FFFFFF',
49
- 'black': '#000000',
50
- 'grey': '#6B7280',
51
- 'dark': '#3E4A5D',
52
- 'light': '#DBEAFE',
53
- 'primary': '#2563EB',
54
- 'secondary': '#DBEAFE',
55
- 'success': '#10B981',
56
- 'warning': '#F59E0B',
57
- 'danger': '#EF4444',
58
- 'red-50': '#FEF2F2', 'red-100': '#FEE2E2', 'red-200': '#FECACA', 'red-300': '#FCA5A5', 'red-400': '#F87171',
59
- 'red-500': '#EF4444', 'red-600': '#DC2626', 'red-700': '#B91C1C', 'red-800': '#991B1B', 'red-900': '#7F1D1D', 'red-950': '#450A0A',
60
- 'orange-50': '#FFF7ED', 'orange-100': '#FFEDD5', 'orange-200': '#FED7AA', 'orange-300': '#FDBA74', 'orange-400': '#FB923C',
61
- 'orange-500': '#F97316', 'orange-600': '#EA580C', 'orange-700': '#C2410C', 'orange-800': '#9A3412', 'orange-900': '#7C2D12', 'orange-950': '#431407',
62
- 'amber-50': '#FFFBEB', 'amber-100': '#FEF3C7', 'amber-200': '#FDE68A', 'amber-300': '#FCD34D', 'amber-400': '#FBBF24',
63
- 'amber-500': '#F59E0B', 'amber-600': '#D97706', 'amber-700': '#B45309', 'amber-800': '#92400E', 'amber-900': '#78350F', 'amber-950': '#451A03',
64
- 'yellow-50': '#FEFCE8', 'yellow-100': '#FEF9C3', 'yellow-200': '#FEF08A', 'yellow-300': '#FDE047', 'yellow-400': '#FACC15',
65
- 'yellow-500': '#EAB308', 'yellow-600': '#CA8A04', 'yellow-700': '#A16207', 'yellow-800': '#854D0E', 'yellow-900': '#713F12', 'yellow-950': '#422006',
66
- 'lime-50': '#F7FEE7', 'lime-100': '#ECFCCB', 'lime-200': '#D9F99D', 'lime-300': '#BEF264', 'lime-400': '#A3E635',
67
- 'lime-500': '#84CC16', 'lime-600': '#65A30D', 'lime-700': '#4D7C0F', 'lime-800': '#3F6212', 'lime-900': '#365314', 'lime-950': '#1A2E05',
68
- 'green-50': '#F0FDF4', 'green-100': '#DCFCE7', 'green-200': '#BBF7D0', 'green-300': '#86EFAC', 'green-400': '#4ADE80',
69
- 'green-500': '#22C55E', 'green-600': '#16A34A', 'green-700': '#15803D', 'green-800': '#166534', 'green-900': '#14532D', 'green-950': '#052E16',
70
- 'emerald-50': '#ECFDF5', 'emerald-100': '#D1FAE5', 'emerald-200': '#A7F3D0', 'emerald-300': '#6EE7B7', 'emerald-400': '#34D399',
71
- 'emerald-500': '#10B981', 'emerald-600': '#059669', 'emerald-700': '#047857', 'emerald-800': '#065F46', 'emerald-900': '#064E3B', 'emerald-950': '#022C22',
72
- 'teal-50': '#F0FDFA', 'teal-100': '#CCFBF1', 'teal-200': '#99F6E4', 'teal-300': '#5EEAD4', 'teal-400': '#2DD4BF',
73
- 'teal-500': '#14B8A6', 'teal-600': '#0D9488', 'teal-700': '#0F766E', 'teal-800': '#115E59', 'teal-900': '#134E4A', 'teal-950': '#042F2E',
74
- 'cyan-50': '#ECFEFF', 'cyan-100': '#CFFAFE', 'cyan-200': '#A5F3FC', 'cyan-300': '#67E8F9', 'cyan-400': '#22D3EE',
75
- 'cyan-500': '#06B6D4', 'cyan-600': '#0891B2', 'cyan-700': '#0E7490', 'cyan-800': '#155E75', 'cyan-900': '#164E63', 'cyan-950': '#083344',
76
- 'sky-50': '#F0F9FF', 'sky-100': '#E0F2FE', 'sky-200': '#BAE6FD', 'sky-300': '#7DD3FC', 'sky-400': '#38BDF8',
77
- 'sky-500': '#0EA5E9', 'sky-600': '#0284C7', 'sky-700': '#0369A1', 'sky-800': '#075985', 'sky-900': '#0C4A6E', 'sky-950': '#082F49',
78
- 'blue-50': '#EFF6FF', 'blue-100': '#DBEAFE', 'blue-200': '#BFDBFE', 'blue-300': '#93C5FD', 'blue-400': '#60A5FA',
79
- 'blue-500': '#3B82F6', 'blue-600': '#2563EB', 'blue-700': '#1D4ED8', 'blue-800': '#1E40AF', 'blue-900': '#1E3A8A', 'blue-950': '#172554',
80
- 'indigo-50': '#EEF2FF', 'indigo-100': '#E0E7FF', 'indigo-200': '#C7D2FE', 'indigo-300': '#A5B4FC', 'indigo-400': '#818CF8',
81
- 'indigo-500': '#6366F1', 'indigo-600': '#4F46E5', 'indigo-700': '#4338CA', 'indigo-800': '#3730A3', 'indigo-900': '#312E81', 'indigo-950': '#1E1B4B',
82
- 'violet-50': '#F5F3FF', 'violet-100': '#EDE9FE', 'violet-200': '#DDD6FE', 'violet-300': '#C4B5FD', 'violet-400': '#A78BFA',
83
- 'violet-500': '#8B5CF6', 'violet-600': '#7C3AED', 'violet-700': '#6D28D9', 'violet-800': '#5B21B6', 'violet-900': '#4C1D95', 'violet-950': '#2E1065',
84
- 'purple-50': '#FAF5FF', 'purple-100': '#F3E8FF', 'purple-200': '#E9D5FF', 'purple-300': '#D8B4FE', 'purple-400': '#C084FC',
85
- 'purple-500': '#A855F7', 'purple-600': '#9333EA', 'purple-700': '#7E22CE', 'purple-800': '#6B21A8', 'purple-900': '#581C87', 'purple-950': '#3B0764',
86
- 'fuchsia-50': '#FDF4FF', 'fuchsia-100': '#FAE8FF', 'fuchsia-200': '#F5D0FE', 'fuchsia-300': '#F0ABFC', 'fuchsia-400': '#E879F9',
87
- 'fuchsia-500': '#D946EF', 'fuchsia-600': '#C026D3', 'fuchsia-700': '#A21CAF', 'fuchsia-800': '#86198F', 'fuchsia-900': '#701A75', 'fuchsia-950': '#4A044E',
88
- 'pink-50': '#FDF2F8', 'pink-100': '#FCE7F3', 'pink-200': '#FBCFE8', 'pink-300': '#F9A8D4', 'pink-400': '#F472B6',
89
- 'pink-500': '#EC4899', 'pink-600': '#DB2777', 'pink-700': '#BE185D', 'pink-800': '#9D174D', 'pink-900': '#831843', 'pink-950': '#500724',
90
- 'rose-50': '#FFF1F2', 'rose-100': '#FFE4E6', 'rose-200': '#FECDD3', 'rose-300': '#FDA4AF', 'rose-400': '#FB7185',
91
- 'rose-500': '#F43F5E', 'rose-600': '#E11D48', 'rose-700': '#BE123C', 'rose-800': '#9F1239', 'rose-900': '#881337', 'rose-950': '#4C0519',
92
- 'slate-50': '#F8FAFC', 'slate-100': '#F1F5F9', 'slate-200': '#E2E8F0', 'slate-300': '#CBD5E1', 'slate-400': '#94A3B8',
93
- 'slate-500': '#64748B', 'slate-600': '#475569', 'slate-700': '#334155', 'slate-800': '#1E293B', 'slate-900': '#0F172A', 'slate-950': '#020617',
94
- 'gray-50': '#F9FAFB', 'gray-100': '#F3F4F6', 'gray-200': '#E5E7EB', 'gray-300': '#D1D5DB', 'gray-400': '#9CA3AF',
95
- 'gray-500': '#6B7280', 'gray-600': '#4B5563', 'gray-700': '#374151', 'gray-800': '#1F2937', 'gray-900': '#111827', 'gray-950': '#030712',
96
- 'zinc-50': '#FAFAFA', 'zinc-100': '#F4F4F5', 'zinc-200': '#E4E4E7', 'zinc-300': '#D4D4D8', 'zinc-400': '#A1A1AA',
97
- 'zinc-500': '#71717A', 'zinc-600': '#52525B', 'zinc-700': '#3F3F46', 'zinc-800': '#27272A', 'zinc-900': '#18181B', 'zinc-950': '#09090B',
98
- 'neutral-50': '#FAFAFA', 'neutral-100': '#F5F5F5', 'neutral-200': '#E5E5E5', 'neutral-300': '#D4D4D4', 'neutral-400': '#A3A3A3',
99
- 'neutral-500': '#737373', 'neutral-600': '#525252', 'neutral-700': '#404040', 'neutral-800': '#262626', 'neutral-900': '#171717', 'neutral-950': '#0A0A0A',
100
- 'stone-50': '#FAFAF9', 'stone-100': '#F5F5F4', 'stone-200': '#E7E5E4', 'stone-300': '#D6D3D1', 'stone-400': '#A8A29E',
101
- 'stone-500': '#78716C', 'stone-600': '#57534E', 'stone-700': '#44403C', 'stone-800': '#292524', 'stone-900': '#1C1917', 'stone-950': '#0C0A09'
102
- },
103
- zIndex: {
104
- 'base': '0',
105
- 'low': '10',
106
- 'mid': '50',
107
- 'high': '100',
108
- 'top': '9999'
109
- }
110
- },
111
- darkMode: 'media',
112
- preflight: true
113
- };
114
- function loadInlineConfig() {
115
- const configEl = document.querySelector('script[type="senangstart/config"]');
116
- if (!configEl) return {};
117
- try {
118
- return JSON.parse(configEl.textContent);
119
- } catch (e) {
120
- console.error('[SenangStart] Invalid config JSON:', e);
121
- return {};
122
- }
123
- }
124
- function mergeConfig(user) {
125
- const merged = JSON.parse(JSON.stringify(defaultConfig));
126
- if (user.theme) {
127
- for (const key of Object.keys(merged.theme)) {
128
- if (user.theme[key]) {
129
- merged.theme[key] = { ...merged.theme[key], ...user.theme[key] };
130
- }
131
- }
132
- }
133
- if (user.darkMode !== undefined) {
134
- merged.darkMode = user.darkMode;
135
- }
136
- if (user.preflight !== undefined) {
137
- merged.preflight = user.preflight;
138
- }
139
- return merged;
140
- }
141
- function generateCSSVariables(config) {
142
- const { theme } = config;
143
- let css = ':root {\n';
144
- for (const [key, value] of Object.entries(theme.spacing)) {
145
- css += ` --s-${key}: ${value};\n`;
146
- }
147
- for (const [key, value] of Object.entries(theme.radius)) {
148
- css += ` --r-${key}: ${value};\n`;
149
- }
150
- for (const [key, value] of Object.entries(theme.shadow)) {
151
- css += ` --shadow-${key}: ${value};\n`;
152
- }
153
- for (const [key, value] of Object.entries(theme.fontSize)) {
154
- css += ` --font-${key}: ${value};\n`;
155
- }
156
- for (const [key, value] of Object.entries(theme.fontWeight)) {
157
- css += ` --fw-${key}: ${value};\n`;
158
- }
159
- for (const [key, value] of Object.entries(theme.colors)) {
160
- css += ` --c-${key}: ${value};\n`;
161
- }
162
- for (const [key, value] of Object.entries(theme.zIndex)) {
163
- css += ` --z-${key}: ${value};\n`;
164
- }
165
- css += '}\n\n';
166
- return css;
167
- }
168
- function generatePreflight() {
169
- return `
1
+ /* SenangStart CSS v0.2.0 | MIT */
2
+ (()=>{var h=["mob","tab","lap","desk","tw-sm","tw-md","tw-lg","tw-xl","tw-2xl"],w=["hover","focus","active","disabled","dark"],B=["flex","grid","block","inline","hidden","row","col","row-reverse","col-reverse","center","start","end","between","around","evenly","wrap","nowrap","absolute","relative","fixed","sticky"];function z(l){return typeof l!="string"?"":l.replace(/;/g,"_")}function W(l){return!(!l.property||typeof l.property!="string"||l.property.length>100||l.value!==null&&typeof l.value!="string"||l.value&&l.value.length>500||l.breakpoint&&!h.includes(l.breakpoint)||l.state&&!w.includes(l.state))}function S(l){let y={raw:l,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1},c=l.split(":"),d=0;if(h.includes(c[0])&&(y.breakpoint=c[0],d++),w.includes(c[d])&&(y.state=c[d],d++),d<c.length&&(y.property=c[d],d++),d<c.length){let g=c.slice(d).join(":"),x=g.match(/^\[(.+)\]$/);x?(y.value=x[1].replace(/_/g," "),y.isArbitrary=!0):y.value=g}return y}function M(l,y){if(typeof l!="string"||l.length===0||l.length>200)return{raw:l,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y,error:"Invalid token format"};let c={raw:l,breakpoint:null,state:null,property:null,value:null,isArbitrary:!1,attrType:y};if(y==="layout"){if(l.startsWith("z:"))return c.property="z",c.value=l.substring(2),c;if(l.startsWith("overflow:"))return c.property="overflow",c.value=l.substring(9),c;if(B.includes(l))return c.property=l,c.value=l,c;let x=l.split(":");if(x.length===2&&h.includes(x[0]))return c.breakpoint=x[0],c.property=x[1],c.value=x[1],c}let d=l.split(":");if(d.length===1)return c.property=l,c.value=l,c;let g=0;if(h.includes(d[0])&&(c.breakpoint=d[0],g++),w.includes(d[g])&&(c.state=d[g],g++),g<d.length&&(c.property=d[g],g++),g<d.length){let x=d.slice(g).join(":"),$=x.match(/^\[(.+)\]$/);$?(c.value=z($[1].replace(/_/g," ")),c.isArbitrary=!0):c.value=z(x)}return W(c)||(c.error="Invalid token structure"),c}(function(){"use strict";let l={theme:{spacing:{none:"0px",tiny:"4px",small:"8px",medium:"16px",big:"32px",giant:"64px",vast:"128px"},radius:{none:"0px",small:"4px",medium:"8px",big:"16px",round:"9999px"},shadow:{none:"none",small:"0 1px 2px rgba(0,0,0,0.05)",medium:"0 4px 6px rgba(0,0,0,0.1)",big:"0 10px 15px rgba(0,0,0,0.15)",giant:"0 25px 50px rgba(0,0,0,0.25)"},fontSize:{mini:"0.75rem",small:"0.875rem",base:"1rem",large:"1.125rem",big:"1.25rem",huge:"1.5rem",grand:"1.875rem",giant:"2.25rem",mount:"3rem",mega:"3.75rem",giga:"4.5rem",tera:"6rem",hero:"8rem"},fontSizeLineHeight:{mini:"1rem",small:"1.25rem",base:"1.5rem",large:"1.75rem",big:"1.75rem",huge:"2rem",grand:"2.25rem",giant:"2.5rem",mount:"1",mega:"1",giga:"1",tera:"1",hero:"1"},fontWeight:{normal:"400",medium:"500",bold:"700"},screens:{mob:"480px",tab:"768px",lap:"1024px",desk:"1280px","tw-sm":"640px","tw-md":"768px","tw-lg":"1024px","tw-xl":"1280px","tw-2xl":"1536px"},colors:{white:"#FFFFFF",black:"#000000",grey:"#6B7280",dark:"#3E4A5D",light:"#DBEAFE",primary:"#2563EB",secondary:"#DBEAFE",success:"#10B981",warning:"#F59E0B",danger:"#EF4444","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","red-950":"#450A0A","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","orange-950":"#431407","amber-50":"#FFFBEB","amber-100":"#FEF3C7","amber-200":"#FDE68A","amber-300":"#FCD34D","amber-400":"#FBBF24","amber-500":"#F59E0B","amber-600":"#D97706","amber-700":"#B45309","amber-800":"#92400E","amber-900":"#78350F","amber-950":"#451A03","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","yellow-950":"#422006","lime-50":"#F7FEE7","lime-100":"#ECFCCB","lime-200":"#D9F99D","lime-300":"#BEF264","lime-400":"#A3E635","lime-500":"#84CC16","lime-600":"#65A30D","lime-700":"#4D7C0F","lime-800":"#3F6212","lime-900":"#365314","lime-950":"#1A2E05","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","green-950":"#052E16","emerald-50":"#ECFDF5","emerald-100":"#D1FAE5","emerald-200":"#A7F3D0","emerald-300":"#6EE7B7","emerald-400":"#34D399","emerald-500":"#10B981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065F46","emerald-900":"#064E3B","emerald-950":"#022C22","teal-50":"#F0FDFA","teal-100":"#CCFBF1","teal-200":"#99F6E4","teal-300":"#5EEAD4","teal-400":"#2DD4BF","teal-500":"#14B8A6","teal-600":"#0D9488","teal-700":"#0F766E","teal-800":"#115E59","teal-900":"#134E4A","teal-950":"#042F2E","cyan-50":"#ECFEFF","cyan-100":"#CFFAFE","cyan-200":"#A5F3FC","cyan-300":"#67E8F9","cyan-400":"#22D3EE","cyan-500":"#06B6D4","cyan-600":"#0891B2","cyan-700":"#0E7490","cyan-800":"#155E75","cyan-900":"#164E63","cyan-950":"#083344","sky-50":"#F0F9FF","sky-100":"#E0F2FE","sky-200":"#BAE6FD","sky-300":"#7DD3FC","sky-400":"#38BDF8","sky-500":"#0EA5E9","sky-600":"#0284C7","sky-700":"#0369A1","sky-800":"#075985","sky-900":"#0C4A6E","sky-950":"#082F49","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","blue-950":"#172554","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81","indigo-950":"#1E1B4B","violet-50":"#F5F3FF","violet-100":"#EDE9FE","violet-200":"#DDD6FE","violet-300":"#C4B5FD","violet-400":"#A78BFA","violet-500":"#8B5CF6","violet-600":"#7C3AED","violet-700":"#6D28D9","violet-800":"#5B21B6","violet-900":"#4C1D95","violet-950":"#2E1065","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","purple-950":"#3B0764","fuchsia-50":"#FDF4FF","fuchsia-100":"#FAE8FF","fuchsia-200":"#F5D0FE","fuchsia-300":"#F0ABFC","fuchsia-400":"#E879F9","fuchsia-500":"#D946EF","fuchsia-600":"#C026D3","fuchsia-700":"#A21CAF","fuchsia-800":"#86198F","fuchsia-900":"#701A75","fuchsia-950":"#4A044E","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","pink-950":"#500724","rose-50":"#FFF1F2","rose-100":"#FFE4E6","rose-200":"#FECDD3","rose-300":"#FDA4AF","rose-400":"#FB7185","rose-500":"#F43F5E","rose-600":"#E11D48","rose-700":"#BE123C","rose-800":"#9F1239","rose-900":"#881337","rose-950":"#4C0519","slate-50":"#F8FAFC","slate-100":"#F1F5F9","slate-200":"#E2E8F0","slate-300":"#CBD5E1","slate-400":"#94A3B8","slate-500":"#64748B","slate-600":"#475569","slate-700":"#334155","slate-800":"#1E293B","slate-900":"#0F172A","slate-950":"#020617","gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#FAFAFA","zinc-100":"#F4F4F5","zinc-200":"#E4E4E7","zinc-300":"#D4D4D8","zinc-400":"#A1A1AA","zinc-500":"#71717A","zinc-600":"#52525B","zinc-700":"#3F3F46","zinc-800":"#27272A","zinc-900":"#18181B","zinc-950":"#09090B","neutral-50":"#FAFAFA","neutral-100":"#F5F5F5","neutral-200":"#E5E5E5","neutral-300":"#D4D4D4","neutral-400":"#A3A3A3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0A0A0A","stone-50":"#FAFAF9","stone-100":"#F5F5F4","stone-200":"#E7E5E4","stone-300":"#D6D3D1","stone-400":"#A8A29E","stone-500":"#78716C","stone-600":"#57534E","stone-700":"#44403C","stone-800":"#292524","stone-900":"#1C1917","stone-950":"#0C0A09"},zIndex:{base:"0",low:"10",mid:"50",high:"100",top:"9999"}},darkMode:"media",preflight:!0},y={theme:{type:"object",properties:{spacing:{type:"object"},radius:{type:"object"},shadow:{type:"object"},fontSize:{type:"object"},fontWeight:{type:"object"},screens:{type:"object"},colors:{type:"object"},zIndex:{type:"object"}}},darkMode:{type:"string",enum:["media","selector"]},preflight:{type:"boolean"}};function c(s){return!(!s||typeof s!="object"||Array.isArray(s)||s.theme&&(typeof s.theme!="object"||Array.isArray(s.theme))||s.darkMode!==void 0&&s.darkMode!=="media"&&s.darkMode!=="selector"&&!Array.isArray(s.darkMode)||s.preflight!==void 0&&typeof s.preflight!="boolean")}function d(){let s=document.querySelector('script[type="senangstart/config"]');if(!s)return{};try{let n=JSON.parse(s.textContent);return c(n)?n:(console.error("[SenangStart] Invalid config structure"),{})}catch(n){return console.error("[SenangStart] Invalid config JSON:",n),{}}}function g(s){if(!c(s))return console.error("[SenangStart] Invalid user config, using defaults"),JSON.parse(JSON.stringify(l));let n=JSON.parse(JSON.stringify(l));if(s.theme)for(let e of Object.keys(n.theme))s.theme[e]&&(n.theme[e]={...n.theme[e],...s.theme[e]});return s.darkMode!==void 0&&(n.darkMode=s.darkMode),s.preflight!==void 0&&(n.preflight=s.preflight),n}function x(s){let{theme:n}=s,e=`:root {
3
+ `;for(let[p,a]of Object.entries(n.spacing))e+=` --s-${p}: ${a};
4
+ `;for(let[p,a]of Object.entries(n.radius))e+=` --r-${p}: ${a};
5
+ `;for(let[p,a]of Object.entries(n.shadow))e+=` --shadow-${p}: ${a};
6
+ `;for(let[p,a]of Object.entries(n.fontSize))e+=` --font-${p}: ${a};
7
+ `;if(n.fontSizeLineHeight)for(let[p,a]of Object.entries(n.fontSizeLineHeight))e+=` --font-lh-${p}: ${a};
8
+ `;for(let[p,a]of Object.entries(n.fontWeight))e+=` --fw-${p}: ${a};
9
+ `;for(let[p,a]of Object.entries(n.colors))e+=` --c-${p}: ${a};
10
+ `;for(let[p,a]of Object.entries(n.zIndex))e+=` --z-${p}: ${a};
11
+ `;let r={0:"0px",px:"1px","0.5":"0.125rem",1:"0.25rem","1.5":"0.375rem",2:"0.5rem","2.5":"0.625rem",3:"0.75rem","3.5":"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"};for(let[p,a]of Object.entries(r))e+=` --tw-${p}: ${a};
12
+ `;let o={none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"};for(let[p,a]of Object.entries(o))e+=` --tw-rounded-${p}: ${a};
13
+ `;let u={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"0 0 #0000"};for(let[p,a]of Object.entries(u))e+=` --tw-shadow-${p}: ${a};
14
+ `;let f={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"};for(let[p,a]of Object.entries(f))e+=` --tw-text-${p}: ${a};
15
+ `;let t={xs:"1rem",sm:"1.25rem",base:"1.5rem",lg:"1.75rem",xl:"1.75rem","2xl":"2rem","3xl":"2.25rem","4xl":"2.5rem","5xl":"1","6xl":"1","7xl":"1","8xl":"1","9xl":"1"};for(let[p,a]of Object.entries(t))e+=` --tw-leading-${p}: ${a};
16
+ `;let i={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"};for(let[p,a]of Object.entries(i))e+=` --tw-font-${p}: ${a};
17
+ `;return e+=`}
18
+
19
+ `,e}function $(){return`/* SenangStart Preflight - Opinionated Base Styles */
170
20
  *,
171
21
  ::before,
172
22
  ::after {
173
- box-sizing: border-box;
174
- border-width: 0;
175
- border-style: solid;
176
- border-color: currentColor;
23
+ box-sizing: border-box;
24
+ border-width: 0;
25
+ border-style: solid;
26
+ border-color: currentColor;
177
27
  }
28
+
178
29
  html, :host {
179
- line-height: 1.5;
180
- -webkit-text-size-adjust: 100%;
181
- -moz-tab-size: 4;
182
- tab-size: 4;
183
- font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
184
- font-feature-settings: normal;
185
- font-variation-settings: normal;
186
- -webkit-tap-highlight-color: transparent;
187
- }
30
+ line-height: 1.5;
31
+ -webkit-text-size-adjust: 100%;
32
+ -moz-tab-size: 4;
33
+ tab-size: 4;
34
+ font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
35
+ font-feature-settings: normal;
36
+ font-variation-settings: normal;
37
+ -webkit-tap-highlight-color: transparent;
38
+ }
39
+
188
40
  body {
189
- margin: 0;
190
- line-height: inherit;
41
+ margin: 0;
42
+ line-height: inherit;
191
43
  }
44
+
192
45
  hr {
193
- height: 0;
194
- color: inherit;
195
- border-top-width: 1px;
46
+ height: 0;
47
+ color: inherit;
48
+ border-top-width: 1px;
196
49
  }
50
+
197
51
  h1, h2, h3, h4, h5, h6 {
198
- font-size: inherit;
199
- font-weight: inherit;
52
+ font-size: inherit;
53
+ font-weight: inherit;
200
54
  }
55
+
201
56
  a {
202
- color: inherit;
203
- text-decoration: inherit;
57
+ color: inherit;
58
+ text-decoration: inherit;
204
59
  }
60
+
205
61
  b, strong {
206
- font-weight: bolder;
62
+ font-weight: bolder;
207
63
  }
64
+
208
65
  code, kbd, samp, pre {
209
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
210
- font-size: 1em;
66
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
67
+ font-size: 1em;
211
68
  }
69
+
212
70
  small {
213
- font-size: 80%;
71
+ font-size: 80%;
214
72
  }
73
+
215
74
  sub, sup {
216
- font-size: 75%;
217
- line-height: 0;
218
- position: relative;
219
- vertical-align: baseline;
75
+ font-size: 75%;
76
+ line-height: 0;
77
+ position: relative;
78
+ vertical-align: baseline;
220
79
  }
80
+
221
81
  sub { bottom: -0.25em; }
222
82
  sup { top: -0.5em; }
83
+
223
84
  table {
224
- text-indent: 0;
225
- border-color: inherit;
226
- border-collapse: collapse;
85
+ text-indent: 0;
86
+ border-color: inherit;
87
+ border-collapse: collapse;
227
88
  }
89
+
228
90
  button, input, optgroup, select, textarea {
229
- font-family: inherit;
230
- font-size: 100%;
231
- font-weight: inherit;
232
- line-height: inherit;
233
- color: inherit;
234
- margin: 0;
235
- padding: 0;
236
- }
91
+ font-family: inherit;
92
+ font-size: 100%;
93
+ font-weight: inherit;
94
+ line-height: inherit;
95
+ color: inherit;
96
+ margin: 0;
97
+ padding: 0;
98
+ }
99
+
237
100
  button, select {
238
- text-transform: none;
101
+ text-transform: none;
239
102
  }
103
+
240
104
  button,
241
105
  input:where([type='button']),
242
106
  input:where([type='reset']),
243
107
  input:where([type='submit']) {
244
- -webkit-appearance: button;
245
- background-color: transparent;
246
- background-image: none;
108
+ -webkit-appearance: button;
109
+ background-color: transparent;
110
+ background-image: none;
247
111
  }
112
+
248
113
  progress {
249
- vertical-align: baseline;
114
+ vertical-align: baseline;
250
115
  }
116
+
251
117
  [type='search'] {
252
- -webkit-appearance: textfield;
253
- outline-offset: -2px;
118
+ -webkit-appearance: textfield;
119
+ outline-offset: -2px;
254
120
  }
121
+
255
122
  summary {
256
- display: list-item;
123
+ display: list-item;
257
124
  }
125
+
258
126
  blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
259
- margin: 0;
127
+ margin: 0;
260
128
  }
129
+
261
130
  fieldset { margin: 0; padding: 0; }
262
131
  legend { padding: 0; }
132
+
263
133
  ol, ul, menu {
264
- list-style: none;
265
- margin: 0;
266
- padding: 0;
134
+ list-style: none;
135
+ margin: 0;
136
+ padding: 0;
267
137
  }
138
+
268
139
  dialog { padding: 0; }
140
+
269
141
  textarea { resize: vertical; }
142
+
270
143
  input::placeholder, textarea::placeholder {
271
- opacity: 1;
272
- color: #9ca3af;
144
+ opacity: 1;
145
+ color: #9ca3af;
273
146
  }
147
+
274
148
  button, [role="button"] {
275
- cursor: pointer;
149
+ cursor: pointer;
276
150
  }
151
+
277
152
  :disabled {
278
- cursor: default;
153
+ cursor: default;
279
154
  }
155
+
280
156
  img, svg, video, canvas, audio, iframe, embed, object {
281
- display: block;
282
- vertical-align: middle;
157
+ display: block;
158
+ vertical-align: middle;
283
159
  }
160
+
284
161
  img, video {
285
- max-width: 100%;
286
- height: auto;
162
+ max-width: 100%;
163
+ height: auto;
287
164
  }
165
+
288
166
  [hidden] {
289
- display: none;
167
+ display: none;
290
168
  }
169
+
170
+ /* Keyframe Animations */
291
171
  @keyframes spin {
292
- to { transform: rotate(360deg); }
172
+ to { transform: rotate(360deg); }
293
173
  }
174
+
294
175
  @keyframes ping {
295
- 75%, 100% {
296
- transform: scale(2);
297
- opacity: 0;
298
- }
176
+ 75%, 100% {
177
+ transform: scale(2);
178
+ opacity: 0;
179
+ }
299
180
  }
181
+
300
182
  @keyframes pulse {
301
- 50% { opacity: .5; }
183
+ 50% { opacity: .5; }
302
184
  }
185
+
303
186
  @keyframes bounce {
304
- 0%, 100% {
305
- transform: translateY(-25%);
306
- animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
307
- }
308
- 50% {
309
- transform: none;
310
- animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
311
- }
312
- }
313
- `;
314
- }
315
- const layoutKeywords = {
316
- 'flex': 'display: flex;',
317
- 'grid': 'display: grid;',
318
- 'inline-flex': 'display: inline-flex;',
319
- 'inline-grid': 'display: inline-grid;',
320
- 'block': 'display: block;',
321
- 'inline': 'display: inline-block;',
322
- 'hidden': 'display: none;',
323
- 'row': 'flex-direction: row;',
324
- 'col': 'flex-direction: column;',
325
- 'row-reverse': 'flex-direction: row-reverse;',
326
- 'col-reverse': 'flex-direction: column-reverse;',
327
- 'wrap': 'flex-wrap: wrap;',
328
- 'nowrap': 'flex-wrap: nowrap;',
329
- 'wrap-reverse': 'flex-wrap: wrap-reverse;',
330
- 'grow': 'flex-grow: 1;',
331
- 'grow-0': 'flex-grow: 0;',
332
- 'shrink': 'flex-shrink: 1;',
333
- 'shrink-0': 'flex-shrink: 0;',
334
- 'grid-flow-row': 'grid-auto-flow: row;',
335
- 'grid-flow-col': 'grid-auto-flow: column;',
336
- 'grid-flow-dense': 'grid-auto-flow: dense;',
337
- 'grid-flow-row-dense': 'grid-auto-flow: row dense;',
338
- 'grid-flow-col-dense': 'grid-auto-flow: column dense;',
339
- 'center': 'justify-content: center; align-items: center;',
340
- 'start': 'justify-content: flex-start; align-items: flex-start;',
341
- 'end': 'justify-content: flex-end; align-items: flex-end;',
342
- 'between': 'justify-content: space-between;',
343
- 'around': 'justify-content: space-around;',
344
- 'evenly': 'justify-content: space-evenly;',
345
- 'absolute': 'position: absolute;',
346
- 'relative': 'position: relative;',
347
- 'fixed': 'position: fixed;',
348
- 'sticky': 'position: sticky;',
349
- 'static': 'position: static;',
350
- 'visible': 'visibility: visible;',
351
- 'invisible': 'visibility: hidden;',
352
- 'isolate': 'isolation: isolate;',
353
- 'isolate-auto': 'isolation: auto;',
354
- 'box-border': 'box-sizing: border-box;',
355
- 'box-content': 'box-sizing: content-box;',
356
- 'float-left': 'float: left;',
357
- 'float-right': 'float: right;',
358
- 'float-none': 'float: none;',
359
- 'clear-left': 'clear: left;',
360
- 'clear-right': 'clear: right;',
361
- 'clear-both': 'clear: both;',
362
- 'clear-none': 'clear: none;',
363
- 'container': 'width: 100%; margin-left: auto; margin-right: auto;',
364
- 'border-collapse': 'border-collapse: collapse;',
365
- 'border-separate': 'border-collapse: separate;'
366
- };
367
- const breakpoints = ['mob', 'tab', 'lap', 'desk'];
368
- const states = ['hover', 'focus', 'active', 'disabled', 'dark'];
369
- function parseToken(raw) {
370
- const token = {
371
- raw,
372
- breakpoint: null,
373
- state: null,
374
- property: null,
375
- value: null,
376
- isArbitrary: false
377
- };
378
- const parts = raw.split(':');
379
- let idx = 0;
380
- if (breakpoints.includes(parts[0])) {
381
- token.breakpoint = parts[0];
382
- idx++;
383
- }
384
- if (states.includes(parts[idx])) {
385
- token.state = parts[idx];
386
- idx++;
387
- }
388
- if (idx < parts.length) {
389
- token.property = parts[idx];
390
- idx++;
391
- }
392
- if (idx < parts.length) {
393
- let value = parts.slice(idx).join(':');
394
- const arbitraryMatch = value.match(/^\[(.+)\]$/);
395
- if (arbitraryMatch) {
396
- token.value = arbitraryMatch[1].replace(/_/g, ' ');
397
- token.isArbitrary = true;
398
- } else {
399
- token.value = value;
400
- }
401
- }
402
- return token;
403
- }
404
- function generateLayoutRule(token) {
405
- const { property, value, isArbitrary } = token;
406
- if (property === 'justify') {
407
- const justifyMap = {
408
- 'start': 'flex-start',
409
- 'end': 'flex-end',
410
- 'center': 'center',
411
- 'between': 'space-between',
412
- 'around': 'space-around',
413
- 'evenly': 'space-evenly',
414
- 'stretch': 'stretch'
415
- };
416
- return `justify-content: ${justifyMap[value] || value};`;
417
- }
418
- if (property === 'justify-items') {
419
- return `justify-items: ${value};`;
420
- }
421
- if (property === 'justify-self') {
422
- return `justify-self: ${value};`;
423
- }
424
- if (property === 'content') {
425
- const contentMap = {
426
- 'start': 'flex-start',
427
- 'end': 'flex-end',
428
- 'center': 'center',
429
- 'between': 'space-between',
430
- 'around': 'space-around',
431
- 'evenly': 'space-evenly',
432
- 'stretch': 'stretch'
433
- };
434
- return `align-content: ${contentMap[value] || value};`;
435
- }
436
- if (property === 'items') {
437
- const itemsMap = {
438
- 'start': 'flex-start',
439
- 'end': 'flex-end',
440
- 'center': 'center',
441
- 'baseline': 'baseline',
442
- 'stretch': 'stretch'
443
- };
444
- return `align-items: ${itemsMap[value] || value};`;
445
- }
446
- if (property === 'self') {
447
- const selfMap = {
448
- 'auto': 'auto',
449
- 'start': 'flex-start',
450
- 'end': 'flex-end',
451
- 'center': 'center',
452
- 'baseline': 'baseline',
453
- 'stretch': 'stretch'
454
- };
455
- return `align-self: ${selfMap[value] || value};`;
456
- }
457
- if (property === 'place-content') {
458
- const placeContentMap = {
459
- 'start': 'start',
460
- 'end': 'end',
461
- 'center': 'center',
462
- 'between': 'space-between',
463
- 'around': 'space-around',
464
- 'evenly': 'space-evenly',
465
- 'stretch': 'stretch'
466
- };
467
- return `place-content: ${placeContentMap[value] || value};`;
468
- }
469
- if (property === 'place-items') {
470
- return `place-items: ${value};`;
471
- }
472
- if (property === 'place-self') {
473
- return `place-self: ${value};`;
474
- }
475
- if (property === 'z') {
476
- return `z-index: var(--z-${value});`;
477
- }
478
- if (property === 'overflow') {
479
- return `overflow: ${value};`;
480
- }
481
- if (property === 'overflow-x') {
482
- return `overflow-x: ${value};`;
483
- }
484
- if (property === 'overflow-y') {
485
- return `overflow-y: ${value};`;
486
- }
487
- if (property === 'aspect') {
488
- const aspectMap = {
489
- 'square': '1 / 1',
490
- 'video': '16 / 9',
491
- 'auto': 'auto'
492
- };
493
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (aspectMap[value] || value);
494
- return `aspect-ratio: ${cssValue};`;
495
- }
496
- if (property === 'object') {
497
- return `object-fit: ${value};`;
498
- }
499
- if (property === 'object-pos') {
500
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : value;
501
- return `object-position: ${cssValue};`;
502
- }
503
- if (property === 'inset') {
504
- const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
505
- return `inset: ${cssValue};`;
506
- }
507
- if (['top', 'right', 'bottom', 'left'].includes(property)) {
508
- const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
509
- return `${property}: ${cssValue};`;
510
- }
511
- if (property === 'inset-x') {
512
- const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
513
- return `left: ${cssValue}; right: ${cssValue};`;
514
- }
515
- if (property === 'inset-y') {
516
- const cssValue = isArbitrary ? value : (value === '0' ? '0' : `var(--s-${value})`);
517
- return `top: ${cssValue}; bottom: ${cssValue};`;
518
- }
519
- if (property === 'cols') {
520
- return `columns: ${value};`;
521
- }
522
- if (property === 'overscroll') {
523
- return `overscroll-behavior: ${value};`;
524
- }
525
- if (property === 'overscroll-x') {
526
- return `overscroll-behavior-x: ${value};`;
527
- }
528
- if (property === 'overscroll-y') {
529
- return `overscroll-behavior-y: ${value};`;
530
- }
531
- if (property === 'basis') {
532
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
533
- return `flex-basis: ${cssValue};`;
534
- }
535
- if (property === 'flex') {
536
- const flexPresets = {
537
- '1': '1 1 0%',
538
- 'auto': '1 1 auto',
539
- 'initial': '0 1 auto',
540
- 'none': 'none'
541
- };
542
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (flexPresets[value] || value);
543
- return `flex: ${cssValue};`;
544
- }
545
- if (property === 'order') {
546
- const orderPresets = {
547
- 'first': '-9999',
548
- 'last': '9999',
549
- 'none': '0'
550
- };
551
- const cssValue = orderPresets[value] || value;
552
- return `order: ${cssValue};`;
553
- }
554
- if (property === 'grid-cols') {
555
- if (value === 'none') {
556
- return 'grid-template-columns: none;';
557
- }
558
- if (value === 'subgrid') {
559
- return 'grid-template-columns: subgrid;';
560
- }
561
- if (isArbitrary) {
562
- return `grid-template-columns: ${value.replace(/_/g, ' ')};`;
563
- }
564
- return `grid-template-columns: repeat(${value}, minmax(0, 1fr));`;
565
- }
566
- if (property === 'grid-rows') {
567
- if (value === 'none') {
568
- return 'grid-template-rows: none;';
569
- }
570
- if (value === 'subgrid') {
571
- return 'grid-template-rows: subgrid;';
572
- }
573
- if (isArbitrary) {
574
- return `grid-template-rows: ${value.replace(/_/g, ' ')};`;
575
- }
576
- return `grid-template-rows: repeat(${value}, minmax(0, 1fr));`;
577
- }
578
- if (property === 'col-span') {
579
- if (value === 'full') {
580
- return 'grid-column: 1 / -1;';
581
- }
582
- return `grid-column: span ${value} / span ${value};`;
583
- }
584
- if (property === 'col-start') {
585
- return `grid-column-start: ${value};`;
586
- }
587
- if (property === 'col-end') {
588
- return `grid-column-end: ${value};`;
589
- }
590
- if (property === 'row-span') {
591
- if (value === 'full') {
592
- return 'grid-row: 1 / -1;';
593
- }
594
- return `grid-row: span ${value} / span ${value};`;
595
- }
596
- if (property === 'row-start') {
597
- return `grid-row-start: ${value};`;
598
- }
599
- if (property === 'row-end') {
600
- return `grid-row-end: ${value};`;
601
- }
602
- if (property === 'auto-cols') {
603
- const autoPresets = {
604
- 'auto': 'auto',
605
- 'min': 'min-content',
606
- 'max': 'max-content',
607
- 'fr': 'minmax(0, 1fr)'
608
- };
609
- const cssValue = isArbitrary ? value : (autoPresets[value] || value);
610
- return `grid-auto-columns: ${cssValue};`;
611
- }
612
- if (property === 'auto-rows') {
613
- const autoPresets = {
614
- 'auto': 'auto',
615
- 'min': 'min-content',
616
- 'max': 'max-content',
617
- 'fr': 'minmax(0, 1fr)'
618
- };
619
- const cssValue = isArbitrary ? value : (autoPresets[value] || value);
620
- return `grid-auto-rows: ${cssValue};`;
621
- }
622
- if (property === 'table') {
623
- const tableMap = { 'auto': 'auto', 'fixed': 'fixed' };
624
- return `table-layout: ${tableMap[value] || value};`;
625
- }
626
- if (property === 'caption') {
627
- return `caption-side: ${value};`;
628
- }
629
- if (property === 'border-spacing') {
630
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
631
- return `border-spacing: ${cssValue};`;
632
- }
633
- if (property === 'border-spacing-x') {
634
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
635
- return `border-spacing: ${cssValue} 0;`;
636
- }
637
- if (property === 'border-spacing-y') {
638
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
639
- return `border-spacing: 0 ${cssValue};`;
640
- }
641
- return layoutKeywords[property] || '';
642
- }
643
- function generateSpaceRule(token) {
644
- const { property, value, isArbitrary } = token;
645
- if (value === 'auto') {
646
- const autoMap = {
647
- 'm': 'margin: auto;',
648
- 'm-x': 'margin-left: auto; margin-right: auto;',
649
- 'm-y': 'margin-top: auto; margin-bottom: auto;',
650
- 'm-t': 'margin-top: auto;',
651
- 'm-r': 'margin-right: auto;',
652
- 'm-b': 'margin-bottom: auto;',
653
- 'm-l': 'margin-left: auto;'
654
- };
655
- return autoMap[property] || '';
656
- }
657
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
658
- const map = {
659
- 'p': `padding: ${cssValue};`,
660
- 'p-t': `padding-top: ${cssValue};`,
661
- 'p-r': `padding-right: ${cssValue};`,
662
- 'p-b': `padding-bottom: ${cssValue};`,
663
- 'p-l': `padding-left: ${cssValue};`,
664
- 'p-x': `padding-left: ${cssValue}; padding-right: ${cssValue};`,
665
- 'p-y': `padding-top: ${cssValue}; padding-bottom: ${cssValue};`,
666
- 'm': `margin: ${cssValue};`,
667
- 'm-t': `margin-top: ${cssValue};`,
668
- 'm-r': `margin-right: ${cssValue};`,
669
- 'm-b': `margin-bottom: ${cssValue};`,
670
- 'm-l': `margin-left: ${cssValue};`,
671
- 'm-x': `margin-left: ${cssValue}; margin-right: ${cssValue};`,
672
- 'm-y': `margin-top: ${cssValue}; margin-bottom: ${cssValue};`,
673
- 'g': `gap: ${cssValue};`,
674
- 'g-x': `column-gap: ${cssValue};`,
675
- 'g-y': `row-gap: ${cssValue};`,
676
- 'w': `width: ${cssValue};`,
677
- 'h': `height: ${cssValue};`,
678
- 'min-w': `min-width: ${cssValue};`,
679
- 'max-w': `max-width: ${cssValue};`,
680
- 'min-h': `min-height: ${cssValue};`,
681
- 'max-h': `max-height: ${cssValue};`
682
- };
683
- return map[property] || '';
684
- }
685
- function generateVisualRule(token) {
686
- const { property, value, isArbitrary } = token;
687
- const typographyKeywords = {
688
- 'italic': 'font-style: italic;',
689
- 'not-italic': 'font-style: normal;',
690
- 'font-stretch-condensed': 'font-stretch: condensed;',
691
- 'font-stretch-expanded': 'font-stretch: expanded;',
692
- 'font-stretch-normal': 'font-stretch: normal;',
693
- 'antialiased': '-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;',
694
- 'subpixel-antialiased': '-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;',
695
- 'normal-nums': 'font-variant-numeric: normal;',
696
- 'ordinal': 'font-variant-numeric: ordinal;',
697
- 'slashed-zero': 'font-variant-numeric: slashed-zero;',
698
- 'lining-nums': 'font-variant-numeric: lining-nums;',
699
- 'oldstyle-nums': 'font-variant-numeric: oldstyle-nums;',
700
- 'proportional-nums': 'font-variant-numeric: proportional-nums;',
701
- 'tabular-nums': 'font-variant-numeric: tabular-nums;',
702
- 'uppercase': 'text-transform: uppercase;',
703
- 'lowercase': 'text-transform: lowercase;',
704
- 'capitalize': 'text-transform: capitalize;',
705
- 'normal-case': 'text-transform: none;',
706
- 'underline': 'text-decoration-line: underline;',
707
- 'overline': 'text-decoration-line: overline;',
708
- 'line-through': 'text-decoration-line: line-through;',
709
- 'no-underline': 'text-decoration-line: none;',
710
- 'decoration-solid': 'text-decoration-style: solid;',
711
- 'decoration-double': 'text-decoration-style: double;',
712
- 'decoration-dotted': 'text-decoration-style: dotted;',
713
- 'decoration-dashed': 'text-decoration-style: dashed;',
714
- 'decoration-wavy': 'text-decoration-style: wavy;',
715
- 'truncate': 'overflow: hidden; text-overflow: ellipsis; white-space: nowrap;',
716
- 'text-ellipsis': 'text-overflow: ellipsis;',
717
- 'text-clip': 'text-overflow: clip;',
718
- 'text-wrap': 'text-wrap: wrap;',
719
- 'text-nowrap': 'text-wrap: nowrap;',
720
- 'text-balance': 'text-wrap: balance;',
721
- 'text-pretty': 'text-wrap: pretty;',
722
- 'whitespace-normal': 'white-space: normal;',
723
- 'whitespace-nowrap': 'white-space: nowrap;',
724
- 'whitespace-pre': 'white-space: pre;',
725
- 'whitespace-pre-line': 'white-space: pre-line;',
726
- 'whitespace-pre-wrap': 'white-space: pre-wrap;',
727
- 'whitespace-break-spaces': 'white-space: break-spaces;',
728
- 'break-normal': 'overflow-wrap: normal; word-break: normal;',
729
- 'break-words': 'overflow-wrap: break-word;',
730
- 'break-all': 'word-break: break-all;',
731
- 'break-keep': 'word-break: keep-all;',
732
- 'hyphens-none': 'hyphens: none;',
733
- 'hyphens-manual': 'hyphens: manual;',
734
- 'hyphens-auto': 'hyphens: auto;',
735
- 'align-baseline': 'vertical-align: baseline;',
736
- 'align-top': 'vertical-align: top;',
737
- 'align-middle': 'vertical-align: middle;',
738
- 'align-bottom': 'vertical-align: bottom;',
739
- 'align-text-top': 'vertical-align: text-top;',
740
- 'align-text-bottom': 'vertical-align: text-bottom;',
741
- 'align-sub': 'vertical-align: sub;',
742
- 'align-super': 'vertical-align: super;',
743
- 'list-none': 'list-style-type: none;',
744
- 'list-disc': 'list-style-type: disc;',
745
- 'list-decimal': 'list-style-type: decimal;',
746
- 'list-square': 'list-style-type: square;',
747
- 'list-inside': 'list-style-position: inside;',
748
- 'list-outside': 'list-style-position: outside;'
749
- };
750
- if (typographyKeywords[property]) {
751
- return typographyKeywords[property];
752
- }
753
- const rules = {
754
- 'bg': () => {
755
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
756
- return `background-color: ${cssValue};`;
757
- },
758
- 'text': () => {
759
- if (['left', 'center', 'right', 'justify'].includes(value)) {
760
- return `text-align: ${value};`;
761
- }
762
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
763
- return `color: ${cssValue};`;
764
- },
765
- 'text-size': () => {
766
- const cssValue = isArbitrary ? value : `var(--font-${value})`;
767
- return `font-size: ${cssValue};`;
768
- },
769
- 'font': () => {
770
- const fontFamilies = {
771
- 'sans': 'ui-sans-serif, system-ui, sans-serif',
772
- 'serif': 'ui-serif, Georgia, serif',
773
- 'mono': 'ui-monospace, monospace'
774
- };
775
- if (fontFamilies[value]) {
776
- return `font-family: ${fontFamilies[value]};`;
777
- }
778
- return `font-weight: var(--fw-${value});`;
779
- },
780
- 'tracking': () => {
781
- const trackingScale = {
782
- 'tighter': '-0.05em',
783
- 'tight': '-0.025em',
784
- 'normal': '0',
785
- 'wide': '0.025em',
786
- 'wider': '0.05em',
787
- 'widest': '0.1em'
788
- };
789
- const cssValue = isArbitrary ? value : (trackingScale[value] || value);
790
- return `letter-spacing: ${cssValue};`;
791
- },
792
- 'leading': () => {
793
- const leadingScale = {
794
- 'none': '1',
795
- 'tight': '1.25',
796
- 'snug': '1.375',
797
- 'normal': '1.5',
798
- 'relaxed': '1.625',
799
- 'loose': '2'
800
- };
801
- const cssValue = isArbitrary ? value : (leadingScale[value] || value);
802
- return `line-height: ${cssValue};`;
803
- },
804
- 'line-clamp': () => {
805
- return `overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${value};`;
806
- },
807
- 'decoration': () => {
808
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
809
- return `text-decoration-color: ${cssValue};`;
810
- },
811
- 'decoration-thickness': () => {
812
- const cssValue = isArbitrary ? value : `${value}px`;
813
- return `text-decoration-thickness: ${cssValue};`;
814
- },
815
- 'underline-offset': () => {
816
- const cssValue = isArbitrary ? value : `${value}px`;
817
- return `text-underline-offset: ${cssValue};`;
818
- },
819
- 'indent': () => {
820
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
821
- return `text-indent: ${cssValue};`;
822
- },
823
- 'border': () => {
824
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
825
- return `border-color: ${cssValue}; border-style: solid;`;
826
- },
827
- 'border-t': () => {
828
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
829
- return `border-top-color: ${cssValue}; border-top-style: solid;`;
830
- },
831
- 'border-b': () => {
832
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
833
- return `border-bottom-color: ${cssValue}; border-bottom-style: solid;`;
834
- },
835
- 'border-l': () => {
836
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
837
- return `border-left-color: ${cssValue}; border-left-style: solid;`;
838
- },
839
- 'border-r': () => {
840
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
841
- return `border-right-color: ${cssValue}; border-right-style: solid;`;
842
- },
843
- 'border-x': () => {
844
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
845
- return `border-left-color: ${cssValue}; border-right-color: ${cssValue}; border-left-style: solid; border-right-style: solid;`;
846
- },
847
- 'border-y': () => {
848
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
849
- return `border-top-color: ${cssValue}; border-bottom-color: ${cssValue}; border-top-style: solid; border-bottom-style: solid;`;
850
- },
851
- 'border-w': () => {
852
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
853
- return `border-width: ${cssValue}; border-style: solid;`;
854
- },
855
- 'border-t-w': () => {
856
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
857
- return `border-top-width: ${cssValue}; border-top-style: solid;`;
858
- },
859
- 'border-b-w': () => {
860
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
861
- return `border-bottom-width: ${cssValue}; border-bottom-style: solid;`;
862
- },
863
- 'border-l-w': () => {
864
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
865
- return `border-left-width: ${cssValue}; border-left-style: solid;`;
866
- },
867
- 'border-r-w': () => {
868
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
869
- return `border-right-width: ${cssValue}; border-right-style: solid;`;
870
- },
871
- 'border-x-w': () => {
872
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
873
- return `border-left-width: ${cssValue}; border-right-width: ${cssValue}; border-left-style: solid; border-right-style: solid;`;
874
- },
875
- 'border-y-w': () => {
876
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
877
- return `border-top-width: ${cssValue}; border-bottom-width: ${cssValue}; border-top-style: solid; border-bottom-style: solid;`;
878
- },
879
- 'rounded': () => `border-radius: var(--r-${value});`,
880
- 'shadow': () => `box-shadow: var(--shadow-${value});`,
881
- 'opacity': () => {
882
- const opacityValue = isArbitrary ? value : (parseFloat(value) / 100);
883
- return `opacity: ${opacityValue};`;
884
- },
885
- 'content': () => `content: "${value}";`,
886
- 'scale': () => {
887
- const scaleValue = isArbitrary ? value : (parseFloat(value) / 100);
888
- return `transform: scale(${scaleValue});`;
889
- },
890
- 'scale-x': () => {
891
- const scaleValue = isArbitrary ? value : (parseFloat(value) / 100);
892
- return `transform: scaleX(${scaleValue});`;
893
- },
894
- 'scale-y': () => {
895
- const scaleValue = isArbitrary ? value : (parseFloat(value) / 100);
896
- return `transform: scaleY(${scaleValue});`;
897
- },
898
- 'rotate': () => {
899
- const rotateValue = isArbitrary ? value : `${value}deg`;
900
- return `transform: rotate(${rotateValue});`;
901
- },
902
- 'translate-x': () => {
903
- const translatePresets = { '0': '0', 'full': '100%', '1/2': '50%', '-full': '-100%', '-1/2': '-50%' };
904
- const cssValue = isArbitrary ? value : (translatePresets[value] || `var(--s-${value})`);
905
- return `transform: translateX(${cssValue});`;
906
- },
907
- 'translate-y': () => {
908
- const translatePresets = { '0': '0', 'full': '100%', '1/2': '50%', '-full': '-100%', '-1/2': '-50%' };
909
- const cssValue = isArbitrary ? value : (translatePresets[value] || `var(--s-${value})`);
910
- return `transform: translateY(${cssValue});`;
911
- },
912
- 'skew-x': () => {
913
- const skewValue = isArbitrary ? value : `${value}deg`;
914
- return `transform: skewX(${skewValue});`;
915
- },
916
- 'skew-y': () => {
917
- const skewValue = isArbitrary ? value : `${value}deg`;
918
- return `transform: skewY(${skewValue});`;
919
- },
920
- 'origin': () => {
921
- const originMap = {
922
- 'center': 'center',
923
- 'top': 'top',
924
- 'top-right': 'top right',
925
- 'right': 'right',
926
- 'bottom-right': 'bottom right',
927
- 'bottom': 'bottom',
928
- 'bottom-left': 'bottom left',
929
- 'left': 'left',
930
- 'top-left': 'top left'
931
- };
932
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (originMap[value] || value);
933
- return `transform-origin: ${cssValue};`;
934
- },
935
- 'transition': () => {
936
- const transitionMap = {
937
- 'none': 'transition-property: none;',
938
- 'all': 'transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;',
939
- 'colors': 'transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;',
940
- 'opacity': 'transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;',
941
- 'shadow': 'transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;',
942
- 'transform': 'transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;'
943
- };
944
- return transitionMap[value] || `transition-property: ${value};`;
945
- },
946
- 'duration': () => {
947
- const durationMap = {
948
- 'instant': '75ms',
949
- 'quick': '100ms',
950
- 'fast': '150ms',
951
- 'normal': '200ms',
952
- 'slow': '300ms',
953
- 'slower': '500ms',
954
- 'lazy': '700ms'
955
- };
956
- const cssValue = isArbitrary ? value : (durationMap[value] || `${value}ms`);
957
- return `transition-duration: ${cssValue};`;
958
- },
959
- 'ease': () => {
960
- const easeMap = {
961
- 'linear': 'linear',
962
- 'in': 'cubic-bezier(0.4, 0, 1, 1)',
963
- 'out': 'cubic-bezier(0, 0, 0.2, 1)',
964
- 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)'
965
- };
966
- const cssValue = easeMap[value] || value;
967
- return `transition-timing-function: ${cssValue};`;
968
- },
969
- 'delay': () => {
970
- const delayMap = {
971
- 'instant': '75ms',
972
- 'quick': '100ms',
973
- 'fast': '150ms',
974
- 'normal': '200ms',
975
- 'slow': '300ms'
976
- };
977
- const cssValue = isArbitrary ? value : (delayMap[value] || `${value}ms`);
978
- return `transition-delay: ${cssValue};`;
979
- },
980
- 'animate': () => {
981
- const animateMap = {
982
- 'none': 'animation: none;',
983
- 'spin': 'animation: spin 1s linear infinite;',
984
- 'ping': 'animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;',
985
- 'pulse': 'animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;',
986
- 'bounce': 'animation: bounce 1s infinite;'
987
- };
988
- return animateMap[value] || `animation: ${value};`;
989
- },
990
- 'blur': () => {
991
- const blurScale = {
992
- 'none': '0',
993
- 'sm': '4px',
994
- 'md': '8px',
995
- 'lg': '12px',
996
- 'xl': '16px',
997
- '2xl': '24px',
998
- '3xl': '40px'
999
- };
1000
- const cssValue = isArbitrary ? value : (blurScale[value] || `${value}px`);
1001
- return `filter: blur(${cssValue});`;
1002
- },
1003
- 'brightness': () => {
1004
- const brightnessScale = {
1005
- '0': '0',
1006
- '50': '0.5',
1007
- '75': '0.75',
1008
- '90': '0.9',
1009
- '95': '0.95',
1010
- '100': '1',
1011
- '105': '1.05',
1012
- '110': '1.1',
1013
- '125': '1.25',
1014
- '150': '1.5',
1015
- '200': '2'
1016
- };
1017
- const cssValue = isArbitrary ? value : (brightnessScale[value] || (parseFloat(value) / 100));
1018
- return `filter: brightness(${cssValue});`;
1019
- },
1020
- 'contrast': () => {
1021
- const contrastScale = {
1022
- '0': '0',
1023
- '50': '0.5',
1024
- '75': '0.75',
1025
- '100': '1',
1026
- '125': '1.25',
1027
- '150': '1.5',
1028
- '200': '2'
1029
- };
1030
- const cssValue = isArbitrary ? value : (contrastScale[value] || (parseFloat(value) / 100));
1031
- return `filter: contrast(${cssValue});`;
1032
- },
1033
- 'grayscale': () => {
1034
- const grayscaleScale = { '0': '0', '100': '1', 'full': '1' };
1035
- const cssValue = isArbitrary ? value : (grayscaleScale[value] || (parseFloat(value) / 100));
1036
- return `filter: grayscale(${cssValue});`;
1037
- },
1038
- 'hue-rotate': () => {
1039
- const cssValue = isArbitrary ? value : `${value}deg`;
1040
- return `filter: hue-rotate(${cssValue});`;
1041
- },
1042
- 'invert': () => {
1043
- const invertScale = { '0': '0', '100': '1', 'full': '1' };
1044
- const cssValue = isArbitrary ? value : (invertScale[value] || (parseFloat(value) / 100));
1045
- return `filter: invert(${cssValue});`;
1046
- },
1047
- 'saturate': () => {
1048
- const saturateScale = {
1049
- '0': '0',
1050
- '50': '0.5',
1051
- '100': '1',
1052
- '150': '1.5',
1053
- '200': '2'
1054
- };
1055
- const cssValue = isArbitrary ? value : (saturateScale[value] || (parseFloat(value) / 100));
1056
- return `filter: saturate(${cssValue});`;
1057
- },
1058
- 'sepia': () => {
1059
- const sepiaScale = { '0': '0', '100': '1', 'full': '1' };
1060
- const cssValue = isArbitrary ? value : (sepiaScale[value] || (parseFloat(value) / 100));
1061
- return `filter: sepia(${cssValue});`;
1062
- },
1063
- 'drop-shadow': () => {
1064
- const shadowMap = {
1065
- 'sm': 'drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))',
1066
- 'md': 'drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))',
1067
- 'lg': 'drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))',
1068
- 'xl': 'drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))',
1069
- '2xl': 'drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))',
1070
- 'none': 'drop-shadow(0 0 #0000)'
1071
- };
1072
- const cssValue = isArbitrary ? `drop-shadow(${value.replace(/_/g, ' ')})` : (shadowMap[value] || shadowMap['md']);
1073
- return `filter: ${cssValue};`;
1074
- },
1075
- 'bg-size': () => {
1076
- const sizeMap = { 'auto': 'auto', 'cover': 'cover', 'contain': 'contain' };
1077
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (sizeMap[value] || value);
1078
- return `background-size: ${cssValue};`;
1079
- },
1080
- 'bg-pos': () => {
1081
- const posMap = {
1082
- 'center': 'center',
1083
- 'top': 'top',
1084
- 'top-right': 'top right',
1085
- 'right': 'right',
1086
- 'bottom-right': 'bottom right',
1087
- 'bottom': 'bottom',
1088
- 'bottom-left': 'bottom left',
1089
- 'left': 'left',
1090
- 'top-left': 'top left'
1091
- };
1092
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (posMap[value] || value);
1093
- return `background-position: ${cssValue};`;
1094
- },
1095
- 'bg-repeat': () => {
1096
- const repeatMap = {
1097
- 'repeat': 'repeat',
1098
- 'no-repeat': 'no-repeat',
1099
- 'repeat-x': 'repeat-x',
1100
- 'repeat-y': 'repeat-y',
1101
- 'round': 'round',
1102
- 'space': 'space'
1103
- };
1104
- return `background-repeat: ${repeatMap[value] || value};`;
1105
- },
1106
- 'bg-attachment': () => {
1107
- return `background-attachment: ${value};`;
1108
- },
1109
- 'bg-clip': () => {
1110
- const clipMap = {
1111
- 'border': 'border-box',
1112
- 'padding': 'padding-box',
1113
- 'content': 'content-box',
1114
- 'text': 'text'
1115
- };
1116
- return `background-clip: ${clipMap[value] || value};`;
1117
- },
1118
- 'bg-origin': () => {
1119
- const originMap = {
1120
- 'border': 'border-box',
1121
- 'padding': 'padding-box',
1122
- 'content': 'content-box'
1123
- };
1124
- return `background-origin: ${originMap[value] || value};`;
1125
- },
1126
- 'bg-blend': () => {
1127
- return `background-blend-mode: ${value};`;
1128
- },
1129
- 'bg-image': () => {
1130
- const gradientMap = {
1131
- 'none': 'none',
1132
- 'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))',
1133
- 'gradient-to-tr': 'linear-gradient(to top right, var(--tw-gradient-stops))',
1134
- 'gradient-to-r': 'linear-gradient(to right, var(--tw-gradient-stops))',
1135
- 'gradient-to-br': 'linear-gradient(to bottom right, var(--tw-gradient-stops))',
1136
- 'gradient-to-b': 'linear-gradient(to bottom, var(--tw-gradient-stops))',
1137
- 'gradient-to-bl': 'linear-gradient(to bottom left, var(--tw-gradient-stops))',
1138
- 'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))',
1139
- 'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))'
1140
- };
1141
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (gradientMap[value] || value);
1142
- return `background-image: ${cssValue};`;
1143
- },
1144
- 'backdrop-blur': () => {
1145
- const blurScale = {
1146
- 'none': '0',
1147
- 'sm': '4px',
1148
- 'md': '8px',
1149
- 'lg': '12px',
1150
- 'xl': '16px',
1151
- '2xl': '24px',
1152
- '3xl': '40px'
1153
- };
1154
- const cssValue = isArbitrary ? value : (blurScale[value] || `${value}px`);
1155
- return `backdrop-filter: blur(${cssValue});`;
1156
- },
1157
- 'backdrop-brightness': () => {
1158
- const cssValue = isArbitrary ? value : (parseFloat(value) / 100);
1159
- return `backdrop-filter: brightness(${cssValue});`;
1160
- },
1161
- 'backdrop-contrast': () => {
1162
- const cssValue = isArbitrary ? value : (parseFloat(value) / 100);
1163
- return `backdrop-filter: contrast(${cssValue});`;
1164
- },
1165
- 'backdrop-grayscale': () => {
1166
- const grayscaleScale = { '0': '0', '100': '1', 'full': '1' };
1167
- const cssValue = isArbitrary ? value : (grayscaleScale[value] || (parseFloat(value) / 100));
1168
- return `backdrop-filter: grayscale(${cssValue});`;
1169
- },
1170
- 'backdrop-hue-rotate': () => {
1171
- const cssValue = isArbitrary ? value : `${value}deg`;
1172
- return `backdrop-filter: hue-rotate(${cssValue});`;
1173
- },
1174
- 'backdrop-invert': () => {
1175
- const invertScale = { '0': '0', '100': '1', 'full': '1' };
1176
- const cssValue = isArbitrary ? value : (invertScale[value] || (parseFloat(value) / 100));
1177
- return `backdrop-filter: invert(${cssValue});`;
1178
- },
1179
- 'backdrop-opacity': () => {
1180
- const cssValue = isArbitrary ? value : (parseFloat(value) / 100);
1181
- return `backdrop-filter: opacity(${cssValue});`;
1182
- },
1183
- 'backdrop-saturate': () => {
1184
- const cssValue = isArbitrary ? value : (parseFloat(value) / 100);
1185
- return `backdrop-filter: saturate(${cssValue});`;
1186
- },
1187
- 'backdrop-sepia': () => {
1188
- const sepiaScale = { '0': '0', '100': '1', 'full': '1' };
1189
- const cssValue = isArbitrary ? value : (sepiaScale[value] || (parseFloat(value) / 100));
1190
- return `backdrop-filter: sepia(${cssValue});`;
1191
- },
1192
- 'animation-duration': () => {
1193
- const durationMap = {
1194
- 'instant': '75ms',
1195
- 'quick': '100ms',
1196
- 'fast': '150ms',
1197
- 'normal': '200ms',
1198
- 'slow': '300ms',
1199
- 'slower': '500ms',
1200
- 'lazy': '700ms'
1201
- };
1202
- const cssValue = isArbitrary ? value : (durationMap[value] || `${value}ms`);
1203
- return `animation-duration: ${cssValue};`;
1204
- },
1205
- 'animation-delay': () => {
1206
- const delayMap = {
1207
- 'instant': '75ms',
1208
- 'quick': '100ms',
1209
- 'fast': '150ms',
1210
- 'normal': '200ms',
1211
- 'slow': '300ms'
1212
- };
1213
- const cssValue = isArbitrary ? value : (delayMap[value] || `${value}ms`);
1214
- return `animation-delay: ${cssValue};`;
1215
- },
1216
- 'animation-iteration': () => {
1217
- const iterationMap = { 'infinite': 'infinite', 'once': '1', 'twice': '2' };
1218
- const cssValue = iterationMap[value] || value;
1219
- return `animation-iteration-count: ${cssValue};`;
1220
- },
1221
- 'animation-direction': () => {
1222
- return `animation-direction: ${value};`;
1223
- },
1224
- 'animation-fill': () => {
1225
- return `animation-fill-mode: ${value};`;
1226
- },
1227
- 'animation-play': () => {
1228
- return `animation-play-state: ${value};`;
1229
- },
1230
- 'animation-timing': () => {
1231
- const easeMap = {
1232
- 'linear': 'linear',
1233
- 'in': 'cubic-bezier(0.4, 0, 1, 1)',
1234
- 'out': 'cubic-bezier(0, 0, 0.2, 1)',
1235
- 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)'
1236
- };
1237
- const cssValue = easeMap[value] || value;
1238
- return `animation-timing-function: ${cssValue};`;
1239
- },
1240
- 'scroll-behavior': () => {
1241
- return `scroll-behavior: ${value};`;
1242
- },
1243
- 'scroll-m': () => {
1244
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1245
- return `scroll-margin: ${cssValue};`;
1246
- },
1247
- 'scroll-m-x': () => {
1248
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1249
- return `scroll-margin-left: ${cssValue}; scroll-margin-right: ${cssValue};`;
1250
- },
1251
- 'scroll-m-y': () => {
1252
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1253
- return `scroll-margin-top: ${cssValue}; scroll-margin-bottom: ${cssValue};`;
1254
- },
1255
- 'scroll-p': () => {
1256
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1257
- return `scroll-padding: ${cssValue};`;
1258
- },
1259
- 'scroll-p-x': () => {
1260
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1261
- return `scroll-padding-left: ${cssValue}; scroll-padding-right: ${cssValue};`;
1262
- },
1263
- 'scroll-p-y': () => {
1264
- const cssValue = isArbitrary ? value : `var(--s-${value})`;
1265
- return `scroll-padding-top: ${cssValue}; scroll-padding-bottom: ${cssValue};`;
1266
- },
1267
- 'snap-align': () => {
1268
- return `scroll-snap-align: ${value};`;
1269
- },
1270
- 'snap-stop': () => {
1271
- return `scroll-snap-stop: ${value};`;
1272
- },
1273
- 'snap-type': () => {
1274
- const typeMap = {
1275
- 'none': 'none',
1276
- 'x': 'x mandatory',
1277
- 'y': 'y mandatory',
1278
- 'both': 'both mandatory',
1279
- 'x-proximity': 'x proximity',
1280
- 'y-proximity': 'y proximity'
1281
- };
1282
- return `scroll-snap-type: ${typeMap[value] || value};`;
1283
- },
1284
- 'touch': () => {
1285
- const touchMap = {
1286
- 'auto': 'auto',
1287
- 'none': 'none',
1288
- 'pan-x': 'pan-x',
1289
- 'pan-y': 'pan-y',
1290
- 'pan-left': 'pan-left',
1291
- 'pan-right': 'pan-right',
1292
- 'pan-up': 'pan-up',
1293
- 'pan-down': 'pan-down',
1294
- 'pinch-zoom': 'pinch-zoom',
1295
- 'manipulation': 'manipulation'
1296
- };
1297
- return `touch-action: ${touchMap[value] || value};`;
1298
- },
1299
- 'resize': () => {
1300
- const resizeMap = {
1301
- 'none': 'none',
1302
- 'both': 'both',
1303
- 'x': 'horizontal',
1304
- 'y': 'vertical'
1305
- };
1306
- return `resize: ${resizeMap[value] || value};`;
1307
- },
1308
- 'will-change': () => {
1309
- const willChangeMap = {
1310
- 'auto': 'auto',
1311
- 'scroll': 'scroll-position',
1312
- 'contents': 'contents',
1313
- 'transform': 'transform',
1314
- 'opacity': 'opacity'
1315
- };
1316
- return `will-change: ${willChangeMap[value] || value};`;
1317
- },
1318
- 'color-scheme': () => {
1319
- return `color-scheme: ${value};`;
1320
- },
1321
- 'field-sizing': () => {
1322
- return `field-sizing: ${value};`;
1323
- },
1324
- 'forced-color': () => {
1325
- return `forced-color-adjust: ${value};`;
1326
- },
1327
- 'border-style': () => {
1328
- return `border-style: ${value};`;
1329
- },
1330
- 'outline': () => {
1331
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
1332
- return `outline-color: ${cssValue};`;
1333
- },
1334
- 'outline-style': () => {
1335
- return `outline-style: ${value};`;
1336
- },
1337
- 'outline-w': () => {
1338
- const cssValue = isArbitrary ? value : `${value}px`;
1339
- return `outline-width: ${cssValue};`;
1340
- },
1341
- 'outline-offset': () => {
1342
- const cssValue = isArbitrary ? value : `${value}px`;
1343
- return `outline-offset: ${cssValue};`;
1344
- },
1345
- 'stroke': () => {
1346
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
1347
- return `stroke: ${cssValue};`;
1348
- },
1349
- 'stroke-w': () => {
1350
- const cssValue = isArbitrary ? value : value;
1351
- return `stroke-width: ${cssValue};`;
1352
- },
1353
- 'fill': () => {
1354
- if (value === 'none') return 'fill: none;';
1355
- const cssValue = isArbitrary ? value : `var(--c-${value})`;
1356
- return `fill: ${cssValue};`;
1357
- },
1358
- 'mix-blend': () => {
1359
- return `mix-blend-mode: ${value};`;
1360
- },
1361
- 'perspective': () => {
1362
- const perspectiveMap = {
1363
- 'none': 'none',
1364
- 'sm': '500px',
1365
- 'md': '1000px',
1366
- 'lg': '1500px',
1367
- 'xl': '2000px'
1368
- };
1369
- const cssValue = isArbitrary ? value : (perspectiveMap[value] || value);
1370
- return `perspective: ${cssValue};`;
1371
- },
1372
- 'perspective-origin': () => {
1373
- const originMap = {
1374
- 'center': 'center',
1375
- 'top': 'top',
1376
- 'top-right': 'top right',
1377
- 'right': 'right',
1378
- 'bottom-right': 'bottom right',
1379
- 'bottom': 'bottom',
1380
- 'bottom-left': 'bottom left',
1381
- 'left': 'left',
1382
- 'top-left': 'top left'
1383
- };
1384
- const cssValue = isArbitrary ? value.replace(/_/g, ' ') : (originMap[value] || value);
1385
- return `perspective-origin: ${cssValue};`;
1386
- },
1387
- 'rotate-x': () => {
1388
- const rotateValue = isArbitrary ? value : `${value}deg`;
1389
- return `transform: rotateX(${rotateValue});`;
1390
- },
1391
- 'rotate-y': () => {
1392
- const rotateValue = isArbitrary ? value : `${value}deg`;
1393
- return `transform: rotateY(${rotateValue});`;
1394
- },
1395
- 'rotate-z': () => {
1396
- const rotateValue = isArbitrary ? value : `${value}deg`;
1397
- return `transform: rotateZ(${rotateValue});`;
1398
- },
1399
- 'transform-style': () => {
1400
- return `transform-style: ${value};`;
1401
- },
1402
- 'backface': () => {
1403
- const backfaceMap = { 'visible': 'visible', 'hidden': 'hidden' };
1404
- return `backface-visibility: ${backfaceMap[value] || value};`;
1405
- }
1406
- };
1407
- const gen = rules[property];
1408
- return gen ? gen() : '';
1409
- }
1410
- function generateRule(raw, attrType) {
1411
- if (attrType === 'layout' && layoutKeywords[raw]) {
1412
- return `[layout~="${raw}"] { ${layoutKeywords[raw]} }\n`;
1413
- }
1414
- const token = parseToken(raw);
1415
- let cssDeclaration = '';
1416
- switch (attrType) {
1417
- case 'layout':
1418
- cssDeclaration = generateLayoutRule(token);
1419
- break;
1420
- case 'space':
1421
- cssDeclaration = generateSpaceRule(token);
1422
- break;
1423
- case 'visual':
1424
- cssDeclaration = generateVisualRule(token);
1425
- break;
1426
- }
1427
- if (!cssDeclaration) return '';
1428
- let selector = `[${attrType}~="${raw}"]`;
1429
- if (token.state && token.state !== 'dark') {
1430
- selector += `:${token.state}`;
1431
- }
1432
- return `${selector} { ${cssDeclaration} }\n`;
1433
- }
1434
- function scanDOM() {
1435
- const tokens = {
1436
- layout: new Set(),
1437
- space: new Set(),
1438
- visual: new Set()
1439
- };
1440
- const elements = document.querySelectorAll('[layout], [space], [visual]');
1441
- elements.forEach(el => {
1442
- ['layout', 'space', 'visual'].forEach(attr => {
1443
- const value = el.getAttribute(attr);
1444
- if (value) {
1445
- value.split(/\s+/).forEach(token => {
1446
- if (token) tokens[attr].add(token);
1447
- });
1448
- }
1449
- });
1450
- });
1451
- return tokens;
1452
- }
1453
- function compileCSS(tokens, config) {
1454
- let css = generateCSSVariables(config);
1455
- if (config.preflight !== false) {
1456
- css += generatePreflight();
1457
- }
1458
- const baseRules = [];
1459
- const darkRules = [];
1460
- const mediaRules = {
1461
- mob: [],
1462
- tab: [],
1463
- lap: [],
1464
- desk: []
1465
- };
1466
- for (const [attrType, values] of Object.entries(tokens)) {
1467
- for (const raw of values) {
1468
- const rule = generateRule(raw, attrType);
1469
- if (rule) {
1470
- if (raw.match(/^(mob:|tab:|lap:|desk:)?dark:/)) {
1471
- darkRules.push(rule);
1472
- }
1473
- else {
1474
- const bpMatch = raw.match(/^(mob|tab|lap|desk):/);
1475
- if (bpMatch) {
1476
- mediaRules[bpMatch[1]].push(rule);
1477
- } else {
1478
- baseRules.push(rule);
1479
- }
1480
- }
1481
- }
1482
- }
1483
- }
1484
- css += baseRules.join('');
1485
- const { screens } = config.theme;
1486
- for (const [bp, rules] of Object.entries(mediaRules)) {
1487
- if (rules.length > 0) {
1488
- css += `\n@media (min-width: ${screens[bp]}) {\n`;
1489
- css += rules.map(r => ' ' + r).join('');
1490
- css += '}\n';
1491
- }
1492
- }
1493
- if (darkRules.length > 0) {
1494
- const darkMode = config.darkMode || 'media';
1495
- if (darkMode === 'media') {
1496
- css += `\n@media (prefers-color-scheme: dark) {\n`;
1497
- css += darkRules.map(r => ' ' + r).join('');
1498
- css += '}\n';
1499
- } else {
1500
- const darkSelector = Array.isArray(darkMode) ? darkMode[1] : '.dark';
1501
- css += `\n\n`;
1502
- for (const rule of darkRules) {
1503
- css += rule.replace(/^(\[[^\]]+\])/, `${darkSelector} $1`);
1504
- }
1505
- }
1506
- }
1507
- return css;
1508
- }
1509
- function injectStyles(css) {
1510
- let styleEl = document.getElementById('senangstart-jit');
1511
- if (!styleEl) {
1512
- styleEl = document.createElement('style');
1513
- styleEl.id = 'senangstart-jit';
1514
- document.head.appendChild(styleEl);
1515
- }
1516
- styleEl.textContent = css;
1517
- }
1518
- function init() {
1519
- const userConfig = loadInlineConfig();
1520
- const config = mergeConfig(userConfig);
1521
- const tokens = scanDOM();
1522
- const css = compileCSS(tokens, config);
1523
- injectStyles(css);
1524
- const observer = new MutationObserver(() => {
1525
- const newTokens = scanDOM();
1526
- const newCSS = compileCSS(newTokens, config);
1527
- injectStyles(newCSS);
1528
- });
1529
- observer.observe(document.body, {
1530
- childList: true,
1531
- subtree: true,
1532
- attributes: true,
1533
- attributeFilter: ['layout', 'space', 'visual']
1534
- });
1535
- console.log('%c[SenangStart CSS]%c JIT runtime initialized ✓',
1536
- 'color: #2563EB; font-weight: bold;',
1537
- 'color: #10B981;'
1538
- );
1539
- }
1540
- if (document.readyState === 'loading') {
1541
- document.addEventListener('DOMContentLoaded', init);
1542
- } else {
1543
- init();
1544
- }
1545
- })();
187
+ 0%, 100% {
188
+ transform: translateY(-25%);
189
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
190
+ }
191
+ 50% {
192
+ transform: none;
193
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
194
+ }
195
+ }
196
+
197
+ `}let v={flex:"display: flex;",grid:"display: grid;","inline-flex":"display: inline-flex;","inline-grid":"display: inline-grid;",block:"display: block;",inline:"display: inline-block;",hidden:"display: none;",row:"flex-direction: row;",col:"flex-direction: column;","row-reverse":"flex-direction: row-reverse;","col-reverse":"flex-direction: column-reverse;",wrap:"flex-wrap: wrap;",nowrap:"flex-wrap: nowrap;","wrap-reverse":"flex-wrap: wrap-reverse;",grow:"flex-grow: 1;","grow-0":"flex-grow: 0;",shrink:"flex-shrink: 1;","shrink-0":"flex-shrink: 0;","grid-flow-row":"grid-auto-flow: row;","grid-flow-col":"grid-auto-flow: column;","grid-flow-dense":"grid-auto-flow: dense;","grid-flow-row-dense":"grid-auto-flow: row dense;","grid-flow-col-dense":"grid-auto-flow: column dense;",center:"justify-content: center; align-items: center;",start:"justify-content: flex-start; align-items: flex-start;",end:"justify-content: flex-end; align-items: flex-end;",between:"justify-content: space-between;",around:"justify-content: space-around;",evenly:"justify-content: space-evenly;",absolute:"position: absolute;",relative:"position: relative;",fixed:"position: fixed;",sticky:"position: sticky;",static:"position: static;",visible:"visibility: visible;",invisible:"visibility: hidden;",isolate:"isolation: isolate;","isolate-auto":"isolation: auto;","box-border":"box-sizing: border-box;","box-content":"box-sizing: content-box;","float-left":"float: left;","float-right":"float: right;","float-none":"float: none;","clear-left":"clear: left;","clear-right":"clear: right;","clear-both":"clear: both;","clear-none":"clear: none;",container:"width: 100%; margin-left: auto; margin-right: auto;","border-collapse":"border-collapse: collapse;","border-separate":"border-collapse: separate;"},P=h,I=w;function j(s){let{property:n,value:e,isArbitrary:r}=s;if(n==="container")return"width: 100%; margin-left: auto; margin-right: auto;";if(n==="justify")return`justify-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="justify-items")return`justify-items: ${e};`;if(n==="justify-self")return`justify-self: ${e};`;if(n==="content")return`align-content: ${{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="items")return`align-items: ${{start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="self")return`align-self: ${{auto:"auto",start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"}[e]||e};`;if(n==="place-content")return`place-content: ${{start:"start",end:"end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",stretch:"stretch"}[e]||e};`;if(n==="place-items")return`place-items: ${e};`;if(n==="place-self")return`place-self: ${e};`;if(n==="z")return`z-index: var(--z-${e});`;if(n==="overflow")return`overflow: ${e};`;if(n==="overflow-x")return`overflow-x: ${e};`;if(n==="overflow-y")return`overflow-y: ${e};`;if(n==="aspect")return`aspect-ratio: ${r?e.replace(/_/g," "):{square:"1 / 1",video:"16 / 9",auto:"auto"}[e]||e};`;if(n==="object")return`object-fit: ${e};`;if(n==="object-pos")return`object-position: ${r?e.replace(/_/g," "):e};`;if(n==="inset")return`inset: ${r?e:e==="0"?"0":`var(--s-${e})`};`;if(["top","right","bottom","left"].includes(n)){let o=r?e:e==="0"?"0":`var(--s-${e})`;return`${n}: ${o};`}if(n==="inset-x"){let o=r?e:e==="0"?"0":`var(--s-${e})`;return`left: ${o}; right: ${o};`}if(n==="inset-y"){let o=r?e:e==="0"?"0":`var(--s-${e})`;return`top: ${o}; bottom: ${o};`}return n==="cols"?`columns: ${e};`:n==="overscroll"?`overscroll-behavior: ${e};`:n==="overscroll-x"?`overscroll-behavior-x: ${e};`:n==="overscroll-y"?`overscroll-behavior-y: ${e};`:n==="basis"?`flex-basis: ${r?e:`var(--s-${e})`};`:n==="flex"?`flex: ${r?e.replace(/_/g," "):{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"}[e]||e};`:n==="order"?`order: ${{first:"-9999",last:"9999",none:"0"}[e]||e};`:n==="grid-cols"?e==="none"?"grid-template-columns: none;":e==="subgrid"?"grid-template-columns: subgrid;":r?`grid-template-columns: ${e.replace(/_/g," ")};`:`grid-template-columns: repeat(${e}, minmax(0, 1fr));`:n==="grid-rows"?e==="none"?"grid-template-rows: none;":e==="subgrid"?"grid-template-rows: subgrid;":r?`grid-template-rows: ${e.replace(/_/g," ")};`:`grid-template-rows: repeat(${e}, minmax(0, 1fr));`:n==="col-span"?e==="full"?"grid-column: 1 / -1;":`grid-column: span ${e} / span ${e};`:n==="col-start"?`grid-column-start: ${e};`:n==="col-end"?`grid-column-end: ${e};`:n==="row-span"?e==="full"?"grid-row: 1 / -1;":`grid-row: span ${e} / span ${e};`:n==="row-start"?`grid-row-start: ${e};`:n==="row-end"?`grid-row-end: ${e};`:n==="auto-cols"?`grid-auto-columns: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="auto-rows"?`grid-auto-rows: ${r?e:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"}[e]||e};`:n==="table"?`table-layout: ${{auto:"auto",fixed:"fixed"}[e]||e};`:n==="caption"?`caption-side: ${e};`:n==="border-spacing"?`border-spacing: ${r?e:`var(--s-${e})`};`:n==="border-spacing-x"?`border-spacing: ${r?e:`var(--s-${e})`} 0;`:n==="border-spacing-y"?`border-spacing: 0 ${r?e:`var(--s-${e})`};`:v[n]||""}function T(s){let{property:n,value:e,isArbitrary:r}=s;if(e==="auto")return{m:"margin: auto;","m-x":"margin-left: auto; margin-right: auto;","m-y":"margin-top: auto; margin-bottom: auto;","m-t":"margin-top: auto;","m-r":"margin-right: auto;","m-b":"margin-bottom: auto;","m-l":"margin-left: auto;"}[n]||"";let o;return r?o=e:e.startsWith("tw-")?o=`var(--tw-${e.slice(3)})`:o=`var(--s-${e})`,{p:`padding: ${o};`,"p-t":`padding-top: ${o};`,"p-r":`padding-right: ${o};`,"p-b":`padding-bottom: ${o};`,"p-l":`padding-left: ${o};`,"p-x":`padding-left: ${o}; padding-right: ${o};`,"p-y":`padding-top: ${o}; padding-bottom: ${o};`,m:`margin: ${o};`,"m-t":`margin-top: ${o};`,"m-r":`margin-right: ${o};`,"m-b":`margin-bottom: ${o};`,"m-l":`margin-left: ${o};`,"m-x":`margin-left: ${o}; margin-right: ${o};`,"m-y":`margin-top: ${o}; margin-bottom: ${o};`,g:`gap: ${o};`,"g-x":`column-gap: ${o};`,"g-y":`row-gap: ${o};`,w:`width: ${o};`,h:`height: ${o};`,"min-w":`min-width: ${o};`,"max-w":`max-width: ${o};`,"min-h":`min-height: ${o};`,"max-h":`max-height: ${o};`}[n]||""}function O(s){let{property:n,value:e,isArbitrary:r}=s,o={italic:"font-style: italic;","not-italic":"font-style: normal;","font-stretch-condensed":"font-stretch: condensed;","font-stretch-expanded":"font-stretch: expanded;","font-stretch-normal":"font-stretch: normal;",antialiased:"-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;","subpixel-antialiased":"-webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;","normal-nums":"font-variant-numeric: normal;",ordinal:"font-variant-numeric: ordinal;","slashed-zero":"font-variant-numeric: slashed-zero;","lining-nums":"font-variant-numeric: lining-nums;","oldstyle-nums":"font-variant-numeric: oldstyle-nums;","proportional-nums":"font-variant-numeric: proportional-nums;","tabular-nums":"font-variant-numeric: tabular-nums;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;","normal-case":"text-transform: none;",underline:"text-decoration-line: underline;",overline:"text-decoration-line: overline;","line-through":"text-decoration-line: line-through;","no-underline":"text-decoration-line: none;","decoration-solid":"text-decoration-style: solid;","decoration-double":"text-decoration-style: double;","decoration-dotted":"text-decoration-style: dotted;","decoration-dashed":"text-decoration-style: dashed;","decoration-wavy":"text-decoration-style: wavy;",truncate:"overflow: hidden; text-overflow: ellipsis; white-space: nowrap;","text-ellipsis":"text-overflow: ellipsis;","text-clip":"text-overflow: clip;","text-wrap":"text-wrap: wrap;","text-nowrap":"text-wrap: nowrap;","text-balance":"text-wrap: balance;","text-pretty":"text-wrap: pretty;","whitespace-normal":"white-space: normal;","whitespace-nowrap":"white-space: nowrap;","whitespace-pre":"white-space: pre;","whitespace-pre-line":"white-space: pre-line;","whitespace-pre-wrap":"white-space: pre-wrap;","whitespace-break-spaces":"white-space: break-spaces;","break-normal":"overflow-wrap: normal; word-break: normal;","break-words":"overflow-wrap: break-word;","break-all":"word-break: break-all;","break-keep":"word-break: keep-all;","hyphens-none":"hyphens: none;","hyphens-manual":"hyphens: manual;","hyphens-auto":"hyphens: auto;","align-baseline":"vertical-align: baseline;","align-top":"vertical-align: top;","align-middle":"vertical-align: middle;","align-bottom":"vertical-align: bottom;","align-text-top":"vertical-align: text-top;","align-text-bottom":"vertical-align: text-bottom;","align-sub":"vertical-align: sub;","align-super":"vertical-align: super;","list-none":"list-style-type: none;","list-disc":"list-style-type: disc;","list-decimal":"list-style-type: decimal;","list-square":"list-style-type: square;","list-inside":"list-style-position: inside;","list-outside":"list-style-position: outside;"};if(o[n])return o[n];let f={bg:()=>`background-color: ${r?e:`var(--c-${e})`};`,text:()=>["left","center","right","justify"].includes(e)?`text-align: ${e};`:`color: ${r?e:`var(--c-${e})`};`,"text-size":()=>{let t,i;if(r)return t=e,`font-size: ${t};`;if(e.startsWith("tw-")){let p=e.slice(3);t=`var(--tw-text-${p})`,i=`var(--tw-leading-${p})`}else t=`var(--font-${e})`,i=`var(--font-lh-${e})`;return`font-size: ${t}; line-height: ${i};`},font:()=>{let t={sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, monospace"};if(t[e])return`font-family: ${t[e]};`;let i;return r?i=e:e.startsWith("tw-")?i=`var(--tw-font-${e.slice(3)})`:i=`var(--fw-${e})`,`font-weight: ${i};`},tracking:()=>`letter-spacing: ${r?e:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"}[e]||e};`,leading:()=>`line-height: ${r?e:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"}[e]||e};`,"line-clamp":()=>`overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${e};`,decoration:()=>`text-decoration-color: ${r?e:`var(--c-${e})`};`,"decoration-thickness":()=>`text-decoration-thickness: ${r?e:`${e}px`};`,"underline-offset":()=>`text-underline-offset: ${r?e:`${e}px`};`,indent:()=>`text-indent: ${r?e:`var(--s-${e})`};`,border:()=>`border-color: ${r?e:`var(--c-${e})`}; border-style: solid;`,"border-t":()=>`border-top-color: ${r?e:`var(--c-${e})`}; border-top-style: solid;`,"border-b":()=>`border-bottom-color: ${r?e:`var(--c-${e})`}; border-bottom-style: solid;`,"border-l":()=>`border-left-color: ${r?e:`var(--c-${e})`}; border-left-style: solid;`,"border-r":()=>`border-right-color: ${r?e:`var(--c-${e})`}; border-right-style: solid;`,"border-x":()=>{let t=r?e:`var(--c-${e})`;return`border-left-color: ${t}; border-right-color: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y":()=>{let t=r?e:`var(--c-${e})`;return`border-top-color: ${t}; border-bottom-color: ${t}; border-top-style: solid; border-bottom-style: solid;`},"border-w":()=>`border-width: ${r?e:`var(--s-${e})`}; border-style: solid;`,"border-t-w":()=>`border-top-width: ${r?e:`var(--s-${e})`}; border-top-style: solid;`,"border-b-w":()=>`border-bottom-width: ${r?e:`var(--s-${e})`}; border-bottom-style: solid;`,"border-l-w":()=>`border-left-width: ${r?e:`var(--s-${e})`}; border-left-style: solid;`,"border-r-w":()=>`border-right-width: ${r?e:`var(--s-${e})`}; border-right-style: solid;`,"border-x-w":()=>{let t=r?e:`var(--s-${e})`;return`border-left-width: ${t}; border-right-width: ${t}; border-left-style: solid; border-right-style: solid;`},"border-y-w":()=>{let t=r?e:`var(--s-${e})`;return`border-top-width: ${t}; border-bottom-width: ${t}; border-top-style: solid; border-bottom-style: solid;`},rounded:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-rounded-${e.slice(3)})`:t=`var(--r-${e})`,`border-radius: ${t};`},shadow:()=>{let t;return r?t=e:e.startsWith("tw-")?t=`var(--tw-shadow-${e.slice(3)})`:t=`var(--shadow-${e})`,`box-shadow: ${t};`},opacity:()=>`opacity: ${r?e:parseFloat(e)/100};`,content:()=>`content: "${e}";`,scale:()=>`transform: scale(${r?e:parseFloat(e)/100});`,"scale-x":()=>`transform: scaleX(${r?e:parseFloat(e)/100});`,"scale-y":()=>`transform: scaleY(${r?e:parseFloat(e)/100});`,rotate:()=>`transform: rotate(${r?e:`${e}deg`});`,"translate-x":()=>`transform: translateX(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"translate-y":()=>`transform: translateY(${r?e:{0:"0",full:"100%","1/2":"50%","-full":"-100%","-1/2":"-50%"}[e]||`var(--s-${e})`});`,"skew-x":()=>`transform: skewX(${r?e:`${e}deg`});`,"skew-y":()=>`transform: skewY(${r?e:`${e}deg`});`,origin:()=>`transform-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,transition:()=>({none:"transition-property: none;",all:"transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",colors:"transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",opacity:"transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",shadow:"transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;",transform:"transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms;"})[e]||`transition-property: ${e};`,duration:()=>`transition-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,ease:()=>`transition-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,delay:()=>`transition-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,animate:()=>({none:"animation: none;",spin:"animation: spin 1s linear infinite;",ping:"animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;",pulse:"animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;",bounce:"animation: bounce 1s infinite;"})[e]||`animation: ${e};`,blur:()=>`filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,brightness:()=>`filter: brightness(${r?e:{0:"0",50:"0.5",75:"0.75",90:"0.9",95:"0.95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,contrast:()=>`filter: contrast(${r?e:{0:"0",50:"0.5",75:"0.75",100:"1",125:"1.25",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,grayscale:()=>`filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"hue-rotate":()=>`filter: hue-rotate(${r?e:`${e}deg`});`,invert:()=>`filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,saturate:()=>`filter: saturate(${r?e:{0:"0",50:"0.5",100:"1",150:"1.5",200:"2"}[e]||parseFloat(e)/100});`,sepia:()=>`filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"drop-shadow":()=>{let t={sm:"drop-shadow(0 1px 1px rgb(0 0 0 / 0.05))",md:"drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06))",lg:"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",xl:"drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08))","2xl":"drop-shadow(0 25px 25px rgb(0 0 0 / 0.15))",none:"drop-shadow(0 0 #0000)"};return`filter: ${r?`drop-shadow(${e.replace(/_/g," ")})`:t[e]||t.md};`},"bg-size":()=>`background-size: ${r?e.replace(/_/g," "):{auto:"auto",cover:"cover",contain:"contain"}[e]||e};`,"bg-pos":()=>`background-position: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"bg-repeat":()=>`background-repeat: ${{repeat:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",round:"round",space:"space"}[e]||e};`,"bg-attachment":()=>`background-attachment: ${e};`,"bg-clip":()=>`background-clip: ${{border:"border-box",padding:"padding-box",content:"content-box",text:"text"}[e]||e};`,"bg-origin":()=>`background-origin: ${{border:"border-box",padding:"padding-box",content:"content-box"}[e]||e};`,"bg-blend":()=>`background-blend-mode: ${e};`,"bg-image":()=>`background-image: ${r?e.replace(/_/g," "):{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"}[e]||e};`,"backdrop-blur":()=>`backdrop-filter: blur(${r?e:{none:"0",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px","3xl":"40px"}[e]||`${e}px`});`,"backdrop-brightness":()=>`backdrop-filter: brightness(${r?e:parseFloat(e)/100});`,"backdrop-contrast":()=>`backdrop-filter: contrast(${r?e:parseFloat(e)/100});`,"backdrop-grayscale":()=>`backdrop-filter: grayscale(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-hue-rotate":()=>`backdrop-filter: hue-rotate(${r?e:`${e}deg`});`,"backdrop-invert":()=>`backdrop-filter: invert(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"backdrop-opacity":()=>`backdrop-filter: opacity(${r?e:parseFloat(e)/100});`,"backdrop-saturate":()=>`backdrop-filter: saturate(${r?e:parseFloat(e)/100});`,"backdrop-sepia":()=>`backdrop-filter: sepia(${r?e:{0:"0",100:"1",full:"1"}[e]||parseFloat(e)/100});`,"animation-duration":()=>`animation-duration: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",lazy:"700ms"}[e]||`${e}ms`};`,"animation-delay":()=>`animation-delay: ${r?e:{instant:"75ms",quick:"100ms",fast:"150ms",normal:"200ms",slow:"300ms"}[e]||`${e}ms`};`,"animation-iteration":()=>`animation-iteration-count: ${{infinite:"infinite",once:"1",twice:"2"}[e]||e};`,"animation-direction":()=>`animation-direction: ${e};`,"animation-fill":()=>`animation-fill-mode: ${e};`,"animation-play":()=>`animation-play-state: ${e};`,"animation-timing":()=>`animation-timing-function: ${{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}[e]||e};`,"scroll-behavior":()=>`scroll-behavior: ${e};`,"scroll-m":()=>`scroll-margin: ${r?e:`var(--s-${e})`};`,"scroll-m-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-left: ${t}; scroll-margin-right: ${t};`},"scroll-m-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-margin-top: ${t}; scroll-margin-bottom: ${t};`},"scroll-p":()=>`scroll-padding: ${r?e:`var(--s-${e})`};`,"scroll-p-x":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-left: ${t}; scroll-padding-right: ${t};`},"scroll-p-y":()=>{let t=r?e:`var(--s-${e})`;return`scroll-padding-top: ${t}; scroll-padding-bottom: ${t};`},"snap-align":()=>`scroll-snap-align: ${e};`,"snap-stop":()=>`scroll-snap-stop: ${e};`,"snap-type":()=>`scroll-snap-type: ${{none:"none",x:"x mandatory",y:"y mandatory",both:"both mandatory","x-proximity":"x proximity","y-proximity":"y proximity"}[e]||e};`,touch:()=>`touch-action: ${{auto:"auto",none:"none","pan-x":"pan-x","pan-y":"pan-y","pan-left":"pan-left","pan-right":"pan-right","pan-up":"pan-up","pan-down":"pan-down","pinch-zoom":"pinch-zoom",manipulation:"manipulation"}[e]||e};`,resize:()=>`resize: ${{none:"none",both:"both",x:"horizontal",y:"vertical"}[e]||e};`,"will-change":()=>`will-change: ${{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform",opacity:"opacity"}[e]||e};`,"color-scheme":()=>`color-scheme: ${e};`,"field-sizing":()=>`field-sizing: ${e};`,"forced-color":()=>`forced-color-adjust: ${e};`,"border-style":()=>`border-style: ${e};`,outline:()=>`outline-color: ${r?e:`var(--c-${e})`};`,"outline-style":()=>`outline-style: ${e};`,"outline-w":()=>`outline-width: ${r?e:`${e}px`};`,"outline-offset":()=>`outline-offset: ${r?e:`${e}px`};`,stroke:()=>`stroke: ${r?e:`var(--c-${e})`};`,"stroke-w":()=>`stroke-width: ${e};`,fill:()=>e==="none"?"fill: none;":`fill: ${r?e:`var(--c-${e})`};`,"mix-blend":()=>`mix-blend-mode: ${e};`,perspective:()=>`perspective: ${r?e:{none:"none",sm:"500px",md:"1000px",lg:"1500px",xl:"2000px"}[e]||e};`,"perspective-origin":()=>`perspective-origin: ${r?e.replace(/_/g," "):{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"}[e]||e};`,"rotate-x":()=>`transform: rotateX(${r?e:`${e}deg`});`,"rotate-y":()=>`transform: rotateY(${r?e:`${e}deg`});`,"rotate-z":()=>`transform: rotateZ(${r?e:`${e}deg`});`,"transform-style":()=>`transform-style: ${e};`,backface:()=>`backface-visibility: ${{visible:"visible",hidden:"hidden"}[e]||e};`}[n];return f?f():""}function E(s,n){if(n==="layout"&&v[s])return`[layout~="${s}"] { ${v[s]} }
198
+ `;let e=S(s),r="";switch(n){case"layout":r=j(e);break;case"space":r=T(e);break;case"visual":r=O(e);break}if(!r)return"";let o=`[${n}~="${s}"]`;e.state&&e.state!=="dark"&&(o+=`:${e.state}`);let u=`${o} { ${r} }
199
+ `;if(e.state==="dark"&&(u=`:where(.dark) ${u}`),e.breakpoint){let f=l.theme.screens[e.breakpoint];if(f)return`@media (min-width: ${f}) { ${u} }
200
+ `}return u}function k(){let s={layout:new Set,space:new Set,visual:new Set};return document.querySelectorAll("[layout], [space], [visual]").forEach(e=>{["layout","space","visual"].forEach(r=>{let o=e.getAttribute(r);o&&o.split(/\s+/).forEach(u=>{u&&s[r].add(u)})})}),s}function A(s,n){let e=x(n);n.preflight!==!1&&(e+=$());let r=[];for(let[a,m]of Object.entries(s))for(let F of m)r.push({raw:F,attrType:a});let o=[],u=[],f={},{screens:t}=n.theme;for(let a of Object.keys(t))f[a]=[];for(let a of r){let m=M(a.raw,a.attrType);m.state==="dark"?u.push(m):m.breakpoint?(f[m.breakpoint]||(f[m.breakpoint]=[]),f[m.breakpoint].push(m)):o.push(m)}let i=["flex","grid","inline-flex","inline-grid","block","inline","hidden","contents"],p=new Map;for(let a of o)a.attrType&&i.includes(a.property)&&(p.has(a.attrType)||p.set(a.attrType,new Set),p.get(a.attrType).add(a.raw));for(let a of o)e+=E(a.raw,a.attrType);for(let[a,m]of Object.entries(f))if(m.length>0){e+=`
201
+ @media (min-width: ${t[a]}) {
202
+ `;let F=new Set;for(let b of m)if(b.attrType&&i.includes(b.property)&&p.has(b.attrType)){let C=p.get(b.attrType);if(C.size>0&&!C.has(b.raw)&&!F.has(b.raw)){let _=`[${b.attrType}~="${b.raw}"]`;e+=` ${_} { display: revert-layer; }
203
+ `,F.add(b.raw)}}for(let b of m)e+=" "+E(b.raw,b.attrType);e+=`}
204
+ `}if(u.length>0){let a=n.darkMode||"media";if(a==="media"){e+=`
205
+ @media (prefers-color-scheme: dark) {
206
+ `;for(let m of u)e+=" "+E(m.raw,m.attrType);e+=`}
207
+ `}else{let m=Array.isArray(a)?a[1]:".dark";e+=`
208
+ /* Dark Mode */
209
+ `;for(let F of u){let b=E(F.raw,F.attrType);e+=b.replace(/^(\[[^\]]+\])/,`${m} $1`)}}}return e}function D(s){let n=document.getElementById("senangstart-jit");n||(n=document.createElement("style"),n.id="senangstart-jit",document.head.appendChild(n)),n.textContent=s}function V(){let s=d(),n=g(s),e=k(),r=A(e,n);D(r),new MutationObserver(()=>{let u=k(),f=A(u,n);D(f)}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["layout","space","visual"]}),console.log("%c[SenangStart CSS]%c JIT runtime initialized \u2713","color: #2563EB; font-weight: bold;","color: #10B981;")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",V):V()})();})();