@pandacss/shared 0.0.0-dev-20230118122609 → 0.0.0-dev-20230118125053

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
@@ -1,5 +1,5 @@
1
- import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './merge-e05e5f23.js';
2
- export { C as CreateCssContext, M as MappedObject, k as WalkObjectOptions, W as WalkObjectStopFn, d as compact, c as createCss, j as deepMerge, f as filterBaseConditions, e as isBaseCondition, a as isFunction, g as isImportant, b as isObject, i as isString, m as mapObject, t as toHash, l as walkObject, w as withoutImportant, h as withoutSpace } from './merge-e05e5f23.js';
1
+ import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './merge-fe9cd267.js';
2
+ export { C as CreateCssContext, M as MappedObject, k as WalkObjectOptions, W as WalkObjectStopFn, d as compact, c as createCss, j as deepMerge, f as filterBaseConditions, e as isBaseCondition, a as isFunction, g as isImportant, b as isObject, i as isString, m as mapObject, t as toHash, l as walkObject, w as withoutImportant, h as withoutSpace } from './merge-fe9cd267.js';
3
3
 
4
4
  type Operand = string | number | {
5
5
  ref: string;
package/dist/index.js CHANGED
@@ -106,24 +106,12 @@ function withoutSpace(str) {
106
106
  }
107
107
 
108
108
  // src/hash.ts
109
- function toChar(code) {
110
- return String.fromCharCode(code + (code > 25 ? 39 : 97));
111
- }
112
- function toName(code) {
113
- let name = "";
114
- let x;
115
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
116
- name = toChar(x % 52) + name;
117
- return toChar(x % 52) + name;
118
- }
119
- function toPhash(h, x) {
120
- let i = x.length;
121
- while (i)
122
- h = h * 33 ^ x.charCodeAt(--i);
123
- return h;
124
- }
125
- function toHash(value) {
126
- return toName(toPhash(5381, value) >>> 0);
109
+ function toHash(str) {
110
+ let value = 5381;
111
+ let len = str.length;
112
+ while (len--)
113
+ value = value * 33 ^ str.charCodeAt(len);
114
+ return (value >>> 0).toString(36);
127
115
  }
128
116
 
129
117
  // src/walk-object.ts
package/dist/index.mjs CHANGED
@@ -47,24 +47,12 @@ function withoutSpace(str) {
47
47
  }
48
48
 
49
49
  // src/hash.ts
50
- function toChar(code) {
51
- return String.fromCharCode(code + (code > 25 ? 39 : 97));
52
- }
53
- function toName(code) {
54
- let name = "";
55
- let x;
56
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
57
- name = toChar(x % 52) + name;
58
- return toChar(x % 52) + name;
59
- }
60
- function toPhash(h, x) {
61
- let i = x.length;
62
- while (i)
63
- h = h * 33 ^ x.charCodeAt(--i);
64
- return h;
65
- }
66
- function toHash(value) {
67
- return toName(toPhash(5381, value) >>> 0);
50
+ function toHash(str) {
51
+ let value = 5381;
52
+ let len = str.length;
53
+ while (len--)
54
+ value = value * 33 ^ str.charCodeAt(len);
55
+ return (value >>> 0).toString(36);
68
56
  }
69
57
 
70
58
  // src/walk-object.ts
@@ -49,7 +49,7 @@ type WalkObjectOptions = {
49
49
  declare function walkObject<T, K>(target: T, predicate: Predicate<K>, options?: WalkObjectOptions): MappedObject<T, ReturnType<Predicate<K>>>;
50
50
  declare function mapObject(obj: any, fn: (value: any) => any): any;
51
51
 
52
- declare function toHash(value: string): string;
52
+ declare function toHash(str: string): string;
53
53
 
54
54
  declare function deepMerge<T extends Record<string, unknown>>(...sources: T[]): T;
55
55
 
package/dist/shared.d.ts CHANGED
@@ -1 +1 @@
1
- export { d as compact, c as createCss, j as deepMerge, f as filterBaseConditions, e as isBaseCondition, b as isObject, m as mapObject, t as toHash, l as walkObject, h as withoutSpace } from './merge-e05e5f23.js';
1
+ export { d as compact, c as createCss, j as deepMerge, f as filterBaseConditions, e as isBaseCondition, b as isObject, m as mapObject, t as toHash, l as walkObject, h as withoutSpace } from './merge-fe9cd267.js';
package/dist/shared.js CHANGED
@@ -56,24 +56,12 @@ function withoutSpace(str) {
56
56
  }
57
57
 
58
58
  // src/hash.ts
59
- function toChar(code) {
60
- return String.fromCharCode(code + (code > 25 ? 39 : 97));
61
- }
62
- function toName(code) {
63
- let name = "";
64
- let x;
65
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
66
- name = toChar(x % 52) + name;
67
- return toChar(x % 52) + name;
68
- }
69
- function toPhash(h, x) {
70
- let i = x.length;
71
- while (i)
72
- h = h * 33 ^ x.charCodeAt(--i);
73
- return h;
74
- }
75
- function toHash(value) {
76
- return toName(toPhash(5381, value) >>> 0);
59
+ function toHash(str) {
60
+ let value = 5381;
61
+ let len = str.length;
62
+ while (len--)
63
+ value = value * 33 ^ str.charCodeAt(len);
64
+ return (value >>> 0).toString(36);
77
65
  }
78
66
 
79
67
  // src/walk-object.ts
package/dist/shared.mjs CHANGED
@@ -21,24 +21,12 @@ function withoutSpace(str) {
21
21
  }
22
22
 
23
23
  // src/hash.ts
24
- function toChar(code) {
25
- return String.fromCharCode(code + (code > 25 ? 39 : 97));
26
- }
27
- function toName(code) {
28
- let name = "";
29
- let x;
30
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
31
- name = toChar(x % 52) + name;
32
- return toChar(x % 52) + name;
33
- }
34
- function toPhash(h, x) {
35
- let i = x.length;
36
- while (i)
37
- h = h * 33 ^ x.charCodeAt(--i);
38
- return h;
39
- }
40
- function toHash(value) {
41
- return toName(toPhash(5381, value) >>> 0);
24
+ function toHash(str) {
25
+ let value = 5381;
26
+ let len = str.length;
27
+ while (len--)
28
+ value = value * 33 ^ str.charCodeAt(len);
29
+ return (value >>> 0).toString(36);
42
30
  }
43
31
 
44
32
  // src/walk-object.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20230118122609",
3
+ "version": "0.0.0-dev-20230118125053",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",