@stylexjs/shared 0.2.0-beta.8 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. package/README.md +81 -0
  2. package/lib/common-types.d.ts +50 -0
  3. package/lib/common-types.js.flow +65 -0
  4. package/lib/convert-to-className.d.ts +16 -0
  5. package/lib/convert-to-className.js +17 -26
  6. package/lib/convert-to-className.js.flow +23 -0
  7. package/lib/generate-css-rule.d.ts +17 -0
  8. package/lib/generate-css-rule.js +8 -47
  9. package/lib/generate-css-rule.js.flow +17 -0
  10. package/lib/hash.d.ts +11 -0
  11. package/lib/hash.js +3 -27
  12. package/lib/hash.js.flow +10 -0
  13. package/lib/index.d.ts +42 -85
  14. package/lib/index.js +19 -27
  15. package/lib/index.js.flow +59 -0
  16. package/lib/messages.d.ts +36 -0
  17. package/lib/messages.js +28 -55
  18. package/lib/messages.js.flow +39 -0
  19. package/lib/physical-rtl/generate-ltr.d.ts +11 -0
  20. package/lib/physical-rtl/generate-ltr.js +18 -46
  21. package/lib/physical-rtl/generate-ltr.js.flow +12 -0
  22. package/lib/physical-rtl/generate-rtl.d.ts +13 -0
  23. package/lib/physical-rtl/generate-rtl.js +18 -50
  24. package/lib/physical-rtl/generate-rtl.js.flow +12 -0
  25. package/lib/preprocess-rules/PreRule.d.ts +52 -0
  26. package/lib/preprocess-rules/PreRule.js +87 -0
  27. package/lib/preprocess-rules/PreRule.js.flow +64 -0
  28. package/lib/preprocess-rules/application-order.d.ts +290 -0
  29. package/lib/preprocess-rules/application-order.js +193 -0
  30. package/lib/preprocess-rules/application-order.js.flow +241 -0
  31. package/lib/preprocess-rules/basic-validation.d.ts +13 -0
  32. package/lib/preprocess-rules/basic-validation.js +83 -0
  33. package/lib/preprocess-rules/basic-validation.js.flow +13 -0
  34. package/lib/preprocess-rules/flatten-raw-style-obj.d.ts +25 -0
  35. package/lib/preprocess-rules/flatten-raw-style-obj.js +120 -0
  36. package/lib/preprocess-rules/flatten-raw-style-obj.js.flow +27 -0
  37. package/lib/preprocess-rules/index.d.ts +18 -0
  38. package/lib/preprocess-rules/index.js +30 -0
  39. package/lib/preprocess-rules/index.js.flow +19 -0
  40. package/lib/preprocess-rules/legacy-expand-shorthands.d.ts +200 -0
  41. package/lib/preprocess-rules/legacy-expand-shorthands.js +136 -0
  42. package/lib/preprocess-rules/legacy-expand-shorthands.js.flow +179 -0
  43. package/lib/preprocess-rules/property-specificity.d.ts +89 -0
  44. package/lib/preprocess-rules/property-specificity.js +107 -0
  45. package/lib/preprocess-rules/property-specificity.js.flow +98 -0
  46. package/lib/properties/CSS Animations.json +445 -0
  47. package/lib/properties/CSS Backgrounds and Borders.json +1085 -0
  48. package/lib/properties/CSS Basic User Interface.json +365 -0
  49. package/lib/properties/CSS Box Alignment.json +245 -0
  50. package/lib/properties/CSS Box Model.json +501 -0
  51. package/lib/properties/CSS Color.json +100 -0
  52. package/lib/properties/CSS Columns.json +185 -0
  53. package/lib/properties/CSS Containment.json +203 -0
  54. package/lib/properties/CSS Counter Styles.json +56 -0
  55. package/lib/properties/CSS Display.json +20 -0
  56. package/lib/properties/CSS Flexible Box Layout.json +167 -0
  57. package/lib/properties/CSS Fonts.json +684 -0
  58. package/lib/properties/CSS Fragmentation.json +110 -0
  59. package/lib/properties/CSS Generated Content.json +38 -0
  60. package/lib/properties/CSS Grid Layout.json +500 -0
  61. package/lib/properties/CSS Images.json +91 -0
  62. package/lib/properties/CSS Inline.json +38 -0
  63. package/lib/properties/CSS Lists and Counters.json +86 -0
  64. package/lib/properties/CSS Logical Properties.json +1086 -0
  65. package/lib/properties/CSS Masking.json +399 -0
  66. package/lib/properties/CSS Miscellaneous.json +38 -0
  67. package/lib/properties/CSS Motion Path.json +132 -0
  68. package/lib/properties/CSS Overflow.json +216 -0
  69. package/lib/properties/CSS Pages.json +83 -0
  70. package/lib/properties/CSS Positioning.json +166 -0
  71. package/lib/properties/CSS Ruby.json +55 -0
  72. package/lib/properties/CSS Scroll Anchoring.json +19 -0
  73. package/lib/properties/CSS Scroll Snap.json +604 -0
  74. package/lib/properties/CSS Scrollbars.json +38 -0
  75. package/lib/properties/CSS Shapes.json +56 -0
  76. package/lib/properties/CSS Speech.json +20 -0
  77. package/lib/properties/CSS Table.json +115 -0
  78. package/lib/properties/CSS Text Decoration.json +312 -0
  79. package/lib/properties/CSS Text.json +415 -0
  80. package/lib/properties/CSS Transforms.json +188 -0
  81. package/lib/properties/CSS Transitions.json +122 -0
  82. package/lib/properties/CSS Variables.json +20 -0
  83. package/lib/properties/CSS View Transitions.json +20 -0
  84. package/lib/properties/CSS Will Change.json +20 -0
  85. package/lib/properties/CSS Writing Modes.json +92 -0
  86. package/lib/properties/Compositing and Blending.json +62 -0
  87. package/lib/properties/Filter Effects.json +38 -0
  88. package/lib/properties/MathML.json +56 -0
  89. package/lib/properties/Microsoft Extensions.json +885 -0
  90. package/lib/properties/Mozilla Extensions.json +607 -0
  91. package/lib/properties/Pointer Events.json +20 -0
  92. package/lib/properties/WebKit Extensions.json +707 -0
  93. package/lib/properties.json +10122 -0
  94. package/lib/stylex-create-theme.d.ts +26 -0
  95. package/lib/stylex-create-theme.js +62 -0
  96. package/lib/stylex-create-theme.js.flow +19 -0
  97. package/lib/stylex-create.d.ts +23 -0
  98. package/lib/stylex-create.js +30 -142
  99. package/lib/stylex-create.js.flow +30 -0
  100. package/lib/stylex-define-vars.d.ts +36 -0
  101. package/lib/stylex-define-vars.js +72 -0
  102. package/lib/stylex-define-vars.js.flow +28 -0
  103. package/lib/stylex-first-that-works.d.ts +13 -0
  104. package/lib/stylex-first-that-works.js +0 -10
  105. package/lib/stylex-first-that-works.js.flow +12 -0
  106. package/lib/stylex-include.d.ts +18 -0
  107. package/lib/stylex-include.js +0 -10
  108. package/lib/stylex-include.js.flow +20 -0
  109. package/lib/stylex-keyframes.d.ts +17 -0
  110. package/lib/stylex-keyframes.js +22 -30
  111. package/lib/stylex-keyframes.js.flow +20 -0
  112. package/lib/transform-value.d.ts +22 -0
  113. package/lib/transform-value.js +9 -23
  114. package/lib/transform-value.js.flow +25 -0
  115. package/lib/types/index.d.ts +205 -0
  116. package/lib/types/index.js +191 -0
  117. package/lib/types/index.js.flow +241 -0
  118. package/lib/utils/Rule.d.ts +58 -0
  119. package/lib/utils/Rule.js +50 -0
  120. package/lib/utils/Rule.js.flow +64 -0
  121. package/lib/utils/dashify.d.ts +11 -0
  122. package/lib/utils/dashify.js +0 -8
  123. package/lib/utils/dashify.js.flow +10 -0
  124. package/lib/utils/default-options.d.ts +11 -0
  125. package/lib/utils/default-options.js +14 -0
  126. package/lib/utils/default-options.js.flow +25 -0
  127. package/lib/utils/file-based-identifier.d.ts +15 -0
  128. package/lib/utils/file-based-identifier.js +14 -0
  129. package/lib/utils/file-based-identifier.js.flow +14 -0
  130. package/lib/utils/genCSSRule.d.ts +15 -0
  131. package/lib/utils/genCSSRule.js +9 -18
  132. package/lib/utils/genCSSRule.js.flow +15 -0
  133. package/lib/utils/normalize-value.d.ts +16 -0
  134. package/lib/utils/normalize-value.js +11 -15
  135. package/lib/utils/normalize-value.js.flow +16 -0
  136. package/lib/utils/normalizers/convert-camel-case-transition-props.d.ts +14 -0
  137. package/lib/utils/normalizers/convert-camel-case-transition-props.js +23 -0
  138. package/lib/utils/normalizers/convert-camel-case-transition-props.js.flow +13 -0
  139. package/lib/utils/normalizers/convert-camel-case-values.d.ts +14 -0
  140. package/lib/utils/normalizers/convert-camel-case-values.js +23 -0
  141. package/lib/utils/normalizers/convert-camel-case-values.js.flow +13 -0
  142. package/lib/utils/normalizers/detect-unclosed-fns.d.ts +17 -0
  143. package/lib/utils/normalizers/detect-unclosed-fns.js +0 -12
  144. package/lib/utils/normalizers/detect-unclosed-fns.js.flow +16 -0
  145. package/lib/utils/normalizers/font-size-px-to-rem.d.ts +19 -0
  146. package/lib/utils/normalizers/font-size-px-to-rem.js +9 -19
  147. package/lib/utils/normalizers/font-size-px-to-rem.js.flow +18 -0
  148. package/lib/utils/normalizers/leading-zero.d.ts +17 -0
  149. package/lib/utils/normalizers/leading-zero.js +0 -12
  150. package/lib/utils/normalizers/leading-zero.js.flow +16 -0
  151. package/lib/utils/normalizers/quotes.d.ts +18 -0
  152. package/lib/utils/normalizers/quotes.js +0 -13
  153. package/lib/utils/normalizers/quotes.js.flow +17 -0
  154. package/lib/utils/normalizers/timings.d.ts +18 -0
  155. package/lib/utils/normalizers/timings.js +0 -14
  156. package/lib/utils/normalizers/timings.js.flow +17 -0
  157. package/lib/utils/normalizers/whitespace.d.ts +19 -0
  158. package/lib/utils/normalizers/whitespace.js +0 -15
  159. package/lib/utils/normalizers/whitespace.js.flow +18 -0
  160. package/lib/utils/normalizers/zero-dimensions.d.ts +19 -0
  161. package/lib/utils/normalizers/zero-dimensions.js +0 -15
  162. package/lib/utils/normalizers/zero-dimensions.js.flow +18 -0
  163. package/lib/utils/object-utils.d.ts +66 -0
  164. package/lib/utils/object-utils.js +21 -13
  165. package/lib/utils/object-utils.js.flow +77 -0
  166. package/lib/utils/property-priorities.d.ts +11 -0
  167. package/lib/utils/property-priorities.js +531 -0
  168. package/lib/utils/property-priorities.js.flow +10 -0
  169. package/lib/utils/split-css-value.d.ts +14 -0
  170. package/lib/utils/split-css-value.js +33 -0
  171. package/lib/utils/split-css-value.js.flow +15 -0
  172. package/lib/validate.d.ts +12 -0
  173. package/lib/validate.js +1 -10
  174. package/lib/validate.js.flow +12 -0
  175. package/package.json +4 -5
  176. package/lib/expand-shorthands.d.ts +0 -5
  177. package/lib/expand-shorthands.js +0 -387
  178. package/lib/stylex-defaultValue.js +0 -397
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict
8
+ */
9
+
10
+ export type {
11
+ RawStyles,
12
+ StyleRule,
13
+ TNestableStyleValue,
14
+ TRawValue,
15
+ TStyleValue,
16
+ } from './common-types';
17
+
18
+ // All functions exposed from `stylex` are defined in a way that can be run
19
+ // entirely in the browser.
20
+
21
+ // These are the implementations of those functions.
22
+
23
+ import styleXCreateSet from './stylex-create';
24
+ import styleXDefineVars from './stylex-define-vars';
25
+ import styleXCreateTheme from './stylex-create-theme';
26
+ import stylexKeyframes from './stylex-keyframes';
27
+ import stylexInclude, {
28
+ IncludedStyles as _IncludedStyles,
29
+ } from './stylex-include';
30
+ import stylexFirstThatWorks from './stylex-first-that-works';
31
+ import hash from './hash';
32
+ import genFileBasedIdentifier from './utils/file-based-identifier';
33
+ import * as m from './messages';
34
+ export * as types from './types';
35
+
36
+ import type {
37
+ InjectableStyle as _InjectableStyle,
38
+ CompiledNamespaces as _CompiledNamespaces,
39
+ MutableCompiledNamespaces as _MutableCompiledNamespaces,
40
+ StyleXOptions as _StyleXOptions,
41
+ } from './common-types';
42
+
43
+ declare export const create: typeof styleXCreateSet;
44
+ declare export const defineVars: typeof styleXDefineVars;
45
+ declare export const createTheme: typeof styleXCreateTheme;
46
+ declare export const keyframes: typeof stylexKeyframes;
47
+ declare export const include: typeof stylexInclude;
48
+ declare export const utils: {
49
+ hash: typeof hash,
50
+ genFileBasedIdentifier: typeof genFileBasedIdentifier,
51
+ };
52
+ declare export const messages: typeof m;
53
+ declare export const IncludedStyles: typeof _IncludedStyles;
54
+ declare export const firstThatWorks: typeof stylexFirstThatWorks;
55
+
56
+ export type InjectableStyle = _InjectableStyle;
57
+ export type CompiledNamespaces = _CompiledNamespaces;
58
+ export type MutableCompiledNamespaces = _MutableCompiledNamespaces;
59
+ export type StyleXOptions = _StyleXOptions;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ *
8
+ */
9
+
10
+ export declare const ILLEGAL_ARGUMENT_LENGTH: 'stylex() should have 1 argument.';
11
+ export declare const NON_STATIC_VALUE: 'Only static values are allowed inside of a stylex.create() call.';
12
+ export declare const ESCAPED_STYLEX_VALUE: 'Escaping a stylex.create() value is not allowed.';
13
+ export declare const UNBOUND_STYLEX_CALL_VALUE: 'stylex.create calls must be bound to a bare variable.';
14
+ export declare const ONLY_TOP_LEVEL: 'stylex.create() is only allowed at the root of a program.';
15
+ export declare const NON_OBJECT_FOR_STYLEX_CALL: 'stylex.create() can only accept a style object.';
16
+ export declare const UNKNOWN_PROP_KEY: 'Unknown property key';
17
+ export declare const INVALID_PSEUDO: 'Invalid pseudo selector, not on the whitelist.';
18
+ export declare const INVALID_PSEUDO_OR_AT_RULE: 'Invalid pseudo or at-rule.';
19
+ export declare const NO_CONDITIONAL_SHORTHAND: 'You cannot use conditional style values for a shorthand property.';
20
+ export declare const ILLEGAL_NAMESPACE_TYPE: 'Only a string literal namespace is allowed here.';
21
+ export declare const UNKNOWN_NAMESPACE: 'Unknown namespace';
22
+ export declare const ILLEGAL_NESTED_PSEUDO: "Pseudo objects can't be nested more than one level deep.";
23
+ export declare const ILLEGAL_PROP_VALUE: 'A style value can only contain an array, string or number.';
24
+ export declare const ILLEGAL_PROP_ARRAY_VALUE: 'A style array value can only contain strings or numbers.';
25
+ export declare const ILLEGAL_NAMESPACE_VALUE: 'A stylex namespace must be an object.';
26
+ export declare const INVALID_SPREAD: 'Imported styles spread with a stylex.create call must be type cast as `XStyle` to verify their type.';
27
+ export declare const LINT_UNCLOSED_FUNCTION: 'Rule contains an unclosed function';
28
+ export declare const LOCAL_ONLY: 'The return value of stylex.create() should not be exported.';
29
+ export declare const UNEXPECTED_ARGUMENT: 'Unexpected argument passed to the stylex() function.';
30
+ export declare const EXPECTED_FUNCTION_CALL: 'Expected a simple function call but found something else.';
31
+ export declare const NO_PARENT_PATH: 'Unexpected AST node without a parent path.';
32
+ export declare const ONLY_TOP_LEVEL_INLCUDES: 'stylex.include() is only at the top level of a style definition object.';
33
+ export declare const DUPLICATE_CONDITIONAL: 'The same pseudo selector or at-rule cannot be used more than once.';
34
+ export declare const NO_PROJECT_ROOT_DIRECTORY: 'The project root directory `rootDir` is not configured.';
35
+ export declare const NON_EXPORT_NAMED_DECLARATION: 'The return value of stylex.defineVars() must be bound to a named export.';
36
+ export declare const ANONYMOUS_THEME: 'stylex.createTheme() must be bound to a named constant.';
package/lib/messages.js CHANGED
@@ -1,60 +1,33 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
1
  'use strict';
