eidotter 0.19.3 → 0.20.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 CHANGED
@@ -37,6 +37,11 @@ import 'eidotter/styles'; // Fonts, tokens, components, Tailwind utilities
37
37
 
38
38
  // Optional: import a theme
39
39
  import 'eidotter/themes/amber-mono.css';
40
+
41
+ // Optional (v0.19.4+): DOS typography utility classes for raw HTML / MDX / prose
42
+ // 12 classes: .dos-page, .dos-hero, .dos-h1–.dos-h5, .dos-body, .dos-body-lg,
43
+ // .dos-caption, .dos-micro, .dos-label, .dos-code, .dos-scanlines
44
+ import 'eidotter/utilities';
40
45
  ```
41
46
 
42
47
  Individual imports are still available for granular control:
@@ -45,6 +50,7 @@ Individual imports are still available for granular control:
45
50
  import 'eidotter/fonts.css'; // Flexi IBM VGA True @font-face
46
51
  import 'eidotter/tokens.css'; // CSS variable definitions
47
52
  import 'eidotter/styles'; // Component CSS + Tailwind utilities
53
+ import 'eidotter/utilities'; // Opt-in .dos-* typography classes (v0.19.4+)
48
54
  ```
49
55
 
50
56
  **Font:** eiDotter uses [Flexi IBM VGA True v2](https://int10h.org/blog/2018/05/flexi-ibm-vga-scalable-truetype-font/) — an aspect-corrected vector remake of the IBM VGA BIOS font (CC BY-SA 4.0). The "True" variant matches authentic 4:3 VGA proportions with an extended character set (Greek, Cyrillic, Hebrew, Latin). The `fonts.css` import loads the bundled TTF via `@font-face`.
@@ -90,7 +96,7 @@ In 0.19.2 the two older presets (`eidotter/tailwind.preset` and `eidotter/tailwi
90
96
 
91
97
  No behavior change — the merged preset already carries everything the enhanced preset used to add.
92
98
 
93
- ## Available Components (33)
99
+ ## Available Components (36)
94
100
 
95
101
  | Component | Description |
96
102
  |-----------|-------------|
@@ -105,12 +111,15 @@ No behavior change — the merged preset already carries everything the enhanced
105
111
  | ChatInput | Multiline textarea with Enter-to-send |
106
112
  | ChatContainer | Composes ChatHistory + ChatInput — place inside Terminal for DOS chat |
107
113
  | Checkbox | DOS-style checkbox with `[X]` bracket indicator |
114
+ | CmdPalette | ⌘K / Ctrl+K command palette overlay with scored search + keyboard navigation |
108
115
  | CommandPrompt | Interactive command-line input with blinking cursor |
116
+ | DosFigure | Demoscene-style painted-screen media placeholder with scanline sweep + optional pins |
109
117
  | FilterBar | Multi-select toggle group for faceted filtering |
110
118
  | Footer | Site footer with legal links (Impressum + Datenschutz) |
111
119
  | Header | Sticky site header composing branding + Nav — retro/modern variants |
112
120
  | Icon | SVG icons backed by pixelarticons (MIT) — authentic DOS pixel art |
113
121
  | InlineExpand | Inline disclosure widget for expanding text within prose |
122
+ | InlineLink | In-flow navigational anchor — dotted underline, phosphor-invert hover, external variant |
114
123
  | Input | Text input with DOS styling and error variant |
115
124
  | Modal | Dialog overlay with title bar and close button |
116
125
  | Nav | Responsive navigation with desktop/mobile variants |
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import './CmdPalette.css';
3
+ export interface CmdPaletteItem {
4
+ /** Stable identifier for React keys and `onSelect` lookups. */
5
+ id: string;
6
+ /** Primary label shown in the list. Uppercase recommended. */
7
+ label: string;
8
+ /** Optional secondary hint shown on the right (shortcut, type, etc.). */
9
+ hint?: React.ReactNode;
10
+ /** Additional keywords that contribute to search matching. */
11
+ keywords?: string[];
12
+ /** Optional type tag used for grouping/filtering by callers. */
13
+ type?: string;
14
+ /** Called when the item is activated via click or Enter. */
15
+ onSelect?: (item: CmdPaletteItem) => void;
16
+ }
17
+ export interface CmdPaletteProps {
18
+ /** Controlled open state. */
19
+ open: boolean;
20
+ /**
21
+ * Called when the overlay requests open/close (Escape, backdrop click,
22
+ * item selection, hotkey toggle).
23
+ */
24
+ onOpenChange: (open: boolean) => void;
25
+ /** Items to search. Pure data — parent owns the list. */
26
+ items: CmdPaletteItem[];
27
+ /** Input placeholder. */
28
+ placeholder?: string;
29
+ /** Global activation hotkey. `"mod+k"`, `"mod+shift+p"`, or `false` to disable. */
30
+ hotkey?: string | false;
31
+ /** Message shown when search matches nothing. */
32
+ emptyMessage?: React.ReactNode;
33
+ /** Footer hint row text / JSX. Pass `null` to hide. */
34
+ footerHint?: React.ReactNode;
35
+ /** Custom renderer for each row. Falls back to label + hint. */
36
+ renderItem?: (item: CmdPaletteItem, isSelected: boolean) => React.ReactNode;
37
+ /** Cap on filtered result rows. */
38
+ maxResults?: number;
39
+ /** Extra class names merged onto the dialog container. */
40
+ className?: string;
41
+ /** Accessible dialog label. */
42
+ 'aria-label'?: string;
43
+ }
44
+ /**
45
+ * CmdPalette — ⌘K / Ctrl+K launcher overlay.
46
+ *
47
+ * Controlled component. Parent owns `open` and item list; CmdPalette handles
48
+ * search, keyboard navigation, focus management, and hotkey binding.
49
+ *
50
+ * Built on React Aria `ModalOverlay` + `Modal` + `Dialog` — same primitives
51
+ * as `<Modal>` — so focus trap, Esc-to-close, and backdrop dismissal are
52
+ * standard.
53
+ */
54
+ export declare const CmdPalette: React.ForwardRefExoticComponent<CmdPaletteProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ export { CmdPalette } from './CmdPalette';
2
+ export type { CmdPaletteProps, CmdPaletteItem } from './CmdPalette';
@@ -0,0 +1,2 @@
1
+ export { CmdPalette } from './components';
2
+ export type { CmdPaletteProps, CmdPaletteItem } from './components';
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import './DosFigure.css';
3
+ export interface DosFigurePin {
4
+ /** Horizontal position as a percentage (0–100). */
5
+ x: number;
6
+ /** Vertical position as a percentage (0–100). */
7
+ y: number;
8
+ /** Pin label — short; renders next to the dot. */
9
+ label: string;
10
+ }
11
+ export interface DosFigureProps {
12
+ /** Title shown in the top chrome strip. Uppercase recommended. */
13
+ title?: string;
14
+ /** Resolution tag rendered bottom-right (e.g. `"640×480"`). */
15
+ resolution?: string;
16
+ /** Subject content — ASCII, SVG, or anything you'd "paint the screen" with. */
17
+ subject: React.ReactNode;
18
+ /** Caption rendered beneath the frame via `<figcaption>`. */
19
+ caption?: React.ReactNode;
20
+ /** Optional annotation pins positioned as percentages over the subject. */
21
+ pins?: DosFigurePin[];
22
+ /** Disables the scanline-sweep animation. Defaults to true (enabled). */
23
+ animated?: boolean;
24
+ /** Accessible label when `subject` has no inherent semantics. */
25
+ 'aria-label'?: string;
26
+ /** Extra class names merged onto the `<figure>` root. */
27
+ className?: string;
28
+ }
29
+ /**
30
+ * DosFigure — demoscene-style placeholder for media.
31
+ *
32
+ * Sierra / LucasArts / demoscene title cards painted the screen with a
33
+ * limited palette, dithering, and annotated frames. DosFigure recreates
34
+ * that aesthetic: amber chrome, scanline sweep, optional pins, and a
35
+ * resolution tag. Use as a lead-in for blog articles or as a placeholder
36
+ * where a photograph would otherwise go.
37
+ *
38
+ * Not intended as a replacement for semantic imagery — pass `aria-label`
39
+ * (or a `<figcaption>` via `caption`) so the figure is meaningful to AT.
40
+ */
41
+ export declare const DosFigure: React.ForwardRefExoticComponent<DosFigureProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ export { DosFigure } from './DosFigure';
2
+ export type { DosFigureProps, DosFigurePin } from './DosFigure';
@@ -0,0 +1,2 @@
1
+ export { DosFigure } from './components';
2
+ export type { DosFigureProps, DosFigurePin } from './components';
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import './InlineLink.css';
3
+ export interface InlineLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
4
+ /** Link text. */
5
+ children: React.ReactNode;
6
+ /** Target URL. */
7
+ href: string;
8
+ /**
9
+ * Render the trailing glyph (`▸` for internal, `↗` for `external`).
10
+ * Defaults to `true`. When `false`, no glyph renders regardless of the
11
+ * `external` prop.
12
+ */
13
+ showGlyph?: boolean;
14
+ /**
15
+ * External link — adds `target="_blank"` and `rel="noopener noreferrer"`
16
+ * (safe tabnabbing defaults) and, when `showGlyph` is `true`, swaps the
17
+ * trailing glyph to `↗`. `showGlyph={false}` still suppresses the glyph.
18
+ */
19
+ external?: boolean;
20
+ /** Extra class names merged onto the root anchor. */
21
+ className?: string;
22
+ }
23
+ /**
24
+ * In-flow navigational anchor. Distinct from `<InlineExpand>` — this is a
25
+ * destination, not a disclosure.
26
+ *
27
+ * Rest: dotted amber underline, trailing `▸`.
28
+ * Hover: phosphor inversion — amber background, dark foreground.
29
+ * Visited: dimmed amber (`--color-cga-amber-dim` → brown fallback).
30
+ * External: opens in a new tab safely, trailing glyph becomes `↗`.
31
+ *
32
+ * Consumer-passed `target="_blank"` is treated as implicit-external for
33
+ * `rel` safety — a `rel` is auto-applied if none is provided, preventing
34
+ * tabnabbing even when the caller doesn't explicitly set `external`.
35
+ */
36
+ export declare const InlineLink: React.ForwardRefExoticComponent<InlineLinkProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,2 @@
1
+ export { InlineLink } from './InlineLink';
2
+ export type { InlineLinkProps } from './InlineLink';
@@ -0,0 +1,2 @@
1
+ export { InlineLink } from './components';
2
+ export type { InlineLinkProps } from './components';