@openkeyai/ui 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.
@@ -0,0 +1,308 @@
1
+ /* =============================================================================
2
+ * @openkeyai/ui — global stylesheet
3
+ *
4
+ * Tools import this exactly once at the top of their global CSS:
5
+ *
6
+ * @import "@openkeyai/ui/css";
7
+ *
8
+ * It defines:
9
+ * - `:where(:root)` custom properties for all design tokens
10
+ * - Scoped `.okai-*` classes for every component we ship
11
+ *
12
+ * Why `:where(:root)` instead of `:root`? Zero specificity, so a tool's own
13
+ * brand overrides can win without `!important`. The HubHeader's component
14
+ * styles deliberately DO use real selectors — those can't be themed away
15
+ * (per docs/TOOL_CONTRACT.md in the hub repo).
16
+ *
17
+ * Class names use a `okai-` prefix (OpenKey AI) to avoid collisions with the
18
+ * tool's own utility classes. Inside the header, BEM-ish nesting keeps the
19
+ * selectors readable.
20
+ * ============================================================================= */
21
+
22
+ :where(:root) {
23
+ /* ─── Colors ─────────────────────────────────────────────────────────── */
24
+ --okai-color-bg: #0a0c1a;
25
+ --okai-color-surface: #11142a;
26
+ --okai-color-surface-raised: #181d3a;
27
+ --okai-color-foreground: #e6e8f5;
28
+ --okai-color-foreground-muted: #9097b8;
29
+ --okai-color-border: rgba(150, 160, 220, 0.12);
30
+ --okai-color-accent: #7c6cf5;
31
+ --okai-color-accent-bright: #9b8af9;
32
+ --okai-color-destructive: #ef4459;
33
+ --okai-color-success: #34d399;
34
+
35
+ /* ─── Spacing (4px base) ─────────────────────────────────────────────── */
36
+ --okai-space-px: 1px;
37
+ --okai-space-0_5: 2px;
38
+ --okai-space-1: 4px;
39
+ --okai-space-1_5: 6px;
40
+ --okai-space-2: 8px;
41
+ --okai-space-3: 12px;
42
+ --okai-space-4: 16px;
43
+ --okai-space-5: 20px;
44
+ --okai-space-6: 24px;
45
+ --okai-space-8: 32px;
46
+ --okai-space-10: 40px;
47
+ --okai-space-12: 48px;
48
+ --okai-space-16: 64px;
49
+
50
+ /* ─── Radius ─────────────────────────────────────────────────────────── */
51
+ --okai-radius-sm: 4px;
52
+ --okai-radius-md: 8px;
53
+ --okai-radius-lg: 12px;
54
+ --okai-radius-xl: 16px;
55
+ --okai-radius-2xl: 20px;
56
+ --okai-radius-full: 9999px;
57
+
58
+ /* ─── Typography ─────────────────────────────────────────────────────── */
59
+ --okai-font-sans: Geist, ui-sans-serif, system-ui, -apple-system,
60
+ BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
61
+ --okai-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
62
+ Consolas, "Liberation Mono", monospace;
63
+ --okai-fs-xs: 11px;
64
+ --okai-fs-sm: 13px;
65
+ --okai-fs-base: 14px;
66
+ --okai-fs-md: 16px;
67
+ --okai-fs-lg: 18px;
68
+ --okai-fs-xl: 22px;
69
+ --okai-lh-tight: 1.2;
70
+ --okai-lh-normal: 1.5;
71
+
72
+ /* ─── Shadows ────────────────────────────────────────────────────────── */
73
+ --okai-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
74
+ --okai-shadow-md: 0 6px 24px -8px rgba(0, 0, 0, 0.5),
75
+ 0 2px 6px rgba(0, 0, 0, 0.3);
76
+ --okai-shadow-lg: 0 20px 60px -20px rgba(0, 0, 0, 0.6),
77
+ 0 8px 24px rgba(0, 0, 0, 0.4);
78
+
79
+ /* ─── Motion ─────────────────────────────────────────────────────────── */
80
+ --okai-ease: cubic-bezier(0.4, 0, 0.2, 1);
81
+ --okai-dur-fast: 120ms;
82
+ --okai-dur-normal: 180ms;
83
+ --okai-dur-slow: 260ms;
84
+
85
+ /* ─── Z-index ────────────────────────────────────────────────────────── */
86
+ --okai-z-base: 0;
87
+ --okai-z-raised: 10;
88
+ --okai-z-sticky: 30;
89
+ --okai-z-header: 40;
90
+ --okai-z-overlay: 50;
91
+ --okai-z-modal: 60;
92
+ --okai-z-toast: 70;
93
+
94
+ /* ─── Component sizes ────────────────────────────────────────────────── */
95
+ --okai-header-h: 56px;
96
+ }
97
+
98
+ /* =============================================================================
99
+ * HubHeader
100
+ *
101
+ * Mandatory in every tool. The CSS lives here (not in the component) so the
102
+ * SAME styles can be reproduced in a server-rendered HTML fallback if a tool
103
+ * ever wants one. The component just sets classes.
104
+ *
105
+ * Layout: a fixed-top horizontal bar with three regions —
106
+ * [.brand] [.spacer + .tool-name] [.right + .user]
107
+ * ============================================================================= */
108
+
109
+ .okai-header {
110
+ /* Position: fixed across the top of the viewport. Tools should leave
111
+ `var(--okai-header-h)` worth of top padding on their root. */
112
+ position: fixed;
113
+ top: 0;
114
+ left: 0;
115
+ right: 0;
116
+ z-index: var(--okai-z-header);
117
+ display: flex;
118
+ align-items: center;
119
+ height: var(--okai-header-h);
120
+ padding: 0 var(--okai-space-4);
121
+ gap: var(--okai-space-4);
122
+
123
+ /* Glass surface — matches the hub's app shell language. */
124
+ background: color-mix(in srgb, var(--okai-color-bg) 80%, transparent);
125
+ -webkit-backdrop-filter: saturate(140%) blur(12px);
126
+ backdrop-filter: saturate(140%) blur(12px);
127
+ border-bottom: 1px solid var(--okai-color-border);
128
+
129
+ /* Typography — we deliberately set this so the header looks consistent
130
+ even when the consumer hasn't loaded Geist. */
131
+ font-family: var(--okai-font-sans);
132
+ font-size: var(--okai-fs-sm);
133
+ line-height: var(--okai-lh-tight);
134
+ color: var(--okai-color-foreground);
135
+
136
+ /* Defensive resets — tools' own button/anchor rules shouldn't bleed in. */
137
+ box-sizing: border-box;
138
+ }
139
+
140
+ .okai-header *,
141
+ .okai-header *::before,
142
+ .okai-header *::after {
143
+ box-sizing: border-box;
144
+ }
145
+
146
+ /* Brand: hub icon + "OpenKey AI" wordmark, links to the hub. */
147
+ .okai-header__brand {
148
+ display: inline-flex;
149
+ align-items: center;
150
+ gap: var(--okai-space-2);
151
+ color: var(--okai-color-foreground);
152
+ text-decoration: none;
153
+ border-radius: var(--okai-radius-md);
154
+ padding: var(--okai-space-1) var(--okai-space-2);
155
+ transition: background-color var(--okai-dur-fast) var(--okai-ease);
156
+ }
157
+ .okai-header__brand:hover,
158
+ .okai-header__brand:focus-visible {
159
+ background-color: color-mix(
160
+ in srgb,
161
+ var(--okai-color-accent) 12%,
162
+ transparent
163
+ );
164
+ outline: none;
165
+ }
166
+
167
+ .okai-header__brand-mark {
168
+ display: inline-block;
169
+ width: 22px;
170
+ height: 22px;
171
+ border-radius: var(--okai-radius-md);
172
+ background: linear-gradient(
173
+ 135deg,
174
+ var(--okai-color-accent),
175
+ var(--okai-color-accent-bright)
176
+ );
177
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
178
+ }
179
+
180
+ .okai-header__brand-text {
181
+ font-weight: 600;
182
+ letter-spacing: 0.01em;
183
+ }
184
+
185
+ /* Divider between brand and tool name. */
186
+ .okai-header__divider {
187
+ width: 1px;
188
+ height: 20px;
189
+ background-color: var(--okai-color-border);
190
+ flex-shrink: 0;
191
+ }
192
+
193
+ .okai-header__tool-name {
194
+ font-weight: 500;
195
+ color: var(--okai-color-foreground);
196
+ white-space: nowrap;
197
+ overflow: hidden;
198
+ text-overflow: ellipsis;
199
+ }
200
+
201
+ /* Pushes the right side away from the centre. */
202
+ .okai-header__spacer {
203
+ flex: 1 1 auto;
204
+ }
205
+
206
+ .okai-header__right {
207
+ display: inline-flex;
208
+ align-items: center;
209
+ gap: var(--okai-space-2);
210
+ }
211
+
212
+ /* User chip — avatar + display name. */
213
+ .okai-header__user {
214
+ display: inline-flex;
215
+ align-items: center;
216
+ gap: var(--okai-space-2);
217
+ padding: var(--okai-space-1) var(--okai-space-3) var(--okai-space-1)
218
+ var(--okai-space-1);
219
+ border-radius: var(--okai-radius-full);
220
+ background-color: color-mix(
221
+ in srgb,
222
+ var(--okai-color-foreground) 6%,
223
+ transparent
224
+ );
225
+ color: var(--okai-color-foreground);
226
+ text-decoration: none;
227
+ transition: background-color var(--okai-dur-fast) var(--okai-ease);
228
+ max-width: 220px;
229
+ }
230
+ .okai-header__user:hover,
231
+ .okai-header__user:focus-visible {
232
+ background-color: color-mix(
233
+ in srgb,
234
+ var(--okai-color-foreground) 10%,
235
+ transparent
236
+ );
237
+ outline: none;
238
+ }
239
+
240
+ .okai-header__user-avatar {
241
+ width: 22px;
242
+ height: 22px;
243
+ border-radius: var(--okai-radius-full);
244
+ background-color: var(--okai-color-surface-raised);
245
+ background-size: cover;
246
+ background-position: center;
247
+ flex-shrink: 0;
248
+ }
249
+
250
+ /* Initials fallback when there's no avatar URL. */
251
+ .okai-header__user-fallback {
252
+ width: 22px;
253
+ height: 22px;
254
+ border-radius: var(--okai-radius-full);
255
+ background: linear-gradient(
256
+ 135deg,
257
+ var(--okai-color-accent),
258
+ var(--okai-color-accent-bright)
259
+ );
260
+ color: white;
261
+ font-size: 10px;
262
+ font-weight: 600;
263
+ display: inline-flex;
264
+ align-items: center;
265
+ justify-content: center;
266
+ flex-shrink: 0;
267
+ }
268
+
269
+ .okai-header__user-name {
270
+ font-size: var(--okai-fs-sm);
271
+ white-space: nowrap;
272
+ overflow: hidden;
273
+ text-overflow: ellipsis;
274
+ }
275
+
276
+ /* Sign-in CTA when no user is supplied. */
277
+ .okai-header__signin {
278
+ display: inline-flex;
279
+ align-items: center;
280
+ padding: var(--okai-space-1_5) var(--okai-space-3);
281
+ border-radius: var(--okai-radius-full);
282
+ background: linear-gradient(
283
+ 135deg,
284
+ var(--okai-color-accent),
285
+ var(--okai-color-accent-bright)
286
+ );
287
+ color: white;
288
+ font-size: var(--okai-fs-sm);
289
+ font-weight: 500;
290
+ text-decoration: none;
291
+ transition: filter var(--okai-dur-fast) var(--okai-ease);
292
+ }
293
+ .okai-header__signin:hover,
294
+ .okai-header__signin:focus-visible {
295
+ filter: brightness(1.1);
296
+ outline: none;
297
+ }
298
+
299
+ /* On narrow viewports, drop the wordmark + display name to save room. */
300
+ @media (max-width: 640px) {
301
+ .okai-header__brand-text,
302
+ .okai-header__user-name {
303
+ display: none;
304
+ }
305
+ .okai-header__user {
306
+ padding: var(--okai-space-1);
307
+ }
308
+ }
@@ -0,0 +1,152 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ // src/tokens.ts
6
+ var tokens = {
7
+ color: {
8
+ /** App-wide canvas. Dark navy with a touch of indigo. */
9
+ bg: "#0a0c1a",
10
+ /** Surface a half-step lighter than `bg`. Card / panel default. */
11
+ surface: "#11142a",
12
+ /** Surface above `surface` — popovers, hover states. */
13
+ surfaceRaised: "#181d3a",
14
+ /** Primary readable text. */
15
+ foreground: "#e6e8f5",
16
+ /** Lower-emphasis text. Captions, metadata. */
17
+ foregroundMuted: "#9097b8",
18
+ /** Subtle border default for cards / dividers. */
19
+ border: "rgba(150, 160, 220, 0.12)",
20
+ /** Indigo-violet primary, softened so it doesn't blow out the bg. */
21
+ accent: "#7c6cf5",
22
+ /** Brighter accent for focus rings + active links. */
23
+ accentBright: "#9b8af9",
24
+ /** Destructive action accent. */
25
+ destructive: "#ef4459",
26
+ /** Success / positive accent. */
27
+ success: "#34d399"
28
+ },
29
+ radius: {
30
+ sm: "4px",
31
+ md: "8px",
32
+ lg: "12px",
33
+ /** Default for cards and surfaces. */
34
+ xl: "16px",
35
+ "2xl": "20px"},
36
+ font: {
37
+ /** Geist Sans — opt-in by the consumer's stack. We just suggest it. */
38
+ sans: 'Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
39
+ /** Geist Mono for code + hashes + token displays. */
40
+ mono: 'Geist Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace'
41
+ },
42
+ fontSize: {
43
+ xs: "11px",
44
+ sm: "13px",
45
+ base: "14px",
46
+ md: "16px",
47
+ lg: "18px",
48
+ xl: "22px"
49
+ },
50
+ shadow: {
51
+ /** Subtle pop on raised cards. */
52
+ sm: "0 1px 2px rgba(0, 0, 0, 0.25)",
53
+ /** Standard floating-pill / dropdown lift. */
54
+ md: "0 6px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3)",
55
+ /** Modal-style. */
56
+ lg: "0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4)"
57
+ },
58
+ motion: {
59
+ /** Default easing — feels good for most UI. */
60
+ ease: "cubic-bezier(0.4, 0.0, 0.2, 1)",
61
+ /** Quick interactions — hover, focus. */
62
+ fast: "120ms",
63
+ /** Standard — most state transitions. */
64
+ normal: "180ms",
65
+ /** Used for entrance / exit animations. */
66
+ slow: "260ms"
67
+ },
68
+ /** Z-index scale. Use these names, never raw numbers. */
69
+ z: {
70
+ raised: 10,
71
+ sticky: 30,
72
+ /** HubHeader sits here. */
73
+ header: 40,
74
+ overlay: 50,
75
+ modal: 60,
76
+ toast: 70
77
+ },
78
+ /** Component-specific dimensions. */
79
+ size: {
80
+ /** HubHeader height. Tools should leave this much top padding. */
81
+ headerHeight: "56px"
82
+ }
83
+ };
84
+
85
+ // src/tailwind.ts
86
+ var hubTailwindPreset = {
87
+ theme: {
88
+ extend: {
89
+ colors: {
90
+ "okai-bg": tokens.color.bg,
91
+ "okai-surface": tokens.color.surface,
92
+ "okai-surface-raised": tokens.color.surfaceRaised,
93
+ "okai-foreground": tokens.color.foreground,
94
+ "okai-foreground-muted": tokens.color.foregroundMuted,
95
+ "okai-border": tokens.color.border,
96
+ "okai-accent": tokens.color.accent,
97
+ "okai-accent-bright": tokens.color.accentBright,
98
+ "okai-destructive": tokens.color.destructive,
99
+ "okai-success": tokens.color.success
100
+ },
101
+ borderRadius: {
102
+ "okai-sm": tokens.radius.sm,
103
+ "okai-md": tokens.radius.md,
104
+ "okai-lg": tokens.radius.lg,
105
+ "okai-xl": tokens.radius.xl,
106
+ "okai-2xl": tokens.radius["2xl"]
107
+ },
108
+ fontFamily: {
109
+ "okai-sans": tokens.font.sans.split(",").map((s) => s.trim()),
110
+ "okai-mono": tokens.font.mono.split(",").map((s) => s.trim())
111
+ },
112
+ fontSize: {
113
+ "okai-xs": tokens.fontSize.xs,
114
+ "okai-sm": tokens.fontSize.sm,
115
+ "okai-base": tokens.fontSize.base,
116
+ "okai-md": tokens.fontSize.md,
117
+ "okai-lg": tokens.fontSize.lg,
118
+ "okai-xl": tokens.fontSize.xl
119
+ },
120
+ boxShadow: {
121
+ "okai-sm": tokens.shadow.sm,
122
+ "okai-md": tokens.shadow.md,
123
+ "okai-lg": tokens.shadow.lg
124
+ },
125
+ transitionTimingFunction: {
126
+ "okai-ease": tokens.motion.ease
127
+ },
128
+ transitionDuration: {
129
+ "okai-fast": tokens.motion.fast.replace("ms", ""),
130
+ "okai-normal": tokens.motion.normal.replace("ms", ""),
131
+ "okai-slow": tokens.motion.slow.replace("ms", "")
132
+ },
133
+ zIndex: {
134
+ "okai-raised": String(tokens.z.raised),
135
+ "okai-sticky": String(tokens.z.sticky),
136
+ "okai-header": String(tokens.z.header),
137
+ "okai-overlay": String(tokens.z.overlay),
138
+ "okai-modal": String(tokens.z.modal),
139
+ "okai-toast": String(tokens.z.toast)
140
+ },
141
+ spacing: {
142
+ "okai-header": tokens.size.headerHeight
143
+ }
144
+ }
145
+ }
146
+ };
147
+ var tailwind_default = hubTailwindPreset;
148
+
149
+ exports.default = tailwind_default;
150
+ exports.hubTailwindPreset = hubTailwindPreset;
151
+ //# sourceMappingURL=tailwind.cjs.map
152
+ //# sourceMappingURL=tailwind.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tokens.ts","../src/tailwind.ts"],"names":[],"mappings":";;;;;AAiBO,IAAM,MAAA,GAAS;AAAA,EACpB,KAAA,EAAO;AAAA;AAAA,IAEL,EAAA,EAAI,SAAA;AAAA;AAAA,IAEJ,OAAA,EAAS,SAAA;AAAA;AAAA,IAET,aAAA,EAAe,SAAA;AAAA;AAAA,IAEf,UAAA,EAAY,SAAA;AAAA;AAAA,IAEZ,eAAA,EAAiB,SAAA;AAAA;AAAA,IAEjB,MAAA,EAAQ,2BAAA;AAAA;AAAA,IAER,M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AE,KAAK,CAAA;AAAA,QACnC,YAAA,EAAc,MAAA,CAAO,MAAA,CAAO,CAAA,CAAE,KAAK;AAAA,OACrC;AAAA,MACA,OAAA,EAAS;AAAA,QACP,aAAA,EAAe,OAAO,IAAA,CAAK;AAAA;AAC7B;AACF;AAEJ;AAMA,IAAO,gBAAA,GAAQ","file":"tailwind.cjs","sourcesContent":["/**\n * Design tokens — colors, spacing, typography, radius, motion.\n *\n * Frozen-ish: visual changes that affect layout (header height, spacing\n * scale, font sizes) require coordinated checks against deployed tools.\n * See ../CLAUDE.md.\n *\n * Two consumption styles:\n * 1. As CSS custom properties — import `@openkeyai/ui/css` and use\n * `var(--okai-color-bg)` etc. The `<HubHeader />` component does this.\n * 2. As a JS object — `import { tokens } from \"@openkeyai/ui/tokens\"`\n * for programmatic colour pickups (charts, gradients).\n *\n * The token names mirror the CSS variable names below the prefix.\n * Example: `tokens.color.bg` ↔ `--okai-color-bg`.\n */\n\nexport const tokens = {\n color: {\n /** App-wide canvas. Dark navy with a touch of indigo. */\n bg: \"#0a0c1a\",\n /** Surface a half-step lighter than `bg`. Card / panel default. */\n surface: \"#11142a\",\n /** Surface above `surface` — popovers, hover states. */\n surfaceRaised: \"#181d3a\",\n /** Primary readable text. */\n foreground: \"#e6e8f5\",\n /** Lower-emphasis text. Captions, metadata. */\n foregroundMuted: \"#9097b8\",\n /** Subtle border default for cards / dividers. */\n border: \"rgba(150, 160, 220, 0.12)\",\n /** Indigo-violet primary, softened so it doesn't blow out the bg. */\n accent: \"#7c6cf5\",\n /** Brighter accent for focus rings + active links. */\n accentBright: \"#9b8af9\",\n /** Destructive action accent. */\n destructive: \"#ef4459\",\n /** Success / positive accent. */\n success: \"#34d399\",\n },\n /** 4px base. Use multiples of these for layout — keeps the grid honest. */\n space: {\n px: \"1px\",\n \"0_5\": \"2px\",\n \"1\": \"4px\",\n \"1_5\": \"6px\",\n \"2\": \"8px\",\n \"3\": \"12px\",\n \"4\": \"16px\",\n \"5\": \"20px\",\n \"6\": \"24px\",\n \"8\": \"32px\",\n \"10\": \"40px\",\n \"12\": \"48px\",\n \"16\": \"64px\",\n },\n radius: {\n sm: \"4px\",\n md: \"8px\",\n lg: \"12px\",\n /** Default for cards and surfaces. */\n xl: \"16px\",\n \"2xl\": \"20px\",\n full: \"9999px\",\n },\n font: {\n /** Geist Sans — opt-in by the consumer's stack. We just suggest it. */\n sans:\n \"Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \" +\n '\"Segoe UI\", Roboto, sans-serif',\n /** Geist Mono for code + hashes + token displays. */\n mono:\n \"Geist Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \" +\n '\"Liberation Mono\", monospace',\n },\n fontSize: {\n xs: \"11px\",\n sm: \"13px\",\n base: \"14px\",\n md: \"16px\",\n lg: \"18px\",\n xl: \"22px\",\n },\n lineHeight: {\n tight: \"1.2\",\n normal: \"1.5\",\n relaxed: \"1.65\",\n },\n shadow: {\n /** Subtle pop on raised cards. */\n sm: \"0 1px 2px rgba(0, 0, 0, 0.25)\",\n /** Standard floating-pill / dropdown lift. */\n md: \"0 6px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3)\",\n /** Modal-style. */\n lg: \"0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4)\",\n },\n motion: {\n /** Default easing — feels good for most UI. */\n ease: \"cubic-bezier(0.4, 0.0, 0.2, 1)\",\n /** Quick interactions — hover, focus. */\n fast: \"120ms\",\n /** Standard — most state transitions. */\n normal: \"180ms\",\n /** Used for entrance / exit animations. */\n slow: \"260ms\",\n },\n /** Z-index scale. Use these names, never raw numbers. */\n z: {\n base: 0,\n raised: 10,\n sticky: 30,\n /** HubHeader sits here. */\n header: 40,\n overlay: 50,\n modal: 60,\n toast: 70,\n },\n /** Component-specific dimensions. */\n size: {\n /** HubHeader height. Tools should leave this much top padding. */\n headerHeight: \"56px\",\n },\n} as const;\n\nexport type DesignTokens = typeof tokens;\n","import { tokens } from \"./tokens\";\n\n/**\n * Tailwind preset for `@openkeyai/ui` consumers.\n *\n * Drop into a tool's `tailwind.config.ts`:\n *\n * import { hubTailwindPreset } from \"@openkeyai/ui/tailwind\";\n * export default {\n * presets: [hubTailwindPreset],\n * content: [...],\n * } satisfies Config;\n *\n * The preset extends Tailwind's theme with the hub's tokens. It does NOT\n * override Tailwind's defaults — tools can still use the full standard\n * scale alongside the hub additions. Hub-flavoured names are prefixed with\n * `okai-` to avoid colliding with Tailwind's own colour names.\n *\n * We intentionally don't `require(\"tailwindcss\")` here — `tailwind` is a\n * peer concern of the consumer's stack and isn't a dep of this package.\n */\nexport const hubTailwindPreset = {\n theme: {\n extend: {\n colors: {\n \"okai-bg\": tokens.color.bg,\n \"okai-surface\": tokens.color.surface,\n \"okai-surface-raised\": tokens.color.surfaceRaised,\n \"okai-foreground\": tokens.color.foreground,\n \"okai-foreground-muted\": tokens.color.foregroundMuted,\n \"okai-border\": tokens.color.border,\n \"okai-accent\": tokens.color.accent,\n \"okai-accent-bright\": tokens.color.accentBright,\n \"okai-destructive\": tokens.color.destructive,\n \"okai-success\": tokens.color.success,\n },\n borderRadius: {\n \"okai-sm\": tokens.radius.sm,\n \"okai-md\": tokens.radius.md,\n \"okai-lg\": tokens.radius.lg,\n \"okai-xl\": tokens.radius.xl,\n \"okai-2xl\": tokens.radius[\"2xl\"],\n },\n fontFamily: {\n \"okai-sans\": tokens.font.sans.split(\",\").map((s) => s.trim()),\n \"okai-mono\": tokens.font.mono.split(\",\").map((s) => s.trim()),\n },\n fontSize: {\n \"okai-xs\": tokens.fontSize.xs,\n \"okai-sm\": tokens.fontSize.sm,\n \"okai-base\": tokens.fontSize.base,\n \"okai-md\": tokens.fontSize.md,\n \"okai-lg\": tokens.fontSize.lg,\n \"okai-xl\": tokens.fontSize.xl,\n },\n boxShadow: {\n \"okai-sm\": tokens.shadow.sm,\n \"okai-md\": tokens.shadow.md,\n \"okai-lg\": tokens.shadow.lg,\n },\n transitionTimingFunction: {\n \"okai-ease\": tokens.motion.ease,\n },\n transitionDuration: {\n \"okai-fast\": tokens.motion.fast.replace(\"ms\", \"\"),\n \"okai-normal\": tokens.motion.normal.replace(\"ms\", \"\"),\n \"okai-slow\": tokens.motion.slow.replace(\"ms\", \"\"),\n },\n zIndex: {\n \"okai-raised\": String(tokens.z.raised),\n \"okai-sticky\": String(tokens.z.sticky),\n \"okai-header\": String(tokens.z.header),\n \"okai-overlay\": String(tokens.z.overlay),\n \"okai-modal\": String(tokens.z.modal),\n \"okai-toast\": String(tokens.z.toast),\n },\n spacing: {\n \"okai-header\": tokens.size.headerHeight,\n },\n },\n },\n} as const;\n\nexport type HubTailwindPreset = typeof hubTailwindPreset;\n\n// Default export so it can also be consumed via\n// `import preset from \"@openkeyai/ui/tailwind\"`.\nexport default hubTailwindPreset;\n"]}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Tailwind preset for `@openkeyai/ui` consumers.
3
+ *
4
+ * Drop into a tool's `tailwind.config.ts`:
5
+ *
6
+ * import { hubTailwindPreset } from "@openkeyai/ui/tailwind";
7
+ * export default {
8
+ * presets: [hubTailwindPreset],
9
+ * content: [...],
10
+ * } satisfies Config;
11
+ *
12
+ * The preset extends Tailwind's theme with the hub's tokens. It does NOT
13
+ * override Tailwind's defaults — tools can still use the full standard
14
+ * scale alongside the hub additions. Hub-flavoured names are prefixed with
15
+ * `okai-` to avoid colliding with Tailwind's own colour names.
16
+ *
17
+ * We intentionally don't `require("tailwindcss")` here — `tailwind` is a
18
+ * peer concern of the consumer's stack and isn't a dep of this package.
19
+ */
20
+ declare const hubTailwindPreset: {
21
+ readonly theme: {
22
+ readonly extend: {
23
+ readonly colors: {
24
+ readonly "okai-bg": "#0a0c1a";
25
+ readonly "okai-surface": "#11142a";
26
+ readonly "okai-surface-raised": "#181d3a";
27
+ readonly "okai-foreground": "#e6e8f5";
28
+ readonly "okai-foreground-muted": "#9097b8";
29
+ readonly "okai-border": "rgba(150, 160, 220, 0.12)";
30
+ readonly "okai-accent": "#7c6cf5";
31
+ readonly "okai-accent-bright": "#9b8af9";
32
+ readonly "okai-destructive": "#ef4459";
33
+ readonly "okai-success": "#34d399";
34
+ };
35
+ readonly borderRadius: {
36
+ readonly "okai-sm": "4px";
37
+ readonly "okai-md": "8px";
38
+ readonly "okai-lg": "12px";
39
+ readonly "okai-xl": "16px";
40
+ readonly "okai-2xl": "20px";
41
+ };
42
+ readonly fontFamily: {
43
+ readonly "okai-sans": string[];
44
+ readonly "okai-mono": string[];
45
+ };
46
+ readonly fontSize: {
47
+ readonly "okai-xs": "11px";
48
+ readonly "okai-sm": "13px";
49
+ readonly "okai-base": "14px";
50
+ readonly "okai-md": "16px";
51
+ readonly "okai-lg": "18px";
52
+ readonly "okai-xl": "22px";
53
+ };
54
+ readonly boxShadow: {
55
+ readonly "okai-sm": "0 1px 2px rgba(0, 0, 0, 0.25)";
56
+ readonly "okai-md": "0 6px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3)";
57
+ readonly "okai-lg": "0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4)";
58
+ };
59
+ readonly transitionTimingFunction: {
60
+ readonly "okai-ease": "cubic-bezier(0.4, 0.0, 0.2, 1)";
61
+ };
62
+ readonly transitionDuration: {
63
+ readonly "okai-fast": string;
64
+ readonly "okai-normal": string;
65
+ readonly "okai-slow": string;
66
+ };
67
+ readonly zIndex: {
68
+ readonly "okai-raised": string;
69
+ readonly "okai-sticky": string;
70
+ readonly "okai-header": string;
71
+ readonly "okai-overlay": string;
72
+ readonly "okai-modal": string;
73
+ readonly "okai-toast": string;
74
+ };
75
+ readonly spacing: {
76
+ readonly "okai-header": "56px";
77
+ };
78
+ };
79
+ };
80
+ };
81
+ type HubTailwindPreset = typeof hubTailwindPreset;
82
+
83
+ export { type HubTailwindPreset, hubTailwindPreset as default, hubTailwindPreset };
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Tailwind preset for `@openkeyai/ui` consumers.
3
+ *
4
+ * Drop into a tool's `tailwind.config.ts`:
5
+ *
6
+ * import { hubTailwindPreset } from "@openkeyai/ui/tailwind";
7
+ * export default {
8
+ * presets: [hubTailwindPreset],
9
+ * content: [...],
10
+ * } satisfies Config;
11
+ *
12
+ * The preset extends Tailwind's theme with the hub's tokens. It does NOT
13
+ * override Tailwind's defaults — tools can still use the full standard
14
+ * scale alongside the hub additions. Hub-flavoured names are prefixed with
15
+ * `okai-` to avoid colliding with Tailwind's own colour names.
16
+ *
17
+ * We intentionally don't `require("tailwindcss")` here — `tailwind` is a
18
+ * peer concern of the consumer's stack and isn't a dep of this package.
19
+ */
20
+ declare const hubTailwindPreset: {
21
+ readonly theme: {
22
+ readonly extend: {
23
+ readonly colors: {
24
+ readonly "okai-bg": "#0a0c1a";
25
+ readonly "okai-surface": "#11142a";
26
+ readonly "okai-surface-raised": "#181d3a";
27
+ readonly "okai-foreground": "#e6e8f5";
28
+ readonly "okai-foreground-muted": "#9097b8";
29
+ readonly "okai-border": "rgba(150, 160, 220, 0.12)";
30
+ readonly "okai-accent": "#7c6cf5";
31
+ readonly "okai-accent-bright": "#9b8af9";
32
+ readonly "okai-destructive": "#ef4459";
33
+ readonly "okai-success": "#34d399";
34
+ };
35
+ readonly borderRadius: {
36
+ readonly "okai-sm": "4px";
37
+ readonly "okai-md": "8px";
38
+ readonly "okai-lg": "12px";
39
+ readonly "okai-xl": "16px";
40
+ readonly "okai-2xl": "20px";
41
+ };
42
+ readonly fontFamily: {
43
+ readonly "okai-sans": string[];
44
+ readonly "okai-mono": string[];
45
+ };
46
+ readonly fontSize: {
47
+ readonly "okai-xs": "11px";
48
+ readonly "okai-sm": "13px";
49
+ readonly "okai-base": "14px";
50
+ readonly "okai-md": "16px";
51
+ readonly "okai-lg": "18px";
52
+ readonly "okai-xl": "22px";
53
+ };
54
+ readonly boxShadow: {
55
+ readonly "okai-sm": "0 1px 2px rgba(0, 0, 0, 0.25)";
56
+ readonly "okai-md": "0 6px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3)";
57
+ readonly "okai-lg": "0 20px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.4)";
58
+ };
59
+ readonly transitionTimingFunction: {
60
+ readonly "okai-ease": "cubic-bezier(0.4, 0.0, 0.2, 1)";
61
+ };
62
+ readonly transitionDuration: {
63
+ readonly "okai-fast": string;
64
+ readonly "okai-normal": string;
65
+ readonly "okai-slow": string;
66
+ };
67
+ readonly zIndex: {
68
+ readonly "okai-raised": string;
69
+ readonly "okai-sticky": string;
70
+ readonly "okai-header": string;
71
+ readonly "okai-overlay": string;
72
+ readonly "okai-modal": string;
73
+ readonly "okai-toast": string;
74
+ };
75
+ readonly spacing: {
76
+ readonly "okai-header": "56px";
77
+ };
78
+ };
79
+ };
80
+ };
81
+ type HubTailwindPreset = typeof hubTailwindPreset;
82
+
83
+ export { type HubTailwindPreset, hubTailwindPreset as default, hubTailwindPreset };