astryx-dracula 0.5.0 → 0.6.2
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/BRAND.md +3 -3
- package/README.md +7 -4
- package/USAGE.md +49 -49
- package/astryx-dracula.d.ts +2 -2
- package/astryx-dracula.js +25 -9
- package/astryx-dracula.variants.d.ts +2 -2
- package/astryx.integration.mjs +1 -1
- package/icons.mjs +21 -17
- package/icons.tsx +69 -62
- package/package.json +125 -120
- package/shared/auth-chrome-config.ts +6 -6
- package/shared/auth-chrome.tsx +143 -144
- package/shared/auth-copy.ts +14 -14
- package/shared/chaptered-doc-config.ts +48 -51
- package/shared/chaptered-doc.tsx +267 -289
- package/shared/chart-hues.ts +25 -10
- package/shared/chart-labels.tsx +31 -30
- package/shared/chart-legend.tsx +55 -56
- package/shared/chart-panel-style.ts +3 -3
- package/shared/data-bar.tsx +97 -102
- package/shared/format-money.ts +1 -1
- package/shared/gallery-image.ts +6 -6
- package/shared/login-demo.ts +1 -1
- package/shared/metric-card.tsx +101 -105
- package/shared/metric-delta.tsx +28 -27
- package/shared/order-desk.tsx +205 -216
- package/shared/revenue-chart.tsx +145 -165
- package/shared/scene-castle.tsx +206 -291
- package/shared/scene-frame.tsx +33 -32
- package/shared/scene-hues.ts +17 -17
- package/shared/scene-tile.tsx +88 -92
- package/shared/settings-data.ts +119 -125
- package/shared/settings-rows.tsx +122 -159
- package/shared/sparkline.tsx +75 -88
- package/shared/sso-icons.tsx +10 -22
- package/shared/stars.tsx +16 -25
- package/templates/ai-chat-landing.template.mjs +5 -4
- package/templates/ai-chat-landing.tsx +473 -460
- package/templates/ai-chat.template.mjs +5 -4
- package/templates/ai-chat.tsx +543 -612
- package/templates/blank.template.mjs +5 -4
- package/templates/blank.tsx +18 -14
- package/templates/centered-hero.template.mjs +5 -4
- package/templates/centered-hero.tsx +55 -68
- package/templates/classic-gallery.template.mjs +5 -4
- package/templates/classic-gallery.tsx +97 -104
- package/templates/contact-form.template.mjs +5 -4
- package/templates/contact-form.tsx +247 -282
- package/templates/dashboard-portfolio.template.mjs +5 -4
- package/templates/dashboard-portfolio.tsx +717 -548
- package/templates/dashboard.template.mjs +5 -4
- package/templates/dashboard.tsx +596 -567
- package/templates/detail-page.template.mjs +5 -4
- package/templates/detail-page.tsx +546 -603
- package/templates/documentation-design.template.mjs +5 -4
- package/templates/documentation-design.tsx +231 -243
- package/templates/documentation-technical.template.mjs +5 -4
- package/templates/documentation-technical.tsx +236 -239
- package/templates/documentation.template.mjs +5 -4
- package/templates/documentation.tsx +267 -279
- package/templates/editor.template.mjs +5 -4
- package/templates/editor.tsx +844 -877
- package/templates/file-explorer.template.mjs +5 -4
- package/templates/file-explorer.tsx +566 -590
- package/templates/form-two-column.template.mjs +5 -4
- package/templates/form-two-column.tsx +195 -210
- package/templates/gallery-hero.template.mjs +5 -4
- package/templates/gallery-hero.tsx +93 -114
- package/templates/ide.template.mjs +5 -4
- package/templates/ide.tsx +407 -453
- package/templates/incident-console.template.mjs +5 -4
- package/templates/incident-console.tsx +593 -575
- package/templates/kanban-board.template.mjs +5 -4
- package/templates/kanban-board.tsx +665 -683
- package/templates/library.template.mjs +5 -4
- package/templates/library.tsx +409 -430
- package/templates/login-card.template.mjs +5 -4
- package/templates/login-card.tsx +63 -72
- package/templates/login-split.template.mjs +5 -4
- package/templates/login-split.tsx +192 -193
- package/templates/login-sso.template.mjs +5 -4
- package/templates/login-sso.tsx +257 -258
- package/templates/login.template.mjs +5 -4
- package/templates/login.tsx +53 -49
- package/templates/messaging-shell.template.mjs +5 -4
- package/templates/messaging-shell.tsx +556 -574
- package/templates/mixed-gallery.template.mjs +5 -4
- package/templates/mixed-gallery.tsx +60 -58
- package/templates/payment-form.template.mjs +5 -4
- package/templates/payment-form.tsx +882 -991
- package/templates/product-detail.template.mjs +5 -4
- package/templates/product-detail.tsx +261 -272
- package/templates/product-gallery.template.mjs +5 -4
- package/templates/product-gallery.tsx +126 -137
- package/templates/product-tour.template.mjs +5 -4
- package/templates/product-tour.tsx +741 -773
- package/templates/settings-dialog.template.mjs +5 -4
- package/templates/settings-dialog.tsx +688 -717
- package/templates/settings-sidebar.template.mjs +5 -4
- package/templates/settings-sidebar.tsx +762 -807
- package/templates/settings.template.mjs +5 -4
- package/templates/settings.tsx +289 -304
- package/templates/shell-nav.template.mjs +5 -4
- package/templates/shell-nav.tsx +212 -219
- package/templates/shell-side-nav.template.mjs +5 -4
- package/templates/shell-side-nav.tsx +135 -157
- package/templates/shell-top-nav.template.mjs +5 -4
- package/templates/shell-top-nav.tsx +182 -203
- package/templates/side-gallery.template.mjs +5 -4
- package/templates/side-gallery.tsx +85 -90
- package/templates/table-grouped.template.mjs +5 -4
- package/templates/table-grouped.tsx +1000 -1053
- package/templates/table-page-chart.template.mjs +5 -4
- package/templates/table-page-chart.tsx +400 -398
- package/templates/table-page-heatmap-status.template.mjs +5 -4
- package/templates/table-page-heatmap-status.tsx +483 -512
- package/templates/table-page-shoe-store-heatmap.template.mjs +5 -4
- package/templates/table-page-shoe-store-heatmap.tsx +748 -746
- package/templates/table-page.template.mjs +5 -4
- package/templates/table-page.tsx +396 -405
- package/templates/table.template.mjs +5 -4
- package/templates/table.tsx +92 -93
- package/templates/tech-report.template.mjs +5 -4
- package/templates/tech-report.tsx +1316 -1304
- package/templates/theme-showcase.template.mjs +5 -4
- package/templates/theme-showcase.tsx +871 -951
- package/theme.css +35 -77
- package/theme.css.d.ts +9 -0
- package/tokens.css +373 -380
package/shared/scene-castle.tsx
CHANGED
|
@@ -7,316 +7,231 @@
|
|
|
7
7
|
// Moons are harvest yellow in every scene. Hills live in per-scene
|
|
8
8
|
// constants below.
|
|
9
9
|
|
|
10
|
-
import {galleryImage} from
|
|
10
|
+
import { galleryImage } from "astryx-dracula/shared/gallery-image";
|
|
11
11
|
|
|
12
|
-
export type SceneCastleVariant =
|
|
12
|
+
export type SceneCastleVariant = "wide" | "card" | "tall" | "rooftops";
|
|
13
13
|
|
|
14
14
|
const WIDE_HILLS = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
back: "M0 330 Q200 260 400 320 T800 300 V450 H0 Z",
|
|
16
|
+
front: "M0 385 Q240 320 480 375 T800 360 V450 H0 Z",
|
|
17
17
|
} as const;
|
|
18
18
|
|
|
19
19
|
const CARD_HILLS = {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
back: "M0 360 Q140 300 260 350 T400 335 V500 H0 Z",
|
|
21
|
+
front: "M0 420 Q160 365 300 410 T400 400 V500 H0 Z",
|
|
22
22
|
} as const;
|
|
23
23
|
|
|
24
|
-
const TALL_HILL =
|
|
24
|
+
const TALL_HILL = "M0 380 Q200 320 400 370 V500 H0 Z" as const;
|
|
25
25
|
|
|
26
26
|
function WideCastle() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
y="185"
|
|
97
|
-
width="44"
|
|
98
|
-
height="160"
|
|
99
|
-
rx={4}
|
|
100
|
-
fill="var(--dracula-bg-lighter)"
|
|
101
|
-
/>
|
|
102
|
-
<rect
|
|
103
|
-
x="246"
|
|
104
|
-
y="185"
|
|
105
|
-
width="44"
|
|
106
|
-
height="160"
|
|
107
|
-
rx={4}
|
|
108
|
-
fill="var(--dracula-bg-lighter)"
|
|
109
|
-
/>
|
|
110
|
-
<g fill="var(--dracula-bg-lighter)">
|
|
111
|
-
<rect x="130" y="175" width="12" height="14" rx={2} />
|
|
112
|
-
<rect x="149" y="175" width="12" height="14" rx={2} />
|
|
113
|
-
<rect x="246" y="175" width="12" height="14" rx={2} />
|
|
114
|
-
<rect x="265" y="175" width="12" height="14" rx={2} />
|
|
115
|
-
<rect x="150" y="215" width="14" height="16" rx={2} />
|
|
116
|
-
<rect x="173" y="215" width="14" height="16" rx={2} />
|
|
117
|
-
<rect x="196" y="215" width="14" height="16" rx={2} />
|
|
118
|
-
<rect x="219" y="215" width="14" height="16" rx={2} />
|
|
119
|
-
<rect x="242" y="215" width="14" height="16" rx={2} />
|
|
120
|
-
</g>
|
|
121
|
-
<g fill="var(--dracula-yellow)">
|
|
122
|
-
<rect x="168" y="255" width="14" height="20" rx={2} />
|
|
123
|
-
<rect x="203" y="255" width="14" height="20" rx={2} />
|
|
124
|
-
<rect x="238" y="255" width="14" height="20" rx={2} />
|
|
125
|
-
<rect x="143" y="215" width="10" height="14" rx={2} />
|
|
126
|
-
<rect x="259" y="215" width="10" height="14" rx={2} />
|
|
127
|
-
</g>
|
|
128
|
-
<path
|
|
129
|
-
d="M195 345 v-30 a15 15 0 0 1 30 0 v30 Z"
|
|
130
|
-
fill="var(--dracula-bg-dark)"
|
|
131
|
-
/>
|
|
132
|
-
</g>
|
|
133
|
-
</svg>
|
|
134
|
-
);
|
|
27
|
+
return (
|
|
28
|
+
<svg
|
|
29
|
+
style={galleryImage}
|
|
30
|
+
viewBox="0 0 800 450"
|
|
31
|
+
role="img"
|
|
32
|
+
aria-label="Moonlit castle on a hill in Dracula theme colors"
|
|
33
|
+
>
|
|
34
|
+
<rect width="800" height="450" fill="var(--dracula-bg-dark)" />
|
|
35
|
+
{/* Stars */}
|
|
36
|
+
<g fill="var(--dracula-comment)">
|
|
37
|
+
<circle cx="60" cy="60" r="2.5" />
|
|
38
|
+
<circle cx="180" cy="120" r="2" />
|
|
39
|
+
<circle cx="330" cy="50" r="2.5" />
|
|
40
|
+
<circle cx="470" cy="90" r="2" />
|
|
41
|
+
<circle cx="700" cy="200" r="2.5" />
|
|
42
|
+
<circle cx="750" cy="80" r="2" />
|
|
43
|
+
</g>
|
|
44
|
+
<g fill="var(--dracula-cyan)">
|
|
45
|
+
<circle cx="120" cy="90" r="2" />
|
|
46
|
+
<circle cx="270" cy="70" r="2.5" />
|
|
47
|
+
<circle cx="540" cy="50" r="2" />
|
|
48
|
+
<circle cx="660" cy="160" r="2" />
|
|
49
|
+
</g>
|
|
50
|
+
<g fill="var(--dracula-pink)">
|
|
51
|
+
<circle cx="90" cy="170" r="2" />
|
|
52
|
+
<circle cx="400" cy="130" r="2.5" />
|
|
53
|
+
<circle cx="590" cy="200" r="2" />
|
|
54
|
+
<circle cx="730" cy="260" r="2" />
|
|
55
|
+
</g>
|
|
56
|
+
{/* Harvest moon */}
|
|
57
|
+
<circle cx="620" cy="110" r="56" fill="var(--dracula-yellow)" />
|
|
58
|
+
<circle cx="600" cy="95" r="10" fill="var(--dracula-orange)" opacity={0.5} />
|
|
59
|
+
<circle cx="638" cy="125" r="7" fill="var(--dracula-orange)" opacity={0.5} />
|
|
60
|
+
{/* Bats */}
|
|
61
|
+
<g fill="none" stroke="var(--dracula-fg)" strokeWidth={4} strokeLinecap="round">
|
|
62
|
+
<path d="M120 130 q12 -12 24 0 q12 -12 24 0" />
|
|
63
|
+
<path d="M210 90 q9 -9 18 0 q9 -9 18 0" />
|
|
64
|
+
<path d="M470 160 q9 -9 18 0 q9 -9 18 0" />
|
|
65
|
+
</g>
|
|
66
|
+
{/* Hills */}
|
|
67
|
+
<path d={WIDE_HILLS.back} fill="var(--dracula-selection)" />
|
|
68
|
+
<path d={WIDE_HILLS.front} fill="var(--dracula-bg-light)" />
|
|
69
|
+
{/* Castle */}
|
|
70
|
+
<g>
|
|
71
|
+
<rect x="150" y="225" width="120" height="120" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
72
|
+
<rect x="130" y="185" width="44" height="160" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
73
|
+
<rect x="246" y="185" width="44" height="160" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
74
|
+
<g fill="var(--dracula-bg-lighter)">
|
|
75
|
+
<rect x="130" y="175" width="12" height="14" rx={2} />
|
|
76
|
+
<rect x="149" y="175" width="12" height="14" rx={2} />
|
|
77
|
+
<rect x="246" y="175" width="12" height="14" rx={2} />
|
|
78
|
+
<rect x="265" y="175" width="12" height="14" rx={2} />
|
|
79
|
+
<rect x="150" y="215" width="14" height="16" rx={2} />
|
|
80
|
+
<rect x="173" y="215" width="14" height="16" rx={2} />
|
|
81
|
+
<rect x="196" y="215" width="14" height="16" rx={2} />
|
|
82
|
+
<rect x="219" y="215" width="14" height="16" rx={2} />
|
|
83
|
+
<rect x="242" y="215" width="14" height="16" rx={2} />
|
|
84
|
+
</g>
|
|
85
|
+
<g fill="var(--dracula-yellow)">
|
|
86
|
+
<rect x="168" y="255" width="14" height="20" rx={2} />
|
|
87
|
+
<rect x="203" y="255" width="14" height="20" rx={2} />
|
|
88
|
+
<rect x="238" y="255" width="14" height="20" rx={2} />
|
|
89
|
+
<rect x="143" y="215" width="10" height="14" rx={2} />
|
|
90
|
+
<rect x="259" y="215" width="10" height="14" rx={2} />
|
|
91
|
+
</g>
|
|
92
|
+
<path d="M195 345 v-30 a15 15 0 0 1 30 0 v30 Z" fill="var(--dracula-bg-dark)" />
|
|
93
|
+
</g>
|
|
94
|
+
</svg>
|
|
95
|
+
);
|
|
135
96
|
}
|
|
136
97
|
|
|
137
98
|
function CardCastle() {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
rx={4}
|
|
183
|
-
fill="var(--dracula-bg-lighter)"
|
|
184
|
-
/>
|
|
185
|
-
<rect
|
|
186
|
-
x="118"
|
|
187
|
-
y="235"
|
|
188
|
-
width="44"
|
|
189
|
-
height="145"
|
|
190
|
-
rx={4}
|
|
191
|
-
fill="var(--dracula-bg-lighter)"
|
|
192
|
-
/>
|
|
193
|
-
<rect
|
|
194
|
-
x="238"
|
|
195
|
-
y="235"
|
|
196
|
-
width="44"
|
|
197
|
-
height="145"
|
|
198
|
-
rx={4}
|
|
199
|
-
fill="var(--dracula-bg-lighter)"
|
|
200
|
-
/>
|
|
201
|
-
<g fill="var(--dracula-yellow)">
|
|
202
|
-
<rect x="160" y="300" width="14" height="20" rx={2} />
|
|
203
|
-
<rect x="196" y="300" width="14" height="20" rx={2} />
|
|
204
|
-
<rect x="232" y="300" width="14" height="20" rx={2} />
|
|
205
|
-
<rect x="131" y="262" width="10" height="14" rx={2} />
|
|
206
|
-
<rect x="253" y="262" width="10" height="14" rx={2} />
|
|
207
|
-
</g>
|
|
208
|
-
<path
|
|
209
|
-
d="M185 380 v-28 a15 15 0 0 1 30 0 v28 Z"
|
|
210
|
-
fill="var(--dracula-bg-dark)"
|
|
211
|
-
/>
|
|
212
|
-
</g>
|
|
213
|
-
</svg>
|
|
214
|
-
);
|
|
99
|
+
return (
|
|
100
|
+
<svg
|
|
101
|
+
style={galleryImage}
|
|
102
|
+
viewBox="0 0 400 500"
|
|
103
|
+
role="img"
|
|
104
|
+
aria-label="Moonlit castle on midnight hills"
|
|
105
|
+
>
|
|
106
|
+
<rect width="400" height="500" fill="var(--dracula-bg-dark)" />
|
|
107
|
+
{/* Stars */}
|
|
108
|
+
<g fill="var(--dracula-comment)">
|
|
109
|
+
<circle cx="50" cy="60" r="2.5" />
|
|
110
|
+
<circle cx="140" cy="130" r="2" />
|
|
111
|
+
<circle cx="240" cy="50" r="2.5" />
|
|
112
|
+
<circle cx="330" cy="110" r="2" />
|
|
113
|
+
<circle cx="300" cy="200" r="2.5" />
|
|
114
|
+
</g>
|
|
115
|
+
<g fill="var(--dracula-cyan)">
|
|
116
|
+
<circle cx="95" cy="90" r="2" />
|
|
117
|
+
<circle cx="200" cy="100" r="2.5" />
|
|
118
|
+
<circle cx="360" cy="60" r="2" />
|
|
119
|
+
</g>
|
|
120
|
+
<circle cx="290" cy="120" r="52" fill="var(--dracula-yellow)" />
|
|
121
|
+
<circle cx="272" cy="106" r="9" fill="var(--dracula-orange)" opacity={0.5} />
|
|
122
|
+
<g fill="none" stroke="var(--dracula-fg)" strokeWidth={3} strokeLinecap="round">
|
|
123
|
+
<path d="M70 170 q12 -12 24 0 q12 -12 24 0" />
|
|
124
|
+
<path d="M150 130 q9 -9 18 0 q9 -9 18 0" />
|
|
125
|
+
</g>
|
|
126
|
+
<path d={CARD_HILLS.back} fill="var(--dracula-selection)" />
|
|
127
|
+
<path d={CARD_HILLS.front} fill="var(--dracula-bg-light)" />
|
|
128
|
+
<g>
|
|
129
|
+
<rect x="140" y="270" width="120" height="110" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
130
|
+
<rect x="118" y="235" width="44" height="145" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
131
|
+
<rect x="238" y="235" width="44" height="145" rx={4} fill="var(--dracula-bg-lighter)" />
|
|
132
|
+
<g fill="var(--dracula-yellow)">
|
|
133
|
+
<rect x="160" y="300" width="14" height="20" rx={2} />
|
|
134
|
+
<rect x="196" y="300" width="14" height="20" rx={2} />
|
|
135
|
+
<rect x="232" y="300" width="14" height="20" rx={2} />
|
|
136
|
+
<rect x="131" y="262" width="10" height="14" rx={2} />
|
|
137
|
+
<rect x="253" y="262" width="10" height="14" rx={2} />
|
|
138
|
+
</g>
|
|
139
|
+
<path d="M185 380 v-28 a15 15 0 0 1 30 0 v28 Z" fill="var(--dracula-bg-dark)" />
|
|
140
|
+
</g>
|
|
141
|
+
</svg>
|
|
142
|
+
);
|
|
215
143
|
}
|
|
216
144
|
|
|
217
145
|
function TallPines() {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
<path d="M260 250 q9 -9 18 0 q9 -9 18 0" />
|
|
260
|
-
</g>
|
|
261
|
-
<path d={TALL_HILL} fill="var(--dracula-selection)" />
|
|
262
|
-
<g fill="var(--dracula-bg-light)">
|
|
263
|
-
<path d="M70 500 V400 l28 -44 28 44 v100 Z" />
|
|
264
|
-
<path d="M170 500 V420 l28 -44 28 44 v80 Z" />
|
|
265
|
-
<path d="M270 500 V410 l28 -44 28 44 v90 Z" />
|
|
266
|
-
</g>
|
|
267
|
-
<g fill="var(--dracula-yellow)">
|
|
268
|
-
<rect x="81" y="442" width="8" height="12" rx={2} />
|
|
269
|
-
<rect x="181" y="458" width="8" height="12" rx={2} />
|
|
270
|
-
<rect x="281" y="450" width="8" height="12" rx={2} />
|
|
271
|
-
</g>
|
|
272
|
-
</svg>
|
|
273
|
-
);
|
|
146
|
+
return (
|
|
147
|
+
<svg
|
|
148
|
+
style={galleryImage}
|
|
149
|
+
viewBox="0 0 400 500"
|
|
150
|
+
role="img"
|
|
151
|
+
aria-label="Harvest moon over midnight pines"
|
|
152
|
+
>
|
|
153
|
+
<rect width="400" height="500" fill="var(--dracula-bg-dark)" />
|
|
154
|
+
{/* Stars */}
|
|
155
|
+
<g fill="var(--dracula-pink)">
|
|
156
|
+
<circle cx="60" cy="80" r="2" />
|
|
157
|
+
<circle cx="160" cy="50" r="2.5" />
|
|
158
|
+
<circle cx="320" cy="70" r="2" />
|
|
159
|
+
<circle cx="90" cy="190" r="2.5" />
|
|
160
|
+
<circle cx="250" cy="160" r="2" />
|
|
161
|
+
</g>
|
|
162
|
+
<g fill="var(--dracula-cyan)">
|
|
163
|
+
<circle cx="110" cy="120" r="2" />
|
|
164
|
+
<circle cx="220" cy="90" r="2" />
|
|
165
|
+
<circle cx="350" cy="150" r="2.5" />
|
|
166
|
+
</g>
|
|
167
|
+
<circle cx="200" cy="190" r="72" fill="var(--dracula-yellow)" />
|
|
168
|
+
<circle cx="176" cy="170" r="12" fill="var(--dracula-orange)" opacity={0.5} />
|
|
169
|
+
<circle cx="222" cy="210" r="8" fill="var(--dracula-orange)" opacity={0.5} />
|
|
170
|
+
<g fill="none" stroke="var(--dracula-fg)" strokeWidth={3} strokeLinecap="round">
|
|
171
|
+
<path d="M90 260 q12 -12 24 0 q12 -12 24 0" />
|
|
172
|
+
<path d="M260 250 q9 -9 18 0 q9 -9 18 0" />
|
|
173
|
+
</g>
|
|
174
|
+
<path d={TALL_HILL} fill="var(--dracula-selection)" />
|
|
175
|
+
<g fill="var(--dracula-bg-light)">
|
|
176
|
+
<path d="M70 500 V400 l28 -44 28 44 v100 Z" />
|
|
177
|
+
<path d="M170 500 V420 l28 -44 28 44 v80 Z" />
|
|
178
|
+
<path d="M270 500 V410 l28 -44 28 44 v90 Z" />
|
|
179
|
+
</g>
|
|
180
|
+
<g fill="var(--dracula-yellow)">
|
|
181
|
+
<rect x="81" y="442" width="8" height="12" rx={2} />
|
|
182
|
+
<rect x="181" y="458" width="8" height="12" rx={2} />
|
|
183
|
+
<rect x="281" y="450" width="8" height="12" rx={2} />
|
|
184
|
+
</g>
|
|
185
|
+
</svg>
|
|
186
|
+
);
|
|
274
187
|
}
|
|
275
188
|
|
|
276
189
|
function Rooftops() {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
190
|
+
return (
|
|
191
|
+
<svg
|
|
192
|
+
style={galleryImage}
|
|
193
|
+
viewBox="0 0 400 300"
|
|
194
|
+
preserveAspectRatio="xMidYMid slice"
|
|
195
|
+
role="img"
|
|
196
|
+
aria-label="Harvest moon over the castle rooftops"
|
|
197
|
+
>
|
|
198
|
+
<rect width="400" height="300" fill="var(--dracula-bg)" />
|
|
199
|
+
<g fill="var(--dracula-fg)">
|
|
200
|
+
<circle cx="68" cy="52" r="2" />
|
|
201
|
+
<circle cx="330" cy="70" r="2" />
|
|
202
|
+
</g>
|
|
203
|
+
<g fill="var(--dracula-comment)">
|
|
204
|
+
<circle cx="140" cy="36" r="1.5" />
|
|
205
|
+
<circle cx="292" cy="34" r="1.5" />
|
|
206
|
+
<circle cx="360" cy="140" r="1.5" />
|
|
207
|
+
</g>
|
|
208
|
+
<circle cx="200" cy="118" r="52" fill="var(--dracula-yellow)" />
|
|
209
|
+
<circle cx="182" cy="104" r="44" fill="var(--dracula-bg)" />
|
|
210
|
+
<g
|
|
211
|
+
fill="var(--dracula-current-line)"
|
|
212
|
+
stroke="var(--dracula-comment)"
|
|
213
|
+
strokeWidth="3"
|
|
214
|
+
strokeLinejoin="round"
|
|
215
|
+
>
|
|
216
|
+
<rect x="20" y="220" width="110" height="80" />
|
|
217
|
+
<path d="M20 220 L75 178 L130 220 Z" />
|
|
218
|
+
<rect x="150" y="200" width="100" height="100" />
|
|
219
|
+
<path d="M150 200 L200 162 L250 200 Z" />
|
|
220
|
+
<rect x="270" y="228" width="110" height="72" />
|
|
221
|
+
<path d="M270 228 L325 190 L380 228 Z" />
|
|
222
|
+
</g>
|
|
223
|
+
<g fill="var(--dracula-yellow)">
|
|
224
|
+
<rect x="58" y="244" width="14" height="18" />
|
|
225
|
+
<rect x="188" y="224" width="14" height="18" />
|
|
226
|
+
<rect x="312" y="250" width="14" height="18" />
|
|
227
|
+
</g>
|
|
228
|
+
</svg>
|
|
229
|
+
);
|
|
315
230
|
}
|
|
316
231
|
|
|
317
|
-
export function SceneCastle({variant}: {variant: SceneCastleVariant}) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
232
|
+
export function SceneCastle({ variant }: { variant: SceneCastleVariant }) {
|
|
233
|
+
if (variant === "wide") return <WideCastle />;
|
|
234
|
+
if (variant === "card") return <CardCastle />;
|
|
235
|
+
if (variant === "rooftops") return <Rooftops />;
|
|
236
|
+
return <TallPines />;
|
|
322
237
|
}
|
package/shared/scene-frame.tsx
CHANGED
|
@@ -47,42 +47,43 @@
|
|
|
47
47
|
//
|
|
48
48
|
// Not interactive. A scene is artwork, not a control: no hover, no focus ring.
|
|
49
49
|
|
|
50
|
-
import type {CSSProperties, ReactNode} from
|
|
50
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
51
51
|
|
|
52
52
|
export interface SceneFrameProps {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
/** Accessible name for the art. Required and unique per instance: four or
|
|
54
|
+
* more scenes sharing one name is the a11y defect the Sparkline `label` prop
|
|
55
|
+
* was extracted to fix. */
|
|
56
|
+
label: string;
|
|
57
|
+
/** Scene contents. Any <defs> and gradient ids belong to the caller. */
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
/** @default '0 0 400 225' */
|
|
60
|
+
viewBox?: string;
|
|
61
|
+
/** Backdrop fill painted behind the scene. @default 'var(--dracula-bg-dark)' */
|
|
62
|
+
fill?: string;
|
|
63
|
+
/** Paints the backdrop rect. Set false when the scene draws its own. @default true */
|
|
64
|
+
hasBackdrop?: boolean;
|
|
65
|
+
/** Forwarded to the root svg. */
|
|
66
|
+
style?: CSSProperties;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export function SceneFrame({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
label,
|
|
71
|
+
children,
|
|
72
|
+
viewBox = "0 0 400 225",
|
|
73
|
+
fill = "var(--dracula-bg-dark)",
|
|
74
|
+
hasBackdrop = true,
|
|
75
|
+
style,
|
|
76
76
|
}: SceneFrameProps) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
return (
|
|
78
|
+
<svg
|
|
79
|
+
viewBox={viewBox}
|
|
80
|
+
preserveAspectRatio="xMidYMid slice"
|
|
81
|
+
style={{ width: "100%", height: "100%", display: "block", ...style }}
|
|
82
|
+
role="img"
|
|
83
|
+
aria-label={label}
|
|
84
|
+
>
|
|
85
|
+
{hasBackdrop ? <rect width="100%" height="100%" fill={fill} /> : null}
|
|
86
|
+
{children}
|
|
87
|
+
</svg>
|
|
88
|
+
);
|
|
88
89
|
}
|