@alivecss/aliveui 1.0.2 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vite.js CHANGED
@@ -610,6 +610,9 @@ function generateBase(_config) {
610
610
  ::before,
611
611
  ::after {
612
612
  box-sizing: border-box;
613
+ border-width: 0;
614
+ border-style: solid;
615
+ border-color: currentColor;
613
616
  }
614
617
 
615
618
  html {
@@ -629,6 +632,39 @@ body {
629
632
  -moz-osx-font-smoothing: grayscale;
630
633
  }
631
634
 
635
+ blockquote,
636
+ dl,
637
+ dd,
638
+ h1,
639
+ h2,
640
+ h3,
641
+ h4,
642
+ h5,
643
+ h6,
644
+ hr,
645
+ figure,
646
+ p,
647
+ pre {
648
+ margin: 0;
649
+ }
650
+
651
+ fieldset {
652
+ margin: 0;
653
+ padding: 0;
654
+ }
655
+
656
+ legend {
657
+ padding: 0;
658
+ }
659
+
660
+ ol,
661
+ ul,
662
+ menu {
663
+ list-style: none;
664
+ margin: 0;
665
+ padding: 0;
666
+ }
667
+
632
668
  button,
633
669
  input,
634
670
  optgroup,
@@ -638,9 +674,24 @@ textarea {
638
674
  font-size: 100%;
639
675
  font-weight: inherit;
640
676
  line-height: inherit;
677
+ letter-spacing: inherit;
641
678
  color: inherit;
642
679
  margin: 0;
643
680
  padding: 0;
681
+ background-color: transparent;
682
+ background-image: none;
683
+ }
684
+
685
+ button,
686
+ [type='button'],
687
+ [type='reset'],
688
+ [type='submit'] {
689
+ -webkit-appearance: button;
690
+ cursor: pointer;
691
+ }
692
+
693
+ :disabled {
694
+ cursor: default;
644
695
  }
645
696
 
646
697
  button,
@@ -648,6 +699,28 @@ select {
648
699
  text-transform: none;
649
700
  }
650
701
 
702
+ img,
703
+ svg,
704
+ video,
705
+ canvas,
706
+ audio,
707
+ iframe,
708
+ embed,
709
+ object {
710
+ display: block;
711
+ vertical-align: middle;
712
+ }
713
+
714
+ img,
715
+ video {
716
+ max-width: 100%;
717
+ height: auto;
718
+ }
719
+
720
+ [hidden] {
721
+ display: none;
722
+ }
723
+
651
724
  /* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
652
725
  :root {
653
726
  /* Motion durations */
@@ -845,6 +918,30 @@ select {
845
918
  .alive-loop-ping { animation: alive-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
846
919
  .alive-loop-bounce { animation: alive-bounce 1s infinite; }
847
920
 
921
+ /* \u2500\u2500 Scroll-reveal (data-alive-scroll) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
922
+
923
+ [data-alive-scroll] {
924
+ opacity: 0;
925
+ transform: translateY(8px);
926
+ }
927
+ [data-alive-scroll].is-visible {
928
+ animation: alive-fade-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
929
+ }
930
+ [data-alive-scroll="fade"] {
931
+ opacity: 0;
932
+ transform: none;
933
+ }
934
+ [data-alive-scroll="fade"].is-visible {
935
+ animation: alive-fade-in var(--alive-duration-normal) var(--alive-ease-standard) both;
936
+ }
937
+ [data-alive-scroll="scale"] {
938
+ opacity: 0;
939
+ transform: scale(0.94);
940
+ }
941
+ [data-alive-scroll="scale"].is-visible {
942
+ animation: alive-scale-in var(--alive-duration-slow) var(--alive-ease-emphasized) both;
943
+ }
944
+
848
945
  /* Reduced motion \u2014 respect system preference */
849
946
  @media (prefers-reduced-motion: reduce) {
850
947
  .alive-enter,
@@ -867,6 +964,18 @@ select {
867
964
  transform: none;
868
965
  }
869
966
 
967
+ [data-alive-scroll],
968
+ [data-alive-scroll="fade"],
969
+ [data-alive-scroll="scale"] {
970
+ opacity: 1;
971
+ transform: none;
972
+ }
973
+ [data-alive-scroll].is-visible,
974
+ [data-alive-scroll="fade"].is-visible,
975
+ [data-alive-scroll="scale"].is-visible {
976
+ animation: none;
977
+ }
978
+
870
979
  /* depth system \u2014 disable hover lift and active press */
871
980
  .d2,
872
981
  .d2:hover,
@@ -2223,6 +2332,19 @@ function resolveColor(colors, name, shade) {
2223
2332
  if (!Object.prototype.hasOwnProperty.call(entry, shade)) return null;
2224
2333
  return entry[shade] ?? null;
2225
2334
  }
2335
+ function applyOpacity(value, opacity) {
2336
+ const alpha = +(opacity / 100).toFixed(3);
2337
+ const hexMatch = value.match(/^#([0-9a-fA-F]{3,6})$/);
2338
+ if (hexMatch) {
2339
+ let hex = hexMatch[1];
2340
+ if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
2341
+ const r = parseInt(hex.slice(0, 2), 16);
2342
+ const g = parseInt(hex.slice(2, 4), 16);
2343
+ const b = parseInt(hex.slice(4, 6), 16);
2344
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
2345
+ }
2346
+ return `color-mix(in srgb, ${value} ${opacity}%, transparent)`;
2347
+ }
2226
2348
  function parseVariants(cls) {
2227
2349
  const variants = [];
2228
2350
  let depth = 0;
@@ -2263,7 +2385,7 @@ function matchColor(cls, colors) {
2263
2385
  if (bgMatch) {
2264
2386
  const value = resolveColor(colors, bgMatch[1], bgMatch[2]);
2265
2387
  if (value) {
2266
- return `.${cls} {
2388
+ return `.${escapeSelector(cls)} {
2267
2389
  background-color: ${value};${transitioned("background-color")}
2268
2390
  }`;
2269
2391
  }
@@ -2272,7 +2394,7 @@ function matchColor(cls, colors) {
2272
2394
  if (textColorMatch) {
2273
2395
  const value = resolveColor(colors, textColorMatch[1], textColorMatch[2]);
2274
2396
  if (value) {
2275
- return `.${cls} {
2397
+ return `.${escapeSelector(cls)} {
2276
2398
  color: ${value};${transitioned("color")}
2277
2399
  }`;
2278
2400
  }
@@ -2281,7 +2403,7 @@ function matchColor(cls, colors) {
2281
2403
  if (borderColorMatch) {
2282
2404
  const value = resolveColor(colors, borderColorMatch[1], borderColorMatch[2]);
2283
2405
  if (value) {
2284
- return `.${cls} {
2406
+ return `.${escapeSelector(cls)} {
2285
2407
  border-color: ${value};${transitioned("border-color")}
2286
2408
  }`;
2287
2409
  }
@@ -2290,7 +2412,7 @@ function matchColor(cls, colors) {
2290
2412
  if (ringColorMatch) {
2291
2413
  const value = resolveColor(colors, ringColorMatch[1], ringColorMatch[2]);
2292
2414
  if (value) {
2293
- return `.${cls} {
2415
+ return `.${escapeSelector(cls)} {
2294
2416
  --alive-ring-color: ${value};
2295
2417
  }`;
2296
2418
  }
@@ -2299,7 +2421,7 @@ function matchColor(cls, colors) {
2299
2421
  if (outlineColorMatch) {
2300
2422
  const value = resolveColor(colors, outlineColorMatch[1], outlineColorMatch[2]);
2301
2423
  if (value) {
2302
- return `.${cls} {
2424
+ return `.${escapeSelector(cls)} {
2303
2425
  outline-color: ${value};
2304
2426
  }`;
2305
2427
  }
@@ -2308,7 +2430,7 @@ function matchColor(cls, colors) {
2308
2430
  if (fillMatch) {
2309
2431
  const value = resolveColor(colors, fillMatch[1], fillMatch[2]);
2310
2432
  if (value) {
2311
- return `.${cls} {
2433
+ return `.${escapeSelector(cls)} {
2312
2434
  fill: ${value};
2313
2435
  }`;
2314
2436
  }
@@ -2317,7 +2439,7 @@ function matchColor(cls, colors) {
2317
2439
  if (strokeMatch) {
2318
2440
  const value = resolveColor(colors, strokeMatch[1], strokeMatch[2]);
2319
2441
  if (value) {
2320
- return `.${cls} {
2442
+ return `.${escapeSelector(cls)} {
2321
2443
  stroke: ${value};
2322
2444
  }`;
2323
2445
  }
@@ -2326,7 +2448,7 @@ function matchColor(cls, colors) {
2326
2448
  if (decorationMatch) {
2327
2449
  const value = resolveColor(colors, decorationMatch[1], decorationMatch[2]);
2328
2450
  if (value) {
2329
- return `.${cls} {
2451
+ return `.${escapeSelector(cls)} {
2330
2452
  text-decoration-color: ${value};
2331
2453
  }`;
2332
2454
  }
@@ -2335,7 +2457,7 @@ function matchColor(cls, colors) {
2335
2457
  if (caretMatch) {
2336
2458
  const value = resolveColor(colors, caretMatch[1], caretMatch[2]);
2337
2459
  if (value) {
2338
- return `.${cls} {
2460
+ return `.${escapeSelector(cls)} {
2339
2461
  caret-color: ${value};
2340
2462
  }`;
2341
2463
  }
@@ -2344,7 +2466,7 @@ function matchColor(cls, colors) {
2344
2466
  if (accentMatch) {
2345
2467
  const value = resolveColor(colors, accentMatch[1], accentMatch[2]);
2346
2468
  if (value) {
2347
- return `.${cls} {
2469
+ return `.${escapeSelector(cls)} {
2348
2470
  accent-color: ${value};
2349
2471
  }`;
2350
2472
  }
@@ -2353,49 +2475,72 @@ function matchColor(cls, colors) {
2353
2475
  if (shadowColorMatch) {
2354
2476
  const value = resolveColor(colors, shadowColorMatch[1], shadowColorMatch[2]);
2355
2477
  if (value) {
2356
- return `.${cls} {
2478
+ return `.${escapeSelector(cls)} {
2357
2479
  --alive-shadow-color: ${value};
2358
2480
  }`;
2359
2481
  }
2360
2482
  }
2361
- const arbBgMatch = cls.match(/^bg-\[(.+)\]$/);
2483
+ const arbBgMatch = cls.match(/^bg-\[(.+)\](?:\/(\d+))?$/);
2362
2484
  if (arbBgMatch) {
2363
- const val = arbBgMatch[1];
2485
+ const [, val, opStr] = arbBgMatch;
2364
2486
  const escaped = escapeSelector(cls);
2365
2487
  if (val.startsWith("url(") || val.startsWith("linear-gradient") || val.startsWith("radial-gradient")) {
2366
2488
  return `.${escaped} {
2367
2489
  background-image: ${val};${transitioned("background-image")}
2368
2490
  }`;
2369
2491
  }
2492
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2370
2493
  return `.${escaped} {
2371
- background-color: ${val};${transitioned("background-color")}
2494
+ background-color: ${colorVal};${transitioned("background-color")}
2372
2495
  }`;
2373
2496
  }
2374
- const arbTextMatch = cls.match(/^text-\[(.+)\]$/);
2497
+ const arbTextMatch = cls.match(/^text-\[(.+)\](?:\/(\d+))?$/);
2375
2498
  if (arbTextMatch) {
2499
+ const [, val, opStr] = arbTextMatch;
2500
+ const isSizeValue = val.endsWith("px") || val.endsWith("em") || val.endsWith("rem") || val.endsWith("%") || val.endsWith("vw") || val.endsWith("vh") || val.endsWith("ch") || val.endsWith("ex") || val.endsWith("dvh") || /^[\d.]/.test(val) || /^(calc|clamp|min|max)\(/.test(val);
2501
+ if (isSizeValue) {
2502
+ return `.${escapeSelector(cls)} {
2503
+ font-size: ${val};
2504
+ }`;
2505
+ }
2506
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2376
2507
  return `.${escapeSelector(cls)} {
2377
- color: ${arbTextMatch[1]};${transitioned("color")}
2508
+ color: ${colorVal};${transitioned("color")}
2378
2509
  }`;
2379
2510
  }
2380
- const arbBorderColorMatch = cls.match(/^border-\[#[0-9a-fA-F]|^border-\[rgb|^border-\[hsl|^border-\[oklch/);
2511
+ const arbBorderColorMatch = cls.match(/^border-\[(.+)\](?:\/(\d+))?$/);
2381
2512
  if (arbBorderColorMatch) {
2382
- const m = cls.match(/^border-\[(.+)\]$/);
2383
- if (m) {
2513
+ const [, val, opStr] = arbBorderColorMatch;
2514
+ const looksLikeColor = val.startsWith("#") || val.startsWith("rgb") || val.startsWith("hsl") || val.startsWith("oklch") || val.startsWith("var(") || val === "transparent" || val === "currentColor";
2515
+ if (looksLikeColor) {
2516
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2384
2517
  return `.${escapeSelector(cls)} {
2385
- border-color: ${m[1]};${transitioned("border-color")}
2518
+ border-color: ${colorVal};${transitioned("border-color")}
2386
2519
  }`;
2387
2520
  }
2388
2521
  }
2389
- const arbFillMatch = cls.match(/^fill-\[(.+)\]$/);
2522
+ const arbRingColorMatch = cls.match(/^ring-\[(.+)\](?:\/(\d+))?$/);
2523
+ if (arbRingColorMatch) {
2524
+ const [, val, opStr] = arbRingColorMatch;
2525
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2526
+ return `.${escapeSelector(cls)} {
2527
+ --alive-ring-color: ${colorVal};
2528
+ }`;
2529
+ }
2530
+ const arbFillMatch = cls.match(/^fill-\[(.+)\](?:\/(\d+))?$/);
2390
2531
  if (arbFillMatch) {
2532
+ const [, val, opStr] = arbFillMatch;
2533
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2391
2534
  return `.${escapeSelector(cls)} {
2392
- fill: ${arbFillMatch[1]};
2535
+ fill: ${colorVal};
2393
2536
  }`;
2394
2537
  }
2395
- const arbStrokeMatch = cls.match(/^stroke-\[(.+)\]$/);
2538
+ const arbStrokeMatch = cls.match(/^stroke-\[(.+)\](?:\/(\d+))?$/);
2396
2539
  if (arbStrokeMatch) {
2540
+ const [, val, opStr] = arbStrokeMatch;
2541
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2397
2542
  return `.${escapeSelector(cls)} {
2398
- stroke: ${arbStrokeMatch[1]};
2543
+ stroke: ${colorVal};
2399
2544
  }`;
2400
2545
  }
2401
2546
  return null;
@@ -2428,182 +2573,182 @@ function has(obj, key) {
2428
2573
  function matchSpacing(cls, spacing) {
2429
2574
  const pMatch = cls.match(/^p-(.+)$/);
2430
2575
  if (pMatch && has(spacing, pMatch[1])) {
2431
- return `.${cls} { padding: ${spacing[pMatch[1]]}; }`;
2576
+ return `.${escapeSelector(cls)} { padding: ${spacing[pMatch[1]]}; }`;
2432
2577
  }
2433
2578
  const pxMatch = cls.match(/^px-(.+)$/);
2434
2579
  if (pxMatch && has(spacing, pxMatch[1])) {
2435
- return `.${cls} { padding-left: ${spacing[pxMatch[1]]}; padding-right: ${spacing[pxMatch[1]]}; }`;
2580
+ return `.${escapeSelector(cls)} { padding-left: ${spacing[pxMatch[1]]}; padding-right: ${spacing[pxMatch[1]]}; }`;
2436
2581
  }
2437
2582
  const pyMatch = cls.match(/^py-(.+)$/);
2438
2583
  if (pyMatch && has(spacing, pyMatch[1])) {
2439
- return `.${cls} { padding-top: ${spacing[pyMatch[1]]}; padding-bottom: ${spacing[pyMatch[1]]}; }`;
2584
+ return `.${escapeSelector(cls)} { padding-top: ${spacing[pyMatch[1]]}; padding-bottom: ${spacing[pyMatch[1]]}; }`;
2440
2585
  }
2441
2586
  const ptMatch = cls.match(/^pt-(.+)$/);
2442
2587
  if (ptMatch && has(spacing, ptMatch[1])) {
2443
- return `.${cls} { padding-top: ${spacing[ptMatch[1]]}; }`;
2588
+ return `.${escapeSelector(cls)} { padding-top: ${spacing[ptMatch[1]]}; }`;
2444
2589
  }
2445
2590
  const prMatch = cls.match(/^pr-(.+)$/);
2446
2591
  if (prMatch && has(spacing, prMatch[1])) {
2447
- return `.${cls} { padding-right: ${spacing[prMatch[1]]}; }`;
2592
+ return `.${escapeSelector(cls)} { padding-right: ${spacing[prMatch[1]]}; }`;
2448
2593
  }
2449
2594
  const pbMatch = cls.match(/^pb-(.+)$/);
2450
2595
  if (pbMatch && has(spacing, pbMatch[1])) {
2451
- return `.${cls} { padding-bottom: ${spacing[pbMatch[1]]}; }`;
2596
+ return `.${escapeSelector(cls)} { padding-bottom: ${spacing[pbMatch[1]]}; }`;
2452
2597
  }
2453
2598
  const plMatch = cls.match(/^pl-(.+)$/);
2454
2599
  if (plMatch && has(spacing, plMatch[1])) {
2455
- return `.${cls} { padding-left: ${spacing[plMatch[1]]}; }`;
2600
+ return `.${escapeSelector(cls)} { padding-left: ${spacing[plMatch[1]]}; }`;
2456
2601
  }
2457
2602
  const mMatch = cls.match(/^m-(.+)$/);
2458
2603
  if (mMatch) {
2459
- if (mMatch[1] === "auto") return `.${cls} { margin: auto; }`;
2460
- if (has(spacing, mMatch[1])) return `.${cls} { margin: ${spacing[mMatch[1]]}; }`;
2604
+ if (mMatch[1] === "auto") return `.${escapeSelector(cls)} { margin: auto; }`;
2605
+ if (has(spacing, mMatch[1])) return `.${escapeSelector(cls)} { margin: ${spacing[mMatch[1]]}; }`;
2461
2606
  }
2462
2607
  const mxMatch = cls.match(/^mx-(.+)$/);
2463
2608
  if (mxMatch) {
2464
- if (mxMatch[1] === "auto") return `.${cls} { margin-left: auto; margin-right: auto; }`;
2465
- if (has(spacing, mxMatch[1])) return `.${cls} { margin-left: ${spacing[mxMatch[1]]}; margin-right: ${spacing[mxMatch[1]]}; }`;
2609
+ if (mxMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-left: auto; margin-right: auto; }`;
2610
+ if (has(spacing, mxMatch[1])) return `.${escapeSelector(cls)} { margin-left: ${spacing[mxMatch[1]]}; margin-right: ${spacing[mxMatch[1]]}; }`;
2466
2611
  }
2467
2612
  const myMatch = cls.match(/^my-(.+)$/);
2468
2613
  if (myMatch) {
2469
- if (myMatch[1] === "auto") return `.${cls} { margin-top: auto; margin-bottom: auto; }`;
2470
- if (has(spacing, myMatch[1])) return `.${cls} { margin-top: ${spacing[myMatch[1]]}; margin-bottom: ${spacing[myMatch[1]]}; }`;
2614
+ if (myMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-top: auto; margin-bottom: auto; }`;
2615
+ if (has(spacing, myMatch[1])) return `.${escapeSelector(cls)} { margin-top: ${spacing[myMatch[1]]}; margin-bottom: ${spacing[myMatch[1]]}; }`;
2471
2616
  }
2472
2617
  const mtMatch = cls.match(/^mt-(.+)$/);
2473
2618
  if (mtMatch) {
2474
- if (mtMatch[1] === "auto") return `.${cls} { margin-top: auto; }`;
2475
- if (has(spacing, mtMatch[1])) return `.${cls} { margin-top: ${spacing[mtMatch[1]]}; }`;
2619
+ if (mtMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-top: auto; }`;
2620
+ if (has(spacing, mtMatch[1])) return `.${escapeSelector(cls)} { margin-top: ${spacing[mtMatch[1]]}; }`;
2476
2621
  }
2477
2622
  const mrMatch = cls.match(/^mr-(.+)$/);
2478
2623
  if (mrMatch) {
2479
- if (mrMatch[1] === "auto") return `.${cls} { margin-right: auto; }`;
2480
- if (has(spacing, mrMatch[1])) return `.${cls} { margin-right: ${spacing[mrMatch[1]]}; }`;
2624
+ if (mrMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-right: auto; }`;
2625
+ if (has(spacing, mrMatch[1])) return `.${escapeSelector(cls)} { margin-right: ${spacing[mrMatch[1]]}; }`;
2481
2626
  }
2482
2627
  const mbMatch = cls.match(/^mb-(.+)$/);
2483
2628
  if (mbMatch) {
2484
- if (mbMatch[1] === "auto") return `.${cls} { margin-bottom: auto; }`;
2485
- if (has(spacing, mbMatch[1])) return `.${cls} { margin-bottom: ${spacing[mbMatch[1]]}; }`;
2629
+ if (mbMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-bottom: auto; }`;
2630
+ if (has(spacing, mbMatch[1])) return `.${escapeSelector(cls)} { margin-bottom: ${spacing[mbMatch[1]]}; }`;
2486
2631
  }
2487
2632
  const mlMatch = cls.match(/^ml-(.+)$/);
2488
2633
  if (mlMatch) {
2489
- if (mlMatch[1] === "auto") return `.${cls} { margin-left: auto; }`;
2490
- if (has(spacing, mlMatch[1])) return `.${cls} { margin-left: ${spacing[mlMatch[1]]}; }`;
2634
+ if (mlMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-left: auto; }`;
2635
+ if (has(spacing, mlMatch[1])) return `.${escapeSelector(cls)} { margin-left: ${spacing[mlMatch[1]]}; }`;
2491
2636
  }
2492
2637
  const gapMatch = cls.match(/^gap-(.+)$/);
2493
2638
  if (gapMatch && has(spacing, gapMatch[1])) {
2494
- return `.${cls} { gap: ${spacing[gapMatch[1]]}; }`;
2639
+ return `.${escapeSelector(cls)} { gap: ${spacing[gapMatch[1]]}; }`;
2495
2640
  }
2496
2641
  const gapXMatch = cls.match(/^gap-x-(.+)$/);
2497
2642
  if (gapXMatch && has(spacing, gapXMatch[1])) {
2498
- return `.${cls} { column-gap: ${spacing[gapXMatch[1]]}; }`;
2643
+ return `.${escapeSelector(cls)} { column-gap: ${spacing[gapXMatch[1]]}; }`;
2499
2644
  }
2500
2645
  const gapYMatch = cls.match(/^gap-y-(.+)$/);
2501
2646
  if (gapYMatch && has(spacing, gapYMatch[1])) {
2502
- return `.${cls} { row-gap: ${spacing[gapYMatch[1]]}; }`;
2647
+ return `.${escapeSelector(cls)} { row-gap: ${spacing[gapYMatch[1]]}; }`;
2503
2648
  }
2504
2649
  const spaceXMatch = cls.match(/^space-x-(.+)$/);
2505
2650
  if (spaceXMatch && has(spacing, spaceXMatch[1])) {
2506
- return `.${cls} > * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`;
2651
+ return `.${escapeSelector(cls)}> * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`;
2507
2652
  }
2508
2653
  const spaceYMatch = cls.match(/^space-y-(.+)$/);
2509
2654
  if (spaceYMatch && has(spacing, spaceYMatch[1])) {
2510
- return `.${cls} > * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`;
2655
+ return `.${escapeSelector(cls)}> * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`;
2511
2656
  }
2512
2657
  const insetMatch = cls.match(/^inset-(.+)$/);
2513
2658
  if (insetMatch) {
2514
- if (insetMatch[1] === "auto") return `.${cls} { inset: auto; }`;
2515
- if (insetMatch[1] === "0") return `.${cls} { inset: 0px; }`;
2516
- if (has(spacing, insetMatch[1])) return `.${cls} { inset: ${spacing[insetMatch[1]]}; }`;
2659
+ if (insetMatch[1] === "auto") return `.${escapeSelector(cls)} { inset: auto; }`;
2660
+ if (insetMatch[1] === "0") return `.${escapeSelector(cls)} { inset: 0px; }`;
2661
+ if (has(spacing, insetMatch[1])) return `.${escapeSelector(cls)} { inset: ${spacing[insetMatch[1]]}; }`;
2517
2662
  }
2518
2663
  const insetXMatch = cls.match(/^inset-x-(.+)$/);
2519
2664
  if (insetXMatch) {
2520
2665
  const val = insetXMatch[1] === "auto" ? "auto" : insetXMatch[1] === "0" ? "0px" : has(spacing, insetXMatch[1]) ? spacing[insetXMatch[1]] : void 0;
2521
- if (val) return `.${cls} { left: ${val}; right: ${val}; }`;
2666
+ if (val) return `.${escapeSelector(cls)} { left: ${val}; right: ${val}; }`;
2522
2667
  }
2523
2668
  const insetYMatch = cls.match(/^inset-y-(.+)$/);
2524
2669
  if (insetYMatch) {
2525
2670
  const val = insetYMatch[1] === "auto" ? "auto" : insetYMatch[1] === "0" ? "0px" : has(spacing, insetYMatch[1]) ? spacing[insetYMatch[1]] : void 0;
2526
- if (val) return `.${cls} { top: ${val}; bottom: ${val}; }`;
2671
+ if (val) return `.${escapeSelector(cls)} { top: ${val}; bottom: ${val}; }`;
2527
2672
  }
2528
2673
  const topMatch = cls.match(/^top-(.+)$/);
2529
2674
  if (topMatch) {
2530
- if (topMatch[1] === "auto") return `.${cls} { top: auto; }`;
2531
- if (topMatch[1] === "0") return `.${cls} { top: 0px; }`;
2532
- if (has(spacing, topMatch[1])) return `.${cls} { top: ${spacing[topMatch[1]]}; }`;
2675
+ if (topMatch[1] === "auto") return `.${escapeSelector(cls)} { top: auto; }`;
2676
+ if (topMatch[1] === "0") return `.${escapeSelector(cls)} { top: 0px; }`;
2677
+ if (has(spacing, topMatch[1])) return `.${escapeSelector(cls)} { top: ${spacing[topMatch[1]]}; }`;
2533
2678
  }
2534
2679
  const rightMatch = cls.match(/^right-(.+)$/);
2535
2680
  if (rightMatch) {
2536
- if (rightMatch[1] === "auto") return `.${cls} { right: auto; }`;
2537
- if (rightMatch[1] === "0") return `.${cls} { right: 0px; }`;
2538
- if (has(spacing, rightMatch[1])) return `.${cls} { right: ${spacing[rightMatch[1]]}; }`;
2681
+ if (rightMatch[1] === "auto") return `.${escapeSelector(cls)} { right: auto; }`;
2682
+ if (rightMatch[1] === "0") return `.${escapeSelector(cls)} { right: 0px; }`;
2683
+ if (has(spacing, rightMatch[1])) return `.${escapeSelector(cls)} { right: ${spacing[rightMatch[1]]}; }`;
2539
2684
  }
2540
2685
  const bottomMatch = cls.match(/^bottom-(.+)$/);
2541
2686
  if (bottomMatch) {
2542
- if (bottomMatch[1] === "auto") return `.${cls} { bottom: auto; }`;
2543
- if (bottomMatch[1] === "0") return `.${cls} { bottom: 0px; }`;
2544
- if (has(spacing, bottomMatch[1])) return `.${cls} { bottom: ${spacing[bottomMatch[1]]}; }`;
2687
+ if (bottomMatch[1] === "auto") return `.${escapeSelector(cls)} { bottom: auto; }`;
2688
+ if (bottomMatch[1] === "0") return `.${escapeSelector(cls)} { bottom: 0px; }`;
2689
+ if (has(spacing, bottomMatch[1])) return `.${escapeSelector(cls)} { bottom: ${spacing[bottomMatch[1]]}; }`;
2545
2690
  }
2546
2691
  const leftMatch = cls.match(/^left-(.+)$/);
2547
2692
  if (leftMatch) {
2548
- if (leftMatch[1] === "auto") return `.${cls} { left: auto; }`;
2549
- if (leftMatch[1] === "0") return `.${cls} { left: 0px; }`;
2550
- if (has(spacing, leftMatch[1])) return `.${cls} { left: ${spacing[leftMatch[1]]}; }`;
2693
+ if (leftMatch[1] === "auto") return `.${escapeSelector(cls)} { left: auto; }`;
2694
+ if (leftMatch[1] === "0") return `.${escapeSelector(cls)} { left: 0px; }`;
2695
+ if (has(spacing, leftMatch[1])) return `.${escapeSelector(cls)} { left: ${spacing[leftMatch[1]]}; }`;
2551
2696
  }
2552
2697
  const negMMatch = cls.match(/^-m-(.+)$/);
2553
2698
  if (negMMatch && has(spacing, negMMatch[1])) {
2554
- return `.\\-m-${negMMatch[1]} { margin: -${spacing[negMMatch[1]]}; }`;
2699
+ return `.${escapeSelector(cls)} { margin: -${spacing[negMMatch[1]]}; }`;
2555
2700
  }
2556
2701
  const negMxMatch = cls.match(/^-mx-(.+)$/);
2557
2702
  if (negMxMatch && has(spacing, negMxMatch[1])) {
2558
- return `.\\-mx-${negMxMatch[1]} { margin-left: -${spacing[negMxMatch[1]]}; margin-right: -${spacing[negMxMatch[1]]}; }`;
2703
+ return `.${escapeSelector(cls)} { margin-left: -${spacing[negMxMatch[1]]}; margin-right: -${spacing[negMxMatch[1]]}; }`;
2559
2704
  }
2560
2705
  const negMyMatch = cls.match(/^-my-(.+)$/);
2561
2706
  if (negMyMatch && has(spacing, negMyMatch[1])) {
2562
- return `.\\-my-${negMyMatch[1]} { margin-top: -${spacing[negMyMatch[1]]}; margin-bottom: -${spacing[negMyMatch[1]]}; }`;
2707
+ return `.${escapeSelector(cls)} { margin-top: -${spacing[negMyMatch[1]]}; margin-bottom: -${spacing[negMyMatch[1]]}; }`;
2563
2708
  }
2564
2709
  const negMtMatch = cls.match(/^-mt-(.+)$/);
2565
2710
  if (negMtMatch && has(spacing, negMtMatch[1])) {
2566
- return `.\\-mt-${negMtMatch[1]} { margin-top: -${spacing[negMtMatch[1]]}; }`;
2711
+ return `.${escapeSelector(cls)} { margin-top: -${spacing[negMtMatch[1]]}; }`;
2567
2712
  }
2568
2713
  const negMrMatch = cls.match(/^-mr-(.+)$/);
2569
2714
  if (negMrMatch && has(spacing, negMrMatch[1])) {
2570
- return `.\\-mr-${negMrMatch[1]} { margin-right: -${spacing[negMrMatch[1]]}; }`;
2715
+ return `.${escapeSelector(cls)} { margin-right: -${spacing[negMrMatch[1]]}; }`;
2571
2716
  }
2572
2717
  const negMbMatch = cls.match(/^-mb-(.+)$/);
2573
2718
  if (negMbMatch && has(spacing, negMbMatch[1])) {
2574
- return `.\\-mb-${negMbMatch[1]} { margin-bottom: -${spacing[negMbMatch[1]]}; }`;
2719
+ return `.${escapeSelector(cls)} { margin-bottom: -${spacing[negMbMatch[1]]}; }`;
2575
2720
  }
2576
2721
  const negMlMatch = cls.match(/^-ml-(.+)$/);
2577
2722
  if (negMlMatch && has(spacing, negMlMatch[1])) {
2578
- return `.\\-ml-${negMlMatch[1]} { margin-left: -${spacing[negMlMatch[1]]}; }`;
2723
+ return `.${escapeSelector(cls)} { margin-left: -${spacing[negMlMatch[1]]}; }`;
2579
2724
  }
2580
2725
  const negInsetMatch = cls.match(/^-inset-(.+)$/);
2581
2726
  if (negInsetMatch && has(spacing, negInsetMatch[1])) {
2582
- return `.\\-inset-${negInsetMatch[1]} { inset: -${spacing[negInsetMatch[1]]}; }`;
2727
+ return `.${escapeSelector(cls)} { inset: -${spacing[negInsetMatch[1]]}; }`;
2583
2728
  }
2584
2729
  const negInsetXMatch = cls.match(/^-inset-x-(.+)$/);
2585
2730
  if (negInsetXMatch && has(spacing, negInsetXMatch[1])) {
2586
- return `.\\-inset-x-${negInsetXMatch[1]} { left: -${spacing[negInsetXMatch[1]]}; right: -${spacing[negInsetXMatch[1]]}; }`;
2731
+ return `.${escapeSelector(cls)} { left: -${spacing[negInsetXMatch[1]]}; right: -${spacing[negInsetXMatch[1]]}; }`;
2587
2732
  }
2588
2733
  const negInsetYMatch = cls.match(/^-inset-y-(.+)$/);
2589
2734
  if (negInsetYMatch && has(spacing, negInsetYMatch[1])) {
2590
- return `.\\-inset-y-${negInsetYMatch[1]} { top: -${spacing[negInsetYMatch[1]]}; bottom: -${spacing[negInsetYMatch[1]]}; }`;
2735
+ return `.${escapeSelector(cls)} { top: -${spacing[negInsetYMatch[1]]}; bottom: -${spacing[negInsetYMatch[1]]}; }`;
2591
2736
  }
2592
2737
  const negTopMatch = cls.match(/^-top-(.+)$/);
2593
2738
  if (negTopMatch && has(spacing, negTopMatch[1])) {
2594
- return `.\\-top-${negTopMatch[1]} { top: -${spacing[negTopMatch[1]]}; }`;
2739
+ return `.${escapeSelector(cls)} { top: -${spacing[negTopMatch[1]]}; }`;
2595
2740
  }
2596
2741
  const negRightMatch = cls.match(/^-right-(.+)$/);
2597
2742
  if (negRightMatch && has(spacing, negRightMatch[1])) {
2598
- return `.\\-right-${negRightMatch[1]} { right: -${spacing[negRightMatch[1]]}; }`;
2743
+ return `.${escapeSelector(cls)} { right: -${spacing[negRightMatch[1]]}; }`;
2599
2744
  }
2600
2745
  const negBottomMatch = cls.match(/^-bottom-(.+)$/);
2601
2746
  if (negBottomMatch && has(spacing, negBottomMatch[1])) {
2602
- return `.\\-bottom-${negBottomMatch[1]} { bottom: -${spacing[negBottomMatch[1]]}; }`;
2747
+ return `.${escapeSelector(cls)} { bottom: -${spacing[negBottomMatch[1]]}; }`;
2603
2748
  }
2604
2749
  const negLeftMatch = cls.match(/^-left-(.+)$/);
2605
2750
  if (negLeftMatch && has(spacing, negLeftMatch[1])) {
2606
- return `.\\-left-${negLeftMatch[1]} { left: -${spacing[negLeftMatch[1]]}; }`;
2751
+ return `.${escapeSelector(cls)} { left: -${spacing[negLeftMatch[1]]}; }`;
2607
2752
  }
2608
2753
  const arbSpacingMatch = cls.match(/^(w|h|p|m|pt|pr|pb|pl|px|py|mt|mr|mb|ml|mx|my|gap|gap-x|gap-y|top|right|bottom|left|inset|inset-x|inset-y)-\[(.+)\]$/);
2609
2754
  if (arbSpacingMatch) {
@@ -2690,21 +2835,21 @@ function matchTypography(cls, fontSize, fontWeight, lineHeight) {
2690
2835
  const textSizeMatch = cls.match(/^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);
2691
2836
  if (textSizeMatch && hasOwn(fontSize, textSizeMatch[1])) {
2692
2837
  const [size, lh] = fontSize[textSizeMatch[1]];
2693
- return `.${cls} {
2838
+ return `.${escapeSelector(cls)} {
2694
2839
  font-size: ${size};
2695
2840
  line-height: ${lh};
2696
2841
  }`;
2697
2842
  }
2698
2843
  const fontWeightMatch = cls.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/);
2699
2844
  if (fontWeightMatch && hasOwn(fontWeight, fontWeightMatch[1])) {
2700
- return `.${cls} { font-weight: ${fontWeight[fontWeightMatch[1]]}; }`;
2845
+ return `.${escapeSelector(cls)} { font-weight: ${fontWeight[fontWeightMatch[1]]}; }`;
2701
2846
  }
2702
- if (cls === "font-sans") return `.${cls} { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }`;
2703
- if (cls === "font-serif") return `.${cls} { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }`;
2704
- if (cls === "font-mono") return `.${cls} { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }`;
2847
+ if (cls === "font-sans") return `.${escapeSelector(cls)} { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }`;
2848
+ if (cls === "font-serif") return `.${escapeSelector(cls)} { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }`;
2849
+ if (cls === "font-mono") return `.${escapeSelector(cls)} { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }`;
2705
2850
  const leadingMatch = cls.match(/^leading-(.+)$/);
2706
2851
  if (leadingMatch && hasOwn(lineHeight, leadingMatch[1])) {
2707
- return `.${cls} { line-height: ${lineHeight[leadingMatch[1]]}; }`;
2852
+ return `.${escapeSelector(cls)} { line-height: ${lineHeight[leadingMatch[1]]}; }`;
2708
2853
  }
2709
2854
  const trackingMap = {
2710
2855
  tighter: "-0.05em",
@@ -2716,68 +2861,55 @@ function matchTypography(cls, fontSize, fontWeight, lineHeight) {
2716
2861
  };
2717
2862
  const trackingMatch = cls.match(/^tracking-(.+)$/);
2718
2863
  if (trackingMatch && Object.prototype.hasOwnProperty.call(trackingMap, trackingMatch[1])) {
2719
- return `.${cls} { letter-spacing: ${trackingMap[trackingMatch[1]]}; }`;
2720
- }
2721
- if (cls === "text-left") return `.${cls} { text-align: left; }`;
2722
- if (cls === "text-center") return `.${cls} { text-align: center; }`;
2723
- if (cls === "text-right") return `.${cls} { text-align: right; }`;
2724
- if (cls === "text-justify") return `.${cls} { text-align: justify; }`;
2725
- if (cls === "text-start") return `.${cls} { text-align: start; }`;
2726
- if (cls === "text-end") return `.${cls} { text-align: end; }`;
2727
- if (cls === "uppercase") return `.${cls} { text-transform: uppercase; }`;
2728
- if (cls === "lowercase") return `.${cls} { text-transform: lowercase; }`;
2729
- if (cls === "capitalize") return `.${cls} { text-transform: capitalize; }`;
2730
- if (cls === "normal-case") return `.${cls} { text-transform: none; }`;
2731
- if (cls === "underline") return `.${cls} { text-decoration-line: underline; }`;
2732
- if (cls === "overline") return `.${cls} { text-decoration-line: overline; }`;
2733
- if (cls === "line-through") return `.${cls} { text-decoration-line: line-through; }`;
2734
- if (cls === "no-underline") return `.${cls} { text-decoration-line: none; }`;
2735
- if (cls === "truncate") return `.${cls} { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
2736
- if (cls === "text-ellipsis") return `.${cls} { text-overflow: ellipsis; }`;
2737
- if (cls === "text-clip") return `.${cls} { text-overflow: clip; }`;
2738
- if (cls === "whitespace-normal") return `.${cls} { white-space: normal; }`;
2739
- if (cls === "whitespace-nowrap") return `.${cls} { white-space: nowrap; }`;
2740
- if (cls === "whitespace-pre") return `.${cls} { white-space: pre; }`;
2741
- if (cls === "whitespace-pre-line") return `.${cls} { white-space: pre-line; }`;
2742
- if (cls === "whitespace-pre-wrap") return `.${cls} { white-space: pre-wrap; }`;
2743
- if (cls === "whitespace-break-spaces") return `.${cls} { white-space: break-spaces; }`;
2744
- if (cls === "italic") return `.${cls} { font-style: italic; }`;
2745
- if (cls === "not-italic") return `.${cls} { font-style: normal; }`;
2746
- if (cls === "tabular-nums") return `.${cls} { font-variant-numeric: tabular-nums; }`;
2747
- if (cls === "oldstyle-nums") return `.${cls} { font-variant-numeric: oldstyle-nums; }`;
2748
- if (cls === "list-none") return `.${cls} { list-style-type: none; }`;
2749
- if (cls === "list-disc") return `.${cls} { list-style-type: disc; }`;
2750
- if (cls === "list-decimal") return `.${cls} { list-style-type: decimal; }`;
2751
- if (cls === "break-normal") return `.${cls} { overflow-wrap: normal; word-break: normal; }`;
2752
- if (cls === "break-words") return `.${cls} { overflow-wrap: break-word; }`;
2753
- if (cls === "break-all") return `.${cls} { word-break: break-all; }`;
2754
- if (cls === "break-keep") return `.${cls} { word-break: keep-all; }`;
2864
+ return `.${escapeSelector(cls)} { letter-spacing: ${trackingMap[trackingMatch[1]]}; }`;
2865
+ }
2866
+ if (cls === "text-left") return `.${escapeSelector(cls)} { text-align: left; }`;
2867
+ if (cls === "text-center") return `.${escapeSelector(cls)} { text-align: center; }`;
2868
+ if (cls === "text-right") return `.${escapeSelector(cls)} { text-align: right; }`;
2869
+ if (cls === "text-justify") return `.${escapeSelector(cls)} { text-align: justify; }`;
2870
+ if (cls === "text-start") return `.${escapeSelector(cls)} { text-align: start; }`;
2871
+ if (cls === "text-end") return `.${escapeSelector(cls)} { text-align: end; }`;
2872
+ if (cls === "uppercase") return `.${escapeSelector(cls)} { text-transform: uppercase; }`;
2873
+ if (cls === "lowercase") return `.${escapeSelector(cls)} { text-transform: lowercase; }`;
2874
+ if (cls === "capitalize") return `.${escapeSelector(cls)} { text-transform: capitalize; }`;
2875
+ if (cls === "normal-case") return `.${escapeSelector(cls)} { text-transform: none; }`;
2876
+ if (cls === "underline") return `.${escapeSelector(cls)} { text-decoration-line: underline; }`;
2877
+ if (cls === "overline") return `.${escapeSelector(cls)} { text-decoration-line: overline; }`;
2878
+ if (cls === "line-through") return `.${escapeSelector(cls)} { text-decoration-line: line-through; }`;
2879
+ if (cls === "no-underline") return `.${escapeSelector(cls)} { text-decoration-line: none; }`;
2880
+ if (cls === "truncate") return `.${escapeSelector(cls)} { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
2881
+ if (cls === "text-ellipsis") return `.${escapeSelector(cls)} { text-overflow: ellipsis; }`;
2882
+ if (cls === "text-clip") return `.${escapeSelector(cls)} { text-overflow: clip; }`;
2883
+ if (cls === "whitespace-normal") return `.${escapeSelector(cls)} { white-space: normal; }`;
2884
+ if (cls === "whitespace-nowrap") return `.${escapeSelector(cls)} { white-space: nowrap; }`;
2885
+ if (cls === "whitespace-pre") return `.${escapeSelector(cls)} { white-space: pre; }`;
2886
+ if (cls === "whitespace-pre-line") return `.${escapeSelector(cls)} { white-space: pre-line; }`;
2887
+ if (cls === "whitespace-pre-wrap") return `.${escapeSelector(cls)} { white-space: pre-wrap; }`;
2888
+ if (cls === "whitespace-break-spaces") return `.${escapeSelector(cls)} { white-space: break-spaces; }`;
2889
+ if (cls === "italic") return `.${escapeSelector(cls)} { font-style: italic; }`;
2890
+ if (cls === "not-italic") return `.${escapeSelector(cls)} { font-style: normal; }`;
2891
+ if (cls === "tabular-nums") return `.${escapeSelector(cls)} { font-variant-numeric: tabular-nums; }`;
2892
+ if (cls === "oldstyle-nums") return `.${escapeSelector(cls)} { font-variant-numeric: oldstyle-nums; }`;
2893
+ if (cls === "list-none") return `.${escapeSelector(cls)} { list-style-type: none; }`;
2894
+ if (cls === "list-disc") return `.${escapeSelector(cls)} { list-style-type: disc; }`;
2895
+ if (cls === "list-decimal") return `.${escapeSelector(cls)} { list-style-type: decimal; }`;
2896
+ if (cls === "break-normal") return `.${escapeSelector(cls)} { overflow-wrap: normal; word-break: normal; }`;
2897
+ if (cls === "break-words") return `.${escapeSelector(cls)} { overflow-wrap: break-word; }`;
2898
+ if (cls === "break-all") return `.${escapeSelector(cls)} { word-break: break-all; }`;
2899
+ if (cls === "break-keep") return `.${escapeSelector(cls)} { word-break: keep-all; }`;
2755
2900
  return null;
2756
2901
  }
2757
2902
  var init_typography = __esm({
2758
2903
  "src/generator/typography.ts"() {
2759
2904
  "use strict";
2905
+ init_utils();
2760
2906
  }
2761
2907
  });
2762
2908
 
2763
2909
  // src/generator/layout.ts
2764
- function has2(obj, key) {
2765
- return typeof obj[key] === "string";
2766
- }
2767
- function generateLayout(classes, config) {
2768
- const { spacing } = config.theme;
2910
+ function generateLayout(classes, _config) {
2769
2911
  const rules = [];
2770
2912
  for (const cls of classes) {
2771
- const spaceYMatch = cls.match(/^space-y-(.+)$/);
2772
- if (spaceYMatch && has2(spacing, spaceYMatch[1])) {
2773
- rules.push(`.${escapeSelector(cls)} > * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`);
2774
- continue;
2775
- }
2776
- const spaceXMatch = cls.match(/^space-x-(.+)$/);
2777
- if (spaceXMatch && has2(spacing, spaceXMatch[1])) {
2778
- rules.push(`.${escapeSelector(cls)} > * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`);
2779
- continue;
2780
- }
2781
2913
  const generated = matchLayout(cls);
2782
2914
  if (generated) rules.push(generated);
2783
2915
  }
@@ -2796,7 +2928,7 @@ function matchLayout(cls) {
2796
2928
  hidden: "display: none;",
2797
2929
  contents: "display: contents;"
2798
2930
  };
2799
- if (displayMap[cls]) return `.${cls} { ${displayMap[cls]} }`;
2931
+ if (displayMap[cls]) return `.${escapeSelector(cls)} { ${displayMap[cls]} }`;
2800
2932
  const posMap = {
2801
2933
  static: "position: static;",
2802
2934
  relative: "position: relative;",
@@ -2804,115 +2936,115 @@ function matchLayout(cls) {
2804
2936
  fixed: "position: fixed;",
2805
2937
  sticky: "position: sticky;"
2806
2938
  };
2807
- if (posMap[cls]) return `.${cls} { ${posMap[cls]} }`;
2808
- if (cls === "flex-row") return `.${cls} { flex-direction: row; }`;
2809
- if (cls === "flex-row-reverse") return `.${cls} { flex-direction: row-reverse; }`;
2810
- if (cls === "flex-col") return `.${cls} { flex-direction: column; }`;
2811
- if (cls === "flex-col-reverse") return `.${cls} { flex-direction: column-reverse; }`;
2812
- if (cls === "flex-wrap") return `.${cls} { flex-wrap: wrap; }`;
2813
- if (cls === "flex-nowrap") return `.${cls} { flex-wrap: nowrap; }`;
2814
- if (cls === "flex-wrap-reverse") return `.${cls} { flex-wrap: wrap-reverse; }`;
2815
- if (cls === "flex-1") return `.${cls} { flex: 1 1 0%; }`;
2816
- if (cls === "flex-auto") return `.${cls} { flex: 1 1 auto; }`;
2817
- if (cls === "flex-initial") return `.${cls} { flex: 0 1 auto; }`;
2818
- if (cls === "flex-none") return `.${cls} { flex: none; }`;
2819
- if (cls === "flex-grow") return `.${cls} { flex-grow: 1; }`;
2820
- if (cls === "flex-grow-0") return `.${cls} { flex-grow: 0; }`;
2821
- if (cls === "flex-shrink") return `.${cls} { flex-shrink: 1; }`;
2822
- if (cls === "flex-shrink-0") return `.${cls} { flex-shrink: 0; }`;
2823
- if (cls === "grow") return `.${cls} { flex-grow: 1; }`;
2824
- if (cls === "grow-0") return `.${cls} { flex-grow: 0; }`;
2825
- if (cls === "shrink") return `.${cls} { flex-shrink: 1; }`;
2826
- if (cls === "shrink-0") return `.${cls} { flex-shrink: 0; }`;
2827
- if (cls === "items-start") return `.${cls} { align-items: flex-start; }`;
2828
- if (cls === "items-end") return `.${cls} { align-items: flex-end; }`;
2829
- if (cls === "items-center") return `.${cls} { align-items: center; }`;
2830
- if (cls === "items-baseline") return `.${cls} { align-items: baseline; }`;
2831
- if (cls === "items-stretch") return `.${cls} { align-items: stretch; }`;
2832
- if (cls === "self-auto") return `.${cls} { align-self: auto; }`;
2833
- if (cls === "self-start") return `.${cls} { align-self: flex-start; }`;
2834
- if (cls === "self-end") return `.${cls} { align-self: flex-end; }`;
2835
- if (cls === "self-center") return `.${cls} { align-self: center; }`;
2836
- if (cls === "self-stretch") return `.${cls} { align-self: stretch; }`;
2837
- if (cls === "self-baseline") return `.${cls} { align-self: baseline; }`;
2838
- if (cls === "justify-start") return `.${cls} { justify-content: flex-start; }`;
2839
- if (cls === "justify-end") return `.${cls} { justify-content: flex-end; }`;
2840
- if (cls === "justify-center") return `.${cls} { justify-content: center; }`;
2841
- if (cls === "justify-between") return `.${cls} { justify-content: space-between; }`;
2842
- if (cls === "justify-around") return `.${cls} { justify-content: space-around; }`;
2843
- if (cls === "justify-evenly") return `.${cls} { justify-content: space-evenly; }`;
2844
- if (cls === "justify-stretch") return `.${cls} { justify-content: stretch; }`;
2845
- if (cls === "justify-items-start") return `.${cls} { justify-items: start; }`;
2846
- if (cls === "justify-items-end") return `.${cls} { justify-items: end; }`;
2847
- if (cls === "justify-items-center") return `.${cls} { justify-items: center; }`;
2848
- if (cls === "justify-items-stretch") return `.${cls} { justify-items: stretch; }`;
2849
- if (cls === "justify-self-auto") return `.${cls} { justify-self: auto; }`;
2850
- if (cls === "justify-self-start") return `.${cls} { justify-self: start; }`;
2851
- if (cls === "justify-self-end") return `.${cls} { justify-self: end; }`;
2852
- if (cls === "justify-self-center") return `.${cls} { justify-self: center; }`;
2853
- if (cls === "justify-self-stretch") return `.${cls} { justify-self: stretch; }`;
2854
- if (cls === "content-normal") return `.${cls} { align-content: normal; }`;
2855
- if (cls === "content-center") return `.${cls} { align-content: center; }`;
2856
- if (cls === "content-start") return `.${cls} { align-content: flex-start; }`;
2857
- if (cls === "content-end") return `.${cls} { align-content: flex-end; }`;
2858
- if (cls === "content-between") return `.${cls} { align-content: space-between; }`;
2859
- if (cls === "content-around") return `.${cls} { align-content: space-around; }`;
2860
- if (cls === "content-evenly") return `.${cls} { align-content: space-evenly; }`;
2861
- if (cls === "content-stretch") return `.${cls} { align-content: stretch; }`;
2862
- if (cls === "content-baseline") return `.${cls} { align-content: baseline; }`;
2939
+ if (posMap[cls]) return `.${escapeSelector(cls)} { ${posMap[cls]} }`;
2940
+ if (cls === "flex-row") return `.${escapeSelector(cls)} { flex-direction: row; }`;
2941
+ if (cls === "flex-row-reverse") return `.${escapeSelector(cls)} { flex-direction: row-reverse; }`;
2942
+ if (cls === "flex-col") return `.${escapeSelector(cls)} { flex-direction: column; }`;
2943
+ if (cls === "flex-col-reverse") return `.${escapeSelector(cls)} { flex-direction: column-reverse; }`;
2944
+ if (cls === "flex-wrap") return `.${escapeSelector(cls)} { flex-wrap: wrap; }`;
2945
+ if (cls === "flex-nowrap") return `.${escapeSelector(cls)} { flex-wrap: nowrap; }`;
2946
+ if (cls === "flex-wrap-reverse") return `.${escapeSelector(cls)} { flex-wrap: wrap-reverse; }`;
2947
+ if (cls === "flex-1") return `.${escapeSelector(cls)} { flex: 1 1 0%; }`;
2948
+ if (cls === "flex-auto") return `.${escapeSelector(cls)} { flex: 1 1 auto; }`;
2949
+ if (cls === "flex-initial") return `.${escapeSelector(cls)} { flex: 0 1 auto; }`;
2950
+ if (cls === "flex-none") return `.${escapeSelector(cls)} { flex: none; }`;
2951
+ if (cls === "flex-grow") return `.${escapeSelector(cls)} { flex-grow: 1; }`;
2952
+ if (cls === "flex-grow-0") return `.${escapeSelector(cls)} { flex-grow: 0; }`;
2953
+ if (cls === "flex-shrink") return `.${escapeSelector(cls)} { flex-shrink: 1; }`;
2954
+ if (cls === "flex-shrink-0") return `.${escapeSelector(cls)} { flex-shrink: 0; }`;
2955
+ if (cls === "grow") return `.${escapeSelector(cls)} { flex-grow: 1; }`;
2956
+ if (cls === "grow-0") return `.${escapeSelector(cls)} { flex-grow: 0; }`;
2957
+ if (cls === "shrink") return `.${escapeSelector(cls)} { flex-shrink: 1; }`;
2958
+ if (cls === "shrink-0") return `.${escapeSelector(cls)} { flex-shrink: 0; }`;
2959
+ if (cls === "items-start") return `.${escapeSelector(cls)} { align-items: flex-start; }`;
2960
+ if (cls === "items-end") return `.${escapeSelector(cls)} { align-items: flex-end; }`;
2961
+ if (cls === "items-center") return `.${escapeSelector(cls)} { align-items: center; }`;
2962
+ if (cls === "items-baseline") return `.${escapeSelector(cls)} { align-items: baseline; }`;
2963
+ if (cls === "items-stretch") return `.${escapeSelector(cls)} { align-items: stretch; }`;
2964
+ if (cls === "self-auto") return `.${escapeSelector(cls)} { align-self: auto; }`;
2965
+ if (cls === "self-start") return `.${escapeSelector(cls)} { align-self: flex-start; }`;
2966
+ if (cls === "self-end") return `.${escapeSelector(cls)} { align-self: flex-end; }`;
2967
+ if (cls === "self-center") return `.${escapeSelector(cls)} { align-self: center; }`;
2968
+ if (cls === "self-stretch") return `.${escapeSelector(cls)} { align-self: stretch; }`;
2969
+ if (cls === "self-baseline") return `.${escapeSelector(cls)} { align-self: baseline; }`;
2970
+ if (cls === "justify-start") return `.${escapeSelector(cls)} { justify-content: flex-start; }`;
2971
+ if (cls === "justify-end") return `.${escapeSelector(cls)} { justify-content: flex-end; }`;
2972
+ if (cls === "justify-center") return `.${escapeSelector(cls)} { justify-content: center; }`;
2973
+ if (cls === "justify-between") return `.${escapeSelector(cls)} { justify-content: space-between; }`;
2974
+ if (cls === "justify-around") return `.${escapeSelector(cls)} { justify-content: space-around; }`;
2975
+ if (cls === "justify-evenly") return `.${escapeSelector(cls)} { justify-content: space-evenly; }`;
2976
+ if (cls === "justify-stretch") return `.${escapeSelector(cls)} { justify-content: stretch; }`;
2977
+ if (cls === "justify-items-start") return `.${escapeSelector(cls)} { justify-items: start; }`;
2978
+ if (cls === "justify-items-end") return `.${escapeSelector(cls)} { justify-items: end; }`;
2979
+ if (cls === "justify-items-center") return `.${escapeSelector(cls)} { justify-items: center; }`;
2980
+ if (cls === "justify-items-stretch") return `.${escapeSelector(cls)} { justify-items: stretch; }`;
2981
+ if (cls === "justify-self-auto") return `.${escapeSelector(cls)} { justify-self: auto; }`;
2982
+ if (cls === "justify-self-start") return `.${escapeSelector(cls)} { justify-self: start; }`;
2983
+ if (cls === "justify-self-end") return `.${escapeSelector(cls)} { justify-self: end; }`;
2984
+ if (cls === "justify-self-center") return `.${escapeSelector(cls)} { justify-self: center; }`;
2985
+ if (cls === "justify-self-stretch") return `.${escapeSelector(cls)} { justify-self: stretch; }`;
2986
+ if (cls === "content-normal") return `.${escapeSelector(cls)} { align-content: normal; }`;
2987
+ if (cls === "content-center") return `.${escapeSelector(cls)} { align-content: center; }`;
2988
+ if (cls === "content-start") return `.${escapeSelector(cls)} { align-content: flex-start; }`;
2989
+ if (cls === "content-end") return `.${escapeSelector(cls)} { align-content: flex-end; }`;
2990
+ if (cls === "content-between") return `.${escapeSelector(cls)} { align-content: space-between; }`;
2991
+ if (cls === "content-around") return `.${escapeSelector(cls)} { align-content: space-around; }`;
2992
+ if (cls === "content-evenly") return `.${escapeSelector(cls)} { align-content: space-evenly; }`;
2993
+ if (cls === "content-stretch") return `.${escapeSelector(cls)} { align-content: stretch; }`;
2994
+ if (cls === "content-baseline") return `.${escapeSelector(cls)} { align-content: baseline; }`;
2863
2995
  const gridColsMatch = cls.match(/^grid-cols-(\d+)$/);
2864
2996
  if (gridColsMatch) {
2865
2997
  const n = parseInt(gridColsMatch[1]);
2866
- return `.${cls} { grid-template-columns: repeat(${n}, minmax(0, 1fr)); }`;
2998
+ return `.${escapeSelector(cls)} { grid-template-columns: repeat(${n}, minmax(0, 1fr)); }`;
2867
2999
  }
2868
- if (cls === "grid-cols-none") return `.${cls} { grid-template-columns: none; }`;
3000
+ if (cls === "grid-cols-none") return `.${escapeSelector(cls)} { grid-template-columns: none; }`;
2869
3001
  const gridRowsMatch = cls.match(/^grid-rows-(\d+)$/);
2870
3002
  if (gridRowsMatch) {
2871
3003
  const n = parseInt(gridRowsMatch[1]);
2872
- return `.${cls} { grid-template-rows: repeat(${n}, minmax(0, 1fr)); }`;
3004
+ return `.${escapeSelector(cls)} { grid-template-rows: repeat(${n}, minmax(0, 1fr)); }`;
2873
3005
  }
2874
- if (cls === "grid-rows-none") return `.${cls} { grid-template-rows: none; }`;
3006
+ if (cls === "grid-rows-none") return `.${escapeSelector(cls)} { grid-template-rows: none; }`;
2875
3007
  const colSpanMatch = cls.match(/^col-span-(\d+)$/);
2876
- if (colSpanMatch) return `.${cls} { grid-column: span ${colSpanMatch[1]} / span ${colSpanMatch[1]}; }`;
2877
- if (cls === "col-span-full") return `.${cls} { grid-column: 1 / -1; }`;
2878
- if (cls === "col-auto") return `.${cls} { grid-column: auto; }`;
3008
+ if (colSpanMatch) return `.${escapeSelector(cls)} { grid-column: span ${colSpanMatch[1]} / span ${colSpanMatch[1]}; }`;
3009
+ if (cls === "col-span-full") return `.${escapeSelector(cls)} { grid-column: 1 / -1; }`;
3010
+ if (cls === "col-auto") return `.${escapeSelector(cls)} { grid-column: auto; }`;
2879
3011
  const rowSpanMatch = cls.match(/^row-span-(\d+)$/);
2880
- if (rowSpanMatch) return `.${cls} { grid-row: span ${rowSpanMatch[1]} / span ${rowSpanMatch[1]}; }`;
2881
- if (cls === "row-span-full") return `.${cls} { grid-row: 1 / -1; }`;
2882
- if (cls === "row-auto") return `.${cls} { grid-row: auto; }`;
3012
+ if (rowSpanMatch) return `.${escapeSelector(cls)} { grid-row: span ${rowSpanMatch[1]} / span ${rowSpanMatch[1]}; }`;
3013
+ if (cls === "row-span-full") return `.${escapeSelector(cls)} { grid-row: 1 / -1; }`;
3014
+ if (cls === "row-auto") return `.${escapeSelector(cls)} { grid-row: auto; }`;
2883
3015
  const colStartMatch = cls.match(/^col-start-(\d+)$/);
2884
- if (colStartMatch) return `.${cls} { grid-column-start: ${colStartMatch[1]}; }`;
3016
+ if (colStartMatch) return `.${escapeSelector(cls)} { grid-column-start: ${colStartMatch[1]}; }`;
2885
3017
  const colEndMatch = cls.match(/^col-end-(\d+)$/);
2886
- if (colEndMatch) return `.${cls} { grid-column-end: ${colEndMatch[1]}; }`;
3018
+ if (colEndMatch) return `.${escapeSelector(cls)} { grid-column-end: ${colEndMatch[1]}; }`;
2887
3019
  const rowStartMatch = cls.match(/^row-start-(\d+)$/);
2888
- if (rowStartMatch) return `.${cls} { grid-row-start: ${rowStartMatch[1]}; }`;
3020
+ if (rowStartMatch) return `.${escapeSelector(cls)} { grid-row-start: ${rowStartMatch[1]}; }`;
2889
3021
  const rowEndMatch = cls.match(/^row-end-(\d+)$/);
2890
- if (rowEndMatch) return `.${cls} { grid-row-end: ${rowEndMatch[1]}; }`;
3022
+ if (rowEndMatch) return `.${escapeSelector(cls)} { grid-row-end: ${rowEndMatch[1]}; }`;
2891
3023
  const orderMatch = cls.match(/^order-(-?\d+)$/);
2892
- if (orderMatch) return `.${cls} { order: ${orderMatch[1]}; }`;
2893
- if (cls === "order-first") return `.${cls} { order: -9999; }`;
2894
- if (cls === "order-last") return `.${cls} { order: 9999; }`;
2895
- if (cls === "order-none") return `.${cls} { order: 0; }`;
2896
- if (cls === "float-right") return `.${cls} { float: right; }`;
2897
- if (cls === "float-left") return `.${cls} { float: left; }`;
2898
- if (cls === "float-none") return `.${cls} { float: none; }`;
3024
+ if (orderMatch) return `.${escapeSelector(cls)} { order: ${orderMatch[1]}; }`;
3025
+ if (cls === "order-first") return `.${escapeSelector(cls)} { order: -9999; }`;
3026
+ if (cls === "order-last") return `.${escapeSelector(cls)} { order: 9999; }`;
3027
+ if (cls === "order-none") return `.${escapeSelector(cls)} { order: 0; }`;
3028
+ if (cls === "float-right") return `.${escapeSelector(cls)} { float: right; }`;
3029
+ if (cls === "float-left") return `.${escapeSelector(cls)} { float: left; }`;
3030
+ if (cls === "float-none") return `.${escapeSelector(cls)} { float: none; }`;
2899
3031
  if (cls === "clearfix") return `.${cls}::after { content: ""; display: table; clear: both; }`;
2900
- if (cls === "overflow-auto") return `.${cls} { overflow: auto; }`;
2901
- if (cls === "overflow-hidden") return `.${cls} { overflow: hidden; }`;
2902
- if (cls === "overflow-clip") return `.${cls} { overflow: clip; }`;
2903
- if (cls === "overflow-visible") return `.${cls} { overflow: visible; }`;
2904
- if (cls === "overflow-scroll") return `.${cls} { overflow: scroll; }`;
2905
- if (cls === "overflow-x-auto") return `.${cls} { overflow-x: auto; }`;
2906
- if (cls === "overflow-x-hidden") return `.${cls} { overflow-x: hidden; }`;
2907
- if (cls === "overflow-x-scroll") return `.${cls} { overflow-x: scroll; }`;
2908
- if (cls === "overflow-y-auto") return `.${cls} { overflow-y: auto; }`;
2909
- if (cls === "overflow-y-hidden") return `.${cls} { overflow-y: hidden; }`;
2910
- if (cls === "overflow-y-scroll") return `.${cls} { overflow-y: scroll; }`;
2911
- if (cls === "visible") return `.${cls} { visibility: visible; }`;
2912
- if (cls === "invisible") return `.${cls} { visibility: hidden; }`;
2913
- if (cls === "collapse") return `.${cls} { visibility: collapse; }`;
2914
- if (cls === "pointer-events-none") return `.${cls} { pointer-events: none; }`;
2915
- if (cls === "pointer-events-auto") return `.${cls} { pointer-events: auto; }`;
3032
+ if (cls === "overflow-auto") return `.${escapeSelector(cls)} { overflow: auto; }`;
3033
+ if (cls === "overflow-hidden") return `.${escapeSelector(cls)} { overflow: hidden; }`;
3034
+ if (cls === "overflow-clip") return `.${escapeSelector(cls)} { overflow: clip; }`;
3035
+ if (cls === "overflow-visible") return `.${escapeSelector(cls)} { overflow: visible; }`;
3036
+ if (cls === "overflow-scroll") return `.${escapeSelector(cls)} { overflow: scroll; }`;
3037
+ if (cls === "overflow-x-auto") return `.${escapeSelector(cls)} { overflow-x: auto; }`;
3038
+ if (cls === "overflow-x-hidden") return `.${escapeSelector(cls)} { overflow-x: hidden; }`;
3039
+ if (cls === "overflow-x-scroll") return `.${escapeSelector(cls)} { overflow-x: scroll; }`;
3040
+ if (cls === "overflow-y-auto") return `.${escapeSelector(cls)} { overflow-y: auto; }`;
3041
+ if (cls === "overflow-y-hidden") return `.${escapeSelector(cls)} { overflow-y: hidden; }`;
3042
+ if (cls === "overflow-y-scroll") return `.${escapeSelector(cls)} { overflow-y: scroll; }`;
3043
+ if (cls === "visible") return `.${escapeSelector(cls)} { visibility: visible; }`;
3044
+ if (cls === "invisible") return `.${escapeSelector(cls)} { visibility: hidden; }`;
3045
+ if (cls === "collapse") return `.${escapeSelector(cls)} { visibility: collapse; }`;
3046
+ if (cls === "pointer-events-none") return `.${escapeSelector(cls)} { pointer-events: none; }`;
3047
+ if (cls === "pointer-events-auto") return `.${escapeSelector(cls)} { pointer-events: auto; }`;
2916
3048
  const cursorMap = {
2917
3049
  "cursor-auto": "auto",
2918
3050
  "cursor-default": "default",
@@ -2929,30 +3061,30 @@ function matchLayout(cls) {
2929
3061
  "cursor-zoom-in": "zoom-in",
2930
3062
  "cursor-zoom-out": "zoom-out"
2931
3063
  };
2932
- if (cursorMap[cls]) return `.${cls} { cursor: ${cursorMap[cls]}; }`;
2933
- if (cls === "select-none") return `.${cls} { user-select: none; }`;
2934
- if (cls === "select-text") return `.${cls} { user-select: text; }`;
2935
- if (cls === "select-all") return `.${cls} { user-select: all; }`;
2936
- if (cls === "select-auto") return `.${cls} { user-select: auto; }`;
2937
- if (cls === "object-contain") return `.${cls} { object-fit: contain; }`;
2938
- if (cls === "object-cover") return `.${cls} { object-fit: cover; }`;
2939
- if (cls === "object-fill") return `.${cls} { object-fit: fill; }`;
2940
- if (cls === "object-none") return `.${cls} { object-fit: none; }`;
2941
- if (cls === "object-scale-down") return `.${cls} { object-fit: scale-down; }`;
2942
- if (cls === "aspect-auto") return `.${cls} { aspect-ratio: auto; }`;
2943
- if (cls === "aspect-square") return `.${cls} { aspect-ratio: 1 / 1; }`;
2944
- if (cls === "aspect-video") return `.${cls} { aspect-ratio: 16 / 9; }`;
3064
+ if (cursorMap[cls]) return `.${escapeSelector(cls)} { cursor: ${cursorMap[cls]}; }`;
3065
+ if (cls === "select-none") return `.${escapeSelector(cls)} { user-select: none; }`;
3066
+ if (cls === "select-text") return `.${escapeSelector(cls)} { user-select: text; }`;
3067
+ if (cls === "select-all") return `.${escapeSelector(cls)} { user-select: all; }`;
3068
+ if (cls === "select-auto") return `.${escapeSelector(cls)} { user-select: auto; }`;
3069
+ if (cls === "object-contain") return `.${escapeSelector(cls)} { object-fit: contain; }`;
3070
+ if (cls === "object-cover") return `.${escapeSelector(cls)} { object-fit: cover; }`;
3071
+ if (cls === "object-fill") return `.${escapeSelector(cls)} { object-fit: fill; }`;
3072
+ if (cls === "object-none") return `.${escapeSelector(cls)} { object-fit: none; }`;
3073
+ if (cls === "object-scale-down") return `.${escapeSelector(cls)} { object-fit: scale-down; }`;
3074
+ if (cls === "aspect-auto") return `.${escapeSelector(cls)} { aspect-ratio: auto; }`;
3075
+ if (cls === "aspect-square") return `.${escapeSelector(cls)} { aspect-ratio: 1 / 1; }`;
3076
+ if (cls === "aspect-video") return `.${escapeSelector(cls)} { aspect-ratio: 16 / 9; }`;
2945
3077
  if (cls === "container") {
2946
- return `.${cls} {
3078
+ return `.${escapeSelector(cls)} {
2947
3079
  width: 100%;
2948
3080
  margin-left: auto;
2949
3081
  margin-right: auto;
2950
3082
  }`;
2951
3083
  }
2952
- if (cls === "box-border") return `.${cls} { box-sizing: border-box; }`;
2953
- if (cls === "box-content") return `.${cls} { box-sizing: content-box; }`;
2954
- if (cls === "isolate") return `.${cls} { isolation: isolate; }`;
2955
- if (cls === "isolation-auto") return `.${cls} { isolation: auto; }`;
3084
+ if (cls === "box-border") return `.${escapeSelector(cls)} { box-sizing: border-box; }`;
3085
+ if (cls === "box-content") return `.${escapeSelector(cls)} { box-sizing: content-box; }`;
3086
+ if (cls === "isolate") return `.${escapeSelector(cls)} { isolation: isolate; }`;
3087
+ if (cls === "isolation-auto") return `.${escapeSelector(cls)} { isolation: auto; }`;
2956
3088
  const mixBlendMap = {
2957
3089
  "mix-blend-normal": "normal",
2958
3090
  "mix-blend-multiply": "multiply",
@@ -2967,35 +3099,35 @@ function matchLayout(cls) {
2967
3099
  "mix-blend-difference": "difference",
2968
3100
  "mix-blend-exclusion": "exclusion"
2969
3101
  };
2970
- if (mixBlendMap[cls]) return `.${cls} { mix-blend-mode: ${mixBlendMap[cls]}; }`;
2971
- if (cls === "bg-auto") return `.${cls} { background-size: auto; }`;
2972
- if (cls === "bg-cover") return `.${cls} { background-size: cover; }`;
2973
- if (cls === "bg-contain") return `.${cls} { background-size: contain; }`;
2974
- if (cls === "bg-center") return `.${cls} { background-position: center; }`;
2975
- if (cls === "bg-top") return `.${cls} { background-position: top; }`;
2976
- if (cls === "bg-bottom") return `.${cls} { background-position: bottom; }`;
2977
- if (cls === "bg-left") return `.${cls} { background-position: left; }`;
2978
- if (cls === "bg-right") return `.${cls} { background-position: right; }`;
2979
- if (cls === "bg-left-top") return `.${cls} { background-position: left top; }`;
2980
- if (cls === "bg-left-bottom") return `.${cls} { background-position: left bottom; }`;
2981
- if (cls === "bg-right-top") return `.${cls} { background-position: right top; }`;
2982
- if (cls === "bg-right-bottom") return `.${cls} { background-position: right bottom; }`;
2983
- if (cls === "bg-repeat") return `.${cls} { background-repeat: repeat; }`;
2984
- if (cls === "bg-no-repeat") return `.${cls} { background-repeat: no-repeat; }`;
2985
- if (cls === "bg-repeat-x") return `.${cls} { background-repeat: repeat-x; }`;
2986
- if (cls === "bg-repeat-y") return `.${cls} { background-repeat: repeat-y; }`;
2987
- if (cls === "bg-repeat-round") return `.${cls} { background-repeat: round; }`;
2988
- if (cls === "bg-repeat-space") return `.${cls} { background-repeat: space; }`;
2989
- if (cls === "bg-fixed") return `.${cls} { background-attachment: fixed; }`;
2990
- if (cls === "bg-local") return `.${cls} { background-attachment: local; }`;
2991
- if (cls === "bg-scroll") return `.${cls} { background-attachment: scroll; }`;
2992
- if (cls === "bg-origin-border") return `.${cls} { background-origin: border-box; }`;
2993
- if (cls === "bg-origin-padding") return `.${cls} { background-origin: padding-box; }`;
2994
- if (cls === "bg-origin-content") return `.${cls} { background-origin: content-box; }`;
2995
- if (cls === "bg-clip-border") return `.${cls} { background-clip: border-box; }`;
2996
- if (cls === "bg-clip-padding") return `.${cls} { background-clip: padding-box; }`;
2997
- if (cls === "bg-clip-content") return `.${cls} { background-clip: content-box; }`;
2998
- if (cls === "bg-clip-text") return `.${cls} { background-clip: text; -webkit-background-clip: text; }`;
3102
+ if (mixBlendMap[cls]) return `.${escapeSelector(cls)} { mix-blend-mode: ${mixBlendMap[cls]}; }`;
3103
+ if (cls === "bg-auto") return `.${escapeSelector(cls)} { background-size: auto; }`;
3104
+ if (cls === "bg-cover") return `.${escapeSelector(cls)} { background-size: cover; }`;
3105
+ if (cls === "bg-contain") return `.${escapeSelector(cls)} { background-size: contain; }`;
3106
+ if (cls === "bg-center") return `.${escapeSelector(cls)} { background-position: center; }`;
3107
+ if (cls === "bg-top") return `.${escapeSelector(cls)} { background-position: top; }`;
3108
+ if (cls === "bg-bottom") return `.${escapeSelector(cls)} { background-position: bottom; }`;
3109
+ if (cls === "bg-left") return `.${escapeSelector(cls)} { background-position: left; }`;
3110
+ if (cls === "bg-right") return `.${escapeSelector(cls)} { background-position: right; }`;
3111
+ if (cls === "bg-left-top") return `.${escapeSelector(cls)} { background-position: left top; }`;
3112
+ if (cls === "bg-left-bottom") return `.${escapeSelector(cls)} { background-position: left bottom; }`;
3113
+ if (cls === "bg-right-top") return `.${escapeSelector(cls)} { background-position: right top; }`;
3114
+ if (cls === "bg-right-bottom") return `.${escapeSelector(cls)} { background-position: right bottom; }`;
3115
+ if (cls === "bg-repeat") return `.${escapeSelector(cls)} { background-repeat: repeat; }`;
3116
+ if (cls === "bg-no-repeat") return `.${escapeSelector(cls)} { background-repeat: no-repeat; }`;
3117
+ if (cls === "bg-repeat-x") return `.${escapeSelector(cls)} { background-repeat: repeat-x; }`;
3118
+ if (cls === "bg-repeat-y") return `.${escapeSelector(cls)} { background-repeat: repeat-y; }`;
3119
+ if (cls === "bg-repeat-round") return `.${escapeSelector(cls)} { background-repeat: round; }`;
3120
+ if (cls === "bg-repeat-space") return `.${escapeSelector(cls)} { background-repeat: space; }`;
3121
+ if (cls === "bg-fixed") return `.${escapeSelector(cls)} { background-attachment: fixed; }`;
3122
+ if (cls === "bg-local") return `.${escapeSelector(cls)} { background-attachment: local; }`;
3123
+ if (cls === "bg-scroll") return `.${escapeSelector(cls)} { background-attachment: scroll; }`;
3124
+ if (cls === "bg-origin-border") return `.${escapeSelector(cls)} { background-origin: border-box; }`;
3125
+ if (cls === "bg-origin-padding") return `.${escapeSelector(cls)} { background-origin: padding-box; }`;
3126
+ if (cls === "bg-origin-content") return `.${escapeSelector(cls)} { background-origin: content-box; }`;
3127
+ if (cls === "bg-clip-border") return `.${escapeSelector(cls)} { background-clip: border-box; }`;
3128
+ if (cls === "bg-clip-padding") return `.${escapeSelector(cls)} { background-clip: padding-box; }`;
3129
+ if (cls === "bg-clip-content") return `.${escapeSelector(cls)} { background-clip: content-box; }`;
3130
+ if (cls === "bg-clip-text") return `.${escapeSelector(cls)} { background-clip: text; -webkit-background-clip: text; }`;
2999
3131
  return null;
3000
3132
  }
3001
3133
  var init_layout = __esm({
@@ -3006,7 +3138,7 @@ var init_layout = __esm({
3006
3138
  });
3007
3139
 
3008
3140
  // src/generator/sizing.ts
3009
- function has3(obj, key) {
3141
+ function has2(obj, key) {
3010
3142
  return typeof obj[key] === "string";
3011
3143
  }
3012
3144
  function generateSizing(classes, config) {
@@ -3050,25 +3182,25 @@ function matchSizing(cls, spacing) {
3050
3182
  const wMatch = cls.match(/^w-(.+)$/);
3051
3183
  if (wMatch) {
3052
3184
  const key = wMatch[1];
3053
- if (key === "auto") return `.${cls} { width: auto; }`;
3054
- if (key === "full") return `.${cls} { width: 100%; }`;
3055
- if (key === "screen") return `.${cls} { width: 100vw; }`;
3056
- if (key === "svw") return `.${cls} { width: 100svw; }`;
3057
- if (key === "min") return `.${cls} { width: min-content; }`;
3058
- if (key === "max") return `.${cls} { width: max-content; }`;
3059
- if (key === "fit") return `.${cls} { width: fit-content; }`;
3060
- if (has3(fractions, key)) return `.${cls} { width: ${fractions[key]}; }`;
3061
- if (has3(spacing, key)) return `.${cls} { width: ${spacing[key]}; }`;
3185
+ if (key === "auto") return `.${escapeSelector(cls)} { width: auto; }`;
3186
+ if (key === "full") return `.${escapeSelector(cls)} { width: 100%; }`;
3187
+ if (key === "screen") return `.${escapeSelector(cls)} { width: 100vw; }`;
3188
+ if (key === "svw") return `.${escapeSelector(cls)} { width: 100svw; }`;
3189
+ if (key === "min") return `.${escapeSelector(cls)} { width: min-content; }`;
3190
+ if (key === "max") return `.${escapeSelector(cls)} { width: max-content; }`;
3191
+ if (key === "fit") return `.${escapeSelector(cls)} { width: fit-content; }`;
3192
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { width: ${fractions[key]}; }`;
3193
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { width: ${spacing[key]}; }`;
3062
3194
  }
3063
3195
  const minWMatch = cls.match(/^min-w-(.+)$/);
3064
3196
  if (minWMatch) {
3065
3197
  const key = minWMatch[1];
3066
- if (key === "0") return `.${cls} { min-width: 0px; }`;
3067
- if (key === "full") return `.${cls} { min-width: 100%; }`;
3068
- if (key === "min") return `.${cls} { min-width: min-content; }`;
3069
- if (key === "max") return `.${cls} { min-width: max-content; }`;
3070
- if (key === "fit") return `.${cls} { min-width: fit-content; }`;
3071
- if (has3(spacing, key)) return `.${cls} { min-width: ${spacing[key]}; }`;
3198
+ if (key === "0") return `.${escapeSelector(cls)} { min-width: 0px; }`;
3199
+ if (key === "full") return `.${escapeSelector(cls)} { min-width: 100%; }`;
3200
+ if (key === "min") return `.${escapeSelector(cls)} { min-width: min-content; }`;
3201
+ if (key === "max") return `.${escapeSelector(cls)} { min-width: max-content; }`;
3202
+ if (key === "fit") return `.${escapeSelector(cls)} { min-width: fit-content; }`;
3203
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { min-width: ${spacing[key]}; }`;
3072
3204
  }
3073
3205
  const maxWMap = {
3074
3206
  none: "none",
@@ -3095,64 +3227,65 @@ function matchSizing(cls, spacing) {
3095
3227
  "screen-2xl": "1536px"
3096
3228
  };
3097
3229
  const maxWMatch = cls.match(/^max-w-(.+)$/);
3098
- if (maxWMatch && has3(maxWMap, maxWMatch[1])) {
3099
- return `.${cls} { max-width: ${maxWMap[maxWMatch[1]]}; }`;
3230
+ if (maxWMatch && has2(maxWMap, maxWMatch[1])) {
3231
+ return `.${escapeSelector(cls)} { max-width: ${maxWMap[maxWMatch[1]]}; }`;
3100
3232
  }
3101
3233
  const hMatch = cls.match(/^h-(.+)$/);
3102
3234
  if (hMatch) {
3103
3235
  const key = hMatch[1];
3104
- if (key === "auto") return `.${cls} { height: auto; }`;
3105
- if (key === "full") return `.${cls} { height: 100%; }`;
3106
- if (key === "screen") return `.${cls} { height: 100vh; }`;
3107
- if (key === "svh") return `.${cls} { height: 100svh; }`;
3108
- if (key === "dvh") return `.${cls} { height: 100dvh; }`;
3109
- if (key === "min") return `.${cls} { height: min-content; }`;
3110
- if (key === "max") return `.${cls} { height: max-content; }`;
3111
- if (key === "fit") return `.${cls} { height: fit-content; }`;
3112
- if (has3(fractions, key)) return `.${cls} { height: ${fractions[key]}; }`;
3113
- if (has3(spacing, key)) return `.${cls} { height: ${spacing[key]}; }`;
3236
+ if (key === "auto") return `.${escapeSelector(cls)} { height: auto; }`;
3237
+ if (key === "full") return `.${escapeSelector(cls)} { height: 100%; }`;
3238
+ if (key === "screen") return `.${escapeSelector(cls)} { height: 100vh; }`;
3239
+ if (key === "svh") return `.${escapeSelector(cls)} { height: 100svh; }`;
3240
+ if (key === "dvh") return `.${escapeSelector(cls)} { height: 100dvh; }`;
3241
+ if (key === "min") return `.${escapeSelector(cls)} { height: min-content; }`;
3242
+ if (key === "max") return `.${escapeSelector(cls)} { height: max-content; }`;
3243
+ if (key === "fit") return `.${escapeSelector(cls)} { height: fit-content; }`;
3244
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { height: ${fractions[key]}; }`;
3245
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { height: ${spacing[key]}; }`;
3114
3246
  }
3115
3247
  const minHMatch = cls.match(/^min-h-(.+)$/);
3116
3248
  if (minHMatch) {
3117
3249
  const key = minHMatch[1];
3118
- if (key === "0") return `.${cls} { min-height: 0px; }`;
3119
- if (key === "full") return `.${cls} { min-height: 100%; }`;
3120
- if (key === "screen") return `.${cls} { min-height: 100vh; }`;
3121
- if (key === "svh") return `.${cls} { min-height: 100svh; }`;
3122
- if (key === "dvh") return `.${cls} { min-height: 100dvh; }`;
3123
- if (key === "fit") return `.${cls} { min-height: fit-content; }`;
3124
- if (has3(spacing, key)) return `.${cls} { min-height: ${spacing[key]}; }`;
3250
+ if (key === "0") return `.${escapeSelector(cls)} { min-height: 0px; }`;
3251
+ if (key === "full") return `.${escapeSelector(cls)} { min-height: 100%; }`;
3252
+ if (key === "screen") return `.${escapeSelector(cls)} { min-height: 100vh; }`;
3253
+ if (key === "svh") return `.${escapeSelector(cls)} { min-height: 100svh; }`;
3254
+ if (key === "dvh") return `.${escapeSelector(cls)} { min-height: 100dvh; }`;
3255
+ if (key === "fit") return `.${escapeSelector(cls)} { min-height: fit-content; }`;
3256
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { min-height: ${spacing[key]}; }`;
3125
3257
  }
3126
3258
  const maxHMatch = cls.match(/^max-h-(.+)$/);
3127
3259
  if (maxHMatch) {
3128
3260
  const key = maxHMatch[1];
3129
- if (key === "none") return `.${cls} { max-height: none; }`;
3130
- if (key === "full") return `.${cls} { max-height: 100%; }`;
3131
- if (key === "screen") return `.${cls} { max-height: 100vh; }`;
3132
- if (key === "svh") return `.${cls} { max-height: 100svh; }`;
3133
- if (key === "dvh") return `.${cls} { max-height: 100dvh; }`;
3134
- if (key === "fit") return `.${cls} { max-height: fit-content; }`;
3135
- if (has3(spacing, key)) return `.${cls} { max-height: ${spacing[key]}; }`;
3261
+ if (key === "none") return `.${escapeSelector(cls)} { max-height: none; }`;
3262
+ if (key === "full") return `.${escapeSelector(cls)} { max-height: 100%; }`;
3263
+ if (key === "screen") return `.${escapeSelector(cls)} { max-height: 100vh; }`;
3264
+ if (key === "svh") return `.${escapeSelector(cls)} { max-height: 100svh; }`;
3265
+ if (key === "dvh") return `.${escapeSelector(cls)} { max-height: 100dvh; }`;
3266
+ if (key === "fit") return `.${escapeSelector(cls)} { max-height: fit-content; }`;
3267
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { max-height: ${spacing[key]}; }`;
3136
3268
  }
3137
3269
  const basisMatch = cls.match(/^basis-(.+)$/);
3138
3270
  if (basisMatch) {
3139
3271
  const key = basisMatch[1];
3140
- if (key === "auto") return `.${cls} { flex-basis: auto; }`;
3141
- if (key === "full") return `.${cls} { flex-basis: 100%; }`;
3142
- if (key === "0") return `.${cls} { flex-basis: 0px; }`;
3143
- if (has3(fractions, key)) return `.${cls} { flex-basis: ${fractions[key]}; }`;
3144
- if (has3(spacing, key)) return `.${cls} { flex-basis: ${spacing[key]}; }`;
3272
+ if (key === "auto") return `.${escapeSelector(cls)} { flex-basis: auto; }`;
3273
+ if (key === "full") return `.${escapeSelector(cls)} { flex-basis: 100%; }`;
3274
+ if (key === "0") return `.${escapeSelector(cls)} { flex-basis: 0px; }`;
3275
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { flex-basis: ${fractions[key]}; }`;
3276
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { flex-basis: ${spacing[key]}; }`;
3145
3277
  }
3146
3278
  return null;
3147
3279
  }
3148
3280
  var init_sizing = __esm({
3149
3281
  "src/generator/sizing.ts"() {
3150
3282
  "use strict";
3283
+ init_utils();
3151
3284
  }
3152
3285
  });
3153
3286
 
3154
3287
  // src/generator/effects.ts
3155
- function has4(obj, key) {
3288
+ function has3(obj, key) {
3156
3289
  return typeof obj[key] === "string";
3157
3290
  }
3158
3291
  function generateEffects(classes, config) {
@@ -3166,8 +3299,8 @@ function generateEffects(classes, config) {
3166
3299
  }
3167
3300
  function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3168
3301
  const opacityMatch = cls.match(/^opacity-(.+)$/);
3169
- if (opacityMatch && has4(opacity, opacityMatch[1])) {
3170
- return `.${cls} {
3302
+ if (opacityMatch && has3(opacity, opacityMatch[1])) {
3303
+ return `.${escapeSelector(cls)} {
3171
3304
  opacity: ${opacity[opacityMatch[1]]};
3172
3305
  transition-property: opacity;
3173
3306
  transition-duration: var(--alive-duration, 0ms);
@@ -3175,87 +3308,87 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3175
3308
  }`;
3176
3309
  }
3177
3310
  const zMatch = cls.match(/^z-(.+)$/);
3178
- if (zMatch && has4(zIndex, zMatch[1])) {
3179
- return `.${cls} { z-index: ${zIndex[zMatch[1]]}; }`;
3311
+ if (zMatch && has3(zIndex, zMatch[1])) {
3312
+ return `.${escapeSelector(cls)} { z-index: ${zIndex[zMatch[1]]}; }`;
3180
3313
  }
3181
3314
  const shadowMatch = cls.match(/^shadow(?:-(.+))?$/);
3182
3315
  if (shadowMatch) {
3183
3316
  const key = shadowMatch[1] ?? "DEFAULT";
3184
- if (has4(boxShadow, key)) {
3185
- return `.${cls} { box-shadow: ${boxShadow[key]}; }`;
3317
+ if (has3(boxShadow, key)) {
3318
+ return `.${escapeSelector(cls)} { box-shadow: ${boxShadow[key]}; }`;
3186
3319
  }
3187
- if (!shadowMatch[1] && has4(boxShadow, "DEFAULT")) {
3188
- return `.${cls} { box-shadow: ${boxShadow["DEFAULT"]}; }`;
3320
+ if (!shadowMatch[1] && has3(boxShadow, "DEFAULT")) {
3321
+ return `.${escapeSelector(cls)} { box-shadow: ${boxShadow["DEFAULT"]}; }`;
3189
3322
  }
3190
3323
  }
3191
3324
  const roundedMatch = cls.match(/^rounded(?:-(.+))?$/);
3192
3325
  if (roundedMatch) {
3193
3326
  const key = roundedMatch[1] ?? "DEFAULT";
3194
- if (has4(borderRadius, key)) return `.${cls} { border-radius: ${borderRadius[key]}; }`;
3195
- if (!roundedMatch[1] && has4(borderRadius, "DEFAULT")) return `.${cls} { border-radius: ${borderRadius["DEFAULT"]}; }`;
3327
+ if (has3(borderRadius, key)) return `.${escapeSelector(cls)} { border-radius: ${borderRadius[key]}; }`;
3328
+ if (!roundedMatch[1] && has3(borderRadius, "DEFAULT")) return `.${escapeSelector(cls)} { border-radius: ${borderRadius["DEFAULT"]}; }`;
3196
3329
  }
3197
3330
  const roundedTMatch = cls.match(/^rounded-t(?:-(.+))?$/);
3198
3331
  if (roundedTMatch) {
3199
3332
  const rkey = roundedTMatch[1] ?? "DEFAULT";
3200
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3201
- if (val) return `.${cls} { border-top-left-radius: ${val}; border-top-right-radius: ${val}; }`;
3333
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3334
+ if (val) return `.${escapeSelector(cls)} { border-top-left-radius: ${val}; border-top-right-radius: ${val}; }`;
3202
3335
  }
3203
3336
  const roundedBMatch = cls.match(/^rounded-b(?:-(.+))?$/);
3204
3337
  if (roundedBMatch) {
3205
3338
  const rkey = roundedBMatch[1] ?? "DEFAULT";
3206
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3207
- if (val) return `.${cls} { border-bottom-left-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3339
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3340
+ if (val) return `.${escapeSelector(cls)} { border-bottom-left-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3208
3341
  }
3209
3342
  const roundedLMatch = cls.match(/^rounded-l(?:-(.+))?$/);
3210
3343
  if (roundedLMatch) {
3211
3344
  const rkey = roundedLMatch[1] ?? "DEFAULT";
3212
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3213
- if (val) return `.${cls} { border-top-left-radius: ${val}; border-bottom-left-radius: ${val}; }`;
3345
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3346
+ if (val) return `.${escapeSelector(cls)} { border-top-left-radius: ${val}; border-bottom-left-radius: ${val}; }`;
3214
3347
  }
3215
3348
  const roundedRMatch = cls.match(/^rounded-r(?:-(.+))?$/);
3216
3349
  if (roundedRMatch) {
3217
3350
  const rkey = roundedRMatch[1] ?? "DEFAULT";
3218
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3219
- if (val) return `.${cls} { border-top-right-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3220
- }
3221
- if (cls === "border") return `.${cls} { border-width: 1px; border-style: solid; }`;
3222
- if (cls === "border-0") return `.${cls} { border-width: 0px; }`;
3223
- if (cls === "border-2") return `.${cls} { border-width: 2px; border-style: solid; }`;
3224
- if (cls === "border-4") return `.${cls} { border-width: 4px; border-style: solid; }`;
3225
- if (cls === "border-8") return `.${cls} { border-width: 8px; border-style: solid; }`;
3226
- if (cls === "border-t") return `.${cls} { border-top-width: 1px; border-top-style: solid; }`;
3227
- if (cls === "border-r") return `.${cls} { border-right-width: 1px; border-right-style: solid; }`;
3228
- if (cls === "border-b") return `.${cls} { border-bottom-width: 1px; border-bottom-style: solid; }`;
3229
- if (cls === "border-l") return `.${cls} { border-left-width: 1px; border-left-style: solid; }`;
3230
- if (cls === "border-t-0") return `.${cls} { border-top-width: 0px; }`;
3231
- if (cls === "border-r-0") return `.${cls} { border-right-width: 0px; }`;
3232
- if (cls === "border-b-0") return `.${cls} { border-bottom-width: 0px; }`;
3233
- if (cls === "border-l-0") return `.${cls} { border-left-width: 0px; }`;
3234
- if (cls === "border-solid") return `.${cls} { border-style: solid; }`;
3235
- if (cls === "border-dashed") return `.${cls} { border-style: dashed; }`;
3236
- if (cls === "border-dotted") return `.${cls} { border-style: dotted; }`;
3237
- if (cls === "border-double") return `.${cls} { border-style: double; }`;
3238
- if (cls === "border-hidden") return `.${cls} { border-style: hidden; }`;
3239
- if (cls === "border-none") return `.${cls} { border-style: none; }`;
3240
- if (cls === "outline-none") return `.${cls} { outline: 2px solid transparent; outline-offset: 2px; }`;
3241
- if (cls === "outline") return `.${cls} { outline-style: solid; }`;
3242
- if (cls === "outline-dashed") return `.${cls} { outline-style: dashed; }`;
3243
- if (cls === "outline-dotted") return `.${cls} { outline-style: dotted; }`;
3244
- if (cls === "outline-double") return `.${cls} { outline-style: double; }`;
3351
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3352
+ if (val) return `.${escapeSelector(cls)} { border-top-right-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3353
+ }
3354
+ if (cls === "border") return `.${escapeSelector(cls)} { border-width: 1px; border-style: solid; }`;
3355
+ if (cls === "border-0") return `.${escapeSelector(cls)} { border-width: 0px; }`;
3356
+ if (cls === "border-2") return `.${escapeSelector(cls)} { border-width: 2px; border-style: solid; }`;
3357
+ if (cls === "border-4") return `.${escapeSelector(cls)} { border-width: 4px; border-style: solid; }`;
3358
+ if (cls === "border-8") return `.${escapeSelector(cls)} { border-width: 8px; border-style: solid; }`;
3359
+ if (cls === "border-t") return `.${escapeSelector(cls)} { border-top-width: 1px; border-top-style: solid; }`;
3360
+ if (cls === "border-r") return `.${escapeSelector(cls)} { border-right-width: 1px; border-right-style: solid; }`;
3361
+ if (cls === "border-b") return `.${escapeSelector(cls)} { border-bottom-width: 1px; border-bottom-style: solid; }`;
3362
+ if (cls === "border-l") return `.${escapeSelector(cls)} { border-left-width: 1px; border-left-style: solid; }`;
3363
+ if (cls === "border-t-0") return `.${escapeSelector(cls)} { border-top-width: 0px; }`;
3364
+ if (cls === "border-r-0") return `.${escapeSelector(cls)} { border-right-width: 0px; }`;
3365
+ if (cls === "border-b-0") return `.${escapeSelector(cls)} { border-bottom-width: 0px; }`;
3366
+ if (cls === "border-l-0") return `.${escapeSelector(cls)} { border-left-width: 0px; }`;
3367
+ if (cls === "border-solid") return `.${escapeSelector(cls)} { border-style: solid; }`;
3368
+ if (cls === "border-dashed") return `.${escapeSelector(cls)} { border-style: dashed; }`;
3369
+ if (cls === "border-dotted") return `.${escapeSelector(cls)} { border-style: dotted; }`;
3370
+ if (cls === "border-double") return `.${escapeSelector(cls)} { border-style: double; }`;
3371
+ if (cls === "border-hidden") return `.${escapeSelector(cls)} { border-style: hidden; }`;
3372
+ if (cls === "border-none") return `.${escapeSelector(cls)} { border-style: none; }`;
3373
+ if (cls === "outline-none") return `.${escapeSelector(cls)} { outline: 2px solid transparent; outline-offset: 2px; }`;
3374
+ if (cls === "outline") return `.${escapeSelector(cls)} { outline-style: solid; }`;
3375
+ if (cls === "outline-dashed") return `.${escapeSelector(cls)} { outline-style: dashed; }`;
3376
+ if (cls === "outline-dotted") return `.${escapeSelector(cls)} { outline-style: dotted; }`;
3377
+ if (cls === "outline-double") return `.${escapeSelector(cls)} { outline-style: double; }`;
3245
3378
  const outlineWidthMatch = cls.match(/^outline-(\d+)$/);
3246
- if (outlineWidthMatch) return `.${cls} { outline-width: ${outlineWidthMatch[1]}px; }`;
3379
+ if (outlineWidthMatch) return `.${escapeSelector(cls)} { outline-width: ${outlineWidthMatch[1]}px; }`;
3247
3380
  const outlineOffsetMatch = cls.match(/^outline-offset-(\d+)$/);
3248
- if (outlineOffsetMatch) return `.${cls} { outline-offset: ${outlineOffsetMatch[1]}px; }`;
3381
+ if (outlineOffsetMatch) return `.${escapeSelector(cls)} { outline-offset: ${outlineOffsetMatch[1]}px; }`;
3249
3382
  const ringMatch = cls.match(/^ring(?:-(\d+))?$/);
3250
3383
  if (ringMatch) {
3251
3384
  const width = ringMatch[1] ?? "3";
3252
- return `.${cls} { box-shadow: 0 0 0 ${width}px var(--alive-ring-color, rgba(59, 130, 246, 0.5)); }`;
3385
+ return `.${escapeSelector(cls)} { box-shadow: 0 0 0 ${width}px var(--alive-ring-color, rgba(59, 130, 246, 0.5)); }`;
3253
3386
  }
3254
- if (cls === "ring-inset") return `.${cls} { --alive-ring-inset: inset; }`;
3387
+ if (cls === "ring-inset") return `.${escapeSelector(cls)} { --alive-ring-inset: inset; }`;
3255
3388
  const ringOffsetMatch = cls.match(/^ring-offset-(\d+)$/);
3256
- if (ringOffsetMatch) return `.${cls} { --alive-ring-offset: ${ringOffsetMatch[1]}px; }`;
3257
- if (cls === "transform") return `.${cls} { transform: translateX(var(--alive-tx,0)) translateY(var(--alive-ty,0)) rotate(var(--alive-rotate,0)) scaleX(var(--alive-sx,1)) scaleY(var(--alive-sy,1)) skewX(var(--alive-skew-x,0)) skewY(var(--alive-skew-y,0)); }`;
3258
- if (cls === "transform-none") return `.${cls} { transform: none; }`;
3389
+ if (ringOffsetMatch) return `.${escapeSelector(cls)} { --alive-ring-offset: ${ringOffsetMatch[1]}px; }`;
3390
+ if (cls === "transform") return `.${escapeSelector(cls)} { transform: translateX(var(--alive-tx,0)) translateY(var(--alive-ty,0)) rotate(var(--alive-rotate,0)) scaleX(var(--alive-sx,1)) scaleY(var(--alive-sy,1)) skewX(var(--alive-skew-x,0)) skewY(var(--alive-skew-y,0)); }`;
3391
+ if (cls === "transform-none") return `.${escapeSelector(cls)} { transform: none; }`;
3259
3392
  const scaleMap = {
3260
3393
  "0": "0",
3261
3394
  "50": ".5",
@@ -3269,16 +3402,16 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3269
3402
  "150": "1.5"
3270
3403
  };
3271
3404
  const scaleMatch = cls.match(/^scale-(\d+)$/);
3272
- if (scaleMatch && has4(scaleMap, scaleMatch[1])) {
3273
- return `.${cls} { transform: scale(${scaleMap[scaleMatch[1]]}); }`;
3405
+ if (scaleMatch && has3(scaleMap, scaleMatch[1])) {
3406
+ return `.${escapeSelector(cls)} { transform: scale(${scaleMap[scaleMatch[1]]}); }`;
3274
3407
  }
3275
3408
  const scaleXMatch = cls.match(/^scale-x-(\d+)$/);
3276
- if (scaleXMatch && has4(scaleMap, scaleXMatch[1])) {
3277
- return `.${cls} { transform: scaleX(${scaleMap[scaleXMatch[1]]}); }`;
3409
+ if (scaleXMatch && has3(scaleMap, scaleXMatch[1])) {
3410
+ return `.${escapeSelector(cls)} { transform: scaleX(${scaleMap[scaleXMatch[1]]}); }`;
3278
3411
  }
3279
3412
  const scaleYMatch = cls.match(/^scale-y-(\d+)$/);
3280
- if (scaleYMatch && has4(scaleMap, scaleYMatch[1])) {
3281
- return `.${cls} { transform: scaleY(${scaleMap[scaleYMatch[1]]}); }`;
3413
+ if (scaleYMatch && has3(scaleMap, scaleYMatch[1])) {
3414
+ return `.${escapeSelector(cls)} { transform: scaleY(${scaleMap[scaleYMatch[1]]}); }`;
3282
3415
  }
3283
3416
  const rotateMatch = cls.match(/^-?rotate-(\d+)$/);
3284
3417
  if (rotateMatch) {
@@ -3301,12 +3434,12 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3301
3434
  const val = fractions[key] ?? null;
3302
3435
  if (val) return `.${cls.replace(/^-/, "\\-")} { transform: translateY(${neg}${val}); }`;
3303
3436
  }
3304
- if (cls === "transition-none") return `.${cls} { transition: none; }`;
3305
- if (cls === "transition-all") return `.${cls} { transition: all var(--alive-duration-normal) var(--alive-ease-standard); }`;
3306
- if (cls === "transition-colors") return `.${cls} { transition: color, background-color, border-color, text-decoration-color, fill, stroke; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3307
- if (cls === "transition-opacity") return `.${cls} { transition: opacity; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3308
- if (cls === "transition-shadow") return `.${cls} { transition: box-shadow; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3309
- if (cls === "transition-transform") return `.${cls} { transition: transform; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3437
+ if (cls === "transition-none") return `.${escapeSelector(cls)} { transition: none; }`;
3438
+ if (cls === "transition-all") return `.${escapeSelector(cls)} { transition: all var(--alive-duration-normal) var(--alive-ease-standard); }`;
3439
+ if (cls === "transition-colors") return `.${escapeSelector(cls)} { transition: color, background-color, border-color, text-decoration-color, fill, stroke; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3440
+ if (cls === "transition-opacity") return `.${escapeSelector(cls)} { transition: opacity; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3441
+ if (cls === "transition-shadow") return `.${escapeSelector(cls)} { transition: box-shadow; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3442
+ if (cls === "transition-transform") return `.${escapeSelector(cls)} { transition: transform; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3310
3443
  const blurMatch = cls.match(/^blur(?:-(.+))?$/);
3311
3444
  if (blurMatch) {
3312
3445
  const blurMap = {
@@ -3320,7 +3453,7 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3320
3453
  "3xl": "64px"
3321
3454
  };
3322
3455
  const key = blurMatch[1] ?? "DEFAULT";
3323
- if (has4(blurMap, key)) return `.${cls} { filter: blur(${blurMap[key]}); }`;
3456
+ if (has3(blurMap, key)) return `.${escapeSelector(cls)} { filter: blur(${blurMap[key]}); }`;
3324
3457
  }
3325
3458
  const backdropBlurMatch = cls.match(/^backdrop-blur(?:-(.+))?$/);
3326
3459
  if (backdropBlurMatch) {
@@ -3335,7 +3468,7 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3335
3468
  "3xl": "64px"
3336
3469
  };
3337
3470
  const key = backdropBlurMatch[1] ?? "DEFAULT";
3338
- if (has4(blurMap, key)) return `.${cls} { backdrop-filter: blur(${blurMap[key]}); }`;
3471
+ if (has3(blurMap, key)) return `.${escapeSelector(cls)} { backdrop-filter: blur(${blurMap[key]}); }`;
3339
3472
  }
3340
3473
  const arbOpacityMatch = cls.match(/^opacity-\[(.+)\]$/);
3341
3474
  if (arbOpacityMatch) {
@@ -3470,6 +3603,9 @@ function generateUtilities(classes, config) {
3470
3603
  case "placeholder":
3471
3604
  selector += "::placeholder";
3472
3605
  break;
3606
+ case "file":
3607
+ selector += "::file-selector-button";
3608
+ break;
3473
3609
  case "group-hover":
3474
3610
  selector = `.group:hover ${selector}`;
3475
3611
  break;
@@ -3564,275 +3700,275 @@ function generateAliveSpecific(classes, _config) {
3564
3700
  ];
3565
3701
  if (aliveBasePrefixes.some((p) => cls === p || cls.startsWith(p + "-"))) continue;
3566
3702
  if (cls === "animate-none") {
3567
- rules.push(`.${cls} { animation: none; }`);
3703
+ rules.push(`.${escapeSelector(cls)} { animation: none; }`);
3568
3704
  continue;
3569
3705
  }
3570
3706
  if (cls === "animate-spin") {
3571
- rules.push(`.${cls} { animation: alive-spin 1s linear infinite; }`);
3707
+ rules.push(`.${escapeSelector(cls)} { animation: alive-spin 1s linear infinite; }`);
3572
3708
  continue;
3573
3709
  }
3574
3710
  if (cls === "animate-ping") {
3575
- rules.push(`.${cls} { animation: alive-ping 1s cubic-bezier(0,0,0.2,1) infinite; }`);
3711
+ rules.push(`.${escapeSelector(cls)} { animation: alive-ping 1s cubic-bezier(0,0,0.2,1) infinite; }`);
3576
3712
  continue;
3577
3713
  }
3578
3714
  if (cls === "animate-pulse") {
3579
- rules.push(`.${cls} { animation: alive-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }`);
3715
+ rules.push(`.${escapeSelector(cls)} { animation: alive-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }`);
3580
3716
  continue;
3581
3717
  }
3582
3718
  if (cls === "animate-bounce") {
3583
- rules.push(`.${cls} { animation: alive-bounce 1s infinite; }`);
3719
+ rules.push(`.${escapeSelector(cls)} { animation: alive-bounce 1s infinite; }`);
3584
3720
  continue;
3585
3721
  }
3586
3722
  if (cls === "animate-shimmer") {
3587
- rules.push(`.${cls} { animation: alive-shimmer 1.5s linear infinite; }`);
3723
+ rules.push(`.${escapeSelector(cls)} { animation: alive-shimmer 1.5s linear infinite; }`);
3588
3724
  continue;
3589
3725
  }
3590
3726
  if (cls === "ease-linear") {
3591
- rules.push(`.${cls} { transition-timing-function: linear; }`);
3727
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: linear; }`);
3592
3728
  continue;
3593
3729
  }
3594
3730
  if (cls === "ease-in") {
3595
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0.4,0,1,1); }`);
3731
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0.4,0,1,1); }`);
3596
3732
  continue;
3597
3733
  }
3598
3734
  if (cls === "ease-out") {
3599
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0,0,0.2,1); }`);
3735
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0,0,0.2,1); }`);
3600
3736
  continue;
3601
3737
  }
3602
3738
  if (cls === "ease-in-out") {
3603
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0.4,0,0.2,1); }`);
3739
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0.4,0,0.2,1); }`);
3604
3740
  continue;
3605
3741
  }
3606
3742
  if (cls === "group") {
3607
- rules.push(`.${cls} {}`);
3743
+ rules.push(`.${escapeSelector(cls)} {}`);
3608
3744
  continue;
3609
3745
  }
3610
3746
  const staggerMatch = cls.match(/^stagger-(\d+)$/);
3611
3747
  if (staggerMatch) {
3612
- rules.push(`.${cls} { --alive-stagger-gap: ${staggerMatch[1]}ms; }`);
3748
+ rules.push(`.${escapeSelector(cls)} { --alive-stagger-gap: ${staggerMatch[1]}ms; }`);
3613
3749
  continue;
3614
3750
  }
3615
3751
  const indexMatch = cls.match(/^alive-index-(\d+)$/);
3616
3752
  if (indexMatch) {
3617
- rules.push(`.${cls} { --alive-index: ${indexMatch[1]}; }`);
3753
+ rules.push(`.${escapeSelector(cls)} { --alive-index: ${indexMatch[1]}; }`);
3618
3754
  continue;
3619
3755
  }
3620
3756
  const durationMatch = cls.match(/^duration-(\d+)$/);
3621
3757
  if (durationMatch) {
3622
- rules.push(`.${cls} { --alive-duration: ${durationMatch[1]}ms; }`);
3758
+ rules.push(`.${escapeSelector(cls)} { --alive-duration: ${durationMatch[1]}ms; }`);
3623
3759
  continue;
3624
3760
  }
3625
3761
  const delayMatch = cls.match(/^delay-(\d+)$/);
3626
3762
  if (delayMatch) {
3627
- rules.push(`.${cls} { animation-delay: ${delayMatch[1]}ms; }`);
3763
+ rules.push(`.${escapeSelector(cls)} { animation-delay: ${delayMatch[1]}ms; }`);
3628
3764
  continue;
3629
3765
  }
3630
3766
  const motionMsMatch = cls.match(/^motion-(\d+)$/);
3631
3767
  if (motionMsMatch) {
3632
- rules.push(`.${cls} { --alive-duration: ${motionMsMatch[1]}ms !important; }`);
3768
+ rules.push(`.${escapeSelector(cls)} { --alive-duration: ${motionMsMatch[1]}ms !important; }`);
3633
3769
  continue;
3634
3770
  }
3635
3771
  if (cls === "divide-x") {
3636
- rules.push(`.${cls} > * + * { border-left-width: 1px; border-left-style: solid; }`);
3772
+ rules.push(`.${escapeSelector(cls)}> * + * { border-left-width: 1px; border-left-style: solid; }`);
3637
3773
  continue;
3638
3774
  }
3639
3775
  if (cls === "divide-y") {
3640
- rules.push(`.${cls} > * + * { border-top-width: 1px; border-top-style: solid; }`);
3776
+ rules.push(`.${escapeSelector(cls)}> * + * { border-top-width: 1px; border-top-style: solid; }`);
3641
3777
  continue;
3642
3778
  }
3643
3779
  const divideColorMatch = cls.match(/^divide-([a-z]+)(?:-(\d+))?$/);
3644
3780
  if (divideColorMatch) {
3645
- rules.push(`.${cls} > * + * { border-color: inherit; }`);
3781
+ rules.push(`.${escapeSelector(cls)}> * + * { border-color: inherit; }`);
3646
3782
  continue;
3647
3783
  }
3648
3784
  if (cls === "appearance-none") {
3649
- rules.push(`.${cls} { appearance: none; }`);
3785
+ rules.push(`.${escapeSelector(cls)} { appearance: none; }`);
3650
3786
  continue;
3651
3787
  }
3652
3788
  if (cls === "appearance-auto") {
3653
- rules.push(`.${cls} { appearance: auto; }`);
3789
+ rules.push(`.${escapeSelector(cls)} { appearance: auto; }`);
3654
3790
  continue;
3655
3791
  }
3656
3792
  if (cls === "resize-none") {
3657
- rules.push(`.${cls} { resize: none; }`);
3793
+ rules.push(`.${escapeSelector(cls)} { resize: none; }`);
3658
3794
  continue;
3659
3795
  }
3660
3796
  if (cls === "resize") {
3661
- rules.push(`.${cls} { resize: both; }`);
3797
+ rules.push(`.${escapeSelector(cls)} { resize: both; }`);
3662
3798
  continue;
3663
3799
  }
3664
3800
  if (cls === "resize-y") {
3665
- rules.push(`.${cls} { resize: vertical; }`);
3801
+ rules.push(`.${escapeSelector(cls)} { resize: vertical; }`);
3666
3802
  continue;
3667
3803
  }
3668
3804
  if (cls === "resize-x") {
3669
- rules.push(`.${cls} { resize: horizontal; }`);
3805
+ rules.push(`.${escapeSelector(cls)} { resize: horizontal; }`);
3670
3806
  continue;
3671
3807
  }
3672
3808
  if (cls === "snap-none") {
3673
- rules.push(`.${cls} { scroll-snap-type: none; }`);
3809
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: none; }`);
3674
3810
  continue;
3675
3811
  }
3676
3812
  if (cls === "snap-x") {
3677
- rules.push(`.${cls} { scroll-snap-type: x mandatory; }`);
3813
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: x mandatory; }`);
3678
3814
  continue;
3679
3815
  }
3680
3816
  if (cls === "snap-y") {
3681
- rules.push(`.${cls} { scroll-snap-type: y mandatory; }`);
3817
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: y mandatory; }`);
3682
3818
  continue;
3683
3819
  }
3684
3820
  if (cls === "snap-start") {
3685
- rules.push(`.${cls} { scroll-snap-align: start; }`);
3821
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: start; }`);
3686
3822
  continue;
3687
3823
  }
3688
3824
  if (cls === "snap-center") {
3689
- rules.push(`.${cls} { scroll-snap-align: center; }`);
3825
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: center; }`);
3690
3826
  continue;
3691
3827
  }
3692
3828
  if (cls === "snap-end") {
3693
- rules.push(`.${cls} { scroll-snap-align: end; }`);
3829
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: end; }`);
3694
3830
  continue;
3695
3831
  }
3696
3832
  if (cls === "pointer-events-none") {
3697
- rules.push(`.${cls} { pointer-events: none; }`);
3833
+ rules.push(`.${escapeSelector(cls)} { pointer-events: none; }`);
3698
3834
  continue;
3699
3835
  }
3700
3836
  if (cls === "pointer-events-auto") {
3701
- rules.push(`.${cls} { pointer-events: auto; }`);
3837
+ rules.push(`.${escapeSelector(cls)} { pointer-events: auto; }`);
3702
3838
  continue;
3703
3839
  }
3704
3840
  if (cls === "sr-only") {
3705
- rules.push(`.${cls} { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }`);
3841
+ rules.push(`.${escapeSelector(cls)} { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }`);
3706
3842
  continue;
3707
3843
  }
3708
3844
  if (cls === "not-sr-only") {
3709
- rules.push(`.${cls} { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }`);
3845
+ rules.push(`.${escapeSelector(cls)} { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }`);
3710
3846
  continue;
3711
3847
  }
3712
3848
  if (cls === "will-change-auto") {
3713
- rules.push(`.${cls} { will-change: auto; }`);
3849
+ rules.push(`.${escapeSelector(cls)} { will-change: auto; }`);
3714
3850
  continue;
3715
3851
  }
3716
3852
  if (cls === "will-change-transform") {
3717
- rules.push(`.${cls} { will-change: transform; }`);
3853
+ rules.push(`.${escapeSelector(cls)} { will-change: transform; }`);
3718
3854
  continue;
3719
3855
  }
3720
3856
  if (cls === "will-change-opacity") {
3721
- rules.push(`.${cls} { will-change: opacity; }`);
3857
+ rules.push(`.${escapeSelector(cls)} { will-change: opacity; }`);
3722
3858
  continue;
3723
3859
  }
3724
3860
  const lineClampMatch = cls.match(/^line-clamp-(\d+)$/);
3725
3861
  if (lineClampMatch) {
3726
3862
  const n = lineClampMatch[1];
3727
- rules.push(`.${cls} { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${n}; -webkit-box-orient: vertical; }`);
3863
+ rules.push(`.${escapeSelector(cls)} { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${n}; -webkit-box-orient: vertical; }`);
3728
3864
  continue;
3729
3865
  }
3730
3866
  if (cls === "aspect-square") {
3731
- rules.push(`.${cls} { aspect-ratio: 1 / 1; }`);
3867
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: 1 / 1; }`);
3732
3868
  continue;
3733
3869
  }
3734
3870
  if (cls === "aspect-video") {
3735
- rules.push(`.${cls} { aspect-ratio: 16 / 9; }`);
3871
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: 16 / 9; }`);
3736
3872
  continue;
3737
3873
  }
3738
3874
  if (cls === "aspect-auto") {
3739
- rules.push(`.${cls} { aspect-ratio: auto; }`);
3875
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: auto; }`);
3740
3876
  continue;
3741
3877
  }
3742
3878
  if (cls === "object-contain") {
3743
- rules.push(`.${cls} { object-fit: contain; }`);
3879
+ rules.push(`.${escapeSelector(cls)} { object-fit: contain; }`);
3744
3880
  continue;
3745
3881
  }
3746
3882
  if (cls === "object-cover") {
3747
- rules.push(`.${cls} { object-fit: cover; }`);
3883
+ rules.push(`.${escapeSelector(cls)} { object-fit: cover; }`);
3748
3884
  continue;
3749
3885
  }
3750
3886
  if (cls === "object-fill") {
3751
- rules.push(`.${cls} { object-fit: fill; }`);
3887
+ rules.push(`.${escapeSelector(cls)} { object-fit: fill; }`);
3752
3888
  continue;
3753
3889
  }
3754
3890
  if (cls === "object-none") {
3755
- rules.push(`.${cls} { object-fit: none; }`);
3891
+ rules.push(`.${escapeSelector(cls)} { object-fit: none; }`);
3756
3892
  continue;
3757
3893
  }
3758
3894
  if (cls === "object-scale") {
3759
- rules.push(`.${cls} { object-fit: scale-down; }`);
3895
+ rules.push(`.${escapeSelector(cls)} { object-fit: scale-down; }`);
3760
3896
  continue;
3761
3897
  }
3762
3898
  if (cls === "mix-blend-multiply") {
3763
- rules.push(`.${cls} { mix-blend-mode: multiply; }`);
3899
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: multiply; }`);
3764
3900
  continue;
3765
3901
  }
3766
3902
  if (cls === "mix-blend-screen") {
3767
- rules.push(`.${cls} { mix-blend-mode: screen; }`);
3903
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: screen; }`);
3768
3904
  continue;
3769
3905
  }
3770
3906
  if (cls === "mix-blend-overlay") {
3771
- rules.push(`.${cls} { mix-blend-mode: overlay; }`);
3907
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: overlay; }`);
3772
3908
  continue;
3773
3909
  }
3774
3910
  if (cls === "mix-blend-normal") {
3775
- rules.push(`.${cls} { mix-blend-mode: normal; }`);
3911
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: normal; }`);
3776
3912
  continue;
3777
3913
  }
3778
3914
  if (cls === "isolate") {
3779
- rules.push(`.${cls} { isolation: isolate; }`);
3915
+ rules.push(`.${escapeSelector(cls)} { isolation: isolate; }`);
3780
3916
  continue;
3781
3917
  }
3782
3918
  if (cls === "isolation-auto") {
3783
- rules.push(`.${cls} { isolation: auto; }`);
3919
+ rules.push(`.${escapeSelector(cls)} { isolation: auto; }`);
3784
3920
  continue;
3785
3921
  }
3786
3922
  if (cls === "touch-auto") {
3787
- rules.push(`.${cls} { touch-action: auto; }`);
3923
+ rules.push(`.${escapeSelector(cls)} { touch-action: auto; }`);
3788
3924
  continue;
3789
3925
  }
3790
3926
  if (cls === "touch-none") {
3791
- rules.push(`.${cls} { touch-action: none; }`);
3927
+ rules.push(`.${escapeSelector(cls)} { touch-action: none; }`);
3792
3928
  continue;
3793
3929
  }
3794
3930
  if (cls === "touch-pan-x") {
3795
- rules.push(`.${cls} { touch-action: pan-x; }`);
3931
+ rules.push(`.${escapeSelector(cls)} { touch-action: pan-x; }`);
3796
3932
  continue;
3797
3933
  }
3798
3934
  if (cls === "touch-pan-y") {
3799
- rules.push(`.${cls} { touch-action: pan-y; }`);
3935
+ rules.push(`.${escapeSelector(cls)} { touch-action: pan-y; }`);
3800
3936
  continue;
3801
3937
  }
3802
3938
  if (cls === "touch-manipulation") {
3803
- rules.push(`.${cls} { touch-action: manipulation; }`);
3939
+ rules.push(`.${escapeSelector(cls)} { touch-action: manipulation; }`);
3804
3940
  continue;
3805
3941
  }
3806
3942
  if (cls === "select-none") {
3807
- rules.push(`.${cls} { user-select: none; }`);
3943
+ rules.push(`.${escapeSelector(cls)} { user-select: none; }`);
3808
3944
  continue;
3809
3945
  }
3810
3946
  if (cls === "select-text") {
3811
- rules.push(`.${cls} { user-select: text; }`);
3947
+ rules.push(`.${escapeSelector(cls)} { user-select: text; }`);
3812
3948
  continue;
3813
3949
  }
3814
3950
  if (cls === "select-all") {
3815
- rules.push(`.${cls} { user-select: all; }`);
3951
+ rules.push(`.${escapeSelector(cls)} { user-select: all; }`);
3816
3952
  continue;
3817
3953
  }
3818
3954
  if (cls === "select-auto") {
3819
- rules.push(`.${cls} { user-select: auto; }`);
3955
+ rules.push(`.${escapeSelector(cls)} { user-select: auto; }`);
3820
3956
  continue;
3821
3957
  }
3822
3958
  if (cls === "break-normal") {
3823
- rules.push(`.${cls} { overflow-wrap: normal; word-break: normal; }`);
3959
+ rules.push(`.${escapeSelector(cls)} { overflow-wrap: normal; word-break: normal; }`);
3824
3960
  continue;
3825
3961
  }
3826
3962
  if (cls === "break-words") {
3827
- rules.push(`.${cls} { overflow-wrap: break-word; }`);
3963
+ rules.push(`.${escapeSelector(cls)} { overflow-wrap: break-word; }`);
3828
3964
  continue;
3829
3965
  }
3830
3966
  if (cls === "break-all") {
3831
- rules.push(`.${cls} { word-break: break-all; }`);
3967
+ rules.push(`.${escapeSelector(cls)} { word-break: break-all; }`);
3832
3968
  continue;
3833
3969
  }
3834
3970
  if (cls === "break-keep") {
3835
- rules.push(`.${cls} { word-break: keep-all; }`);
3971
+ rules.push(`.${escapeSelector(cls)} { word-break: keep-all; }`);
3836
3972
  continue;
3837
3973
  }
3838
3974
  }