monowind 0.1.3 → 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.
- package/dist/borders.d.ts +78 -9
- package/dist/borders.d.ts.map +1 -1
- package/dist/cdn.d.ts +2 -1
- package/dist/cdn.d.ts.map +1 -1
- package/dist/cdn.js +46 -33
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts +8 -0
- package/dist/element.d.ts.map +1 -1
- package/dist/flex.d.ts.map +1 -1
- package/dist/grid.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2120 -907
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +9 -0
- package/dist/layout.d.ts.map +1 -1
- package/dist/paint.d.ts +3 -0
- package/dist/paint.d.ts.map +1 -0
- package/dist/plain-text.d.ts +43 -0
- package/dist/plain-text.d.ts.map +1 -0
- package/dist/render.d.ts +12 -5
- package/dist/render.d.ts.map +1 -1
- package/dist/style.d.ts +6 -0
- package/dist/style.d.ts.map +1 -1
- package/dist/table.d.ts +82 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/tree.d.ts +16 -1
- package/dist/tree.d.ts.map +1 -1
- package/dist/types.d.ts +122 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/warn.d.ts +2 -0
- package/dist/warn.d.ts.map +1 -0
- package/dist/wrap.d.ts +7 -6
- package/dist/wrap.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/styles.css +158 -13
- package/dist/ascii.d.ts +0 -16
- package/dist/ascii.d.ts.map +0 -1
package/dist/layout.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LineSpan } from "./wrap.ts";
|
|
2
|
+
import type { TableData } from "./table.ts";
|
|
2
3
|
import type { CellLength, CellStyle, LayoutNode, NullableInsets, PerSide, Size, SizeLimit } from "./types.ts";
|
|
3
4
|
/**
|
|
4
5
|
* Core layout: the per-node sizing pipeline, block flow, and the shared
|
|
@@ -29,6 +30,9 @@ export interface IntrinsicCache {
|
|
|
29
30
|
min: number;
|
|
30
31
|
max: number;
|
|
31
32
|
}>;
|
|
33
|
+
/** Table structure + chrome + column bounds, shared by the intrinsic,
|
|
34
|
+
* width-resolution, and layout passes. */
|
|
35
|
+
tableData: WeakMap<LayoutNode, TableData>;
|
|
32
36
|
}
|
|
33
37
|
export declare function makeIntrinsicCache(): IntrinsicCache;
|
|
34
38
|
/**
|
|
@@ -54,8 +58,13 @@ export declare function clampSize(value: number, min: number, max: number | unde
|
|
|
54
58
|
export declare function leafLineGeometry(node: LayoutNode, contentWidth: number): {
|
|
55
59
|
spans: LineSpan[];
|
|
56
60
|
lineY: number[];
|
|
61
|
+
textY: number[];
|
|
57
62
|
totalRows: number;
|
|
58
63
|
};
|
|
64
|
+
/** The used gap in an axis: the resolved gap floored at the axis's rule
|
|
65
|
+
* width (specs/gap-decorations.md deviation 1 — rules take layout
|
|
66
|
+
* space, so `rule` alone behaves as `gap-1 rule`). */
|
|
67
|
+
export declare function resolveGap(style: CellStyle, axis: "x" | "y", basis: number | undefined): number;
|
|
59
68
|
/** Resolve a spacing length to cells against its containing-block basis.
|
|
60
69
|
* An indefinite basis (percent gap in an unbounded axis) resolves to 0. */
|
|
61
70
|
export declare function resolveLength(length: CellLength, basis: number | undefined): number;
|
package/dist/layout.d.ts.map
CHANGED
|
@@ -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;AAU1C,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EAET,UAAU,EACV,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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AAI,CAoBrE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { LayoutNode } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Render a laid-out tree as plain text ("ASCII art", though the border
|
|
4
|
+
* glyphs are Unicode box drawing): leaf text word-wrapped inside its
|
|
5
|
+
* content box, everything else as spaces.
|
|
6
|
+
*
|
|
7
|
+
* This is the engine's "screenshot without a browser": deterministic,
|
|
8
|
+
* font-independent, and diffable — used for golden regression tests and as
|
|
9
|
+
* a debugging/agent-inspection tool. It intentionally renders geometry the
|
|
10
|
+
* way the browser would paint it (same border-run and word-wrap code), minus
|
|
11
|
+
* colors and fonts.
|
|
12
|
+
*
|
|
13
|
+
* Content that overflows the root box is clipped at the grid edges.
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderPlainText(root: LayoutNode): string;
|
|
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). */
|
|
20
|
+
export interface CellPaint {
|
|
21
|
+
color?: string;
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
fontWeight?: string;
|
|
24
|
+
fontStyle?: string;
|
|
25
|
+
textDecorationLine?: string;
|
|
26
|
+
}
|
|
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 {
|
|
31
|
+
text: string;
|
|
32
|
+
}
|
|
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;
|
|
43
|
+
//# sourceMappingURL=plain-text.d.ts.map
|
|
@@ -0,0 +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;;;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
|
|
4
|
-
*
|
|
5
|
-
* are
|
|
6
|
-
*
|
|
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
|
|
15
|
+
export declare function render(root: LayoutNode): void;
|
|
9
16
|
//# sourceMappingURL=render.d.ts.map
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"
|
|
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
|
package/dist/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"
|
|
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,CA8PX;AA8BD;;;;iBAIiB;AACjB,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CASzD;AAsPD;;;uCAGuC;AACvC,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAKR;AAiVD;;;;;;;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/table.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { IntrinsicCache } from "./layout.ts";
|
|
2
|
+
import type { BorderStyle, Insets, LayoutNode } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* Table layout (specs/table.md): CSS 2.1 §17 adapted to integer cells.
|
|
5
|
+
* Structure comes from `tableRole`s (computed display), spans from the
|
|
6
|
+
* HTML attributes, column sizing from the §17.5.2.2 algorithms with the
|
|
7
|
+
* shared integer distribution, and collapsed borders become a shared
|
|
8
|
+
* box-drawing lattice painted with junction glyphs.
|
|
9
|
+
*/
|
|
10
|
+
interface PlacedCell {
|
|
11
|
+
node: LayoutNode;
|
|
12
|
+
/** The row LayoutNode the cell lives under (its rect parent). */
|
|
13
|
+
rowNode: LayoutNode;
|
|
14
|
+
row: number;
|
|
15
|
+
col: number;
|
|
16
|
+
rowSpan: number;
|
|
17
|
+
colSpan: number;
|
|
18
|
+
}
|
|
19
|
+
interface TableStructure {
|
|
20
|
+
caption: LayoutNode | null;
|
|
21
|
+
/** Rows in render order: header-group rows, body rows, footer-group rows. */
|
|
22
|
+
rows: LayoutNode[];
|
|
23
|
+
/** Per row: its group container node (null for rows directly in the table). */
|
|
24
|
+
rowGroups: (LayoutNode | null)[];
|
|
25
|
+
/** Per row: the exclusive end row index of its row group (`rowspan="0"`
|
|
26
|
+
* extends to it, and row spans clamp to it). */
|
|
27
|
+
groupEnds: number[];
|
|
28
|
+
cells: PlacedCell[];
|
|
29
|
+
columnCount: number;
|
|
30
|
+
/** Fixed width from `<col>` elements, per column. */
|
|
31
|
+
colFixed: (number | undefined)[];
|
|
32
|
+
/** Percent width from `<col>` elements, per column. */
|
|
33
|
+
colPercent: (number | undefined)[];
|
|
34
|
+
/** `<col>`/`<colgroup>` boxes and misparented content — never rendered. */
|
|
35
|
+
hidden: LayoutNode[];
|
|
36
|
+
}
|
|
37
|
+
interface ColumnBounds {
|
|
38
|
+
min: number[];
|
|
39
|
+
max: number[];
|
|
40
|
+
/** Highest percent authored on the column's cells or its `<col>`. */
|
|
41
|
+
percent: (number | undefined)[];
|
|
42
|
+
}
|
|
43
|
+
interface LatticeSegment {
|
|
44
|
+
width: number;
|
|
45
|
+
style: BorderStyle;
|
|
46
|
+
color: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
interface TableChrome {
|
|
49
|
+
collapsed: boolean;
|
|
50
|
+
/** Collapsed: per-line widths (columnCount + 1 / rowCount + 1); the
|
|
51
|
+
* separate model keeps them zero and uses the spacings. */
|
|
52
|
+
vLines: number[];
|
|
53
|
+
hLines: number[];
|
|
54
|
+
spacingX: number;
|
|
55
|
+
spacingY: number;
|
|
56
|
+
/** Collapsed only: winner per vertical segment [line][row] and
|
|
57
|
+
* horizontal segment [line][column]; null = no border there (spanned
|
|
58
|
+
* through, or nothing authored). */
|
|
59
|
+
vSegments: (LatticeSegment | null)[][];
|
|
60
|
+
hSegments: (LatticeSegment | null)[][];
|
|
61
|
+
}
|
|
62
|
+
export interface TableData {
|
|
63
|
+
structure: TableStructure;
|
|
64
|
+
chrome: TableChrome;
|
|
65
|
+
bounds: ColumnBounds;
|
|
66
|
+
chromeX: number;
|
|
67
|
+
}
|
|
68
|
+
/** Content-box intrinsic widths: column bounds plus lattice/spacing
|
|
69
|
+
* chrome, floored by the caption. Percents behave as auto here (the
|
|
70
|
+
* indefinite-axis rule); inflation applies only against a definite
|
|
71
|
+
* available width, in `tableUsedOuterWidth`. */
|
|
72
|
+
export declare function tableIntrinsicInnerWidths(node: LayoutNode, cache: IntrinsicCache): {
|
|
73
|
+
min: number;
|
|
74
|
+
max: number;
|
|
75
|
+
};
|
|
76
|
+
/** Used outer width of an auto-width table (specs/table.md step 3):
|
|
77
|
+
* shrink-to-fit with percent inflation, floored at the min sum, capped
|
|
78
|
+
* at the available width. Fixed layout always fills. */
|
|
79
|
+
export declare function tableUsedOuterWidth(node: LayoutNode, availableWidth: number, cache: IntrinsicCache): number;
|
|
80
|
+
export declare function layoutTable(node: LayoutNode, innerWidth: number, definiteInnerHeight: number | undefined, border: Insets, padding: Insets, cache: IntrinsicCache): number;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,EAAiB,UAAU,EAAE,MAAM,YAAY,CAAC;AAE5F;;;;;;GAMG;AAEH,UAAU,UAAU;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,iEAAiE;IACjE,OAAO,EAAE,UAAU,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,+EAA+E;IAC/E,SAAS,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC;IACjC;oDACgD;IAChD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,QAAQ,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IACjC,uDAAuD;IACvD,UAAU,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IACnC,2EAA2E;IAC3E,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAwJD,UAAU,YAAY;IACpB,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qEAAqE;IACrE,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;CACjC;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** 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
|
package/dist/tree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"
|
|
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
|
@@ -38,7 +38,12 @@ export type Size = {
|
|
|
38
38
|
} | {
|
|
39
39
|
kind: "fit-content";
|
|
40
40
|
};
|
|
41
|
-
export type Display = "block" | "flex" | "grid" | "none";
|
|
41
|
+
export type Display = "block" | "flex" | "grid" | "table" | "none";
|
|
42
|
+
/** Table-internal role from the computed display (specs/table.md).
|
|
43
|
+
* `"none"` on everything that isn't table-internal. Cells and captions
|
|
44
|
+
* keep `display: "block"` — they ARE block containers; the table
|
|
45
|
+
* container finds them by role. */
|
|
46
|
+
export type TableRole = "none" | "header-group" | "row-group" | "footer-group" | "row" | "cell" | "caption" | "column" | "column-group";
|
|
42
47
|
export type FlexDirection = "row" | "column";
|
|
43
48
|
export type FlexWrap = "nowrap" | "wrap";
|
|
44
49
|
export type JustifyContent = "start" | "center" | "end" | "space-between" | "space-around" | "space-evenly"
|
|
@@ -184,6 +189,43 @@ export interface InheritedTracks {
|
|
|
184
189
|
gapBefore: number[];
|
|
185
190
|
gap: number;
|
|
186
191
|
}
|
|
192
|
+
/** One run of identical border glyphs, in absolute cell coordinates. */
|
|
193
|
+
export interface BorderRun {
|
|
194
|
+
glyph: string;
|
|
195
|
+
x: number;
|
|
196
|
+
y: number;
|
|
197
|
+
length: number;
|
|
198
|
+
color: string | undefined;
|
|
199
|
+
}
|
|
200
|
+
/** A gap-decoration rule (specs/gap-decorations.md), from the rule-*
|
|
201
|
+
* utilities' `--mw-rule-*` mirrors. `color` is always concrete:
|
|
202
|
+
* currentColor resolves to the container's computed color at read time,
|
|
203
|
+
* like border colors. */
|
|
204
|
+
export interface GapRule {
|
|
205
|
+
width: number;
|
|
206
|
+
style: BorderStyle;
|
|
207
|
+
color: string | undefined;
|
|
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";
|
|
215
|
+
/** A collapsed table participant's authored border, moved out of
|
|
216
|
+
* `CellStyle.border` at read time (`border-collapse` inherits, so every
|
|
217
|
+
* internal element knows): geometry and painting then treat the element
|
|
218
|
+
* as borderless, and the table's lattice consumes this instead
|
|
219
|
+
* (specs/table.md). */
|
|
220
|
+
export interface LatticeBorder {
|
|
221
|
+
width: Insets;
|
|
222
|
+
style: PerSide<BorderStyle>;
|
|
223
|
+
color: PerSide<string | undefined>;
|
|
224
|
+
/** `border-style: hidden` (`border-hidden`): suppresses the shared
|
|
225
|
+
* segment outright, beating any neighbor — its computed width is 0, so
|
|
226
|
+
* the flag must ride separately (CSS 2.1 §17.6.2.1). */
|
|
227
|
+
hidden: PerSide<boolean>;
|
|
228
|
+
}
|
|
187
229
|
/** One value per box edge (border style, border color, …). */
|
|
188
230
|
export interface PerSide<T> {
|
|
189
231
|
top: T;
|
|
@@ -274,7 +316,7 @@ export interface CellStyle {
|
|
|
274
316
|
* floor((letter-spacing − root letter-spacing) ÷ 0.025em)). */
|
|
275
317
|
tracking: number;
|
|
276
318
|
/** Paint-only: with `nowrap` + clipping, the browser draws the ellipsis.
|
|
277
|
-
* The engine only needs it for the
|
|
319
|
+
* The engine only needs it for the plain-text renderer's mirror of that. */
|
|
278
320
|
textOverflow: TextOverflow;
|
|
279
321
|
/**
|
|
280
322
|
* Paint-only colors, reserved for the visual-system milestone. `color` will
|
|
@@ -285,9 +327,58 @@ export interface CellStyle {
|
|
|
285
327
|
*/
|
|
286
328
|
color: string | undefined;
|
|
287
329
|
backgroundColor: string | undefined;
|
|
288
|
-
/**
|
|
289
|
-
*
|
|
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;
|
|
335
|
+
/** Paint-only text styling, passed through to the browser and
|
|
336
|
+
* mirrored per-segment by the plain-text mode's spans. */
|
|
337
|
+
fontWeight: string;
|
|
338
|
+
fontStyle: string;
|
|
339
|
+
textDecorationLine: string;
|
|
340
|
+
/** True when text-align is `justify` — forced back to `start` (its
|
|
341
|
+
* extra per-line word spacing is fractional). See cell-model spec. */
|
|
290
342
|
textAlignBlocked: boolean;
|
|
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";
|
|
348
|
+
tableRole: TableRole;
|
|
349
|
+
tableLayout: "auto" | "fixed";
|
|
350
|
+
/** True for `border-collapse: collapse` (Tailwind preflight's default
|
|
351
|
+
* on `<table>`): cell borders merge into the shared lattice. */
|
|
352
|
+
borderCollapse: boolean;
|
|
353
|
+
/** `border-spacing`, quantized per axis; separate borders only. */
|
|
354
|
+
borderSpacingX: number;
|
|
355
|
+
borderSpacingY: number;
|
|
356
|
+
captionSide: "top" | "bottom";
|
|
357
|
+
/** Computed `vertical-align` normalized (the companion's baseline
|
|
358
|
+
* lock is measuring-gated, so the read sees the authored/UA value).
|
|
359
|
+
* Consumed by table cells (`td`/`th` default to the UA's `middle`;
|
|
360
|
+
* `baseline` behaves as `start`) and by atomic inline boxes, where
|
|
361
|
+
* only `end` (bottom) acts — it drops the line's text to the box's
|
|
362
|
+
* last row (specs/cell-model.md). */
|
|
363
|
+
verticalAlign: "start" | "center" | "end";
|
|
364
|
+
/** Authored `z-index` (`null` = auto). Browser stacking is native;
|
|
365
|
+
* the renderers walk children in this order (stable, document-order
|
|
366
|
+
* ties) so decorations and plain text agree with it at overlaps. */
|
|
367
|
+
zIndex: number | null;
|
|
368
|
+
/** Set on collapsed-table participants; null everywhere else. */
|
|
369
|
+
latticeBorder: LatticeBorder | null;
|
|
370
|
+
/** Gap rules on flex/grid containers (specs/gap-decorations.md);
|
|
371
|
+
* null when unauthored. The used gap in a ruled axis floors at the
|
|
372
|
+
* rule width (deviation: rules take layout space — ink needs cells). */
|
|
373
|
+
ruleX: GapRule | null;
|
|
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;
|
|
291
382
|
}
|
|
292
383
|
export interface LayoutNode {
|
|
293
384
|
source: Element;
|
|
@@ -341,7 +432,20 @@ export interface LayoutNode {
|
|
|
341
432
|
padLeft: number;
|
|
342
433
|
padRight: number;
|
|
343
434
|
insets: PerSide<number | null> | null;
|
|
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. */
|
|
438
|
+
color: string | undefined;
|
|
439
|
+
backgroundColor: string | undefined;
|
|
440
|
+
fontWeight: string;
|
|
441
|
+
fontStyle: string;
|
|
442
|
+
textDecorationLine: string;
|
|
344
443
|
}[];
|
|
444
|
+
/** Per-character index into `inlineElements` (-1 = direct leaf text);
|
|
445
|
+
* present only when the run contains inline elements. Plain-text
|
|
446
|
+
* rendering maps colors, font styling, and relative inset shifts from
|
|
447
|
+
* it. */
|
|
448
|
+
charInline?: number[];
|
|
345
449
|
/** True on an atomic inline-level box (`inline-flex`/`inline-block`/
|
|
346
450
|
* `inline-grid`) riding its parent leaf's text run as a single
|
|
347
451
|
* unbreakable unit: the leaf's run holds an OBJECT REPLACEMENT
|
|
@@ -369,10 +473,24 @@ export interface LayoutNode {
|
|
|
369
473
|
* hides that text and warns instead of letting the browser paint it
|
|
370
474
|
* unpositioned. */
|
|
371
475
|
droppedText?: boolean;
|
|
476
|
+
/** Engine-generated glyph runs in this node's local coordinates
|
|
477
|
+
* (offset by its absolute position at paint time). Today: a collapsed
|
|
478
|
+
* table's border lattice; future producers (css-gaps rules,
|
|
479
|
+
* specs/gap-decorations.md) plug in here with no renderer changes. */
|
|
480
|
+
decorationRuns?: BorderRun[];
|
|
481
|
+
/** True on a node the table pass removed from rendering: misparented
|
|
482
|
+
* table content (no anonymous boxes — specs/table.md) and `<col>`/
|
|
483
|
+
* `<colgroup>` boxes (width carriers, never rendered). */
|
|
484
|
+
tableHidden?: boolean;
|
|
372
485
|
/** Outer height before min/max clamping — written by layoutNode; the
|
|
373
486
|
* column flex algorithm's base main size (CSS distributes from unclamped
|
|
374
487
|
* bases; limits apply via its freeze loop). */
|
|
375
488
|
unclampedHeight: number;
|
|
489
|
+
/** Content-derived outer height, before explicit-height/min-height
|
|
490
|
+
* flooring — written by layoutNode. Table cells align their content
|
|
491
|
+
* against this: an explicit cell height tallens the box (and floors
|
|
492
|
+
* the row), but `vertical-align` centers the CONTENT, per CSS. */
|
|
493
|
+
naturalContentHeight?: number;
|
|
376
494
|
/** Padding with percentages resolved to cells — written by layoutNode
|
|
377
495
|
* (percent resolves against the containing block width, which only
|
|
378
496
|
* layout knows); the renderers read this, never `style.padding`. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -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,OAA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SAAS,CAAC;QACnC,IAAI,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;KACpC,GACD,SAAS,CAAC;IACd;;;uBAGmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;0EAGsE;IACtE,cAAc,CAAC,EAAE,SAAS,EAAE,CAAC;IAC7B;;8DAE0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;mDAE+C;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB;;;sEAGkE;IAClE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;wEAEoE;IACpE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;qBAGqB;AACrB,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,gBAAgB,IAAI,SAAS,CAyE5C;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,iEAAiE;AACjE,wBAAgB,SAAS,IAAI,SAAS,CAErC"}
|
package/dist/warn.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn.d.ts","sourceRoot":"","sources":["../src/warn.ts"],"names":[],"mappings":"AAKA,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAM3D"}
|
package/dist/wrap.d.ts
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* character occupies — 1 by default, `1 + tracking` for letter-spaced text;
|
|
6
6
|
* see specs/cell-model.md). Words are runs of non-whitespace; whitespace
|
|
7
7
|
* runs collapse to single spaces between fitting words. Browsers also treat
|
|
8
|
-
* a hyphen inside a word as a break opportunity (break after `-`, no
|
|
9
|
-
* added) — except
|
|
10
|
-
*
|
|
8
|
+
* a hyphen inside a word as a break opportunity (break after `-`, no
|
|
9
|
+
* hyphen added) — except a word-INITIAL hyphen run (UAX #14 LB20a;
|
|
10
|
+
* `-top-1` wraps `-top-` │ `1`, probed in Chromium/WebKit; Firefox's
|
|
11
|
+
* own model differs and is a documented divergence) — so words are
|
|
12
|
+
* further split into breakable segments. A segment wider than
|
|
11
13
|
* `width` breaks at cell boundaries. `\n` in the input is a HARD line break
|
|
12
14
|
* — the wrap restarts on a new line (the source of these is `<br>`
|
|
13
15
|
* elements, converted to `\n` by the tree builder). A blank hard line still
|
|
@@ -53,9 +55,8 @@ export declare function lineAdvance(start: number, end: number, advances?: numbe
|
|
|
53
55
|
export declare function longestSegmentAdvance(text: string, options?: WrapOptions): number;
|
|
54
56
|
/**
|
|
55
57
|
* Split a word at its internal break opportunities: after each hyphen run,
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* `"2026-08"` → `["2026-08"]`.
|
|
58
|
+
* except a word-initial run (UAX #14 LB20a). `"mx-auto"` →
|
|
59
|
+
* `["mx-", "auto"]`; `"-top-1"` → `["-top-", "1"]`.
|
|
59
60
|
*/
|
|
60
61
|
export declare function breakableSegments(word: string): string[];
|
|
61
62
|
/** U+FFFC marks an embedded atomic inline box (see LayoutNode.inlineBox):
|
package/dist/wrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../src/wrap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../src/wrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wEAAwE;AACxE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,I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6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monowind",
|
|
3
|
-
"version": "0.1.
|
|
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",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@tailwindcss/browser": "^4.3.3",
|
|
39
|
-
"
|
|
39
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
40
|
+
"happy-dom": "^20.12.0",
|
|
40
41
|
"typescript": "^7.0.2",
|
|
41
42
|
"vite": "^8.2.2",
|
|
42
43
|
"vitest": "^4.1.11"
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"build": "vite build && vite build -c vite.cdn.config.ts && tsc -p tsconfig.build.json",
|
|
46
47
|
"typecheck": "tsc --noEmit",
|
|
47
48
|
"test": "vitest run",
|
|
48
|
-
"test:watch": "vitest"
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"test:coverage": "vitest run --coverage"
|
|
49
51
|
}
|
|
50
52
|
}
|