eidotter 0.41.2 → 0.41.3

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/llms.txt CHANGED
@@ -28,7 +28,7 @@ Apps default to the amber theme and offer the light theme via a consistent setti
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
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.2` (0.41.0 shipped before its review fixes).
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).
32
32
 
33
33
  ## Token Categories
34
34
  - `--color-semantic-*`: USE THESE for components (background, text, border, status)
@@ -144,6 +144,7 @@ Components originate from different projects. Use `getComponentsByOrigin(project
144
144
  - NEVER use sans-serif fonts (DOS theme)
145
145
 
146
146
  ## Integration Quick Start
147
+ Without Tailwind, or with Tailwind v3:
147
148
  ```css
148
149
  /* In your globals.css */
149
150
  @import "eidotter/tokens.css";
@@ -164,6 +165,18 @@ module.exports = {
164
165
  }
165
166
  ```
166
167
 
168
+ Tailwind v4 apps: load eidotter's CSS in a cascade layer before your utilities. dist/eidotter.css ships ~200 component-used stock utilities (.flex, .flex-col, .hidden, ...) unlayered, and unlayered CSS beats @layer utilities (an app's md:flex-row loses to eidotter's .flex-col).
169
+ ```css
170
+ /* globals.css: the layer statement comes first */
171
+ @layer theme, base, components, eidotter, utilities;
172
+ @import "tailwindcss";
173
+ @import "eidotter/styles" layer(eidotter);
174
+ ```
175
+ - Remove the JS `import 'eidotter/styles'` (a second, unlayered copy brings the problem back).
176
+ - Never @source / content-scan node_modules/eidotter/dist.
177
+ - Trade-off: inside the layer, eidotter loses to the app's UNLAYERED global rules (an unlayered `* { margin: 0; padding: 0 }` beats eidotter's component utilities), and eidotter's reset beats element defaults in the app's `@layer base`. Keep app resets layered; put global element styles in a layer declared after `eidotter`.
178
+ - Guide: node_modules/eidotter/migrations/0.41.0.md, "Tailwind v4 apps".
179
+
167
180
  ## Links
168
181
  - npm: https://www.npmjs.com/package/eidotter
169
182
  - Storybook: See docs/ folder
@@ -10,7 +10,7 @@ You are reading this from `node_modules/eidotter/migrations/0.41.0.md`, or from
10
10
  the repository's `migrations/` folder. If you are upgrading across several
11
11
  minors, read [`README.md`](./README.md) in this folder first.
12
12
 
13
- > **Install 0.41.1 or later.** 0.41.0 was published before the release review fixes. It lacks the eidotter token utilities that section 2 promises, its reset still cancels Tailwind v4 utilities, and `Stat` loses its colours. 0.41.1 fixes all of this with no API change, and everything in this guide applies to it.
13
+ > **Install the latest 0.41.x (0.41.3 or later).** 0.41.0 was published before the release review fixes. It lacks the eidotter token utilities that section 2 promises, its reset still cancels Tailwind v4 utilities, and `Stat` loses its colours. 0.41.1 fixes all of this with no API change, and 0.41.2 stops `TextScramble` (and `Stat` `scramble`) from shipping random glyphs in server HTML, a hydration error. 0.41.3 fixes what the first consumer bumps found (empty `Header` nav, brand focus ring, end-slot clipping, `Terminal` role). Everything in this guide applies to the latest 0.41.x.
14
14
 
15
15
  ## Who must act
16
16
 
@@ -41,6 +41,7 @@ utility classes you used without having Tailwind yourself.
41
41
  |---|---|
42
42
  | Tailwind 3 or 4 with `eidotter/tailwind.preset` | 1 (16px floor), 3, 5, 6, 7 |
43
43
  | Tailwind 4 without the preset | 1 (component sizes only), 3, 5, 6, 7 |
44
+ | Any Tailwind 4 app | also "Tailwind v4 apps: load eidotter's CSS in a cascade layer" |
44
45
  | No Tailwind (plain CSS, Astro, Vite React) | 2 (utilities removed), 4 (reset no longer leaks), 3, 5, 6, 7 |
45
46
  | Next.js App Router (server components) | all of the above plus "RSC deep imports" |
46
47
 
@@ -48,11 +49,20 @@ utility classes you used without having Tailwind yourself.
48
49
 
49
50
  0.x caret ranges stop at the next minor: `^0.40.2` means `>=0.40.2 <0.41.0`.
