@letterstory/design 0.2.6 → 0.2.8
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/PRINCIPLES.md +5 -2
- package/README.md +6 -1
- package/package.json +1 -1
- package/styled.d.ts +4 -0
- package/styled.js +9 -5
- package/tailwind-v3.cjs +4 -0
- package/tailwind-v4.css +7 -3
- package/tokens.css +8 -4
- package/tokens.json +8 -4
package/PRINCIPLES.md
CHANGED
|
@@ -46,7 +46,9 @@
|
|
|
46
46
|
feature's private module are an ESLint error.
|
|
47
47
|
Two visual rules every primitive and feature follows:
|
|
48
48
|
- **No sharp corners.** Inputs, buttons, cards, panels and popovers are rounded 4px or
|
|
49
|
-
6px
|
|
49
|
+
6px, never square. The radius token makes the scale obey it: `rounded-xs` and `rounded-sm`
|
|
50
|
+
are 4px (as is Tailwind's bare `rounded`), `rounded-md` through `rounded-4xl` are 6px
|
|
51
|
+
(`design/tokens.json`).
|
|
50
52
|
- **Borders line up.** Dividers in side-by-side panes sit on the same line (match header
|
|
51
53
|
heights), and borders that meet join cleanly — no offset seams or stray stubs where
|
|
52
54
|
one pane's border runs past another's.
|
|
@@ -99,6 +101,7 @@ The founders' definitions (All Hands 2026-10-29). Detail in `docs/architecture/o
|
|
|
99
101
|
all use.
|
|
100
102
|
- **Fix finds and fixes what is broken.** Models are good at finding errors, so Fix gets more room than
|
|
101
103
|
Plan. It works from a list of known issues (`recipes.kind = known_issue`), not recipes, and also
|
|
102
|
-
catches problems outside that list.
|
|
104
|
+
catches problems outside that list. A known issue is a family of one mistake with its cases as variations: the
|
|
105
|
+
finder reads only the patterns, the check reads when it is not a mistake (`lib/recipes/known-issues.ts`). Technical problems a rule can decide (broken or missing
|
|
103
106
|
structured data, link previews) are rules (`lib/site/observations/`). A "Z is broken" row belongs
|
|
104
107
|
in Fix's known issues, never in the Plan.
|
package/README.md
CHANGED
|
@@ -30,7 +30,12 @@ commit both.
|
|
|
30
30
|
In `tokens.json`, `color.dark` holds only the values that differ from light (exactly what the
|
|
31
31
|
`.dark` block sets); `styled.js` resolves that into a full dark palette. Derived tokens keep
|
|
32
32
|
their CSS expressions (`brand-light` is `oklch(from var(--brand) …)`, `radius.sm` is
|
|
33
|
-
`calc(var(--radius) -
|
|
33
|
+
`calc(var(--radius) - 2px)`), so rebranding is one value: `color.light.brand`.
|
|
34
|
+
|
|
35
|
+
The radius scale has two steps, because a corner is 4px or 6px and never anything else
|
|
36
|
+
(`PRINCIPLES.md`, "No sharp corners"): `--radius` is 6px, `xs` and `sm` are 4px, and `md`
|
|
37
|
+
through `4xl` are all `--radius`. Every step Tailwind ships is overridden, so no `rounded-*`
|
|
38
|
+
class falls through to Tailwind's larger defaults; `rounded-full` stays a pill.
|
|
34
39
|
|
|
35
40
|
## Consuming it
|
|
36
41
|
|
package/package.json
CHANGED
package/styled.d.ts
CHANGED
|
@@ -51,10 +51,14 @@ export interface Palette {
|
|
|
51
51
|
|
|
52
52
|
export interface Radius {
|
|
53
53
|
readonly DEFAULT: string;
|
|
54
|
+
readonly xs: string;
|
|
54
55
|
readonly sm: string;
|
|
55
56
|
readonly md: string;
|
|
56
57
|
readonly lg: string;
|
|
57
58
|
readonly xl: string;
|
|
59
|
+
readonly "2xl": string;
|
|
60
|
+
readonly "3xl": string;
|
|
61
|
+
readonly "4xl": string;
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
export interface FontFamily {
|
package/styled.js
CHANGED
|
@@ -104,11 +104,15 @@ export const tokens = {
|
|
|
104
104
|
},
|
|
105
105
|
},
|
|
106
106
|
radius: {
|
|
107
|
-
DEFAULT: "0.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
DEFAULT: "0.375rem",
|
|
108
|
+
xs: "calc(0.375rem - 2px)",
|
|
109
|
+
sm: "calc(0.375rem - 2px)",
|
|
110
|
+
md: "0.375rem",
|
|
111
|
+
lg: "0.375rem",
|
|
112
|
+
xl: "0.375rem",
|
|
113
|
+
"2xl": "0.375rem",
|
|
114
|
+
"3xl": "0.375rem",
|
|
115
|
+
"4xl": "0.375rem",
|
|
112
116
|
},
|
|
113
117
|
font: {
|
|
114
118
|
sans: '"DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
package/tailwind-v3.cjs
CHANGED
|
@@ -58,10 +58,14 @@ module.exports = {
|
|
|
58
58
|
},
|
|
59
59
|
borderRadius: {
|
|
60
60
|
DEFAULT: "var(--radius)",
|
|
61
|
+
xs: "var(--radius-xs)",
|
|
61
62
|
sm: "var(--radius-sm)",
|
|
62
63
|
md: "var(--radius-md)",
|
|
63
64
|
lg: "var(--radius-lg)",
|
|
64
65
|
xl: "var(--radius-xl)",
|
|
66
|
+
"2xl": "var(--radius-2xl)",
|
|
67
|
+
"3xl": "var(--radius-3xl)",
|
|
68
|
+
"4xl": "var(--radius-4xl)",
|
|
65
69
|
},
|
|
66
70
|
fontFamily: {
|
|
67
71
|
sans: "var(--font-sans)",
|
package/tailwind-v4.css
CHANGED
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
* Tailwind's own names.
|
|
9
9
|
*/
|
|
10
10
|
@theme inline {
|
|
11
|
-
--radius-
|
|
12
|
-
--radius-
|
|
11
|
+
--radius-xs: calc(var(--radius) - 2px);
|
|
12
|
+
--radius-sm: calc(var(--radius) - 2px);
|
|
13
|
+
--radius-md: var(--radius);
|
|
13
14
|
--radius-lg: var(--radius);
|
|
14
|
-
--radius-xl:
|
|
15
|
+
--radius-xl: var(--radius);
|
|
16
|
+
--radius-2xl: var(--radius);
|
|
17
|
+
--radius-3xl: var(--radius);
|
|
18
|
+
--radius-4xl: var(--radius);
|
|
15
19
|
--color-brand: var(--brand);
|
|
16
20
|
--color-brand-foreground: var(--brand-foreground);
|
|
17
21
|
--color-brand-light: var(--brand-light);
|
package/tokens.css
CHANGED
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
* @theme mapping; radii and the type scale are mirrored in each adapter instead.
|
|
11
11
|
*/
|
|
12
12
|
:root {
|
|
13
|
-
--radius: 0.
|
|
14
|
-
--radius-
|
|
15
|
-
--radius-
|
|
13
|
+
--radius: 0.375rem;
|
|
14
|
+
--radius-xs: calc(var(--radius) - 2px);
|
|
15
|
+
--radius-sm: calc(var(--radius) - 2px);
|
|
16
|
+
--radius-md: var(--radius);
|
|
16
17
|
--radius-lg: var(--radius);
|
|
17
|
-
--radius-xl:
|
|
18
|
+
--radius-xl: var(--radius);
|
|
19
|
+
--radius-2xl: var(--radius);
|
|
20
|
+
--radius-3xl: var(--radius);
|
|
21
|
+
--radius-4xl: var(--radius);
|
|
18
22
|
/* BRAND COLOR — the single source (#093959). To rebrand, change color.light.brand in tokens.json. */
|
|
19
23
|
--brand: oklch(0.332 0.074 243.6);
|
|
20
24
|
/* text/icons on a --brand background */
|
package/tokens.json
CHANGED
|
@@ -85,11 +85,15 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"radius": {
|
|
88
|
-
"DEFAULT": "0.
|
|
89
|
-
"
|
|
90
|
-
"
|
|
88
|
+
"DEFAULT": "0.375rem",
|
|
89
|
+
"xs": "calc(var(--radius) - 2px)",
|
|
90
|
+
"sm": "calc(var(--radius) - 2px)",
|
|
91
|
+
"md": "var(--radius)",
|
|
91
92
|
"lg": "var(--radius)",
|
|
92
|
-
"xl": "
|
|
93
|
+
"xl": "var(--radius)",
|
|
94
|
+
"2xl": "var(--radius)",
|
|
95
|
+
"3xl": "var(--radius)",
|
|
96
|
+
"4xl": "var(--radius)"
|
|
93
97
|
},
|
|
94
98
|
"font": {
|
|
95
99
|
"sans": [
|