@pandacss/studio 0.0.0-dev-20230623141647 → 0.0.0-dev-20230625171447
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/package.json +8 -8
- package/styled-system/helpers.mjs +35 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230625171447",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"react": "18.2.0",
|
|
33
33
|
"react-dom": "18.2.0",
|
|
34
34
|
"vite": "4.3.9",
|
|
35
|
-
"@pandacss/types": "0.0.0-dev-
|
|
36
|
-
"@pandacss/config": "0.0.0-dev-
|
|
37
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
38
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
39
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
40
|
-
"@pandacss/node": "0.0.0-dev-
|
|
35
|
+
"@pandacss/types": "0.0.0-dev-20230625171447",
|
|
36
|
+
"@pandacss/config": "0.0.0-dev-20230625171447",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20230625171447",
|
|
38
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230625171447",
|
|
39
|
+
"@pandacss/logger": "0.0.0-dev-20230625171447",
|
|
40
|
+
"@pandacss/node": "0.0.0-dev-20230625171447"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "18.2.12",
|
|
44
44
|
"@types/react-dom": "18.2.5",
|
|
45
45
|
"@vitejs/plugin-react": "4.0.0",
|
|
46
46
|
"execa": "7.1.1",
|
|
47
|
-
"@pandacss/dev": "0.0.0-dev-
|
|
47
|
+
"@pandacss/dev": "0.0.0-dev-20230625171447"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"codegen": "panda",
|
|
@@ -3,6 +3,18 @@ function isObject(value) {
|
|
|
3
3
|
return typeof value === 'object' && value != null && !Array.isArray(value)
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
// src/astish.ts
|
|
7
|
+
var newRule = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g
|
|
8
|
+
var ruleClean = /\/\*[^]*?\*\/|\s\s+|\n/g
|
|
9
|
+
var astish = (val, tree = [{}]) => {
|
|
10
|
+
const block = newRule.exec(val.replace(ruleClean, ''))
|
|
11
|
+
if (!block) return tree[0]
|
|
12
|
+
if (block[4]) tree.shift()
|
|
13
|
+
else if (block[3]) tree.unshift((tree[0][block[3]] = tree[0][block[3]] || {}))
|
|
14
|
+
else tree[0][block[1]] = block[2]
|
|
15
|
+
return astish(val, tree)
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
// src/compact.ts
|
|
7
19
|
function compact(value) {
|
|
8
20
|
return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0))
|
|
@@ -175,6 +187,28 @@ function createMergeCss(context) {
|
|
|
175
187
|
return { mergeCss, assignCss }
|
|
176
188
|
}
|
|
177
189
|
|
|
190
|
+
// src/memo.ts
|
|
191
|
+
var memo = (fn) => {
|
|
192
|
+
const cache = /* @__PURE__ */ new Map()
|
|
193
|
+
const get = (...args) => {
|
|
194
|
+
const key = JSON.stringify(args)
|
|
195
|
+
if (cache.has(key)) {
|
|
196
|
+
return cache.get(key)
|
|
197
|
+
}
|
|
198
|
+
const result = fn(...args)
|
|
199
|
+
cache.set(key, result)
|
|
200
|
+
return result
|
|
201
|
+
}
|
|
202
|
+
return get
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// src/hypenate.ts
|
|
206
|
+
var dashCaseRegex = /[A-Z]/g
|
|
207
|
+
var hypenateProperty = memo((property) => {
|
|
208
|
+
if (property.startsWith('--')) return property
|
|
209
|
+
return property.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`)
|
|
210
|
+
})
|
|
211
|
+
|
|
178
212
|
// src/normalize-html.ts
|
|
179
213
|
var htmlProps = ['htmlSize', 'htmlTranslate', 'htmlWidth', 'htmlHeight']
|
|
180
214
|
function convert(key) {
|
|
@@ -203,29 +237,8 @@ function splitProps(props, ...keys) {
|
|
|
203
237
|
const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key))
|
|
204
238
|
return keys.map(fn).concat(split(dKeys))
|
|
205
239
|
}
|
|
206
|
-
|
|
207
|
-
// src/memo.ts
|
|
208
|
-
var memo = (fn) => {
|
|
209
|
-
const cache = /* @__PURE__ */ new Map()
|
|
210
|
-
const get = (...args) => {
|
|
211
|
-
const key = JSON.stringify(args)
|
|
212
|
-
if (cache.has(key)) {
|
|
213
|
-
return cache.get(key)
|
|
214
|
-
}
|
|
215
|
-
const result = fn(...args)
|
|
216
|
-
cache.set(key, result)
|
|
217
|
-
return result
|
|
218
|
-
}
|
|
219
|
-
return get
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// src/hypenate.ts
|
|
223
|
-
var dashCaseRegex = /[A-Z]/g
|
|
224
|
-
var hypenateProperty = memo((property) => {
|
|
225
|
-
if (property.startsWith('--')) return property
|
|
226
|
-
return property.replace(dashCaseRegex, (match) => `-${match.toLowerCase()}`)
|
|
227
|
-
})
|
|
228
240
|
export {
|
|
241
|
+
astish,
|
|
229
242
|
compact,
|
|
230
243
|
createCss,
|
|
231
244
|
createMergeCss,
|