@spunto/design-system 0.74.0 → 0.76.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/package.json
CHANGED
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
import { cn } from "../../utils"
|
|
19
19
|
import { Button } from "../button"
|
|
20
20
|
import { Input } from "../input"
|
|
21
|
-
import { Switch } from "../switch"
|
|
22
21
|
import { Textarea } from "../textarea"
|
|
23
22
|
import { ExtensionPicker } from "./extension-picker"
|
|
24
23
|
import { FeaturePicker, type FeaturePickerProps } from "./feature-picker"
|
|
@@ -55,7 +54,6 @@ const SECTION_META: Record<
|
|
|
55
54
|
lifecycle: { icon: TerminalIcon, accent: "ship", title: "Lifecycle", hint: "Commands run on create & on every start" },
|
|
56
55
|
ports: { icon: NetworkIcon, accent: "run", title: "Ports", hint: "Automatically forwarded for every worker" },
|
|
57
56
|
prewarm: { icon: LayersIcon, accent: "build", title: "Prewarm images", hint: "Docker images pre-loaded into the worker's docker-in-docker on first start" },
|
|
58
|
-
docker: { icon: BoxIcon, accent: "build", title: "Docker-in-Docker", hint: "Run workers privileged with a Docker daemon inside" },
|
|
59
57
|
secrets: { icon: KeyRoundIcon, accent: "flame", title: "Secrets", hint: "Env vars injected into every workspace" },
|
|
60
58
|
}
|
|
61
59
|
|
|
@@ -71,7 +69,6 @@ const DEFAULT_ADVANCED: InternalSectionId[] = [
|
|
|
71
69
|
"lifecycle",
|
|
72
70
|
"ports",
|
|
73
71
|
"prewarm",
|
|
74
|
-
"docker",
|
|
75
72
|
"secrets",
|
|
76
73
|
]
|
|
77
74
|
|
|
@@ -109,9 +106,9 @@ export const DEFAULT_GROUPS: ProjectFormGroup[] = [
|
|
|
109
106
|
{
|
|
110
107
|
id: "runtime",
|
|
111
108
|
title: "Runtime",
|
|
112
|
-
hint: "How a running worker behaves: forwarded ports, preloaded images
|
|
109
|
+
hint: "How a running worker behaves: forwarded ports, preloaded images.",
|
|
113
110
|
icon: NetworkIcon,
|
|
114
|
-
sections: ["ports", "prewarm"
|
|
111
|
+
sections: ["ports", "prewarm"],
|
|
115
112
|
},
|
|
116
113
|
{
|
|
117
114
|
id: "secrets",
|
|
@@ -697,23 +694,6 @@ export function ProjectForm<TValue extends ProjectFormValue = ProjectFormValue>(
|
|
|
697
694
|
</Field>
|
|
698
695
|
)
|
|
699
696
|
|
|
700
|
-
case "docker":
|
|
701
|
-
return (
|
|
702
|
-
<label className="flex cursor-pointer items-start justify-between gap-4 rounded-md border bg-muted/30 px-3 py-2.5">
|
|
703
|
-
<span className="space-y-0.5">
|
|
704
|
-
<span className="block text-sm leading-none font-medium">Enable Docker-in-Docker</span>
|
|
705
|
-
<span className="block text-xs text-muted-foreground">
|
|
706
|
-
Runs each worker privileged with <code>dockerd</code> and dedicated{" "}
|
|
707
|
-
<code>/var/lib/docker</code> volumes. Use with a base image that bakes Docker — no{" "}
|
|
708
|
-
<code>docker-in-docker</code> feature needed.
|
|
709
|
-
</span>
|
|
710
|
-
</span>
|
|
711
|
-
<Switch
|
|
712
|
-
checked={value.dockerInDocker}
|
|
713
|
-
onCheckedChange={(checked) => patch({ dockerInDocker: checked })}
|
|
714
|
-
/>
|
|
715
|
-
</label>
|
|
716
|
-
)
|
|
717
697
|
|
|
718
698
|
case "secrets":
|
|
719
699
|
return (
|
|
@@ -809,8 +789,6 @@ export function manifestRows<TValue extends ProjectFormValue>(
|
|
|
809
789
|
rows.push({ label: "ports", value: value.forwardPorts.join(", ") || "—", done: value.forwardPorts.length > 0 })
|
|
810
790
|
if (shown.has("prewarm"))
|
|
811
791
|
rows.push({ label: "prewarm", value: `${value.prewarmImages.length}`, done: value.prewarmImages.length > 0 })
|
|
812
|
-
if (shown.has("docker"))
|
|
813
|
-
rows.push({ label: "docker", value: value.dockerInDocker ? "in-docker" : "off", done: value.dockerInDocker })
|
|
814
792
|
if (shown.has("secrets")) {
|
|
815
793
|
const n = value.secrets.length + savedSecrets.filter((x) => !value.removedSecretIds.includes(x.id)).length
|
|
816
794
|
rows.push({ label: "secrets", value: `${n}`, done: n > 0 })
|
|
@@ -47,8 +47,6 @@ export function sectionSummary<TValue extends ProjectFormValue>(
|
|
|
47
47
|
return value.forwardPorts.length ? `ports ${value.forwardPorts.join(", ")}` : null
|
|
48
48
|
case "prewarm":
|
|
49
49
|
return value.prewarmImages.length ? `${value.prewarmImages.length} prewarm` : null
|
|
50
|
-
case "docker":
|
|
51
|
-
return value.dockerInDocker ? "docker-in-docker" : null
|
|
52
50
|
case "secrets": {
|
|
53
51
|
const n = value.secrets.length + savedSecrets.filter((x) => !value.removedSecretIds.includes(x.id)).length
|
|
54
52
|
return n ? plural(n, "secret") : null
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Same rule as the rest of the package: this is NOT an app's OpenAPI type. The
|
|
4
4
|
// dashboard's create payload and its update payload already differ from each
|
|
5
|
-
// other (creation has no ports/prewarm
|
|
5
|
+
// other (creation has no ports/prewarm, update has no inline secrets), and
|
|
6
6
|
// Spunto Lite's project is smaller still. So the form owns one **complete**
|
|
7
7
|
// value — every field present, never undefined — and each app maps it to its own
|
|
8
8
|
// payload on submit. A complete value is what makes the form controllable
|
|
@@ -100,10 +100,9 @@ export interface ProjectFormValue {
|
|
|
100
100
|
removedSecretIds: string[]
|
|
101
101
|
forwardPorts: number[]
|
|
102
102
|
prewarmImages: string[]
|
|
103
|
-
dockerInDocker: boolean
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
/** The
|
|
105
|
+
/** The nine sections the package models and draws itself. */
|
|
107
106
|
export type InternalSectionId =
|
|
108
107
|
| "identity"
|
|
109
108
|
| "image"
|
|
@@ -113,14 +112,13 @@ export type InternalSectionId =
|
|
|
113
112
|
| "lifecycle"
|
|
114
113
|
| "ports"
|
|
115
114
|
| "prewarm"
|
|
116
|
-
| "docker"
|
|
117
115
|
| "secrets"
|
|
118
116
|
|
|
119
117
|
/**
|
|
120
|
-
* A section of the form: one of the
|
|
118
|
+
* A section of the form: one of the nine above, or the id of a card the app
|
|
121
119
|
* brings itself through `customSections`.
|
|
122
120
|
*
|
|
123
|
-
* Open on purpose, and `(string & {})` rather than plain `string` so the
|
|
121
|
+
* Open on purpose, and `(string & {})` rather than plain `string` so the nine
|
|
124
122
|
* known ids keep their autocompletion — a closed union meant an app with a field
|
|
125
123
|
* of its own had to either hang it under an unrelated section via `extras` or
|
|
126
124
|
* draw its own card outside the form, losing the numbering, the fold and the
|
|
@@ -193,11 +191,10 @@ export const INTERNAL_SECTION_IDS: readonly InternalSectionId[] = [
|
|
|
193
191
|
"lifecycle",
|
|
194
192
|
"ports",
|
|
195
193
|
"prewarm",
|
|
196
|
-
"docker",
|
|
197
194
|
"secrets",
|
|
198
195
|
]
|
|
199
196
|
|
|
200
|
-
/** True for the
|
|
197
|
+
/** True for the nine sections the package draws itself. */
|
|
201
198
|
export function isInternalSectionId(id: ProjectFormSectionId): id is InternalSectionId {
|
|
202
199
|
return (INTERNAL_SECTION_IDS as readonly string[]).includes(id)
|
|
203
200
|
}
|
|
@@ -223,7 +220,6 @@ export const EDIT_SECTIONS: ProjectFormSectionId[] = [
|
|
|
223
220
|
"lifecycle",
|
|
224
221
|
"ports",
|
|
225
222
|
"prewarm",
|
|
226
|
-
"docker",
|
|
227
223
|
"secrets",
|
|
228
224
|
]
|
|
229
225
|
|
|
@@ -248,7 +244,6 @@ export function emptyProjectFormValue(): ProjectFormValue {
|
|
|
248
244
|
removedSecretIds: [],
|
|
249
245
|
forwardPorts: [],
|
|
250
246
|
prewarmImages: [],
|
|
251
|
-
dockerInDocker: false,
|
|
252
247
|
}
|
|
253
248
|
}
|
|
254
249
|
|
package/styles.css
CHANGED
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
--color-flame: var(--flame);
|
|
194
194
|
--color-field: var(--field);
|
|
195
195
|
--color-signal: var(--signal);
|
|
196
|
+
/* @brand-kit:begin theme — generated from packages/brand-kit/src/paints.ts (npm run paint), don't edit */
|
|
196
197
|
--color-cloud: var(--cloud);
|
|
197
198
|
--color-cloud-field: var(--cloud-field);
|
|
198
199
|
--color-cloud-signal: var(--cloud-signal);
|
|
@@ -214,6 +215,7 @@
|
|
|
214
215
|
--color-ds: var(--ds);
|
|
215
216
|
--color-ds-field: var(--ds-field);
|
|
216
217
|
--color-ds-signal: var(--ds-signal);
|
|
218
|
+
/* @brand-kit:end theme */
|
|
217
219
|
/* Marketing surfaces — the two fixed dark values (see `--night` below) */
|
|
218
220
|
--color-night: var(--night);
|
|
219
221
|
--color-code-surface: var(--code-surface);
|
|
@@ -251,6 +253,7 @@
|
|
|
251
253
|
* Token *names* are shadcn's (https://ui.shadcn.com, MIT) plus ours; `--flame`
|
|
252
254
|
* is the legacy name of the brand colour and follows `--primary`. */
|
|
253
255
|
:root {
|
|
256
|
+
/* @brand-kit:begin shelf — generated from packages/brand-kit/src/paints.ts (npm run paint), don't edit */
|
|
254
257
|
--cloud-field: oklch(0.22 0.012 165);
|
|
255
258
|
--cloud-signal: oklch(0.87 0.14 86);
|
|
256
259
|
--cloud: oklch(0.56 0.12 72);
|
|
@@ -272,6 +275,7 @@
|
|
|
272
275
|
--ds-field: oklch(0.22 0.012 165);
|
|
273
276
|
--ds-signal: oklch(0.96 0.01 150);
|
|
274
277
|
--ds: oklch(0.30 0.02 165);
|
|
278
|
+
/* @brand-kit:end shelf */
|
|
275
279
|
}
|
|
276
280
|
|
|
277
281
|
:root {
|
|
@@ -304,6 +308,7 @@
|
|
|
304
308
|
--sidebar: oklch(0.97 0.004 160);
|
|
305
309
|
--sidebar-foreground: oklch(0.21 0.015 165);
|
|
306
310
|
--sidebar-border: oklch(0.905 0.006 160);
|
|
311
|
+
/* @brand-kit:begin default-light — generated from packages/brand-kit/src/paints.ts (npm run paint), don't edit */
|
|
307
312
|
--field: oklch(0.22 0.012 165);
|
|
308
313
|
--signal: oklch(0.87 0.14 86);
|
|
309
314
|
--tone: oklch(0.42 0.02 165);
|
|
@@ -318,6 +323,7 @@
|
|
|
318
323
|
--sidebar-accent-foreground: oklch(0.36 0.08 72);
|
|
319
324
|
--sidebar-ring: oklch(0.56 0.12 72);
|
|
320
325
|
--flame: oklch(0.56 0.12 72);
|
|
326
|
+
/* @brand-kit:end default-light */
|
|
321
327
|
}
|
|
322
328
|
|
|
323
329
|
.dark {
|
|
@@ -347,6 +353,7 @@
|
|
|
347
353
|
--sidebar: oklch(0.185 0.009 165);
|
|
348
354
|
--sidebar-foreground: oklch(0.95 0.006 150);
|
|
349
355
|
--sidebar-border: oklch(0.93 0.01 150 / 11%);
|
|
356
|
+
/* @brand-kit:begin default-dark — generated from packages/brand-kit/src/paints.ts (npm run paint), don't edit */
|
|
350
357
|
--field: oklch(0.22 0.012 165);
|
|
351
358
|
--signal: oklch(0.87 0.14 86);
|
|
352
359
|
--tone: oklch(0.42 0.02 165);
|
|
@@ -361,9 +368,11 @@
|
|
|
361
368
|
--sidebar-accent-foreground: oklch(0.95 0.01 165);
|
|
362
369
|
--sidebar-ring: oklch(0.87 0.14 86);
|
|
363
370
|
--flame: oklch(0.87 0.14 86);
|
|
371
|
+
/* @brand-kit:end default-dark */
|
|
364
372
|
}
|
|
365
373
|
|
|
366
374
|
/* ─── The products ───────────────────────────────────────────────────────── */
|
|
375
|
+
/* @brand-kit:begin products — generated from packages/brand-kit/src/paints.ts (npm run paint), don't edit */
|
|
367
376
|
/* Spunto Cloud — graphite / amber since 2026-10-31 (the `graphite-amber` palette;
|
|
368
377
|
on light the primary is a deep amber, oklch(0.56 0.12 72), white text 4.8:1,
|
|
369
378
|
rather than the palette's graphite tone); dusk violet / amber from 2026-10-26
|
|
@@ -505,8 +514,8 @@
|
|
|
505
514
|
--flame: oklch(0.85 0.10 228);
|
|
506
515
|
}
|
|
507
516
|
/* Spunto Browser — dusk violet / amber (Cloud's pair from 2026-10-26 to
|
|
508
|
-
2026-10-31
|
|
509
|
-
|
|
517
|
+
2026-10-31). Browser became Spunto Desktop on 2026-11-06, which wears it; the
|
|
518
|
+
dashboard's « Violet » wears it too */
|
|
510
519
|
[data-product="browser"] {
|
|
511
520
|
--field: oklch(0.27 0.07 292);
|
|
512
521
|
--signal: oklch(0.87 0.14 86);
|
|
@@ -662,6 +671,7 @@
|
|
|
662
671
|
--sidebar-ring: oklch(0.96 0.01 150);
|
|
663
672
|
--flame: oklch(0.96 0.01 150);
|
|
664
673
|
}
|
|
674
|
+
/* @brand-kit:end products */
|
|
665
675
|
|
|
666
676
|
/* ─── Marketing night surfaces — deliberately NOT themed ─────────────────────
|
|
667
677
|
*
|