@skaile/forge-brand 0.2.0 → 0.4.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/CHANGELOG.md +30 -0
- package/README.md +135 -13
- package/assets/identity.md +56 -137
- package/assets/logo/LICENSE-NOTE.md +3 -0
- package/assets/logo/favicon.svg +1 -0
- package/assets/logo/forge-icon.svg +1 -0
- package/assets/logo/forge-lockup-dark.svg +1 -0
- package/assets/logo/forge-lockup-light.svg +1 -0
- package/assets/logo/forge-mark.svg +1 -0
- package/package.json +35 -5
- package/src/css/app.css +18 -18
- package/src/css/brand.css +4 -10
- package/src/css/fonts.css +19 -0
- package/src/css/nuxt-ui.css +36 -22
- package/src/css/theme.css +223 -150
- package/src/palettes/PalettePicker.vue +80 -0
- package/src/palettes/palettes.css +470 -0
- package/src/palettes/palettes.ts +93 -0
- package/src/palettes/tabler.ts +333 -0
- package/src/tailwind-preset.ts +45 -41
- package/src/tokens.json +122 -66
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Palette picker: a radio group of the forge palettes, three to a row, each a swatch
|
|
4
|
+
* (ground, surface, accent) and its name. Sits in a menu or a settings card; `v-model` is the
|
|
5
|
+
* palette id, `dark` shows the swatches of the dark scheme.
|
|
6
|
+
*/
|
|
7
|
+
import { PALETTES, type PaletteId } from './palettes.ts'
|
|
8
|
+
|
|
9
|
+
const model = defineModel<PaletteId>({ required: true })
|
|
10
|
+
defineProps<{ dark?: boolean; label?: string }>()
|
|
11
|
+
|
|
12
|
+
function onKey(e: KeyboardEvent, index: number) {
|
|
13
|
+
const step = { ArrowRight: 1, ArrowDown: 3, ArrowLeft: -1, ArrowUp: -3 }[e.key]
|
|
14
|
+
if (!step) return
|
|
15
|
+
e.preventDefault()
|
|
16
|
+
const next = PALETTES[(index + step + PALETTES.length) % PALETTES.length]!
|
|
17
|
+
model.value = next.id
|
|
18
|
+
;(
|
|
19
|
+
(e.currentTarget as HTMLElement).parentElement?.children[PALETTES.indexOf(next)] as HTMLElement | undefined
|
|
20
|
+
)?.focus()
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div class="fpp" role="radiogroup" :aria-label="label ?? 'Palette'">
|
|
26
|
+
<button
|
|
27
|
+
v-for="(p, i) in PALETTES"
|
|
28
|
+
:key="p.id"
|
|
29
|
+
type="button"
|
|
30
|
+
role="radio"
|
|
31
|
+
class="fpp-item"
|
|
32
|
+
:aria-checked="model === p.id"
|
|
33
|
+
:tabindex="model === p.id ? 0 : -1"
|
|
34
|
+
:title="`${p.label} · ${p.type}`"
|
|
35
|
+
@click="model = p.id"
|
|
36
|
+
@keydown="onKey($event, i)"
|
|
37
|
+
>
|
|
38
|
+
<span class="fpp-swatch" aria-hidden="true">
|
|
39
|
+
<i :style="{ background: (dark ? p.swatch.dark : p.swatch.light)[0] }" />
|
|
40
|
+
<i :style="{ background: (dark ? p.swatch.dark : p.swatch.light)[1] }" />
|
|
41
|
+
<i :style="{ background: (dark ? p.swatch.dark : p.swatch.light)[2] }" />
|
|
42
|
+
</span>
|
|
43
|
+
<span class="fpp-name">{{ p.label }}</span>
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style scoped>
|
|
49
|
+
.fpp {
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
52
|
+
gap: 2px;
|
|
53
|
+
}
|
|
54
|
+
.fpp-item {
|
|
55
|
+
display: grid;
|
|
56
|
+
gap: 5px;
|
|
57
|
+
padding: 5px;
|
|
58
|
+
border: 0;
|
|
59
|
+
border-radius: var(--lk-radius, 6px);
|
|
60
|
+
background: none;
|
|
61
|
+
color: var(--lk-muted, currentColor);
|
|
62
|
+
font: inherit;
|
|
63
|
+
font-size: 0.75rem;
|
|
64
|
+
text-align: left;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
}
|
|
67
|
+
.fpp-item:hover { background: var(--lk-hover, rgb(0 0 0 / 0.05)); color: var(--lk-ink, currentColor); }
|
|
68
|
+
.fpp-item[aria-checked="true"] { color: var(--lk-ink, currentColor); font-weight: 500; }
|
|
69
|
+
.fpp-item[aria-checked="true"] .fpp-swatch { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12), 0 0 0 2px var(--lk-raised, #fff), 0 0 0 3.5px var(--lk-ink, currentColor); }
|
|
70
|
+
.fpp-swatch {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: 2fr 2fr 1fr;
|
|
73
|
+
height: 16px;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
border-radius: 3px;
|
|
76
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
|
|
77
|
+
}
|
|
78
|
+
.fpp-swatch i { display: block; }
|
|
79
|
+
.fpp-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Forge palettes (see ./palettes.ts). Import AFTER the app's own token sheets
|
|
3
|
+
* (`@skaile/forge-brand/nuxt-ui.css`, the app's tokens): every rule keys on attributes of <html>
|
|
4
|
+
* (specificity 0,1,1), above the `:root` / `.dark` (0,1,0) those sheets use.
|
|
5
|
+
*
|
|
6
|
+
* data-palette="kiln" the colours: hue + chroma of the neutrals, the accent, the faces
|
|
7
|
+
* data-layout="paper" "paper": no rules, panes are sheets on a tinted ground
|
|
8
|
+
* "workshop": hairlines between panes, flat panes
|
|
9
|
+
* data-palette-fonts present when the app takes the palette's type as well; without
|
|
10
|
+
* it the app keeps its own faces (the editor keeps Hanken + Sentient)
|
|
11
|
+
*
|
|
12
|
+
* Light and dark come from the app's colour mode (`.dark` on <html>); every palette has both.
|
|
13
|
+
* One mapping then feeds every vocabulary the forge apps read: the forge brand (--background ...),
|
|
14
|
+
* Nuxt UI (--ui-*), the editor's Atelier tokens (--color-paper ...) and the shared --sk-* set.
|
|
15
|
+
*/
|
|
16
|
+
@import "@fontsource-variable/ibm-plex-sans/index.css";
|
|
17
|
+
@import "@fontsource/ibm-plex-mono/400.css";
|
|
18
|
+
@import "@fontsource/ibm-plex-mono/500.css";
|
|
19
|
+
@import "@fontsource-variable/figtree/index.css";
|
|
20
|
+
@import "@fontsource-variable/newsreader/index.css";
|
|
21
|
+
@import "@fontsource-variable/source-serif-4/index.css";
|
|
22
|
+
@import "@fontsource/inter/400.css";
|
|
23
|
+
@import "@fontsource/inter/500.css";
|
|
24
|
+
@import "@fontsource/inter/600.css";
|
|
25
|
+
@import "@fontsource/inter/700.css";
|
|
26
|
+
@import "@fontsource/geist/400.css";
|
|
27
|
+
@import "@fontsource/geist/500.css";
|
|
28
|
+
@import "@fontsource/geist/600.css";
|
|
29
|
+
@import "@fontsource/geist/700.css";
|
|
30
|
+
@import "@fontsource/geist-mono/400.css";
|
|
31
|
+
@import "@fontsource/geist-mono/500.css";
|
|
32
|
+
|
|
33
|
+
/* ---------------------------------------------------------------- 1. palettes */
|
|
34
|
+
|
|
35
|
+
html[data-palette] {
|
|
36
|
+
--lk-sans-geist: "Geist", ui-sans-serif, system-ui, sans-serif;
|
|
37
|
+
--lk-sans-plex: "IBM Plex Sans Variable", ui-sans-serif, system-ui, sans-serif;
|
|
38
|
+
--lk-sans-inter: "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
39
|
+
--lk-sans-figtree: "Figtree Variable", ui-sans-serif, system-ui, sans-serif;
|
|
40
|
+
--lk-serif-news: "Newsreader Variable", Georgia, serif;
|
|
41
|
+
--lk-serif-source: "Source Serif 4 Variable", Georgia, serif;
|
|
42
|
+
--lk-mono-geist: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
43
|
+
--lk-mono-plex: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
44
|
+
|
|
45
|
+
/* Defaults a palette overrides: stone neutrals, Geist everywhere. */
|
|
46
|
+
--lk-h: 85;
|
|
47
|
+
--lk-c: 0.006;
|
|
48
|
+
--lk-font: var(--lk-sans-geist);
|
|
49
|
+
--lk-font-doc: var(--lk-font);
|
|
50
|
+
--lk-font-mono: var(--lk-mono-geist);
|
|
51
|
+
--lk-doc-weight: 600;
|
|
52
|
+
--lk-doc-tracking: -0.02em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Stein: the brand's warm stone, ember signal, ink actions. */
|
|
56
|
+
html[data-palette="stein"] {
|
|
57
|
+
--lk-h: 85;
|
|
58
|
+
--lk-c: 0.006;
|
|
59
|
+
--lk-accent: oklch(54% 0.15 42);
|
|
60
|
+
--lk-primary: var(--lk-ink);
|
|
61
|
+
}
|
|
62
|
+
html.dark[data-palette="stein"] {
|
|
63
|
+
--lk-accent: oklch(72% 0.13 45);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Kiln: fired clay, warmer and deeper than stone; the accent is the glaze. */
|
|
67
|
+
html[data-palette="kiln"] {
|
|
68
|
+
--lk-h: 55;
|
|
69
|
+
--lk-c: 0.014;
|
|
70
|
+
--lk-accent: oklch(56% 0.14 45);
|
|
71
|
+
--lk-primary: var(--lk-accent);
|
|
72
|
+
}
|
|
73
|
+
html.dark[data-palette="kiln"] {
|
|
74
|
+
--lk-accent: oklch(71% 0.13 50);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Tinte & Papier: laid paper, iron-gall blue; documents set in Newsreader. */
|
|
78
|
+
html[data-palette="tinte"] {
|
|
79
|
+
--lk-h: 80;
|
|
80
|
+
--lk-c: 0.014;
|
|
81
|
+
--lk-accent: oklch(43% 0.1 258);
|
|
82
|
+
--lk-primary: var(--lk-accent);
|
|
83
|
+
--lk-font-doc: var(--lk-serif-news);
|
|
84
|
+
--lk-doc-weight: 500;
|
|
85
|
+
--lk-doc-tracking: -0.01em;
|
|
86
|
+
}
|
|
87
|
+
html.dark[data-palette="tinte"] {
|
|
88
|
+
--lk-accent: oklch(74% 0.09 255);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Graphit: cool graphite, one indigo. */
|
|
92
|
+
html[data-palette="graphit"] {
|
|
93
|
+
--lk-h: 260;
|
|
94
|
+
--lk-c: 0.008;
|
|
95
|
+
--lk-accent: oklch(52% 0.17 275);
|
|
96
|
+
--lk-primary: var(--lk-accent);
|
|
97
|
+
--lk-font: var(--lk-sans-plex);
|
|
98
|
+
--lk-font-mono: var(--lk-mono-plex);
|
|
99
|
+
}
|
|
100
|
+
html.dark[data-palette="graphit"] {
|
|
101
|
+
--lk-accent: oklch(70% 0.13 275);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Mono: Swiss black and white; the one colour is a signal red for focus and links. */
|
|
105
|
+
html[data-palette="mono"] {
|
|
106
|
+
--lk-h: 0;
|
|
107
|
+
--lk-c: 0;
|
|
108
|
+
--lk-accent: oklch(55% 0.2 27);
|
|
109
|
+
--lk-primary: var(--lk-ink);
|
|
110
|
+
--lk-font: var(--lk-sans-inter);
|
|
111
|
+
--lk-doc-weight: 700;
|
|
112
|
+
--lk-doc-tracking: -0.03em;
|
|
113
|
+
}
|
|
114
|
+
html.dark[data-palette="mono"] {
|
|
115
|
+
--lk-accent: oklch(68% 0.17 27);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Mitternacht: blue-black night console, a glacier cyan. */
|
|
119
|
+
html[data-palette="mitternacht"] {
|
|
120
|
+
--lk-h: 262;
|
|
121
|
+
--lk-c: 0.022;
|
|
122
|
+
--lk-accent: oklch(52% 0.11 225);
|
|
123
|
+
--lk-primary: var(--lk-accent);
|
|
124
|
+
--lk-font: var(--lk-sans-plex);
|
|
125
|
+
--lk-font-mono: var(--lk-mono-plex);
|
|
126
|
+
}
|
|
127
|
+
html.dark[data-palette="mitternacht"] {
|
|
128
|
+
--lk-accent: oklch(74% 0.1 222);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Leinen: linen, sage; documents in Source Serif. */
|
|
132
|
+
html[data-palette="leinen"] {
|
|
133
|
+
--lk-h: 82;
|
|
134
|
+
--lk-c: 0.016;
|
|
135
|
+
--lk-accent: oklch(50% 0.08 140);
|
|
136
|
+
--lk-primary: var(--lk-accent);
|
|
137
|
+
--lk-font: var(--lk-sans-figtree);
|
|
138
|
+
--lk-font-doc: var(--lk-serif-source);
|
|
139
|
+
--lk-doc-weight: 600;
|
|
140
|
+
--lk-doc-tracking: -0.015em;
|
|
141
|
+
}
|
|
142
|
+
html.dark[data-palette="leinen"] {
|
|
143
|
+
--lk-accent: oklch(74% 0.08 140);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Fjord: cold water and slate, a deep teal. */
|
|
147
|
+
html[data-palette="fjord"] {
|
|
148
|
+
--lk-h: 230;
|
|
149
|
+
--lk-c: 0.014;
|
|
150
|
+
--lk-accent: oklch(50% 0.09 228);
|
|
151
|
+
--lk-primary: var(--lk-accent);
|
|
152
|
+
--lk-font: var(--lk-sans-figtree);
|
|
153
|
+
}
|
|
154
|
+
html.dark[data-palette="fjord"] {
|
|
155
|
+
--lk-accent: oklch(74% 0.08 220);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Dämmerung: dusk violet-grey, lilac light; documents in Newsreader. */
|
|
159
|
+
html[data-palette="daemmerung"] {
|
|
160
|
+
--lk-h: 300;
|
|
161
|
+
--lk-c: 0.018;
|
|
162
|
+
--lk-accent: oklch(50% 0.12 305);
|
|
163
|
+
--lk-primary: var(--lk-accent);
|
|
164
|
+
--lk-font: var(--lk-sans-figtree);
|
|
165
|
+
--lk-font-doc: var(--lk-serif-news);
|
|
166
|
+
--lk-doc-weight: 500;
|
|
167
|
+
--lk-doc-tracking: -0.01em;
|
|
168
|
+
}
|
|
169
|
+
html.dark[data-palette="daemmerung"] {
|
|
170
|
+
--lk-accent: oklch(78% 0.09 305);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* ---------------------------------------------------------------- 2. ramps */
|
|
174
|
+
|
|
175
|
+
html[data-palette] {
|
|
176
|
+
/* ground: the tinted floor (sidebars, the frame); bg: the page; surface: what sits on top. */
|
|
177
|
+
--lk-ground: oklch(95.2% var(--lk-c) var(--lk-h));
|
|
178
|
+
--lk-bg: oklch(97.6% calc(var(--lk-c) * 0.7) var(--lk-h));
|
|
179
|
+
--lk-surface: oklch(99.4% calc(var(--lk-c) * 0.4) var(--lk-h));
|
|
180
|
+
--lk-raised: oklch(99.7% calc(var(--lk-c) * 0.3) var(--lk-h));
|
|
181
|
+
--lk-hover: oklch(92.6% calc(var(--lk-c) * 1.2) var(--lk-h));
|
|
182
|
+
--lk-selected: oklch(90% calc(var(--lk-c) * 1.4) var(--lk-h));
|
|
183
|
+
--lk-line-soft: oklch(91.5% calc(var(--lk-c) * 1.2) var(--lk-h));
|
|
184
|
+
--lk-line: oklch(88% calc(var(--lk-c) * 1.4) var(--lk-h));
|
|
185
|
+
--lk-line-strong: oklch(78% calc(var(--lk-c) * 1.6) var(--lk-h));
|
|
186
|
+
--lk-ink: oklch(21% calc(var(--lk-c) * 2) var(--lk-h));
|
|
187
|
+
--lk-ink-2: oklch(33% calc(var(--lk-c) * 2) var(--lk-h));
|
|
188
|
+
--lk-muted: oklch(49% calc(var(--lk-c) * 2) var(--lk-h));
|
|
189
|
+
--lk-dimmed: oklch(58% calc(var(--lk-c) * 1.8) var(--lk-h));
|
|
190
|
+
--lk-on-dark: oklch(98% 0.004 var(--lk-h));
|
|
191
|
+
--lk-on-light: oklch(18% 0.01 var(--lk-h));
|
|
192
|
+
--lk-accent-ink: var(--lk-on-dark);
|
|
193
|
+
--lk-primary-ink: var(--lk-on-dark);
|
|
194
|
+
--lk-accent-soft: color-mix(in oklab, var(--lk-accent) 11%, var(--lk-surface));
|
|
195
|
+
--lk-primary-soft: color-mix(in oklab, var(--lk-primary) 9%, var(--lk-surface));
|
|
196
|
+
--lk-focus: color-mix(in oklab, var(--lk-accent) 70%, var(--lk-surface));
|
|
197
|
+
--lk-shadow-float: 0 1px 2px oklch(20% 0.02 var(--lk-h) / 0.06), 0 8px 24px -6px oklch(20% 0.02 var(--lk-h) / 0.14);
|
|
198
|
+
--lk-shadow-card: 0 1px 2px oklch(20% 0.02 var(--lk-h) / 0.05);
|
|
199
|
+
|
|
200
|
+
/* Mode colours (skaile-forge: Assistant / Work / Concept), muted to the palette's lightness. */
|
|
201
|
+
--lk-mode-assistant: oklch(57% 0.1 12);
|
|
202
|
+
--lk-mode-work: oklch(55% 0.09 235);
|
|
203
|
+
--lk-mode-concept: oklch(55% 0.08 158);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
html.dark[data-palette] {
|
|
207
|
+
--lk-ground: oklch(16.5% calc(var(--lk-c) * 1.2) var(--lk-h));
|
|
208
|
+
--lk-bg: oklch(18.5% calc(var(--lk-c) * 1.2) var(--lk-h));
|
|
209
|
+
--lk-surface: oklch(21% calc(var(--lk-c) * 1.3) var(--lk-h));
|
|
210
|
+
--lk-raised: oklch(24% calc(var(--lk-c) * 1.3) var(--lk-h));
|
|
211
|
+
--lk-hover: oklch(25.5% calc(var(--lk-c) * 1.4) var(--lk-h));
|
|
212
|
+
--lk-selected: oklch(29% calc(var(--lk-c) * 1.5) var(--lk-h));
|
|
213
|
+
--lk-line-soft: oklch(24.5% calc(var(--lk-c) * 1.3) var(--lk-h));
|
|
214
|
+
--lk-line: oklch(28.5% calc(var(--lk-c) * 1.4) var(--lk-h));
|
|
215
|
+
--lk-line-strong: oklch(38% calc(var(--lk-c) * 1.5) var(--lk-h));
|
|
216
|
+
--lk-ink: oklch(95% calc(var(--lk-c) * 0.8) var(--lk-h));
|
|
217
|
+
--lk-ink-2: oklch(86% calc(var(--lk-c) * 0.8) var(--lk-h));
|
|
218
|
+
--lk-muted: oklch(70% calc(var(--lk-c) * 1) var(--lk-h));
|
|
219
|
+
--lk-dimmed: oklch(59% calc(var(--lk-c) * 1) var(--lk-h));
|
|
220
|
+
--lk-accent-ink: var(--lk-on-light);
|
|
221
|
+
--lk-primary-ink: var(--lk-on-light);
|
|
222
|
+
--lk-accent-soft: color-mix(in oklab, var(--lk-accent) 16%, var(--lk-surface));
|
|
223
|
+
--lk-primary-soft: color-mix(in oklab, var(--lk-primary) 14%, var(--lk-surface));
|
|
224
|
+
--lk-shadow-float: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 32px -8px oklch(0% 0 0 / 0.55);
|
|
225
|
+
--lk-shadow-card: 0 1px 2px oklch(0% 0 0 / 0.25);
|
|
226
|
+
--lk-mode-assistant: oklch(76% 0.08 12);
|
|
227
|
+
--lk-mode-work: oklch(76% 0.07 230);
|
|
228
|
+
--lk-mode-concept: oklch(76% 0.07 158);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* An ink primary inverts with the scheme, so its label does too. */
|
|
232
|
+
html[data-palette="stein"],
|
|
233
|
+
html[data-palette="mono"] {
|
|
234
|
+
--lk-primary-ink: var(--lk-bg);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* ---------------------------------------------------------------- 3. layouts */
|
|
238
|
+
|
|
239
|
+
/* Workshop: hairlines between panes, flat panes, sentence-case labels. */
|
|
240
|
+
html[data-palette][data-layout="workshop"] {
|
|
241
|
+
--lk-radius: 6px;
|
|
242
|
+
--lk-radius-lg: 8px;
|
|
243
|
+
--lk-pane-line: var(--lk-line);
|
|
244
|
+
--lk-card-line: var(--lk-line);
|
|
245
|
+
--lk-control-line: var(--lk-line-strong);
|
|
246
|
+
--lk-label-size: 0.8125rem;
|
|
247
|
+
--lk-label-weight: 600;
|
|
248
|
+
--lk-label-color: var(--lk-ink);
|
|
249
|
+
--lk-gap: 0px;
|
|
250
|
+
--lk-pane-bg: var(--lk-surface);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Paper: no rules; panes are sheets with space around them on a tinted ground. */
|
|
254
|
+
html[data-palette][data-layout="paper"] {
|
|
255
|
+
--lk-radius: 8px;
|
|
256
|
+
--lk-radius-lg: 12px;
|
|
257
|
+
--lk-pane-line: transparent;
|
|
258
|
+
--lk-card-line: transparent;
|
|
259
|
+
--lk-control-line: var(--lk-line);
|
|
260
|
+
--lk-label-size: 0.875rem;
|
|
261
|
+
--lk-label-weight: 600;
|
|
262
|
+
--lk-label-color: var(--lk-ink);
|
|
263
|
+
--lk-gap: 8px;
|
|
264
|
+
--lk-pane-bg: var(--lk-surface);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Inputs (the chat composer included): subtly rounded in every layout, never a pill. */
|
|
268
|
+
html[data-palette] {
|
|
269
|
+
--lk-radius-input: 6px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* ---------------------------------------------------------------- mapping */
|
|
273
|
+
|
|
274
|
+
html[data-palette],
|
|
275
|
+
html.dark[data-palette] {
|
|
276
|
+
/* forge brand (theme.css) */
|
|
277
|
+
--background: var(--lk-bg);
|
|
278
|
+
--foreground: var(--lk-ink);
|
|
279
|
+
--card: var(--lk-pane-bg);
|
|
280
|
+
--card-foreground: var(--lk-ink);
|
|
281
|
+
--popover: var(--lk-raised);
|
|
282
|
+
--popover-foreground: var(--lk-ink);
|
|
283
|
+
--muted: var(--lk-ground);
|
|
284
|
+
--muted-foreground: var(--lk-muted);
|
|
285
|
+
--accent: var(--lk-hover);
|
|
286
|
+
--accent-foreground: var(--lk-ink);
|
|
287
|
+
--secondary: var(--lk-hover);
|
|
288
|
+
--secondary-foreground: var(--lk-ink);
|
|
289
|
+
--primary: var(--lk-primary);
|
|
290
|
+
--primary-foreground: var(--lk-primary-ink);
|
|
291
|
+
--ember: var(--lk-accent);
|
|
292
|
+
--ember-foreground: var(--lk-accent-ink);
|
|
293
|
+
--border: var(--lk-pane-line);
|
|
294
|
+
--input: var(--lk-control-line);
|
|
295
|
+
--ring: var(--lk-focus);
|
|
296
|
+
--radius: var(--lk-radius);
|
|
297
|
+
--radius-xs: 2px;
|
|
298
|
+
--radius-sm: calc(var(--lk-radius) * 0.67);
|
|
299
|
+
--radius-md: var(--lk-radius);
|
|
300
|
+
--radius-lg: var(--lk-radius-lg);
|
|
301
|
+
--radius-xl: calc(var(--lk-radius-lg) + 2px);
|
|
302
|
+
--radius-2xl: calc(var(--lk-radius-lg) + 4px);
|
|
303
|
+
--radius-3xl: calc(var(--lk-radius-lg) + 8px);
|
|
304
|
+
--shadow: var(--lk-shadow-card);
|
|
305
|
+
--shadow-lg: var(--lk-shadow-float);
|
|
306
|
+
--shadow-floating: var(--lk-shadow-float);
|
|
307
|
+
|
|
308
|
+
/* Nuxt UI */
|
|
309
|
+
--ui-primary: var(--lk-primary);
|
|
310
|
+
--ui-secondary: var(--lk-accent);
|
|
311
|
+
--ui-info: var(--lk-accent);
|
|
312
|
+
--ui-bg: var(--lk-bg);
|
|
313
|
+
--ui-bg-muted: var(--lk-ground);
|
|
314
|
+
--ui-bg-elevated: var(--lk-hover);
|
|
315
|
+
--ui-bg-accented: var(--lk-selected);
|
|
316
|
+
--ui-bg-inverted: var(--lk-ink);
|
|
317
|
+
--ui-text: var(--lk-ink-2);
|
|
318
|
+
--ui-text-highlighted: var(--lk-ink);
|
|
319
|
+
--ui-text-toned: var(--lk-ink-2);
|
|
320
|
+
--ui-text-muted: var(--lk-muted);
|
|
321
|
+
--ui-text-dimmed: var(--lk-dimmed);
|
|
322
|
+
--ui-text-inverted: var(--lk-primary-ink);
|
|
323
|
+
--ui-border: var(--lk-line);
|
|
324
|
+
--ui-border-muted: var(--lk-line-soft);
|
|
325
|
+
--ui-border-accented: var(--lk-control-line);
|
|
326
|
+
--ui-border-inverted: var(--lk-ink);
|
|
327
|
+
--ui-radius: var(--lk-radius);
|
|
328
|
+
--ui-color-primary-50: color-mix(in oklab, var(--lk-primary) 6%, white);
|
|
329
|
+
--ui-color-primary-100: color-mix(in oklab, var(--lk-primary) 12%, white);
|
|
330
|
+
--ui-color-primary-200: color-mix(in oklab, var(--lk-primary) 25%, white);
|
|
331
|
+
--ui-color-primary-300: color-mix(in oklab, var(--lk-primary) 45%, white);
|
|
332
|
+
--ui-color-primary-400: color-mix(in oklab, var(--lk-primary) 72%, white);
|
|
333
|
+
--ui-color-primary-500: var(--lk-primary);
|
|
334
|
+
--ui-color-primary-600: color-mix(in oklab, var(--lk-primary) 88%, black);
|
|
335
|
+
--ui-color-primary-700: color-mix(in oklab, var(--lk-primary) 74%, black);
|
|
336
|
+
--ui-color-primary-800: color-mix(in oklab, var(--lk-primary) 58%, black);
|
|
337
|
+
--ui-color-primary-900: color-mix(in oklab, var(--lk-primary) 42%, black);
|
|
338
|
+
--ui-color-primary-950: color-mix(in oklab, var(--lk-primary) 28%, black);
|
|
339
|
+
|
|
340
|
+
/* skaile-forge app.css: modes are a dot, not the primary. */
|
|
341
|
+
--mode-color-assistant: var(--lk-mode-assistant);
|
|
342
|
+
--mode-color-work: var(--lk-mode-work);
|
|
343
|
+
--mode-color-concept: var(--lk-mode-concept);
|
|
344
|
+
--color-foreground-subtle: var(--lk-dimmed);
|
|
345
|
+
|
|
346
|
+
/* editor (Atelier tokens) */
|
|
347
|
+
--color-paper: var(--lk-bg);
|
|
348
|
+
--color-paper-1: var(--lk-ground);
|
|
349
|
+
--color-paper-2: var(--lk-hover);
|
|
350
|
+
--color-paper-3: var(--lk-selected);
|
|
351
|
+
--color-ink: var(--lk-ink);
|
|
352
|
+
--color-ink-2: var(--lk-ink-2);
|
|
353
|
+
--color-muted: var(--lk-muted);
|
|
354
|
+
--color-pencil: var(--lk-dimmed);
|
|
355
|
+
--color-rule: var(--lk-line);
|
|
356
|
+
--color-rule-soft: var(--lk-line-soft);
|
|
357
|
+
--color-rule-strong: var(--lk-line-strong);
|
|
358
|
+
--color-accent: var(--lk-accent);
|
|
359
|
+
--color-accent-ink: var(--lk-accent-ink);
|
|
360
|
+
--color-focus: var(--lk-focus);
|
|
361
|
+
--color-card: var(--lk-surface);
|
|
362
|
+
--color-card-edge: var(--lk-card-line);
|
|
363
|
+
--shadow-hair: var(--lk-shadow-card);
|
|
364
|
+
--shadow-float: var(--lk-shadow-float);
|
|
365
|
+
--shadow-card: var(--lk-shadow-card);
|
|
366
|
+
--radius-card: var(--lk-radius-lg);
|
|
367
|
+
--radius-pill: var(--lk-radius);
|
|
368
|
+
--sk-bg-float: var(--lk-raised);
|
|
369
|
+
--sk-shadow-float: var(--lk-shadow-float);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* The palette's faces, only for apps that opt in with `data-palette-fonts`. */
|
|
373
|
+
html[data-palette][data-palette-fonts] {
|
|
374
|
+
--font-sans: var(--lk-font);
|
|
375
|
+
--font-body: var(--lk-font);
|
|
376
|
+
--font-heading: var(--lk-font-doc);
|
|
377
|
+
--font-display: var(--lk-font-doc);
|
|
378
|
+
--font-serif: var(--lk-font-doc);
|
|
379
|
+
--font-mono: var(--lk-font-mono);
|
|
380
|
+
--display-weight: var(--lk-doc-weight);
|
|
381
|
+
--serif-small: var(--lk-doc-weight);
|
|
382
|
+
--tracking-display: var(--lk-doc-tracking);
|
|
383
|
+
--sk-font-display: var(--lk-font-doc);
|
|
384
|
+
--sk-display-weight: var(--lk-doc-weight);
|
|
385
|
+
--sk-display-weight-small: var(--lk-doc-weight);
|
|
386
|
+
--sk-display-tracking: var(--lk-doc-tracking);
|
|
387
|
+
}
|
|
388
|
+
html[data-palette][data-palette-fonts] body {
|
|
389
|
+
font-family: var(--lk-font);
|
|
390
|
+
font-feature-settings: "cv11", "ss01";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
html[data-palette][data-mode] {
|
|
394
|
+
--mode-accent: var(--mode-color-work);
|
|
395
|
+
--ui-primary: var(--lk-primary);
|
|
396
|
+
--app-primary-50: var(--ui-color-primary-50);
|
|
397
|
+
--app-primary-100: var(--ui-color-primary-100);
|
|
398
|
+
--app-primary-200: var(--ui-color-primary-200);
|
|
399
|
+
--app-primary-300: var(--ui-color-primary-300);
|
|
400
|
+
--app-primary-400: var(--ui-color-primary-400);
|
|
401
|
+
--app-primary-500: var(--ui-color-primary-500);
|
|
402
|
+
--app-primary-600: var(--ui-color-primary-600);
|
|
403
|
+
--app-primary-700: var(--ui-color-primary-700);
|
|
404
|
+
--app-primary-800: var(--ui-color-primary-800);
|
|
405
|
+
--app-primary-900: var(--ui-color-primary-900);
|
|
406
|
+
--app-primary-950: var(--ui-color-primary-950);
|
|
407
|
+
}
|
|
408
|
+
html[data-palette][data-mode="assistant"] {
|
|
409
|
+
--mode-accent: var(--mode-color-assistant);
|
|
410
|
+
}
|
|
411
|
+
html[data-palette][data-mode="concept"] {
|
|
412
|
+
--mode-accent: var(--mode-color-concept);
|
|
413
|
+
}
|
|
414
|
+
html[data-palette][data-mode="work"] {
|
|
415
|
+
--mode-accent: var(--mode-color-work);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* ---------------------------------------------------------------- browser surfaces */
|
|
419
|
+
|
|
420
|
+
html[data-palette] {
|
|
421
|
+
scrollbar-color: var(--lk-line-strong) transparent;
|
|
422
|
+
accent-color: var(--lk-accent);
|
|
423
|
+
}
|
|
424
|
+
html[data-palette] body {
|
|
425
|
+
background: var(--lk-bg);
|
|
426
|
+
color: var(--lk-ink-2);
|
|
427
|
+
caret-color: var(--lk-accent);
|
|
428
|
+
}
|
|
429
|
+
html[data-palette] ::selection {
|
|
430
|
+
background: color-mix(in oklab, var(--lk-accent) 24%, transparent);
|
|
431
|
+
color: var(--lk-ink);
|
|
432
|
+
}
|
|
433
|
+
html[data-palette] :focus-visible:not(.ProseMirror) {
|
|
434
|
+
outline: 2px solid var(--lk-focus);
|
|
435
|
+
outline-offset: 2px;
|
|
436
|
+
}
|
|
437
|
+
html[data-palette] a {
|
|
438
|
+
text-underline-offset: 0.18em;
|
|
439
|
+
text-decoration-thickness: 1px;
|
|
440
|
+
}
|
|
441
|
+
html[data-palette] :is(td, th, .tabular, [data-numeric]) {
|
|
442
|
+
font-variant-numeric: tabular-nums;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* The forge-chat composer: a subtly rounded field, not a pill. */
|
|
446
|
+
html[data-palette] .chat-composer-card {
|
|
447
|
+
border-radius: var(--lk-radius-input) !important;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* Subtle motion: surfaces ease their colour, nothing travels. */
|
|
451
|
+
html[data-palette] :is(button, a, [role="menuitem"], [role="option"], [role="tab"]) {
|
|
452
|
+
transition-property: color, background-color, border-color, box-shadow, opacity;
|
|
453
|
+
transition-duration: 140ms;
|
|
454
|
+
transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
|
455
|
+
}
|
|
456
|
+
html[data-palette] [data-state="open"]:is([role="menu"], [role="dialog"], [role="listbox"]) {
|
|
457
|
+
animation: lk-rise 160ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
458
|
+
}
|
|
459
|
+
@keyframes lk-rise {
|
|
460
|
+
from {
|
|
461
|
+
opacity: 0;
|
|
462
|
+
transform: translateY(3px);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
@media (prefers-reduced-motion: reduce) {
|
|
466
|
+
html[data-palette] * {
|
|
467
|
+
animation: none !important;
|
|
468
|
+
transition: none !important;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forge palettes: the colour (and, for apps that opt in, the type) a person picks for a forge app.
|
|
3
|
+
* `palettes.css` reads `data-palette` on <html>; the app owns the choice (a cookie, so the server
|
|
4
|
+
* renders the right palette) and its layout (`data-layout`: `paper` | `workshop`).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export type PaletteId =
|
|
8
|
+
| 'kiln'
|
|
9
|
+
| 'stein'
|
|
10
|
+
| 'tinte'
|
|
11
|
+
| 'graphit'
|
|
12
|
+
| 'mono'
|
|
13
|
+
| 'mitternacht'
|
|
14
|
+
| 'leinen'
|
|
15
|
+
| 'fjord'
|
|
16
|
+
| 'daemmerung'
|
|
17
|
+
|
|
18
|
+
export type PaletteLayout = 'paper' | 'workshop'
|
|
19
|
+
|
|
20
|
+
export interface Palette {
|
|
21
|
+
id: PaletteId
|
|
22
|
+
label: string
|
|
23
|
+
/** The faces `data-palette-fonts` switches to. */
|
|
24
|
+
type: string
|
|
25
|
+
/** ground, surface, accent: the picker's swatch (light and dark). */
|
|
26
|
+
swatch: { light: [string, string, string]; dark: [string, string, string] }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const PALETTES: readonly Palette[] = [
|
|
30
|
+
{
|
|
31
|
+
id: 'kiln',
|
|
32
|
+
label: 'Kiln',
|
|
33
|
+
type: 'Geist',
|
|
34
|
+
swatch: { light: ['#efe9e4', '#fdfbf9', '#b4532a'], dark: ['#1d1a17', '#262220', '#e0794a'] },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'stein',
|
|
38
|
+
label: 'Stein',
|
|
39
|
+
type: 'Geist',
|
|
40
|
+
swatch: { light: ['#ecebe7', '#ffffff', '#1d1b19'], dark: ['#1a1918', '#232220', '#f0f0ee'] },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'tinte',
|
|
44
|
+
label: 'Tinte',
|
|
45
|
+
type: 'Geist + Newsreader',
|
|
46
|
+
swatch: { light: ['#efebe3', '#fbf9f4', '#2c4a7a'], dark: ['#1b1a17', '#24221f', '#9db6e0'] },
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'graphit',
|
|
50
|
+
label: 'Graphit',
|
|
51
|
+
type: 'IBM Plex',
|
|
52
|
+
swatch: { light: ['#eef0f3', '#ffffff', '#4f5bd5'], dark: ['#17191d', '#1f2126', '#9aa3ef'] },
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'mono',
|
|
56
|
+
label: 'Mono',
|
|
57
|
+
type: 'Inter',
|
|
58
|
+
swatch: { light: ['#f2f2f2', '#ffffff', '#111111'], dark: ['#161616', '#1f1f1f', '#f2f2f2'] },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'mitternacht',
|
|
62
|
+
label: 'Mitternacht',
|
|
63
|
+
type: 'IBM Plex',
|
|
64
|
+
swatch: { light: ['#e9edf3', '#fbfcfd', '#20698a'], dark: ['#11141c', '#171b25', '#5fb4d9'] },
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'leinen',
|
|
68
|
+
label: 'Leinen',
|
|
69
|
+
type: 'Figtree + Source Serif',
|
|
70
|
+
swatch: { light: ['#ece8df', '#fdfcf9', '#4f7a4a'], dark: ['#1a1a16', '#23231e', '#9cc492'] },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'fjord',
|
|
74
|
+
label: 'Fjord',
|
|
75
|
+
type: 'Figtree',
|
|
76
|
+
swatch: { light: ['#e6ebef', '#fbfcfd', '#2f6f8f'], dark: ['#151a1e', '#1d2328', '#86c0dc'] },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'daemmerung',
|
|
80
|
+
label: 'Dämmerung',
|
|
81
|
+
type: 'Figtree + Newsreader',
|
|
82
|
+
swatch: { light: ['#ece8ef', '#fcfbfd', '#7a4a99'], dark: ['#1b1820', '#24202b', '#c9a2e0'] },
|
|
83
|
+
},
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
export const DEFAULT_PALETTE: PaletteId = 'kiln'
|
|
87
|
+
|
|
88
|
+
/** Cookie the apps keep the choice in (read on the server, so the first paint is right). */
|
|
89
|
+
export const PALETTE_COOKIE = 'forge-palette'
|
|
90
|
+
|
|
91
|
+
export function isPaletteId(value: unknown): value is PaletteId {
|
|
92
|
+
return typeof value === 'string' && PALETTES.some(p => p.id === value)
|
|
93
|
+
}
|