monowind 0.2.6 → 0.2.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAkB1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,UAAU,EAEV,cAAc,EACd,OAAO,EACP,IAAI,EACJ,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB;;;;;;;GAOG;AAEH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAevF;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAErD;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAEtD;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACxC;wEACoE;IACpE,aAAa,EAAE,OAAO,CAAC,UAAU,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjE;8CAC0C;IAC1C,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;CAC3C;AAED,wBAAgB,kBAAkB,IAAI,cAAc,CAOnD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAA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R;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,MAAM,CAcpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../src/paint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA+B7C;;0DAE0D;AAC1D,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,UAAQ,GAAG,OAAO,CAmDhG;AA0FD,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAUvF"}
1
+ {"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../src/paint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA+B7C;;0DAE0D;AAC1D,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,UAAQ,GAAG,OAAO,CAmDhG;AAwFD,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAUvF"}
@@ -1,4 +1,4 @@
1
- import type { LayoutNode } from "./types.ts";
1
+ import type { LayoutNode, Rect } from "./types.ts";
2
2
  /**
3
3
  * Render a laid-out tree as plain text ("ASCII art", though the border
4
4
  * glyphs are Unicode box drawing): leaf text word-wrapped inside its
@@ -32,9 +32,10 @@ export interface CellPaint {
32
32
  * `"0"` still paints: the glyphs stay selectable in grid mode. */
33
33
  opacity?: string;
34
34
  }
35
- /** One row of same-paint runs. Joining every segment's text reproduces
36
- * the `renderPlainText` row, so a copy from the DOM adapter (paint.ts)
37
- * still yields the pure text. */
35
+ /** One row of same-paint runs. Joining every segment's text gives the
36
+ * row at the grid's full width (specs/cell-model.md "Selection"): the
37
+ * <pre> is a rectangle of cells, so a drag's highlight sweeps whole
38
+ * rows and a copy is the visible rectangle. */
38
39
  export interface CellSegment extends CellPaint {
39
40
  text: string;
40
41
  }
