@pandacss/studio 0.15.0 → 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.
Files changed (101) hide show
  1. package/astro.config.mjs +1 -1
  2. package/dist/studio.d.mts +3 -2
  3. package/dist/studio.d.ts +3 -2
  4. package/dist/studio.js +12 -6
  5. package/dist/studio.mjs +12 -6
  6. package/package.json +9 -9
  7. package/src/lib/panda.context.ts +3 -5
  8. package/src/lib/virtual-panda.d.ts +3 -0
  9. package/styled-system/chunks/src__components__analyzer__category-utilities.css +61 -168
  10. package/styled-system/chunks/src__components__analyzer__data-combobox.css +69 -114
  11. package/styled-system/chunks/src__components__analyzer__data-table.css +24 -23
  12. package/styled-system/chunks/src__components__analyzer__file-details.css +53 -112
  13. package/styled-system/chunks/src__components__analyzer__report-item-columns.css +20 -19
  14. package/styled-system/chunks/src__components__analyzer__report-item-link.css +39 -222
  15. package/styled-system/chunks/src__components__analyzer__section.css +16 -15
  16. package/styled-system/chunks/src__components__analyzer__text-with-count.css +18 -17
  17. package/styled-system/chunks/src__components__analyzer__truncated-text.css +10 -9
  18. package/styled-system/chunks/src__components__analyzer__utility-details.css +71 -178
  19. package/styled-system/chunks/src__components__color-constrast.css +54 -61
  20. package/styled-system/chunks/src__components__color-item.css +12 -11
  21. package/styled-system/chunks/src__components__color-wrapper.css +37 -196
  22. package/styled-system/chunks/src__components__colors.css +54 -53
  23. package/styled-system/chunks/src__components__empty-state.css +24 -23
  24. package/styled-system/chunks/src__components__font-family.css +44 -43
  25. package/styled-system/chunks/src__components__font-tokens.css +32 -31
  26. package/styled-system/chunks/src__components__input.css +34 -137
  27. package/styled-system/chunks/src__components__layer-styles.css +34 -76
  28. package/styled-system/chunks/src__components__nav-item.css +37 -161
  29. package/styled-system/chunks/src__components__overview.css +63 -102
  30. package/styled-system/chunks/src__components__radii.css +26 -25
  31. package/styled-system/chunks/src__components__semantic-color.css +34 -33
  32. package/styled-system/chunks/src__components__side-nav-item.css +17 -56
  33. package/styled-system/chunks/src__components__side-nav.css +26 -25
  34. package/styled-system/chunks/src__components__sizes.css +22 -21
  35. package/styled-system/chunks/src__components__text-styles.css +16 -15
  36. package/styled-system/chunks/src__components__theme-toggle.css +28 -47
  37. package/styled-system/chunks/src__components__token-analyzer.css +114 -379
  38. package/styled-system/chunks/src__components__token-content.css +8 -7
  39. package/styled-system/chunks/src__components__token-group.css +12 -11
  40. package/styled-system/chunks/src__components__typography-playground.css +32 -31
  41. package/styled-system/chunks/src__layouts__Sidebar.css +59 -94
  42. package/styled-system/helpers.mjs +3 -2
  43. package/styled-system/jsx/aspect-ratio.d.ts +1 -1
  44. package/styled-system/jsx/bleed.d.ts +1 -1
  45. package/styled-system/jsx/box.d.ts +1 -1
  46. package/styled-system/jsx/center.d.ts +1 -1
  47. package/styled-system/jsx/circle.d.ts +1 -1
  48. package/styled-system/jsx/container.d.ts +1 -1
  49. package/styled-system/jsx/divider.d.ts +1 -1
  50. package/styled-system/jsx/factory.mjs +2 -1
  51. package/styled-system/jsx/flex.d.ts +1 -1
  52. package/styled-system/jsx/float.d.ts +1 -1
  53. package/styled-system/jsx/grid-item.d.ts +1 -1
  54. package/styled-system/jsx/grid.d.ts +1 -1
  55. package/styled-system/jsx/hstack.d.ts +1 -1
  56. package/styled-system/jsx/link-box.d.ts +1 -1
  57. package/styled-system/jsx/link-overlay.d.ts +1 -1
  58. package/styled-system/jsx/spacer.d.ts +1 -1
  59. package/styled-system/jsx/square.d.ts +1 -1
  60. package/styled-system/jsx/stack.d.ts +1 -1
  61. package/styled-system/jsx/styled-link.d.ts +1 -1
  62. package/styled-system/jsx/visually-hidden.d.ts +1 -1
  63. package/styled-system/jsx/vstack.d.ts +1 -1
  64. package/styled-system/jsx/wrap.d.ts +1 -1
  65. package/styled-system/patterns/aspect-ratio.d.ts +2 -2
  66. package/styled-system/patterns/bleed.d.ts +2 -2
  67. package/styled-system/patterns/box.d.ts +2 -2
  68. package/styled-system/patterns/center.d.ts +2 -2
  69. package/styled-system/patterns/circle.d.ts +2 -2
  70. package/styled-system/patterns/container.d.ts +2 -2
  71. package/styled-system/patterns/divider.d.ts +2 -2
  72. package/styled-system/patterns/flex.d.ts +2 -2
  73. package/styled-system/patterns/float.d.ts +2 -2
  74. package/styled-system/patterns/grid-item.d.ts +2 -2
  75. package/styled-system/patterns/grid.d.ts +2 -2
  76. package/styled-system/patterns/hstack.d.ts +2 -2
  77. package/styled-system/patterns/link-box.d.ts +2 -2
  78. package/styled-system/patterns/link-overlay.d.ts +2 -2
  79. package/styled-system/patterns/spacer.d.ts +2 -2
  80. package/styled-system/patterns/square.d.ts +2 -2
  81. package/styled-system/patterns/stack.d.ts +2 -2
  82. package/styled-system/patterns/styled-link.d.ts +2 -2
  83. package/styled-system/patterns/visually-hidden.d.ts +2 -2
  84. package/styled-system/patterns/vstack.d.ts +2 -2
  85. package/styled-system/patterns/wrap.d.ts +2 -2
  86. package/styled-system/reset.css +20 -5
  87. package/styled-system/styles.css +492 -735
  88. package/styled-system/tokens/index.css +8 -8
  89. package/styled-system/types/composition.d.ts +3 -3
  90. package/styled-system/types/conditions.d.ts +227 -114
  91. package/styled-system/types/global.d.ts +7 -7
  92. package/styled-system/types/index.d.ts +6 -4
  93. package/styled-system/types/jsx.d.ts +3 -3
  94. package/styled-system/types/parts.d.ts +1 -1
  95. package/styled-system/types/pattern.d.ts +2 -2
  96. package/styled-system/types/prop-type.d.ts +2 -2
  97. package/styled-system/types/recipe.d.ts +9 -6
  98. package/styled-system/types/style-props.d.ts +1 -1
  99. package/styled-system/types/system-types.d.ts +12 -6
  100. package/{virtual-panda.mjs → virtual-panda.ts} +24 -28
  101. package/styled-system/chunks/..__core____tests____atomic-rule.test.css +0 -216
