eidotter 0.40.2 → 0.41.1

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 (104) hide show
  1. package/README.md +14 -6
  2. package/dist/components/Accordion/components/AccordionFill.js +1 -1
  3. package/dist/components/Accordion/components/Section.js +1 -1
  4. package/dist/components/Alert/components/Alert.js +3 -2
  5. package/dist/components/Brand/components/Logo.d.ts +7 -7
  6. package/dist/components/Brand/components/Logo.js +10 -15
  7. package/dist/components/Brand/components/LogoGeometry.d.ts +28 -0
  8. package/dist/components/Brand/components/LogoGeometry.js +78 -0
  9. package/dist/components/Brand/components/Mark.d.ts +13 -6
  10. package/dist/components/Brand/components/Mark.js +14 -10
  11. package/dist/components/Brand/components/Wordmark.js +1 -1
  12. package/dist/components/Brand/components/markGeometry.d.ts +15 -0
  13. package/dist/components/Brand/components/markGeometry.js +20 -7
  14. package/dist/components/Breadcrumb/components/Breadcrumb.js +2 -2
  15. package/dist/components/Button/components/Button.js +1 -1
  16. package/dist/components/Card/components/Card.d.ts +5 -0
  17. package/dist/components/Card/components/Card.js +8 -2
  18. package/dist/components/CmdPalette/components/CmdPalette.d.ts +4 -3
  19. package/dist/components/CmdPalette/components/CmdPalette.js +17 -12
  20. package/dist/components/DecayStrip/components/DecayStrip.js +1 -1
  21. package/dist/components/DosDialog/components/DosDialog.d.ts +90 -0
  22. package/dist/components/DosDialog/components/DosDialog.js +68 -0
  23. package/dist/components/DosDialog/components/index.d.ts +2 -0
  24. package/dist/components/DosDialog/components/index.js +1 -0
  25. package/dist/components/DosDialog/index.d.ts +2 -0
  26. package/dist/components/DosDialog/index.js +1 -0
  27. package/dist/components/DosFigure/components/DosFigure.d.ts +2 -2
  28. package/dist/components/DosFigure/components/DosFigure.js +14 -7
  29. package/dist/components/DosWindow/components/DosWindow.d.ts +39 -0
  30. package/dist/components/DosWindow/components/DosWindow.js +23 -0
  31. package/dist/components/DosWindow/components/index.d.ts +2 -0
  32. package/dist/components/DosWindow/components/index.js +1 -0
  33. package/dist/components/DosWindow/index.d.ts +2 -0
  34. package/dist/components/DosWindow/index.js +1 -0
  35. package/dist/components/FilterBar/components/FilterBar.d.ts +7 -4
  36. package/dist/components/Footer/components/Footer.js +1 -1
  37. package/dist/components/Gauge/components/Gauge.js +13 -2
  38. package/dist/components/Header/components/Header.d.ts +29 -1
  39. package/dist/components/Header/components/Header.js +20 -5
  40. package/dist/components/Icon/components/Icon.d.ts +9 -0
  41. package/dist/components/Icon/components/Icon.js +7 -3
  42. package/dist/components/IconButton/components/IconButton.d.ts +44 -0
  43. package/dist/components/IconButton/components/IconButton.js +19 -0
  44. package/dist/components/IconButton/components/index.d.ts +2 -0
  45. package/dist/components/IconButton/components/index.js +1 -0
  46. package/dist/components/IconButton/index.d.ts +2 -0
  47. package/dist/components/IconButton/index.js +1 -0
  48. package/dist/components/Input/components/Input.js +1 -1
  49. package/dist/components/Lightbox/components/Lightbox.d.ts +10 -4
  50. package/dist/components/Lightbox/components/Lightbox.js +19 -11
  51. package/dist/components/Meter/components/Meter.js +7 -3
  52. package/dist/components/Meter/components/MeterGroup.js +3 -3
  53. package/dist/components/Modal/components/Modal.d.ts +18 -6
  54. package/dist/components/Modal/components/Modal.js +18 -9
  55. package/dist/components/Nav/components/Nav.js +5 -4
  56. package/dist/components/Notification/components/Notification.js +3 -2
  57. package/dist/components/Progress/components/Progress.js +8 -6
  58. package/dist/components/RangeBar/components/RangeBar.js +8 -5
  59. package/dist/components/SeriesBars/components/SeriesBars.d.ts +9 -1
  60. package/dist/components/SeriesBars/components/SeriesBars.js +23 -11
  61. package/dist/components/Stat/components/Stat.js +1 -1
  62. package/dist/components/Tag/components/Tag.d.ts +8 -1
  63. package/dist/components/Tag/components/Tag.js +5 -5
  64. package/dist/components/VitalsStrip/components/VitalsStrip.js +9 -7
  65. package/dist/components/registry.js +230 -19
  66. package/dist/eidotter.css +3 -2
  67. package/dist/hooks/useAnimatedDismiss.js +5 -0
  68. package/dist/index.d.ts +9 -1
  69. package/dist/index.es.js +2414 -1747
  70. package/dist/index.umd.js +1 -1
  71. package/dist/utils/cn.d.ts +2 -0
  72. package/dist/utils/cn.js +33 -1
  73. package/dist/utils/dosFontSizes.d.ts +2 -0
  74. package/dist/utils/dosFontSizes.js +17 -0
  75. package/llms.txt +15 -7
  76. package/migrations/0.41.0.md +883 -0
  77. package/migrations/README.md +46 -0
  78. package/package.json +11 -3
  79. package/public/favicon.svg +1 -1
  80. package/src/styles/dos-utilities.css +9 -1
  81. package/src/styles/shadcn.css +63 -27
  82. package/src/styles/theme.amber-mono.css +4 -2
  83. package/src/styles/theme.amber-paper.css +106 -0
  84. package/src/styles/theme.cga-amber.css +3 -1
  85. package/src/styles/theme.cga-mode4-p0.css +3 -1
  86. package/src/styles/theme.cga-mode4-p1.css +3 -1
  87. package/src/styles/theme.cga-mode5.css +3 -1
  88. package/src/styles/theme.light.css +3 -1
  89. package/src/styles/tokens.css +5 -1
  90. package/tailwind.preset.cjs +23 -1
  91. package/dist/components/Brand/components/markGeometry.test.d.ts +0 -1
  92. package/dist/components/Connector/components/connectorGeometry.test.d.ts +0 -1
  93. package/dist/components/DecayStrip/components/resample.test.d.ts +0 -1
  94. package/dist/components/TimelineContainer/components/timelineUtils.test.d.ts +0 -1
  95. package/dist/components/TimelineContainer/components/useDrillDown.test.d.ts +0 -1
  96. package/dist/components/TimelineContainer/components/useSelection.test.d.ts +0 -1
  97. package/dist/components/TimelineContainer/components/useZoom.test.d.ts +0 -1
  98. package/dist/hooks/useTextScramble.test.d.ts +0 -1
  99. package/dist/hooks/useThemePortal.test.d.ts +0 -1
  100. package/dist/utils/health/formatValue.test.d.ts +0 -1
  101. package/dist/utils/health/healthPatterns.test.d.ts +0 -1
  102. package/dist/utils/health/resolveBand.test.d.ts +0 -1
  103. package/dist/utils/isSafeHref.test.d.ts +0 -1
  104. package/dist/utils/isSafeUrl.test.d.ts +0 -1
