eidotter 0.41.3 → 0.43.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.
Files changed (40) hide show
  1. package/README.md +6 -4
  2. package/dist/components/Bench/components/Bench.d.ts +45 -0
  3. package/dist/components/Bench/components/Bench.js +46 -0
  4. package/dist/components/Bench/components/index.d.ts +2 -0
  5. package/dist/components/Bench/components/index.js +1 -0
  6. package/dist/components/Bench/index.d.ts +2 -0
  7. package/dist/components/Bench/index.js +1 -0
  8. package/dist/components/CmdPalette/components/CmdPalette.js +5 -3
  9. package/dist/components/Header/components/Header.d.ts +38 -2
  10. package/dist/components/Header/components/Header.js +23 -5
  11. package/dist/components/IconButton/components/IconButton.d.ts +20 -3
  12. package/dist/components/IconButton/components/IconButton.js +1 -1
  13. package/dist/components/IconButton/components/index.d.ts +1 -1
  14. package/dist/components/IconButton/index.d.ts +1 -1
  15. package/dist/components/Lightbox/components/Lightbox.d.ts +2 -1
  16. package/dist/components/Lightbox/components/Lightbox.js +8 -3
  17. package/dist/components/Nav/components/Nav.d.ts +20 -7
  18. package/dist/components/Nav/components/index.d.ts +1 -1
  19. package/dist/components/Nav/index.d.ts +1 -1
  20. package/dist/components/PageShell/components/PageSection.d.ts +25 -0
  21. package/dist/components/PageShell/components/PageSection.js +16 -0
  22. package/dist/components/PageShell/components/PageShell.d.ts +58 -0
  23. package/dist/components/PageShell/components/PageShell.js +29 -0
  24. package/dist/components/PageShell/components/index.d.ts +4 -0
  25. package/dist/components/PageShell/components/index.js +2 -0
  26. package/dist/components/PageShell/index.d.ts +2 -0
  27. package/dist/components/PageShell/index.js +1 -0
  28. package/dist/components/RangeBar/components/RangeBar.js +2 -2
  29. package/dist/components/registry.js +39 -0
  30. package/dist/eidotter.css +1 -1
  31. package/dist/index.d.ts +7 -3
  32. package/dist/index.es.js +1047 -1176
  33. package/dist/index.umd.js +4 -4
  34. package/guidelines/README.md +37 -0
  35. package/guidelines/components.md +2 -2
  36. package/llms.txt +4 -4
  37. package/migrations/0.41.0.md +7 -4
  38. package/migrations/0.43.0.md +129 -0
  39. package/migrations/README.md +2 -0
  40. package/package.json +4 -4
@@ -107,6 +107,43 @@ import 'eidotter/tokens.css'; // Design token CSS variables
107
107
  import 'eidotter/styles'; // Component CSS + Tailwind utilities
