eidotter 0.45.1 → 0.46.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 (59) hide show
  1. package/README.md +4 -4
  2. package/dist/components/Alert/components/Alert.js +1 -1
  3. package/dist/components/Badge/components/Badge.js +5 -5
  4. package/dist/components/Button/components/Button.js +8 -8
  5. package/dist/components/Chat/components/ChatHistory.js +1 -1
  6. package/dist/components/Chat/components/ChatInput.js +1 -1
  7. package/dist/components/Chat/components/ChatMessage.js +1 -1
  8. package/dist/components/Checkbox/components/Checkbox.js +1 -1
  9. package/dist/components/ChecklistRow/components/ChecklistRow.js +1 -1
  10. package/dist/components/CopyButton/components/CopyButton.js +1 -1
  11. package/dist/components/DecayStrip/components/DecayStrip.js +3 -3
  12. package/dist/components/DisplayMenu/components/DisplayMenu.d.ts +9 -6
  13. package/dist/components/DisplayMenu/components/DisplayMenu.js +71 -12
  14. package/dist/components/EmptyState/components/EmptyState.js +1 -1
  15. package/dist/components/Gauge/components/Gauge.js +4 -4
  16. package/dist/components/Header/components/Header.d.ts +8 -4
  17. package/dist/components/Header/components/Header.js +1 -1
  18. package/dist/components/Header/components/HeaderContextRow.js +1 -1
  19. package/dist/components/HeaderButton/components/HeaderButton.d.ts +38 -0
  20. package/dist/components/HeaderButton/components/HeaderButton.js +25 -0
  21. package/dist/components/HeaderButton/components/index.d.ts +2 -0
  22. package/dist/components/HeaderButton/components/index.js +1 -0
  23. package/dist/components/HeaderButton/index.d.ts +2 -0
  24. package/dist/components/HeaderButton/index.js +1 -0
  25. package/dist/components/LabeledProgress/components/LabeledProgress.js +1 -1
  26. package/dist/components/LedgerRow/components/LedgerRow.js +1 -1
  27. package/dist/components/Meter/components/Meter.js +3 -3
  28. package/dist/components/Notification/components/Notification.js +1 -1
  29. package/dist/components/PageShell/components/PageShell.d.ts +12 -6
  30. package/dist/components/PageShell/components/PageShell.js +7 -4
  31. package/dist/components/Progress/components/Progress.js +6 -5
  32. package/dist/components/RangeBar/components/RangeBar.js +3 -3
  33. package/dist/components/Select/components/Select.js +6 -6
  34. package/dist/components/SeriesBars/components/SeriesBars.js +3 -3
  35. package/dist/components/Stat/components/Stat.js +6 -6
  36. package/dist/components/Tag/components/Tag.js +5 -5
  37. package/dist/components/VitalsStrip/components/VitalsStrip.js +4 -4
  38. package/dist/components/registry.js +19 -1
  39. package/dist/eidotter.css +2 -2
  40. package/dist/index.d.ts +5 -1
  41. package/dist/index.es.js +463 -308
  42. package/dist/index.umd.js +3 -3
  43. package/dist/utils/displayTheme.d.ts +53 -0
  44. package/dist/utils/displayTheme.js +76 -0
  45. package/guidelines/README.md +8 -0
  46. package/llms.txt +3 -3
  47. package/migrations/0.45.0.md +9 -5
  48. package/migrations/0.46.0.md +120 -0
  49. package/migrations/README.md +2 -0
  50. package/package.json +4 -4
  51. package/src/styles/shadcn.css +1 -1
  52. package/src/styles/theme.amber-mono.css +7 -7
  53. package/src/styles/theme.amber-paper.css +9 -9
  54. package/src/styles/theme.cga-amber.css +7 -7
  55. package/src/styles/theme.cga-mode4-p0.css +7 -7
  56. package/src/styles/theme.cga-mode4-p1.css +7 -7
  57. package/src/styles/theme.cga-mode5.css +7 -7
  58. package/src/styles/theme.light.css +7 -7
  59. package/src/styles/tokens.css +21 -21
