@stylexjs/shared 0.2.0-beta.20 → 0.2.0-beta.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/lib/convert-to-className.js +6 -6
  2. package/lib/generate-css-rule.js +3 -3
  3. package/lib/hash.js +10 -11
  4. package/lib/index.d.ts +4 -4
  5. package/lib/index.js +12 -21
  6. package/lib/index.js.flow +4 -4
  7. package/lib/messages.d.ts +2 -1
  8. package/lib/messages.js +29 -54
  9. package/lib/messages.js.flow +2 -1
  10. package/lib/physical-rtl/generate-ltr.js +39 -39
  11. package/lib/physical-rtl/generate-rtl.js +57 -57
  12. package/lib/preprocess-rules/PreRule.js +2 -2
  13. package/lib/preprocess-rules/application-order.d.ts +36 -8
  14. package/lib/preprocess-rules/application-order.js +149 -164
  15. package/lib/preprocess-rules/application-order.js.flow +35 -7
  16. package/lib/preprocess-rules/basic-validation.js +6 -6
  17. package/lib/preprocess-rules/flatten-raw-style-obj.js +10 -10
  18. package/lib/preprocess-rules/index.js +6 -6
  19. package/lib/preprocess-rules/legacy-expand-shorthands.d.ts +22 -2
  20. package/lib/preprocess-rules/legacy-expand-shorthands.js +81 -65
  21. package/lib/preprocess-rules/legacy-expand-shorthands.js.flow +22 -2
  22. package/lib/preprocess-rules/property-specificity.d.ts +29 -25
  23. package/lib/preprocess-rules/property-specificity.js +63 -75
  24. package/lib/preprocess-rules/property-specificity.js.flow +28 -24
  25. package/lib/properties/CSS Animations.json +445 -0
  26. package/lib/properties/CSS Backgrounds and Borders.json +1085 -0
  27. package/lib/properties/CSS Basic User Interface.json +365 -0
  28. package/lib/properties/CSS Box Alignment.json +245 -0
  29. package/lib/properties/CSS Box Model.json +501 -0
  30. package/lib/properties/CSS Color.json +100 -0
  31. package/lib/properties/CSS Columns.json +185 -0
  32. package/lib/properties/CSS Containment.json +203 -0
  33. package/lib/properties/CSS Counter Styles.json +56 -0
  34. package/lib/properties/CSS Display.json +20 -0
  35. package/lib/properties/CSS Flexible Box Layout.json +167 -0
  36. package/lib/properties/CSS Fonts.json +684 -0
  37. package/lib/properties/CSS Fragmentation.json +110 -0
  38. package/lib/properties/CSS Generated Content.json +38 -0
  39. package/lib/properties/CSS Grid Layout.json +500 -0
  40. package/lib/properties/CSS Images.json +91 -0
  41. package/lib/properties/CSS Inline.json +38 -0
  42. package/lib/properties/CSS Lists and Counters.json +86 -0
  43. package/lib/properties/CSS Logical Properties.json +1086 -0
  44. package/lib/properties/CSS Masking.json +399 -0
  45. package/lib/properties/CSS Miscellaneous.json +38 -0
  46. package/lib/properties/CSS Motion Path.json +132 -0
  47. package/lib/properties/CSS Overflow.json +216 -0
  48. package/lib/properties/CSS Pages.json +83 -0
  49. package/lib/properties/CSS Positioning.json +166 -0
  50. package/lib/properties/CSS Ruby.json +55 -0
  51. package/lib/properties/CSS Scroll Anchoring.json +19 -0
  52. package/lib/properties/CSS Scroll Snap.json +604 -0
  53. package/lib/properties/CSS Scrollbars.json +38 -0
  54. package/lib/properties/CSS Shapes.json +56 -0
  55. package/lib/properties/CSS Speech.json +20 -0
  56. package/lib/properties/CSS Table.json +115 -0
  57. package/lib/properties/CSS Text Decoration.json +312 -0
  58. package/lib/properties/CSS Text.json +415 -0
  59. package/lib/properties/CSS Transforms.json +188 -0
  60. package/lib/properties/CSS Transitions.json +122 -0
  61. package/lib/properties/CSS Variables.json +20 -0
  62. package/lib/properties/CSS View Transitions.json +20 -0
  63. package/lib/properties/CSS Will Change.json +20 -0
  64. package/lib/properties/CSS Writing Modes.json +92 -0
  65. package/lib/properties/Compositing and Blending.json +62 -0
  66. package/lib/properties/Filter Effects.json +38 -0
  67. package/lib/properties/MathML.json +56 -0
  68. package/lib/properties/Microsoft Extensions.json +885 -0
  69. package/lib/properties/Mozilla Extensions.json +607 -0
  70. package/lib/properties/Pointer Events.json +20 -0
  71. package/lib/properties/WebKit Extensions.json +707 -0
  72. package/lib/properties.json +10122 -0
  73. package/lib/{stylex-override-vars.d.ts → stylex-create-theme.d.ts} +2 -2
  74. package/lib/{stylex-override-vars.js → stylex-create-theme.js} +13 -13
  75. package/lib/{stylex-override-vars.js.flow → stylex-create-theme.js.flow} +1 -1
  76. package/lib/stylex-create.js +1 -1
  77. package/lib/{stylex-create-vars.d.ts → stylex-define-vars.d.ts} +4 -4
  78. package/lib/{stylex-create-vars.js → stylex-define-vars.js} +9 -9
  79. package/lib/{stylex-create-vars.js.flow → stylex-define-vars.js.flow} +4 -4
  80. package/lib/stylex-keyframes.js +6 -6
  81. package/lib/transform-value.js +13 -15
  82. package/lib/types/index.d.ts +1 -4
  83. package/lib/types/index.js +33 -46
  84. package/lib/types/index.js.flow +2 -2
  85. package/lib/utils/dashify.js +1 -1
  86. package/lib/utils/default-options.js +4 -5
  87. package/lib/utils/file-based-identifier.js +1 -1
  88. package/lib/utils/genCSSRule.js +6 -6
  89. package/lib/utils/normalize-value.js +3 -2
  90. package/lib/utils/normalizers/convert-camel-case-transition-props.d.ts +14 -0
  91. package/lib/utils/normalizers/convert-camel-case-transition-props.js +23 -0
  92. package/lib/utils/normalizers/convert-camel-case-transition-props.js.flow +13 -0
  93. package/lib/utils/normalizers/convert-camel-case-values.d.ts +14 -0
  94. package/lib/utils/normalizers/convert-camel-case-values.js +23 -0
  95. package/lib/utils/normalizers/convert-camel-case-values.js.flow +13 -0
  96. package/lib/utils/normalizers/detect-unclosed-fns.js +2 -2
  97. package/lib/utils/normalizers/font-size-px-to-rem.js +4 -4
  98. package/lib/utils/normalizers/leading-zero.js +3 -3
  99. package/lib/utils/normalizers/quotes.js +4 -4
  100. package/lib/utils/normalizers/timings.js +4 -4
  101. package/lib/utils/normalizers/whitespace.js +12 -12
  102. package/lib/utils/normalizers/zero-dimensions.js +8 -8
  103. package/lib/utils/object-utils.d.ts +3 -6
  104. package/lib/utils/object-utils.js +2 -2
  105. package/lib/utils/property-priorities.js +527 -88
  106. package/lib/utils/split-css-value.js +8 -8
  107. package/lib/validate.js +2 -2
  108. package/package.json +2 -2
