|
| 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 type TRawValue = number | string | ReadonlyArray<number | string>; |
| 11 | +export type TStyleValue = null | TRawValue; |
| 12 | +export type TNestableStyleValue = TStyleValue | PrimitiveRawStyles; |
| 13 | +export type RawStyles = Readonly<{ [$$Key$$: string]: TNestableStyleValue }>; |
| 14 | +export type PrimitiveRawStyles = Readonly<{ |
| 15 | + [$$Key$$: string]: TNestableStyleValue; |
| 16 | +}>; |
| 17 | +export type InjectableStyle = { |
| 18 | + readonly priority: number; |
| 19 | + readonly ltr: string; |
| 20 | + readonly rtl: null | string; |
| 21 | +}; |
| 22 | +export type InjectableConstStyle = { |
| 23 | + readonly priority: number; |
| 24 | + readonly ltr: string; |
| 25 | + readonly rtl: null | string; |
| 26 | + readonly constKey: string; |
| 27 | + readonly constVal: string | number; |
| 28 | +}; |
| 29 | +export type StyleRule = [string, string, InjectableStyle]; |
| 30 | +export type CompiledStyles = Readonly<{ |
| 31 | + [$$Key$$: string]: |
| 32 | + | null |
| 33 | + | string |
| 34 | + | Readonly<{ [$$Key$$: string]: null | string }>; |
| 35 | +}>; |
| 36 | +export type FlatCompiledStyles = Readonly< |
| 37 | + { [$$Key$$: string]: string | null } & { $$css: true | string } |
| 38 | +>; |
| 39 | +export type StyleXOptions = Readonly<{ |
| 40 | + classNamePrefix: string; |
| 41 | + debug: null | undefined | boolean; |
| 42 | + definedStylexCSSVariables?: { [key: string]: unknown }; |
| 43 | + dev: boolean; |
| 44 | + enableDebugClassNames?: null | undefined | boolean; |
| 45 | + enableDebugDataProp?: null | undefined | boolean; |
| 46 | + enableDevClassNames?: null | undefined | boolean; |
| 47 | + enableFontSizePxToRem?: null | undefined | boolean; |
| 48 | + enableMediaQueryOrder?: null | undefined | boolean; |
| 49 | + enableLegacyValueFlipping?: null | undefined | boolean; |
| 50 | + enableLogicalStylesPolyfill?: null | undefined | boolean; |
| 51 | + enableLTRRTLComments?: null | undefined | boolean; |
| 52 | + enableMinifiedKeys?: null | undefined | boolean; |
| 53 | + styleResolution: |
| 54 | + | 'application-order' |
| 55 | + | 'property-specificity' |
| 56 | + | 'legacy-expand-shorthands'; |
| 57 | + test: boolean; |
| 58 | +}>; |
| 59 | +export type MutableCompiledNamespaces = { [key: string]: FlatCompiledStyles }; |
| 60 | +export type CompiledNamespaces = Readonly<MutableCompiledNamespaces>; |
0 commit comments