monowind 0.1.4 → 0.1.5

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.
@@ -0,0 +1,3 @@
1
+ import type { LayoutNode } from "./types.ts";
2
+ export declare function paintGrid(root: LayoutNode, target: HTMLElement): void;
3
+ //# sourceMappingURL=paint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../src/paint.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAa7C,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAoBrE"}
@@ -13,19 +13,31 @@ import type { LayoutNode } from "./types.ts";
13
13
  * Content that overflows the root box is clipped at the grid edges.
14
14
  */
15
15
  export declare function renderPlainText(root: LayoutNode): string;
16
- /** Paint-through styling for one cell; every field optional so spans
17
- * only carry what differs from the host's inherited text style. */
16
+ /** Per-cell paint; every field optional so spans only carry what
17
+ * differs from the host's inherited text style. `color` paints the
18
+ * glyph, `backgroundColor` fills the cell (the light DOM's own bg is
19
+ * neutralized in styles.css so the grid owns backgrounds outright). */
18
20
  export interface CellPaint {
19
21
  color?: string;
22
+ backgroundColor?: string;
20
23
  fontWeight?: string;
21
24
  fontStyle?: string;
22
25
  textDecorationLine?: string;
23
26
  }
24
- /** One row of same-styled text runs. Joining every segment's text
25
- * reproduces the `renderPlainText` row — the plain-text mode builds
26
- * spans from these, so a copy still yields the pure text. */
27
- export interface PlainTextSegment extends CellPaint {
27
+ /** One row of same-paint runs. Joining every segment's text reproduces
28
+ * the `renderPlainText` row, so a copy from the DOM adapter (paint.ts)
29
+ * still yields the pure text. */
30
+ export interface CellSegment extends CellPaint {
28
31
  text: string;
29
32
  }
30
- export declare function renderPlainTextSegments(root: LayoutNode): PlainTextSegment[][];
33
+ /** Row-major cell segments. Each row is `rowSegments(grid[y],
34
+ * paints[y])` — the DOM adapter (paint.ts) uses this, and tests
35
+ * assert paint fields against it. */
36
+ export declare function renderCellSegments(root: LayoutNode): CellSegment[][];
37
+ /** Apply a `CellPaint` to a `CSSStyleDeclaration`. Kept in this file
38
+ * alongside samePaint / textPaint so the paint schema has one home. */
39
+ export declare function applyCellPaint(paint: CellPaint, style: CSSStyleDeclaration): void;
40
+ /** True when a segment carries no paint — the DOM adapter emits a bare
41
+ * text node for these instead of an empty <span>. */
42
+ export declare function isBarePaint(paint: CellPaint): boolean;
31
43
  //# sourceMappingURL=plain-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plain-text.d.ts","sourceRoot":"","sources":["../src/plain-text.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;mEACmE;AACnE,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;6DAE6D;AAC7D,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,GAAG,gBAAgB,EAAE,EAAE,CAe9E"}
1
+ {"version":3,"file":"plain-text.d.ts","sourceRoot":"","sources":["../src/plain-text.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;;;uEAGuE;AACvE,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;iCAEiC;AACjC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;qCAEqC;AACrC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,EAAE,EAAE,CAGpE;AA8BD;uEACuE;AACvE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAMjF;AAED;qDACqD;AACrD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAQrD"}
package/dist/render.d.ts CHANGED
@@ -1,9 +1,16 @@
1
1
  import type { LayoutNode } from "./types.ts";
2
2
  /**
3
- * Write geometry custom properties on each source element and (re)paint the
4
- * decoration layer. Coordinates on LayoutNode are parent-relative; borders
5
- * are painted in absolute coordinates so we accumulate the parent origin as
6
- * we walk.
3
+ * Write geometry custom properties, quantized inline padding, and z-index
4
+ * markers on each source element in the light DOM. Coordinates on
5
+ * LayoutNode are parent-relative; the companion stylesheet turns them
6
+ * into px via the measured cell size. No painting: decoration and text
7
+ * glyphs land in the shadow grid via `paint.ts`.
8
+ *
9
+ * Every write is change-checked: a relayout that computes the same
10
+ * result mutates nothing. Chrome dismisses an open <select> popup on
11
+ * style mutations near it, and the dynamic-state listeners relayout on
12
+ * the very events that open one (focusin/pointerover) — idempotent
13
+ * writes keep the popup up.
7
14
  */
8
- export declare function render(root: LayoutNode, decorationLayer: HTMLElement): void;
15
+ export declare function render(root: LayoutNode): void;
9
16
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,GAAG,IAAI,CAc3E"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAY7C"}
package/dist/style.d.ts CHANGED
@@ -11,6 +11,12 @@ import type { CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate } from "
11
11
  * the font size and the root letter-spacing to 0.
12
12
  */
13
13
  export declare function readCellStyle(el: Element, rootFontSizePx: number, metrics?: CellMetrics): CellStyle;
14
+ /** True for a computed `background-color` that shouldn't trigger the
15
+ * bg-occludes-decorations fill. Real browsers resolve transparent to
16
+ * `rgba(0, 0, 0, 0)`; the empty-string and `currentcolor` branches
17
+ * cover happy-dom (test env), which leaves some computed values
18
+ * unresolved. */
19
+ export declare function isTransparentColor(value: string): boolean;
14
20
  /** Extra cells after each character: floor((letter-spacing − root
15
21
  * letter-spacing) ÷ 0.025em), never negative (specs/cell-model.md). The
16
22
  * root's own letter-spacing is part of the cell, so only the excess over
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,WAAW,EACX,SAAS,EAIT,SAAS,EAET,QAAQ,EACR,YAAY,EAUb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,SAAS,CAmMX;AA4OD;;;uCAGuC;AACvC,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EAC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etrics, LayoutNode } from "./types.ts";
2
+ /** Per-textarea content width in cells, captured by the host BEFORE
3
+ * the measuring attribute goes on — the engine's width rule is off
4
+ * during measuring, so `textarea.clientWidth` read then would reflect
5
+ * the browser-default width instead of our engine-assigned one (which
6
+ * may itself be constrained by max-width / flex parent). */
7
+ export type TextareaWidths = Map<HTMLTextAreaElement, number>;
2
8
  /**
3
9
  * Build a LayoutNode tree from an element subtree.
4
10
  *
@@ -20,5 +26,14 @@ import type { CellMetrics, LayoutNode } from "./types.ts";
20
26
  * `cellMetrics` (measured by the host) is the basis for leading and
21
27
  * tracking; absent in headless tests (see readCellStyle).
22
28
  */
23
- export declare function buildTree(root: Element, rootFontSizePx: number, cellMetrics?: CellMetrics): LayoutNode | null;
29
+ export declare function buildTree(root: Element, rootFontSizePx: number, cellMetrics?: CellMetrics, textareaWidths?: TextareaWidths): LayoutNode | null;
30
+ /** True if `el` has any direct text child that isn't just whitespace. */
31
+ export declare function hasDirectText(el: Element): boolean;
32
+ /** Author-facing warning when direct text can't be laid out alongside
33
+ * block children — shared by the nested-container path here and the
34
+ * host-level path in element.ts. */
35
+ export declare const DIRECT_TEXT_DROPPED: string;
36
+ /** True for tags whose value/caret/selection are handled by the browser
37
+ * natively — the tree builder treats them as empty leaves. */
38
+ export declare function isFormControlTag(tag: string): boolean;
24
39
  //# sourceMappingURL=tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,GACxB,UAAU,GAAG,IAAI,CAyEnB"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEnE;;;;4DAI4D;AAC5D,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,cAAc,CAAC,EAAE,cAAc,GAC9B,UAAU,GAAG,IAAI,CA4JnB;AA6UD,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAIlD;AAED;;oCAEoC;AACpC,eAAO,MAAM,mBAAmB,QAE6B,CAAC;AAE9D;8DAC8D;AAC9D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD"}
package/dist/types.d.ts CHANGED
@@ -206,6 +206,12 @@ export interface GapRule {
206
206
  style: BorderStyle;
207
207
  color: string | undefined;
208
208
  }
209
+ /** Where rule segments break at gap intersections (css-gaps-1
210
+ * rule-break; specs/gap-decorations.md "Segments"). */
211
+ export type RuleBreak = "none" | "normal" | "intersection";
212
+ /** Which segments paint next to empty grid areas (css-gaps-1
213
+ * rule-visibility-items; `normal` acts as `all` in grid). */
214
+ export type RuleVisibilityItems = "normal" | "all" | "around" | "between";
209
215
  /** A collapsed table participant's authored border, moved out of
210
216
  * `CellStyle.border` at read time (`border-collapse` inherits, so every
211
217
  * internal element knows): geometry and painting then treat the element
@@ -321,18 +327,24 @@ export interface CellStyle {
321
327
  */
322
328
  color: string | undefined;
323
329
  backgroundColor: string | undefined;
330
+ /** `bg-clear` marker (`--mw-bg-clear: 1`): occlude ancestor decoration
331
+ * glyphs under this element's border box WITHOUT painting a bg color.
332
+ * `backgroundColor` stays undefined; the renderer fills with plain
333
+ * spaces instead of colored spaces. */
334
+ backgroundClear: boolean;
324
335
  /** Paint-only text styling, passed through to the browser and
325
336
  * mirrored per-segment by the plain-text mode's spans. */
326
337
  fontWeight: string;
327
338
  fontStyle: string;
328
339
  textDecorationLine: string;
329
- /** True when text-align is center/justify — forced back to `start` since
330
- * per-line centering can't be snapped to whole cells. See cell-model spec. */
340
+ /** True when text-align is `justify` — forced back to `start` (its
341
+ * extra per-line word spacing is fractional). See cell-model spec. */
331
342
  textAlignBlocked: boolean;
332
- /** Computed text-align, normalized LTR (`right`/`end` → `end`, all else
333
- * `start`). On-grid: line offsets are whole cells. Browser paints its
334
- * own alignment; `renderPlainText` mirrors it per line. */
335
- textAlign: "start" | "end";
343
+ /** Computed text-align, normalized LTR. `end` offsets each line by
344
+ * W − line, `center` by floor((W − line) / 2) — whole cells, painted
345
+ * by the grid (the browser's own fractional centering only touches
346
+ * the invisible light-DOM copy). */
347
+ textAlign: "start" | "center" | "end";
336
348
  tableRole: TableRole;
337
349
  tableLayout: "auto" | "fixed";
338
350
  /** True for `border-collapse: collapse` (Tailwind preflight's default
@@ -360,6 +372,13 @@ export interface CellStyle {
360
372
  * rule width (deviation: rules take layout space — ink needs cells). */
361
373
  ruleX: GapRule | null;
362
374
  ruleY: GapRule | null;
375
+ ruleBreak: RuleBreak;
376
+ /** Cells retracted from every rule-segment endpoint (rule-inset,
377
+ * quantized like border widths) — or `overlap-join`, which instead
378
+ * extends junction endpoints into the crossing gap so meeting rules
379
+ * connect. */
380
+ ruleInset: number | "overlap-join";
381
+ ruleVisibilityItems: RuleVisibilityItems;
363
382
  }