@@ -5,5 +5,7 @@
5
5
  * @example
6
6
  * cn('bg-dos-bg-primary text-dos-text-primary', 'bg-dos-bg-secondary')
7
7
  * // → 'text-dos-text-primary bg-dos-bg-secondary'
8
+ * cn('text-dos-text-brand', 'text-dos-text-sm')
9
+ * // → 'text-dos-text-brand text-dos-text-sm' (colour and size both kept)
8
10
  */
9
11
  export declare function cn(...inputs: (string | undefined | null | false)[]): string;
package/dist/utils/cn.js CHANGED
@@ -1,4 +1,34 @@
1
- import { twMerge } from 'tailwind-merge';
1
+ import { extendTailwindMerge } from 'tailwind-merge';
2
+ import { DOS_FONT_SIZES } from './dosFontSizes.js';
3
+ /**
4
+ * tailwind-merge knows nothing about eidotter's preset, so it reads any
5
+ * `text-<unknown>` class as a text colour. `text-dos-text-sm` (a font size)
6
+ * then "conflicts" with `text-dos-text-brand` (a colour) and the colour is
7
+ * dropped. Registering the dos font sizes as a font-size group keeps both.
8
+ * The list is generated from the preset (scripts/generate-tailwind-safelist.mjs),
9
+ * so a new size token joins automatically.
10
+ *
11
+ * It is a group of its own rather than tailwind-merge's `font-size`, because
12
+ * that group also removes any earlier `leading-*` class (stock Tailwind sizes
13
+ * carry a line height). Button and Badge pair a dos size with a leading class,
14
+ * and the dos sizes defer to it (their line height, where they set one, reads
15
+ * Tailwind's leading variable first).
16
+ * A dos size and a stock size still replace each other.
17
+ *
18
+ * Keep stock size class names out of comments in src: Tailwind scans these
19
+ * files and would compile any it finds into dist/eidotter.css.
20
+ */
21
+ const twMerge = extendTailwindMerge({
22
+ extend: {
23
+ classGroups: {
24
+ 'dos-font-size': [{ text: [...DOS_FONT_SIZES] }],
25
+ },
26
+ conflictingClassGroups: {
27
+ 'dos-font-size': ['font-size'],
28
+ 'font-size': ['dos-font-size'],
29
+ },
30
+ },
31
+ });
2
32
  /**
3
33
  * Merge Tailwind CSS classes with conflict resolution.
4
34
  * Wraps tailwind-merge for consistent class merging across eidotter components.
@@ -6,6 +36,8 @@ import { twMerge } from 'tailwind-merge';
6
36
  * @example
7
37
  * cn('bg-dos-bg-primary text-dos-text-primary', 'bg-dos-bg-secondary')
8
38
  * // → 'text-dos-text-primary bg-dos-bg-secondary'
39
+ * cn('text-dos-text-brand', 'text-dos-text-sm')
40
+ * // → 'text-dos-text-brand text-dos-text-sm' (colour and size both kept)
9
41
  */
