@pandacss/shared 0.0.0-dev-20230515185817 → 0.0.0-dev-20230516103848

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.ts CHANGED
@@ -24,6 +24,7 @@ type CssVar = {
24
24
  type CssVarOptions = {
25
25
  fallback?: string;
26
26
  prefix?: string;
27
+ hash?: boolean;
27
28
  };
28
29
  declare function cssVar(name: string, options?: CssVarOptions): CssVar;
29
30
 
package/dist/index.js CHANGED
@@ -335,8 +335,8 @@ function dashCase2(string) {
335
335
  return string.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`);
336
336
  }
337
337
  function cssVar(name, options = {}) {
338
- const { fallback = "", prefix = "" } = options;
339
- const variable = dashCase2(["-", prefix, esc(name)].filter(Boolean).join("-"));
338
+ const { fallback = "", prefix = "", hash } = options;
339
+ const variable = hash ? ["-", prefix, toHash(name)].filter(Boolean).join("-") : dashCase2(["-", prefix, esc(name)].filter(Boolean).join("-"));
340
340
  const result = {
341
341
  var: variable,
342
342
  ref: `var(${variable}${fallback ? `, ${fallback}` : ""})`
package/dist/index.mjs CHANGED
@@ -273,8 +273,8 @@ function dashCase2(string) {
273
273
  return string.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`);
274
274
  }
275
275
  function cssVar(name, options = {}) {
276
- const { fallback = "", prefix = "" } = options;
277
- const variable = dashCase2(["-", prefix, esc(name)].filter(Boolean).join("-"));
276
+ const { fallback = "", prefix = "", hash } = options;
277
+ const variable = hash ? ["-", prefix, toHash(name)].filter(Boolean).join("-") : dashCase2(["-", prefix, esc(name)].filter(Boolean).join("-"));
278
278
  const result = {
279
279
  var: variable,
280
280
  ref: `var(${variable}${fallback ? `, ${fallback}` : ""})`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20230515185817",
3
+ "version": "0.0.0-dev-20230516103848",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",