@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 +1 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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}` : ""})`
|