@pandacss/shared 0.19.0 → 0.20.1
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +16 -0
- package/dist/index.mjs +14 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,9 @@ declare function normalizeStyleObject(styles: Record<string, any>, context: Norm
|
|
|
41
41
|
|
|
42
42
|
declare const createRegex: (item: Array<string | RegExp>) => RegExp;
|
|
43
43
|
|
|
44
|
+
declare const stringifyJson: (config: Record<string, any>) => string;
|
|
45
|
+
declare const parseJson: (config: string) => any;
|
|
46
|
+
|
|
44
47
|
declare function splitBy(value: string, separator?: string): any[];
|
|
45
48
|
declare function splitDotPath(path: string): string[];
|
|
46
49
|
declare function getNegativePath(path: string[]): string[];
|
|
@@ -53,4 +56,4 @@ declare function mapToJson<T extends Map<string, any>>(map: T): MapToRecord<T>;
|
|
|
53
56
|
|
|
54
57
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
55
58
|
|
|
56
|
-
export { CreateCssContext, CssVar, CssVarOptions, MappedObject, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, esc, flatten, getDotPath, getNegativePath, getUnit, mapToJson, normalizeShorthand, normalizeStyleObject, splitBy, splitDotPath, toEm, toPx, toRem, uncapitalize, unionType };
|
|
59
|
+
export { CreateCssContext, CssVar, CssVarOptions, MappedObject, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, esc, flatten, getDotPath, getNegativePath, getUnit, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, uncapitalize, unionType };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ declare function normalizeStyleObject(styles: Record<string, any>, context: Norm
|
|
|
41
41
|
|
|
42
42
|
declare const createRegex: (item: Array<string | RegExp>) => RegExp;
|
|
43
43
|
|
|
44
|
+
declare const stringifyJson: (config: Record<string, any>) => string;
|
|
45
|
+
declare const parseJson: (config: string) => any;
|
|
46
|
+
|
|
44
47
|
declare function splitBy(value: string, separator?: string): any[];
|
|
45
48
|
declare function splitDotPath(path: string): string[];
|
|
46
49
|
declare function getNegativePath(path: string[]): string[];
|
|
@@ -53,4 +56,4 @@ declare function mapToJson<T extends Map<string, any>>(map: T): MapToRecord<T>;
|
|
|
53
56
|
|
|
54
57
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
55
58
|
|
|
56
|
-
export { CreateCssContext, CssVar, CssVarOptions, MappedObject, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, esc, flatten, getDotPath, getNegativePath, getUnit, mapToJson, normalizeShorthand, normalizeStyleObject, splitBy, splitDotPath, toEm, toPx, toRem, uncapitalize, unionType };
|
|
59
|
+
export { CreateCssContext, CssVar, CssVarOptions, MappedObject, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, esc, flatten, getDotPath, getNegativePath, getUnit, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, uncapitalize, unionType };
|
package/dist/index.js
CHANGED
|
@@ -50,9 +50,11 @@ __export(src_exports, {
|
|
|
50
50
|
mergeProps: () => mergeProps,
|
|
51
51
|
normalizeShorthand: () => normalizeShorthand,
|
|
52
52
|
normalizeStyleObject: () => normalizeStyleObject,
|
|
53
|
+
parseJson: () => parseJson,
|
|
53
54
|
splitBy: () => splitBy,
|
|
54
55
|
splitDotPath: () => splitDotPath,
|
|
55
56
|
splitProps: () => splitProps,
|
|
57
|
+
stringifyJson: () => stringifyJson,
|
|
56
58
|
toEm: () => toEm,
|
|
57
59
|
toHash: () => toHash,
|
|
58
60
|
toPx: () => toPx,
|
|
@@ -452,6 +454,18 @@ var createRegex = (item) => {
|
|
|
452
454
|
return new RegExp(regex2);
|
|
453
455
|
};
|
|
454
456
|
|
|
457
|
+
// src/serialize.ts
|
|
458
|
+
var stringifyJson = (config) => {
|
|
459
|
+
return JSON.stringify(config, (_key, value) => {
|
|
460
|
+
if (typeof value === "function")
|
|
461
|
+
return value.toString();
|
|
462
|
+
return value;
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
var parseJson = (config) => {
|
|
466
|
+
return JSON.parse(config);
|
|
467
|
+
};
|
|
468
|
+
|
|
455
469
|
// src/slot.ts
|
|
456
470
|
var getSlotRecipes = (recipe = {}) => {
|
|
457
471
|
const init = (slot) => ({
|
|
@@ -597,9 +611,11 @@ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(
|
|
|
597
611
|
mergeProps,
|
|
598
612
|
normalizeShorthand,
|
|
599
613
|
normalizeStyleObject,
|
|
614
|
+
parseJson,
|
|
600
615
|
splitBy,
|
|
601
616
|
splitDotPath,
|
|
602
617
|
splitProps,
|
|
618
|
+
stringifyJson,
|
|
603
619
|
toEm,
|
|
604
620
|
toHash,
|
|
605
621
|
toPx,
|
package/dist/index.mjs
CHANGED
|
@@ -384,6 +384,18 @@ var createRegex = (item) => {
|
|
|
384
384
|
return new RegExp(regex2);
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
+
// src/serialize.ts
|
|
388
|
+
var stringifyJson = (config) => {
|
|
389
|
+
return JSON.stringify(config, (_key, value) => {
|
|
390
|
+
if (typeof value === "function")
|
|
391
|
+
return value.toString();
|
|
392
|
+
return value;
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
var parseJson = (config) => {
|
|
396
|
+
return JSON.parse(config);
|
|
397
|
+
};
|
|
398
|
+
|
|
387
399
|
// src/slot.ts
|
|
388
400
|
var getSlotRecipes = (recipe = {}) => {
|
|
389
401
|
const init = (slot) => ({
|
|
@@ -528,9 +540,11 @@ export {
|
|
|
528
540
|
mergeProps,
|
|
529
541
|
normalizeShorthand,
|
|
530
542
|
normalizeStyleObject,
|
|
543
|
+
parseJson,
|
|
531
544
|
splitBy,
|
|
532
545
|
splitDotPath,
|
|
533
546
|
splitProps,
|
|
547
|
+
stringifyJson,
|
|
534
548
|
toEm,
|
|
535
549
|
toHash,
|
|
536
550
|
toPx,
|