108
108
  ```
109
109
 
110
+ ### Fonts: what your build emits
111
+
112
+ `eidotter/styles` declares two font families: the display tier (Perfect DOS
113
+ VGA 437, one TTF, about 80 KB) and the body tier (JetBrains Mono Nerd Font,
114
+ four woff2 files, about 1 MB each). Your bundler copies every file an
115
+ `@font-face` rule points at into the build output, so the four woff2 files
116
+ land in `dist/` even if no page uses the body tier.
117
+
118
+ This is by design and costs no page weight: browsers download a font file
119
+ only when text on the page uses that face. A page that never renders
120
+ `font-dos-body`, `.dos-body`, `.dos-body-lg`, `.dos-caption`, `.dos-micro` or
121
+ `var(--typography-font-family-body)` requests the TTF only. The cost is
122
+ deploy size (about 4 MB of unused files).
123
+
124
+ If deploy size matters and you never use the body tier, drop its four
125
+ `@font-face` rules before your bundler resolves the CSS `url()`s. In Vite:
126
+
127
+ ```js
128
+ // vite.config.js
129
+ const dropEidotterBodyFonts = {
130
+ name: 'drop-eidotter-body-fonts',
131
+ enforce: 'pre',
132
+ transform(code, id) {
133
+ if (!/eidotter[\\/]dist[\\/]eidotter\.css/.test(id)) return null;
134
+ return code.replace(/@font-face\s*\{[^}]*JetBrains Mono Nerd Font[^}]*\}/g, '');
135
+ },
136
+ };
137
+
138
+ export default { plugins: [dropEidotterBodyFonts] };
139
+ ```
140
+
141
+ Checked with Vite 8 on a page that imports only `eidotter/styles`: the build
142
+ output drops from 4.2 MB to 268 KB, and only the TTF is emitted. Body-tier text
143
+ then falls back to the system `monospace`. Other bundlers need the same step
144
+ (remove the four rules from `node_modules/eidotter/dist/eidotter.css` before
145
+ CSS `url()` resolution); eidotter has not tested a recipe for them.
146
+
110
147
  ### Tailwind Preset (optional)
111
148
 
112
149
  Use eidotter tokens as Tailwind classes in your own code:
@@ -462,7 +462,7 @@ Navigation path showing location hierarchy.
462
462
  | currentLabel | `string` | - | **Required.** Current page label |
463
463
  | showBackArrow | `boolean` | `true` | Show < on last trail item |
464
464
  | separator | `string` | `'/'` | Custom separator |
465
- | linkComponent | `Component` | - | Custom link (e.g., Next.js Link) |
465
+ | linkComponent | `NavLinkComponent` | - | Custom link (e.g., Next.js `Link`, passed directly with @types/react 18 or 19) |
466
466
 
467
467
  ### Examples
468
468
 
@@ -761,7 +761,7 @@ Sticky site header composing branding link + Nav. Supports retro/modern variants
761
761
  | activeHref | `string` | — | Currently active href (highlights matching nav link) |
762
762
  | variant | `'retro' \| 'modern'` | `'retro'` | Visual variant applied to both header and nav |
763
763
  | sticky | `boolean` | `true` | Whether the header sticks to viewport top |
764
- | linkComponent | `React.ElementType` | `'a'` | Custom link component for framework routing |
764
+ | linkComponent | `NavLinkComponent` | `'a'` | Custom link component for framework routing (e.g., Next.js `Link`, no wrapper) |
765
765
  | children | `ReactNode` | — | Custom branding content (replaces brandName) |
766
766
  | className | `string` | — | Additional CSS class name |
767
767
 
package/llms.txt CHANGED
@@ -3,7 +3,7 @@
3
3
  > DOS-themed React component library with authentic CGA/amber phosphor aesthetics.
4
4
 
5
5
  ## Quick Facts
6
- - 59 components (Accordion, AIText, Alert, Badge, Brand (Logo, Mark, Wordmark, BrandLockup), Breadcrumb, Button, CalendarHeatmap, Card, Chat (ChatMessage, ChatHistory, ChatInput, ChatContainer), Checkbox, ChecklistRow, CmdPalette, CommandPrompt, Connector, CopyButton, DecayStrip, DosDialog, DosFigure, DosWindow, EmptyState, FilterBar, Footer, Gauge, Header, HoldToComplete, Icon, IconButton, InlineExpand, InlineLink, Input, LabeledProgress, LedgerRow, LegalPage, Lightbox, Meter (MeterGroup), Modal, Nav, Notification, Progress, ProgressRing, RangeBar, RetroEffects, SectionHeading, Select, Separator, SeriesBars, Skeleton, Stat, Switch, Tabs, Tag, Terminal, TextScramble, TimelineContainer, TimelineFeed, TimelineNode, TimelinePage, VitalsStrip)
6
+ - 61 components (Accordion, AIText, Alert, Badge, Bench, Brand (Logo, Mark, Wordmark, BrandLockup), Breadcrumb, Button, CalendarHeatmap, Card, Chat (ChatMessage, ChatHistory, ChatInput, ChatContainer), Checkbox, ChecklistRow, CmdPalette, CommandPrompt, Connector, CopyButton, DecayStrip, DosDialog, DosFigure, DosWindow, EmptyState, FilterBar, Footer, Gauge, Header, HoldToComplete, Icon, IconButton, InlineExpand, InlineLink, Input, LabeledProgress, LedgerRow, LegalPage, Lightbox, Meter (MeterGroup), Modal, Nav, Notification, PageShell (PageSection), Progress, ProgressRing, RangeBar, RetroEffects, SectionHeading, Select, Separator, SeriesBars, Skeleton, Stat, Switch, Tabs, Tag, Terminal, TextScramble, TimelineContainer, TimelineFeed, TimelineNode, TimelinePage, VitalsStrip)
7
7
  - Amber theme is the default (amber-on-black phosphor CRT); a light theme ("amber in daylight") is in progress (DMNC-1058). Components paint via semantic roles so they re-theme — do not hardcode dark-only assumptions.
8
8
  - CSS custom properties + Tailwind preset
9
9
  - React 18/19, Tailwind 3/4 compatible
@@ -27,8 +27,8 @@ Apps default to the amber theme and offer the light theme via a consistent setti
27
27
 
28
28
  ## Upgrading
29
29
  - Every minor with breaking/visible changes ships a guide at `node_modules/eidotter/migrations/<version>.md` (index: `migrations/README.md`).
30
- - Read every guide between the installed and the target version, oldest first, and follow its checklist. First guide: `migrations/0.41.0.md`.
31
- - 0.x caret gotcha: `^0.40.x` never resolves to 0.41.0; bump the range explicitly, to `^0.41.3` (0.41.0 shipped before its review fixes).
30
+ - Read every guide between the installed and the target version, oldest first, and follow its checklist. Guides: `migrations/0.41.0.md`, `migrations/0.43.0.md`.
31
+ - 0.x caret gotcha: `^0.40.x` never resolves to 0.41.0; bump the range explicitly, to `^0.43.0`.
32
32
 
33
33
  ## Token Categories
34
34
  - `--color-semantic-*`: USE THESE for components (background, text, border, status)
@@ -73,7 +73,7 @@ Apps default to the amber theme and offer the light theme via a consistent setti
73
73
  - Input: Text fields
74
74
  - DosDialog: The one overlay shell (CmdPalette chrome + dark title strip with yellow title); placement center/top, size sm/md/lg/full, head/footer slots
75
75
  - Modal: Dialog with title strip and close control, built on DosDialog
76
- - IconButton: The one icon-only control (pixel glyph in a thin square outline, hover inverts); size md 36 (all built-in controls) / window 28 (dense chrome), variant outline/bare, required label; used for every close, prev/next and window control
76
+ - IconButton: The one icon-only control (pixel glyph in a thin square outline, hover inverts); size md 36 (all built-in controls) / window 28 (dense chrome) / touch 44 (stage-sized targets), variant outline/bare, tone accent (default) / inherit (currentColor, for coloured bars), required label; used for every close, prev/next and window control
77
77
  - DosWindow: In-page window chrome (DosDialog strip on a brand border + drop shadow), controls/footer slots, active/inactive; server-safe; DosFigure and Card are built on it
78
78
  - Progress: Loading/completion bars
79
79
  - RetroEffects: CRT scanlines, phosphor glow
@@ -63,6 +63,7 @@ Then change the range explicitly to the latest 0.41.x (0.41.3 or later):
63
63
  ```bash
