@mochi-css/vanilla 1.1.0 → 2.0.1

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/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import properties from "known-css-properties";
2
1
  import clsx from "clsx";
3
2
  import { createElement } from "react";
4
3
 
@@ -381,15 +380,757 @@ const propertyUnits = {
381
380
  zoom: "%"
382
381
  };
383
382
 
383
+ //#endregion
384
+ //#region src/knownProperties.generated.ts
385
+ const knownPropertyNames = new Set([
386
+ "accentColor",
387
+ "alignContent",
388
+ "alignItems",
389
+ "alignSelf",
390
+ "alignmentBaseline",
391
+ "all",
392
+ "anchorName",
393
+ "anchorScope",
394
+ "animation",
395
+ "animationComposition",
396
+ "animationDelay",
397
+ "animationDirection",
398
+ "animationDuration",
399
+ "animationFillMode",
400
+ "animationIterationCount",
401
+ "animationName",
402
+ "animationPlayState",
403
+ "animationRange",
404
+ "animationRangeCenter",
405
+ "animationRangeEnd",
406
+ "animationRangeStart",
407
+ "animationTimeline",
408
+ "animationTimingFunction",
409
+ "animationTrigger",
410
+ "appearance",
411
+ "aspectRatio",
412
+ "backdropFilter",
413
+ "backfaceVisibility",
414
+ "background",
415
+ "backgroundAttachment",
416
+ "backgroundBlendMode",
417
+ "backgroundClip",
418
+ "backgroundColor",
419
+ "backgroundImage",
420
+ "backgroundOrigin",
421
+ "backgroundPosition",
422
+ "backgroundPositionBlock",
423
+ "backgroundPositionInline",
424
+ "backgroundPositionX",
425
+ "backgroundPositionY",
426
+ "backgroundRepeat",
427
+ "backgroundRepeatBlock",
428
+ "backgroundRepeatInline",
429
+ "backgroundRepeatX",
430
+ "backgroundRepeatY",
431
+ "backgroundSize",
432
+ "backgroundTbd",
433
+ "baselineShift",
434
+ "baselineSource",
435
+ "blockEllipsis",
436
+ "blockSize",
437
+ "blockStep",
438
+ "blockStepAlign",
439
+ "blockStepInsert",
440
+ "blockStepRound",
441
+ "blockStepSize",
442
+ "bookmarkLabel",
443
+ "bookmarkLevel",
444
+ "bookmarkState",
445
+ "border",
446
+ "borderBlock",
447
+ "borderBlockClip",
448
+ "borderBlockColor",
449
+ "borderBlockEnd",
450
+ "borderBlockEndClip",
451
+ "borderBlockEndColor",
452
+ "borderBlockEndRadius",
453
+ "borderBlockEndStyle",
454
+ "borderBlockEndWidth",
455
+ "borderBlockStart",
456
+ "borderBlockStartClip",
457
+ "borderBlockStartColor",
458
+ "borderBlockStartRadius",
459
+ "borderBlockStartStyle",
460
+ "borderBlockStartWidth",
461
+ "borderBlockStyle",
462
+ "borderBlockWidth",
463
+ "borderBottom",
464
+ "borderBottomClip",
465
+ "borderBottomColor",
466
+ "borderBottomLeftRadius",
467
+ "borderBottomRadius",
468
+ "borderBottomRightRadius",
469
+ "borderBottomStyle",
470
+ "borderBottomWidth",
471
+ "borderBoundary",
472
+ "borderClip",
473
+ "borderCollapse",
474
+ "borderColor",
475
+ "borderEndEndRadius",
476
+ "borderEndStartRadius",
477
+ "borderImage",
478
+ "borderImageOutset",
479
+ "borderImageRepeat",
480
+ "borderImageSlice",
481
+ "borderImageSource",
482
+ "borderImageWidth",
483
+ "borderInline",
484
+ "borderInlineClip",
485
+ "borderInlineColor",
486
+ "borderInlineEnd",
487
+ "borderInlineEndClip",
488
+ "borderInlineEndColor",
489
+ "borderInlineEndRadius",
490
+ "borderInlineEndStyle",
491
+ "borderInlineEndWidth",
492
+ "borderInlineStart",
493
+ "borderInlineStartClip",
494
+ "borderInlineStartColor",
495
+ "borderInlineStartRadius",
496
+ "borderInlineStartStyle",
497
+ "borderInlineStartWidth",
498
+ "borderInlineStyle",
499
+ "borderInlineWidth",
500
+ "borderLeft",
501
+ "borderLeftClip",
502
+ "borderLeftColor",
503
+ "borderLeftRadius",
504
+ "borderLeftStyle",
505
+ "borderLeftWidth",
506
+ "borderLimit",
507
+ "borderRadius",
508
+ "borderRight",
509
+ "borderRightClip",
510
+ "borderRightColor",
511
+ "borderRightRadius",
512
+ "borderRightStyle",
513
+ "borderRightWidth",
514
+ "borderShape",
515
+ "borderSpacing",
516
+ "borderStartEndRadius",
517
+ "borderStartStartRadius",
518
+ "borderStyle",
519
+ "borderTop",
520
+ "borderTopClip",
521
+ "borderTopColor",
522
+ "borderTopLeftRadius",
523
+ "borderTopRadius",
524
+ "borderTopRightRadius",
525
+ "borderTopStyle",
526
+ "borderTopWidth",
527
+ "borderWidth",
528
+ "bottom",
529
+ "boxDecorationBreak",
530
+ "boxShadow",
531
+ "boxShadowBlur",
532
+ "boxShadowColor",
533
+ "boxShadowOffset",
534
+ "boxShadowPosition",
535
+ "boxShadowSpread",
536
+ "boxSizing",
537
+ "boxSnap",
538
+ "breakAfter",
539
+ "breakBefore",
540
+ "breakInside",
541
+ "captionSide",
542
+ "caret",
543
+ "caretAnimation",
544
+ "caretColor",
545
+ "caretShape",
546
+ "clear",
547
+ "clip",
548
+ "clipPath",
549
+ "clipRule",
550
+ "color",
551
+ "colorAdjust",
552
+ "colorInterpolation",
553
+ "colorInterpolationFilters",
554
+ "colorScheme",
555
+ "columnCount",
556
+ "columnFill",
557
+ "columnGap",
558
+ "columnHeight",
559
+ "columnRule",
560
+ "columnRuleBreak",
561
+ "columnRuleColor",
562
+ "columnRuleEdgeInset",
563
+ "columnRuleEdgeInsetEnd",
564
+ "columnRuleEdgeInsetStart",
565
+ "columnRuleInset",
566
+ "columnRuleInsetEnd",
567
+ "columnRuleInsetStart",
568
+ "columnRuleInteriorInset",
569
+ "columnRuleInteriorInsetEnd",
570
+ "columnRuleInteriorInsetStart",
571
+ "columnRuleStyle",
572
+ "columnRuleWidth",
573
+ "columnSpan",
574
+ "columnWidth",
575
+ "columnWrap",
576
+ "columns",
577
+ "contain",
578
+ "containIntrinsicBlockSize",
579
+ "containIntrinsicHeight",
580
+ "containIntrinsicInlineSize",
581
+ "containIntrinsicSize",
582
+ "containIntrinsicWidth",
583
+ "container",
584
+ "containerName",
585
+ "containerType",
586
+ "content",
587
+ "contentVisibility",
588
+ "continue",
589
+ "copyInto",
590
+ "corner",
591
+ "cornerBlockEnd",
592
+ "cornerBlockEndShape",
593
+ "cornerBlockStart",
594
+ "cornerBlockStartShape",
595
+ "cornerBottom",
596
+ "cornerBottomLeft",
597
+ "cornerBottomLeftShape",
598
+ "cornerBottomRight",
599
+ "cornerBottomRightShape",
600
+ "cornerBottomShape",
601
+ "cornerEndEnd",
602
+ "cornerEndEndShape",
603
+ "cornerEndStart",
604
+ "cornerEndStartShape",
605
+ "cornerInlineEnd",
606
+ "cornerInlineEndShape",
607
+ "cornerInlineStart",
608
+ "cornerInlineStartShape",
609
+ "cornerLeft",
610
+ "cornerLeftShape",
611
+ "cornerRight",
612
+ "cornerRightShape",
613
+ "cornerShape",
614
+ "cornerStartEnd",
615
+ "cornerStartEndShape",
616
+ "cornerStartStart",
617
+ "cornerStartStartShape",
618
+ "cornerTop",
619
+ "cornerTopLeft",
620
+ "cornerTopLeftShape",
621
+ "cornerTopRight",
622
+ "cornerTopRightShape",
623
+ "cornerTopShape",
624
+ "counterIncrement",
625
+ "counterReset",
626
+ "counterSet",
627
+ "cue",
628
+ "cueAfter",
629
+ "cueBefore",
630
+ "cursor",
631
+ "cx",
632
+ "cy",
633
+ "d",
634
+ "direction",
635
+ "display",
636
+ "dominantBaseline",
637
+ "dynamicRangeLimit",
638
+ "emptyCells",
639
+ "eventTrigger",
640
+ "eventTriggerName",
641
+ "eventTriggerSource",
642
+ "fieldSizing",
643
+ "fill",
644
+ "fillBreak",
645
+ "fillColor",
646
+ "fillImage",
647
+ "fillOpacity",
648
+ "fillOrigin",
649
+ "fillPosition",
650
+ "fillRepeat",
651
+ "fillRule",
652
+ "fillSize",
653
+ "filter",
654
+ "flex",
655
+ "flexBasis",
656
+ "flexDirection",
657
+ "flexFlow",
658
+ "flexGrow",
659
+ "flexShrink",
660
+ "flexWrap",
661
+ "float",
662
+ "floatDefer",
663
+ "floatOffset",
664
+ "floatReference",
665
+ "floodColor",
666
+ "floodOpacity",
667
+ "flowFrom",
668
+ "flowInto",
669
+ "flowTolerance",
670
+ "font",
671
+ "fontFamily",
672
+ "fontFeatureSettings",
673
+ "fontKerning",
674
+ "fontLanguageOverride",
675
+ "fontOpticalSizing",
676
+ "fontPalette",
677
+ "fontSize",
678
+ "fontSizeAdjust",
679
+ "fontStretch",
680
+ "fontStyle",
681
+ "fontSynthesis",
682
+ "fontSynthesisPosition",
683
+ "fontSynthesisSmallCaps",
684
+ "fontSynthesisStyle",
685
+ "fontSynthesisWeight",
686
+ "fontVariant",
687
+ "fontVariantAlternates",
688
+ "fontVariantCaps",
689
+ "fontVariantEastAsian",
690
+ "fontVariantEmoji",
691
+ "fontVariantLigatures",
692
+ "fontVariantNumeric",
693
+ "fontVariantPosition",
694
+ "fontVariationSettings",
695
+ "fontWeight",
696
+ "fontWidth",
697
+ "footnoteDisplay",
698
+ "footnotePolicy",
699
+ "forcedColorAdjust",
700
+ "gap",
701
+ "glyphOrientationVertical",
702
+ "grid",
703
+ "gridArea",
704
+ "gridAutoColumns",
705
+ "gridAutoFlow",
706
+ "gridAutoRows",
707
+ "gridColumn",
708
+ "gridColumnEnd",
709
+ "gridColumnGap",
710
+ "gridColumnStart",
711
+ "gridGap",
712
+ "gridRow",
713
+ "gridRowEnd",
714
+ "gridRowGap",
715
+ "gridRowStart",
716
+ "gridTemplate",
717
+ "gridTemplateAreas",
718
+ "gridTemplateColumns",
719
+ "gridTemplateRows",
720
+ "hangingPunctuation",
721
+ "height",
722
+ "hyphenateCharacter",
723
+ "hyphenateLimitChars",
724
+ "hyphenateLimitLast",
725
+ "hyphenateLimitLines",
726
+ "hyphenateLimitZone",
727
+ "hyphens",
728
+ "imageOrientation",
729
+ "imageRendering",
730
+ "imageResolution",
731
+ "initialLetter",
732
+ "initialLetterAlign",
733
+ "initialLetterWrap",
734
+ "inlineSize",
735
+ "inlineSizing",
736
+ "inputSecurity",
737
+ "inset",
738
+ "insetBlock",
739
+ "insetBlockEnd",
740
+ "insetBlockStart",
741
+ "insetInline",
742
+ "insetInlineEnd",
743
+ "insetInlineStart",
744
+ "interactivity",
745
+ "interestDelay",
746
+ "interestDelayEnd",
747
+ "interestDelayStart",
748
+ "interpolateSize",
749
+ "isolation",
750
+ "itemCross",
751
+ "itemDirection",
752
+ "itemFlow",
753
+ "itemPack",
754
+ "itemTrack",
755
+ "itemWrap",
756
+ "justifyContent",
757
+ "justifyItems",
758
+ "justifySelf",
759
+ "left",
760
+ "letterSpacing",
761
+ "lightingColor",
762
+ "lineBreak",
763
+ "lineClamp",
764
+ "lineFitEdge",
765
+ "lineGrid",
766
+ "lineHeight",
767
+ "lineHeightStep",
768
+ "linePadding",
769
+ "lineSnap",
770
+ "linkParameters",
771
+ "listStyle",
772
+ "listStyleImage",
773
+ "listStylePosition",
774
+ "listStyleType",
775
+ "margin",
776
+ "marginBlock",
777
+ "marginBlockEnd",
778
+ "marginBlockStart",
779
+ "marginBottom",
780
+ "marginBreak",
781
+ "marginInline",
782
+ "marginInlineEnd",
783
+ "marginInlineStart",
784
+ "marginLeft",
785
+ "marginRight",
786
+ "marginTop",
787
+ "marginTrim",
788
+ "marker",
789
+ "markerEnd",
790
+ "markerMid",
791
+ "markerSide",
792
+ "markerStart",
793
+ "mask",
794
+ "maskBorder",
795
+ "maskBorderMode",
796
+ "maskBorderOutset",
797
+ "maskBorderRepeat",
798
+ "maskBorderSlice",
799
+ "maskBorderSource",
800
+ "maskBorderWidth",
801
+ "maskClip",
802
+ "maskComposite",
803
+ "maskImage",
804
+ "maskMode",
805
+ "maskOrigin",
806
+ "maskPosition",
807
+ "maskRepeat",
808
+ "maskSize",
809
+ "maskType",
810
+ "mathDepth",
811
+ "mathShift",
812
+ "mathStyle",
813
+ "maxBlockSize",
814
+ "maxHeight",
815
+ "maxInlineSize",
816
+ "maxLines",
817
+ "maxWidth",
818
+ "minBlockSize",
819
+ "minHeight",
820
+ "minInlineSize",
821
+ "minIntrinsicSizing",
822
+ "minWidth",
823
+ "mixBlendMode",
824
+ "navDown",
825
+ "navLeft",
826
+ "navRight",
827
+ "navUp",
828
+ "objectFit",
829
+ "objectPosition",
830
+ "objectViewBox",
831
+ "offset",
832
+ "offsetAnchor",
833
+ "offsetDistance",
834
+ "offsetPath",
835
+ "offsetPosition",
836
+ "offsetRotate",
837
+ "opacity",
838
+ "order",
839
+ "orphans",
840
+ "outline",
841
+ "outlineColor",
842
+ "outlineOffset",
843
+ "outlineStyle",
844
+ "outlineWidth",
845
+ "overflow",
846
+ "overflowAnchor",
847
+ "overflowBlock",
848
+ "overflowClipMargin",
849
+ "overflowClipMarginBlock",
850
+ "overflowClipMarginBlockEnd",
851
+ "overflowClipMarginBlockStart",
852
+ "overflowClipMarginBottom",
853
+ "overflowClipMarginInline",
854
+ "overflowClipMarginInlineEnd",
855
+ "overflowClipMarginInlineStart",
856
+ "overflowClipMarginLeft",
857
+ "overflowClipMarginRight",
858
+ "overflowClipMarginTop",
859
+ "overflowInline",
860
+ "overflowWrap",
861
+ "overflowX",
862
+ "overflowY",
863
+ "overlay",
864
+ "overscrollBehavior",
865
+ "overscrollBehaviorBlock",
866
+ "overscrollBehaviorInline",
867
+ "overscrollBehaviorX",
868
+ "overscrollBehaviorY",
869
+ "padding",
870
+ "paddingBlock",
871
+ "paddingBlockEnd",
872
+ "paddingBlockStart",
873
+ "paddingBottom",
874
+ "paddingInline",
875
+ "paddingInlineEnd",
876
+ "paddingInlineStart",
877
+ "paddingLeft",
878
+ "paddingRight",
879
+ "paddingTop",
880
+ "page",
881
+ "pageBreakAfter",
882
+ "pageBreakBefore",
883
+ "pageBreakInside",
884
+ "paintOrder",
885
+ "pause",
886
+ "pauseAfter",
887
+ "pauseBefore",
888
+ "perspective",
889
+ "perspectiveOrigin",
890
+ "placeContent",
891
+ "placeItems",
892
+ "placeSelf",
893
+ "pointerEvents",
894
+ "pointerTimeline",
895
+ "pointerTimelineAxis",
896
+ "pointerTimelineName",
897
+ "position",
898
+ "positionAnchor",
899
+ "positionArea",
900
+ "positionTry",
901
+ "positionTryFallbacks",
902
+ "positionTryOrder",
903
+ "positionVisibility",
904
+ "printColorAdjust",
905
+ "quotes",
906
+ "r",
907
+ "readingFlow",
908
+ "readingOrder",
909
+ "regionFragment",
910
+ "resize",
911
+ "rest",
912
+ "restAfter",
913
+ "restBefore",
914
+ "right",
915
+ "rotate",
916
+ "rowGap",
917
+ "rowRule",
918
+ "rowRuleBreak",
919
+ "rowRuleColor",
920
+ "rowRuleEdgeInset",
921
+ "rowRuleEdgeInsetEnd",
922
+ "rowRuleEdgeInsetStart",
923
+ "rowRuleInset",
924
+ "rowRuleInsetEnd",
925
+ "rowRuleInsetStart",
926
+ "rowRuleInteriorInset",
927
+ "rowRuleInteriorInsetEnd",
928
+ "rowRuleInteriorInsetStart",
929
+ "rowRuleStyle",
930
+ "rowRuleWidth",
931
+ "rubyAlign",
932
+ "rubyMerge",
933
+ "rubyOverhang",
934
+ "rubyPosition",
935
+ "rule",
936
+ "ruleBreak",
937
+ "ruleColor",
938
+ "ruleEdgeInset",
939
+ "ruleInset",
940
+ "ruleInsetEnd",
941
+ "ruleInsetStart",
942
+ "ruleInteriorInset",
943
+ "ruleOverlap",
944
+ "ruleStyle",
945
+ "ruleWidth",
946
+ "rx",
947
+ "ry",
948
+ "scale",
949
+ "scrollBehavior",
950
+ "scrollInitialTarget",
951
+ "scrollMargin",
952
+ "scrollMarginBlock",
953
+ "scrollMarginBlockEnd",
954
+ "scrollMarginBlockStart",
955
+ "scrollMarginBottom",
956
+ "scrollMarginInline",
957
+ "scrollMarginInlineEnd",
958
+ "scrollMarginInlineStart",
959
+ "scrollMarginLeft",
960
+ "scrollMarginRight",
961
+ "scrollMarginTop",
962
+ "scrollMarkerGroup",
963
+ "scrollPadding",
964
+ "scrollPaddingBlock",
965
+ "scrollPaddingBlockEnd",
966
+ "scrollPaddingBlockStart",
967
+ "scrollPaddingBottom",
968
+ "scrollPaddingInline",
969
+ "scrollPaddingInlineEnd",
970
+ "scrollPaddingInlineStart",
971
+ "scrollPaddingLeft",
972
+ "scrollPaddingRight",
973
+ "scrollPaddingTop",
974
+ "scrollSnapAlign",
975
+ "scrollSnapStop",
976
+ "scrollSnapType",
977
+ "scrollTargetGroup",
978
+ "scrollTimeline",
979
+ "scrollTimelineAxis",
980
+ "scrollTimelineName",
981
+ "scrollbarColor",
982
+ "scrollbarGutter",
983
+ "scrollbarWidth",
984
+ "shapeImageThreshold",
985
+ "shapeInside",
986
+ "shapeMargin",
987
+ "shapeOutside",
988
+ "shapePadding",
989
+ "shapeRendering",
990
+ "shapeSubtract",
991
+ "sliderOrientation",
992
+ "spatialNavigationAction",
993
+ "spatialNavigationContain",
994
+ "spatialNavigationFunction",
995
+ "speak",
996
+ "speakAs",
997
+ "stopColor",
998
+ "stopOpacity",
999
+ "stringSet",
1000
+ "stroke",
1001
+ "strokeAlign",
1002
+ "strokeAlignment",
1003
+ "strokeBreak",
1004
+ "strokeColor",
1005
+ "strokeDashCorner",
1006
+ "strokeDashJustify",
1007
+ "strokeDashadjust",
1008
+ "strokeDasharray",
1009
+ "strokeDashcorner",
1010
+ "strokeDashoffset",
1011
+ "strokeImage",
1012
+ "strokeLinecap",
1013
+ "strokeLinejoin",
1014
+ "strokeMiterlimit",
1015
+ "strokeOpacity",
1016
+ "strokeOrigin",
1017
+ "strokePosition",
1018
+ "strokeRepeat",
1019
+ "strokeSize",
1020
+ "strokeWidth",
1021
+ "tabSize",
1022
+ "tableLayout",
1023
+ "textAlign",
1024
+ "textAlignAll",
1025
+ "textAlignLast",
1026
+ "textAnchor",
1027
+ "textAutospace",
1028
+ "textBox",
1029
+ "textBoxEdge",
1030
+ "textBoxTrim",
1031
+ "textCombineUpright",
1032
+ "textDecoration",
1033
+ "textDecorationColor",
1034
+ "textDecorationInset",
1035
+ "textDecorationLine",
1036
+ "textDecorationSkip",
1037
+ "textDecorationSkipBox",
1038
+ "textDecorationSkipInk",
1039
+ "textDecorationSkipSelf",
1040
+ "textDecorationSkipSpaces",
1041
+ "textDecorationStyle",
1042
+ "textDecorationThickness",
1043
+ "textEmphasis",
1044
+ "textEmphasisColor",
1045
+ "textEmphasisPosition",
1046
+ "textEmphasisSkip",
1047
+ "textEmphasisStyle",
1048
+ "textGroupAlign",
1049
+ "textIndent",
1050
+ "textJustify",
1051
+ "textOrientation",
1052
+ "textOverflow",
1053
+ "textRendering",
1054
+ "textShadow",
1055
+ "textSizeAdjust",
1056
+ "textSpacing",
1057
+ "textSpacingTrim",
1058
+ "textTransform",
1059
+ "textUnderlineOffset",
1060
+ "textUnderlinePosition",
1061
+ "textWrap",
1062
+ "textWrapMode",
1063
+ "textWrapStyle",
1064
+ "timelineScope",
1065
+ "timelineTrigger",
1066
+ "timelineTriggerExitRange",
1067
+ "timelineTriggerExitRangeEnd",
1068
+ "timelineTriggerExitRangeStart",
1069
+ "timelineTriggerName",
1070
+ "timelineTriggerRange",
1071
+ "timelineTriggerRangeEnd",
1072
+ "timelineTriggerRangeStart",
1073
+ "timelineTriggerSource",
1074
+ "top",
1075
+ "touchAction",
1076
+ "transform",
1077
+ "transformBox",
1078
+ "transformOrigin",
1079
+ "transformStyle",
1080
+ "transition",
1081
+ "transitionBehavior",
1082
+ "transitionDelay",
1083
+ "transitionDuration",
1084
+ "transitionProperty",
1085
+ "transitionTimingFunction",
1086
+ "translate",
1087
+ "triggerScope",
1088
+ "unicodeBidi",
1089
+ "userSelect",
1090
+ "vectorEffect",
1091
+ "verticalAlign",
1092
+ "viewTimeline",
1093
+ "viewTimelineAxis",
1094
+ "viewTimelineInset",
1095
+ "viewTimelineName",
1096
+ "viewTransitionClass",
1097
+ "viewTransitionGroup",
1098
+ "viewTransitionName",
1099
+ "viewTransitionScope",
1100
+ "visibility",
1101
+ "voiceBalance",
1102
+ "voiceDuration",
1103
+ "voiceFamily",
1104
+ "voicePitch",
1105
+ "voiceRange",
1106
+ "voiceRate",
1107
+ "voiceStress",
1108
+ "voiceVolume",
1109
+ "whiteSpace",
1110
+ "whiteSpaceCollapse",
1111
+ "whiteSpaceTrim",
1112
+ "widows",
1113
+ "width",
1114
+ "willChange",
1115
+ "wordBreak",
1116
+ "wordSpaceTransform",
1117
+ "wordSpacing",
1118
+ "wordWrap",
1119
+ "wrapAfter",
1120
+ "wrapBefore",
1121
+ "wrapFlow",
1122
+ "wrapInside",
1123
+ "wrapThrough",
1124
+ "writingMode",
1125
+ "x",
1126
+ "y",
1127
+ "zIndex",
1128
+ "zoom"
1129
+ ]);
1130
+
384
1131
  //#endregion