364
383
  export interface LayoutNode {
365
384
  source: Element;
@@ -413,9 +432,11 @@ export interface LayoutNode {
413
432
  padLeft: number;
414
433
  padRight: number;
415
434
  insets: PerSide<number | null> | null;
416
- /** Paint-only text styling for the plain-text mode (the browser
417
- * renders the real element). */
435
+ /** Paint-only styling mirrored into the grid (the browser's own
436
+ * ink is transparent-locked). `backgroundColor` fills the run's
437
+ * cells — how a focus-inverted inline link shows its highlight. */
418
438
  color: string | undefined;
439
+ backgroundColor: string | undefined;
419
440
  fontWeight: string;
420
441
  fontStyle: string;
421
442
  textDecorationLine: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,IAAI,GACZ;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB;;;;8CAI8C;GAC5C;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE5B,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACnE;;;mCAGmC;AACnC,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,cAAc,GACd,WAAW,GACX,cAAc,GACd,KAAK,GACL,MAAM,GACN,SAAS,GACT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;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAED;;sCAEsC;AACtC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C;;;;;;2DAM2D;AAC3D,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC;;iBAEiB;AACjB,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EACvB,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,GACnD,IAAI,CAON"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monowind",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Text-based user interfaces (TUI) on the web, from ordinary HTML and Tailwind utility classes",
5
5
  "keywords": [
6
6
  "ascii",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@tailwindcss/browser": "^4.3.3",
39
39
  "@vitest/coverage-v8": "4.1.11",
40
- "happy-dom": "^20.11.15",
40
+ "happy-dom": "^20.12.0",
41
41
  "typescript": "^7.0.2",
42
42
  "vite": "^8.2.2",
43
43
  "vitest": "^4.1.11"
package/src/styles.css CHANGED
@@ -21,18 +21,16 @@
21
21
  isolation: isolate;
22
22
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
23
23
  font-size: 14px;
24
- line-height: 1;
24
+ /* `normal` picks a line box tall enough for the font's ascent +
25
+ * descent so inline span backgrounds fit within a row instead of
26
+ * bleeding into the next. Cell height derives from the probe, so
27
+ * this stays deterministic — just taller. */
28
+ line-height: normal;
25
29
  letter-spacing: 0;
26
- /* Default themable focus ring color (see form-controls rule below). */
27
- --mw-focus-color: currentColor;
28
- }
29
-
30
- /* UA `th`/`caption { text-align: center }` (preflight leaves them):
31
- * center can't land on whole cells, and the engine renders start
32
- * (specs/table.md). Base layer, so alignment utilities still override
33
- * (into the blocked path for center/justify, as anywhere else). */
34
- mono-wind :is(th, caption) {
35
- text-align: start;
30
+ /* Themable fg / bg pair for the focus-invert default. System
31
+ * colors honor the viewer's color scheme; authors override. */
32
+ --mw-fg: canvastext;
33
+ --mw-bg: canvas;
36
34
  }
37
35
 
38
36
  /* Normalize native form controls so they don't borrow browser chrome that
@@ -49,16 +47,83 @@
49
47
  appearance: none;
50
48
  }
51
49
 
52
- /* Restore a themable focus ring — `appearance: none` above kills the UA
53
- * default, and without this keyboard users can lose track of where focus
54
- * is. `outline-offset: -1px` keeps the ring inside the element's box so it
55
- * doesn't overlap our decoration layer. */
56
- mono-wind :is(button, input, select, textarea, a):focus-visible {
57
- outline: 2px solid var(--mw-focus-color);
58
- outline-offset: -1px;
50
+ /* Form controls render their value/caret/selection natively — the
51
+ * color-transparent rule below excludes them via `:not()`, so this
52
+ * visible color and themed caret actually stick. */
53
+ mono-wind :is(input, textarea, select) {
54
+ color: var(--mw-fg);
55
+ caret-color: var(--mw-fg);
56
+ }
57
+
58
+ /* Placeholder at half the element's own color, so it tracks both the
59
+ * theme and the focus-invert. Explicit opacity: Firefox dims its UA
60
+ * placeholder with opacity, which would double with the color mix. */
61
+ mono-wind :is(input, textarea)::placeholder {
62
+ color: color-mix(in srgb, currentcolor 50%, transparent);
63
+ opacity: 1;
64
+ }
65
+
66
+ /* A required <select> still on its empty placeholder option matches
67
+ * :invalid — same placeholder treatment (the :invalid specificity
68
+ * beats the form-control color above; the pair below beats the
69
+ * focus-invert). currentcolor would self-refer here, so the themed
70
+ * colors are spelled out. */
71
+ mono-wind select:invalid {
72
+ color: color-mix(in srgb, var(--mw-fg) 50%, transparent);
73
+ }
74
+ mono-wind select:invalid:focus-visible {
75
+ color: color-mix(in srgb, var(--mw-bg) 50%, transparent);
76
+ }
77
+
78
+ /* Single-line controls: never wrap, clip overflow. The one-row
79
+ * floor lives in the tree builder (a CSS min-height on the outer
80
+ * box gives no content-area guarantee once border + padding exceed
81
+ * it). */
82
+ mono-wind :is(input, select) {
83
+ white-space: nowrap;
84
+ overflow: hidden;
85
+ }
86
+
87
+ /* Textarea: engine controls the size (it auto-grows to fit the
88
+ * value, so scrolling never has anything to reveal) — the native
89
+ * resize handle and scrollbars would drag the box off-grid. `clip`
90
+ * (not `hidden`) so the caret can't scroll the box either: under
91
+ * `leading-*` the last line's half-leading is a phantom scroll
92
+ * range that would shift every line off its row. */
93
+ mono-wind textarea {
94
+ resize: none;
95
+ overflow: clip;
96
+ }
97
+
98
+ /* :focus-visible on ANY element: TUI-native invert. Outlines off
99
+ * (they'd clip against grid glyphs). Where each declaration lands:
100
+ * bg only shows via the grid (engine reads it during [measuring];
101
+ * the light-DOM bg is transparent-locked below); color/caret-color
102
+ * paint on editables (they're the ones exempted from the
103
+ * color-transparent lock), and get grid-mirrored by the engine for
104
+ * everyone else. */
105
+ mono-wind :focus-visible {
106
+ outline: none;
107
+ background-color: var(--mw-fg);
108
+ color: var(--mw-bg);
109
+ caret-color: var(--mw-bg);
59
110
  }
60
111
  }
61
112
 
113
+ /* === Modes and selection (engine-owned from here down) =============== */
114
+
115
+ /* select="grid": pass pointer events through non-interactive light-DOM
116
+ * elements so drag lands on the grid <pre> (native drag-selection of
117
+ * the ASCII); interactives opt back into `auto` so clicks still work.
118
+ * (The slot itself is pointer-events: none in the shadow CSS.) */
119
+ mono-wind[select="grid"] * {
120
+ pointer-events: none !important;
121
+ }
122
+ mono-wind[select="grid"]
123
+ :is(a, button, input, select, textarea, label, [tabindex], [role="button"]) {
124
+ pointer-events: auto !important;
125
+ }
126
+
62
127
  /* Hide the host until the first layout completes to avoid the flash of raw
63
128
  * browser-rendered content (flex without our decorations, elements at their
64
129
  * natural sizes). `visibility: hidden` preserves layout & measurability so
@@ -67,6 +132,24 @@ mono-wind:not([data-mw-ready]) {
67
132
  visibility: hidden !important;
68
133
  }
69
134
 
135
+ /* Full invert on selection. Both fields spelled out — setting only
136
+ * `color` makes some engines drop the OS default background. Native
137
+ * copy still yields the real text (the DOM the browser reads). The
138
+ * shadow grid mirrors this rule inside element.ts. */
139
+ mono-wind:not([measuring]) *::selection {
140
+ color: var(--mw-bg, canvas) !important;
141
+ background: var(--mw-fg, canvastext) !important;
142
+ }
143
+ /* Focus-invert already flipped the element's colors, so re-flipping in
144
+ * ::selection would land on the same colors as the focused bg and hide
145
+ * the selection. Swap them back for the focused element. */
146
+ mono-wind:not([measuring]) :focus-visible::selection {
147
+ color: var(--mw-fg, canvastext) !important;
148
+ background: var(--mw-bg, canvas) !important;
149
+ }
150
+
151
+ /* === Typography locks and measuring gates ============================ */
152
+
70
153
  /* Lock the font on descendants so the grid metrics stay consistent —
71
154
  * `!important` because user classes (`.text-2xl` etc.) would otherwise beat
72
155
  * these element-selector rules on specificity. */
@@ -106,6 +189,14 @@ mono-wind:not([measuring]) * {
106
189
  overflow-wrap: anywhere !important;
107
190
  letter-spacing: calc(var(--mw-rls, 0px) + var(--mw-ls) * var(--mw-cw, 1px)) !important;
108
191
  line-height: inherit !important;
192
+ /* Backgrounds paint in the grid too, so the light DOM's own bg goes
193
+ * transparent — otherwise it would cover the grid (light DOM sits
194
+ * ON TOP of the grid in the shadow tree so native selection
195
+ * highlights can show through). The engine still reads authored
196
+ * background-color during [measuring] (this rule is off then), so
197
+ * bg-* and focus-invert both make it into the grid paint. */
198
+ background-color: transparent !important;
199
+ text-shadow: none !important;
109
200
  /* Inline-element horizontal padding, quantized: the engine writes
110
201
  * `--mw-ipl`/`--mw-ipr` (whole cells) on inline elements whose authored
111
202
  * padding it reserved in the run; everything else gets 0, so raw
@@ -117,6 +208,14 @@ mono-wind:not([measuring]) * {
117
208
  padding-right: calc(var(--mw-ipr, 0) * var(--mw-cw, 1px)) !important;
118
209
  }
119
210
 
211
+ /* Light-DOM text goes invisible so the grid is the only visible copy;
212
+ * form controls opt out because they render their value/caret/selection
213
+ * natively (the tree builder skips their content so the grid doesn't
214
+ * double-render). Events, ARIA, focus, selection all still work. */
215
+ mono-wind:not([measuring]) *:not(input):not(textarea):not(select) {
216
+ color: transparent !important;
217
+ }
218
+
120
219
  /* Author-requested `white-space: nowrap` (or `pre`) — the engine sized this
121
220
  * box for unwrapped hard lines, so the browser must not wrap either. Wins
122
221
  * over the lock above on specificity. */
@@ -142,6 +241,8 @@ mono-wind:not([measuring]) [data-mw-nowrap][data-mw-clip] {
142
241
  overflow: hidden !important;
143
242
  }
144
243
 
244
+ /* === Engine-owned geometry =========================================== */
245
+
145
246
  /* Every CSS property the engine has taken over on laid-out elements.
146
247
  * Gated on the `measuring` attribute so the style reader still sees the
147
248
  * authored values during its read pass. Being unlayered already beats all
@@ -153,7 +254,7 @@ mono-wind:not([measuring]) [data-mw-nowrap][data-mw-clip] {
153
254
  * Geometry: position/box-sizing/left/top/width/height + min/max — set from
154
255
  * the engine-owned --mw-x/y/w/h custom properties.
155
256
  *
156
- * Neutralized: border-width (painted as glyphs by the decoration layer),
257
+ * Neutralized: border-width (painted as glyphs by the shadow grid),
157
258
  * margin (position:absolute + margin still nudges the element off-grid).
158
259
  *
159
260
  * Owned via `--mw-p{t,r,b,l}` (padding) and `--mw-b{t,r,b,l}` (border cells):
@@ -248,6 +349,10 @@ mono-wind:not([measuring]) [data-mw-inline-box] {
248
349
  mono-wind:not([measuring]) [data-mw-inline-box] {
249
350
  position: relative !important;
250
351
  vertical-align: top !important;
352
+ /* Same half-leading cancellation as laid-out elements — without it
353
+ * an inline box's NATIVE ink (a textarea's value under leading-*)
354
+ * sits centered in its line boxes instead of on its rows. */
355
+ translate: 0 calc(var(--mw-lhs, 0) * var(--mw-ch, 1px)) !important;
251
356
  }
252
357
 
253
358
  /* Authored `vertical-align: bottom` on an atomic inline box: grid-exact
@@ -281,6 +386,8 @@ mono-wind:not([measuring]) [data-mw-inline-inset] {
281
386
  left: calc(var(--mw-il) * var(--mw-cw, 1px)) !important;
282
387
  }
283
388
 
389
+ /* === Engine state attributes (warnings, hiding, alignment) =========== */
390
+
284
391
  /* A container whose direct text was dropped (mixed text + block children,
285
392
  * cell-model deviation): the browser would paint that text unpositioned
286
393
  * over the laid-out children, so hide it. `visibility` is inherited AND