@spunto/brand-kit 0.8.0 → 0.9.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 +1 -1
- package/src/home/editions/desktop.json +386 -0
- package/src/home/editions.ts +1 -1
- package/src/home/home.tsx +3 -1
- package/src/home/showcase/catalog.ts +35 -3
- package/src/home/showcase/desktop/desk.tsx +195 -0
- package/src/home/showcase/desktop/drive.tsx +71 -0
- package/src/home/showcase/desktop/handoff.tsx +94 -0
- package/src/home/showcase/desktop/launcher.tsx +161 -0
- package/src/home/showcase/desktop/parts.tsx +388 -0
- package/src/home/showcase/desktop/sample.ts +157 -0
- package/src/home/showcase/desktop/wall.tsx +85 -0
- package/src/home/showcase/stage.tsx +17 -5
- package/src/home/showcase/view.tsx +8 -0
|
@@ -226,8 +226,8 @@ export function Float({ x, y, w, depth, show = true, children, style }: { x: num
|
|
|
226
226
|
)
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
/** A dark card of code: a request, a payload. `lines` are printed as they are; one can be lit (`hot`)
|
|
230
|
-
export function CodeCard({ title, meta, lines, signal }: { title: string; meta?: string; lines: { text: string; hot?: boolean; hidden?: boolean }[]; signal: string }) {
|
|
229
|
+
/** A dark card of code: a request, a payload. `lines` are printed as they are; one can be lit (`hot`), held back (`hidden`) or said lower (`dim`: a comment). */
|
|
230
|
+
export function CodeCard({ title, meta, lines, signal }: { title: string; meta?: string; lines: { text: string; hot?: boolean; hidden?: boolean; dim?: boolean }[]; signal: string }) {
|
|
231
231
|
return (
|
|
232
232
|
<div style={{ background: "#151019", color: "#e9e4ec" }}>
|
|
233
233
|
<div style={{ display: "flex", alignItems: "center", gap: u(7), padding: `${u(8)} ${u(12)}`, borderBottom: "1px solid rgba(255,255,255,0.1)", fontSize: u(10.5), fontWeight: 600 }}>
|
|
@@ -244,7 +244,7 @@ export function CodeCard({ title, meta, lines, signal }: { title: string; meta?:
|
|
|
244
244
|
maxHeight: l.hidden ? 0 : u(18),
|
|
245
245
|
opacity: l.hidden ? 0 : 1,
|
|
246
246
|
background: l.hot ? hexAlpha(signal, 0.16) : "transparent",
|
|
247
|
-
color: l.hot ? signal : undefined,
|
|
247
|
+
color: l.hot ? signal : l.dim ? "rgba(255,255,255,0.5)" : undefined,
|
|
248
248
|
boxShadow: l.hot ? `inset ${u(2)} 0 0 ${signal}` : "none",
|
|
249
249
|
transition: "background 0.4s ease, color 0.4s ease, max-height 0.4s ease, opacity 0.4s ease",
|
|
250
250
|
}}
|
|
@@ -258,7 +258,7 @@ export function CodeCard({ title, meta, lines, signal }: { title: string; meta?:
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
/** The pointer. Positions are the window's design pixels. */
|
|
261
|
-
export function Cursor({ x, y, down, hidden, ms = 700 }: { x: number; y: number; down?: boolean; hidden?: boolean; ms?: number }) {
|
|
261
|
+
export function Cursor({ x, y, down, hidden, ms = 700, size = 17 }: { x: number; y: number; down?: boolean; hidden?: boolean; ms?: number; size?: number }) {
|
|
262
262
|
return (
|
|
263
263
|
<div
|
|
264
264
|
style={{
|
|
@@ -272,7 +272,7 @@ export function Cursor({ x, y, down, hidden, ms = 700 }: { x: number; y: number;
|
|
|
272
272
|
pointerEvents: "none",
|
|
273
273
|
}}
|
|
274
274
|
>
|
|
275
|
-
<svg viewBox="0 0 20 22" style={{ display: "block", width: u(
|
|
275
|
+
<svg viewBox="0 0 20 22" style={{ display: "block", width: u(size), height: u((size * 19) / 17), transform: down ? "scale(0.86)" : "none", transformOrigin: "0 0", transition: "transform 0.15s ease", filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.35))" }}>
|
|
276
276
|
<path d="M2 1.5v16l4.4-4 2.9 6.6 2.9-1.3-2.9-6.4h6.2z" fill="#111" stroke="#fff" strokeWidth="1.5" strokeLinejoin="round" />
|
|
277
277
|
</svg>
|
|
278
278
|
</div>
|
|
@@ -298,6 +298,18 @@ const ICON = {
|
|
|
298
298
|
check: "M5 12.5l4.5 4.5L19 7.5",
|
|
299
299
|
chevron: "M6 9l6 6l6-6",
|
|
300
300
|
columns: "M4 4h16v16H4zM9.5 4v16M14.5 4v16",
|
|
301
|
+
monitor: "M3 4h18v12H3zM8 20h8M12 16v4",
|
|
302
|
+
bot: "M12 8V4H8M5 8h14v12H5zM2 14h3M19 14h3M9.5 13v2M14.5 13v2",
|
|
303
|
+
clock: "M12 3a9 9 0 1 0 0 18a9 9 0 0 0 0-18zM12 7v5l3 2",
|
|
304
|
+
layers: "M12 3l9 5l-9 5l-9-5zM3 13l9 5l9-5",
|
|
305
|
+
history: "M3 12a9 9 0 1 0 3-6.7L3 8M3 3v5h5M12 7v5l3 2",
|
|
306
|
+
card: "M3 5h18v14H3zM3 10h18",
|
|
307
|
+
key: "M16 3a5 5 0 1 0 0 10a5 5 0 0 0 0-10zM12.5 11.5L4 20M7 17l2.5 2.5",
|
|
308
|
+
book: "M12 7v13M3 5h6a3 3 0 0 1 3 3a3 3 0 0 1 3-3h6v13h-6a3 3 0 0 0-3 2a3 3 0 0 0-3-2H3z",
|
|
309
|
+
external: "M14 4h6v6M20 4l-9 9M18 14v6H4V6h6",
|
|
310
|
+
search: "M11 4a7 7 0 1 0 0 14a7 7 0 0 0 0-14zM20 20l-3.5-3.5",
|
|
311
|
+
more: "M12 5h.01M12 12h.01M12 19h.01",
|
|
312
|
+
download: "M12 4v11M7 11l5 5l5-5M5 20h14",
|
|
301
313
|
} as const
|
|
302
314
|
|
|
303
315
|
export type IconId = keyof typeof ICON
|
|
@@ -8,6 +8,10 @@ import { BoardScreen } from "./cms/board"
|
|
|
8
8
|
import { PageScreen } from "./cms/page"
|
|
9
9
|
import { TableScreen } from "./cms/table"
|
|
10
10
|
import { ViewsScreen } from "./cms/views"
|
|
11
|
+
import { DriveScreen } from "./desktop/drive"
|
|
12
|
+
import { HandoffScreen } from "./desktop/handoff"
|
|
13
|
+
import { LauncherScreen } from "./desktop/launcher"
|
|
14
|
+
import { WallScreen } from "./desktop/wall"
|
|
11
15
|
import type { StageColors } from "./stage"
|
|
12
16
|
|
|
13
17
|
/* The client half of a `showcase` section: the home (drawn on the server) hands a screen's id and what
|
|
@@ -20,6 +24,10 @@ const SCREENS: Record<ShowcaseScreenId, (props: ScreenProps) => ReactNode> = {
|
|
|
20
24
|
"cms-table": TableScreen,
|
|
21
25
|
"cms-page": PageScreen,
|
|
22
26
|
"cms-views": ViewsScreen,
|
|
27
|
+
"desktop-wall": WallScreen,
|
|
28
|
+
"desktop-drive": DriveScreen,
|
|
29
|
+
"desktop-handoff": HandoffScreen,
|
|
30
|
+
"desktop-launcher": LauncherScreen,
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
export function ShowcaseScreen({ screen, locale, product, theme, palette, label }: { screen: ShowcaseScreenId; locale: "en" | "fr"; product: BrandProductId; theme: BrandTheme; palette?: BrandPalette; label: string }) {
|