@@ -1,5 +1,7 @@
1
- import { analyzeTokens, findConfig, loadConfigAndCreateContext, writeAnalyzeJSON } from '@pandacss/node'
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
- * @returns import('vite').VitePlugin
16
- */
17
- function vitePlugin() {
18
- let config
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
- const file = config.path
31
- server.watcher.add(file).on('change', async () => {
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, addWatchFile }) => {
61
- const configPath = findConfig()
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
  },
@@ -1,216 +0,0 @@
1
- @layer utilities {
2
- .styles\:text_red\! {
3
- color: red !important
4
- }
5
-
6
- .styles\:fs_30px\! {
7
- font-size: 30px !important
8
- }
9
-
10
- .styles\:bg_red\.300 {
11
- background: var(--colors-red-300)
12
- }
13
-
14
- .styles\:w_20px {
15
- width: 20px
16
- }
17
-
18
- .styles\:w_70px {
19
- width: 70px
20
- }
21
-
22
- .styles\:w_50px {
23
- width: 50px
24
- }
25
- @media screen and (min-width: 40em) {
26
- [dir=ltr] .styles\:ltr\:sm\:ml_4 {
27
- margin-left: var(--spacing-4)
28
- }
29
- }
30
- [dir=rtl] .styles\:rtl\:ml_-4 {
31
- margin-left: calc(var(--spacing-4) * -1)
32
- }
33
- .styles\:light\:text_red.light, .light .styles\:light\:text_red {
34
- color: red
35
- }
36
- .styles\:dark\:text_green.dark, .dark .styles\:dark\:text_green {
37
- color: green
38
- }
39
- .styles\:dark\:opacity_slate400.dark, .dark .styles\:dark\:opacity_slate400 {
40
- opacity: slate400
41
- }
42
- @media screen and (min-width: 40em) {
43
- [dir=rtl] .styles\:sm\:rtl\:top_20px {
44
- top: 20px
45
- }
46
- }
47
- .styles\:left_20px,.styles\:\[\&_\>_p\]\:left_20px > p {
48
- left: 20px
49
- }
50
- @media screen and (min-width: 48em) {
51
- .styles\:\[\&_\>_p\]\:md\:left_40px > p {
52
- left: 40px
53
- }
54
- }
55
- .styles\:\[\&_\>_p\]\:light\:bg_red400 > p.light, .light .styles\:\[\&_\>_p\]\:light\:bg_red400 > p {
56
- background: red400
57
- }
58
- .styles\:\[\&_\>_p\]\:dark\:bg_green500 > p.dark, .dark .styles\:\[\&_\>_p\]\:dark\:bg_green500 > p {
59
- background: green500
60
- }
61
- [dir=rtl] .styles\:\[\&_\>_p\]\:rtl\:font_sans > p {
62
- font: sans
63
- }
64
- .styles\:\[\&\:\:placeholder\]\:left_40px::placeholder {
65
- left: 40px
66
- }
67
- .styles\:\[\&\:\:placeholder\]\:bg_red400::placeholder {
68
- background: red400
69
- }
70
- @media screen and (min-width: 40em) {
71
- .styles\:\[\&\:\:placeholder\]\:sm\:text_left::placeholder {
72
- text-align: left
73
- }
74
- }
75
-
76
- .styles\:all_unset {
77
- all: unset
78
- }
79
-
80
- .styles\:bg_red {
81
- background-color: red
82
- }
83
-
84
- .styles\:border_none {
85
- border: var(--borders-none)
86
- }
87
-
88
- .styles\:p_\$3_\$3 {
89
- padding: $3 $3
90
- }
91
-
92
- .styles\:rounded_\$button {
93
- border-radius: $button
94
- }
95
-
96
- .styles\:fs_\$xsmall {
97
- font-size: $xsmall
98
- }
99
-
100
- .styles\:cursor_pointer {
101
- cursor: pointer
102
- }
103
- .styles\:\[\&_\+_span\]\:ml_\$2 + span {
104
- margin-left: $2
105
- }
106
- .test .styles\:\[\.test_\&\]\:bg_blue {
107
- background-color: blue
108
- }
109
- .styles\:\[\&_\.my-class\]\:text_red .my-class,.styles\:\[\&_span\]\:text_red span,.styles\:\[\&_kbd\]\:text_red kbd {
110
- color: red
111
- }
112
- .styles\:\[\&\:focus\,_\&\:hover\]\:shadow_none:focus, .styles\:\[\&\:focus\,_\&\:hover\]\:shadow_none:hover {
113
- box-shadow: none
114
- }
115
- :focus > .styles\:\[\:focus_\>_\&\]\:text_white {
116
- color: var(--colors-white)
117
- }
118
- @media screen and (min-width: 40em) {
119
- .styles\:sm\:hover\:top_50px:is(:hover, [data-hover]) {
120
- top: 50px
121
- }
122
- }
123
- @media screen and (min-width: 40em) {
124
- [dir=ltr] .styles\:\[\&_\>_p\]\:ltr\:dark\:sm\:hover\:font_serif > p:is(:hover, [data-hover]).dark, .dark [dir=ltr] .styles\:\[\&_\>_p\]\:ltr\:dark\:sm\:hover\:font_serif > p:is(:hover, [data-hover]) {
125
- font: serif
126
- }
127
- }
128
- input:hover .styles\:\[input\:hover_\&\]\:bg_red400 {
129
- background: red400
130
- }
131
- @media screen and (min-width: 40em) {
132
- input:hover .styles\:\[input\:hover_\&\]\:sm\:fs_14px {
133
- font-size: 14px
134
- }
135
- }
136
- @media screen and (min-width: 64em) {
137
- input:hover .styles\:\[input\:hover_\&\]\:lg\:fs_18px {
138
- font-size: 18px
139
- }
140
- }
141
- .styles\:hover\:bg_pink\.400:is(:hover, [data-hover]) {
142
- background: var(--colors-pink-400)
143
- }
144
- @media screen and (min-width: 40em) {
145
- .styles\:hover\:sm\:dark\:bg_red\.300:is(:hover, [data-hover]).dark, .dark .styles\:hover\:sm\:dark\:bg_red\.300:is(:hover, [data-hover]) {
146
- background: var(--colors-red-300)
147
- }
148
- }
149
- .styles\:hover\:text_pink\.400:is(:hover, [data-hover]) {
150
- color: var(--colors-pink-400)
151
- }
152
- @media screen and (min-width: 40em) {
153
- .styles\:hover\:disabled\:sm\:bg_red\.300:is(:hover, [data-hover]):is(:disabled, [disabled], [data-disabled]) {
154
- background: var(--colors-red-300)
155
- }
156
- }
157
- @media base {
158
- .styles\:\[\@media_base\]\:\[\&\:hover\]\:left_40px:hover {
159
- left: 40px
160
- }
161
- }
162
- @media base {
163
- @media screen and (min-width: 40em) {
164
- .styles\:\[\@media_base\]\:\[\&\:hover\]\:sm\:text_left:hover {
165
- text-align: left
166
- }
167
- }
168
- }
169
- @media (min-width: 768px) {
170
- .styles\:\[\@media_\(min-width\:_768px\)\]\:\[\&\:hover\]\:bg_yellow:hover {
171
- background-color: yellow
172
- }
173
- }
174
- @media screen and (min-width: 40em) {
175
-
176
- .styles\:sm\:w_60px {
177
- width: 60px
178
- }
179
- }
180
- @media screen and (min-width: 64em) {
181
-
182
- .styles\:lg\:top_120px {
183
- top: 120px
184
- }
185
- }
186
- @media screen and (min-width: 48em) {
187
-
188
- .styles\:md\:left_40px {
189
- left: 40px
190
- }
191
- }
192
- @media base {
193
-
194
- .styles\:\[\@media_base\]\:left_40px {
195
- left: 40px
196
- }
197
- }
198
- @media base {
199
- @media screen and (min-width: 40em) {
200
-
201
- .styles\:\[\@media_base\]\:sm\:text_left {
202
- text-align: left
203
- }
204
- }
205
- }
206
- @media (min-width: 768px) {
207
-
208
- .styles\:\[\@media_\(min-width\:_768px\)\]\:bg_green {
209
- background-color: green
210
- }
211
-
212
- .styles\:\[\@media_\(min-width\:_768px\)\]\:fs_\$small {
213
- font-size: $small
214
- }
215
- }
216
- }