@pandacss/shared 0.0.0-dev-20240105182122 → 0.0.0-dev-20240106191137

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.js CHANGED
@@ -80,7 +80,21 @@ var getArbitraryValue = (value) => {
80
80
  if (!value)
81
81
  return value;
82
82
  if (value[0] === "[" && value[value.length - 1] === "]") {
83
- return value.slice(1, -1);
83
+ const innerValue = value.slice(1, -1);
84
+ let bracketCount = 0;
85
+ for (let i = 0; i < innerValue.length; i++) {
86
+ if (innerValue[i] === "[") {
87
+ bracketCount++;
88
+ } else if (innerValue[i] === "]") {
89
+ if (bracketCount === 0) {
90
+ return value;
91
+ }
92
+ bracketCount--;
93
+ }
94
+ }
95
+ if (bracketCount === 0) {
96
+ return innerValue;
97
+ }
84
98
  }
85
99
  return value;
86
100
  };
package/dist/index.mjs CHANGED
@@ -3,7 +3,21 @@ var getArbitraryValue = (value) => {
3
3
  if (!value)
4
4
  return value;
5
5
  if (value[0] === "[" && value[value.length - 1] === "]") {
6
- return value.slice(1, -1);
6
+ const innerValue = value.slice(1, -1);
7
+ let bracketCount = 0;
8
+ for (let i = 0; i < innerValue.length; i++) {
9
+ if (innerValue[i] === "[") {
10
+ bracketCount++;
11
+ } else if (innerValue[i] === "]") {
12
+ if (bracketCount === 0) {
13
+ return value;
14
+ }
15
+ bracketCount--;
16
+ }
17
+ }
18
+ if (bracketCount === 0) {
19
+ return innerValue;
20
+ }
7
21
  }
8
22
  return value;
9
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/shared",
3
- "version": "0.0.0-dev-20240105182122",
3
+ "version": "0.0.0-dev-20240106191137",
4
4
  "description": "Shared utilities for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",