@navita/types 0.0.9 → 0.0.11
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/index.d.ts +10 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type ImportMap = {
|
|
|
4
4
|
callee: string;
|
|
5
5
|
source: string;
|
|
6
6
|
}[];
|
|
7
|
+
type RawCSSVarFunction = `--${string}`;
|
|
7
8
|
type CSSVarFunction = `var(--${string})` | `var(--${string}, ${string | number})`;
|
|
8
9
|
type Contract = {
|
|
9
10
|
[key: string]: CSSVarFunction | null | Contract;
|
|
@@ -28,7 +29,7 @@ interface ContainerProperties {
|
|
|
28
29
|
}
|
|
29
30
|
type CSSTypeProperties = Properties<number | (string & {})> & ContainerProperties;
|
|
30
31
|
type CSSProperties = {
|
|
31
|
-
[Property in keyof CSSTypeProperties]: CSSTypeProperties[Property] | CSSVarFunction;
|
|
32
|
+
[Property in keyof CSSTypeProperties]: CSSTypeProperties[Property] | CSSVarFunction | RawCSSVarFunction;
|
|
32
33
|
};
|
|
33
34
|
interface CSSKeyframes {
|
|
34
35
|
[time: string]: CSSProperties;
|
|
@@ -44,19 +45,20 @@ interface ContainerQueries<StyleType> {
|
|
|
44
45
|
}
|
|
45
46
|
type WithQueries<StyleType> = MediaQueries<StyleType & FeatureQueries<StyleType & ContainerQueries<StyleType>> & ContainerQueries<StyleType & FeatureQueries<StyleType>>> & FeatureQueries<StyleType & MediaQueries<StyleType & ContainerQueries<StyleType>> & ContainerQueries<StyleType & MediaQueries<StyleType>>> & ContainerQueries<StyleType & MediaQueries<StyleType & FeatureQueries<StyleType>> & FeatureQueries<StyleType & MediaQueries<StyleType>>>;
|
|
46
47
|
interface WithDirectDescendants<StyleType> {
|
|
47
|
-
[string:
|
|
48
|
+
[string: `>${string}`]: StyleType;
|
|
48
49
|
}
|
|
49
|
-
interface WithNestedSelectors<
|
|
50
|
-
[string:
|
|
50
|
+
interface WithNestedSelectors<StyleRule> {
|
|
51
|
+
[string: `&${string}`]: StyleRule;
|
|
51
52
|
}
|
|
52
|
-
type
|
|
53
|
-
[key in
|
|
53
|
+
type WithSimplePseudoSelectors<StyleType> = {
|
|
54
|
+
[key in `${SimplePseudos}${string}`]?: StyleType;
|
|
54
55
|
};
|
|
55
56
|
type WithAdvancedPseudoSelectors<StyleType> = {
|
|
56
57
|
[key in `${AdvancedPseudos}${string}`]?: StyleType;
|
|
57
58
|
};
|
|
58
|
-
interface StyleRule extends CSSProperties, WithQueries<StyleRule>,
|
|
59
|
+
interface StyleRule extends CSSProperties, WithQueries<StyleRule>, WithSimplePseudoSelectors<StyleRule>, WithAdvancedPseudoSelectors<StyleRule>, WithDirectDescendants<StyleRule>, WithNestedSelectors<StyleRule> {
|
|
60
|
+
[string: `--${string}`]: string | number;
|
|
59
61
|
}
|
|
60
62
|
type GlobalStyleRule = StyleRule;
|
|
61
63
|
|
|
62
|
-
export { CSSKeyframes, CSSProperties, CSSVarFunction, Contract, FontFaceRule, GlobalFontFaceRule, GlobalStyleRule, ImportMap, MapLeafNodes, NullableTokens, StyleRule, ThemeVars, Tokens, WithQueries };
|
|
64
|
+
export { CSSKeyframes, CSSProperties, CSSVarFunction, Contract, FontFaceRule, GlobalFontFaceRule, GlobalStyleRule, ImportMap, MapLeafNodes, NullableTokens, RawCSSVarFunction, StyleRule, ThemeVars, Tokens, WithQueries };
|