10
42
  export function cn(...inputs) {
11
43
  return twMerge(inputs.filter(Boolean));
@@ -0,0 +1,2 @@
1
+ /** The eidotter font-size keys (`text-<key>` classes), registered with tailwind-merge by cn(). */
2
+ export declare const DOS_FONT_SIZES: readonly string[];
@@ -0,0 +1,17 @@
1
+ // GENERATED by scripts/generate-tailwind-safelist.mjs from tailwind.preset.cjs.
2
+ // Do not edit; run `npm run build-tokens`.
3
+ /** The eidotter font-size keys (`text-<key>` classes), registered with tailwind-merge by cn(). */
4
+ export const DOS_FONT_SIZES = [
5
+ 'dos-text-base',
6
+ 'dos-text-xs',
7
+ 'dos-text-sm',
8
+ 'dos-text-md',
9
+ 'dos-text-lg',
10
+ 'dos-text-xl',
11
+ 'dos-display-xs',
12
+ 'dos-display-sm',
13
+ 'dos-display-md',
14
+ 'dos-display-lg',
15
+ 'dos-display-xl',
16
+ 'dos-display-2xl',
17
+ ];
package/llms.txt CHANGED
@@ -3,11 +3,11 @@
3
3
  > DOS-themed React component library with authentic CGA/amber phosphor aesthetics.
4
4
 
5
5
  ## Quick Facts
6
- - 48 components (Accordion, AIText, Alert, Badge, Brand (Logo, Wordmark, BrandLockup), Breadcrumb, Button, Card, ChatMessage, ChatHistory, ChatInput, ChatContainer, Checkbox, CmdPalette, CommandPrompt, DosFigure, FilterBar, Footer, Header, Icon, InlineExpand, InlineLink, Input, LegalPage, Lightbox, Modal, Nav, Notification, Progress, RetroEffects, Separator, Skeleton, Stat, Switch, Tabs, Tag, Terminal, TextScramble, TimelineContainer, TimelineNode, Tokens, and the health family: Gauge, Meter, MeterGroup, RangeBar, SeriesBars, DecayStrip, VitalsStrip)
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)
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
10
- - Published on npm: `npm install eidotter` (current v0.40.x)
10
+ - Published on npm: `npm install eidotter` (current v0.41.x)
11
11
  - Consumer imports: `eidotter/styles` (required); `eidotter/themes/<name>.css` (optional theme); `eidotter/utilities` (optional `.dos-*` classes for raw HTML/MDX/prose; 12 classes; v0.19.4+)
