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

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.
@@ -12,7 +12,7 @@ type VarsObject<
12
12
  Vars extends {
13
13
  readonly [$$Key$$: string]:
14
14
  | string
15
- | { default: string; readonly [$$Key$$: string]: string };
15
+ | { readonly default: string; readonly [$$Key$$: string]: string };
16
16
  },
17
17
  > = Readonly</**
18
18
  * > 15 | ...$ObjMapConst<Vars, string>,
@@ -23,7 +23,7 @@ declare function styleXCreateVars<
23
23
  Vars extends {
24
24
  readonly [$$Key$$: string]:
25
25
  | string
26
- | { default: string; readonly [$$Key$$: string]: string };
26
+ | { readonly default: string; readonly [$$Key$$: string]: string };
27
27
  },
28
28
  >(
29
29
  variables: Vars,
@@ -10,7 +10,7 @@
10
10
  import type { StyleXOptions } from './common-types';
11
11
 
12
12
  type VarsObject<
13
- Vars: { +[string]: string | { default: string, +[string]: string } },
13
+ Vars: { +[string]: string | { +default: string, +[string]: string } },
14
14
  > = $ReadOnly<{
15
15
  ...$ObjMapConst<Vars, string>,
16
16
  __themeName__: string,
@@ -19,8 +19,8 @@ type VarsObject<
19
19
  // Similar to `stylex.create` it takes an object of variables with their values
20
20
  // and returns a string after hashing it.
21
21
  declare export default function styleXCreateVars<
22
- +Vars: {
23
- +[string]: string | { default: string, +[string]: string },
22
+ Vars: {
23
+ +[string]: string | { +default: string, +[string]: string },
24
24
  },
25
25
  >(
26
26
  variables: Vars,
@@ -9,10 +9,7 @@
9
9
 
10
10
  type ValueWithDefault<T> =
11
11
  | T
12
- | Readonly<{
13
- readonly default: T;
14
- readonly [$$Key$$: string]: ValueWithDefault<T>;
15
- }>;
12
+ | Readonly<{ default: T; [$$Key$$: string]: ValueWithDefault<T> }>;
16
13
  type CSSSyntax =
17
14
  | '*'
18
15
  | '<length>'
@@ -22,8 +22,8 @@
22
22
  type ValueWithDefault<+T> =
23
23
  | T
24
24
  | $ReadOnly<{
25
- +default: T,
26
- +[string]: ValueWithDefault<T>,
25
+ default: T,
26
+ [string]: ValueWithDefault<T>,
27
27
  }>;
28
28
 
29
29
  type CSSSyntax =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stylexjs/shared",
3
- "version": "0.2.0-beta.20",
3
+ "version": "0.2.0-beta.21",
4
4
  "main": "lib/index.js",
5
5
  "repository": "https://www.github.com/facebook/stylex",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  "postcss-value-parser": "^4.1.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@stylexjs/scripts": "0.2.0-beta.20"
16
+ "@stylexjs/scripts": "0.2.0-beta.21"
17
17
  },
18
18
  "jest": {
19
19
  "snapshotFormat": {