@@ -10,10 +10,13 @@ function PageIntro({ intro }) {
10
10
  /**
11
11
  * PageShell: the "one block" page layout (0.43).
12
12
  *
13
- * One centred column (1240px by default) with a `max(16px, safe-area)` side
14
- * gutter and 24px / 64px block padding. Header, intro, sections and footer
15
- * all live inside the column, so everything shares one left edge, stacked
16
- * with a 40px gap. No dividers: the only lines on the page are the ones its
13
+ * One column, flush left (0.46): it starts at a `max(16px, safe-area)`
14
+ * gutter and runs to a 1200px cap, with 24px / 64px block padding; the right
15
+ * side stays empty, like a DOS screen. Text keeps an 80-column measure
16
+ * (45rem); wide blocks (Bench, tables, galleries) may use the full cap.
17
+ * Header, intro, sections and footer all share the one left edge, stacked
18
+ * with a 40px gap. Same layout in every theme: themes restyle, never
19
+ * re-lay out. No dividers: the only lines on the page are the ones its
17
20
  * children draw (window frames, pane gaps).
18
21
  *
19
22
  * Paints no background and sets no font: the page's own ground (a CRT tint,
@@ -7,13 +7,14 @@ const DARK_SHADE = '\u2593'; // ▓
7
7
  const MED_SHADE = '\u2592'; // ▒
8
8
  // eidotter tokens only: raw Tailwind sizes (text-xs/base/lg) would compile
9
9
  // into dist/eidotter.css and override consumers' own utilities (DMNC-1579).
10
+ // One body size (0.46): the bar and label are text, so every size renders at 16px.
10
11
  const sizeClasses = {
11
- sm: 'text-dos-text-base', // 16px
12
- md: 'text-dos-text-sm', // 20px
13
- lg: 'text-dos-text-md', // 22px
12
+ sm: 'text-dos-text-base',
13
+ md: 'text-dos-text-base',
14
+ lg: 'text-dos-text-base',
14
15
  small: 'text-dos-text-base',
15
- medium: 'text-dos-text-sm',
16
- large: 'text-dos-text-md',
16
+ medium: 'text-dos-text-base',
17
+ large: 'text-dos-text-base',
17
18
  };
18
19
  const variantClasses = {
19
20
  default: 'eidotter-progress--default',
@@ -7,9 +7,9 @@ const orientationClasses = {
7
7
  horizontal: 'eidotter-range-bar--horizontal',
8
8
  };
9
9
  const sizeClasses = {
10
- sm: 'eidotter-range-bar--sm text-dos-text-xs',
11
- md: 'eidotter-range-bar--md text-dos-text-sm',
12
- lg: 'eidotter-range-bar--lg text-dos-text-md',
10
+ sm: 'eidotter-range-bar--sm text-dos-text-base',
11
+ md: 'eidotter-range-bar--md text-dos-text-base',
12
+ lg: 'eidotter-range-bar--lg text-dos-text-base',
13
13
  };
14
14
  /** Bar thickness and length per orientation and size. */
15
15
  const trackClasses = {
@@ -7,14 +7,14 @@ import { cn } from '../../../utils/cn.js';
7
7
  // Shared style fragments — layout in Tailwind, phosphor in Select.css
8
8
  // ---------------------------------------------------------------------------
9
9
  const sizeTrigger = {
10
- sm: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-2',
11
- md: 'text-dos-text-md px-3 py-2 min-h-8 gap-2',
12
- lg: 'text-dos-text-lg px-4 py-2.5 min-h-10 gap-2',
10
+ sm: 'text-dos-text-base px-2.5 py-1 min-h-7 gap-2',
11
+ md: 'text-dos-text-base px-3 py-2 min-h-8 gap-2',
12
+ lg: 'text-dos-text-base px-4 py-2.5 min-h-10 gap-2',
13
13
  };
14
14
  const normalizeSize = (size = 'md') => ({ small: 'sm', medium: 'md', large: 'lg' }[size] ?? size);
15
- const labelClass = 'eidotter-select__label text-dos-text-brand font-dos text-dos-text-xs uppercase tracking-wider';
16
- const descClass = 'eidotter-select__description text-dos-text-muted font-dos text-dos-text-xs';
17
- const errClass = 'eidotter-select__error text-dos-text-error font-dos text-dos-text-xs';
15
+ const labelClass = 'eidotter-select__label text-dos-text-brand font-dos text-dos-text-base uppercase tracking-wider';
16
+ const descClass = 'eidotter-select__description text-dos-text-muted font-dos text-dos-text-base';
17
+ const errClass = 'eidotter-select__error text-dos-text-error font-dos text-dos-text-base';
18
18
  const triggerBase = 'eidotter-select__trigger flex items-center w-full bg-transparent text-dos-text-brand font-dos ' +
19
19
  'border-2 border-dos-border-default outline-none box-border';
20
20
  const optionClass = 'eidotter-select__option font-dos';
@@ -3,9 +3,9 @@ import { forwardRef } from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { formatValue, isKnown, resolveLabels, PLACEHOLDER } from '../../../utils/health/index.js';
5
5
  const sizeClasses = {
6
- sm: 'eidotter-series-bars--sm text-dos-text-xs',
7
- md: 'eidotter-series-bars--md text-dos-text-sm',
8
- lg: 'eidotter-series-bars--lg text-dos-text-md',
6
+ sm: 'eidotter-series-bars--sm text-dos-text-base',
7
+ md: 'eidotter-series-bars--md text-dos-text-base',
8
+ lg: 'eidotter-series-bars--lg text-dos-text-base',
9
9
  };
10
10
  const plotClasses = {
11
11
  sm: 'h-[6rem]',
@@ -4,12 +4,12 @@ import { forwardRef } from 'react';
4
4
  import { useTextScramble } from '../../../hooks/useTextScramble.js';
5
5
  import { cn } from '../../../utils/cn.js';
6
6
  const sizeClasses = {
7
- sm: { root: 'gap-0.5', label: 'text-dos-text-xs', value: 'text-dos-display-xs', trend: 'text-dos-text-xs' },
8
- md: { root: 'gap-1', label: 'text-dos-text-sm', value: 'text-dos-display-sm', trend: 'text-dos-text-sm' },
9
- lg: { root: 'gap-1.5', label: 'text-dos-text-md', value: 'text-dos-display-md', trend: 'text-dos-text-md' },
10
- small: { root: 'gap-0.5', label: 'text-dos-text-xs', value: 'text-dos-display-xs', trend: 'text-dos-text-xs' },
11
- medium: { root: 'gap-1', label: 'text-dos-text-sm', value: 'text-dos-display-sm', trend: 'text-dos-text-sm' },
12
- large: { root: 'gap-1.5', label: 'text-dos-text-md', value: 'text-dos-display-md', trend: 'text-dos-text-md' },
7
+ sm: { root: 'gap-0.5', label: 'text-dos-text-base', value: 'text-dos-display-xs', trend: 'text-dos-text-base' },
8
+ md: { root: 'gap-1', label: 'text-dos-text-base', value: 'text-dos-display-sm', trend: 'text-dos-text-base' },
9
+ lg: { root: 'gap-1.5', label: 'text-dos-text-base', value: 'text-dos-display-md', trend: 'text-dos-text-base' },
10
+ small: { root: 'gap-0.5', label: 'text-dos-text-base', value: 'text-dos-display-xs', trend: 'text-dos-text-base' },
11
+ medium: { root: 'gap-1', label: 'text-dos-text-base', value: 'text-dos-display-sm', trend: 'text-dos-text-base' },
12
+ large: { root: 'gap-1.5', label: 'text-dos-text-base', value: 'text-dos-display-md', trend: 'text-dos-text-base' },
13
13
  };
14
14
  const trendColorClasses = {
15
15
  up: 'text-dos-text-success',
@@ -4,11 +4,11 @@ import { IconButton } from '../../IconButton/components/IconButton.js';
4
4
  import { cn } from '../../../utils/cn.js';
5
5
  import { useAnimatedDismiss } from '../../../hooks/useAnimatedDismiss.js';
6
6
  const sizeClasses = {
7
- sm: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
8
- md: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
9
- lg: 'text-dos-text-md px-3 py-1.5 min-h-8 gap-1.5',
10
- small: 'text-dos-text-xs px-2 py-0.5 min-h-6 gap-1',
11
- medium: 'text-dos-text-sm px-2.5 py-1 min-h-7 gap-1.5',
7
+ sm: 'text-dos-text-base px-2 py-0.5 min-h-6 gap-1',
8
+ md: 'text-dos-text-base px-2.5 py-1 min-h-7 gap-1.5',
9
+ lg: 'text-dos-text-base px-3 py-1.5 min-h-8 gap-1.5',
10
+ small: 'text-dos-text-base px-2 py-0.5 min-h-6 gap-1',
11
+ medium: 'text-dos-text-base px-2.5 py-1 min-h-7 gap-1.5',
12
12
  };
13
13
  /**
14
14
  * DOS-styled Tag for interactive labels with click, close, and selection.
@@ -4,9 +4,9 @@ import { cn } from '../../../utils/cn.js';
4
4
  import { Skeleton } from '../../Skeleton/index.js';
5
5
  import { formatValue, isKnown, resolveBand, resolveLabels } from '../../../utils/health/index.js';
6
6
  const sizeClasses = {
7
- sm: 'eidotter-vitals-strip--sm gap-1 text-dos-text-xs',
8
- md: 'eidotter-vitals-strip--md gap-2 text-dos-text-sm',
9
- lg: 'eidotter-vitals-strip--lg gap-2 text-dos-text-md',
7
+ sm: 'eidotter-vitals-strip--sm gap-1 text-dos-text-base',
8
+ md: 'eidotter-vitals-strip--md gap-2 text-dos-text-base',
9
+ lg: 'eidotter-vitals-strip--lg gap-2 text-dos-text-base',
10
10
  };
11
11
  const toneClasses = {
12
12
  neutral: 'eidotter-tone--neutral',
@@ -69,7 +69,7 @@ export const VitalsStrip = forwardRef(({ tiles, size = 'md', locale = 'en', labe
69
69
  moves under it when both do not fit on one line (DMNC-1573). */
70
70
  _jsxs("span", { className: "eidotter-vitals-strip__value text-dos-text-accent leading-none tabular-nums flex flex-wrap items-baseline gap-x-1 min-w-0", children: [_jsx("span", { className: "eidotter-vitals-strip__reading min-w-0 max-w-full whitespace-nowrap overflow-hidden text-ellipsis", children: stale ? (_jsx("span", { className: "opacity-60", children: valueText })) : stateText !== null ? (
71
71
  // State words are prose, not a reading: body size, not display size.
72
- _jsx("span", { className: "eidotter-vitals-strip__state text-dos-text-sm", children: stateText })) : (valueText) }), valueText && t.unit && (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "eidotter-vitals-strip__unit whitespace-nowrap text-[0.5em] text-dos-text-brand", children: t.unit })] }))] })), stale && _jsx("span", { className: "eidotter-vitals-strip__stale", children: labels.stale }), t.secondary && !unknown && (_jsx("span", { className: "eidotter-vitals-strip__secondary text-dos-text-muted leading-tight", children: t.secondary })), resolved.label && (_jsx("span", { className: "eidotter-vitals-strip__band text-dos-text-brand leading-tight", children: resolved.label }))] }, t.id));
72
+ _jsx("span", { className: "eidotter-vitals-strip__state text-dos-text-base", children: stateText })) : (valueText) }), valueText && t.unit && (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "eidotter-vitals-strip__unit whitespace-nowrap text-[0.5em] text-dos-text-brand", children: t.unit })] }))] })), stale && _jsx("span", { className: "eidotter-vitals-strip__stale", children: labels.stale }), t.secondary && !unknown && (_jsx("span", { className: "eidotter-vitals-strip__secondary text-dos-text-muted leading-tight", children: t.secondary })), resolved.label && (_jsx("span", { className: "eidotter-vitals-strip__band text-dos-text-brand leading-tight", children: resolved.label }))] }, t.id));
73
73
  }) }));
