slot-variants 1.6.0 → 1.6.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.cjs CHANGED
@@ -35,6 +35,13 @@ var append = (result, value) => {
35
35
  }
36
36
  return `${result} ${value}`;
37
37
  };
38
+ var appendArray = (result, array) => {
39
+ const flattened = cn(...array);
40
+ if (flattened) {
41
+ return append(result, flattened);
42
+ }
43
+ return result;
44
+ };
38
45
  var appendRecord = (result, record) => {
39
46
  let current = result;
40
47
  for (const key of keys(record)) {
@@ -55,7 +62,7 @@ function cn(...args) {
55
62
  continue;
56
63
  }
57
64
  if (isArray(item)) {
58
- result = append(result, cn(...item));
65
+ result = appendArray(result, item);
59
66
  continue;
60
67
  }
61
68
  if (typeof item === "object") {
package/dist/index.js CHANGED
@@ -7,6 +7,13 @@ var append = (result, value) => {
7
7
  }
8
8
  return `${result} ${value}`;
9
9
  };
10
+ var appendArray = (result, array) => {
11
+ const flattened = cn(...array);
12
+ if (flattened) {
13
+ return append(result, flattened);
14
+ }
15
+ return result;
16
+ };
10
17
  var appendRecord = (result, record) => {
11
18
  let current = result;
12
19
  for (const key of keys(record)) {
@@ -27,7 +34,7 @@ function cn(...args) {
27
34
  continue;
28
35
  }
29
36
  if (isArray(item)) {
30
- result = append(result, cn(...item));
37
+ result = appendArray(result, item);
31
38
  continue;
32
39
  }
33
40
  if (typeof item === "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slot-variants",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Type-safe class name variants with slots",
5
5
  "type": "module",
6
6
  "exports": {