64
64
  npm install eidotter@^0.41.3
65
65
  # check what actually resolved: 0.41.3 or later
66
+ # going further? read 0.43.0.md next, then install ^0.43.0
66
67
  npm ls eidotter
67
68
  ```
68
69
 
@@ -917,7 +918,7 @@ Work top to bottom. Each step points at the section above that explains it.
917
918
  - [ ] Read every guide in `node_modules/eidotter/migrations/` between your old
918
919
  version and 0.41.0, oldest first (see `README.md` in that folder).
919
920
  - [ ] `cp node_modules/eidotter/dist/eidotter.css /tmp/eidotter-old.css` (before `npm install`).
920
- - [ ] Install the latest 0.41.x (0.41.3 or later): `npm install eidotter@^0.41.3`, then `npm ls eidotter` shows 0.41.3 or later. Commit the lockfile.
921
+ - [ ] Install the latest 0.41.x (0.41.3 or later): `npm install eidotter@^0.41.3` (or straight to `^0.43.0` after reading `0.43.0.md`), then `npm ls eidotter` shows 0.41.3 or later. Commit the lockfile.
921
922
  - [ ] Tailwind v4 apps: load eidotter in a cascade layer (`@layer theme, base, components, eidotter, utilities;` then `@import "eidotter/styles" layer(eidotter);`), drop the JS `import 'eidotter/styles'`, keep your own resets layered ("Tailwind v4 apps" after "How to bump").
922
923
  - [ ] No-Tailwind apps: run the class diff from section 2 and fix every real hit.
923
924
  - [ ] No-preflight apps: set `html` font, colours and `a` colour yourself (section 4).
@@ -945,9 +946,11 @@ additive or automatic unless noted. Details are in the eidotter
945
946
  [CHANGELOG](https://github.com/CinimoDY/eiDotter/blob/main/CHANGELOG.md). It is
946
947
  not shipped in the npm package; read it on GitHub.
947
948
 
948
- - **0.37.2:** two-tier typography. Display text stays Perfect DOS VGA
949
- 437 and body text (`.dos-body`, `font-dos-body`) is JetBrains Mono Nerd Font.
950
- It shipped in 0.37.2; the CHANGELOG describes it under 0.38.0.
949
+ - **0.37.2:** two-tier typography (DMNC-885). Display text stays Perfect DOS
950
+ VGA 437 and body text (`.dos-body`, `font-dos-body`) is JetBrains Mono Nerd
951
+ Font. The four body-tier woff2 files land in your build output from this
952
+ version on; see "Fonts: what your build emits" in `guidelines/README.md` if
953
+ you never use the body tier.
951
954
  - **0.38.0:** `article` entry kind for `TimelineContainer` (thumbnail strip and
952
955
  summary when collapsed; gallery, body and read-more when expanded). Additive.
953
956
  - **0.38.0:** `RetroEffects` `boot` no longer flashes content before the
@@ -0,0 +1,129 @@
1
+ # Upgrading to eidotter 0.43.0
2
+
3
+ From 0.42.x. Coming from older versions, read [0.41.0.md](./0.41.0.md) first.
4
+
5
+ 0.43.0 is mostly additive: a page template (`PageShell`, `PageSection`, `Bench`)
6
+ and four opt-in `Header` props. One change is visible without touching your
7
+ code: a long `Header` brand wraps instead of ending in an ellipsis.
8
+
9
+ ## Who must act
10
+
11
+ - Apps that render `<Header>` with a long `brandName` on narrow screens:
12
+ check the header height (section 2).
13
+ - Everyone else: bump and you are done. The new pieces are optional.
14
+
15
+ ## 1. How to bump
16
+
17
+ 0.x caret ranges stop at the next minor (`^0.42.0` never resolves to 0.43.0),
18
+ so change the range explicitly:
19
+
20
+ ```bash
21
+ npm install eidotter@^0.43.0
22
+ npm ls eidotter # 0.43.0 or later
23
+ ```
24
+
25
+ Commit the lockfile.
26
+
27
+ ## 2. Visible change: the Header brand wraps
28
+
29
+ **What changed.** The brand name in `Header` (`brand="lockup"`, `"mark"`,
30
+ `"text"` or `children`) used to stay on one line and end in "…" when the brand,
31
+ the `end` slot and the MENU trigger did not fit. Now the name moves onto a
32
+ second line. The brand link shrinks before the `end` slot does; the end slot
33
+ clips only once the brand reaches its floor (the icon plus about 8 tracked
34
+ characters). Words break at spaces. Only a single word longer than the floor
35
+ breaks mid-word. The icon top-aligns beside a two-line name. A brand that fits
36
+ on one line renders exactly as before.
37
+
38
+ **How to find it.** Open each page with a `Header` at 320px and 390px wide. If
39
+ the brand name used to end in "…", it now wraps and the header is taller.
40
+
41
+ **What to do.**
42
+
43
+ - Nothing, if the taller header looks fine. This was the intended fix.
44
+ - If something is sized to a fixed header height (`scroll-padding-top`, a
45
+ sticky sub-header's `top`, a hero's `min-height: calc(100vh - 64px)`), measure
46
+ the header instead, or give it room for two lines.
47
+ - If you prefer just the icon on phones, pass `brandCollapse="mark"` (section 3).
48
+ - CSS you wrote against the old ellipsis (`text-overflow` or `white-space` on
49
+ `.eidotter-header__brand-name`) can be deleted.
50
+
51
+ **How to verify.** At 320px the full brand name is readable, nothing paints
52
+ over it, and the MENU trigger stays on the right.
53
+
54
+ ## 3. New, opt-in
55
+
56
+ All defaults render as in 0.42.
57
+
58
+ ### Header props
59
+
60
+ | Prop | Values | Effect |
61
+ |---|---|---|
62
+ | `layout` | `'inline'` (default), `'stacked'` | `stacked`: the desktop nav gets its own row under the brand, on the brand's left edge. The `end` slot and MENU stay on the brand row. Below 768px it behaves like `inline`. |
63
+ | `rule` | `true` (default), `false` | `false` removes the bottom line and the glow under it. |
64
+ | `contained` | `false` (default), `true`, CSS length | Centres the header content in a column (`true` = 1240px, or e.g. `'72rem'`) with the PageShell gutter. The header band itself stays full width. |
65
+ | `brandCollapse` | `'none'` (default), `'mark'` | `mark`: below 480px of header width only the icon shows. The name stays the link's accessible name. Needs `brand="lockup"` or `"mark"`. |
66
+
67
+ ### PageShell and PageSection
68
+
69
+ One centred column for a whole page: `header`, `intro`, sections and `footer`
70
+ share one left edge, 40px apart, with no dividers.
71
+
72
+ ```tsx
73
+ import { Header, PageShell, PageSection } from 'eidotter';
74
+
75
+ <PageShell
76
+ header={<Header brandName="Example" items={items} layout="stacked" rule={false} />}
77
+ intro={{
78
+ eyebrow: 'Review',
79
+ title: 'Page title',
80
+ lead: 'One paragraph, up to 68 characters wide.',
81
+ toc: [{ href: '#findings', label: 'Findings' }],
82
+ }}
83
+ footer={<Footer />}
84
+ >
85
+ <PageSection id="findings" title="Findings">…</PageSection>
86
+ </PageShell>
87
+ ```
88
+
89
+ - `maxWidth` (default `'1240px'`), `contentAs` (`'main'` default; use `'div'`
90
+ if your layout already renders `<main>`), `contentId` (skip-link target).
91
+ - A `Header` in the `header` slot drops its own inline padding, so its brand
92
+ sits on the column edge. Use `contained` only on a `Header` outside PageShell.
93
+ - `PageSection`: `title` (an h2 by default, `headingLevel` 2 to 4), `id` for TOC
94
+ anchors.
95
+
96
+ ### Bench
97
+
98
+ A before/after compare unit on `DosWindow`.
99
+
100
+ ```tsx
101
+ import { Bench } from 'eidotter';
102
+
103
+ <Bench
104
+ title="Home page"
105
+ note="Optional muted note"
106
+ panes={[
107
+ { label: 'Before', tone: 'before', content: <img src={before} alt="Home page before" /> },
108
+ { label: 'After', tone: 'after', content: <img src={after} alt="Home page after" /> },
109
+ ]}
110
+ />
111
+ ```
112
+
113
+ - `chips` (ReactNode in the title strip), `headingLevel` (default 3),
114
+ `maxHeight` of each pane frame (default `'640px'`).
115
+ - Pane `frame: 'phone'` centres the content at 390px. `frameLabel` names the
116
+ scrollable frame for screen readers.
117
+ - Panes stack below 760px of bench width.
118
+
119
+ Both components are server-safe. In a Next.js server component, deep-import
120
+ them: `eidotter/components/PageShell`, `eidotter/components/Bench`.
121
+
122
+ The Storybook story `Templates/ReviewPage` shows all of it composed.
123
+
124
+ ## Checklist
125
+
126
+ - [ ] `npm install eidotter@^0.43.0`; `npm ls eidotter` shows 0.43.0 or later. Commit the lockfile.
127
+ - [ ] Check every page with a `Header` at 320px and 390px; fix anything sized to a fixed header height (section 2).
128
+ - [ ] Delete CSS that targeted the old brand ellipsis, if any.
129
+ - [ ] Optional: adopt `layout="stacked"`, `rule={false}`, `brandCollapse="mark"`, `PageShell` or `Bench` (section 3).
@@ -34,6 +34,7 @@ The folder ships in the npm package:
34
34
  ```
