sculpted 0.3.3 → 0.3.5
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/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{patcher-nj9VhRT-.mjs → patcher-q1Cc_E8H.mjs} +2 -2
- package/dist/{runtime-Cpxddehp.d.mts → runtime-BA5TGbfx.d.mts} +1 -1
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +4669 -178
- package/dist/{sourceSyntax-DKIh-VKA.d.mts → sourceSyntax-CLM3knfR.d.mts} +1 -1
- package/dist/tsrx.d.mts +1 -1
- package/dist/{types-0a4hNfAF.d.mts → types-1F2MUOXh.d.mts} +2 -1
- package/dist/ui.d.mts +2 -2
- package/dist/ui.mjs +3777 -2070
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +61 -2
- package/docs/vite-plugin.md +11 -2
- package/examples/vite-preact-pandacss/package.json +1 -1
- package/examples/vite-preact-pandacss/postcss.config.cjs +2 -2
- package/examples/vite-preact-pandacss/src/index.css +6 -1
- package/examples/vite-preact-pandacss/vite.config.ts +5 -5
- package/examples/vite-react-pandacss/package.json +1 -1
- package/examples/vite-react-pandacss/src/index.css +6 -1
- package/package.json +18 -18
package/dist/vite.d.mts
CHANGED
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as markerClassForEditId, a as DEFAULT_JSX_SOURCE_ATTRIBUTE, c as DEFAULT_OPEN_SOURCE_ENDPOINT, d as DEFAULT_TOKEN_WRITEBACK_ENDPOINT, f as DEFAULT_WRITEBACK_ENDPOINT, l as DEFAULT_SOURCE_ATTRIBUTE, p as SCULPTED_EVENTS, r as DEFAULT_EDIT_ID_ATTRIBUTE, t as DEFAULT_COMPONENT_ATTRIBUTE, u as DEFAULT_STYLE_MODULE_ENDPOINT } from "./protocol-D5heR2QM.mjs";
|
|
2
|
-
import { S as parsePandaSource, _ as createStaticCssPatch, a as createStyleModuleSourcePatch, b as hashSource, c as resolveProjectPath, d as toRelativeProjectPath$1, f as trustedManifestFilePath, g as createStaticCssBatchPatch, h as verifyProjectWritePath, i as createStyleModuleDetachPatch, l as safeProjectSourcePath, m as verifyProjectExistingPath, n as componentStyleModulePaths, o as readComponentStyleModule, p as trustedTokenSourceFilePath, r as createStyleModuleAttachPatch, s as normalizePath$1, t as createTokenConfigPatch, u as stripViteQuery, v as createInlineCssSourcePatch, w as resolveSourceParserAdapter, y as analyzePandaCssSource } from "./patcher-
|
|
2
|
+
import { S as parsePandaSource, _ as createStaticCssPatch, a as createStyleModuleSourcePatch, b as hashSource, c as resolveProjectPath, d as toRelativeProjectPath$1, f as trustedManifestFilePath, g as createStaticCssBatchPatch, h as verifyProjectWritePath, i as createStyleModuleDetachPatch, l as safeProjectSourcePath, m as verifyProjectExistingPath, n as componentStyleModulePaths, o as readComponentStyleModule, p as trustedTokenSourceFilePath, r as createStyleModuleAttachPatch, s as normalizePath$1, t as createTokenConfigPatch, u as stripViteQuery, v as createInlineCssSourcePatch, w as resolveSourceParserAdapter, y as analyzePandaCssSource } from "./patcher-q1Cc_E8H.mjs";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import { dirname } from "node:path";
|
|
@@ -21,6 +21,61 @@ const DEFAULT_PANDA_CONFIG_FILES = [
|
|
|
21
21
|
];
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/vite/editorProperties.ts
|
|
24
|
+
const EDITOR_PROPERTY_COMMONNESS = {
|
|
25
|
+
display: 2.2,
|
|
26
|
+
color: 2.1,
|
|
27
|
+
background: 2,
|
|
28
|
+
backgroundColor: 2,
|
|
29
|
+
padding: 2,
|
|
30
|
+
paddingX: 1.9,
|
|
31
|
+
paddingY: 1.9,
|
|
32
|
+
paddingTop: 1.8,
|
|
33
|
+
paddingRight: 1.8,
|
|
34
|
+
paddingBottom: 1.8,
|
|
35
|
+
paddingLeft: 1.8,
|
|
36
|
+
margin: 1.9,
|
|
37
|
+
marginX: 1.8,
|
|
38
|
+
marginY: 1.8,
|
|
39
|
+
marginTop: 1.7,
|
|
40
|
+
marginRight: 1.7,
|
|
41
|
+
marginBottom: 1.7,
|
|
42
|
+
marginLeft: 1.7,
|
|
43
|
+
width: 1.9,
|
|
44
|
+
height: 1.8,
|
|
45
|
+
borderRadius: 1.8,
|
|
46
|
+
gap: 1.8,
|
|
47
|
+
fontSize: 1.8,
|
|
48
|
+
fontWeight: 1.7,
|
|
49
|
+
lineHeight: 1.7,
|
|
50
|
+
position: 1.7,
|
|
51
|
+
opacity: 1.7,
|
|
52
|
+
border: 1.6,
|
|
53
|
+
boxShadow: 1.5,
|
|
54
|
+
alignItems: 1.5,
|
|
55
|
+
justifyContent: 1.5,
|
|
56
|
+
flexDirection: 1.4,
|
|
57
|
+
overflow: 1.4,
|
|
58
|
+
cursor: 1.3,
|
|
59
|
+
transform: 1.3,
|
|
60
|
+
maxWidth: 1.3,
|
|
61
|
+
minWidth: 1.3,
|
|
62
|
+
top: 1.2,
|
|
63
|
+
right: 1.2,
|
|
64
|
+
bottom: 1.2,
|
|
65
|
+
left: 1.2,
|
|
66
|
+
inset: 1.2,
|
|
67
|
+
zIndex: 1.2,
|
|
68
|
+
backgroundImage: 1.1,
|
|
69
|
+
outline: 1.1,
|
|
70
|
+
transition: 1.1,
|
|
71
|
+
pointerEvents: 1.1,
|
|
72
|
+
userSelect: 1.1,
|
|
73
|
+
backdropFilter: .8,
|
|
74
|
+
mixBlendMode: .8,
|
|
75
|
+
backgroundAttachment: .7,
|
|
76
|
+
transitionTimingFunction: .7,
|
|
77
|
+
cornerShape: .6
|
|
78
|
+
};
|
|
24
79
|
function editorProperty(name, label, category, cssProperty, aliases = [], tokenCategory) {
|
|
25
80
|
return {
|
|
26
81
|
name,
|
|
@@ -29,9 +84,13 @@ function editorProperty(name, label, category, cssProperty, aliases = [], tokenC
|
|
|
29
84
|
cssProperty,
|
|
30
85
|
aliases,
|
|
31
86
|
tokenCategory,
|
|
32
|
-
defaultUnit: defaultEditorPropertyUnit(name, category)
|
|
87
|
+
defaultUnit: defaultEditorPropertyUnit(name, category),
|
|
88
|
+
commonness: editorPropertyCommonness(name)
|
|
33
89
|
};
|
|
34
90
|
}
|
|
91
|
+
function editorPropertyCommonness(name) {
|
|
92
|
+
return EDITOR_PROPERTY_COMMONNESS[name] ?? 1;
|
|
93
|
+
}
|
|
35
94
|
function defaultEditorPropertyUnit(name, category) {
|
|
36
95
|
if ([
|
|
37
96
|
"zIndex",
|
package/docs/vite-plugin.md
CHANGED
|
@@ -24,8 +24,17 @@ framework-rendered document. Add the runtime script explicitly in development:
|
|
|
24
24
|
|
|
25
25
|
```tsx
|
|
26
26
|
// app/root.tsx
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
export function Layout({ children }: { children: React.ReactNode }) {
|
|
28
|
+
return (
|
|
29
|
+
<html>
|
|
30
|
+
<body>
|
|
31
|
+
{children}
|
|
32
|
+
<Scripts />
|
|
33
|
+
{import.meta.env.DEV ? <script src="/@sculpted/runtime" type="module" /> : null}
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
29
38
|
```
|
|
30
39
|
|
|
31
40
|
Keep `sculpted()` before `reactRouter()` in `vite.config.ts` so route modules are instrumented
|
|
@@ -2,7 +2,7 @@ import preact from '@preact/preset-vite'
|
|
|
2
2
|
import tsrx from '@tsrx/vite-plugin-preact'
|
|
3
3
|
import { sourceSyntax } from 'sculpted/tsrx'
|
|
4
4
|
import { sculpted } from 'sculpted/vite'
|
|
5
|
-
import { defineConfig
|
|
5
|
+
import { defineConfig } from 'vite'
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
plugins: [
|
|
@@ -11,10 +11,10 @@ export default defineConfig({
|
|
|
11
11
|
include: ['src/**/*.{ts,tsx,tsrx}'],
|
|
12
12
|
sourceSyntax: [sourceSyntax],
|
|
13
13
|
panda: {
|
|
14
|
-
cssImportSources: ['../styled-system/css']
|
|
15
|
-
}
|
|
14
|
+
cssImportSources: ['../styled-system/css'],
|
|
15
|
+
},
|
|
16
16
|
}),
|
|
17
17
|
tsrx(),
|
|
18
|
-
preact()
|
|
19
|
-
]
|
|
18
|
+
preact(),
|
|
19
|
+
],
|
|
20
20
|
})
|
package/package.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sculpted",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Experimental alpha dev inspector for editing Panda CSS styles and writing safe source updates.",
|
|
5
|
-
"license": "FSL-1.1-ALv2",
|
|
6
|
-
"author": "Alec Larson",
|
|
7
|
-
"packageManager": "pnpm@11.5.1",
|
|
8
5
|
"keywords": [
|
|
6
|
+
"css-editor",
|
|
7
|
+
"inspector",
|
|
9
8
|
"panda-css",
|
|
10
|
-
"vite",
|
|
11
9
|
"preact",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"source-writeback"
|
|
10
|
+
"source-writeback",
|
|
11
|
+
"vite"
|
|
15
12
|
],
|
|
13
|
+
"license": "FSL-1.1-ALv2",
|
|
14
|
+
"author": "Alec Larson",
|
|
16
15
|
"repository": {
|
|
17
16
|
"type": "git",
|
|
18
17
|
"url": "https://github.com/aleclarson/sculpted.git"
|
|
@@ -59,15 +58,6 @@
|
|
|
59
58
|
"@pandacss/node": "1.11.1",
|
|
60
59
|
"zod": "4.4.3"
|
|
61
60
|
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@tsrx/core": ">=0.1.0",
|
|
64
|
-
"typescript": ">=5.0.0"
|
|
65
|
-
},
|
|
66
|
-
"peerDependenciesMeta": {
|
|
67
|
-
"@tsrx/core": {
|
|
68
|
-
"optional": true
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
61
|
"devDependencies": {
|
|
72
62
|
"@goddard-ai/ui-primitives": "0.1.1",
|
|
73
63
|
"@pandacss/dev": "^1.11.1",
|
|
@@ -84,5 +74,15 @@
|
|
|
84
74
|
"tsdown": "^0.22.0",
|
|
85
75
|
"typescript": "^6.0.3",
|
|
86
76
|
"vitest": "^4.1.7"
|
|
87
|
-
}
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@tsrx/core": ">=0.1.0",
|
|
80
|
+
"typescript": ">=5.0.0"
|
|
81
|
+
},
|
|
82
|
+
"peerDependenciesMeta": {
|
|
83
|
+
"@tsrx/core": {
|
|
84
|
+
"optional": true
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"packageManager": "pnpm@11.5.1"
|
|
88
88
|
}
|