@pandacss/shared 0.0.0-dev-20230128072108 → 0.0.0-dev-20230131074332

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 './split-props-6eb4eecb.js';
2
- export { C as CreateCssContext, M as MappedObject, l as WalkObjectOptions, W as WalkObjectStopFn, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, o as mapObject, m as mergeProps, s as splitProps, t as toHash, n as walkObject, w as withoutImportant, j as withoutSpace } from './split-props-6eb4eecb.js';
1
+ import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './split-props-6820d5c1.js';
2
+ export { C as CreateCssContext, M as MappedObject, l as WalkObjectOptions, W as WalkObjectStopFn, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, o as mapObject, m as mergeProps, s as splitProps, t as toHash, n as walkObject, w as withoutImportant, j as withoutSpace } from './split-props-6820d5c1.js';
3
3
 
4
4
  type Operand = string | number | {
5
5
  ref: string;
package/dist/index.js CHANGED
@@ -114,12 +114,24 @@ function withoutSpace(str) {
114
114
  }
115
115
 
116
116
  // src/hash.ts
117
- function toHash(str) {
118
- let value = 5381;
119
- let len = str.length;
120
- while (len--)
121
- value = value * 33 ^ str.charCodeAt(len);
122
- return (value >>> 0).toString(36);
117
+ function toChar(code) {
118
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
119
+ }
120
+ function toName(code) {
121
+ let name = "";
122
+ let x;
123
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0)
124
+ name = toChar(x % 52) + name;
125
+ return toChar(x % 52) + name;
126
+ }
127
+ function toPhash(h, x) {
128
+ let i = x.length;
129
+ while (i)
130
+ h = h * 33 ^ x.charCodeAt(--i);
131
+ return h;
132
+ }
133
+ function toHash(value) {
134
+ return toName(toPhash(5381, value) >>> 0);
123
135
  }
124
136
 
125
137
  // src/merge-props.ts
package/dist/index.mjs CHANGED
@@ -52,12 +52,24 @@ function withoutSpace(str) {
52
52
  }
53
53
 
54
54
  // src/hash.ts
55
- function toHash(str) {
56
- let value = 5381;
57
- let len = str.length;
58
- while (len--)
59
- value = value * 33 ^ str.charCodeAt(len);
60
- return (value >>> 0).toString(36);
55
+ function toChar(code) {
56
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
57
+ }
58
+ function toName(code) {
59
+ let name = "";
60
+ let x;
61
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0)
62
+ name = toChar(x % 52) + name;
63
+ return toChar(x % 52) + name;
64
+ }
65
+ function toPhash(h, x) {
66
+ let i = x.length;
67
+ while (i)
68
+ h = h * 33 ^ x.charCodeAt(--i);
69
+ return h;
70
+ }
71
+ function toHash(value) {
72
+ return toName(toPhash(5381, value) >>> 0);
61
73
  }
62
74
 
63
75
  // src/merge-props.ts
package/dist/shared.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, k as hypenateProperty, f as isBaseCondition, b as isObject, o as mapObject, m as mergeProps, s as splitProps, t as toHash, n as walkObject, j as withoutSpace } from './split-props-6eb4eecb.js';
1
+ export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, k as hypenateProperty, f as isBaseCondition, b as isObject, o as mapObject, m as mergeProps, s as splitProps, t as toHash, n as walkObject, j as withoutSpace } from './split-props-6820d5c1.js';
2
2
 
3
3
  declare function normalizeHTMLProps(props: Record<string, any>): {
4
4
  [k: string]: any;
package/dist/shared.js CHANGED
@@ -65,12 +65,24 @@ function withoutSpace(str) {
65
65
  }
66
66
 
67
67
  // src/hash.ts
68
- function toHash(str) {
69
- let value = 5381;
70
- let len = str.length;
71
- while (len--)
72
- value = value * 33 ^ str.charCodeAt(len);
73
- return (value >>> 0).toString(36);
68
+ function toChar(code) {
69
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
70
+ }
71
+ function toName(code) {
72
+ let name = "";
73
+ let x;
74
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0)
75
+ name = toChar(x % 52) + name;
76
+ return toChar(x % 52) + name;
77
+ }
78
+ function toPhash(h, x) {
79
+ let i = x.length;
80
+ while (i)
81
+ h = h * 33 ^ x.charCodeAt(--i);
82
+ return h;
83
+ }
84
+ function toHash(value) {
85
+ return toName(toPhash(5381, value) >>> 0);
74
86
  }
75
87
 
76
88
  // src/merge-props.ts
package/dist/shared.mjs CHANGED
@@ -26,12 +26,24 @@ function withoutSpace(str) {
26
26
  }
27
27
 
28
28
  // src/hash.ts
29
- function toHash(str) {
30
- let value = 5381;
31
- let len = str.length;
32
- while (len--)
33
- value = value * 33 ^ str.charCodeAt(len);
34
- return (value >>> 0).toString(36);
29
+ function toChar(code) {
30
+ return String.fromCharCode(code + (code > 25 ? 39 : 97));
31
+ }
32
+ function toName(code) {
33
+ let name = "";
34
+ let x;
35
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0)
36
+ name = toChar(x % 52) + name;
37
+ return toChar(x % 52) + name;
38
+ }
39
+ function toPhash(h, x) {
40
+ let i = x.length;
41
+ while (i)
42
+ h = h * 33 ^ x.charCodeAt(--i);
43
+ return h;
44
+ }
45
+ function toHash(value) {
46
+ return toName(toPhash(5381, value) >>> 0);
35
47
  }
36
48
 
37
49
  // src/merge-props.ts
@@ -55,7 +55,7 @@ type WalkObjectOptions = {
55
55
  declare function walkObject<T, K>(target: T, predicate: Predicate<K>, options?: WalkObjectOptions): MappedObject<T, ReturnType<Predicate<K>>>;
56
56
  declare function mapObject(obj: any, fn: (value: any) => any): any;
57
57
 
58
- declare function toHash(str: string): string;
58
+ declare function toHash(value: string): string;
59
59
 
60
60
  declare const hypenateProperty: (property: string) => string;
61
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20230128072108",
3
+ "version": "0.0.0-dev-20230131074332",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",