eidotter 0.42.0 → 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.
- package/README.md +4 -4
- package/dist/components/Bench/components/Bench.d.ts +45 -0
- package/dist/components/Bench/components/Bench.js +46 -0
- package/dist/components/Bench/components/index.d.ts +2 -0
- package/dist/components/Bench/components/index.js +1 -0
- package/dist/components/Bench/index.d.ts +2 -0
- package/dist/components/Bench/index.js +1 -0
- package/dist/components/Header/components/Header.d.ts +38 -2
- package/dist/components/Header/components/Header.js +23 -5
- package/dist/components/PageShell/components/PageSection.d.ts +25 -0
- package/dist/components/PageShell/components/PageSection.js +16 -0
- package/dist/components/PageShell/components/PageShell.d.ts +58 -0
- package/dist/components/PageShell/components/PageShell.js +29 -0
- package/dist/components/PageShell/components/index.d.ts +4 -0
- package/dist/components/PageShell/components/index.js +2 -0
- package/dist/components/PageShell/index.d.ts +2 -0
- package/dist/components/PageShell/index.js +1 -0
- package/dist/components/registry.js +30 -0
- package/dist/eidotter.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.es.js +440 -219
- package/dist/index.umd.js +4 -4
- package/llms.txt +3 -3
- package/migrations/0.41.0.md +3 -2
- package/migrations/0.43.0.md +129 -0
- package/migrations/README.md +2 -0
- package/package.json +1 -1
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
|
-
-
|
|
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.
|
|
31
|
-
- 0.x caret gotcha: `^0.40.x` never resolves to 0.41.0; bump the range explicitly, to `^0.
|
|
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)
|
package/migrations/0.41.0.md
CHANGED
|
@@ -61,8 +61,9 @@ cp node_modules/eidotter/dist/eidotter.css /tmp/eidotter-old.css
|
|
|
61
61
|
Then change the range explicitly to the latest 0.41.x (0.41.3 or later):
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npm install eidotter@^0.
|
|
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.
|
|
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).
|
|
@@ -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).
|
package/migrations/README.md
CHANGED
|
@@ -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 |
|