@navita/types 0.0.0 → 0.0.2

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 CHANGED
@@ -1,5 +1,9 @@
1
- import { AtRule, Properties, SimplePseudos } from 'csstype';
1
+ import { AtRule, Properties, SimplePseudos, AdvancedPseudos } from 'csstype';
2
2
 
3
+ type ImportMap = {
4
+ callee: string;
5
+ source: string;
6
+ }[];
3
7
  type CSSVarFunction = `var(--${string})` | `var(--${string}, ${string | number})`;
4
8
  type Contract = {
5
9
  [key: string]: CSSVarFunction | null | Contract;
@@ -9,10 +13,10 @@ type MapLeafNodes<Obj, LeafType> = {
9
13
  [Prop in keyof Obj]: Obj[Prop] extends Primitive ? LeafType : Obj[Prop] extends Record<string | number, any> ? MapLeafNodes<Obj[Prop], LeafType> : never;
10
14
  };
11
15
  type NullableTokens = {
12
- [key: string]: string | NullableTokens | null;
16
+ [key: string]: string | number | NullableTokens | null;
13
17
  };
14
18
  type Tokens = {
15
- [key: string]: string | Tokens;
19
+ [key: string]: string | number | Tokens;
16
20
  };
17
21
  type ThemeVars<ThemeContract extends NullableTokens> = MapLeafNodes<ThemeContract, CSSVarFunction>;
18
22
  type GlobalFontFaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>;
@@ -46,10 +50,13 @@ interface WithNestedSelectors<StyleType> {
46
50
  [string: `& ${string}`]: StyleType;
47
51
  }
48
52
  type WithPseudoSelectors<StyleType> = {
49
- [key in SimplePseudos]?: StyleType;
53
+ [key in SimplePseudos | `${SimplePseudos},${SimplePseudos}` | `${SimplePseudos}, ${SimplePseudos}`]?: StyleType;
50
54
  };
51
- interface StyleRule extends CSSProperties, WithQueries<StyleRule>, WithPseudoSelectors<StyleRule>, WithDirectDescendants<StyleRule>, WithNestedSelectors<StyleRule> {
55
+ type WithAdvancedPseudoSelectors<StyleType> = {
56
+ [key in `${AdvancedPseudos}${string}`]?: StyleType;
57
+ };
58
+ interface StyleRule extends CSSProperties, WithQueries<StyleRule>, WithPseudoSelectors<StyleRule>, WithAdvancedPseudoSelectors<StyleRule>, WithDirectDescendants<StyleRule>, WithNestedSelectors<StyleRule> {
52
59
  }
53
60
  type GlobalStyleRule = StyleRule;
54
61
 
55
- export { CSSKeyframes, CSSProperties, CSSVarFunction, Contract, FontFaceRule, GlobalFontFaceRule, GlobalStyleRule, MapLeafNodes, NullableTokens, StyleRule, ThemeVars, Tokens, WithQueries };
62
+ export { CSSKeyframes, CSSProperties, CSSVarFunction, Contract, FontFaceRule, GlobalFontFaceRule, GlobalStyleRule, ImportMap, MapLeafNodes, NullableTokens, StyleRule, ThemeVars, Tokens, WithQueries };
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@navita/types",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
+ "license": "MIT",
5
+ "private": false,
6
+ "sideEffects": false,
7
+ "types": "./src/index.ts",
4
8
  "exports": {
5
9
  ".": {
6
10
  "types": "./index.d.ts"
package/index.js DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
package/index.mjs DELETED
@@ -1 +0,0 @@
1
-