74
74
  });
75
75
  VitalsStrip.displayName = 'VitalsStrip';
@@ -695,6 +695,7 @@ export const componentRegistry = {
695
695
  'brandCollapse:mark': { description: 'Below 480px of header width (container query) only the icon shows; the name stays the accessible name', since: '0.43.0' },
696
696
  },
697
697
  changelog: [
698
+ { version: '0.46.0', type: 'changed', description: 'sticky={false} paints no ground (transparent, class eidotter-header--static), so the page ground shows through; sticky headers keep the opaque ground' },
698
699
  { version: '0.45.0', type: 'changed', description: 'Brand title never wraps or ellipsizes; on a tight row a lockup/mark brand drops its icon first (name first in the DOM, row-reverse wrap onto a clipped second row), then the end slot clips. Phone gaps (below 480px) 8px with an end slot (DMNC-1619)' },
699
700
  { version: '0.43.0', type: 'added', description: '`layout` (inline | stacked), `rule` (false drops the bottom line and its glow), `contained` (true = 1240px column, or a CSS length, with the PageShell gutter, so the brand lines up with a page column) and `brandCollapse` (none | mark) props; all default to the previous rendering' },
700
701
  { version: '0.43.0', type: 'changed', description: 'The brand name wraps instead of ellipsizing: the brand link shrinks first (the end slot clips only after the brand reaches its floor of icon + about 8 tracked characters), words break at spaces, a single over-long word breaks mid-word as a last resort; the icon top-aligns beside a two-line name' },
@@ -793,11 +794,26 @@ export const componentRegistry = {
793
794
  { version: '0.41.0', type: 'added', description: 'Initial IconButton: icon, required label (aria-label), size md/window, variant outline/bare, isDisabled, onPress, excludeFromTabOrder; adopted by Modal, Lightbox, Notification, Alert, Tag and Nav (DMNC-1592)' },
794
795
  ],
795
796
  },
