@pandacss/studio 0.53.7 → 0.54.0
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 +7 -7
- package/src/components/layer-styles.tsx +10 -9
- package/src/components/text-styles.tsx +10 -18
- package/src/lib/virtual-panda.d.ts +2 -0
- package/styled-system/patterns/aspect-ratio.d.ts +0 -1
- package/styled-system/patterns/bleed.d.ts +0 -1
- package/styled-system/patterns/box.d.ts +0 -1
- package/styled-system/patterns/center.d.ts +0 -1
- package/styled-system/patterns/circle.d.ts +0 -1
- package/styled-system/patterns/container.d.ts +0 -1
- package/styled-system/patterns/cq.d.ts +0 -1
- package/styled-system/patterns/divider.d.ts +0 -1
- package/styled-system/patterns/flex.d.ts +0 -1
- package/styled-system/patterns/float.d.ts +0 -1
- package/styled-system/patterns/grid-item.d.ts +0 -1
- package/styled-system/patterns/grid.d.ts +0 -1
- package/styled-system/patterns/hstack.d.ts +0 -1
- package/styled-system/patterns/link-overlay.d.ts +0 -1
- package/styled-system/patterns/spacer.d.ts +0 -1
- package/styled-system/patterns/square.d.ts +0 -1
- package/styled-system/patterns/stack.d.ts +0 -1
- package/styled-system/patterns/visually-hidden.d.ts +0 -1
- package/styled-system/patterns/vstack.d.ts +0 -1
- package/styled-system/patterns/wrap.d.ts +0 -1
- package/styled-system/styles.css +318 -323
- package/styled-system/tokens/tokens.d.ts +1 -1
- package/styled-system/types/conditions.d.ts +6 -6
- package/styled-system/jsx/link-box.d.ts +0 -10
- package/styled-system/jsx/link-box.mjs +0 -14
- package/styled-system/patterns/link-box.d.ts +0 -21
- package/styled-system/patterns/link-box.mjs +0 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"react": "18.2.0",
|
|
49
49
|
"react-dom": "18.2.0",
|
|
50
50
|
"vite": "6.2.5",
|
|
51
|
-
"@pandacss/config": "0.
|
|
52
|
-
"@pandacss/
|
|
53
|
-
"@pandacss/
|
|
54
|
-
"@pandacss/token-dictionary": "0.
|
|
55
|
-
"@pandacss/types": "0.
|
|
56
|
-
"@pandacss/astro-plugin-studio": "0.
|
|
51
|
+
"@pandacss/config": "0.54.0",
|
|
52
|
+
"@pandacss/logger": "0.54.0",
|
|
53
|
+
"@pandacss/shared": "0.54.0",
|
|
54
|
+
"@pandacss/token-dictionary": "0.54.0",
|
|
55
|
+
"@pandacss/types": "0.54.0",
|
|
56
|
+
"@pandacss/astro-plugin-studio": "0.54.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/react": "18.2.55",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import { layerStyles } from 'virtual:panda'
|
|
2
3
|
import { panda } from '../../styled-system/jsx'
|
|
3
4
|
import * as context from '../lib/panda-context'
|
|
4
5
|
import { EmptyState } from './empty-state'
|
|
@@ -7,24 +8,24 @@ import { TokenContent } from './token-content'
|
|
|
7
8
|
import { TokenGroup } from './token-group'
|
|
8
9
|
|
|
9
10
|
export default function LayerStyles() {
|
|
10
|
-
const
|
|
11
|
+
const keys = Object.keys(context.layerStyles)
|
|
11
12
|
|
|
12
13
|
return (
|
|
13
14
|
<TokenGroup>
|
|
14
15
|
<TokenContent divideY="1px" divideColor="card">
|
|
15
|
-
{
|
|
16
|
-
|
|
16
|
+
{keys && keys?.length !== 0 ? (
|
|
17
|
+
keys.map((name) => (
|
|
17
18
|
<panda.div px="1" py="2.5" key={name}>
|
|
18
19
|
<panda.div borderColor="card">
|
|
19
20
|
<panda.span fontWeight="medium">{name}</panda.span>
|
|
20
|
-
<panda.div fontSize="small" flex="auto" marginTop="1.5">
|
|
21
|
-
{Object.entries(styles).map(([attr, value], i, arr) => (
|
|
22
|
-
<span key={attr}>{`${attr}: ${value}${i === arr.length - 1 ? '' : ', '}`}</span>
|
|
23
|
-
))}
|
|
24
|
-
</panda.div>
|
|
25
21
|
</panda.div>
|
|
26
22
|
<panda.div px="4" py="2" background="card" marginTop="5">
|
|
27
|
-
<panda.div flex="auto" my="3" height="20"
|
|
23
|
+
<panda.div flex="auto" my="3" height="20" className={`virtual-layer-style-${name}`} />
|
|
24
|
+
<style
|
|
25
|
+
dangerouslySetInnerHTML={{
|
|
26
|
+
__html: `.virtual-layer-style-${name} { ${layerStyles[name]} }`,
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
28
29
|
</panda.div>
|
|
29
30
|
</panda.div>
|
|
30
31
|
))
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { textStyles } from 'virtual:panda'
|
|
2
2
|
import { panda } from '../../styled-system/jsx'
|
|
3
3
|
import * as context from '../lib/panda-context'
|
|
4
4
|
import { EmptyState } from './empty-state'
|
|
5
5
|
import { TextStylesIcon } from './icons'
|
|
6
6
|
import { TokenContent } from './token-content'
|
|
7
7
|
import { TokenGroup } from './token-group'
|
|
8
|
-
import type { Dict } from '../../styled-system/types'
|
|
9
8
|
|
|
10
9
|
export default function TextStyles() {
|
|
11
|
-
const
|
|
10
|
+
const keys = Object.keys(context.textStyles)
|
|
12
11
|
|
|
13
12
|
return (
|
|
14
13
|
<TokenGroup>
|
|
15
14
|
<TokenContent>
|
|
16
|
-
{
|
|
17
|
-
|
|
15
|
+
{keys?.length !== 0 ? (
|
|
16
|
+
keys.map((name) => (
|
|
18
17
|
<panda.div px="1" py="2.5" key={name}>
|
|
19
18
|
<panda.div borderColor="card">
|
|
20
19
|
<panda.span fontWeight="medium">{name}</panda.span>
|
|
21
20
|
</panda.div>
|
|
22
|
-
<panda.div flex="auto" my="3"
|
|
21
|
+
<panda.div flex="auto" my="3" className={`virtual-text-style-${name}`} truncate>
|
|
23
22
|
Panda textStyles are time saving
|
|
24
23
|
</panda.div>
|
|
24
|
+
<style
|
|
25
|
+
dangerouslySetInnerHTML={{
|
|
26
|
+
__html: `.virtual-text-style-${name} { ${textStyles[name]} }`,
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
25
29
|
</panda.div>
|
|
26
30
|
))
|
|
27
31
|
) : (
|
|
@@ -33,15 +37,3 @@ export default function TextStyles() {
|
|
|
33
37
|
</TokenGroup>
|
|
34
38
|
)
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
const removeEscapeHatchSyntax = (styles: Dict) => {
|
|
38
|
-
return Object.fromEntries(
|
|
39
|
-
Object.entries(styles).map(([key, value]) => {
|
|
40
|
-
if (typeof value === 'string' && value[0] === '[' && value[value.length - 1] === ']') {
|
|
41
|
-
return [key, value.slice(1, -1)]
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return [key, value]
|
|
45
|
-
}),
|
|
46
|
-
)
|
|
47
|
-
}
|
|
@@ -9,7 +9,6 @@ export interface AspectRatioProperties {
|
|
|
9
9
|
ratio?: ConditionalValue<number>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
|
|
14
13
|
|
|
15
14
|
interface AspectRatioPatternFn {
|
|
@@ -11,7 +11,6 @@ export interface DividerProperties {
|
|
|
11
11
|
color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
interface DividerStyles extends DividerProperties, DistributiveOmit<SystemStyleObject, keyof DividerProperties > {}
|
|
16
15
|
|
|
17
16
|
interface DividerPatternFn {
|
|
@@ -12,7 +12,6 @@ export interface FloatProperties {
|
|
|
12
12
|
placement?: ConditionalValue<"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start">
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
interface FloatStyles extends FloatProperties, DistributiveOmit<SystemStyleObject, keyof FloatProperties > {}
|
|
17
16
|
|
|
18
17
|
interface FloatPatternFn {
|