385
1132
  //#region src/props.ts
386
1133
  /**
387
- * Converts a kebab-case string to camelCase.
388
- */
389
- function kebabToCamel(str) {
390
- return str.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
391
- }
392
- /**
393
1134
  * Converts a camelCase string to kebab-case.
394
1135
  */
395
1136
  function camelToKebab(str) {
@@ -413,7 +1154,6 @@ function formatValue(value, propertyName, maxDepth = 10) {
413
1154
  }
414
1155
  return formatValue(value.value, propertyName, maxDepth - 1);
415
1156
  }
416
- const knownPropertySet = new Set(properties.all.map(kebabToCamel));
417
1157
  /**
418
1158
  * Checks if a property name is a CSS custom property (variable).
419
1159
  */
@@ -438,7 +1178,7 @@ function asVar(value, maxDepth = 10) {
438
1178
  * Checks if a property name is a known CSS property.
439
1179
  */
440
1180
  function isKnownPropertyName(key) {
441
- return knownPropertySet.has(key);
1181
+ return knownPropertyNames.has(key);
442
1182
  }
443
1183
  /**
444
1184
  * Converts a value to a CSS property string.
@@ -456,11 +1196,18 @@ function asKnownProp(value, key) {
456
1196
  function isNestedSelector(key) {
457
1197
  return key.includes("&");
458
1198
  }
1199
+ /** Known at-rule prefixes that mochi-css recognizes */
1200
+ const AT_RULE_PREFIXES = [
1201
+ "@media ",
1202
+ "@container ",
1203
+ "@supports ",
1204
+ "@layer "
1205
+ ];
459
1206
  /**
460
- * Checks if a key represents a media query.
1207
+ * Checks if a key represents a CSS at-rule (media, container, supports, layer).
461
1208
  */
462
- function isMediaSelector(key) {
463
- return key.startsWith("@");
1209
+ function isAtRuleKey(key) {
1210
+ return AT_RULE_PREFIXES.some((p) => key.startsWith(p));
464
1211
  }
465
1212
  /**
466
1213
  * Converts a SimpleStyleProps object to a CSS properties record.
@@ -482,23 +1229,23 @@ function cssFromProps(props) {
482
1229
  //#endregion
483
1230
  //#region src/selector.ts
484
1231
  /**
485
- * Immutable CSS selector builder that handles nested selectors and media queries.
1232
+ * Immutable CSS selector builder that handles nested selectors and CSS at-rules.
486
1233
  * Uses the `&` character as a placeholder for parent selector substitution.
487
1234
  *
488
1235
  * @example
489
1236
  * const selector = new MochiSelector(['.button'])
490
1237
  * selector.extend('&:hover').cssSelector // '.button:hover'
491
- * selector.wrap('@media (min-width: 768px)').mediaQuery // '@media (min-width: 768px)'
1238
+ * selector.wrap('@media (min-width: 768px)').atRules // ['@media (min-width: 768px)']
492
1239
  */
493
1240
  var MochiSelector = class MochiSelector {
494
1241
  /**
495
1242
  * Creates a new MochiSelector instance.
496
1243
  * @param cssSelectors - Array of CSS selectors (may contain `&` placeholders)
497
- * @param mediaSelectors - Array of media query conditions (without `@media` prefix)
1244
+ * @param atRules - Array of full CSS at-rule strings e.g. `"@media (min-width: 768px)"`
498
1245
  */
499
- constructor(cssSelectors = [], mediaSelectors = []) {
1246
+ constructor(cssSelectors = [], atRules = []) {
500
1247
  this.cssSelectors = cssSelectors;
501
- this.mediaSelectors = mediaSelectors;
1248
+ this.atRules = atRules;
502
1249
  }
503
1250
  /**
504
1251
  * Gets the combined CSS selector string.
@@ -510,20 +1257,12 @@ var MochiSelector = class MochiSelector {
510
1257
  return this.cssSelectors.join(", ");
511
1258
  }
512
1259
  /**
513
- * Gets the combined media query string, if any.
514
- * @returns The full `@media` query string, or undefined if no media conditions
515
- */
516
- get mediaQuery() {
517
- if (this.mediaSelectors.length === 0) return void 0;
518
- return `@media ${this.mediaSelectors.map((s) => `(${s})`).join(" and ")}`;
519
- }
520
- /**
521
1260
  * Substitutes all `&` placeholders with the given root selector.
522
1261
  * @param root - The selector to replace `&` with
523
1262
  * @returns A new MochiSelector with substituted selectors
524
1263
  */
525
1264
  substitute(root) {
526
- return new MochiSelector(this.cssSelectors.map((selector) => selector.replace(/&/g, root)), this.mediaSelectors);
1265
+ return new MochiSelector(this.cssSelectors.map((selector) => selector.replace(/&/g, root)), this.atRules);
527
1266
  }
528
1267
  /**
529
1268
  * Extends this selector by nesting a child selector.
@@ -539,19 +1278,19 @@ var MochiSelector = class MochiSelector {
539
1278
  const children = MochiSelector.split(child);
540
1279
  return new MochiSelector(this.cssSelectors.flatMap((parentSelector) => children.map((childSelector) => {
541
1280
  return childSelector.replace(/&/g, parentSelector);
542
- })), this.mediaSelectors);
1281
+ })), this.atRules);
543
1282
  }
544
1283
  /**
545
- * Wraps this selector with a media query condition.
546
- * @param mediaQuery - The media query string (starting with `@`)
547
- * @returns A new MochiSelector with the added media condition
1284
+ * Wraps this selector with a CSS at-rule.
1285
+ * @param atRule - The full at-rule string (e.g. `"@media (min-width: 768px)"`)
1286
+ * @returns A new MochiSelector with the added at-rule, or unchanged if not a known at-rule
548
1287
  * @example
549
- * selector.wrap('@min-width: 768px') // Adds media query condition
1288
+ * selector.wrap('@media (min-width: 768px)') // Adds media query
1289
+ * selector.wrap('@container sidebar (min-width: 300px)') // Adds container query
550
1290
  */
551
- wrap(mediaQuery) {
552
- if (!isMediaSelector(mediaQuery)) return this;
553
- const mediaQueryPart = mediaQuery.substring(1);
554
- return new MochiSelector(this.cssSelectors, [...this.mediaSelectors, mediaQueryPart]);
1291
+ wrap(atRule) {
1292
+ if (!isAtRuleKey(atRule)) return this;
1293
+ return new MochiSelector(this.cssSelectors, [...this.atRules, atRule]);
555
1294
  }
556
1295
  /**
557
1296
  * Splits a comma-separated selector string into individual selectors.
@@ -660,17 +1399,22 @@ var CssObjectSubBlock = class CssObjectSubBlock {
660
1399
  }
661
1400
  /**
662
1401
  * Converts this block to a CSS string.
663
- * Handles media query wrapping if the selector has media conditions.
1402
+ * Handles at-rule wrapping (media, container, supports, layer) if present.
1403
+ * Multiple at-rules are nested in order.
664
1404
  * @param root - The root selector to substitute for `&`
665
1405
  * @returns Formatted CSS string
666
1406
  */
667
1407
  asCssString(root) {
668
1408
  const selector = this.selector.substitute(root);
669
- const mediaQuery = selector.mediaQuery;
670
- const mediaIndent = mediaQuery === void 0 ? "" : " ";
671
- const props = Object.entries(this.cssProps).toSorted(compareStringKey).map(([k, v]) => `${mediaIndent} ${k}: ${v};\n`).join("");
672
- const blockCss = `${mediaIndent}${selector.cssSelector} {\n${props}${mediaIndent}}`;
673
- return mediaQuery === void 0 ? blockCss : `${mediaQuery} {\n${blockCss}\n}`;
1409
+ const atRules = selector.atRules;
1410
+ const innerIndent = " ".repeat(atRules.length);
1411
+ const props = Object.entries(this.cssProps).toSorted(compareStringKey).map(([k, v]) => `${innerIndent} ${k}: ${v};\n`).join("");
1412
+ let result = `${innerIndent}${selector.cssSelector} {\n${props}${innerIndent}}`;
1413
+ for (let i = atRules.length - 1; i >= 0; i--) {
1414
+ const outerIndent = " ".repeat(i);
1415
+ result = `${outerIndent}${atRules[i]} {\n${result}\n${outerIndent}}`;
1416
+ }
1417
+ return result;
674
1418
  }
675
1419
  /**
676
1420
  * Parses StyleProps into an array of CSS sub-blocks.
@@ -703,7 +1447,7 @@ var CssObjectSubBlock = class CssObjectSubBlock {
703
1447
  });
704
1448
  continue;
705
1449
  }
706
- if (isMediaSelector(key)) {
1450
+ if (isAtRuleKey(key)) {
707
1451
  propsToProcess.push({
708
1452
  key,
709
1453
  props: value,
@@ -808,12 +1552,15 @@ var CSSObject = class {
808
1552
  return [
809
1553
  this.mainBlock.asCssString(this.mainBlock.selector),
810
1554
  ...Object.entries(this.variantBlocks).toSorted(compareStringKey).flatMap(([_, b]) => Object.entries(b).toSorted(compareStringKey)).map(([_, b]) => b.asCssString(this.mainBlock.selector)),
811
- ...this.compoundVariants.map(({ conditions, subBlocks }) => {
812
- const variantSelectors = Object.entries(conditions).toSorted(compareStringKey).map(([variantName, optionName]) => {
813
- return (this.variantBlocks[variantName]?.[optionName])?.selector ?? "";
814
- }).filter(Boolean).join("");
815
- const combinedSelector = `${this.mainBlock.selector}${variantSelectors}`;
816
- return subBlocks.map((b) => b.asCssString(combinedSelector)).join("\n\n");
1555
+ ...this.compoundVariants.flatMap(({ conditions, subBlocks }) => {
1556
+ const selectorParts = [];
1557
+ for (const [variantName, optionName] of Object.entries(conditions).toSorted(compareStringKey)) {
1558
+ const selector = this.variantBlocks[variantName]?.[optionName]?.selector;
1559
+ if (selector === void 0) return [];
1560
+ selectorParts.push(selector);
1561
+ }
1562
+ const combinedSelector = `${this.mainBlock.selector}${selectorParts.join("")}`;
1563
+ return subBlocks.map((b) => b.asCssString(combinedSelector));
817
1564
  })
818
1565
  ].join("\n\n");
819
1566
  }
@@ -1056,5 +1803,66 @@ var GlobalCssObject = class {
1056
1803
  function globalCss(styles) {}
1057
1804
 
1058
1805
  //#endregion
1059
- export { CSSObject, CssObjectBlock, CssObjectSubBlock, GlobalCssObject, KeyframesObject, MochiCSS, MochiKeyframes, MochiSelector, Token, createToken, css, cssFromProps, globalCss, keyframes, mergeMochiCss, styled };
1060
- //# sourceMappingURL=index.mjs.map
1806
+ //#region src/query.ts
1807
+ /**
1808
+ * Wraps a condition in parentheses if not already wrapped.
1809
+ */
1810
+ function wrapParens(condition) {
1811
+ const trimmed = condition.trim();
1812
+ if (trimmed.startsWith("(") && trimmed.endsWith(")")) return trimmed;
1813
+ return `(${trimmed})`;
1814
+ }
1815
+ function mediaFn(condition) {
1816
+ return `@media ${wrapParens(condition)}`;
1817
+ }
1818
+ mediaFn.and = function(...conditions) {
1819
+ return `@media ${conditions.map(wrapParens).join(" and ")}`;
1820
+ };
1821
+ mediaFn.or = function(...conditions) {
1822
+ return `@media ${conditions.map(wrapParens).join(", ")}`;
1823
+ };
1824
+ Object.defineProperties(mediaFn, {
1825
+ dark: {
1826
+ get: () => "@media (prefers-color-scheme: dark)",
1827
+ enumerable: true
1828
+ },
1829
+ light: {
1830
+ get: () => "@media (prefers-color-scheme: light)",
1831
+ enumerable: true
1832
+ },
1833
+ motion: {
1834
+ get: () => "@media (prefers-reduced-motion: no-preference)",
1835
+ enumerable: true
1836
+ },
1837
+ print: {
1838
+ get: () => "@media print",
1839
+ enumerable: true
1840
+ }
1841
+ });
1842
+ /** Helper for constructing `@media` at-rule keys. */
1843
+ const media = mediaFn;
1844
+ function containerFn(condition) {
1845
+ return `@container ${wrapParens(condition)}`;
1846
+ }
1847
+ containerFn.named = function(name, condition) {
1848
+ return `@container ${name} ${wrapParens(condition)}`;
1849
+ };
1850
+ /** Helper for constructing `@container` at-rule keys. */
1851
+ const container = containerFn;
1852
+ function supportsFn(condition) {
1853
+ return `@supports ${wrapParens(condition)}`;
1854
+ }
1855
+ supportsFn.not = function(condition) {
1856
+ return `@supports not ${wrapParens(condition)}`;
1857
+ };
1858
+ supportsFn.and = function(...conditions) {
1859
+ return `@supports ${conditions.map(wrapParens).join(" and ")}`;
1860
+ };
1861
+ supportsFn.or = function(...conditions) {
1862
+ return `@supports ${conditions.map(wrapParens).join(" or ")}`;
1863
+ };
1864
+ /** Helper for constructing `@supports` at-rule keys. */
1865
+ const supports = supportsFn;
1866
+
1867
+ //#endregion
1868
+ export { CSSObject, CssObjectBlock, CssObjectSubBlock, GlobalCssObject, KeyframesObject, MochiCSS, MochiKeyframes, MochiSelector, Token, container, createToken, css, cssFromProps, globalCss, isAtRuleKey, keyframes, media, mergeMochiCss, styled, supports };