50
51
  Older ranges such as `^0.38.0`, `^0.37.0` or `^0.33.0` are the same: none of
51
- them reach 0.41.0. Change the range explicitly:
52
+ them reach 0.41.0.
53
+
54
+ First, **before `npm install`**, save a copy of the old bundle. The install
55
+ overwrites it, and you need it for the class diff in section 2:
52
56
 
53
57
  ```bash
54
- npm install eidotter@^0.41.2
55
- # check what actually resolved
58
+ cp node_modules/eidotter/dist/eidotter.css /tmp/eidotter-old.css
59
+ ```
60
+
61
+ Then change the range explicitly to the latest 0.41.x (0.41.3 or later):
62
+
63
+ ```bash
64
+ npm install eidotter@^0.41.3
65
+ # check what actually resolved: 0.41.3 or later
56
66
  npm ls eidotter
57
67
  ```
58
68
 
@@ -60,15 +70,62 @@ Install from the npm registry. Do not point the dependency at a local checkout
60
70
  (`file:../eidotter`): `npm ci` passes, but CI, Docker and Vercel builds fail
61
71
  with "Module not found".
62
72
 
63
- Before you bump, save a copy of the old bundle. You need it for the class diff
64
- in section 2:
73
+ If you are coming from older than 0.40, also read
74
+ "Jumping from older versions" at the end.
75
+
76
+ ## Tailwind v4 apps: load eidotter's CSS in a cascade layer (recommended)
65
77
 
66
- ```bash
67
- cp node_modules/eidotter/dist/eidotter.css /tmp/eidotter-old.css
78
+ `dist/eidotter.css` ships the stock Tailwind utilities its components use
79
+ (about 200: `.flex`, `.hidden`, `.flex-col`, `.items-center`, …) **unlayered**.
80
+ Your Tailwind v4 utilities live in `@layer utilities`, and an unlayered rule
81
+ beats every layered one whatever its specificity or load order. So where your
82
+ markup uses the same class names, eidotter's copy wins over your variants: a
83
+ `flex flex-col md:flex-row` header stays a column at every width, because
84
+ eidotter's unlayered `.flex-col` beats your layered `md:flex-row`.
85
+
86
+ The fix is on your side: import eidotter's CSS into a named layer that sits
87
+ before your utilities. In your main CSS file (the one with
88
+ `@import "tailwindcss"`):
89
+
90
+ ```css
91
+ /* app/globals.css: the layer statement must come first */
92
+ @layer theme, base, components, eidotter, utilities;
93
+ @import "tailwindcss";
94
+ @import "eidotter/styles" layer(eidotter);
68
95
  ```
69
96
 
70
- If you are coming from older than 0.40, also read
71
- "Jumping from older versions" at the end.
97
+ - Remove the JS `import 'eidotter/styles'` (in `layout.tsx`, `main.tsx`, …):
98
+ it would load a second, unlayered copy and bring the problem back.
99
+ - Do not let Tailwind scan eidotter's build output: no `@source` (v4) or
100
+ `content` (v3) entry for `node_modules/eidotter/dist`. eidotter's CSS already
101
+ contains what its components need.
102
+ - eidotter's own internal layers (its reset in `base.eidotter`, the safelisted
103
+ token utilities in `utilities.eidotter`) nest inside `eidotter` and keep
104
+ working.
105
+
106
+ **Trade-off: keep your own global rules layered too.** Inside a layer,
107
+ eidotter loses to anything of yours that is unlayered. An unlayered reset such
108
+ as `* { margin: 0; padding: 0 }` then beats eidotter's component utilities
109
+ (and your own Tailwind utilities). Put resets and element defaults in a layer.
110
+ Because `eidotter` comes after `base`, eidotter's reset (`h1`–`h6`
111
+ `font-size: inherit`, list and link resets) also beats element defaults you put
112
+ in `@layer base`. If you style elements globally (heading sizes, list markers),
113
+ declare a layer of your own after `eidotter` and put them there:
114
+
115
+ ```css
116
+ @layer theme, base, components, eidotter, app, utilities;
117
+ @layer app { h1 { font-size: var(--typography-font-size-display-sm); } }
118
+ ```
119
+
120
+ **Verify.** At a desktop width, an element with `flex flex-col md:flex-row`
121
+ reports `getComputedStyle(el).flexDirection === 'row'`. Checked against 0.41.2
122
+ `dist/eidotter.css` with `@tailwindcss/postcss` and Chromium: unlayered import
123
+ gives `column`, the layered import gives `row`; an app `@layer base { h1 {…} }`
124
+ size loses to eidotter's reset, the same rule in a layer after `eidotter` wins;
125
+ an unlayered `* { padding: 0 }` beats a `p-7` utility.
126
+
127
+ Apps without Tailwind, and Tailwind v3 apps, keep the plain
128
+ `import 'eidotter/styles'`.
72
129
 
73
130
  ---
74
131
 
@@ -441,7 +498,8 @@ rg -n 'z-index' --glob '*.{css,scss}' src app styles | rg -i 'modal|lightbox|ove
441
498
  .eidotter-modal__container .eidotter-dialog__head { /* … */ }
442
499
  ```
