sketchmark 2.0.0 → 2.1.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/ANIMATABLE_MATRIX.md +177 -0
- package/KERNEL_SPEC.md +412 -0
- package/PACKS.md +81 -0
- package/PRESETS.md +182 -0
- package/README.md +274 -188
- package/bin/editor-ui.cjs +2285 -0
- package/bin/preview-ui.cjs +74 -0
- package/bin/sketchmark.cjs +648 -2008
- package/dist/src/animatable.d.ts +21 -0
- package/dist/src/animatable.js +439 -0
- package/dist/src/builders/index.d.ts +1 -11
- package/dist/src/builders/index.js +1 -19
- package/dist/src/diagnostics.js +1 -64
- package/dist/src/edit.d.ts +27 -0
- package/dist/src/edit.js +162 -0
- package/dist/src/index.d.ts +4 -13
- package/dist/src/index.js +4 -13
- package/dist/src/keyframes.d.ts +48 -0
- package/dist/src/keyframes.js +182 -0
- package/dist/src/motion.d.ts +4 -0
- package/dist/src/motion.js +262 -0
- package/dist/src/normalize.js +120 -151
- package/dist/src/presets/characters.d.ts +15 -0
- package/dist/src/presets/characters.js +113 -0
- package/dist/src/presets/compose.d.ts +5 -0
- package/dist/src/presets/compose.js +80 -0
- package/dist/src/presets/effects.d.ts +40 -0
- package/dist/src/presets/effects.js +79 -0
- package/dist/src/presets/helpers.d.ts +33 -0
- package/dist/src/presets/helpers.js +165 -0
- package/dist/src/presets/index.d.ts +9 -0
- package/dist/src/presets/index.js +48 -0
- package/dist/src/presets/motions.d.ts +33 -0
- package/dist/src/presets/motions.js +75 -0
- package/dist/src/presets/scenes.d.ts +35 -0
- package/dist/src/presets/scenes.js +134 -0
- package/dist/src/presets/shapes.d.ts +71 -0
- package/dist/src/presets/shapes.js +96 -0
- package/dist/src/presets/transitions.d.ts +29 -0
- package/dist/src/presets/transitions.js +113 -0
- package/dist/src/presets/types.d.ts +34 -0
- package/dist/src/presets/types.js +2 -0
- package/dist/src/render/html.js +1 -4
- package/dist/src/render/svg.d.ts +2 -2
- package/dist/src/render/svg.js +86 -82
- package/dist/src/render/three-html.js +67 -113
- package/dist/src/scenes.js +1 -0
- package/dist/src/schema.js +218 -280
- package/dist/src/shapes/builtins.js +11 -47
- package/dist/src/shapes/common.js +12 -11
- package/dist/src/shapes/registry.d.ts +0 -1
- package/dist/src/shapes/registry.js +0 -4
- package/dist/src/shapes/types.d.ts +1 -3
- package/dist/src/types.d.ts +57 -288
- package/dist/src/utils.d.ts +2 -11
- package/dist/src/utils.js +13 -70
- package/dist/src/validate.js +321 -275
- package/dist/tests/run.js +576 -510
- package/examples/1730642890464.jpg +0 -0
- package/examples/app-screen.svg +1 -0
- package/examples/app-screen.visual.json +503 -0
- package/examples/dashboard-table.svg +1 -0
- package/examples/dashboard-table.visual.json +708 -0
- package/examples/dev-docs.svg +1 -0
- package/examples/dev-docs.visual.json +248 -0
- package/examples/explainer.mp4 +0 -0
- package/examples/explainer.visual.json +1713 -0
- package/examples/group-origin-effects-lab-check.svg +1 -0
- package/examples/group-origin-effects-lab.visual.json +1880 -0
- package/examples/image-clip-radius.visual.json +271 -0
- package/examples/make-app-screen.cjs +368 -0
- package/examples/make-dashboard-table.cjs +277 -0
- package/examples/make-dev-docs.cjs +233 -0
- package/examples/make-explainer.cjs +438 -0
- package/examples/make-group-origin-effects-lab.cjs +370 -0
- package/examples/make-image-clip-radius.cjs +169 -0
- package/examples/make-modal-dialog.cjs +355 -0
- package/examples/make-origin-effects-lab.cjs +311 -0
- package/examples/make-preset-character-motion.cjs +32 -0
- package/examples/make-presets-demo.cjs +30 -0
- package/examples/make-pricing.cjs +286 -0
- package/examples/make-product-demo.cjs +468 -0
- package/examples/make-product-hero.cjs +223 -0
- package/examples/make-release-notes.cjs +333 -0
- package/examples/make-settings-panel.cjs +435 -0
- package/examples/make-split-preview.cjs +248 -0
- package/examples/make-storyboard.cjs +215 -0
- package/examples/make-transcript.cjs +234 -0
- package/examples/make-typography-test.cjs +397 -0
- package/examples/make-ui-demo-explainer.cjs +1094 -0
- package/examples/make-ui-flow.cjs +762 -0
- package/examples/make-walkthrough.cjs +815 -0
- package/examples/modal-dialog.svg +1 -0
- package/examples/modal-dialog.visual.json +239 -0
- package/examples/origin-effects-lab-check.svg +1 -0
- package/examples/origin-effects-lab.visual.json +1412 -0
- package/examples/preset-character-motion.visual.json +949 -0
- package/examples/presets-demo.visual.json +787 -0
- package/examples/pricing.svg +1 -0
- package/examples/pricing.visual.json +652 -0
- package/examples/product-demo.mp4 +0 -0
- package/examples/product-demo.visual.json +866 -0
- package/examples/product-hero.svg +1 -0
- package/examples/product-hero.visual.json +242 -0
- package/examples/release-notes.svg +1 -0
- package/examples/release-notes.visual.json +467 -0
- package/examples/settings-panel.svg +1 -0
- package/examples/settings-panel.visual.json +501 -0
- package/examples/split-preview.svg +1 -0
- package/examples/split-preview.visual.json +124 -0
- package/examples/storyboard.svg +1 -0
- package/examples/storyboard.visual.json +312 -0
- package/examples/transcript.svg +1 -0
- package/examples/transcript.visual.json +407 -0
- package/examples/typography-indent-check.svg +1 -0
- package/examples/typography-lineheight-0.svg +1 -0
- package/examples/typography-lineheight-2.svg +1 -0
- package/examples/typography-test-check.svg +1 -0
- package/examples/typography-test.svg +1 -0
- package/examples/typography-test.visual.json +757 -0
- package/examples/ui-demo-explainer-billing.svg +1 -0
- package/examples/ui-demo-explainer-check.svg +1 -0
- package/examples/ui-demo-explainer-save.svg +1 -0
- package/examples/ui-demo-explainer-toggle.svg +1 -0
- package/examples/ui-demo-explainer.mp4 +0 -0
- package/examples/ui-demo-explainer.visual.json +2597 -0
- package/examples/ui-flow.mp4 +0 -0
- package/examples/ui-flow.visual.json +1211 -0
- package/examples/walkthrough.mp4 +0 -0
- package/examples/walkthrough.visual.json +1372 -0
- package/package.json +52 -52
- package/schema/visual.schema.json +1086 -930
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"canvas": {
|
|
4
|
+
"width": 960,
|
|
5
|
+
"height": 540,
|
|
6
|
+
"background": "#f8fafc",
|
|
7
|
+
"duration": 4,
|
|
8
|
+
"fps": 30
|
|
9
|
+
},
|
|
10
|
+
"elements": [
|
|
11
|
+
{
|
|
12
|
+
"id": "title",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"text": "Image radius is compiled to clip.d keyframes",
|
|
15
|
+
"x": 480,
|
|
16
|
+
"y": 54,
|
|
17
|
+
"align": "center",
|
|
18
|
+
"valign": "middle",
|
|
19
|
+
"fontSize": 30,
|
|
20
|
+
"weight": 800,
|
|
21
|
+
"fill": "#0f172a"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "note",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"text": "The kernel only sees an image plus animated clip path data.",
|
|
27
|
+
"x": 480,
|
|
28
|
+
"y": 494,
|
|
29
|
+
"align": "center",
|
|
30
|
+
"valign": "middle",
|
|
31
|
+
"fontSize": 18,
|
|
32
|
+
"fill": "#475569"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "photo",
|
|
36
|
+
"type": "image",
|
|
37
|
+
"src": "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22900%22%20height%3D%22560%22%20viewBox%3D%220%200%20900%20560%22%3E%20%3Cdefs%3E%20%3ClinearGradient%20id%3D%22bg%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%230f766e%22%2F%3E%20%3Cstop%20offset%3D%220.52%22%20stop-color%3D%22%232563eb%22%2F%3E%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%237c3aed%22%2F%3E%20%3C%2FlinearGradient%3E%20%3C%2Fdefs%3E%20%3Crect%20width%3D%22900%22%20height%3D%22560%22%20fill%3D%22url(%23bg)%22%2F%3E%20%3Ccircle%20cx%3D%22180%22%20cy%3D%22150%22%20r%3D%2286%22%20fill%3D%22%23fef3c7%22%20opacity%3D%220.9%22%2F%3E%20%3Ccircle%20cx%3D%22710%22%20cy%3D%22120%22%20r%3D%22120%22%20fill%3D%22%23bae6fd%22%20opacity%3D%220.42%22%2F%3E%20%3Ccircle%20cx%3D%22640%22%20cy%3D%22415%22%20r%3D%22180%22%20fill%3D%22%23f0abfc%22%20opacity%3D%220.35%22%2F%3E%20%3Cpath%20d%3D%22M%200%20410%20C%20160%20340%20260%20470%20430%20390%20C%20590%20315%20720%20395%20900%20330%20L%20900%20560%20L%200%20560%20Z%22%20fill%3D%22%23022c22%22%20opacity%3D%220.45%22%2F%3E%20%3Cpath%20d%3D%22M%200%20450%20C%20170%20390%20330%20510%20500%20425%20C%20660%20350%20760%20470%20900%20405%20L%20900%20560%20L%200%20560%20Z%22%20fill%3D%22%23020617%22%20opacity%3D%220.38%22%2F%3E%20%3Ctext%20x%3D%2260%22%20y%3D%22488%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2248%22%20font-weight%3D%22800%22%20fill%3D%22%23ffffff%22%3Eclip.d%20radius%20animation%3C%2Ftext%3E%20%3C%2Fsvg%3E",
|
|
38
|
+
"x": 210,
|
|
39
|
+
"y": 116,
|
|
40
|
+
"width": 540,
|
|
41
|
+
"height": 336,
|
|
42
|
+
"clip": {
|
|
43
|
+
"type": "path",
|
|
44
|
+
"d": "M 210 116 H 750 V 452 H 210 Z"
|
|
45
|
+
},
|
|
46
|
+
"timeline": {
|
|
47
|
+
"tracks": {
|
|
48
|
+
"clip.d": {
|
|
49
|
+
"keyframes": [
|
|
50
|
+
{
|
|
51
|
+
"time": 0,
|
|
52
|
+
"value": "M 210 116 H 750 V 452 H 210 Z"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"time": 0.0833,
|
|
56
|
+
"value": "M 210.42 116 H 749.58 Q 750 116 750 116.42 V 451.58 Q 750 452 749.58 452 H 210.42 Q 210 452 210 451.58 V 116.42 Q 210 116 210.42 116 Z"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"time": 0.1667,
|
|
60
|
+
"value": "M 211.67 116 H 748.33 Q 750 116 750 117.67 V 450.33 Q 750 452 748.33 452 H 211.67 Q 210 452 210 450.33 V 117.67 Q 210 116 211.67 116 Z"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"time": 0.25,
|
|
64
|
+
"value": "M 213.75 116 H 746.25 Q 750 116 750 119.75 V 448.25 Q 750 452 746.25 452 H 213.75 Q 210 452 210 448.25 V 119.75 Q 210 116 213.75 116 Z"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"time": 0.3333,
|
|
68
|
+
"value": "M 216.67 116 H 743.33 Q 750 116 750 122.67 V 445.33 Q 750 452 743.33 452 H 216.67 Q 210 452 210 445.33 V 122.67 Q 210 116 216.67 116 Z"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"time": 0.4167,
|
|
72
|
+
"value": "M 220.42 116 H 739.58 Q 750 116 750 126.42 V 441.58 Q 750 452 739.58 452 H 220.42 Q 210 452 210 441.58 V 126.42 Q 210 116 220.42 116 Z"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"time": 0.5,
|
|
76
|
+
"value": "M 225 116 H 735 Q 750 116 750 131 V 437 Q 750 452 735 452 H 225 Q 210 452 210 437 V 131 Q 210 116 225 116 Z"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"time": 0.5833,
|
|
80
|
+
"value": "M 230.41 116 H 729.59 Q 750 116 750 136.41 V 431.59 Q 750 452 729.59 452 H 230.41 Q 210 452 210 431.59 V 136.41 Q 210 116 230.41 116 Z"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"time": 0.6667,
|
|
84
|
+
"value": "M 236.67 116 H 723.33 Q 750 116 750 142.67 V 425.33 Q 750 452 723.33 452 H 236.67 Q 210 452 210 425.33 V 142.67 Q 210 116 236.67 116 Z"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"time": 0.75,
|
|
88
|
+
"value": "M 243.75 116 H 716.25 Q 750 116 750 149.75 V 418.25 Q 750 452 716.25 452 H 243.75 Q 210 452 210 418.25 V 149.75 Q 210 116 243.75 116 Z"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"time": 0.8333,
|
|
92
|
+
"value": "M 251.66 116 H 708.34 Q 750 116 750 157.66 V 410.34 Q 750 452 708.34 452 H 251.66 Q 210 452 210 410.34 V 157.66 Q 210 116 251.66 116 Z"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"time": 0.9167,
|
|
96
|
+
"value": "M 260.42 116 H 699.58 Q 750 116 750 166.42 V 401.58 Q 750 452 699.58 452 H 260.42 Q 210 452 210 401.58 V 166.42 Q 210 116 260.42 116 Z"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"time": 1,
|
|
100
|
+
"value": "M 270 116 H 690 Q 750 116 750 176 V 392 Q 750 452 690 452 H 270 Q 210 452 210 392 V 176 Q 210 116 270 116 Z"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"time": 1.0833,
|
|
104
|
+
"value": "M 279.58 116 H 680.42 Q 750 116 750 185.58 V 382.42 Q 750 452 680.42 452 H 279.58 Q 210 452 210 382.42 V 185.58 Q 210 116 279.58 116 Z"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"time": 1.1667,
|
|
108
|
+
"value": "M 288.34 116 H 671.66 Q 750 116 750 194.34 V 373.66 Q 750 452 671.66 452 H 288.34 Q 210 452 210 373.66 V 194.34 Q 210 116 288.34 116 Z"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"time": 1.25,
|
|
112
|
+
"value": "M 296.25 116 H 663.75 Q 750 116 750 202.25 V 365.75 Q 750 452 663.75 452 H 296.25 Q 210 452 210 365.75 V 202.25 Q 210 116 296.25 116 Z"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"time": 1.3333,
|
|
116
|
+
"value": "M 303.33 116 H 656.67 Q 750 116 750 209.33 V 358.67 Q 750 452 656.67 452 H 303.33 Q 210 452 210 358.67 V 209.33 Q 210 116 303.33 116 Z"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"time": 1.4167,
|
|
120
|
+
"value": "M 309.59 116 H 650.41 Q 750 116 750 215.59 V 352.41 Q 750 452 650.41 452 H 309.59 Q 210 452 210 352.41 V 215.59 Q 210 116 309.59 116 Z"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"time": 1.5,
|
|
124
|
+
"value": "M 315 116 H 645 Q 750 116 750 221 V 347 Q 750 452 645 452 H 315 Q 210 452 210 347 V 221 Q 210 116 315 116 Z"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"time": 1.5833,
|
|
128
|
+
"value": "M 319.58 116 H 640.42 Q 750 116 750 225.58 V 342.42 Q 750 452 640.42 452 H 319.58 Q 210 452 210 342.42 V 225.58 Q 210 116 319.58 116 Z"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"time": 1.6667,
|
|
132
|
+
"value": "M 323.33 116 H 636.67 Q 750 116 750 229.33 V 338.67 Q 750 452 636.67 452 H 323.33 Q 210 452 210 338.67 V 229.33 Q 210 116 323.33 116 Z"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"time": 1.75,
|
|
136
|
+
"value": "M 326.25 116 H 633.75 Q 750 116 750 232.25 V 335.75 Q 750 452 633.75 452 H 326.25 Q 210 452 210 335.75 V 232.25 Q 210 116 326.25 116 Z"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"time": 1.8333,
|
|
140
|
+
"value": "M 328.33 116 H 631.67 Q 750 116 750 234.33 V 333.67 Q 750 452 631.67 452 H 328.33 Q 210 452 210 333.67 V 234.33 Q 210 116 328.33 116 Z"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"time": 1.9167,
|
|
144
|
+
"value": "M 329.58 116 H 630.42 Q 750 116 750 235.58 V 332.42 Q 750 452 630.42 452 H 329.58 Q 210 452 210 332.42 V 235.58 Q 210 116 329.58 116 Z"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"time": 2,
|
|
148
|
+
"value": "M 330 116 H 630 Q 750 116 750 236 V 332 Q 750 452 630 452 H 330 Q 210 452 210 332 V 236 Q 210 116 330 116 Z"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"time": 2.0833,
|
|
152
|
+
"value": "M 329.58 116 H 630.42 Q 750 116 750 235.58 V 332.42 Q 750 452 630.42 452 H 329.58 Q 210 452 210 332.42 V 235.58 Q 210 116 329.58 116 Z"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"time": 2.1667,
|
|
156
|
+
"value": "M 328.33 116 H 631.67 Q 750 116 750 234.33 V 333.67 Q 750 452 631.67 452 H 328.33 Q 210 452 210 333.67 V 234.33 Q 210 116 328.33 116 Z"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"time": 2.25,
|
|
160
|
+
"value": "M 326.25 116 H 633.75 Q 750 116 750 232.25 V 335.75 Q 750 452 633.75 452 H 326.25 Q 210 452 210 335.75 V 232.25 Q 210 116 326.25 116 Z"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"time": 2.3333,
|
|
164
|
+
"value": "M 323.33 116 H 636.67 Q 750 116 750 229.33 V 338.67 Q 750 452 636.67 452 H 323.33 Q 210 452 210 338.67 V 229.33 Q 210 116 323.33 116 Z"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"time": 2.4167,
|
|
168
|
+
"value": "M 319.58 116 H 640.42 Q 750 116 750 225.58 V 342.42 Q 750 452 640.42 452 H 319.58 Q 210 452 210 342.42 V 225.58 Q 210 116 319.58 116 Z"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"time": 2.5,
|
|
172
|
+
"value": "M 315 116 H 645 Q 750 116 750 221 V 347 Q 750 452 645 452 H 315 Q 210 452 210 347 V 221 Q 210 116 315 116 Z"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"time": 2.5833,
|
|
176
|
+
"value": "M 309.59 116 H 650.41 Q 750 116 750 215.59 V 352.41 Q 750 452 650.41 452 H 309.59 Q 210 452 210 352.41 V 215.59 Q 210 116 309.59 116 Z"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"time": 2.6667,
|
|
180
|
+
"value": "M 303.33 116 H 656.67 Q 750 116 750 209.33 V 358.67 Q 750 452 656.67 452 H 303.33 Q 210 452 210 358.67 V 209.33 Q 210 116 303.33 116 Z"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"time": 2.75,
|
|
184
|
+
"value": "M 296.25 116 H 663.75 Q 750 116 750 202.25 V 365.75 Q 750 452 663.75 452 H 296.25 Q 210 452 210 365.75 V 202.25 Q 210 116 296.25 116 Z"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"time": 2.8333,
|
|
188
|
+
"value": "M 288.34 116 H 671.66 Q 750 116 750 194.34 V 373.66 Q 750 452 671.66 452 H 288.34 Q 210 452 210 373.66 V 194.34 Q 210 116 288.34 116 Z"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"time": 2.9167,
|
|
192
|
+
"value": "M 279.58 116 H 680.42 Q 750 116 750 185.58 V 382.42 Q 750 452 680.42 452 H 279.58 Q 210 452 210 382.42 V 185.58 Q 210 116 279.58 116 Z"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"time": 3,
|
|
196
|
+
"value": "M 270 116 H 690 Q 750 116 750 176 V 392 Q 750 452 690 452 H 270 Q 210 452 210 392 V 176 Q 210 116 270 116 Z"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"time": 3.0833,
|
|
200
|
+
"value": "M 260.42 116 H 699.58 Q 750 116 750 166.42 V 401.58 Q 750 452 699.58 452 H 260.42 Q 210 452 210 401.58 V 166.42 Q 210 116 260.42 116 Z"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"time": 3.1667,
|
|
204
|
+
"value": "M 251.66 116 H 708.34 Q 750 116 750 157.66 V 410.34 Q 750 452 708.34 452 H 251.66 Q 210 452 210 410.34 V 157.66 Q 210 116 251.66 116 Z"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"time": 3.25,
|
|
208
|
+
"value": "M 243.75 116 H 716.25 Q 750 116 750 149.75 V 418.25 Q 750 452 716.25 452 H 243.75 Q 210 452 210 418.25 V 149.75 Q 210 116 243.75 116 Z"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"time": 3.3333,
|
|
212
|
+
"value": "M 236.67 116 H 723.33 Q 750 116 750 142.67 V 425.33 Q 750 452 723.33 452 H 236.67 Q 210 452 210 425.33 V 142.67 Q 210 116 236.67 116 Z"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"time": 3.4167,
|
|
216
|
+
"value": "M 230.41 116 H 729.59 Q 750 116 750 136.41 V 431.59 Q 750 452 729.59 452 H 230.41 Q 210 452 210 431.59 V 136.41 Q 210 116 230.41 116 Z"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"time": 3.5,
|
|
220
|
+
"value": "M 225 116 H 735 Q 750 116 750 131 V 437 Q 750 452 735 452 H 225 Q 210 452 210 437 V 131 Q 210 116 225 116 Z"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"time": 3.5833,
|
|
224
|
+
"value": "M 220.42 116 H 739.58 Q 750 116 750 126.42 V 441.58 Q 750 452 739.58 452 H 220.42 Q 210 452 210 441.58 V 126.42 Q 210 116 220.42 116 Z"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"time": 3.6667,
|
|
228
|
+
"value": "M 216.67 116 H 743.33 Q 750 116 750 122.67 V 445.33 Q 750 452 743.33 452 H 216.67 Q 210 452 210 445.33 V 122.67 Q 210 116 216.67 116 Z"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"time": 3.75,
|
|
232
|
+
"value": "M 213.75 116 H 746.25 Q 750 116 750 119.75 V 448.25 Q 750 452 746.25 452 H 213.75 Q 210 452 210 448.25 V 119.75 Q 210 116 213.75 116 Z"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"time": 3.8333,
|
|
236
|
+
"value": "M 211.67 116 H 748.33 Q 750 116 750 117.67 V 450.33 Q 750 452 748.33 452 H 211.67 Q 210 452 210 450.33 V 117.67 Q 210 116 211.67 116 Z"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"time": 3.9167,
|
|
240
|
+
"value": "M 210.42 116 H 749.58 Q 750 116 750 116.42 V 451.58 Q 750 452 749.58 452 H 210.42 Q 210 452 210 451.58 V 116.42 Q 210 116 210.42 116 Z"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"time": 4,
|
|
244
|
+
"value": "M 210 116 H 750 V 452 H 210 Z"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"opacity": {
|
|
249
|
+
"keyframes": [
|
|
250
|
+
{
|
|
251
|
+
"time": 0,
|
|
252
|
+
"value": 0,
|
|
253
|
+
"out": {
|
|
254
|
+
"type": "cubicBezier",
|
|
255
|
+
"x1": 0,
|
|
256
|
+
"y1": 0,
|
|
257
|
+
"x2": 0.58,
|
|
258
|
+
"y2": 1
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"time": 0.35,
|
|
263
|
+
"value": 1
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
4
|
+
const width = 1440;
|
|
5
|
+
const height = 900;
|
|
6
|
+
const bg = "#f1f5f9";
|
|
7
|
+
const font = "Inter, system-ui, sans-serif";
|
|
8
|
+
|
|
9
|
+
const sidebarW = 240;
|
|
10
|
+
const sidebarBg = "#1e293b";
|
|
11
|
+
const mainX = sidebarW;
|
|
12
|
+
const mainW = width - sidebarW;
|
|
13
|
+
const mainPad = 40;
|
|
14
|
+
|
|
15
|
+
const colors = {
|
|
16
|
+
sidebarBg: "#1e293b",
|
|
17
|
+
sidebarSection: "#94a3b8",
|
|
18
|
+
sidebarLabel: "#e2e8f0",
|
|
19
|
+
sidebarLabelMuted: "#94a3b8",
|
|
20
|
+
sidebarActive: "#2563eb",
|
|
21
|
+
sidebarActiveBg: "#334155",
|
|
22
|
+
mainTitle: "#0f172a",
|
|
23
|
+
mainBody: "#475569",
|
|
24
|
+
caption: "#64748b",
|
|
25
|
+
cardBg: "#ffffff",
|
|
26
|
+
cardBorder: "#e2e8f0",
|
|
27
|
+
cardTitle: "#1e293b",
|
|
28
|
+
cardBody: "#64748b",
|
|
29
|
+
cardMeta: "#94a3b8",
|
|
30
|
+
chipBg: "#ffffff",
|
|
31
|
+
chipBorder: "#cbd5e1",
|
|
32
|
+
chipText: "#334155",
|
|
33
|
+
chipActiveBg: "#2563eb",
|
|
34
|
+
chipActiveText: "#ffffff",
|
|
35
|
+
divider: "#334155"
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const elements = [];
|
|
39
|
+
|
|
40
|
+
// === Sidebar background ===
|
|
41
|
+
elements.push({
|
|
42
|
+
id: "sidebar-bg",
|
|
43
|
+
type: "path",
|
|
44
|
+
d: `M 0 0 L ${sidebarW} 0 L ${sidebarW} ${height} L 0 ${height} Z`,
|
|
45
|
+
fill: colors.sidebarBg,
|
|
46
|
+
stroke: "none"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Sidebar logo / app name
|
|
50
|
+
elements.push({
|
|
51
|
+
id: "sidebar-logo",
|
|
52
|
+
type: "text",
|
|
53
|
+
x: 24,
|
|
54
|
+
y: 24,
|
|
55
|
+
text: "Acme Studio",
|
|
56
|
+
align: "left",
|
|
57
|
+
valign: "top",
|
|
58
|
+
fontSize: 16,
|
|
59
|
+
fontFamily: font,
|
|
60
|
+
weight: 700,
|
|
61
|
+
fill: colors.sidebarLabel
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
let sy = 72;
|
|
65
|
+
|
|
66
|
+
// --- Sidebar Section: Workspace ---
|
|
67
|
+
sy = sidebarSection("ws", "WORKSPACE", sy, [
|
|
68
|
+
{ id: "nav-dashboard", label: "Dashboard", active: false },
|
|
69
|
+
{ id: "nav-projects", label: "Projects", active: true },
|
|
70
|
+
{ id: "nav-tasks", label: "Tasks", active: false },
|
|
71
|
+
{ id: "nav-calendar", label: "Calendar", active: false }
|
|
72
|
+
]);
|
|
73
|
+
|
|
74
|
+
sy += 24;
|
|
75
|
+
|
|
76
|
+
// --- Sidebar Section: Analytics ---
|
|
77
|
+
sy = sidebarSection("an", "ANALYTICS", sy, [
|
|
78
|
+
{ id: "nav-overview", label: "Overview", active: false },
|
|
79
|
+
{ id: "nav-reports", label: "Reports", active: false },
|
|
80
|
+
{ id: "nav-exports", label: "Exports", active: false }
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
sy += 24;
|
|
84
|
+
|
|
85
|
+
// --- Sidebar Section: Settings ---
|
|
86
|
+
sy = sidebarSection("st", "SETTINGS", sy, [
|
|
87
|
+
{ id: "nav-general", label: "General", active: false },
|
|
88
|
+
{ id: "nav-team", label: "Team Members", active: false },
|
|
89
|
+
{ id: "nav-billing", label: "Billing", active: false },
|
|
90
|
+
{ id: "nav-integrations", label: "Integrations", active: false }
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
// === Main content area ===
|
|
94
|
+
let my = 32;
|
|
95
|
+
const mx = mainX + mainPad;
|
|
96
|
+
const mw = mainW - mainPad * 2;
|
|
97
|
+
|
|
98
|
+
// Main title
|
|
99
|
+
elements.push({
|
|
100
|
+
id: "main-title",
|
|
101
|
+
type: "text",
|
|
102
|
+
x: mx,
|
|
103
|
+
y: my,
|
|
104
|
+
text: "Projects",
|
|
105
|
+
align: "left",
|
|
106
|
+
valign: "top",
|
|
107
|
+
fontSize: 28,
|
|
108
|
+
fontFamily: font,
|
|
109
|
+
weight: 700,
|
|
110
|
+
fill: colors.mainTitle
|
|
111
|
+
});
|
|
112
|
+
my += 40;
|
|
113
|
+
|
|
114
|
+
// Summary paragraph
|
|
115
|
+
elements.push({
|
|
116
|
+
id: "main-summary",
|
|
117
|
+
type: "text",
|
|
118
|
+
x: mx,
|
|
119
|
+
y: my,
|
|
120
|
+
text: "Track active projects across your workspace. Filter by status or team to narrow\nresults. Each card shows the latest activity snapshot and assigned owner.",
|
|
121
|
+
align: "left",
|
|
122
|
+
valign: "top",
|
|
123
|
+
fontSize: 14,
|
|
124
|
+
fontFamily: font,
|
|
125
|
+
weight: 400,
|
|
126
|
+
lineHeight: 1.6,
|
|
127
|
+
fill: colors.mainBody,
|
|
128
|
+
maxWidth: mw
|
|
129
|
+
});
|
|
130
|
+
my += 52;
|
|
131
|
+
|
|
132
|
+
// Filter chips row (centered text in each chip)
|
|
133
|
+
const chips = [
|
|
134
|
+
{ label: "All", active: true },
|
|
135
|
+
{ label: "Active", active: false },
|
|
136
|
+
{ label: "Archived", active: false },
|
|
137
|
+
{ label: "My Team", active: false }
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
let chipX = mx;
|
|
141
|
+
const chipH = 30;
|
|
142
|
+
const chipR = 15;
|
|
143
|
+
const chipPadX = 16;
|
|
144
|
+
const chipGap = 10;
|
|
145
|
+
|
|
146
|
+
chips.forEach((chip, i) => {
|
|
147
|
+
const charW = chip.label.length * 7.5 + chipPadX * 2;
|
|
148
|
+
elements.push({
|
|
149
|
+
id: `chip-bg-${i}`,
|
|
150
|
+
type: "path",
|
|
151
|
+
d: roundedRect(chipX, my, charW, chipH, chipR),
|
|
152
|
+
fill: chip.active ? colors.chipActiveBg : colors.chipBg,
|
|
153
|
+
stroke: chip.active ? "none" : colors.chipBorder,
|
|
154
|
+
strokeWidth: chip.active ? 0 : 1
|
|
155
|
+
});
|
|
156
|
+
elements.push({
|
|
157
|
+
id: `chip-text-${i}`,
|
|
158
|
+
type: "text",
|
|
159
|
+
x: chipX + charW / 2,
|
|
160
|
+
y: my + chipH / 2,
|
|
161
|
+
text: chip.label,
|
|
162
|
+
align: "center",
|
|
163
|
+
valign: "middle",
|
|
164
|
+
fontSize: 13,
|
|
165
|
+
fontFamily: font,
|
|
166
|
+
weight: 500,
|
|
167
|
+
fill: chip.active ? colors.chipActiveText : colors.chipText
|
|
168
|
+
});
|
|
169
|
+
chipX += charW + chipGap;
|
|
170
|
+
});
|
|
171
|
+
my += chipH + 28;
|
|
172
|
+
|
|
173
|
+
// Table caption
|
|
174
|
+
elements.push({
|
|
175
|
+
id: "table-caption",
|
|
176
|
+
type: "text",
|
|
177
|
+
x: mx,
|
|
178
|
+
y: my,
|
|
179
|
+
text: "Showing 3 of 12 projects · Sorted by last activity",
|
|
180
|
+
align: "left",
|
|
181
|
+
valign: "top",
|
|
182
|
+
fontSize: 12,
|
|
183
|
+
fontFamily: font,
|
|
184
|
+
weight: 400,
|
|
185
|
+
fill: colors.caption
|
|
186
|
+
});
|
|
187
|
+
my += 28;
|
|
188
|
+
|
|
189
|
+
// === Content cards ===
|
|
190
|
+
const cards = [
|
|
191
|
+
{
|
|
192
|
+
id: "card-a",
|
|
193
|
+
title: "Design System v3",
|
|
194
|
+
body: "Component library refactor with updated tokens, accessibility\nimprovements, and new layout primitives for dashboard views.",
|
|
195
|
+
meta: "Updated 2 hours ago · Sarah K."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "card-b",
|
|
199
|
+
title: "API Gateway Migration",
|
|
200
|
+
body: "Moving from the legacy REST proxy to a new GraphQL federation\nlayer with per-service schema ownership and rate limiting.",
|
|
201
|
+
meta: "Updated 1 day ago · Marcus T."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: "card-c",
|
|
205
|
+
title: "Onboarding Flow Redesign",
|
|
206
|
+
body: "Streamlining the first-run experience with progressive disclosure,\nreduced form fields, and contextual help tooltips.",
|
|
207
|
+
meta: "Updated 3 days ago · Priya N."
|
|
208
|
+
}
|
|
209
|
+
];
|
|
210
|
+
|
|
211
|
+
const cardPad = 20;
|
|
212
|
+
const cardGap = 16;
|
|
213
|
+
const cardW = mw;
|
|
214
|
+
const cardH = 120;
|
|
215
|
+
|
|
216
|
+
cards.forEach((card, i) => {
|
|
217
|
+
const cy = my + i * (cardH + cardGap);
|
|
218
|
+
|
|
219
|
+
// Card background
|
|
220
|
+
elements.push({
|
|
221
|
+
id: `${card.id}-bg`,
|
|
222
|
+
type: "path",
|
|
223
|
+
d: roundedRect(mx, cy, cardW, cardH, 8),
|
|
224
|
+
fill: colors.cardBg,
|
|
225
|
+
stroke: colors.cardBorder,
|
|
226
|
+
strokeWidth: 1
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Card title
|
|
230
|
+
elements.push({
|
|
231
|
+
id: `${card.id}-title`,
|
|
232
|
+
type: "text",
|
|
233
|
+
x: mx + cardPad,
|
|
234
|
+
y: cy + 16,
|
|
235
|
+
text: card.title,
|
|
236
|
+
align: "left",
|
|
237
|
+
valign: "top",
|
|
238
|
+
fontSize: 16,
|
|
239
|
+
fontFamily: font,
|
|
240
|
+
weight: 600,
|
|
241
|
+
fill: colors.cardTitle
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// Card body
|
|
245
|
+
elements.push({
|
|
246
|
+
id: `${card.id}-body`,
|
|
247
|
+
type: "text",
|
|
248
|
+
x: mx + cardPad,
|
|
249
|
+
y: cy + 42,
|
|
250
|
+
text: card.body,
|
|
251
|
+
align: "left",
|
|
252
|
+
valign: "top",
|
|
253
|
+
fontSize: 13,
|
|
254
|
+
fontFamily: font,
|
|
255
|
+
weight: 400,
|
|
256
|
+
lineHeight: 1.55,
|
|
257
|
+
fill: colors.cardBody,
|
|
258
|
+
maxWidth: cardW - cardPad * 2
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// Card meta
|
|
262
|
+
elements.push({
|
|
263
|
+
id: `${card.id}-meta`,
|
|
264
|
+
type: "text",
|
|
265
|
+
x: mx + cardPad,
|
|
266
|
+
y: cy + cardH - 22,
|
|
267
|
+
text: card.meta,
|
|
268
|
+
align: "left",
|
|
269
|
+
valign: "top",
|
|
270
|
+
fontSize: 11,
|
|
271
|
+
fontFamily: font,
|
|
272
|
+
weight: 400,
|
|
273
|
+
fill: colors.cardMeta
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// --- Sidebar helpers ---
|
|
278
|
+
|
|
279
|
+
function sidebarSection(prefix, title, startY, items) {
|
|
280
|
+
let cy = startY;
|
|
281
|
+
|
|
282
|
+
// Section heading
|
|
283
|
+
elements.push({
|
|
284
|
+
id: `${prefix}-heading`,
|
|
285
|
+
type: "text",
|
|
286
|
+
x: 24,
|
|
287
|
+
y: cy,
|
|
288
|
+
text: title,
|
|
289
|
+
align: "left",
|
|
290
|
+
valign: "top",
|
|
291
|
+
fontSize: 10,
|
|
292
|
+
fontFamily: font,
|
|
293
|
+
weight: 600,
|
|
294
|
+
letterSpacing: 1,
|
|
295
|
+
fill: colors.sidebarSection
|
|
296
|
+
});
|
|
297
|
+
cy += 24;
|
|
298
|
+
|
|
299
|
+
items.forEach((item) => {
|
|
300
|
+
// Active highlight bg
|
|
301
|
+
if (item.active) {
|
|
302
|
+
elements.push({
|
|
303
|
+
id: `${item.id}-active-bg`,
|
|
304
|
+
type: "path",
|
|
305
|
+
d: roundedRect(12, cy - 4, sidebarW - 24, 30, 6),
|
|
306
|
+
fill: colors.sidebarActiveBg,
|
|
307
|
+
stroke: "none"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Nav label
|
|
312
|
+
elements.push({
|
|
313
|
+
id: item.id,
|
|
314
|
+
type: "text",
|
|
315
|
+
x: 24,
|
|
316
|
+
y: cy,
|
|
317
|
+
text: item.label,
|
|
318
|
+
align: "left",
|
|
319
|
+
valign: "top",
|
|
320
|
+
fontSize: 13,
|
|
321
|
+
fontFamily: font,
|
|
322
|
+
weight: item.active ? 500 : 400,
|
|
323
|
+
fill: item.active ? colors.sidebarLabel : colors.sidebarLabelMuted
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Active indicator bar
|
|
327
|
+
if (item.active) {
|
|
328
|
+
elements.push({
|
|
329
|
+
id: `${item.id}-indicator`,
|
|
330
|
+
type: "path",
|
|
331
|
+
d: `M 4 ${cy} L 4 ${cy + 18}`,
|
|
332
|
+
stroke: colors.sidebarActive,
|
|
333
|
+
strokeWidth: 3,
|
|
334
|
+
strokeCap: "round",
|
|
335
|
+
fill: "none"
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
cy += 34;
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
return cy;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function roundedRect(x, y, w, h, r) {
|
|
346
|
+
return [
|
|
347
|
+
`M ${x + r} ${y}`,
|
|
348
|
+
`L ${x + w - r} ${y}`,
|
|
349
|
+
`Q ${x + w} ${y} ${x + w} ${y + r}`,
|
|
350
|
+
`L ${x + w} ${y + h - r}`,
|
|
351
|
+
`Q ${x + w} ${y + h} ${x + w - r} ${y + h}`,
|
|
352
|
+
`L ${x + r} ${y + h}`,
|
|
353
|
+
`Q ${x} ${y + h} ${x} ${y + h - r}`,
|
|
354
|
+
`L ${x} ${y + r}`,
|
|
355
|
+
`Q ${x} ${y} ${x + r} ${y}`,
|
|
356
|
+
"Z"
|
|
357
|
+
].join(" ");
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const doc = {
|
|
361
|
+
version: 1,
|
|
362
|
+
canvas: { width, height, background: bg },
|
|
363
|
+
elements
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const outPath = path.join(__dirname, "app-screen.visual.json");
|
|
367
|
+
fs.writeFileSync(outPath, JSON.stringify(doc, null, 2));
|
|
368
|
+
console.log("Written:", outPath);
|