12
12
 
13
13
  ## Key Principle
@@ -25,6 +25,11 @@ Apps default to the amber theme and offer the light theme via a consistent setti
25
25
  - guidelines/patterns.md: Composition + layout patterns
26
26
  - Note: docs/ is Storybook build output (wiped on every build) — do not rely on files there
27
27
 
28
+ ## Upgrading
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.1` (0.41.0 shipped before its review fixes).
32
+
28
33
  ## Token Categories
29
34
  - `--color-semantic-*`: USE THESE for components (background, text, border, status)
30
35
  - `--color-cga-*`: Raw CGA palette (16 colors + amber extensions)
@@ -61,12 +66,15 @@ Apps default to the amber theme and offer the light theme via a consistent setti
61
66
  - Badge: Status indicators, tags
62
67
  - Breadcrumb: Navigation path
63
68
  - Button: Actions (primary, secondary, ghost, danger)
64
- - Card: Content containers
69
+ - Card: Content containers on the DosWindow chrome (title = window strip, footer = window footer)
65
70
  - Checkbox: Boolean inputs
66
71
  - CommandPrompt: DOS command line aesthetic
67
- - Icon: 12 named icons backed by pixelarticons (Info, Warning, Error, Done, Check, Close, Chevron Up/Down, App, Cancel, Fullscreen, Add); tree-shakable per-icon imports via `eidotter/icons`
72
+ - Icon: 14 named icons backed by pixelarticons (Info, Warning, Error, Done, Check, Close, Chevron Up/Down/Left/Right, App, Cancel, Fullscreen, Add); tree-shakable per-icon imports via `eidotter/icons`
68
73
  - Input: Text fields
69
- - Modal: Dialog overlays (uses native dialog element)
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
+ - 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
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
70
78
  - Progress: Loading/completion bars
71
79
  - RetroEffects: CRT scanlines, phosphor glow
72
80
  - Stat: Key-value metric display with trends
@@ -89,9 +97,9 @@ Apps default to the amber theme and offer the light theme via a consistent setti
89
97
  - Header: Sticky site header (retro/modern variants), composes branding + Nav
90
98
  - Notification: Toast popup with layered amber glow, auto-dismiss, progress variant
91
99
  - CmdPalette: ⌘K command palette with scored search and keyboard nav
92
- - DosFigure: Demoscene painted-screen media placeholder with scanline sweep
100
+ - DosFigure: Demoscene painted-screen media placeholder with scanline sweep, on the DosWindow chrome
93
101
  - InlineLink: In-flow anchor with dotted underline + ▸ / ↗ glyph
94
- - Lightbox: Fullscreen image viewer on Modal primitives — prev/next, counter, keyboard nav, swipe
102
+ - Lightbox: Fullscreen image viewer on DosDialog — [ n / N ] counter in the title strip, prev/next, keyboard nav, swipe
95
103
  - AIText: Inline AI-content marker rendering data-provenance="ai-draft" with shimmer gradient
96
104
  - Skeleton: DOS/CGA loading placeholder — shade-character rows with a CRT hum-bar band rolling top→bottom (text/card/figure/timeline variants)
97
105
  - LegalPage: Impressum/Datenschutz layout primitive + reusable German DDG/DSGVO clause components