@pandacss/token-dictionary 0.16.0 → 0.17.1

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/dist/index.d.mts CHANGED
@@ -1,26 +1,30 @@
1
1
  import { Tokens, SemanticTokens } from '@pandacss/types';
2
2
 
3
3
  type TokenStatus = 'deprecated' | 'experimental' | 'new';
4
- type ExtensionData = {
4
+ interface ExtensionData {
5
5
  status?: TokenStatus;
6
6
  category?: string;
7
7
  references?: TokenReferences;
8
8
  condition?: string;
9
9
  conditions?: TokenConditions;
10
- };
11
- type TokenConditions = Record<string, string>;
12
- type TokenReferences = Record<string, Token>;
10
+ }
11
+ interface TokenConditions {
12
+ [key: string]: string;
13
+ }
14
+ interface TokenReferences {
15
+ [key: string]: Token;
16
+ }
13
17
  type TokenExtensions = ExtensionData & {
14
18
  [key: string]: any;
15
19
  };
16
- type ExtendedToken = {
20
+ interface ExtendedToken {
17
21
  name: string;
18
22
  value: any;
19
23
  type?: string;
20
24
  path?: string[];
21
25
  description?: string;
22
26
  extensions?: TokenExtensions;
23
- };
27
+ }
24
28
  /**
25
29
  * Represents a design token in the dictionary
26
30
  */
@@ -80,28 +84,28 @@ declare class Token {
80
84
  }
81
85
 
82
86
  type EnforcePhase = 'pre' | 'post';
83
- type Options = {
87
+ interface Options {
84
88
  prefix?: string;
85
89
  hash?: boolean;
86
- };
87
- type TokenTransformer = {
90
+ }
91
+ interface TokenTransformer {
88
92
  name: string;
89
93
  enforce?: EnforcePhase;
90
94
  type?: 'value' | 'name' | 'extensions';
91
95
  match?: (token: Token) => boolean;
92
96
  transform: (token: Token, options: Options) => any;
93
- };
94
- type TokenDictionaryOptions = {
97
+ }
98
+ interface TokenDictionaryOptions {
95
99
  tokens?: Tokens;
96
100
  semanticTokens?: SemanticTokens;
97
101
  breakpoints?: Record<string, string>;
98
102
  prefix?: string;
99
103
  hash?: boolean;
100
- };
101
- type TokenMiddleware = {
104
+ }
105
+ interface TokenMiddleware {
102
106
  enforce?: EnforcePhase;
103
107
  transform: (dict: TokenDictionary$1, options: Options) => void;
104
- };
108
+ }
105
109
  declare class TokenDictionary$1 {
106
110
  allTokens: Token[];
107
111
  prefix: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,26 +1,30 @@
1
1
  import { Tokens, SemanticTokens } from '@pandacss/types';
2
2
 
3
3
  type TokenStatus = 'deprecated' | 'experimental' | 'new';
4
- type ExtensionData = {
4
+ interface ExtensionData {
5
5
  status?: TokenStatus;
6
6
  category?: string;
7
7
  references?: TokenReferences;
8
8
  condition?: string;
9
9
  conditions?: TokenConditions;
10
- };
11
- type TokenConditions = Record<string, string>;
12
- type TokenReferences = Record<string, Token>;
10
+ }
11
+ interface TokenConditions {
12
+ [key: string]: string;
13
+ }
14
+ interface TokenReferences {
15
+ [key: string]: Token;
16
+ }
13
17
  type TokenExtensions = ExtensionData & {
14
18
  [key: string]: any;
15
19
  };
16
- type ExtendedToken = {
20
+ interface ExtendedToken {
17
21
  name: string;
18
22
  value: any;
19
23
  type?: string;
20
24
  path?: string[];
21
25
  description?: string;
22
26
  extensions?: TokenExtensions;
23
- };
27
+ }
24
28
  /**
25
29
  * Represents a design token in the dictionary
26
30
  */
@@ -80,28 +84,28 @@ declare class Token {
80
84
  }
81
85
 
82
86
  type EnforcePhase = 'pre' | 'post';
83
- type Options = {
87
+ interface Options {
84
88
  prefix?: string;
85
89
  hash?: boolean;
86
- };
87
- type TokenTransformer = {
90
+ }
91
+ interface TokenTransformer {
88
92
  name: string;
89
93
  enforce?: EnforcePhase;
90
94
  type?: 'value' | 'name' | 'extensions';
91
95
  match?: (token: Token) => boolean;
92
96
  transform: (token: Token, options: Options) => any;
93
- };
94
- type TokenDictionaryOptions = {
97
+ }
98
+ interface TokenDictionaryOptions {
95
99
  tokens?: Tokens;
96
100
  semanticTokens?: SemanticTokens;
97
101
  breakpoints?: Record<string, string>;
98
102
  prefix?: string;
99
103
  hash?: boolean;
100
- };
101
- type TokenMiddleware = {
104
+ }
105
+ interface TokenMiddleware {
102
106
  enforce?: EnforcePhase;
103
107
  transform: (dict: TokenDictionary$1, options: Options) => void;
104
- };
108
+ }
105
109
  declare class TokenDictionary$1 {
106
110
  allTokens: Token[];
107
111
  prefix: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/token-dictionary",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "description": "Common error messages for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,16 +10,28 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
+ "exports": {
14
+ ".": {
15
+ "source": "./src/index.ts",
16
+ "types": "./dist/index.d.ts",
17
+ "require": "./dist/index.js",
18
+ "import": {
19
+ "types": "./dist/index.d.mts",
20
+ "default": "./dist/index.mjs"
21
+ }
22
+ },
23
+ "./package.json": "./package.json"
24
+ },
13
25
  "files": [
14
26
  "dist"
15
27
  ],
16
28
  "dependencies": {
17
29
  "ts-pattern": "5.0.5",
18
- "@pandacss/shared": "0.16.0",
19
- "@pandacss/types": "0.16.0"
30
+ "@pandacss/shared": "0.17.1",
31
+ "@pandacss/types": "0.17.1"
20
32
  },
21
33
  "devDependencies": {
22
- "@pandacss/fixture": "0.16.0"
34
+ "@pandacss/fixture": "0.17.1"
23
35
  },
24
36
  "scripts": {
25
37
  "build": "tsup src/index.ts --format=esm,cjs --dts",