@@ -0,0 +1,122 @@
1
+ [
2
+ {
3
+ "syntax": "<single-transition>#",
4
+ "media": "interactive",
5
+ "inherited": false,
6
+ "animationType": "notAnimatable",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "CSS Transitions"
10
+ ],
11
+ "initial": [
12
+ "transition-delay",
13
+ "transition-duration",
14
+ "transition-property",
15
+ "transition-timing-function",
16
+ "transition-behavior"
17
+ ],
18
+ "appliesto": "allElementsAndPseudos",
19
+ "computed": [
20
+ "transition-delay",
21
+ "transition-duration",
22
+ "transition-property",
23
+ "transition-timing-function",
24
+ "transition-behavior"
25
+ ],
26
+ "order": "orderOfAppearance",
27
+ "status": "standard",
28
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition",
29
+ "property": "transition",
30
+ "group": "CSS Transitions"
31
+ },
32
+ {
33
+ "syntax": "<transition-behavior-value>#",
34
+ "media": "visual",
35
+ "inherited": false,
36
+ "animationType": "notAnimatable",
37
+ "percentages": "no",
38
+ "groups": [
39
+ "CSS Transitions"
40
+ ],
41
+ "initial": "normal",
42
+ "appliesto": "allElements",
43
+ "computed": "asSpecified",
44
+ "order": "perGrammar",
45
+ "status": "experimental",
46
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition-behavior",
47
+ "property": "transition-behavior",
48
+ "group": "CSS Transitions"
49
+ },
50
+ {
51
+ "syntax": "<time>#",
52
+ "media": "interactive",
53
+ "inherited": false,
54
+ "animationType": "notAnimatable",
55
+ "percentages": "no",
56
+ "groups": [
57
+ "CSS Transitions"
58
+ ],
59
+ "initial": "0s",
60
+ "appliesto": "allElementsAndPseudos",
61
+ "computed": "asSpecified",
62
+ "order": "uniqueOrder",
63
+ "status": "standard",
64
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition-delay",
65
+ "property": "transition-delay",
66
+ "group": "CSS Transitions"
67
+ },
68
+ {
69
+ "syntax": "<time>#",
70
+ "media": "interactive",
71
+ "inherited": false,
72
+ "animationType": "notAnimatable",
73
+ "percentages": "no",
74
+ "groups": [
75
+ "CSS Transitions"
76
+ ],
77
+ "initial": "0s",
78
+ "appliesto": "allElementsAndPseudos",
79
+ "computed": "asSpecified",
80
+ "order": "uniqueOrder",
81
+ "status": "standard",
82
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition-duration",
83
+ "property": "transition-duration",
84
+ "group": "CSS Transitions"
85
+ },
86
+ {
87
+ "syntax": "none | <single-transition-property>#",
88
+ "media": "visual",
89
+ "inherited": false,
90
+ "animationType": "notAnimatable",
91
+ "percentages": "no",
92
+ "groups": [
93
+ "CSS Transitions"
94
+ ],
95
+ "initial": "all",
96
+ "appliesto": "allElementsAndPseudos",
97
+ "computed": "asSpecified",
98
+ "order": "uniqueOrder",
99
+ "status": "standard",
100
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition-property",
101
+ "property": "transition-property",
102
+ "group": "CSS Transitions"
103
+ },
104
+ {
105
+ "syntax": "<easing-function>#",
106
+ "media": "interactive",
107
+ "inherited": false,
108
+ "animationType": "notAnimatable",
109
+ "percentages": "no",
110
+ "groups": [
111
+ "CSS Transitions"
112
+ ],
113
+ "initial": "ease",
114
+ "appliesto": "allElementsAndPseudos",
115
+ "computed": "asSpecified",
116
+ "order": "uniqueOrder",
117
+ "status": "standard",
118
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function",
119
+ "property": "transition-timing-function",
120
+ "group": "CSS Transitions"
121
+ }
122
+ ]
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "syntax": "<declaration-value>",
4
+ "media": "all",
5
+ "inherited": true,
6
+ "animationType": "discrete",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "CSS Variables"
10
+ ],
11
+ "initial": "seeProse",
12
+ "appliesto": "allElements",
13
+ "computed": "asSpecifiedWithVarsSubstituted",
14
+ "order": "perGrammar",
15
+ "status": "experimental",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/--*",
17
+ "property": "--*",
18
+ "group": "CSS Variables"
19
+ }
20
+ ]
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "syntax": "none | <custom-ident>",
4
+ "media": "visual",
5
+ "inherited": false,
6
+ "animationType": "discrete",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "CSS View Transitions"
10
+ ],
11
+ "initial": "none",
12
+ "appliesto": "allElements",
13
+ "computed": "asSpecified",
14
+ "order": "perGrammar",
15
+ "status": "experimental",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/view-transition-name",
17
+ "property": "view-transition-name",
18
+ "group": "CSS View Transitions"
19
+ }
20
+ ]
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "syntax": "auto | <animateable-feature>#",
4
+ "media": "all",
5
+ "inherited": false,
6
+ "animationType": "discrete",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "CSS Will Change"
10
+ ],
11
+ "initial": "auto",
12
+ "appliesto": "allElements",
13
+ "computed": "asSpecified",
14
+ "order": "uniqueOrder",
15
+ "status": "standard",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/will-change",
17
+ "property": "will-change",
18
+ "group": "CSS Will Change"
19
+ }
20
+ ]
@@ -0,0 +1,92 @@
1
+ [
2
+ {
3
+ "syntax": "ltr | rtl",
4
+ "media": "visual",
5
+ "inherited": true,
6
+ "animationType": "notAnimatable",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "CSS Writing Modes"
10
+ ],
11
+ "initial": "ltr",
12
+ "appliesto": "allElements",
13
+ "computed": "asSpecified",
14
+ "order": "uniqueOrder",
15
+ "status": "standard",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/direction",
17
+ "property": "direction",
18
+ "group": "CSS Writing Modes"
19
+ },
20
+ {
21
+ "syntax": "none | all | [ digits <integer>? ]",
22
+ "media": "visual",
23
+ "inherited": true,
24
+ "animationType": "notAnimatable",
25
+ "percentages": "no",
26
+ "groups": [
27
+ "CSS Writing Modes"
28
+ ],
29
+ "initial": "none",
30
+ "appliesto": "nonReplacedInlineElements",
31
+ "computed": "keywordPlusIntegerIfDigits",
32
+ "order": "uniqueOrder",
33
+ "status": "standard",
34
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright",
35
+ "property": "text-combine-upright",
36
+ "group": "CSS Writing Modes"
37
+ },
38
+ {
39
+ "syntax": "mixed | upright | sideways",
40
+ "media": "visual",
41
+ "inherited": true,
42
+ "animationType": "notAnimatable",
43
+ "percentages": "no",
44
+ "groups": [
45
+ "CSS Writing Modes"
46
+ ],
47
+ "initial": "mixed",
48
+ "appliesto": "allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns",
49
+ "computed": "asSpecified",
50
+ "order": "uniqueOrder",
51
+ "status": "standard",
52
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-orientation",
53
+ "property": "text-orientation",
54
+ "group": "CSS Writing Modes"
55
+ },
56
+ {
57
+ "syntax": "normal | embed | isolate | bidi-override | isolate-override | plaintext",
58
+ "media": "visual",
59
+ "inherited": false,
60
+ "animationType": "notAnimatable",
61
+ "percentages": "no",
62
+ "groups": [
63
+ "CSS Writing Modes"
64
+ ],
65
+ "initial": "normal",
66
+ "appliesto": "allElementsSomeValuesNoEffectOnNonInlineElements",
67
+ "computed": "asSpecified",
68
+ "order": "uniqueOrder",
69
+ "status": "standard",
70
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi",
71
+ "property": "unicode-bidi",
72
+ "group": "CSS Writing Modes"
73
+ },
74
+ {
75
+ "syntax": "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
76
+ "media": "visual",
77
+ "inherited": true,
78
+ "animationType": "notAnimatable",
79
+ "percentages": "no",
80
+ "groups": [
81
+ "CSS Writing Modes"
82
+ ],
83
+ "initial": "horizontal-tb",
84
+ "appliesto": "allElementsExceptTableRowColumnGroupsTableRowsColumns",
85
+ "computed": "asSpecified",
86
+ "order": "uniqueOrder",
87
+ "status": "standard",
88
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/writing-mode",
89
+ "property": "writing-mode",
90
+ "group": "CSS Writing Modes"
91
+ }
92
+ ]
@@ -0,0 +1,62 @@
1
+ [
2
+ {
3
+ "syntax": "<blend-mode>#",
4
+ "media": "none",
5
+ "inherited": false,
6
+ "animationType": "notAnimatable",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "Compositing and Blending"
10
+ ],
11
+ "initial": "normal",
12
+ "appliesto": "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
13
+ "computed": "asSpecified",
14
+ "order": "uniqueOrder",
15
+ "alsoAppliesTo": [
16
+ "::first-letter",
17
+ "::first-line",
18
+ "::placeholder"
19
+ ],
20
+ "status": "standard",
21
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode",
22
+ "property": "background-blend-mode",
23
+ "group": "Compositing and Blending"
24
+ },
25
+ {
26
+ "syntax": "auto | isolate",
27
+ "media": "visual",
28
+ "inherited": false,
29
+ "animationType": "notAnimatable",
30
+ "percentages": "no",
31
+ "groups": [
32
+ "Compositing and Blending"
33
+ ],
34
+ "initial": "auto",
35
+ "appliesto": "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
36
+ "computed": "asSpecified",
37
+ "order": "uniqueOrder",
38
+ "status": "standard",
39
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/isolation",
40
+ "property": "isolation",
41
+ "group": "Compositing and Blending"
42
+ },
43
+ {
44
+ "syntax": "<blend-mode> | plus-lighter",
45
+ "media": "visual",
46
+ "inherited": false,
47
+ "animationType": "notAnimatable",
48
+ "percentages": "no",
49
+ "groups": [
50
+ "Compositing and Blending"
51
+ ],
52
+ "initial": "normal",
53
+ "appliesto": "allElements",
54
+ "computed": "asSpecified",
55
+ "order": "uniqueOrder",
56
+ "stacking": true,
57
+ "status": "standard",
58
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode",
59
+ "property": "mix-blend-mode",
60
+ "group": "Compositing and Blending"
61
+ }
62
+ ]
@@ -0,0 +1,38 @@
1
+ [
2
+ {
3
+ "syntax": "none | <filter-function-list>",
4
+ "media": "visual",
5
+ "inherited": false,
6
+ "animationType": "filterList",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "Filter Effects"
10
+ ],
11
+ "initial": "none",
12
+ "appliesto": "allElementsSVGContainerElements",
13
+ "computed": "asSpecified",
14
+ "order": "uniqueOrder",
15
+ "status": "standard",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter",
17
+ "property": "backdrop-filter",
18
+ "group": "Filter Effects"
19
+ },
20
+ {
21
+ "syntax": "none | <filter-function-list>",
22
+ "media": "visual",
23
+ "inherited": false,
24
+ "animationType": "filterList",
25
+ "percentages": "no",
26
+ "groups": [
27
+ "Filter Effects"
28
+ ],
29
+ "initial": "none",
30
+ "appliesto": "allElementsSVGContainerElements",
31
+ "computed": "asSpecified",
32
+ "order": "uniqueOrder",
33
+ "status": "standard",
34
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/filter",
35
+ "property": "filter",
36
+ "group": "Filter Effects"
37
+ }
38
+ ]
@@ -0,0 +1,56 @@
1
+ [
2
+ {
3
+ "syntax": "auto-add | add(<integer>) | <integer>",
4
+ "media": "visual",
5
+ "inherited": true,
6
+ "animationType": "notAnimatable",
7
+ "percentages": "no",
8
+ "groups": [
9
+ "MathML"
10
+ ],
11
+ "initial": "0",
12
+ "appliesto": "allElements",
13
+ "computed": "asSpecified",
14
+ "order": "perGrammar",
15
+ "status": "standard",
16
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/math-depth",
17
+ "property": "math-depth",
18
+ "group": "MathML"
19
+ },
20
+ {
21
+ "syntax": "normal | compact",
22
+ "media": "visual",
23
+ "inherited": true,
24
+ "animationType": "notAnimatable",
25
+ "percentages": "no",
26
+ "groups": [
27
+ "MathML"
28
+ ],
29
+ "initial": "normal",
30
+ "appliesto": "allElements",
31
+ "computed": "asSpecified",
32
+ "order": "perGrammar",
33
+ "status": "standard",
34
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/math-shift",
35
+ "property": "math-shift",
36
+ "group": "MathML"
37
+ },
38
+ {
39
+ "syntax": "normal | compact",
40
+ "media": "visual",
41
+ "inherited": true,
42
+ "animationType": "notAnimatable",
43
+ "percentages": "no",
44
+ "groups": [
45
+ "MathML"
46
+ ],
47
+ "initial": "normal",
48
+ "appliesto": "allElements",
49
+ "computed": "asSpecified",
50
+ "order": "perGrammar",
51
+ "status": "standard",
52
+ "mdn_url": "https://developer.mozilla.org/docs/Web/CSS/math-style",
53
+ "property": "math-style",
54
+ "group": "MathML"
55
+ }
56
+ ]