443
500
 
444
- **Verify.** Open each Modal, Lightbox and CmdPalette in your app. Escape and a
501
+ **Verify.** Open each Modal, Lightbox and CmdPalette in your app (CmdPalette:
502
+ Ctrl+K on Linux and Windows, ⌘K on macOS). Escape and a
445
503
  backdrop click close them, focus returns to the trigger, and nothing of yours
446
504
  paints over the dialog. A Modal with a long title wraps instead of clipping.
447
505
 
@@ -487,12 +545,16 @@ delete or retarget them.
487
545
  zoom views and the master-detail pane fade instead of rising. Several
488
546
  components share keyframes now (`eidotter-pop-in/out`,
489
547
  `eidotter-fade-in/out`, `eidotter-breathe`). If your CSS overrode eidotter's
490
- internal keyframe names (`modal-crt-enter`, `cmdpal-enter`, `tag-enter`,
548
+ internal keyframe names (`modal-crt-enter`, `cmdpal-enter`, `cmdpal-exit`,
549
+ `cmdpal-backdrop-open`, `cmdpal-backdrop-close`, `tag-enter`,
491
550
  `badge-enter`, `alert-enter`, `notification-enter`, `select-pop-in`,
492
551
  `eidotter-mark-morph`, `eidotter-card-enter`, `eidotter-inline-expand-fade`,
493
552
  `eidotter-timeline-node-enter`, `eidotter-skeleton-breathe`,
494
- `eidotter-health-breathe`, …), those names no longer exist. Find:
495
- `rg -n 'modal-crt|cmdpal-|badge-enter|tag-enter|tag-exit|alert-enter|notification-enter|select-pop|backdrop-open|timeline-fade-in|master-detail-fade|blink-loading|eidotter-(mark-morph|card-enter|inline-expand-fade|timeline-node-enter|skeleton-breathe|health-breathe)' --glob '*.{css,scss}'`.
553
+ `eidotter-health-breathe`, …), those names no longer exist. Find (the
554
+ `cmdpal-` names are listed in full so the search does not hit your own
555
+ classes such as `.cmdpal-demo__*`; eidotter's live CmdPalette classes all
556
+ start with `eidotter-cmdpal`):
557
+ `rg -n 'modal-crt|cmdpal-(enter|exit|backdrop-(open|close))|badge-enter|tag-enter|tag-exit|alert-enter|notification-enter|select-pop|backdrop-open|timeline-fade-in|master-detail-fade|blink-loading|eidotter-(mark-morph|card-enter|inline-expand-fade|timeline-node-enter|skeleton-breathe|health-breathe)' --glob '*.{css,scss}'`.
496
558
  - **Progress** sizes are distinct again: `sm`/`md`/`lg` render 16/20/22px (were
497
559
  16/16/18px).
498
560
 
@@ -705,6 +767,14 @@ export default function RootLayout({ children }: { children: React.ReactNode })
705
767
  - Show a ⌘K hint (in the site `Footer` or the Header `end` slot) only where
706
768
  the palette is mounted. Not in `footerHint`, which renders only inside the
707
769
  open palette.
770
+ - `maxResults` defaults to 20 and also caps the **empty** query: with no search
771
+ text the palette lists only the first 20 items. If the site has more routes,
772
+ pass `maxResults={items.length}` (or a larger number) so none is hidden
773
+ until the user types.
774
+ - To verify: `mod+k` is ⌘K on macOS and **Ctrl+K on Linux and Windows**
775
+ (`mod` is `metaKey` on macOS, `ctrlKey` elsewhere). Meta+K does nothing on
776
+ Linux, including headless Chromium in Playwright on Linux CI: press
777
+ `Control+K` there.
708
778
 
