sculpted 0.3.2 → 0.3.3
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/README.md +4 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{patcher-DQgKdozw.mjs → patcher-nj9VhRT-.mjs} +131 -11
- package/dist/{runtime-C1gUOAc9.d.mts → runtime-Cpxddehp.d.mts} +1 -1
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +525 -17
- package/dist/{sourceSyntax-U2iybN9L.d.mts → sourceSyntax-DKIh-VKA.d.mts} +1 -1
- package/dist/tsrx.d.mts +1 -1
- package/dist/{types-CdByW0ji.d.mts → types-0a4hNfAF.d.mts} +11 -1
- package/dist/ui.d.mts +7 -2
- package/dist/ui.mjs +283 -62
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +493 -185
- package/docs/source-writeback.md +4 -2
- package/examples/vite-preact-pandacss/src/BatchFixtures.tsx +77 -0
- package/examples/vite-preact-pandacss/src/main.tsx +2 -0
- package/examples/vite-react-pandacss/src/BatchFixtures.tsx +77 -0
- package/examples/vite-react-pandacss/src/main.tsx +2 -0
- package/package.json +3 -2
package/docs/source-writeback.md
CHANGED
|
@@ -26,8 +26,7 @@ Sculpted does not edit:
|
|
|
26
26
|
- adding, deleting, or renaming style properties;
|
|
27
27
|
- converting computed CSS values back to design tokens;
|
|
28
28
|
- broad property-specific editors;
|
|
29
|
-
- inline source creation for TSRX
|
|
30
|
-
- cross-file rollback if one file write succeeds and a later file write fails.
|
|
29
|
+
- inline source creation for TSRX.
|
|
31
30
|
|
|
32
31
|
## Safety Model
|
|
33
32
|
|
|
@@ -35,6 +34,9 @@ Source writes are revalidated on the dev server before writing. Sculpted only wr
|
|
|
35
34
|
the configured project root, re-checks the current source before saving, and rejects stale source,
|
|
36
35
|
unsupported shapes, duplicate keys, parser errors, and unsafe paths.
|
|
37
36
|
|
|
37
|
+
Batched saves are prepared before writing. When a multi-file batch write fails after an earlier file
|
|
38
|
+
was written, Sculpted attempts to restore the earlier file before reporting the save failure.
|
|
39
|
+
|
|
38
40
|
The UI saves immediately after clicking Save. If a save cannot be applied confidently, Sculpted
|
|
39
41
|
shows the failure instead of guessing at a source edit.
|
|
40
42
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { css } from '../styled-system/css'
|
|
2
|
+
|
|
3
|
+
export function BatchFixtures() {
|
|
4
|
+
return (
|
|
5
|
+
<section
|
|
6
|
+
class={css({
|
|
7
|
+
marginTop: '32px',
|
|
8
|
+
})}
|
|
9
|
+
>
|
|
10
|
+
<h2
|
|
11
|
+
class={css({
|
|
12
|
+
color: 'gray.950',
|
|
13
|
+
fontSize: '22px',
|
|
14
|
+
lineHeight: '1.25',
|
|
15
|
+
margin: '0 0 16px',
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
Batch writeback fixtures
|
|
19
|
+
</h2>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
class={css({
|
|
23
|
+
display: 'grid',
|
|
24
|
+
gap: '16px',
|
|
25
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(260px, 1fr))',
|
|
26
|
+
})}
|
|
27
|
+
>
|
|
28
|
+
<article
|
|
29
|
+
class={css({
|
|
30
|
+
backgroundColor: 'white',
|
|
31
|
+
borderColor: 'gray.200',
|
|
32
|
+
borderRadius: '12px',
|
|
33
|
+
borderWidth: '1px',
|
|
34
|
+
color: 'brand.700',
|
|
35
|
+
fontSize: '15px',
|
|
36
|
+
lineHeight: '1.6',
|
|
37
|
+
padding: '18px',
|
|
38
|
+
})}
|
|
39
|
+
>
|
|
40
|
+
<strong
|
|
41
|
+
class={css({
|
|
42
|
+
display: 'block',
|
|
43
|
+
fontWeight: '700',
|
|
44
|
+
marginBottom: '8px',
|
|
45
|
+
})}
|
|
46
|
+
>
|
|
47
|
+
Inherited source target
|
|
48
|
+
</strong>
|
|
49
|
+
<span
|
|
50
|
+
class={css({
|
|
51
|
+
fontWeight: '400',
|
|
52
|
+
})}
|
|
53
|
+
>
|
|
54
|
+
Inspect this span to verify inherited color, font size, and line height point back to
|
|
55
|
+
this imported component file.
|
|
56
|
+
</span>
|
|
57
|
+
</article>
|
|
58
|
+
|
|
59
|
+
<article
|
|
60
|
+
class={css({
|
|
61
|
+
backgroundColor: 'manual.50',
|
|
62
|
+
borderColor: 'manual.500',
|
|
63
|
+
borderRadius: '12px',
|
|
64
|
+
borderWidth: '1px',
|
|
65
|
+
color: 'gray.700',
|
|
66
|
+
fontSize: '15px',
|
|
67
|
+
lineHeight: '1.6',
|
|
68
|
+
padding: '18px',
|
|
69
|
+
})}
|
|
70
|
+
>
|
|
71
|
+
This card gives same-batch saves a second Preact source file to edit alongside
|
|
72
|
+
<code>main.tsx</code>.
|
|
73
|
+
</article>
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { render } from 'preact'
|
|
2
2
|
import { css, cx } from '../styled-system/css'
|
|
3
|
+
import { BatchFixtures } from './BatchFixtures'
|
|
3
4
|
import { TsrxManualPanel } from './TsrxManualPanel.tsrx'
|
|
4
5
|
import './index.css'
|
|
5
6
|
import styles from './main.style'
|
|
@@ -474,6 +475,7 @@ function App() {
|
|
|
474
475
|
|
|
475
476
|
<TokenCreationChecks />
|
|
476
477
|
<InteractionStateChecks />
|
|
478
|
+
<BatchFixtures />
|
|
477
479
|
<TsrxManualPanel />
|
|
478
480
|
<EdgeCaseGrid />
|
|
479
481
|
</div>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { css } from '../styled-system/css'
|
|
2
|
+
|
|
3
|
+
export function BatchFixtures() {
|
|
4
|
+
return (
|
|
5
|
+
<section
|
|
6
|
+
className={css({
|
|
7
|
+
marginTop: '32px',
|
|
8
|
+
})}
|
|
9
|
+
>
|
|
10
|
+
<h2
|
|
11
|
+
className={css({
|
|
12
|
+
color: 'gray.950',
|
|
13
|
+
fontSize: '22px',
|
|
14
|
+
lineHeight: '1.25',
|
|
15
|
+
margin: '0 0 16px',
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
Batch writeback fixtures
|
|
19
|
+
</h2>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
className={css({
|
|
23
|
+
display: 'grid',
|
|
24
|
+
gap: '16px',
|
|
25
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(260px, 1fr))',
|
|
26
|
+
})}
|
|
27
|
+
>
|
|
28
|
+
<article
|
|
29
|
+
className={css({
|
|
30
|
+
backgroundColor: 'white',
|
|
31
|
+
borderColor: 'gray.200',
|
|
32
|
+
borderRadius: '12px',
|
|
33
|
+
borderWidth: '1px',
|
|
34
|
+
color: 'brand.700',
|
|
35
|
+
fontSize: '15px',
|
|
36
|
+
lineHeight: '1.6',
|
|
37
|
+
padding: '18px',
|
|
38
|
+
})}
|
|
39
|
+
>
|
|
40
|
+
<strong
|
|
41
|
+
className={css({
|
|
42
|
+
display: 'block',
|
|
43
|
+
fontWeight: '700',
|
|
44
|
+
marginBottom: '8px',
|
|
45
|
+
})}
|
|
46
|
+
>
|
|
47
|
+
Inherited source target
|
|
48
|
+
</strong>
|
|
49
|
+
<span
|
|
50
|
+
className={css({
|
|
51
|
+
fontWeight: '400',
|
|
52
|
+
})}
|
|
53
|
+
>
|
|
54
|
+
Inspect this span to verify inherited color, font size, and line height point back to
|
|
55
|
+
this imported component file.
|
|
56
|
+
</span>
|
|
57
|
+
</article>
|
|
58
|
+
|
|
59
|
+
<article
|
|
60
|
+
className={css({
|
|
61
|
+
backgroundColor: 'manual.50',
|
|
62
|
+
borderColor: 'manual.500',
|
|
63
|
+
borderRadius: '12px',
|
|
64
|
+
borderWidth: '1px',
|
|
65
|
+
color: 'gray.700',
|
|
66
|
+
fontSize: '15px',
|
|
67
|
+
lineHeight: '1.6',
|
|
68
|
+
padding: '18px',
|
|
69
|
+
})}
|
|
70
|
+
>
|
|
71
|
+
This card gives same-batch saves a second React source file to edit alongside
|
|
72
|
+
<code>main.tsx</code>.
|
|
73
|
+
</article>
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRoot } from 'react-dom/client'
|
|
2
2
|
import type { ReactNode } from 'react'
|
|
3
3
|
import { css, cx } from '../styled-system/css'
|
|
4
|
+
import { BatchFixtures } from './BatchFixtures'
|
|
4
5
|
import styles from './main.style'
|
|
5
6
|
import './index.css'
|
|
6
7
|
|
|
@@ -192,6 +193,7 @@ function App() {
|
|
|
192
193
|
This app verifies the inspect, preview, and source-save loop for React elements that use
|
|
193
194
|
Panda <code>css()</code> calls through <code>className</code>.
|
|
194
195
|
</Card>
|
|
196
|
+
<BatchFixtures />
|
|
195
197
|
<EdgeCaseGrid />
|
|
196
198
|
<TokenCreationChecks />
|
|
197
199
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sculpted",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Experimental alpha dev inspector for editing Panda CSS styles and writing safe source updates.",
|
|
5
5
|
"license": "FSL-1.1-ALv2",
|
|
6
6
|
"author": "Alec Larson",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"prepublishOnly": "pnpm check"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@pandacss/node": "1.11.1"
|
|
59
|
+
"@pandacss/node": "1.11.1",
|
|
60
|
+
"zod": "4.4.3"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
63
|
"@tsrx/core": ">=0.1.0",
|