10
2
 
11
- // This file contains constants to be used within Error messages.
12
- // The URLs within will eventually be replaced by links to the documenation website for Stylex.
13
3
  Object.defineProperty(exports, "__esModule", {
14
4
  value: true
15
5
  });
16
- exports.UNKNOWN_PROP_KEY = exports.UNKNOWN_NAMESPACE = exports.UNEXPECTED_ARGUMENT = exports.UNBOUND_STYLEX_CALL_VALUE = exports.ONLY_TOP_LEVEL = exports.NO_PARENT_PATH = exports.NO_CONDITIONAL_SHORTHAND = exports.NON_STATIC_VALUE = exports.NON_OBJECT_FOR_STYLEX_CALL = exports.MULTIPLE_DIRECTIONS_IN_SHORTHAND = exports.LOCAL_ONLY = exports.LINT_UNCLOSED_FUNCTION = exports.INVALID_SPREAD = exports.INVALID_PSEUDO = exports.ILLEGAL_PROP_VALUE = exports.ILLEGAL_PROP_ARRAY_VALUE = exports.ILLEGAL_NESTED_PSEUDO = exports.ILLEGAL_NAMESPACE_VALUE = exports.ILLEGAL_NAMESPACE_TYPE = exports.ILLEGAL_ARGUMENT_LENGTH = exports.EXPECTED_FUNCTION_CALL = exports.ESCAPED_STYLEX_VALUE = void 0;
17
- const ILLEGAL_ARGUMENT_LENGTH = 'stylex() should have 1 argument.';
18
- exports.ILLEGAL_ARGUMENT_LENGTH = ILLEGAL_ARGUMENT_LENGTH;
19
- const NON_STATIC_VALUE = 'Only static values are allowed inside of a stylex.create() call.';
20
- exports.NON_STATIC_VALUE = NON_STATIC_VALUE;
21
- const ESCAPED_STYLEX_VALUE = 'Escaping a stylex.create() value is not allowed.';
22
- exports.ESCAPED_STYLEX_VALUE = ESCAPED_STYLEX_VALUE;
23
- const UNBOUND_STYLEX_CALL_VALUE = 'stylex.create calls must be bound to a bare variable.';
24
- exports.UNBOUND_STYLEX_CALL_VALUE = UNBOUND_STYLEX_CALL_VALUE;
25
- const ONLY_TOP_LEVEL = 'stylex.create() is only allowed at the root of a program.';
26
- exports.ONLY_TOP_LEVEL = ONLY_TOP_LEVEL;
27
- const NON_OBJECT_FOR_STYLEX_CALL = 'stylex.create() can only accept a style object.';
28
- exports.NON_OBJECT_FOR_STYLEX_CALL = NON_OBJECT_FOR_STYLEX_CALL;
29
- const UNKNOWN_PROP_KEY = 'Unknown property key';
30
- exports.UNKNOWN_PROP_KEY = UNKNOWN_PROP_KEY;
31
- const INVALID_PSEUDO = 'Invalid pseudo selector, not on the whitelist.';
32
- exports.INVALID_PSEUDO = INVALID_PSEUDO;
33
- const NO_CONDITIONAL_SHORTHAND = 'You cannot use conditional style values for a shorthand property.';
34
- exports.NO_CONDITIONAL_SHORTHAND = NO_CONDITIONAL_SHORTHAND;
35
- const ILLEGAL_NAMESPACE_TYPE = 'Only a string literal namespace is allowed here.';
36
- exports.ILLEGAL_NAMESPACE_TYPE = ILLEGAL_NAMESPACE_TYPE;
37
- const UNKNOWN_NAMESPACE = 'Unknown namespace';
38
- exports.UNKNOWN_NAMESPACE = UNKNOWN_NAMESPACE;
39
- const ILLEGAL_NESTED_PSEUDO = "Pseudo objects can't be nested.";
40
- exports.ILLEGAL_NESTED_PSEUDO = ILLEGAL_NESTED_PSEUDO;
41
- const ILLEGAL_PROP_VALUE = 'A style value can only contain an array, string or number.';
42
- exports.ILLEGAL_PROP_VALUE = ILLEGAL_PROP_VALUE;
43
- const ILLEGAL_PROP_ARRAY_VALUE = 'A style array value can only contain strings or numbers.';
44
- exports.ILLEGAL_PROP_ARRAY_VALUE = ILLEGAL_PROP_ARRAY_VALUE;
45
- const ILLEGAL_NAMESPACE_VALUE = 'A stylex namespace must be an object.';
46
- exports.ILLEGAL_NAMESPACE_VALUE = ILLEGAL_NAMESPACE_VALUE;
47
- const INVALID_SPREAD = 'Imported styles spread with a stylex.create call must be type cast as `XStyle<>` to verify their type.';
48
- exports.INVALID_SPREAD = INVALID_SPREAD;
49
- const LINT_UNCLOSED_FUNCTION = 'Rule contains an unclosed function';
50
- exports.LINT_UNCLOSED_FUNCTION = LINT_UNCLOSED_FUNCTION;
51
- const LOCAL_ONLY = 'The return value of stylex.create() should not be exported.';
52
- exports.LOCAL_ONLY = LOCAL_ONLY;
53
- const UNEXPECTED_ARGUMENT = 'Unexpected argument passed to the stylex() function.';
54
- exports.UNEXPECTED_ARGUMENT = UNEXPECTED_ARGUMENT;
55
- const EXPECTED_FUNCTION_CALL = 'Expected a simple function call but found something else.';
56
- exports.EXPECTED_FUNCTION_CALL = EXPECTED_FUNCTION_CALL;
57
- const NO_PARENT_PATH = 'Unexpected AST node without a parent path.';
58
- exports.NO_PARENT_PATH = NO_PARENT_PATH;
59
- const MULTIPLE_DIRECTIONS_IN_SHORTHAND = 'Shorthand properties cannot contain different values for different directions.';
60
- exports.MULTIPLE_DIRECTIONS_IN_SHORTHAND = MULTIPLE_DIRECTIONS_IN_SHORTHAND;
6
+ exports.UNKNOWN_PROP_KEY = exports.UNKNOWN_NAMESPACE = exports.UNEXPECTED_ARGUMENT = exports.UNBOUND_STYLEX_CALL_VALUE = exports.ONLY_TOP_LEVEL_INLCUDES = exports.ONLY_TOP_LEVEL = exports.NO_PROJECT_ROOT_DIRECTORY = exports.NO_PARENT_PATH = exports.NO_CONDITIONAL_SHORTHAND = exports.NON_STATIC_VALUE = exports.NON_OBJECT_FOR_STYLEX_CALL = exports.NON_EXPORT_NAMED_DECLARATION = exports.LOCAL_ONLY = exports.LINT_UNCLOSED_FUNCTION = exports.INVALID_SPREAD = exports.INVALID_PSEUDO_OR_AT_RULE = exports.INVALID_PSEUDO = exports.ILLEGAL_PROP_VALUE = exports.ILLEGAL_PROP_ARRAY_VALUE = exports.ILLEGAL_NESTED_PSEUDO = exports.ILLEGAL_NAMESPACE_VALUE = exports.ILLEGAL_NAMESPACE_TYPE = exports.ILLEGAL_ARGUMENT_LENGTH = exports.EXPECTED_FUNCTION_CALL = exports.ESCAPED_STYLEX_VALUE = exports.DUPLICATE_CONDITIONAL = exports.ANONYMOUS_THEME = void 0;
7
+ const ILLEGAL_ARGUMENT_LENGTH = exports.ILLEGAL_ARGUMENT_LENGTH = 'stylex() should have 1 argument.';
8
+ const NON_STATIC_VALUE = exports.NON_STATIC_VALUE = 'Only static values are allowed inside of a stylex.create() call.';
9
+ const ESCAPED_STYLEX_VALUE = exports.ESCAPED_STYLEX_VALUE = 'Escaping a stylex.create() value is not allowed.';
10
+ const UNBOUND_STYLEX_CALL_VALUE = exports.UNBOUND_STYLEX_CALL_VALUE = 'stylex.create calls must be bound to a bare variable.';
11
+ const ONLY_TOP_LEVEL = exports.ONLY_TOP_LEVEL = 'stylex.create() is only allowed at the root of a program.';
12
+ const NON_OBJECT_FOR_STYLEX_CALL = exports.NON_OBJECT_FOR_STYLEX_CALL = 'stylex.create() can only accept a style object.';
13
+ const UNKNOWN_PROP_KEY = exports.UNKNOWN_PROP_KEY = 'Unknown property key';
14
+ const INVALID_PSEUDO = exports.INVALID_PSEUDO = 'Invalid pseudo selector, not on the whitelist.';
15
+ const INVALID_PSEUDO_OR_AT_RULE = exports.INVALID_PSEUDO_OR_AT_RULE = 'Invalid pseudo or at-rule.';
16
+ const NO_CONDITIONAL_SHORTHAND = exports.NO_CONDITIONAL_SHORTHAND = 'You cannot use conditional style values for a shorthand property.';
17
+ const ILLEGAL_NAMESPACE_TYPE = exports.ILLEGAL_NAMESPACE_TYPE = 'Only a string literal namespace is allowed here.';
18
+ const UNKNOWN_NAMESPACE = exports.UNKNOWN_NAMESPACE = 'Unknown namespace';
19
+ const ILLEGAL_NESTED_PSEUDO = exports.ILLEGAL_NESTED_PSEUDO = "Pseudo objects can't be nested more than one level deep.";
20
+ const ILLEGAL_PROP_VALUE = exports.ILLEGAL_PROP_VALUE = 'A style value can only contain an array, string or number.';
21
+ const ILLEGAL_PROP_ARRAY_VALUE = exports.ILLEGAL_PROP_ARRAY_VALUE = 'A style array value can only contain strings or numbers.';
22
+ const ILLEGAL_NAMESPACE_VALUE = exports.ILLEGAL_NAMESPACE_VALUE = 'A stylex namespace must be an object.';
23
+ const INVALID_SPREAD = exports.INVALID_SPREAD = 'Imported styles spread with a stylex.create call must be type cast as `XStyle<>` to verify their type.';
24
+ const LINT_UNCLOSED_FUNCTION = exports.LINT_UNCLOSED_FUNCTION = 'Rule contains an unclosed function';
25
+ const LOCAL_ONLY = exports.LOCAL_ONLY = 'The return value of stylex.create() should not be exported.';
26
+ const UNEXPECTED_ARGUMENT = exports.UNEXPECTED_ARGUMENT = 'Unexpected argument passed to the stylex() function.';
27
+ const EXPECTED_FUNCTION_CALL = exports.EXPECTED_FUNCTION_CALL = 'Expected a simple function call but found something else.';
28
+ const NO_PARENT_PATH = exports.NO_PARENT_PATH = 'Unexpected AST node without a parent path.';
29
+ const ONLY_TOP_LEVEL_INLCUDES = exports.ONLY_TOP_LEVEL_INLCUDES = 'stylex.include() is only at the top level of a style definition object.';
30
+ const DUPLICATE_CONDITIONAL = exports.DUPLICATE_CONDITIONAL = 'The same pseudo selector or at-rule cannot be used more than once.';
31
+ const NO_PROJECT_ROOT_DIRECTORY = exports.NO_PROJECT_ROOT_DIRECTORY = 'The project root directory `rootDir` is not configured.';
32
+ const NON_EXPORT_NAMED_DECLARATION = exports.NON_EXPORT_NAMED_DECLARATION = 'The return value of stylex.defineVars() must be bound to a named export.';
33
+ const ANONYMOUS_THEME = exports.ANONYMOUS_THEME = 'stylex.createTheme() must be bound to a named constant.';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict
8
+ */
9
+
10
+ // This file contains constants to be used within Error messages.
11
+ // The URLs within will eventually be replaced by links to the documenation website for Stylex.
12
+
13
+ declare export const ILLEGAL_ARGUMENT_LENGTH: 'stylex() should have 1 argument.';
14
+ declare export const NON_STATIC_VALUE: 'Only static values are allowed inside of a stylex.create() call.';
15
+ declare export const ESCAPED_STYLEX_VALUE: 'Escaping a stylex.create() value is not allowed.';
16
+ declare export const UNBOUND_STYLEX_CALL_VALUE: 'stylex.create calls must be bound to a bare variable.';
17
+ declare export const ONLY_TOP_LEVEL: 'stylex.create() is only allowed at the root of a program.';
18
+ declare export const NON_OBJECT_FOR_STYLEX_CALL: 'stylex.create() can only accept a style object.';
19
+ declare export const UNKNOWN_PROP_KEY: 'Unknown property key';
20
+ declare export const INVALID_PSEUDO: 'Invalid pseudo selector, not on the whitelist.';
21
+ declare export const INVALID_PSEUDO_OR_AT_RULE: 'Invalid pseudo or at-rule.';
22
+ declare export const NO_CONDITIONAL_SHORTHAND: 'You cannot use conditional style values for a shorthand property.';
23
+ declare export const ILLEGAL_NAMESPACE_TYPE: 'Only a string literal namespace is allowed here.';
24
+ declare export const UNKNOWN_NAMESPACE: 'Unknown namespace';
25
+ declare export const ILLEGAL_NESTED_PSEUDO: "Pseudo objects can't be nested more than one level deep.";
26
+ declare export const ILLEGAL_PROP_VALUE: 'A style value can only contain an array, string or number.';
27
+ declare export const ILLEGAL_PROP_ARRAY_VALUE: 'A style array value can only contain strings or numbers.';
28
+ declare export const ILLEGAL_NAMESPACE_VALUE: 'A stylex namespace must be an object.';
29
+ declare export const INVALID_SPREAD: 'Imported styles spread with a stylex.create call must be type cast as `XStyle<>` to verify their type.';
30
+ declare export const LINT_UNCLOSED_FUNCTION: 'Rule contains an unclosed function';
31
+ declare export const LOCAL_ONLY: 'The return value of stylex.create() should not be exported.';
32
+ declare export const UNEXPECTED_ARGUMENT: 'Unexpected argument passed to the stylex() function.';
33
+ declare export const EXPECTED_FUNCTION_CALL: 'Expected a simple function call but found something else.';
34
+ declare export const NO_PARENT_PATH: 'Unexpected AST node without a parent path.';
35
+ declare export const ONLY_TOP_LEVEL_INLCUDES: 'stylex.include() is only at the top level of a style definition object.';
36
+ declare export const DUPLICATE_CONDITIONAL: 'The same pseudo selector or at-rule cannot be used more than once.';
37
+ declare export const NO_PROJECT_ROOT_DIRECTORY: 'The project root directory `rootDir` is not configured.';
38
+ declare export const NON_EXPORT_NAMED_DECLARATION: 'The return value of stylex.defineVars() must be bound to a named export.';
39
+ declare export const ANONYMOUS_THEME: 'stylex.createTheme() must be bound to a named constant.';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ *
8
+ */
9
+
10
+ declare function generateLTR(pair: [string, string]): [string, string];
11
+ export default generateLTR;
@@ -4,101 +4,75 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = generateLTR;
7
- /**
8
- * Copyright (c) Meta Platforms, Inc. and affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- *
13
- *
14
- *
15
- */
16
-
17
7
  const logicalToPhysical = {
18
8
  start: 'left',
19
9
  end: 'right'
20
10
  };