709
779
  ### `eidotter/favicon.svg`
710
780
 
@@ -723,9 +793,28 @@ committing a copy that goes stale:
723
793
  }
724
794
  ```
725
795
 
726
- - **Next.js App Router:** copy to `app/icon.svg`. Next generates the
727
- `<link rel="icon">` itself. Remove any old `app/favicon.ico` or `app/icon.*`
728
- you no longer want.
796
+ - **Next.js App Router:** copy to `app/icon.svg` (`src/app/icon.svg` with a
797
+ `src/` dir). Next generates the `<link rel="icon">` itself. Remove any old
798
+ `app/favicon.ico` or `app/icon.*` you no longer want.
799
+ - **Next.js on Vercel (or any host that runs `next build` directly):** npm
800
+ `pre*` hooks only run for `npm run build`. When `vercel.json` sets
801
+ `"buildCommand": "next build"` (or the host calls `next build` itself),
802
+ `prebuild` never runs and the icon is missing. Copy from `next.config`
803
+ instead, which Next loads for every `next dev` and `next build`:
804
+
805
+ ```js
806
+ // next.config.mjs
807
+ import { copyFileSync } from 'node:fs';
808
+ import { createRequire } from 'node:module';
809
+
810
+ const require = createRequire(import.meta.url);
811
+ copyFileSync(
812
+ require.resolve('eidotter/favicon.svg'),
813
+ new URL('./src/app/icon.svg', import.meta.url), // or ./app/icon.svg
814
+ );
815
+
816
+ export default { /* your config */ };
817
+ ```
729
818
  - **Vite:** copy to `public/favicon.svg`, then in `index.html`:
730
819
  `<link rel="icon" type="image/svg+xml" href="/favicon.svg" />`.
731
820
  - **Astro:** copy to `public/favicon.svg`, then in the base layout `<head>`:
@@ -827,8 +916,9 @@ Work top to bottom. Each step points at the section above that explains it.
827
916
 
828
917
  - [ ] Read every guide in `node_modules/eidotter/migrations/` between your old
829
918
  version and 0.41.0, oldest first (see `README.md` in that folder).
830
- - [ ] `cp node_modules/eidotter/dist/eidotter.css /tmp/eidotter-old.css` (before the bump).
831
- - [ ] `npm install eidotter@^0.41.0`, then `npm ls eidotter` shows 0.41.x. Commit the lockfile.
919
+ - [ ] `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
+ - [ ] 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").
832
922
  - [ ] No-Tailwind apps: run the class diff from section 2 and fix every real hit.
833
923
  - [ ] No-preflight apps: set `html` font, colours and `a` colour yourself (section 4).
834
924
  - [ ] Preset apps: review `text-xs` / `text-sm` hits; delete redundant 16px overrides (section 1).
@@ -855,6 +945,9 @@ additive or automatic unless noted. Details are in the eidotter
855
945
  [CHANGELOG](https://github.com/CinimoDY/eiDotter/blob/main/CHANGELOG.md). It is
856
946
  not shipped in the npm package; read it on GitHub.
857
947
 
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.
858
951
  - **0.38.0:** `article` entry kind for `TimelineContainer` (thumbnail strip and
859
952
  summary when collapsed; gallery, body and read-more when expanded). Additive.
860
953
  - **0.38.0:** `RetroEffects` `boot` no longer flashes content before the
@@ -876,8 +969,5 @@ not shipped in the npm package; read it on GitHub.
876
969
  ChatMessage, Terminal) is the DOS underscore `_`, not a `█` block. Visible.
877
970
  - **0.40.2:** `eidotter/favicon.svg` export (see "Adopt").
878
971
 
879
- - **0.38.0 entry:** two-tier typography. Display text stays Perfect DOS VGA
880
- 437 and body text (`.dos-body`, `font-dos-body`) is JetBrains Mono Nerd Font.
881
-
882
972
  Coming from 0.37 or older: also read the CHANGELOG entries for 0.33–0.37,
883
973
  including the RSC deep imports `eidotter/components/<Name>` (0.37.1, DMNC-1130).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eidotter",
3
- "version": "0.41.2",
3
+ "version": "0.41.3",
4
4
  "type": "module",
5
5
  "description": "A DOS Themed Design System",
6
6
  "main": "./dist/index.umd.js",