@pandacss/shared 0.0.0-dev-20230625171447 → 0.0.0-dev-20230625190717

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
@@ -28,7 +28,7 @@ type CssVarOptions = {
28
28
  };
29
29
  declare function cssVar(name: string, options?: CssVarOptions): CssVar;
30
30
 
31
- declare function esc(str: string): string;
31
+ declare const esc: (sel: string) => string;
32
32
 
33
33
  declare function flatten(values: Record<string, Record<string, any>>, stop?: WalkObjectStopFn): Record<string, any>;
34
34
 
package/dist/index.js CHANGED
@@ -362,10 +362,19 @@ function cssVar(name, options = {}) {
362
362
  }
363
363
 
364
364
  // src/esc.ts
365
- var escapeRegExp = /(^[^_a-zA-Z\u00a0-\uffff]|[^-_a-zA-Z0-9\u00a0-\uffff])/g;
366
- function esc2(str) {
367
- return "".replace.call(str, escapeRegExp, "\\$1");
368
- }
365
+ var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g;
366
+ var fcssescape = function(ch, asCodePoint) {
367
+ if (!asCodePoint)
368
+ return "\\" + ch;
369
+ if (ch === "\0")
370
+ return "\uFFFD";
371
+ if (ch === "-" && ch.length === 1)
372
+ return "\\-";
373
+ return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16);
374
+ };
375
+ var esc2 = (sel) => {
376
+ return (sel + "").replace(rcssescape, fcssescape);
377
+ };
369
378
 
370
379
  // src/flatten.ts
371
380
  function flatten(values, stop) {
package/dist/index.mjs CHANGED
@@ -299,10 +299,19 @@ function cssVar(name, options = {}) {
299
299
  }
300
300
 
301
301
  // src/esc.ts
302
- var escapeRegExp = /(^[^_a-zA-Z\u00a0-\uffff]|[^-_a-zA-Z0-9\u00a0-\uffff])/g;
303
- function esc2(str) {
304
- return "".replace.call(str, escapeRegExp, "\\$1");
305
- }
302
+ var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g;
303
+ var fcssescape = function(ch, asCodePoint) {
304
+ if (!asCodePoint)
305
+ return "\\" + ch;
306
+ if (ch === "\0")
307
+ return "\uFFFD";
308
+ if (ch === "-" && ch.length === 1)
309
+ return "\\-";
310
+ return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16);
311
+ };
312
+ var esc2 = (sel) => {
313
+ return (sel + "").replace(rcssescape, fcssescape);
314
+ };
306
315
 
307
316
  // src/flatten.ts
308
317
  function flatten(values, stop) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20230625171447",
3
+ "version": "0.0.0-dev-20230625190717",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",