@pandacss/token-dictionary
Advanced tools
Comparing version 0.0.0-dev-20240405065931 to 0.0.0-dev-20240409220115
@@ -5,5 +5,3 @@ import * as _pandacss_types from '@pandacss/types'; | ||
type TokenStatus = 'deprecated' | 'experimental' | 'new'; | ||
interface ExtensionData { | ||
status?: TokenStatus; | ||
category?: string; | ||
@@ -24,3 +22,3 @@ references?: TokenReferences; | ||
} & T; | ||
interface ExtendedToken { | ||
interface TokenInput { | ||
name: string; | ||
@@ -31,2 +29,3 @@ value: any; | ||
description?: string; | ||
deprecated?: boolean | string; | ||
extensions?: TokenExtensions; | ||
@@ -44,4 +43,5 @@ } | ||
description?: string; | ||
deprecated?: boolean | string; | ||
extensions: TokenExtensions; | ||
constructor(data: ExtendedToken); | ||
constructor(input: TokenInput); | ||
/** | ||
@@ -117,2 +117,3 @@ * The unique identifier of the token. | ||
byName: Map<string, Token>; | ||
private deprecated; | ||
constructor(options: TokenDictionaryOptions); | ||
@@ -162,2 +163,3 @@ init(): this; | ||
deepResolveReference(originalValue: string): string | undefined; | ||
isDeprecated(name: string): boolean; | ||
build(): this; | ||
@@ -164,0 +166,0 @@ get isEmpty(): boolean; |
@@ -156,16 +156,18 @@ "use strict"; | ||
description; | ||
deprecated; | ||
extensions; | ||
constructor(data) { | ||
this.name = data.name; | ||
this.value = data.value; | ||
this.originalValue = data.value; | ||
this.path = data.path ?? []; | ||
if (data.type) { | ||
this.type = data.type; | ||
constructor(input) { | ||
this.name = input.name; | ||
this.value = input.value; | ||
this.originalValue = input.value; | ||
this.path = input.path ?? []; | ||
if (input.type) { | ||
this.type = input.type; | ||
} | ||
if (data.description) { | ||
this.description = data.description; | ||
if (input.description) { | ||
this.description = input.description; | ||
} | ||
this.extensions = data.extensions ?? {}; | ||
this.extensions.condition = data.extensions?.condition ?? "base"; | ||
this.extensions = input.extensions ?? {}; | ||
this.extensions.condition = input.extensions?.condition ?? "base"; | ||
this.deprecated = input.deprecated; | ||
this.setType(); | ||
@@ -740,2 +742,3 @@ } | ||
byName = /* @__PURE__ */ new Map(); | ||
deprecated = /* @__PURE__ */ new Set(); | ||
init() { | ||
@@ -854,2 +857,5 @@ this.registerTokens(); | ||
this.byName.set(token.name, token); | ||
if (token.deprecated) { | ||
this.deprecated.add(token.name); | ||
} | ||
if (transformPhase) { | ||
@@ -1039,2 +1045,5 @@ this.transforms.forEach((transform) => { | ||
} | ||
isDeprecated(name) { | ||
return this.deprecated.has(name); | ||
} | ||
build() { | ||
@@ -1041,0 +1050,0 @@ this.applyMiddlewares("pre"); |
{ | ||
"name": "@pandacss/token-dictionary", | ||
"version": "0.0.0-dev-20240405065931", | ||
"version": "0.0.0-dev-20240409220115", | ||
"description": "Common error messages for css panda", | ||
@@ -36,5 +36,5 @@ "main": "dist/index.js", | ||
"ts-pattern": "5.0.8", | ||
"@pandacss/logger": "^0.0.0-dev-20240405065931", | ||
"@pandacss/shared": "0.0.0-dev-20240405065931", | ||
"@pandacss/types": "0.0.0-dev-20240405065931" | ||
"@pandacss/logger": "^0.0.0-dev-20240409220115", | ||
"@pandacss/shared": "0.0.0-dev-20240409220115", | ||
"@pandacss/types": "0.0.0-dev-20240409220115" | ||
}, | ||
@@ -41,0 +41,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
88781
2548
+ Added@pandacss/logger@0.0.0-dev-20250201200948(transitive)
+ Added@pandacss/shared@0.0.0-dev-20240409220115(transitive)
+ Added@pandacss/types@0.0.0-dev-20240409220115(transitive)
- Removed@pandacss/logger@0.0.0-dev-20250206220520(transitive)
- Removed@pandacss/shared@0.0.0-dev-20240405065931(transitive)
- Removed@pandacss/types@0.0.0-dev-20240405065931(transitive)
- Removedkleur@4.1.5(transitive)