21
11
  const propertyToLTR = {
22
12
  'margin-start': _ref => {
23
- let [key, val] = _ref;
13
+ let [_key, val] = _ref;
24
14
  return ['margin-left', val];
25
15
  },
26
- // 'margin-inline-start': ([key, val]) => ['margin-left', val],
27
16
  'margin-end': _ref2 => {
28
- let [key, val] = _ref2;
17
+ let [_key, val] = _ref2;
29
18
  return ['margin-right', val];
30
19
  },
31
- // 'margin-inline-end': ([key, val]: [string, string]) => ['margin-right', val],
32
20
  'padding-start': _ref3 => {
33
- let [key, val] = _ref3;
21
+ let [_key, val] = _ref3;
34
22
  return ['padding-left', val];
35
23
  },
36
- // 'padding-inline-start': ([key, val]: [string, string]) => ['padding-left', val],
37
24
  'padding-end': _ref4 => {
38
- let [key, val] = _ref4;
25
+ let [_key, val] = _ref4;
39
26
  return ['padding-right', val];
40
27
  },
41
- // 'padding-inline-end': ([key, val]: [string, string]) => ['padding-right', val],
42
28
  'border-start': _ref5 => {
43
- let [key, val] = _ref5;
29
+ let [_key, val] = _ref5;
44
30
  return ['border-left', val];
45
31
  },
46
- // 'border-inline-start': ([key, val]: [string, string]) => ['border-left', val],
47
32
  'border-end': _ref6 => {
48
- let [key, val] = _ref6;
33
+ let [_key, val] = _ref6;
49
34
  return ['border-right', val];
50
35
  },
51
- // 'border-inline-end': ([key, val]: [string, string]) => ['border-right', val],
52
36
  'border-start-width': _ref7 => {
53
- let [key, val] = _ref7;
37
+ let [_key, val] = _ref7;
54
38
  return ['border-left-width', val];
55
39
  },
56
- // 'border-inline-start-width': ([key, val]: [string, string]) => ['border-left-width', val],
57
40
  'border-end-width': _ref8 => {
58
- let [key, val] = _ref8;
41
+ let [_key, val] = _ref8;
59
42
  return ['border-right-width', val];
60
43
  },
61
- // 'border-inline-end-width': ([key, val]: [string, string]) => ['border-right-width', val],
62
44
  'border-start-color': _ref9 => {
63
- let [key, val] = _ref9;
45
+ let [_key, val] = _ref9;
64
46
  return ['border-left-color', val];
65
47
  },
66
- // 'border-inline-start-color': ([key, val]: [string, string]) => ['border-left-color', val],
67
48
  'border-end-color': _ref10 => {
68
- let [key, val] = _ref10;
49
+ let [_key, val] = _ref10;
69
50
  return ['border-right-color', val];
70
51
  },
71
- // 'border-inline-end-color': ([key, val]: [string, string]) => ['border-right-color', val],
72
52
  'border-start-style': _ref11 => {
73
- let [key, val] = _ref11;
53
+ let [_key, val] = _ref11;
74
54
  return ['border-left-style', val];
75
55
  },
76
- // 'border-inline-start-style': ([key, val]: [string, string]) => ['border-left-style', val],
77
56
  'border-end-style': _ref12 => {
78
- let [key, val] = _ref12;
57
+ let [_key, val] = _ref12;
79
58
  return ['border-right-style', val];
80
59
  },
81
- // 'border-inline-end-style': ([key, val]: [string, string]) => ['border-right-style', val],
82
60
  'border-top-start-radius': _ref13 => {
83
- let [key, val] = _ref13;
61
+ let [_key, val] = _ref13;
84
62
  return ['border-top-left-radius', val];
85
63
  },
86
- // 'border-start-start-radius': ([key, val]: [string, string]) => ['border-top-left-radius', val],
87
64
  'border-bottom-start-radius': _ref14 => {
88
- let [key, val] = _ref14;
65
+ let [_key, val] = _ref14;
89
66
  return ['border-bottom-left-radius', val];
90
67
  },
91
- // 'border-end-start-radius': ([key, val]: [string, string]) => ['border-bottom-left-radius', val],
92
68
  'border-top-end-radius': _ref15 => {
93
- let [key, val] = _ref15;
69
+ let [_key, val] = _ref15;
94
70
  return ['border-top-right-radius', val];
95
71
  },
96
- // 'border-start-end-radius': ([key, val]: [string, string]) => ['border-top-right-radius', val],
97
72
  'border-bottom-end-radius': _ref16 => {
98
- let [key, val] = _ref16;
73
+ let [_key, val] = _ref16;
99
74
  return ['border-bottom-right-radius', val];
100
75
  },
101
- // 'border-end-end-radius': ([key, val]: [string, string]) => ['border-bottom-right-radius', val],
102
76
  'text-align': _ref17 => {
103
77
  let [key, val] = _ref17;
104
78
  return [key, logicalToPhysical[val] ?? val];
@@ -112,15 +86,13 @@ const propertyToLTR = {
112
86
  return [key, logicalToPhysical[val] ?? val];
113
87
  },
114
88
  start: _ref20 => {
115
- let [key, val] = _ref20;
89
+ let [_key, val] = _ref20;
116
90
  return ['left', val];
117
91
  },
118
- // 'inset-inline-start': ([key, val]: [string, string]) => ['left', val],
119
92
  end: _ref21 => {
120
- let [key, val] = _ref21;
93
+ let [_key, val] = _ref21;
121
94
  return ['right', val];
122
95
  },
123
- // 'inset-inline-end': ([key, val]) => ['right', val],
124
96
  'background-position': _ref22 => {
125
97
  let [key, val] = _ref22;
126
98
  return [key, val.split(' ').map(word => word === 'start' ? 'left' : word === 'end' ? 'right' : word).join(' ')];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict
8
+ */
9
+
10
+ declare export default function generateLTR(
11
+ pair: [string, string],
12
+ ): [string, string];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ *
8
+ */
9
+
10
+ declare function generateRTL(
11
+ $$PARAM_0$$: [string, string],
12
+ ): null | undefined | [string, string];
13
+ export default generateRTL;
@@ -6,16 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = generateRTL;
7
7
  var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- *
15
- *
16
- *
17
- */
18
-
19
9
  const cursorFlip = {
20
10
  'e-resize': 'w-resize',
21
11
  'w-resize': 'e-resize',
@@ -70,10 +60,6 @@ function flipShadow(value) {
70
60
  return rtl;
71
61
  }
72
62
  }
73
-
74
- // Should we be flipping shadows at all?
75
- // I think the better approach would be to let engineers use
76
- // CSS-vars directly.
77
63
  const shadowsFlip = {
78
64
  'box-shadow': _ref => {
79
65
  let [key, val] = _ref;
@@ -92,85 +78,69 @@ const logicalToPhysical = {
92
78
  };
93
79
  const propertyToRTL = {
94
80
  'margin-start': _ref3 => {
95
- let [key, val] = _ref3;
81
+ let [_key, val] = _ref3;
96
82
  return ['margin-right', val];
97
83
  },
98
- // 'margin-inline-start': ([key, val]: [string, string]) => ['margin-right', val],
99
84
  'margin-end': _ref4 => {
100
- let [key, val] = _ref4;
85
+ let [_key, val] = _ref4;
101
86
  return ['margin-left', val];
102
87
  },
103
- // 'margin-inline-end': ([key, val]: [string, string]) => ['margin-left', val],
104
88
  'padding-start': _ref5 => {
105
- let [key, val] = _ref5;
89
+ let [_key, val] = _ref5;
106
90
  return ['padding-right', val];
107
91
  },
108
- // 'padding-inline-start': ([key, val]: [string, string]) => ['padding-right', val],
109
92
  'padding-end': _ref6 => {
110
- let [key, val] = _ref6;
93
+ let [_key, val] = _ref6;
111
94
  return ['padding-left', val];
112
95
  },
113
- // 'padding-inline-end': ([key, val]: [string, string]) => ['padding-left', val],
114
96
  'border-start': _ref7 => {
115
- let [key, val] = _ref7;
97
+ let [_key, val] = _ref7;
116
98
  return ['border-right', val];
117
99
  },
118
- // 'border-inline-start': ([key, val]: [string, string]) => ['border-right', val],
119
100
  'border-end': _ref8 => {
120
- let [key, val] = _ref8;
101
+ let [_key, val] = _ref8;
121
102
  return ['border-left', val];
122
103
  },
123
- // 'border-inline-end': ([key, val]: [string, string]) => ['border-left', val],
124
104
  'border-start-width': _ref9 => {
125
- let [key, val] = _ref9;
105
+ let [_key, val] = _ref9;
126
106
  return ['border-right-width', val];
127
107
  },
128
- // 'border-inline-start-width': ([key, val]: [string, string]) => ['border-right-width', val],
129
108
  'border-end-width': _ref10 => {
130
- let [key, val] = _ref10;
109
+ let [_key, val] = _ref10;
131
110
  return ['border-left-width', val];
132
111
  },
133
- // 'border-inline-end-width': ([key, val]: [string, string]) => ['border-left-width', val],
134
112
  'border-start-color': _ref11 => {
135
- let [key, val] = _ref11;
113
+ let [_key, val] = _ref11;
136
114
  return ['border-right-color', val];
137
115
  },
138
- // 'border-inline-start-color': ([key, val]: [string, string]) => ['border-right-color', val],
139
116
  'border-end-color': _ref12 => {
140
- let [key, val] = _ref12;
117
+ let [_key, val] = _ref12;
141
118
  return ['border-left-color', val];
142
119
  },
143
- // 'border-inline-end-color': ([key, val]: [string, string]) => ['border-left-color', val],
144
120
  'border-start-style': _ref13 => {
145
- let [key, val] = _ref13;
121
+ let [_key, val] = _ref13;
146
122
  return ['border-right-style', val];
147
123
  },
148
- // 'border-inline-start-style': ([key, val]: [string, string]) => ['border-right-style', val],
149
124
  'border-end-style': _ref14 => {
150
- let [key, val] = _ref14;
125
+ let [_key, val] = _ref14;
151
126
  return ['border-left-style', val];
152
127
  },
153
- // 'border-inline-end-style': ([key, val]: [string, string]) => ['border-left-style', val],
154
128
  'border-top-start-radius': _ref15 => {
155
- let [key, val] = _ref15;
129
+ let [_key, val] = _ref15;
156
130
  return ['border-top-right-radius', val];
157
131
  },
158
- // 'border-start-start-radius': ([key, val]: [string, string]) => ['border-top-right-radius', val],
159
132
  'border-bottom-start-radius': _ref16 => {
160
- let [key, val] = _ref16;
133
+ let [_key, val] = _ref16;
161
134
  return ['border-bottom-right-radius', val];
162
135
  },
163
- // 'border-end-start-radius': ([key, val]: [string, string]) => ['border-bottom-right-radius', val],
164
136
  'border-top-end-radius': _ref17 => {
165
- let [key, val] = _ref17;
137
+ let [_key, val] = _ref17;
166
138
  return ['border-top-left-radius', val];
167
139
  },
168
- // 'border-start-end-radius': ([key, val]: [string, string]) => ['border-top-left-radius', val],
169
140
  'border-bottom-end-radius': _ref18 => {
170
- let [key, val] = _ref18;
141
+ let [_key, val] = _ref18;
171
142
  return ['border-bottom-left-radius', val];
172
143
  },
173
- // 'border-end-end-radius': ([key, val]: [string, string]) => ['border-bottom-left-radius', val],
174
144
  'text-align': _ref19 => {
175
145
  let [key, val] = _ref19;
176
146
  return logicalToPhysical[val] != null ? [key, logicalToPhysical[val]] : null;
@@ -184,15 +154,13 @@ const propertyToRTL = {
184
154
  return logicalToPhysical[val] != null ? [key, logicalToPhysical[val]] : null;
185
155
  },
186
156
  start: _ref22 => {
187
- let [key, val] = _ref22;
157
+ let [_key, val] = _ref22;
188
158
  return ['right', val];
189
159
  },
190
- // 'inset-inline-start': ([key, val]: [string, string]) => ['right', val],
191
160
  end: _ref23 => {
192
- let [key, val] = _ref23;
161
+ let [_key, val] = _ref23;
193
162
  return ['left', val];
194
163
  },
195
- // 'inset-inline-end': ([key, val]: [string, string]) => ['left', val],
196
164
  'background-position': _ref24 => {
197
165
  let [key, val] = _ref24;
198
166
  const words = val.split(' ');
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict
8
+ */
9
+
10
+ declare export default function generateRTL(
11
+ [string, string],
12
+ ): ?[string, string];
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ *
8
+ */
9
+
10
+ import type { InjectableStyle, StyleXOptions } from '../common-types';
11
+ import type { IncludedStyles } from '../stylex-include';
12
+ export type ComputedStyle = null | Readonly<[string, InjectableStyle]>;
13
+ export interface IPreRule {
14
+ compiled(
15
+ options: StyleXOptions,
16
+ ): IncludedStyles | ReadonlyArray<ComputedStyle>;
17
+ equals(other: IPreRule): boolean;
18
+ }
19
+ export type AnyPreRule = NullPreRule | PreRule | PreRuleSet;
20
+ export declare class NullPreRule implements IPreRule {
21
+ compiled(_options: StyleXOptions): [null];
22
+ equals(other: IPreRule): boolean;
23
+ }
24
+ export declare class PreIncludedStylesRule implements IPreRule {
25
+ readonly includedStyles: IncludedStyles;
26
+ constructor(IncludedStyles: IncludedStyles);
27
+ equals(other: IPreRule): boolean;
28
+ compiled(_options: StyleXOptions): IncludedStyles;
29
+ }
30
+ export declare class PreRule implements IPreRule {
31
+ readonly property: string;
32
+ readonly value: string | number | ReadonlyArray<string | number>;
33
+ readonly pseudos: ReadonlyArray<string>;
34
+ readonly atRules: ReadonlyArray<string>;
35
+ constructor(
36
+ property: string,
37
+ value: string | number | ReadonlyArray<string | number>,
38
+ pseudos?: null | undefined | ReadonlyArray<string>,
39
+ atRules?: null | undefined | ReadonlyArray<string>,
40
+ );
41
+ compiled(options: StyleXOptions): ReadonlyArray<[string, InjectableStyle]>;
42
+ equals(other: IPreRule): boolean;
43
+ }
44
+ export declare class PreRuleSet implements IPreRule {
45
+ readonly rules: ReadonlyArray<PreRule | NullPreRule>;
46
+ constructor(rules: ReadonlyArray<PreRule | NullPreRule>);
47
+ static create(
48
+ rules: ReadonlyArray<PreRule | NullPreRule | PreRuleSet>,
49
+ ): AnyPreRule;
50
+ compiled(options: StyleXOptions): ReadonlyArray<ComputedStyle>;
51
+ equals(other: IPreRule): boolean;
52
+ }