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