@mochi-css/vanilla 1.0.1 → 2.0.0

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