35
35
  node_modules/eidotter/migrations/README.md
36
36
  node_modules/eidotter/migrations/0.41.0.md
37
+ node_modules/eidotter/migrations/0.43.0.md
37
38
  ```
38
39
 
39
40
  It is also exported, so tooling can resolve a guide by path:
@@ -44,3 +45,4 @@ It is also exported, so tooling can resolve a guide by path:
44
45
  | Version | Summary |
45
46
  |---|---|
46
47
  | [0.41.0](./0.41.0.md) | 16px floor, CSS reset and unused utilities no longer leak, `text-secondary` meaning change, Header lockup default, overlays on `DosDialog` (removed classes), focus rings; adopt `IconButton`, `DosDialog`, `DosWindow`, the favicon export and the `amber-paper` theme |
48
+ | [0.43.0](./0.43.0.md) | `Header` brand wraps instead of ellipsizing; adopt `PageShell`/`PageSection`, `Bench` and the opt-in `Header` `layout`/`rule`/`contained`/`brandCollapse` props |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eidotter",
3
- "version": "0.41.3",
3
+ "version": "0.43.0",
4
4
  "type": "module",
5
5
  "description": "A DOS Themed Design System",
6
6
  "main": "./dist/index.umd.js",
@@ -149,12 +149,12 @@
149
149
  "@figma/plugin-typings": "^1.107.0-beta.2",
150
150
  "@figma/rest-api-spec": "^0.41.0",
151
151
  "@storybook/addon-a11y": "^10.2.7",
152
- "@storybook/addon-designs": "^11.1.2",
152
+ "@storybook/addon-designs": "^12.0.0",
153
153
  "@storybook/addon-docs": "^10.2.7",
154
154
  "@storybook/addon-links": "^10.2.7",
155
155
  "@storybook/react": "^10.2.7",
156
156
  "@storybook/react-vite": "^10.2.7",
157
- "@storybook/test-runner": "^0.24.3",
157
+ "@storybook/test-runner": "^0.26.0",
158
158
  "@tailwindcss/postcss": "^4.3.0",
159
159
  "@testing-library/dom": "^10.4.1",
160
160
  "@testing-library/jest-dom": "^6.6.3",
@@ -167,7 +167,7 @@
167
167
  "@types/react-dom": "^19.0.0",
168
168
  "@vitejs/plugin-react": "^6.0.2",
169
169
  "axe-playwright": "^2.2.2",
170
- "chromatic": "^17.4.0",
170
+ "chromatic": "^18.13.0",
171
171
  "cross-env": "^10.1.0",
172
172
  "dotenv": "^17.3.1",
173
173
  "eslint": "^10.0.3",