@botspace/tokens 0.0.0-stage → 0.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/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ # @botspace/tokens
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ BotSpace brand tokens. `src/tokens.ts` is the one source; the build writes a Tailwind v4 theme and a JS module from it.
4
+
5
+ ## Use in a Tailwind v4 app (bot.space)
6
+
7
+ ```css
8
+ @import "tailwindcss";
9
+ @import "@botspace/tokens/theme.css";
10
+ ```
11
+
12
+ Fonts are the app's job. Load Styrene and Inter (in Next.js, `next/font/local` and `next/font/google`) with `variable: "--font-styrene"` and `variable: "--font-inter"`, and put both classes on `<html>`. The theme falls back to Inter, then the system font.
13
+
14
+ ## What you get
15
+
16
+ | Utility | Token | Use |
17
+ | --- | --- | --- |
18
+ | `bg-ink`, `text-ink` | `--color-ink` #1A1B1C | Primary. Text, main buttons, the hero. |
19
+ | `text-sky`, `outline-sky` | `--color-sky` #C5E7FF | Grid lines on ink and the hero highlight only. |
20
+ | `bg-slate-50` … `bg-slate-900` | `--color-slate-*` | The neutral ramp. Replaces Tailwind's default slate. |
21
+ | `bg-blue-container`, `bg-yellow-container`, `bg-magenta-container`, `bg-green-container`, `bg-purple-container`, `bg-rose-container` | `--color-*-container` | Accent grounds for sections, tiles, images. Text on them is ink. |
22
+ | `text-blue` … `text-rose` | `--color-*` | Accent role colours for marks and illustration. Not body text. |
23
+ | `bg-status-success` … `bg-status-danger`, `text-status-*-foreground` | `--color-status-*` | Status only. |
24
+ | `bg-chat-out`, `bg-chat-in` | `--color-chat-*` | Chat bubbles in product imagery. |
25
+ | `font-display`, `font-sans` | `--font-display`, `--font-sans` | Styrene for headlines, Inter for the rest. |
26
+ | `text-display-2xl` … `text-display-sm`, `text-lead`, `text-eyebrow` | `--text-*` | Fluid marketing type scale, with line height and tracking. |
27
+ | `rounded-chip`, `rounded-card`, `rounded-tile`, `rounded-frame`, `rounded-pill` | `--radius-*` | Shapes. |
28
+ | `bg-blue-field` … `bg-rose-field` | `--color-*-field` | Plain-field creative grounds (stronger than containers). Imagery only. |
29
+ | `bg-surface`, `bg-surface-container`, `bg-surface-high`, `bg-surface-dim`, `bg-ground-dark` | `--color-surface*`, `--color-ground-dark` | Surface ramp for product imagery and the dark creative ground. |
30
+ | `size-grid`, `p-grid` | `--spacing-grid` 50px | One grid cell. |
31
+ | `ease-brand`, `ease-emphasized`, `ease-exit` | `--ease-*` | Easing. |
32
+
33
+ Plain variables on `:root`: `--grid-cell`, `--grid-line`, `--grid-line-on-ink`, `--grid-line-on-accent`, `--motion-fast`, `--motion-base`, `--motion-slow`, `--motion-chat-step`, `--motion-marquee`, `--motion-cycle`.
34
+
35
+ The theme is `@theme static`, so every colour variable is in the CSS even when no class uses it. Inline styles such as `style={{ background: "var(--color-green-container)" }}` always work.
36
+
37
+ ## Use in JS (Remotion, OG images, satori)
38
+
39
+ Besides the theme values, the JS module exports `skins` (WhatsApp, Instagram, Instagram dark, web chat and email colours), `surface`, `frame`, `corner` and `paintings` for creatives.
40
+
41
+
42
+ ```ts
43
+ import { accents, ink, sky, motion, tokens } from "@botspace/tokens"
44
+
45
+ accents.green.container // "#A7F2CF"
46
+ motion.ease.brand // [0.22, 1, 0.36, 1]
47
+ ```
48
+
49
+ ## Change a token
50
+
51
+ 1. Edit `src/tokens.ts` (brand) or `src/product.ts` (dashboard). Take only role and container values from colors.bot.space: its mid-ramp steps go neon.
52
+ 2. `npm run build -w @botspace/tokens`. It writes `dist/theme.css`, `dist/tokens.json` and `packages/product/src/styles/botspace-tokens.css`, and fails if the brand and product values for primary, status or sidebar disagree.
53
+ 3. `npx changeset` from the repo root, then open a PR. Versions, the marketing dependency and the changelog are bumped by the Version packages PR.
@@ -0,0 +1,4 @@
1
+ export declare const productHeader = "/* ============================================================================\n BotSpace Kit: colour tokens.\n GENERATED from packages/tokens/src/product.ts (npm run build -w @botspace/tokens). Edit that file, not this one.\n Values are the Material 3 scheme from libs/ui-utils/colors.ts, set on the stock shadcn role names.\n Neutrals keep the cool blue-grey tint. Primary stays near-black.\n One token on each line. The comment after a token is its usage note: the reference site and\n the design-system export read it, so keep it short and true.\n ============================================================================ */";
2
+ export type ProductToken = readonly [name: string, value: string, note?: string];
3
+ export declare const productLight: readonly (readonly ProductToken[])[];
4
+ export declare const productDark: readonly (readonly ProductToken[])[];
@@ -0,0 +1,133 @@
1
+ // Product (dashboard) semantic tokens: the stock shadcn role names with BotSpace values.
2
+ // The one source for packages/product/src/styles/botspace-tokens.css, which scripts/build.ts writes.
3
+ // Edit values and usage notes here, never in that CSS file. CI fails if the two drift.
4
+ // Each group is a block in the CSS; each entry is [name, value, usage note]. The note is shown on
5
+ // kit.bot.space and in the design-system export, so keep it short and true.
6
+ export const productHeader = "/* ============================================================================\n BotSpace Kit: colour tokens.\n GENERATED from packages/tokens/src/product.ts (npm run build -w @botspace/tokens). Edit that file, not this one.\n Values are the Material 3 scheme from libs/ui-utils/colors.ts, set on the stock shadcn role names.\n Neutrals keep the cool blue-grey tint. Primary stays near-black.\n One token on each line. The comment after a token is its usage note: the reference site and\n the design-system export read it, so keep it short and true.\n ============================================================================ */";
7
+ export const productLight = [
8
+ [
9
+ ["radius", "0.5rem", "Inputs and menus. shadcn derives every other radius from it."],
10
+ ],
11
+ [
12
+ ["background", "#ffffff", "Page, panes, lists, thread."],
13
+ ["foreground", "#181c1f", "Body text on background, card and muted."],
14
+ ["card", "#ffffff", "Cards on report, list and settings pages."],
15
+ ["card-foreground", "#181c1f", "Text on card."],
16
+ ["popover", "#ffffff", "Menus, tooltips, dialogs."],
17
+ ["popover-foreground", "#181c1f", "Text on popover."],
18
+ ["primary", "#1a1b1c", "Main button, unread count, selected-row marker."],
19
+ ["primary-foreground", "#ffffff", "Text and icons on primary."],
20
+ ["secondary", "#d1e5f4", "Tonal button, bulk-selection bar."],
21
+ ["secondary-foreground", "#0a1e28", "Text on secondary."],
22
+ ["muted", "#f0f4f8", "Table head, quiet blocks, hover on rows."],
23
+ ["muted-foreground", "#5a6268", "Secondary text: hints, times, counts."],
24
+ ["accent", "#e5e8ed", "Hover and selected item in lists and menus."],
25
+ ["accent-foreground", "#181c1f", "Text on accent."],
26
+ ["destructive", "#ba1a1a", "Delete and other actions you cannot undo."],
27
+ ["border", "#dde3ea", "Every line: pane edges, header lines, card and table borders."],
28
+ ["input", "#d1d7de", "Input and select borders."],
29
+ ["ring", "#1e6586", "Focus ring."],
30
+ ],
31
+ [
32
+ ["sidebar", "#f6fafe", "Icon rail and section navigation pane."],
33
+ ["sidebar-foreground", "#181c1f", "Text in the rail and section navigation."],
34
+ ["sidebar-primary", "#1a1b1c", "Active mark in the rail."],
35
+ ["sidebar-primary-foreground", "#ffffff", "Text on sidebar-primary."],
36
+ ["sidebar-accent", "#e5e8ed", "Hover and active item in the rail and section navigation."],
37
+ ["sidebar-accent-foreground", "#181c1f", "Text on sidebar-accent."],
38
+ ["sidebar-border", "#dde3ea", "Lines inside the rail and section navigation."],
39
+ ["sidebar-ring", "#1e6586", "Focus ring inside the rail."],
40
+ ],
41
+ [
42
+ ["success", "#c0efb0", "Tonal fill: paid, delivered, on, completed."],
43
+ ["success-foreground", "#285020", "Text on success."],
44
+ ["warning", "#ffdcc7", "Tonal fill: unpaid COD, reply soon, needs review."],
45
+ ["warning-foreground", "#6e390e", "Text on warning."],
46
+ ["info", "#9eefff", "Tonal fill: scheduled, in transit, new."],
47
+ ["info-foreground", "#004e59", "Text on info."],
48
+ ["danger", "#ffdad6", "Tonal fill: failed, overdue, blocked."],
49
+ ["danger-foreground", "#93000a", "Text on danger."],
50
+ ["violet", "#e7deff", "Tonal fill: AI agent, plan and workspace marks."],
51
+ ["violet-foreground", "#3d335c", "Text on violet."],
52
+ ],
53
+ [
54
+ ["bubble-out", "#cef6e6", "Outgoing chat message."],
55
+ ["bubble-in", "#eef1f5", "Incoming chat message."],
56
+ ["note", "#f4f3cf", "Internal note in a thread."],
57
+ ["note-foreground", "#494900", "Text on note."],
58
+ ["tint", "#1e6586", "Small marks: AI-handled icon, link-like accents."],
59
+ ["link", "#005bd3", "Inline links in text."],
60
+ ["canvas", "#eceff3", "Ground behind framed previews."],
61
+ ["brand-wa", "#1e6b4f", "WhatsApp channel mark only."],
62
+ ["brand-ig", "#8c4a5d", "Instagram channel mark only."],
63
+ ],
64
+ [
65
+ ["chart-1", "#1e6586", "First data series."],
66
+ ["chart-2", "#406836", "Second data series."],
67
+ ["chart-3", "#8b4f24", "Third data series."],
68
+ ["chart-4", "#6a548d", "Fourth data series."],
69
+ ["chart-5", "#71787e", "Other, the rest, or a baseline."],
70
+ ],
71
+ ];
72
+ export const productDark = [
73
+ [
74
+ ["background", "#0f1417"],
75
+ ["foreground", "#dfe3e7"],
76
+ ["card", "#0f1417"],
77
+ ["card-foreground", "#dfe3e7"],
78
+ ["popover", "#1c2023"],
79
+ ["popover-foreground", "#dfe3e7"],
80
+ ["primary", "#e3e7eb"],
81
+ ["primary-foreground", "#14181b"],
82
+ ["secondary", "#2b3d48"],
83
+ ["secondary-foreground", "#d1e5f4"],
84
+ ["muted", "#151a1d"],
85
+ ["muted-foreground", "#a3abb1"],
86
+ ["accent", "#232a2e"],
87
+ ["accent-foreground", "#dfe3e7"],
88
+ ["destructive", "#ffb4ab"],
89
+ ["border", "#262c30"],
90
+ ["input", "#353c41"],
91
+ ["ring", "#90cef4"],
92
+ ],
93
+ [
94
+ ["sidebar", "#12171a"],
95
+ ["sidebar-foreground", "#dfe3e7"],
96
+ ["sidebar-primary", "#e3e7eb"],
97
+ ["sidebar-primary-foreground", "#14181b"],
98
+ ["sidebar-accent", "#232a2e"],
99
+ ["sidebar-accent-foreground", "#dfe3e7"],
100
+ ["sidebar-border", "#262c30"],
101
+ ["sidebar-ring", "#90cef4"],
102
+ ],
103
+ [
104
+ ["success", "#1f3d1a"],
105
+ ["success-foreground", "#a5d395"],
106
+ ["warning", "#4a2a10"],
107
+ ["warning-foreground", "#ffb68a"],
108
+ ["info", "#003a43"],
109
+ ["info-foreground", "#7fd8ea"],
110
+ ["danger", "#5c1410"],
111
+ ["danger-foreground", "#ffb4ab"],
112
+ ["violet", "#352f4b"],
113
+ ["violet-foreground", "#d5cbf3"],
114
+ ],
115
+ [
116
+ ["bubble-out", "#143a2d"],
117
+ ["bubble-in", "#1c2226"],
118
+ ["note", "#33330f"],
119
+ ["note-foreground", "#e2e18a"],
120
+ ["tint", "#90cef4"],
121
+ ["link", "#90cef4"],
122
+ ["canvas", "#080b0d"],
123
+ ["brand-wa", "#87d6bd"],
124
+ ["brand-ig", "#ffb1c4"],
125
+ ],
126
+ [
127
+ ["chart-1", "#7cc4ee"],
128
+ ["chart-2", "#8fcf7d"],
129
+ ["chart-3", "#ffb68a"],
130
+ ["chart-4", "#b9a9f0"],
131
+ ["chart-5", "#8b9297"],
132
+ ],
133
+ ];
package/dist/theme.css ADDED
@@ -0,0 +1,102 @@
1
+ /* @botspace/tokens 0.1.0. Generated from src/tokens.ts. Do not edit.
2
+ Use after Tailwind: @import "tailwindcss"; @import "@botspace/tokens/theme.css";
3
+ Fonts are the app's job: set --font-styrene and --font-inter (next/font variable) on <html>. */
4
+
5
+ /* static: every variable is emitted, so creatives can use var(--color-*) in inline styles. */
6
+ @theme static {
7
+ --color-ink: #1A1B1C; /* Primary. Text, main buttons, the hero ground. */
8
+ --color-white: #FFFFFF;
9
+ --color-sky: #C5E7FF; /* Grid lines on ink and the hero highlight only. */
10
+ --color-slate-50: #F6FAFE;
11
+ --color-slate-100: #F0F4F8;
12
+ --color-slate-200: #E5E8ED;
13
+ --color-slate-300: #DDE3EA;
14
+ --color-slate-400: #C1C7CE;
15
+ --color-slate-500: #8B9297;
16
+ --color-slate-600: #5A6268;
17
+ --color-slate-700: #41484D;
18
+ --color-slate-800: #2B3136;
19
+ --color-slate-900: #181C1F;
20
+ --color-blue: #465D91; /* Accent role colour. Marks and illustration, not body text. */
21
+ --color-blue-field: #AFC6FF; /* Plain tile ground (dark-scheme role colour). */
22
+ --color-blue-container: #D9E2FF; /* Accent ground for sections, tiles, images. */
23
+ --color-yellow: #616118; /* Accent role colour. Marks and illustration, not body text. */
24
+ --color-yellow-field: #CBCB76; /* Plain tile ground (dark-scheme role colour). */
25
+ --color-yellow-container: #E8E78F; /* Accent ground for sections, tiles, images. */
26
+ --color-magenta: #804D7A; /* Accent role colour. Marks and illustration, not body text. */
27
+ --color-magenta-field: #F1B3E6; /* Plain tile ground (dark-scheme role colour). */
28
+ --color-magenta-container: #FFD7F5; /* Accent ground for sections, tiles, images. */
29
+ --color-green: #1E6B4F; /* Accent role colour. Marks and illustration, not body text. */
30
+ --color-green-field: #8CD5B4; /* Plain tile ground (dark-scheme role colour). */
31
+ --color-green-container: #A7F2CF; /* Accent ground for sections, tiles, images. */
32
+ --color-purple: #6A548D; /* Accent role colour. Marks and illustration, not body text. */
33
+ --color-purple-field: #D5BBFC; /* Plain tile ground (dark-scheme role colour). */
34
+ --color-purple-container: #ECDCFF; /* Accent ground for sections, tiles, images. */
35
+ --color-rose: #8C4A5D; /* Accent role colour. Marks and illustration, not body text. */
36
+ --color-rose-field: #FFB1C5; /* Plain tile ground (dark-scheme role colour). */
37
+ --color-rose-container: #FFD9E1; /* Accent ground for sections, tiles, images. */
38
+ --color-status-success: #C0EFB0; /* Status only. */
39
+ --color-status-success-foreground: #285020;
40
+ --color-status-warning: #FFDCC7; /* Status only. */
41
+ --color-status-warning-foreground: #6E390E;
42
+ --color-status-info: #9EEFFF; /* Status only. */
43
+ --color-status-info-foreground: #004E59;
44
+ --color-status-danger: #FFDAD6; /* Status only. */
45
+ --color-status-danger-foreground: #93000A;
46
+ --color-surface: #F6FAFE; /* Chat area and panels in product imagery. */
47
+ --color-surface-container: #EBEEF3; /* App canvas; the surface tile ground. */
48
+ --color-surface-high: #E5E8ED;
49
+ --color-surface-dim: #D7DADF;
50
+ --color-ground-dark: #181C1F; /* The dark tile ground. */
51
+ --color-chat-out: #CEF6E6; /* Agent message in product imagery. */
52
+ --color-chat-in: #EEF1F5; /* Customer message in product imagery. */
53
+ --text-display-2xl: clamp(3rem, 1.8rem + 5vw, 6rem);
54
+ --text-display-2xl--line-height: 1;
55
+ --text-display-2xl--letter-spacing: -0.035em;
56
+ --text-display-xl: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
57
+ --text-display-xl--line-height: 1.04;
58
+ --text-display-xl--letter-spacing: -0.03em;
59
+ --text-display-lg: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
60
+ --text-display-lg--line-height: 1.08;
61
+ --text-display-lg--letter-spacing: -0.025em;
62
+ --text-display-md: clamp(1.625rem, 1.3rem + 1.3vw, 2.5rem);
63
+ --text-display-md--line-height: 1.12;
64
+ --text-display-md--letter-spacing: -0.02em;
65
+ --text-display-sm: 1.5rem;
66
+ --text-display-sm--line-height: 1.2;
67
+ --text-display-sm--letter-spacing: -0.015em;
68
+ --text-lead: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
69
+ --text-lead--line-height: 1.5;
70
+ --text-lead--letter-spacing: -0.005em;
71
+ --text-eyebrow: 0.8125rem;
72
+ --text-eyebrow--line-height: 1.2;
73
+ --text-eyebrow--letter-spacing: 0.08em;
74
+ --radius-chip: 0.375rem;
75
+ --radius-card: 1.25rem;
76
+ --radius-tile: 2rem;
77
+ --radius-frame: 2.5rem;
78
+ --radius-pill: 9999px;
79
+ --spacing-grid: 50px; /* One grid cell (50px). size-grid, w-grid, p-grid. */
80
+ --ease-brand: cubic-bezier(0.22, 1, 0.36, 1);
81
+ --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
82
+ --ease-exit: cubic-bezier(0.4, 0, 1, 1);
83
+ }
84
+
85
+ /* Fonts resolve per element, so next/font variables set on <html> or <body> both work. */
86
+ @theme inline {
87
+ --font-display: var(--font-styrene, "Styrene A Web", "Styrene A"), var(--font-inter, "Inter"), "Inter Variable", ui-sans-serif, system-ui, sans-serif;
88
+ --font-sans: var(--font-inter, "Inter"), "Inter Variable", ui-sans-serif, system-ui, sans-serif;
89
+ }
90
+
91
+ :root {
92
+ --grid-cell: 50px;
93
+ --grid-line: 2px;
94
+ --grid-line-on-ink: rgb(197 231 255 / 0.22);
95
+ --grid-line-on-accent: rgb(26 27 28 / 0.09);
96
+ --motion-fast: 160ms;
97
+ --motion-base: 320ms;
98
+ --motion-slow: 640ms;
99
+ --motion-chat-step: 1100ms;
100
+ --motion-marquee: 40000ms;
101
+ --motion-cycle: 9000ms;
102
+ }