create-substrate 0.1.4 → 0.1.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.js +1 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +57 -2
- package/dist/scaffold.js.map +1 -1
- package/dist/surfaces/3d-scene.d.ts.map +1 -1
- package/dist/surfaces/3d-scene.js +414 -67
- package/dist/surfaces/3d-scene.js.map +1 -1
- package/dist/surfaces/animation.d.ts.map +1 -1
- package/dist/surfaces/animation.js +95 -103
- package/dist/surfaces/animation.js.map +1 -1
- package/dist/surfaces/blank.d.ts.map +1 -1
- package/dist/surfaces/blank.js +28 -16
- package/dist/surfaces/blank.js.map +1 -1
- package/dist/surfaces/canvas-2d.d.ts.map +1 -1
- package/dist/surfaces/canvas-2d.js +369 -92
- package/dist/surfaces/canvas-2d.js.map +1 -1
- package/dist/surfaces/data-vis.d.ts.map +1 -1
- package/dist/surfaces/data-vis.js +262 -98
- package/dist/surfaces/data-vis.js.map +1 -1
- package/dist/surfaces/image-gen.d.ts.map +1 -1
- package/dist/surfaces/image-gen.js +354 -92
- package/dist/surfaces/image-gen.js.map +1 -1
- package/dist/surfaces/node-editor.d.ts.map +1 -1
- package/dist/surfaces/node-editor.js +559 -114
- package/dist/surfaces/node-editor.js.map +1 -1
- package/package.json +3 -2
- package/skills/canvas-2d/SKILL.md +1 -1
- package/skills/composing-panels/SKILL.md +8 -8
- package/skills/scaffold-playground/SKILL.md +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-editor.js","sourceRoot":"","sources":["../../src/surfaces/node-editor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,UAAU,EAAE;QACV,SAAS;QACT,OAAO;QACP,MAAM;QACN,MAAM;QACN,cAAc;QACd,eAAe;QACf,YAAY;QACZ,eAAe;
|
|
1
|
+
{"version":3,"file":"node-editor.js","sourceRoot":"","sources":["../../src/surfaces/node-editor.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,UAAU,EAAE;QACV,SAAS;QACT,OAAO;QACP,MAAM;QACN,MAAM;QACN,cAAc;QACd,eAAe;QACf,YAAY;QACZ,eAAe;KAChB;IACD,OAAO,EAAE;;;;;;;mCAOwB;IACjC,GAAG,EAAE,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8nBZ;CACA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-substrate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Scaffold a Substrate creative tool playground",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
11
11
|
"dev": "tsx src/index.ts",
|
|
12
|
-
"prepack": "node ../../scripts/sync-skills.mjs && npm run build"
|
|
12
|
+
"prepack": "node ../../scripts/sync-skills.mjs && npm run build",
|
|
13
|
+
"prepublishOnly": "npm --prefix ../.. run release:check"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"chalk": "^5.4.0",
|
|
@@ -27,7 +27,7 @@ This pulls in the canvas renderer, hit-test system, interaction hooks, transform
|
|
|
27
27
|
### Mount
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import { DesignCanvas } from "@/
|
|
30
|
+
import { DesignCanvas } from "@/components/substrate/design-canvas"
|
|
31
31
|
|
|
32
32
|
export default function PlaygroundPage() {
|
|
33
33
|
return (
|
|
@@ -36,7 +36,7 @@ npx shadcn@latest add https://substrate.georgedrury.co.uk/r/slider
|
|
|
36
36
|
## Panel positioning
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
|
-
import { Panel } from "@/
|
|
39
|
+
import { Panel } from "@/components/substrate/panel"
|
|
40
40
|
|
|
41
41
|
{
|
|
42
42
|
/* Left panel — layers, tool options */
|
|
@@ -58,19 +58,19 @@ A typical properties panel reads from `useDocumentStore` and writes back via `up
|
|
|
58
58
|
```tsx
|
|
59
59
|
"use client"
|
|
60
60
|
|
|
61
|
-
import { useDocumentStore } from "@/
|
|
61
|
+
import { useDocumentStore } from "@/stores/substrate/document-store"
|
|
62
62
|
import {
|
|
63
63
|
Pane,
|
|
64
64
|
PaneHeader,
|
|
65
65
|
PaneLabel,
|
|
66
66
|
PaneAction,
|
|
67
|
-
} from "@/
|
|
67
|
+
} from "@/components/substrate/pane"
|
|
68
68
|
import {
|
|
69
69
|
Action,
|
|
70
70
|
ActionLabel,
|
|
71
71
|
ActionControls,
|
|
72
|
-
} from "@/
|
|
73
|
-
import { Slider } from "@/
|
|
72
|
+
} from "@/components/substrate/action"
|
|
73
|
+
import { Slider } from "@/components/substrate/slider"
|
|
74
74
|
|
|
75
75
|
export function PropertiesPanel() {
|
|
76
76
|
const selectedIds = useDocumentStore((s) => s.selectedIds)
|
|
@@ -170,12 +170,12 @@ A layers panel lists elements in render order (bottom to top) and lets users sel
|
|
|
170
170
|
```tsx
|
|
171
171
|
"use client"
|
|
172
172
|
|
|
173
|
-
import { useDocumentStore } from "@/
|
|
173
|
+
import { useDocumentStore } from "@/stores/substrate/document-store"
|
|
174
174
|
import {
|
|
175
175
|
Pane,
|
|
176
176
|
PaneHeader,
|
|
177
177
|
PaneLabel,
|
|
178
|
-
} from "@/
|
|
178
|
+
} from "@/components/substrate/pane"
|
|
179
179
|
|
|
180
180
|
export function LayersPanel() {
|
|
181
181
|
const elements = useDocumentStore((s) => s.elements)
|
|
@@ -224,7 +224,7 @@ export function LayersPanel() {
|
|
|
224
224
|
Use `usePanelStore` to control panel visibility:
|
|
225
225
|
|
|
226
226
|
```tsx
|
|
227
|
-
import { usePanelStore } from "@/
|
|
227
|
+
import { usePanelStore } from "@/stores/substrate/panel-store"
|
|
228
228
|
|
|
229
229
|
const leftPanel = usePanelStore((s) => s.leftPanel)
|
|
230
230
|
const rightPanel = usePanelStore((s) => s.rightPanel)
|
|
@@ -70,15 +70,15 @@ Every playground follows the same layout pattern — surface in the centre, opti
|
|
|
70
70
|
```tsx
|
|
71
71
|
"use client"
|
|
72
72
|
|
|
73
|
-
import { Panel } from "@/
|
|
73
|
+
import { Panel } from "@/components/substrate/panel"
|
|
74
74
|
import {
|
|
75
75
|
Toolbar,
|
|
76
76
|
ToolbarToggleGroup,
|
|
77
77
|
ToolbarToggle,
|
|
78
78
|
ToolbarSeparator,
|
|
79
|
-
} from "@/
|
|
80
|
-
import { usePanelStore } from "@/
|
|
81
|
-
import { useToolStore } from "@/
|
|
79
|
+
} from "@/components/substrate/toolbar"
|
|
80
|
+
import { usePanelStore } from "@/stores/substrate/panel-store"
|
|
81
|
+
import { useToolStore } from "@/stores/substrate/tool-store"
|
|
82
82
|
|
|
83
83
|
export default function PlaygroundPage() {
|
|
84
84
|
const leftPanel = usePanelStore((s) => s.leftPanel)
|