@@ -59,6 +60,15 @@ export declare function leafLineCovers(node: LayoutNode, absX: number, absY: num
59
60
  * null for a blank cell (specs/semantic-selection.md). `absX/absY` is
60
61
  * the leaf's painted border-box origin as hitStack reports it. */
61
62
  export declare function charIndexAtCell(node: LayoutNode, absX: number, absY: number, col: number, row: number): number | null;
63
+ /** The cells a leaf's inline elements cover, one rect per element per
64
+ * row — the span of its characters and pad cells there, an outer
65
+ * element's including its inline descendants' — in run order then row
66
+ * order, elements without a cell left out (specs/focus-navigation.md).
67
+ * `absX/absY` as for charIndexAtCell. */
68
+ export declare function inlineElementRects(node: LayoutNode, absX: number, absY: number): {
69
+ element: Element;
70
+ rect: Rect;
71
+ }[];
62
72
  /** Where a container's bars paint, in absolute cells from its
63
73
  * border-box origin (specs/scrolling.md): each bar sits at the inner
64
74
  * edge of its reserved band (`scrollbar-inset` moves it inward, the
@@ -1 +1 @@
1
- {"version":3,"file":"plain-text.d.ts","sourceRoot":"","sources":["../src/plain-text.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;;;uEAGuE;AACvE,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;sEACkE;IAClE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;sEAGkE;IAClE,OAAO,CAA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C5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,OAAO,CAeT;AAED;;kEAEkE;AAClE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAWf;AAED;;;;yCAIyC;AACzC,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EAAE,CAkCpC;AAED;;;;;;4BAM4B;AAC5B,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX;IAAE,CAAC,CAAC,EAAE,SAAS,CAAC;IAAC,CAAC,CAAC,EAAE,SAAS,CAAA;CAAE,CA8BlC;AAED;gCACgC;AAChC,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;wEAIwE;AACxE,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAM7B"}
package/dist/pointer.d.ts CHANGED
@@ -20,6 +20,11 @@ export interface HitEntry {
20
20
  * TOPMOST in paint order (z-index, document-order ties), matching
21
21
  * what the grid shows at that cell. */
22
22
  export declare function hitStack(root: LayoutNode, col: number, row: number): HitEntry[];
23
- /** The hit stack's elements what the synthesized states mark. */
23
+ /** Inside an `inert` subtree: absent for user interaction, as natively
24
+ * — no hover, no wheel routing, no thumb drag, no focus, no text
25
+ * selection. */
26
+ export declare function isInert(element: Element): boolean;
27
+ /** The hit stack's elements — what the synthesized states mark — cut
28
+ * at the first inert one, where native :hover stops too. */
24
29
  export declare function hitChain(root: LayoutNode, col: number, row: number): Element[];
25
30
  //# sourceMappingURL=pointer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../src/pointer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;GAMG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB;4CACwC;IACxC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;uCAKuC;AACvC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,EAAE,CA6B/E;AAED,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAE9E"}
1
+ {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../src/pointer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;GAMG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB;4CACwC;IACxC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;uCAKuC;AACvC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,EAAE,CA6B/E;AAED;;gBAEgB;AAChB,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAGjD;AAED;4DAC4D;AAC5D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAO9E"}
@@ -47,6 +47,16 @@ export declare function classifySelection(host: Element, grid: Element, range: B
47
47
  * engine's out-of-flow boxes; this restores what they would have
48
48
  * produced in flow. */
49
49
  export declare function serializeSelection(root: LayoutNode, points: BoundaryPoints): string;
50
+ interface Point {
51
+ node: Node;
52
+ offset: number;
53
+ }
54
+ /** The DOM extent of a leaf's run — its first mapped character or
55
+ * inline box through its last; null for a run with neither. */
56
+ export declare function leafExtent(leaf: LayoutNode): {
57
+ start: Point;
58
+ end: Point;
59
+ } | null;
50
60
  /** A node whose text is painted: text and no in-flow children (the
51
61
  * paint walk's own test); renderer leaves included. */
52
62
  export declare function isTextLeaf(node: LayoutNode): boolean;
@@ -58,4 +68,5 @@ export declare function wordAt(leaf: LayoutNode, index: number): {
58
68
  start: number;
59
69
  end: number;
60
70
  } | null;
71
+ export {};
61
72
  //# sourceMappingURL=selection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../src/selection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;GAKG;AAEH,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAShG;AAED;;;;+CAI+C;AAC/C,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM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ACrC,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAe7F"}
package/dist/style.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate } from "./types.ts";
1
+ import type { Overflow, CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate } from "./types.ts";
2
2
  /**
3
3
  * Read the interpreted CellStyle for an element from its computed CSS.
4
4
  *
@@ -17,6 +17,14 @@ export declare function readCellStyle(el: Element, rootFontSizePx: number, metri
17
17
  * cover happy-dom (test env), which leaves some computed values
18
18
  * unresolved. */
19
19
  export declare function isTransparentColor(value: string): boolean;
20
+ /** Per-axis overflow (specs/scrolling.md). Longhands read first (the
21
+ * shorthand sets both in real browsers; happy-dom may leave them "",
22
+ * hence the fallback), then the CSS coercion: one non-visible axis
23
+ * forces the other's `visible` to compute `auto`. */
24
+ export declare function readOverflow(cs: CSSStyleDeclaration): Overflow;
25
+ /** The text properties a leaf takes from its own element — the host's
26
+ * contribution to the root leaf too (specs/host-leaf.md). */
27
+ export declare function readTextStyle(el: Element, cs: CSSStyleDeclaration, rootFontSizePx: number): Pick<CellStyle, "whiteSpace" | "tabSize" | "textOverflow" | "textDecorationLine" | "textAlignBlocked" | "textAlign" | "textIndent">;
20
28
  /** Extra cells after each character: floor((letter-spacing − root
21
29
  * letter-spacing) ÷ 0.025em), never negative (specs/cell-model.md). The
22
30
  * 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":"AAKA,OAAO,KAAK,EAMV,WAAW,EACX,SAAS,EAIT,SAAS,EAET,QAAQ,EACR,YAAY,EAUb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,C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,YAAY,GACZ,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,kBAAkB,GAClB,WAAW,GACX,YAAY,CACf,CAkBA;AAqLD;;;uCAGuC;AACvC,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAKR;AAufD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,YAAY,CAsDtF;AAgCD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAoCtE;AA8GD;;yEAEyE;AACzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CA0BrD"}
package/dist/tree.d.ts CHANGED
@@ -22,11 +22,18 @@ export type TextareaWidths = Map<HTMLTextAreaElement, number>;
22
22
  * - Elements with at least one in-flow block-level element child become
23
23
  * **containers** and recurse. Direct text nodes on containers (uncommon
24
24
  * in utility-first markup) are not laid out — a documented deviation.
25
+ * - The host follows the same rule through `buildRootLeaf`
26
+ * (specs/host-leaf.md).
25
27
  *
26
28
  * `cellMetrics` (measured by the host) is the basis for leading and
27
29
  * tracking; absent in headless tests (see readCellStyle).
28
30
  */
29
31
  export declare function buildTree(root: Element, rootFontSizePx: number, cellMetrics?: CellMetrics, textareaWidths?: TextareaWidths): LayoutNode | null;
32
+ /** The host's own inline content as the ROOT leaf (specs/host-leaf.md):
33
+ * null when an element child is block-level (the host is a container)
34
+ * or there is no inline content at all (the empty root). The metrics
35
+ * probe is never part of the run. */
36
+ export declare function buildRootLeaf(host: Element, rootFontSizePx: number, cellMetrics?: CellMetrics, textareaWidths?: TextareaWidths): LayoutNode | null;
30
37
  /** True if `el` has any direct text child that isn't just whitespace. */
31
38
  export declare function hasDirectText(el: Element): boolean;
32
39
  /** Author-facing warning when direct text can't be laid out alongside
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAiB,UAAU,EAAW,MAAM,YAAY,CAAC;AAElF;;;;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,CA2KnB;AAqdD,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"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAA4B,UAAU,EAAW,MAAM,YAAY,CAAC;AAE7F;;;;4DAI4D;AAC5D,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;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,CAwCnB;AAQD;;;qCAGqC;AACrC,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,cAAc,CAAC,EAAE,cAAc,GAC9B,UAAU,GAAG,IAAI,CAWnB;AAioBD,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monowind",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
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.13.2",
40
+ "happy-dom": "^20.14.0",
41
41
  "tailwindcss": "^4.3.3",
42
42
  "typescript": "^7.0.2",
43
43
  "vite": "^8.2.2",
package/src/styles.css CHANGED
@@ -188,9 +188,13 @@ mono-wind[select="grid"][data-mw-dragging]
188
188
  * would select it. Lifted with a semantic selection
189
189
  * (specs/semantic-selection.md). Editable controls keep their own
190
190
  * selection (Firefox honors an explicit `none` on a text field's
191
- * value; the slot's inherited value never reached it). */
192
- mono-wind[select="grid"]:not([data-mw-semantic-selection])
193
- :not(input, textarea, [contenteditable], [contenteditable] *) {
191
+ * value; the slot's inherited value never reached it). `:where()` keeps
192
+ * the rule at base specificity so the coarse-pointer rule below wins.
193
+ * The host's own text (specs/host-leaf.md) takes the host's value in
194
+ * Firefox, so the leaf host is locked too. */
195
+ mono-wind[select="grid"]:where(:not([data-mw-semantic-selection]))[data-mw-leaf],
196
+ mono-wind[select="grid"]:where(:not([data-mw-semantic-selection]))
197
+ :where(:not(input, textarea, [contenteditable], [contenteditable] *)) {
194
198
  user-select: none;
195
199
  -webkit-user-select: none;
196
200
  }
@@ -268,6 +272,7 @@ mono-wind:not([data-mw-ready]) {
268
272
  * draws the glyph copy that `color` draws in other engines (where the
269
273
  * identical-color shadow hides beneath it). Native copy still yields
270
274
  * the real text (the DOM the browser reads). */
275
+ mono-wind:not([measuring])[data-mw-leaf]::selection,
271
276
  mono-wind:not([measuring]) *::selection {
272
277
  color: var(--mw-bg, canvas) !important;
273
278
  text-shadow: 0 0 0 var(--mw-bg, canvas) !important;
@@ -372,7 +377,11 @@ mono-wind:not([measuring]) * {
372
377
  * the ink while computed `color` stays LIVE — authored transitions run
373
378
  * on it for real and the engine samples true mid-fade values (the
374
379
  * animation loop, element.ts). Decoration ink follows `color`, so it
375
- * needs its own transparent lock (the grid paints decorations). */
380
+ * needs its own transparent lock (the grid paints decorations).
381
+ * `[data-mw-leaf]` is the host with its own text as the root leaf
382
+ * (specs/host-leaf.md): every rule that shapes a leaf's native text
383
+ * carries this host variant — render.ts writes the host's flags. */
384
+ mono-wind:not([measuring])[data-mw-leaf],
376
385
  mono-wind:not([measuring]) *:not(input):not(textarea):not(select) {
377
386
  -webkit-text-fill-color: transparent !important;
378
387
  text-decoration-color: transparent !important;
@@ -391,6 +400,7 @@ mono-wind:not([measuring]) select {
391
400
  /* Author-requested `white-space: nowrap` (or `pre`) — the engine sized this
392
401
  * box for unwrapped hard lines, so the browser must not wrap either. Wins
393
402
  * over the lock above on specificity. */
403
+ mono-wind:not([measuring])[data-mw-nowrap],
394
404
  mono-wind:not([measuring]) [data-mw-nowrap] {
395
405
  white-space: nowrap !important;
396
406
  }
@@ -400,6 +410,8 @@ mono-wind:not([measuring]) [data-mw-nowrap] {
400
410
  * them too — on the leaf AND its inline descendants (the lock above would
401
411
  * collapse text inside nested spans). Later than the nowrap rule, so it
402
412
  * wins on the leaf itself at equal specificity. */
413
+ mono-wind:not([measuring])[data-mw-pre],
414
+ mono-wind:not([measuring])[data-mw-pre] *,
403
415
  mono-wind:not([measuring]) [data-mw-pre],
404
416
  mono-wind:not([measuring]) [data-mw-pre] * {
405
417
  white-space: pre !important;
@@ -603,6 +615,7 @@ mono-wind:not([measuring]) [data-mw-multicol-flow] {
603
615
  * root font size, not the cell width, so the transparent light-DOM
604
616
  * text drifts out from under the grid's paint. Rewrite it in cells so
605
617
  * the two agree — selection ranges land exactly where the glyphs are. */
618
+ mono-wind:not([measuring])[data-mw-leaf],
606
619
  mono-wind:not([measuring]) [data-mw-laid-out],
607
620
  mono-wind:not([measuring]) [data-mw-multicol-flow] {
608
621
  text-indent: calc(var(--mw-ti, 0) * var(--mw-cw, 1px)) !important;
@@ -687,11 +700,11 @@ mono-wind:not([measuring]) [data-mw-inline-inset] {
687
700
 
688
701
  /* A container whose direct text was dropped (mixed text + block children,
689
702
  * cell-model deviation): the browser would paint that text unpositioned
690
- * over the laid-out children, so hide it. `visibility` is inherited AND
691
- * resettable, so the container's laid-out children come back — only in
692
- * this warned state, which is why the reset may also override an authored
693
- * `invisible` utility there. */
694
- mono-wind:not([measuring])[data-mw-dropped-text],
703
+ * over the laid-out children, so hide it the host's own through its
704
+ * shadow slot (element.ts), a nested container's through itself.
705
+ * `visibility` is inherited AND resettable, so the laid-out children come
706
+ * back only in this warned state, which is why the reset may also
707
+ * override an authored `invisible` utility there. */
695
708
  mono-wind:not([measuring]) [data-mw-dropped-text] {
696
709
  visibility: hidden !important;
697
710
  }
@@ -709,6 +722,7 @@ mono-wind:not([measuring]) [data-mw-table-hidden] {
709
722
  /* Force off-grid text alignments back to `start`. `text-left`/`right`/`start`/
710
723
  * `end` all land on whole cells (offset = (W - N) × cell width); `center` and
711
724
  * `justify` produce fractional per-line offsets we can't snap to the grid. */
725
+ mono-wind:not([measuring])[data-mw-text-align-blocked],
712
726
  mono-wind:not([measuring]) [data-mw-text-align-blocked] {
713
727
  text-align: start !important;
714
728
  }