@pandacss/shared 0.16.0 → 0.17.0

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-b874b673.js';
2
- export { p as WalkObjectOptions, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, q as walkObject, w as withoutImportant, j as withoutSpace } from './shared-b874b673.js';
1
+ import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-e7d6e947.js';
2
+ export { p as WalkObjectOptions, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, u as uniq, q as walkObject, w as withoutImportant, j as withoutSpace } from './shared-e7d6e947.js';
3
3
  export { astish } from './astish.mjs';
4
4
 
5
5
  type Operand = string | number | {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-b874b673.js';
2
- export { p as WalkObjectOptions, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, q as walkObject, w as withoutImportant, j as withoutSpace } from './shared-b874b673.js';
1
+ import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-e7d6e947.js';
2
+ export { p as WalkObjectOptions, e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, a as isFunction, h as isImportant, b as isObject, i as isString, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, u as uniq, q as walkObject, w as withoutImportant, j as withoutSpace } from './shared-e7d6e947.js';
3
3
  export { astish } from './astish.js';
4
4
 
5
5
  type Operand = string | number | {
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ __export(src_exports, {
59
59
  toRem: () => toRem,
60
60
  uncapitalize: () => uncapitalize,
61
61
  unionType: () => unionType,
62
+ uniq: () => uniq,
62
63
  walkObject: () => walkObject,
63
64
  withoutImportant: () => withoutImportant,
64
65
  withoutSpace: () => withoutSpace
@@ -186,8 +187,9 @@ function toHash(value) {
186
187
 
187
188
  // src/merge-props.ts
188
189
  function mergeProps(...sources) {
190
+ const __sources = sources.filter(Boolean);
189
191
  const result = {};
190
- for (const source of sources) {
192
+ for (const source of __sources) {
191
193
  for (const [key, value] of Object.entries(source)) {
192
194
  if (isObject(value)) {
193
195
  result[key] = mergeProps(result[key] || {}, value);
@@ -554,6 +556,9 @@ function mapToJson(map) {
554
556
  function unionType(values) {
555
557
  return Array.from(values).map((value) => JSON.stringify(value)).join(" | ");
556
558
  }
559
+
560
+ // src/uniq.ts
561
+ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(/* @__PURE__ */ new Set([...acc, ...item])), []);
557
562
  // Annotate the CommonJS export names for ESM import in node:
558
563
  0 && (module.exports = {
559
564
  astish,
@@ -595,6 +600,7 @@ function unionType(values) {
595
600
  toRem,
596
601
  uncapitalize,
597
602
  unionType,
603
+ uniq,
598
604
  walkObject,
599
605
  withoutImportant,
600
606
  withoutSpace
package/dist/index.mjs CHANGED
@@ -119,8 +119,9 @@ function toHash(value) {
119
119
 
120
120
  // src/merge-props.ts
121
121
  function mergeProps(...sources) {
122
+ const __sources = sources.filter(Boolean);
122
123
  const result = {};
123
- for (const source of sources) {
124
+ for (const source of __sources) {
124
125
  for (const [key, value] of Object.entries(source)) {
125
126
  if (isObject(value)) {
126
127
  result[key] = mergeProps(result[key] || {}, value);
@@ -487,6 +488,9 @@ function mapToJson(map) {
487
488
  function unionType(values) {
488
489
  return Array.from(values).map((value) => JSON.stringify(value)).join(" | ");
489
490
  }
491
+
492
+ // src/uniq.ts
493
+ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(/* @__PURE__ */ new Set([...acc, ...item])), []);
490
494
  export {
491
495
  astish,
492
496
  calc,
@@ -527,6 +531,7 @@ export {
527
531
  toRem,
528
532
  uncapitalize,
529
533
  unionType,
534
+ uniq,
530
535
  walkObject,
531
536
  withoutImportant,
532
537
  withoutSpace
@@ -75,4 +75,6 @@ type PredicateFn = (key: string) => boolean;
75
75
  type Key = PredicateFn | string[];
76
76
  declare function splitProps(props: Dict, ...keys: Key[]): Dict[];
77
77
 
78
- export { CreateCssContext as C, MappedObject as M, WalkObjectStopFn as W, isFunction as a, isObject as b, createCss as c, createMergeCss as d, compact as e, isBaseCondition as f, filterBaseConditions as g, isImportant as h, isString as i, withoutSpace as j, hypenateProperty as k, mergeProps as l, memo as m, getSlotRecipes as n, getSlotCompoundVariant as o, WalkObjectOptions as p, walkObject as q, mapObject as r, splitProps as s, toHash as t, withoutImportant as w };
78
+ declare const uniq: <T>(...items: T[][]) => T[];
79
+
80
+ export { CreateCssContext as C, MappedObject as M, WalkObjectStopFn as W, isFunction as a, isObject as b, createCss as c, createMergeCss as d, compact as e, isBaseCondition as f, filterBaseConditions as g, isImportant as h, isString as i, withoutSpace as j, hypenateProperty as k, mergeProps as l, memo as m, getSlotRecipes as n, getSlotCompoundVariant as o, WalkObjectOptions as p, walkObject as q, mapObject as r, splitProps as s, toHash as t, uniq as u, withoutImportant as w };
package/dist/shared.d.mts CHANGED
@@ -1 +1 @@
1
- export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, b as isObject, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, q as walkObject, j as withoutSpace } from './shared-b874b673.js';
1
+ export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, b as isObject, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, u as uniq, q as walkObject, j as withoutSpace } from './shared-e7d6e947.js';
package/dist/shared.d.ts CHANGED
@@ -1 +1 @@
1
- export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, b as isObject, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, q as walkObject, j as withoutSpace } from './shared-b874b673.js';
1
+ export { e as compact, c as createCss, d as createMergeCss, g as filterBaseConditions, o as getSlotCompoundVariant, n as getSlotRecipes, k as hypenateProperty, f as isBaseCondition, b as isObject, r as mapObject, m as memo, l as mergeProps, s as splitProps, t as toHash, u as uniq, q as walkObject, j as withoutSpace } from './shared-e7d6e947.js';
package/dist/shared.js CHANGED
@@ -34,6 +34,7 @@ __export(shared_exports, {
34
34
  mergeProps: () => mergeProps,
35
35
  splitProps: () => splitProps,
36
36
  toHash: () => toHash,
37
+ uniq: () => uniq,
37
38
  walkObject: () => walkObject,
38
39
  withoutSpace: () => withoutSpace
39
40
  });
@@ -90,8 +91,9 @@ function toHash(value) {
90
91
 
91
92
  // src/merge-props.ts
92
93
  function mergeProps(...sources) {
94
+ const __sources = sources.filter(Boolean);
93
95
  const result = {};
94
- for (const source of sources) {
96
+ for (const source of __sources) {
95
97
  for (const [key, value] of Object.entries(source)) {
96
98
  if (isObject(value)) {
97
99
  result[key] = mergeProps(result[key] || {}, value);
@@ -291,6 +293,9 @@ function splitProps(props, ...keys) {
291
293
  const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
292
294
  return keys.map(fn).concat(split(dKeys));
293
295
  }
296
+
297
+ // src/uniq.ts
298
+ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(/* @__PURE__ */ new Set([...acc, ...item])), []);
294
299
  // Annotate the CommonJS export names for ESM import in node:
295
300
  0 && (module.exports = {
296
301
  compact,
@@ -307,6 +312,7 @@ function splitProps(props, ...keys) {
307
312
  mergeProps,
308
313
  splitProps,
309
314
  toHash,
315
+ uniq,
310
316
  walkObject,
311
317
  withoutSpace
312
318
  });
package/dist/shared.mjs CHANGED
@@ -49,8 +49,9 @@ function toHash(value) {
49
49
 
50
50
  // src/merge-props.ts
51
51
  function mergeProps(...sources) {
52
+ const __sources = sources.filter(Boolean);
52
53
  const result = {};
53
- for (const source of sources) {
54
+ for (const source of __sources) {
54
55
  for (const [key, value] of Object.entries(source)) {
55
56
  if (isObject(value)) {
56
57
  result[key] = mergeProps(result[key] || {}, value);
@@ -250,6 +251,9 @@ function splitProps(props, ...keys) {
250
251
  const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
251
252
  return keys.map(fn).concat(split(dKeys));
252
253
  }
254
+
255
+ // src/uniq.ts
256
+ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(/* @__PURE__ */ new Set([...acc, ...item])), []);
253
257
  export {
254
258
  compact,
255
259
  createCss,
@@ -265,6 +269,7 @@ export {
265
269
  mergeProps,
266
270
  splitProps,
267
271
  toHash,
272
+ uniq,
268
273
  walkObject,
269
274
  withoutSpace
270
275
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",