@pandacss/shared 0.0.0-dev-20240130133424 → 0.0.0-dev-20240201185610
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.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -22
- package/dist/index.mjs +22 -22
- package/dist/{shared-bFj3Wgxk.d.mts → shared-F25j1lrb.d.mts} +1 -0
- package/dist/{shared-bFj3Wgxk.d.ts → shared-F25j1lrb.d.ts} +1 -0
- package/dist/shared.d.mts +1 -1
- package/dist/shared.d.ts +1 -1
- package/dist/shared.js +28 -28
- package/dist/shared.mjs +28 -28
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-
|
|
2
|
-
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-
|
|
1
|
+
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-F25j1lrb.mjs';
|
|
2
|
+
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-F25j1lrb.mjs';
|
|
3
3
|
export { astish } from './astish.mjs';
|
|
4
4
|
|
|
5
5
|
declare const getArbitraryValue: (_value: string) => string;
|
|
@@ -105,4 +105,4 @@ declare function traverse(obj: any, callback: CallbackFn, options?: {
|
|
|
105
105
|
|
|
106
106
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
107
107
|
|
|
108
|
-
export { CreateCssContext, type CssVar, type CssVarOptions, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
|
108
|
+
export { CreateCssContext, type CssVar, type CssVarOptions, type MapToRecord, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-
|
|
2
|
-
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-
|
|
1
|
+
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-F25j1lrb.js';
|
|
2
|
+
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-F25j1lrb.js';
|
|
3
3
|
export { astish } from './astish.js';
|
|
4
4
|
|
|
5
5
|
declare const getArbitraryValue: (_value: string) => string;
|
|
@@ -105,4 +105,4 @@ declare function traverse(obj: any, callback: CallbackFn, options?: {
|
|
|
105
105
|
|
|
106
106
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
107
107
|
|
|
108
|
-
export { CreateCssContext, type CssVar, type CssVarOptions, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
|
108
|
+
export { CreateCssContext, type CssVar, type CssVarOptions, type MapToRecord, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
package/dist/index.js
CHANGED
|
@@ -202,6 +202,27 @@ function filterBaseConditions(c) {
|
|
|
202
202
|
return c.slice().filter((v) => !isBaseCondition(v));
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
// src/hash.ts
|
|
206
|
+
function toChar(code) {
|
|
207
|
+
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
208
|
+
}
|
|
209
|
+
function toName(code) {
|
|
210
|
+
let name = "";
|
|
211
|
+
let x;
|
|
212
|
+
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
213
|
+
name = toChar(x % 52) + name;
|
|
214
|
+
return toChar(x % 52) + name;
|
|
215
|
+
}
|
|
216
|
+
function toPhash(h, x) {
|
|
217
|
+
let i = x.length;
|
|
218
|
+
while (i)
|
|
219
|
+
h = h * 33 ^ x.charCodeAt(--i);
|
|
220
|
+
return h;
|
|
221
|
+
}
|
|
222
|
+
function toHash(value) {
|
|
223
|
+
return toName(toPhash(5381, value) >>> 0);
|
|
224
|
+
}
|
|
225
|
+
|
|
205
226
|
// src/important.ts
|
|
206
227
|
var importantRegex = /\s*!(important)?/i;
|
|
207
228
|
function isImportant(value) {
|
|
@@ -236,27 +257,6 @@ function markImportant(obj) {
|
|
|
236
257
|
return result;
|
|
237
258
|
}
|
|
238
259
|
|
|
239
|
-
// src/hash.ts
|
|
240
|
-
function toChar(code) {
|
|
241
|
-
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
242
|
-
}
|
|
243
|
-
function toName(code) {
|
|
244
|
-
let name = "";
|
|
245
|
-
let x;
|
|
246
|
-
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
247
|
-
name = toChar(x % 52) + name;
|
|
248
|
-
return toChar(x % 52) + name;
|
|
249
|
-
}
|
|
250
|
-
function toPhash(h, x) {
|
|
251
|
-
let i = x.length;
|
|
252
|
-
while (i)
|
|
253
|
-
h = h * 33 ^ x.charCodeAt(--i);
|
|
254
|
-
return h;
|
|
255
|
-
}
|
|
256
|
-
function toHash(value) {
|
|
257
|
-
return toName(toPhash(5381, value) >>> 0);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
260
|
// src/merge-props.ts
|
|
261
261
|
function mergeProps(...sources) {
|
|
262
262
|
const objects = sources.filter(Boolean);
|
|
@@ -353,7 +353,7 @@ function createCss(context) {
|
|
|
353
353
|
let result;
|
|
354
354
|
if (hash) {
|
|
355
355
|
const baseArray = [...conds.finalize(conditions), className];
|
|
356
|
-
result = formatClassName(toHash(baseArray
|
|
356
|
+
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
357
357
|
} else {
|
|
358
358
|
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
359
359
|
result = baseArray.join(":");
|
package/dist/index.mjs
CHANGED
|
@@ -115,6 +115,27 @@ function filterBaseConditions(c) {
|
|
|
115
115
|
return c.slice().filter((v) => !isBaseCondition(v));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
// src/hash.ts
|
|
119
|
+
function toChar(code) {
|
|
120
|
+
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
121
|
+
}
|
|
122
|
+
function toName(code) {
|
|
123
|
+
let name = "";
|
|
124
|
+
let x;
|
|
125
|
+
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
126
|
+
name = toChar(x % 52) + name;
|
|
127
|
+
return toChar(x % 52) + name;
|
|
128
|
+
}
|
|
129
|
+
function toPhash(h, x) {
|
|
130
|
+
let i = x.length;
|
|
131
|
+
while (i)
|
|
132
|
+
h = h * 33 ^ x.charCodeAt(--i);
|
|
133
|
+
return h;
|
|
134
|
+
}
|
|
135
|
+
function toHash(value) {
|
|
136
|
+
return toName(toPhash(5381, value) >>> 0);
|
|
137
|
+
}
|
|
138
|
+
|
|
118
139
|
// src/important.ts
|
|
119
140
|
var importantRegex = /\s*!(important)?/i;
|
|
120
141
|
function isImportant(value) {
|
|
@@ -149,27 +170,6 @@ function markImportant(obj) {
|
|
|
149
170
|
return result;
|
|
150
171
|
}
|
|
151
172
|
|
|
152
|
-
// src/hash.ts
|
|
153
|
-
function toChar(code) {
|
|
154
|
-
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
155
|
-
}
|
|
156
|
-
function toName(code) {
|
|
157
|
-
let name = "";
|
|
158
|
-
let x;
|
|
159
|
-
for (x = Math.abs(code); x > 52; x = x / 52 | 0)
|
|
160
|
-
name = toChar(x % 52) + name;
|
|
161
|
-
return toChar(x % 52) + name;
|
|
162
|
-
}
|
|
163
|
-
function toPhash(h, x) {
|
|
164
|
-
let i = x.length;
|
|
165
|
-
while (i)
|
|
166
|
-
h = h * 33 ^ x.charCodeAt(--i);
|
|
167
|
-
return h;
|
|
168
|
-
}
|
|
169
|
-
function toHash(value) {
|
|
170
|
-
return toName(toPhash(5381, value) >>> 0);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
173
|
// src/merge-props.ts
|
|
174
174
|
function mergeProps(...sources) {
|
|
175
175
|
const objects = sources.filter(Boolean);
|
|
@@ -266,7 +266,7 @@ function createCss(context) {
|
|
|
266
266
|
let result;
|
|
267
267
|
if (hash) {
|
|
268
268
|
const baseArray = [...conds.finalize(conditions), className];
|
|
269
|
-
result = formatClassName(toHash(baseArray
|
|
269
|
+
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
270
270
|
} else {
|
|
271
271
|
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
272
272
|
result = baseArray.join(":");
|
package/dist/shared.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-
|
|
1
|
+
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-F25j1lrb.mjs';
|
package/dist/shared.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-
|
|
1
|
+
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-F25j1lrb.js';
|
package/dist/shared.js
CHANGED
|
@@ -58,18 +58,6 @@ function filterBaseConditions(c) {
|
|
|
58
58
|
return c.slice().filter((v) => !isBaseCondition(v));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// src/important.ts
|
|
62
|
-
var importantRegex = /\s*!(important)?/i;
|
|
63
|
-
function isImportant(value) {
|
|
64
|
-
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
65
|
-
}
|
|
66
|
-
function withoutImportant(value) {
|
|
67
|
-
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
68
|
-
}
|
|
69
|
-
function withoutSpace(str) {
|
|
70
|
-
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
61
|
// src/hash.ts
|
|
74
62
|
function toChar(code) {
|
|
75
63
|
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
@@ -91,21 +79,16 @@ function toHash(value) {
|
|
|
91
79
|
return toName(toPhash(5381, value) >>> 0);
|
|
92
80
|
}
|
|
93
81
|
|
|
94
|
-
// src/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
prev[key] = value;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
return prev;
|
|
108
|
-
}, {});
|
|
82
|
+
// src/important.ts
|
|
83
|
+
var importantRegex = /\s*!(important)?/i;
|
|
84
|
+
function isImportant(value) {
|
|
85
|
+
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
86
|
+
}
|
|
87
|
+
function withoutImportant(value) {
|
|
88
|
+
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
89
|
+
}
|
|
90
|
+
function withoutSpace(str) {
|
|
91
|
+
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
109
92
|
}
|
|
110
93
|
|
|
111
94
|
// src/memo.ts
|
|
@@ -123,6 +106,23 @@ var memo = (fn) => {
|
|
|
123
106
|
return get;
|
|
124
107
|
};
|
|
125
108
|
|
|
109
|
+
// src/merge-props.ts
|
|
110
|
+
function mergeProps(...sources) {
|
|
111
|
+
const objects = sources.filter(Boolean);
|
|
112
|
+
return objects.reduce((prev, obj) => {
|
|
113
|
+
Object.keys(obj).forEach((key) => {
|
|
114
|
+
const prevValue = prev[key];
|
|
115
|
+
const value = obj[key];
|
|
116
|
+
if (isObject(prevValue) && isObject(value)) {
|
|
117
|
+
prev[key] = mergeProps(prevValue, value);
|
|
118
|
+
} else {
|
|
119
|
+
prev[key] = value;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return prev;
|
|
123
|
+
}, {});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
126
|
// src/walk-object.ts
|
|
127
127
|
var isNotNullish = (element) => element != null;
|
|
128
128
|
function walkObject(target, predicate, options = {}) {
|
|
@@ -202,7 +202,7 @@ function createCss(context) {
|
|
|
202
202
|
let result;
|
|
203
203
|
if (hash) {
|
|
204
204
|
const baseArray = [...conds.finalize(conditions), className];
|
|
205
|
-
result = formatClassName(toHash(baseArray
|
|
205
|
+
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
206
206
|
} else {
|
|
207
207
|
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
208
208
|
result = baseArray.join(":");
|
package/dist/shared.mjs
CHANGED
|
@@ -14,18 +14,6 @@ function filterBaseConditions(c) {
|
|
|
14
14
|
return c.slice().filter((v) => !isBaseCondition(v));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// src/important.ts
|
|
18
|
-
var importantRegex = /\s*!(important)?/i;
|
|
19
|
-
function isImportant(value) {
|
|
20
|
-
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
21
|
-
}
|
|
22
|
-
function withoutImportant(value) {
|
|
23
|
-
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
24
|
-
}
|
|
25
|
-
function withoutSpace(str) {
|
|
26
|
-
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
17
|
// src/hash.ts
|
|
30
18
|
function toChar(code) {
|
|
31
19
|
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
@@ -47,21 +35,16 @@ function toHash(value) {
|
|
|
47
35
|
return toName(toPhash(5381, value) >>> 0);
|
|
48
36
|
}
|
|
49
37
|
|
|
50
|
-
// src/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
prev[key] = value;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
return prev;
|
|
64
|
-
}, {});
|
|
38
|
+
// src/important.ts
|
|
39
|
+
var importantRegex = /\s*!(important)?/i;
|
|
40
|
+
function isImportant(value) {
|
|
41
|
+
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
42
|
+
}
|
|
43
|
+
function withoutImportant(value) {
|
|
44
|
+
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
45
|
+
}
|
|
46
|
+
function withoutSpace(str) {
|
|
47
|
+
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
65
48
|
}
|
|
66
49
|
|
|
67
50
|
// src/memo.ts
|
|
@@ -79,6 +62,23 @@ var memo = (fn) => {
|
|
|
79
62
|
return get;
|
|
80
63
|
};
|
|
81
64
|
|
|
65
|
+
// src/merge-props.ts
|
|
66
|
+
function mergeProps(...sources) {
|
|
67
|
+
const objects = sources.filter(Boolean);
|
|
68
|
+
return objects.reduce((prev, obj) => {
|
|
69
|
+
Object.keys(obj).forEach((key) => {
|
|
70
|
+
const prevValue = prev[key];
|
|
71
|
+
const value = obj[key];
|
|
72
|
+
if (isObject(prevValue) && isObject(value)) {
|
|
73
|
+
prev[key] = mergeProps(prevValue, value);
|
|
74
|
+
} else {
|
|
75
|
+
prev[key] = value;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return prev;
|
|
79
|
+
}, {});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
82
|
// src/walk-object.ts
|
|
83
83
|
var isNotNullish = (element) => element != null;
|
|
84
84
|
function walkObject(target, predicate, options = {}) {
|
|
@@ -158,7 +158,7 @@ function createCss(context) {
|
|
|
158
158
|
let result;
|
|
159
159
|
if (hash) {
|
|
160
160
|
const baseArray = [...conds.finalize(conditions), className];
|
|
161
|
-
result = formatClassName(toHash(baseArray
|
|
161
|
+
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
162
162
|
} else {
|
|
163
163
|
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
164
164
|
result = baseArray.join(":");
|