@weasel-js/theme 0.7.2 → 1.0.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/NOTICE +18 -0
- package/README.md +61 -6
- package/dist/chunk-RATE4LL3.js +786 -0
- package/dist/chunk-RATE4LL3.js.map +1 -0
- package/dist/fonts.css +19 -0
- package/dist/index.d.ts +32 -83
- package/dist/index.js +144 -90
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +38 -0
- package/dist/react.js +45 -0
- package/dist/react.js.map +1 -0
- package/dist/resolveTheme-Bl6riwGu.d.ts +234 -0
- package/dist/tokens.css +104 -172
- package/fonts/OFL-Inter.txt +92 -0
- package/fonts/OFL-Oswald.txt +93 -0
- package/fonts/README.md +70 -0
- package/fonts/inter-latin.woff2 +0 -0
- package/fonts/oswald-latin-variable.woff2 +0 -0
- package/package.json +21 -2
package/dist/tokens.css
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* this file and define the variables themselves at the desired scope.
|
|
4
|
-
*
|
|
5
|
-
* Structure:
|
|
6
|
-
* 1. Primitive scale — raw values, not for direct consumption
|
|
7
|
-
* 2. Semantic tokens — what components reference
|
|
8
|
-
* 3. Deprecated aliases — kept so older components keep rendering
|
|
1
|
+
/* GENERATED by packages/theme/scripts/build-tokens.ts — do not edit.
|
|
2
|
+
* Source: packages/theme/tokens/<theme>/
|
|
9
3
|
*/
|
|
10
|
-
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400&display=swap');
|
|
11
4
|
|
|
12
5
|
:root {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/* Neutrals — perceptually-spaced gray ramp. */
|
|
16
|
-
--wzl-gray-50: #f5f5f6;
|
|
6
|
+
--wzl-gray-50: #f5f5f6;
|
|
17
7
|
--wzl-gray-100: #e6e7e9;
|
|
18
8
|
--wzl-gray-200: #c9cbcf;
|
|
19
9
|
--wzl-gray-300: #9ea1a8;
|
|
@@ -23,190 +13,132 @@
|
|
|
23
13
|
--wzl-gray-700: #25272c;
|
|
24
14
|
--wzl-gray-800: #181a1e;
|
|
25
15
|
--wzl-gray-900: #0e0f12;
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
|
|
29
|
-
* Apps override at their own scope. */
|
|
30
|
-
--wzl-accent-soft: #1d1454;
|
|
31
|
-
--wzl-accent-base: #2e1f7a;
|
|
16
|
+
--wzl-accent-soft: #1d1454;
|
|
17
|
+
/* Midnight blue-violet. Deep and saturated; anchors primary actions on light and dark surfaces alike. */
|
|
18
|
+
--wzl-accent-base: #2e1f7a;
|
|
32
19
|
--wzl-accent-strong: #5841b8;
|
|
33
|
-
|
|
34
|
-
--wzl-danger-base: #d94a3f;
|
|
20
|
+
--wzl-danger-base: #d94a3f;
|
|
35
21
|
--wzl-warning-base: #d99a3f;
|
|
36
22
|
--wzl-success-base: #2ec27e;
|
|
37
|
-
|
|
38
|
-
/*
|
|
23
|
+
--wzl-fg-on-accent: var(--wzl-gray-50);
|
|
24
|
+
/* Barely-there separators (table rows). */
|
|
25
|
+
--wzl-line-subtle: color-mix(in srgb, var(--wzl-fg) 10%, transparent);
|
|
26
|
+
/* Primary gridlines on sunken surfaces. */
|
|
27
|
+
--wzl-line: color-mix(in srgb, var(--wzl-fg) 20%, transparent);
|
|
28
|
+
/* Axes and emphasized dividers. */
|
|
29
|
+
--wzl-line-strong: color-mix(in srgb, var(--wzl-fg) 40%, transparent);
|
|
30
|
+
/* Drawn data curves. Routes through the bright accent because accent-base is too dim on sunken surfaces. */
|
|
31
|
+
--wzl-curve-color: var(--wzl-accent-strong);
|
|
32
|
+
--wzl-accent: var(--wzl-accent-base);
|
|
33
|
+
--wzl-accent-hover: var(--wzl-accent-strong);
|
|
34
|
+
--wzl-danger: var(--wzl-danger-base);
|
|
35
|
+
--wzl-warning: var(--wzl-warning-base);
|
|
36
|
+
--wzl-success: var(--wzl-success-base);
|
|
37
|
+
--wzl-focus-ring: var(--wzl-accent-strong);
|
|
38
|
+
/* Frosted-glass tint. Components compose it as color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent) with backdrop-filter: blur(3px). */
|
|
39
|
+
--wzl-glass-tint: var(--wzl-accent);
|
|
40
|
+
/* Hover wash over a raised surface. Same formula as line-subtle, different job — do not collapse them. */
|
|
41
|
+
--wzl-surface-hover: color-mix(in srgb, var(--wzl-fg) 10%, transparent);
|
|
42
|
+
/* Pressed wash over a raised surface. */
|
|
43
|
+
--wzl-surface-pressed: color-mix(in srgb, var(--wzl-fg) 18%, transparent);
|
|
44
|
+
/* First of ten categorical spot colors for plotting, status and data viz. Ordered — take them in sequence. Mode-invariant on purpose: a series keeps its color when the mode flips. */
|
|
45
|
+
--wzl-swatch-green: #2fdd18;
|
|
46
|
+
--wzl-swatch-pink: #ff5885;
|
|
47
|
+
--wzl-swatch-cyan: #00dfff;
|
|
48
|
+
--wzl-swatch-gold: #dcb700;
|
|
49
|
+
--wzl-swatch-amber: #ff8c00;
|
|
50
|
+
--wzl-swatch-violet: #a497ff;
|
|
51
|
+
--wzl-swatch-mint: #00e7af;
|
|
52
|
+
--wzl-swatch-sky: #00b8ff;
|
|
53
|
+
--wzl-swatch-orange: #ff6b00;
|
|
54
|
+
--wzl-swatch-magenta: #ff6eff;
|
|
39
55
|
--wzl-radius-sm: 3px;
|
|
40
56
|
--wzl-radius-md: 5px;
|
|
41
|
-
--wzl-border-w:
|
|
42
|
-
/*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
57
|
+
--wzl-border-w: 1px;
|
|
58
|
+
/* Structural lines — gridlines, dividers, axes. */
|
|
59
|
+
--wzl-line-width: 2px;
|
|
60
|
+
/* Drawn data curves. Heavier than structural lines so data reads as primary content. */
|
|
61
|
+
--wzl-curve-width: 3px;
|
|
62
|
+
/* Height of a horizontal toolbar strip (ActionsBar, OptionsBar, ToggleBar, ToolOptionsBar). */
|
|
47
63
|
--wzl-tb-height: 28px;
|
|
48
|
-
|
|
49
|
-
/*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
--wzl-
|
|
64
|
+
--wzl-radius-lg: 14px;
|
|
65
|
+
/* Height of an interactive control — button, input, select. Distinct from tb-height, which sizes the strip a row of them sits in. */
|
|
66
|
+
--wzl-control-h: 28px;
|
|
67
|
+
/* Backdrop blur radius for frosted surfaces. Pairs with glass-tint. */
|
|
68
|
+
--wzl-glass-blur: 3px;
|
|
69
|
+
--wzl-font-size: 13px;
|
|
70
|
+
--wzl-font-size-sm: 11px;
|
|
71
|
+
--wzl-space-xs: 4px;
|
|
72
|
+
--wzl-space-sm: 8px;
|
|
73
|
+
--wzl-space-md: 12px;
|
|
74
|
+
--wzl-space-lg: 16px;
|
|
75
|
+
--wzl-z-toolbar: 10;
|
|
76
|
+
--wzl-z-overlay: 20;
|
|
77
|
+
--wzl-z-modal: 30;
|
|
78
|
+
/* Layered backdrop fill for a page or lab root. `none` here; a theme with a signature background sets it. */
|
|
79
|
+
--wzl-backdrop: none;
|
|
80
|
+
/* Micro-interactions — hover, focus, pressed. */
|
|
81
|
+
--wzl-motion-fast: 120ms;
|
|
82
|
+
/* Entrances and exits — toasts, popovers, panels. */
|
|
56
83
|
--wzl-motion-medium: 240ms;
|
|
57
|
-
--wzl-ease-in-cubic:
|
|
58
|
-
--wzl-ease-out-cubic:
|
|
84
|
+
--wzl-ease-in-cubic: cubic-bezier(0.32, 0, 0.67, 0);
|
|
85
|
+
--wzl-ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
|
|
59
86
|
--wzl-ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
|
|
60
|
-
--wzl-ease-out-back:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* cuts get too blocky for this face at any size. */
|
|
68
|
-
--wzl-font-ui: 'Oswald', 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif;
|
|
69
|
-
--wzl-font-display: 'Oswald', 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif;
|
|
70
|
-
/* Body face — Inter for paragraphs and long-form prose. Consumers must
|
|
71
|
-
* load the Inter webfont themselves (or accept the system-ui fallback). */
|
|
72
|
-
--wzl-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
73
|
-
--wzl-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
74
|
-
/* Weight tokens are tuned to the UI face (Oswald 200/300/400). Body /
|
|
75
|
-
* prose text using Inter will typically hardcode its own weights (e.g.
|
|
76
|
-
* 400/700) rather than route through these. */
|
|
77
|
-
--wzl-font-weight-light: 200;
|
|
87
|
+
--wzl-ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
88
|
+
/* Condensed UI/display face. The heavier cuts get blocky at any size, so the weight tokens stay in the 200-400 range. */
|
|
89
|
+
--wzl-font-ui: Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif;
|
|
90
|
+
--wzl-font-display: Oswald, 'Helvetica Neue Condensed', 'Arial Narrow', system-ui, sans-serif;
|
|
91
|
+
--wzl-font-body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
92
|
+
--wzl-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
93
|
+
--wzl-font-weight-light: 200;
|
|
78
94
|
--wzl-font-weight-normal: 300;
|
|
79
|
-
--wzl-font-weight-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/* Surfaces — three depths. */
|
|
84
|
-
--wzl-surface: var(--wzl-gray-800);
|
|
95
|
+
--wzl-font-weight-medium: 350;
|
|
96
|
+
--wzl-font-weight-bold: 400;
|
|
97
|
+
--wzl-surface: var(--wzl-gray-800);
|
|
85
98
|
--wzl-surface-raised: var(--wzl-gray-700);
|
|
86
99
|
--wzl-surface-sunken: var(--wzl-gray-900);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
--wzl-fg:
|
|
90
|
-
--wzl-
|
|
91
|
-
--wzl-fg-subtle: var(--wzl-gray-400);
|
|
92
|
-
--wzl-fg-on-accent: var(--wzl-gray-50);
|
|
93
|
-
|
|
94
|
-
/* Borders */
|
|
95
|
-
--wzl-border: var(--wzl-gray-700);
|
|
100
|
+
--wzl-fg: var(--wzl-gray-100);
|
|
101
|
+
--wzl-fg-muted: var(--wzl-gray-300);
|
|
102
|
+
--wzl-fg-subtle: var(--wzl-gray-400);
|
|
103
|
+
--wzl-border: var(--wzl-gray-700);
|
|
96
104
|
--wzl-border-strong: var(--wzl-gray-600);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* for whichever surface it's drawn on without needing per-mode values.
|
|
102
|
-
* Perceptual jobs: `subtle` = barely-there separators (table rows),
|
|
103
|
-
* default = primary gridlines on sunken surfaces, `strong` = axes /
|
|
104
|
-
* emphasized dividers. */
|
|
105
|
-
--wzl-line-subtle: color-mix(in srgb, var(--wzl-fg) 10%, transparent);
|
|
106
|
-
--wzl-line: color-mix(in srgb, var(--wzl-fg) 20%, transparent);
|
|
107
|
-
--wzl-line-strong: color-mix(in srgb, var(--wzl-fg) 40%, transparent);
|
|
108
|
-
/* Stroke widths.
|
|
109
|
-
* --wzl-line-width : structural lines (gridlines, dividers, axes).
|
|
110
|
-
* --wzl-curve-width : drawn data curves / signal traces. Heavier than
|
|
111
|
-
* structural lines so the data reads as primary
|
|
112
|
-
* content. Independently tunable. */
|
|
113
|
-
--wzl-line-width: 2px;
|
|
114
|
-
--wzl-curve-width: 3px;
|
|
115
|
-
/* Curve color — used by plot components (CurveEditor today; future
|
|
116
|
-
* waveform / chart widgets). Routes through the bright accent variant
|
|
117
|
-
* because --wzl-accent (midnight purple) is too dim on sunken
|
|
118
|
-
* surfaces. */
|
|
119
|
-
--wzl-curve-color: var(--wzl-accent-strong);
|
|
120
|
-
|
|
121
|
-
/* Interactive */
|
|
122
|
-
--wzl-accent: var(--wzl-accent-base);
|
|
123
|
-
/* Accent for *foreground* use — text, icons, selected-state labels drawn
|
|
124
|
-
* directly on a surface. --wzl-accent is a fill; the midnight base is too
|
|
125
|
-
* dim to read as text against dark surfaces (same reason --wzl-curve-color
|
|
126
|
-
* routes through the strong variant). Flips to the deep base in light
|
|
127
|
-
* mode, where it's the legible one. */
|
|
128
|
-
--wzl-accent-fg: var(--wzl-accent-strong);
|
|
129
|
-
--wzl-accent-hover: var(--wzl-accent-strong);
|
|
130
|
-
--wzl-danger: var(--wzl-danger-base);
|
|
131
|
-
--wzl-warning: var(--wzl-warning-base);
|
|
132
|
-
--wzl-success: var(--wzl-success-base);
|
|
133
|
-
--wzl-focus-ring: var(--wzl-accent-strong);
|
|
134
|
-
|
|
135
|
-
/* Frosted glass — the kit's signature treatment. Components compose:
|
|
136
|
-
* background: color-mix(in srgb, var(--wzl-glass-tint) 78%, transparent);
|
|
137
|
-
* backdrop-filter: blur(3px);
|
|
138
|
-
* Override `--wzl-glass-tint` at the component scope to tint glass
|
|
139
|
-
* with something other than the accent (e.g. danger). */
|
|
140
|
-
--wzl-glass-tint: var(--wzl-accent);
|
|
141
|
-
|
|
142
|
-
/* ---------- 3. Deprecated aliases ---------- *
|
|
143
|
-
* Older components still reference these names. New code should use
|
|
144
|
-
* the semantic tokens above. These will be removed once every
|
|
145
|
-
* component has been migrated.
|
|
146
|
-
*/
|
|
147
|
-
--wzl-text: var(--wzl-fg);
|
|
148
|
-
--wzl-text-muted: var(--wzl-fg-muted);
|
|
149
|
-
--wzl-bg: var(--wzl-surface);
|
|
150
|
-
--wzl-muted: var(--wzl-fg-muted);
|
|
151
|
-
--wzl-panel-bg: var(--wzl-surface);
|
|
152
|
-
--wzl-panel-border: var(--wzl-border);
|
|
153
|
-
--wzl-input-bg: var(--wzl-surface-sunken);
|
|
154
|
-
--wzl-track-bg: var(--wzl-surface-sunken);
|
|
155
|
-
--wzl-track-border: var(--wzl-border);
|
|
156
|
-
--wzl-thumb-fill: var(--wzl-fg-muted);
|
|
157
|
-
--wzl-thumb-border: var(--wzl-border-strong);
|
|
158
|
-
--wzl-thumb-text: var(--wzl-gray-900);
|
|
159
|
-
--wzl-button-fill: var(--wzl-surface-raised);
|
|
160
|
-
--wzl-button-fill-hover: color-mix(in srgb, var(--wzl-fg) 10%, transparent);
|
|
161
|
-
--wzl-button-fill-pressed: color-mix(in srgb, var(--wzl-fg) 18%, transparent);
|
|
162
|
-
--wzl-button-text: var(--wzl-fg);
|
|
105
|
+
/* Accent for foreground use — text, icons, selected labels drawn on a surface. accent is a fill; the midnight base is too dim to read as text on dark surfaces. */
|
|
106
|
+
--wzl-accent-fg: var(--wzl-accent-strong);
|
|
107
|
+
/* Text drawn on a filled foreground-colored element (e.g. a slider thumb). Flips with the mode, so it is a semantic, not an alias to a primitive. */
|
|
108
|
+
--wzl-fg-inverse: var(--wzl-gray-900);
|
|
163
109
|
}
|
|
164
110
|
|
|
165
|
-
/* Default the document's UI font to the token. Apps that want a
|
|
166
|
-
* different face override at their own scope. */
|
|
167
111
|
:root {
|
|
168
112
|
font-family: var(--wzl-font-ui);
|
|
169
113
|
font-weight: var(--wzl-font-weight-normal);
|
|
170
114
|
}
|
|
171
115
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
* dark values in `:root` for every semantic token that has a light override. */
|
|
175
|
-
[data-theme='dark'] {
|
|
116
|
+
[data-wzl-theme='weasel'][data-wzl-mode='dark'],
|
|
117
|
+
[data-wzl-mode='dark'] {
|
|
176
118
|
color-scheme: dark;
|
|
177
|
-
--wzl-surface:
|
|
119
|
+
--wzl-surface: var(--wzl-gray-800);
|
|
178
120
|
--wzl-surface-raised: var(--wzl-gray-700);
|
|
179
121
|
--wzl-surface-sunken: var(--wzl-gray-900);
|
|
180
|
-
|
|
181
|
-
--wzl-fg:
|
|
182
|
-
--wzl-fg-
|
|
183
|
-
--wzl-
|
|
184
|
-
|
|
185
|
-
--wzl-
|
|
186
|
-
--wzl-
|
|
187
|
-
|
|
188
|
-
--wzl-accent-fg: var(--wzl-accent-strong);
|
|
189
|
-
|
|
190
|
-
--wzl-thumb-text: var(--wzl-gray-900);
|
|
122
|
+
--wzl-fg: var(--wzl-gray-100);
|
|
123
|
+
--wzl-fg-muted: var(--wzl-gray-300);
|
|
124
|
+
--wzl-fg-subtle: var(--wzl-gray-400);
|
|
125
|
+
--wzl-border: var(--wzl-gray-700);
|
|
126
|
+
--wzl-border-strong: var(--wzl-gray-600);
|
|
127
|
+
--wzl-accent-fg: var(--wzl-accent-strong);
|
|
128
|
+
--wzl-fg-inverse: var(--wzl-gray-900);
|
|
191
129
|
}
|
|
192
130
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
* `data-theme="light"` on `<html>` (or any ancestor — these cascade). */
|
|
196
|
-
[data-theme='light'] {
|
|
131
|
+
[data-wzl-theme='weasel'][data-wzl-mode='light'],
|
|
132
|
+
[data-wzl-mode='light'] {
|
|
197
133
|
color-scheme: light;
|
|
198
|
-
--wzl-surface:
|
|
134
|
+
--wzl-surface: var(--wzl-gray-50);
|
|
199
135
|
--wzl-surface-raised: var(--wzl-gray-100);
|
|
200
136
|
--wzl-surface-sunken: var(--wzl-gray-200);
|
|
201
|
-
|
|
202
|
-
--wzl-fg:
|
|
203
|
-
--wzl-fg-
|
|
204
|
-
--wzl-
|
|
205
|
-
|
|
206
|
-
--wzl-
|
|
207
|
-
--wzl-
|
|
208
|
-
|
|
209
|
-
--wzl-accent-fg: var(--wzl-accent-base);
|
|
210
|
-
|
|
211
|
-
--wzl-thumb-text: var(--wzl-gray-50);
|
|
137
|
+
--wzl-fg: var(--wzl-gray-900);
|
|
138
|
+
--wzl-fg-muted: var(--wzl-gray-600);
|
|
139
|
+
--wzl-fg-subtle: var(--wzl-gray-500);
|
|
140
|
+
--wzl-border: var(--wzl-gray-200);
|
|
141
|
+
--wzl-border-strong: var(--wzl-gray-300);
|
|
142
|
+
--wzl-accent-fg: var(--wzl-accent-base);
|
|
143
|
+
--wzl-fg-inverse: var(--wzl-gray-50);
|
|
212
144
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Oswald Project Authors (https://github.com/googlefonts/OswaldFont)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/fonts/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Bundled fonts
|
|
2
|
+
|
|
3
|
+
Two OFL-1.1 faces, vendored so the kit never fetches a stylesheet from a
|
|
4
|
+
third-party host at runtime.
|
|
5
|
+
|
|
6
|
+
| file | token | role |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| `oswald-latin-variable.woff2` | `--wzl-font-ui`, `--wzl-font-display` | condensed UI/display face, variable `wght 200–700` |
|
|
9
|
+
| `inter-latin.woff2` | `--wzl-font-body` | body/prose face, weight 400 |
|
|
10
|
+
|
|
11
|
+
Loading them is opt-in: `import '@weasel-js/theme/fonts.css'`. Skip it and the
|
|
12
|
+
token font stacks fall back to `system-ui`.
|
|
13
|
+
|
|
14
|
+
## Tooling
|
|
15
|
+
|
|
16
|
+
Both commands need `fontTools` **with the Brotli extension** — without it,
|
|
17
|
+
`--flavor=woff2` fails with `ImportError: No module named brotli`. Homebrew's
|
|
18
|
+
`fonttools` formula does not include it, so use a throwaway venv:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
python3 -m venv /tmp/fontvenv
|
|
22
|
+
/tmp/fontvenv/bin/pip install fonttools brotli
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Provenance — Oswald
|
|
26
|
+
|
|
27
|
+
Upstream `fonts/variable/Oswald[wght].ttf` from
|
|
28
|
+
https://github.com/googlefonts/OswaldFont, subset to the Google Fonts `latin`
|
|
29
|
+
range plus the three combining marks labkit's `@font-face` declares
|
|
30
|
+
(`U+0304`, `U+0308`, `U+0329`):
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
/tmp/fontvenv/bin/pyftsubset "Oswald[wght].ttf" \
|
|
34
|
+
--unicodes="U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD" \
|
|
35
|
+
--layout-features="kern" \
|
|
36
|
+
--no-hinting \
|
|
37
|
+
--flavor=woff2 \
|
|
38
|
+
--output-file=oswald-latin-variable.woff2
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
172 kB → 26 kB. The `wght` axis survives subsetting at its full 200–700 range,
|
|
42
|
+
which is what `fonts.css` declares. Oswald has no weights outside that range;
|
|
43
|
+
anything asking for 100 or 900 is clamped.
|
|
44
|
+
|
|
45
|
+
`--no-hinting` matches the treatment of `assets/fonts/inter/inter.ttf`; nothing
|
|
46
|
+
in the kit reads hints.
|
|
47
|
+
|
|
48
|
+
Oswald's OFL notice carries **no Reserved Font Name**, so a subset may keep the
|
|
49
|
+
family name.
|
|
50
|
+
|
|
51
|
+
## Provenance — Inter
|
|
52
|
+
|
|
53
|
+
Re-flavored from `assets/fonts/inter/inter.ttf`, which is already Inter v4.1
|
|
54
|
+
`Inter-Regular.ttf` subset to U+0020–00FF and de-hinted (see that directory's
|
|
55
|
+
README for the original command):
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
/tmp/fontvenv/bin/pyftsubset assets/fonts/inter/inter.ttf \
|
|
59
|
+
--unicodes="U+0020-00FF" \
|
|
60
|
+
--layout-features="kern" \
|
|
61
|
+
--no-hinting \
|
|
62
|
+
--flavor=woff2 \
|
|
63
|
+
--output-file=inter-latin.woff2
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
Both faces are SIL Open Font License 1.1 — `OFL-Oswald.txt` and `OFL-Inter.txt`,
|
|
69
|
+
redistributed with the fonts as the license requires. The OFL covers these font
|
|
70
|
+
binaries only; the package's code is MIT (see `../LICENSE`).
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weasel-js/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Design tokens shared by weasel-ui and weasel-hud — CSS variables + a parallel TS export.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,9 +15,22 @@
|
|
|
15
15
|
"import": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts"
|
|
17
17
|
},
|
|
18
|
+
"./react": {
|
|
19
|
+
"import": "./dist/react.js",
|
|
20
|
+
"types": "./dist/react.d.ts"
|
|
21
|
+
},
|
|
18
22
|
"./tokens.css": "./dist/tokens.css",
|
|
23
|
+
"./fonts.css": "./dist/fonts.css",
|
|
19
24
|
"./package.json": "./package.json"
|
|
20
25
|
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=18"
|
|
28
|
+
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"react": {
|
|
31
|
+
"optional": true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
21
34
|
"author": "orochi235",
|
|
22
35
|
"homepage": "https://orochi235.github.io/weasel/",
|
|
23
36
|
"repository": {
|
|
@@ -33,14 +46,20 @@
|
|
|
33
46
|
},
|
|
34
47
|
"files": [
|
|
35
48
|
"dist",
|
|
49
|
+
"fonts",
|
|
50
|
+
"NOTICE",
|
|
36
51
|
"README.md",
|
|
37
52
|
"LICENSE"
|
|
38
53
|
],
|
|
39
54
|
"scripts": {
|
|
40
|
-
"
|
|
55
|
+
"gen:tokens": "tsx scripts/build-tokens.ts",
|
|
56
|
+
"build": "npm run gen:tokens && tsup && cp src/generated/tokens.css dist/tokens.css && cp src/fonts.css dist/fonts.css"
|
|
41
57
|
},
|
|
42
58
|
"publishConfig": {
|
|
43
59
|
"access": "public",
|
|
44
60
|
"provenance": true
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"tsx": "^4.23.11"
|
|
45
64
|
}
|
|
46
65
|
}
|