@pandacss/studio 0.15.1 → 0.15.2
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/astro.config.mjs +1 -1
- package/dist/studio.d.mts +3 -2
- package/dist/studio.d.ts +3 -2
- package/dist/studio.js +10 -4
- package/dist/studio.mjs +10 -4
- package/package.json +8 -8
- package/src/lib/panda.context.ts +3 -5
- package/src/lib/virtual-panda.d.ts +3 -0
- package/styled-system/chunks/src__components__analyzer__category-utilities.css +61 -168
- package/styled-system/chunks/src__components__analyzer__data-combobox.css +69 -114
- package/styled-system/chunks/src__components__analyzer__data-table.css +24 -23
- package/styled-system/chunks/src__components__analyzer__file-details.css +53 -112
- package/styled-system/chunks/src__components__analyzer__report-item-columns.css +20 -19
- package/styled-system/chunks/src__components__analyzer__report-item-link.css +39 -222
- package/styled-system/chunks/src__components__analyzer__section.css +16 -15
- package/styled-system/chunks/src__components__analyzer__text-with-count.css +18 -17
- package/styled-system/chunks/src__components__analyzer__truncated-text.css +10 -9
- package/styled-system/chunks/src__components__analyzer__utility-details.css +71 -178
- package/styled-system/chunks/src__components__color-constrast.css +54 -61
- package/styled-system/chunks/src__components__color-item.css +12 -11
- package/styled-system/chunks/src__components__color-wrapper.css +37 -196
- package/styled-system/chunks/src__components__colors.css +54 -53
- package/styled-system/chunks/src__components__empty-state.css +24 -23
- package/styled-system/chunks/src__components__font-family.css +44 -43
- package/styled-system/chunks/src__components__font-tokens.css +32 -31
- package/styled-system/chunks/src__components__input.css +34 -137
- package/styled-system/chunks/src__components__layer-styles.css +34 -76
- package/styled-system/chunks/src__components__nav-item.css +37 -161
- package/styled-system/chunks/src__components__overview.css +63 -102
- package/styled-system/chunks/src__components__radii.css +26 -25
- package/styled-system/chunks/src__components__semantic-color.css +34 -33
- package/styled-system/chunks/src__components__side-nav-item.css +17 -56
- package/styled-system/chunks/src__components__side-nav.css +26 -25
- package/styled-system/chunks/src__components__sizes.css +22 -21
- package/styled-system/chunks/src__components__text-styles.css +16 -15
- package/styled-system/chunks/src__components__theme-toggle.css +28 -47
- package/styled-system/chunks/src__components__token-analyzer.css +114 -379
- package/styled-system/chunks/src__components__token-content.css +8 -7
- package/styled-system/chunks/src__components__token-group.css +12 -11
- package/styled-system/chunks/src__components__typography-playground.css +32 -31
- package/styled-system/chunks/src__layouts__Sidebar.css +59 -94
- package/styled-system/jsx/aspect-ratio.d.ts +1 -1
- package/styled-system/jsx/bleed.d.ts +1 -1
- package/styled-system/jsx/box.d.ts +1 -1
- package/styled-system/jsx/center.d.ts +1 -1
- package/styled-system/jsx/circle.d.ts +1 -1
- package/styled-system/jsx/container.d.ts +1 -1
- package/styled-system/jsx/divider.d.ts +1 -1
- package/styled-system/jsx/flex.d.ts +1 -1
- package/styled-system/jsx/float.d.ts +1 -1
- package/styled-system/jsx/grid-item.d.ts +1 -1
- package/styled-system/jsx/grid.d.ts +1 -1
- package/styled-system/jsx/hstack.d.ts +1 -1
- package/styled-system/jsx/link-box.d.ts +1 -1
- package/styled-system/jsx/link-overlay.d.ts +1 -1
- package/styled-system/jsx/spacer.d.ts +1 -1
- package/styled-system/jsx/square.d.ts +1 -1
- package/styled-system/jsx/stack.d.ts +1 -1
- package/styled-system/jsx/styled-link.d.ts +1 -1
- package/styled-system/jsx/visually-hidden.d.ts +1 -1
- package/styled-system/jsx/vstack.d.ts +1 -1
- package/styled-system/jsx/wrap.d.ts +1 -1
- package/styled-system/patterns/aspect-ratio.d.ts +2 -2
- package/styled-system/patterns/bleed.d.ts +2 -2
- package/styled-system/patterns/box.d.ts +2 -2
- package/styled-system/patterns/center.d.ts +2 -2
- package/styled-system/patterns/circle.d.ts +2 -2
- package/styled-system/patterns/container.d.ts +2 -2
- package/styled-system/patterns/divider.d.ts +2 -2
- package/styled-system/patterns/flex.d.ts +2 -2
- package/styled-system/patterns/float.d.ts +2 -2
- package/styled-system/patterns/grid-item.d.ts +2 -2
- package/styled-system/patterns/grid.d.ts +2 -2
- package/styled-system/patterns/hstack.d.ts +2 -2
- package/styled-system/patterns/link-box.d.ts +2 -2
- package/styled-system/patterns/link-overlay.d.ts +2 -2
- package/styled-system/patterns/spacer.d.ts +2 -2
- package/styled-system/patterns/square.d.ts +2 -2
- package/styled-system/patterns/stack.d.ts +2 -2
- package/styled-system/patterns/styled-link.d.ts +2 -2
- package/styled-system/patterns/visually-hidden.d.ts +2 -2
- package/styled-system/patterns/vstack.d.ts +2 -2
- package/styled-system/patterns/wrap.d.ts +2 -2
- package/styled-system/styles.css +507 -516
- package/styled-system/tokens/index.css +8 -8
- package/styled-system/types/composition.d.ts +3 -3
- package/styled-system/types/conditions.d.ts +227 -114
- package/styled-system/types/global.d.ts +7 -7
- package/styled-system/types/index.d.ts +6 -4
- package/styled-system/types/jsx.d.ts +3 -3
- package/styled-system/types/parts.d.ts +1 -1
- package/styled-system/types/pattern.d.ts +2 -2
- package/styled-system/types/prop-type.d.ts +2 -2
- package/styled-system/types/recipe.d.ts +9 -6
- package/styled-system/types/style-props.d.ts +1 -1
- package/styled-system/types/system-types.d.ts +12 -6
- package/{virtual-panda.mjs → virtual-panda.ts} +24 -28
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type PandaContext, analyzeTokens, loadConfigAndCreateContext, writeAnalyzeJSON } from '@pandacss/node'
|
|
2
2
|
import { stringify } from 'javascript-stringify'
|
|
3
|
+
import type { AstroIntegration } from 'astro'
|
|
4
|
+
import type { PluginOption } from 'vite'
|
|
3
5
|
|
|
4
6
|
import { dirname, resolve } from 'path'
|
|
5
7
|
import { fileURLToPath } from 'url'
|
|
@@ -11,38 +13,39 @@ const _dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
11
13
|
const analysisDataFilepath = 'src/lib/analysis.json'
|
|
12
14
|
const jsonPath = resolve(_dirname, analysisDataFilepath)
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
16
|
+
function vitePlugin(configPath: string): PluginOption {
|
|
17
|
+
let config: PandaContext['config']
|
|
18
|
+
|
|
19
|
+
async function loadPandaConfig() {
|
|
20
|
+
const ctx = await loadConfigAndCreateContext({ configPath })
|
|
21
|
+
config = ctx.config
|
|
22
|
+
|
|
23
|
+
const result = analyzeTokens(ctx)
|
|
24
|
+
await writeAnalyzeJSON(jsonPath, result, ctx)
|
|
25
|
+
}
|
|
19
26
|
|
|
20
27
|
return {
|
|
21
28
|
name: 'vite:panda',
|
|
22
|
-
async configResolved() {
|
|
23
|
-
const ctx = await loadConfigAndCreateContext()
|
|
24
|
-
config = ctx.config
|
|
25
29
|
|
|
26
|
-
const result = analyzeTokens(ctx)
|
|
27
|
-
await writeAnalyzeJSON(jsonPath, result, ctx)
|
|
28
|
-
},
|
|
29
30
|
async configureServer(server) {
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
server.watcher.add(configPath).on('change', async (path) => {
|
|
32
|
+
if (path !== configPath) return
|
|
33
|
+
await loadPandaConfig()
|
|
32
34
|
const module = server.moduleGraph.getModuleById(resolvedVirtualModuleId)
|
|
33
|
-
if (module)
|
|
34
|
-
await server.reloadModule(module)
|
|
35
|
-
}
|
|
35
|
+
if (module) await server.reloadModule(module)
|
|
36
36
|
})
|
|
37
37
|
},
|
|
38
|
+
|
|
38
39
|
resolveId(id) {
|
|
39
40
|
if (id === virtualModuleId) {
|
|
40
41
|
return resolvedVirtualModuleId
|
|
41
42
|
}
|
|
42
43
|
return null
|
|
43
44
|
},
|
|
45
|
+
|
|
44
46
|
async load(id) {
|
|
45
47
|
if (id === resolvedVirtualModuleId) {
|
|
48
|
+
await loadPandaConfig()
|
|
46
49
|
return {
|
|
47
50
|
code: `export const config = ${stringify(config)}`,
|
|
48
51
|
}
|
|
@@ -51,22 +54,15 @@ function vitePlugin() {
|
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
* @returns import('astro').AstroIntegration
|
|
56
|
-
*/
|
|
57
|
-
const virtualPanda = () => ({
|
|
57
|
+
const virtualPanda = (): AstroIntegration => ({
|
|
58
58
|
name: 'virtual:panda',
|
|
59
59
|
hooks: {
|
|
60
|
-
'astro:config:setup': ({ updateConfig
|
|
61
|
-
const configPath =
|
|
62
|
-
|
|
63
|
-
if (configPath) {
|
|
64
|
-
addWatchFile(configPath)
|
|
65
|
-
}
|
|
60
|
+
'astro:config:setup': ({ updateConfig }) => {
|
|
61
|
+
const configPath = process.env.PUBLIC_CONFIG_PATH
|
|
66
62
|
|
|
67
63
|
updateConfig({
|
|
68
64
|
vite: {
|
|
69
|
-
plugins: [vitePlugin()],
|
|
65
|
+
plugins: [vitePlugin(configPath!)],
|
|
70
66
|
},
|
|
71
67
|
})
|
|
72
68
|
},
|