797
+ HeaderButton: {
798
+ origin: 'eidotter',
799
+ consumers: [],
800
+ since: '0.46.0',
801
+ originNote: 'The one control shape for the Header end slot: a 36px outlined box (32px on phones) with an optional pixel glyph, text and chevron; hover and an open panel invert to the brand fill. DisplayMenu\'s trigger and a ⌘K launcher are both HeaderButtons, so header controls always match. React Aria Button.',
802
+ variants: {
803
+ 'labelDisplay:label': { description: 'Glyph and text always (default)', since: '0.46.0' },
804
+ 'labelDisplay:responsive': { description: 'Glyph only below 640px (a text-only button keeps its text)', since: '0.46.0' },
805
+ 'labelDisplay:icon': { description: 'Always glyph only, square', since: '0.46.0' },
806
+ },
807
+ platforms: { react: { path: 'src/components/HeaderButton', status: 'canonical' } },
808
+ changelog: [
809
+ { version: '0.46.0', type: 'added', description: 'Initial HeaderButton: icon, children, aria-label (defaults to string text), labelDisplay, chevron, className, plus React Aria Button props (onPress, isDisabled); stable classes eidotter-header-button, __icon, __label, __chevron' },
810
+ ],
811
+ },
796
812
  DisplayMenu: {
797
813
  origin: 'eidotter',
798
814
  consumers: [],
799
815
  since: '0.45.0',
800
- originNote: 'One header control for display options (DMNC-1619): a trigger (pixel monitor glyph, label, chevron; icon only below 640px) opens a React Aria popover dialog with one row per option, each an eidotter Switch. Replaces switches side by side in Header end slots; consumers own the state.',
816
+ originNote: 'One header control for display options (DMNC-1619): a trigger (pixel monitor glyph, label, chevron; icon only below 640px) opens a non-modal React Aria popover (a labelled group, DMNC-1629) with one row per option, each an eidotter Switch. Replaces switches side by side in Header end slots; consumers own the state.',
801
817
  variants: {
802
818
  'labelDisplay:responsive': { description: 'Icon only below 640px, icon + label above (default)', since: '0.45.0' },
803
819
  'labelDisplay:icon': { description: 'Always icon only (36px square)', since: '0.45.0' },
@@ -805,6 +821,8 @@ export const componentRegistry = {
805
821
  },
806
822
  platforms: { react: { path: 'src/components/DisplayMenu', status: 'canonical' } },
807
823
  changelog: [
824
+ { version: '0.46.1', type: 'changed', description: 'Non-modal panel (DMNC-1629): no scroll lock, scrim or aria-hiding of the page; Escape, outside press, the trigger, Tab out and page scroll close it, focus returns to the trigger; the panel is a labelled role=group, not a dialog' },
825
+ { version: '0.46.0', type: 'changed', description: 'Trigger is a HeaderButton (same geometry, states and phone size as every header control); trigger styles moved to HeaderButton.css, the eidotter-display-menu class stays on the trigger' },
808
826
  { version: '0.45.1', type: 'changed', description: 'Opening the panel focuses the first enabled switch, so Space toggles it without a Tab' },
809
827
  { version: '0.45.0', type: 'added', description: 'Initial DisplayMenu: items ({ id, label, checked, onChange, disabled, hint }), label, labelDisplay, placement, className; stable classes eidotter-display-menu, __popover, __panel, __row, __switch, __hint (DMNC-1619)' },
810
828
  ],