monowind 0.1.2 → 0.1.4
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 +49 -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 +37 -26
- 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 +1802 -860
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +9 -0
- package/dist/layout.d.ts.map +1 -1
- package/dist/plain-text.d.ts +31 -0
- package/dist/plain-text.d.ts.map +1 -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.map +1 -1
- package/dist/types.d.ts +99 -2
- 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 +40 -2
- 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;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAQvF;AAED,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAErD;AAED,4DAA4D;AAC5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;AAED;4DAC4D;AAC5D,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAQ/F;AAQD;;;oEAGoE;AACpE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,EACrC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAIpB;AAED;;cAEc;AACd,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,EACrC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,cAAc,GACpB,MAAM,GAAG,SAAS,CAKpB;AA4ID;4EAC4E;AAC5E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,cAAc,GACpB,MAAM,CAkBR;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,MAAM,CAanF;AAgBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,MAAM,CAapF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/** Paint-through styling for one cell; every field optional so spans
|
|
17
|
+
* only carry what differs from the host's inherited text style. */
|
|
18
|
+
export interface CellPaint {
|
|
19
|
+
color?: string;
|
|
20
|
+
fontWeight?: string;
|
|
21
|
+
fontStyle?: string;
|
|
22
|
+
textDecorationLine?: string;
|
|
23
|
+
}
|
|
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 {
|
|
28
|
+
text: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function renderPlainTextSegments(root: LayoutNode): PlainTextSegment[][];
|
|
31
|
+
//# 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;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"}
|
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,CAmMX;AA4OD;;;uCAGuC;AACvC,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAKR;AAiMD;;;;;;;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;IA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EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IACvC,SAAS,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;CACxC;AAyID,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAkBD;;;gDAGgD;AAChD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,cAAc,GACpB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAS9B;AAED;;wDAEwD;AACxD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,cAAc,GACpB,MAAM,CAmCR;AAKD,wBAAgB,WAAW,CACzB,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,cAAc,GACpB,MAAM,CA8NR"}
|
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":"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"}
|
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,37 @@ 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
|
+
/** A collapsed table participant's authored border, moved out of
|
|
210
|
+
* `CellStyle.border` at read time (`border-collapse` inherits, so every
|
|
211
|
+
* internal element knows): geometry and painting then treat the element
|
|
212
|
+
* as borderless, and the table's lattice consumes this instead
|
|
213
|
+
* (specs/table.md). */
|
|
214
|
+
export interface LatticeBorder {
|
|
215
|
+
width: Insets;
|
|
216
|
+
style: PerSide<BorderStyle>;
|
|
217
|
+
color: PerSide<string | undefined>;
|
|
218
|
+
/** `border-style: hidden` (`border-hidden`): suppresses the shared
|
|
219
|
+
* segment outright, beating any neighbor — its computed width is 0, so
|
|
220
|
+
* the flag must ride separately (CSS 2.1 §17.6.2.1). */
|
|
221
|
+
hidden: PerSide<boolean>;
|
|
222
|
+
}
|
|
187
223
|
/** One value per box edge (border style, border color, …). */
|
|
188
224
|
export interface PerSide<T> {
|
|
189
225
|
top: T;
|
|
@@ -274,7 +310,7 @@ export interface CellStyle {
|
|
|
274
310
|
* floor((letter-spacing − root letter-spacing) ÷ 0.025em)). */
|
|
275
311
|
tracking: number;
|
|
276
312
|
/** Paint-only: with `nowrap` + clipping, the browser draws the ellipsis.
|
|
277
|
-
* The engine only needs it for the
|
|
313
|
+
* The engine only needs it for the plain-text renderer's mirror of that. */
|
|
278
314
|
textOverflow: TextOverflow;
|
|
279
315
|
/**
|
|
280
316
|
* Paint-only colors, reserved for the visual-system milestone. `color` will
|
|
@@ -285,9 +321,45 @@ export interface CellStyle {
|
|
|
285
321
|
*/
|
|
286
322
|
color: string | undefined;
|
|
287
323
|
backgroundColor: string | undefined;
|
|
324
|
+
/** Paint-only text styling, passed through to the browser and
|
|
325
|
+
* mirrored per-segment by the plain-text mode's spans. */
|
|
326
|
+
fontWeight: string;
|
|
327
|
+
fontStyle: string;
|
|
328
|
+
textDecorationLine: string;
|
|
288
329
|
/** True when text-align is center/justify — forced back to `start` since
|
|
289
330
|
* per-line centering can't be snapped to whole cells. See cell-model spec. */
|
|
290
331
|
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";
|
|
336
|
+
tableRole: TableRole;
|
|
337
|
+
tableLayout: "auto" | "fixed";
|
|
338
|
+
/** True for `border-collapse: collapse` (Tailwind preflight's default
|
|
339
|
+
* on `<table>`): cell borders merge into the shared lattice. */
|
|
340
|
+
borderCollapse: boolean;
|
|
341
|
+
/** `border-spacing`, quantized per axis; separate borders only. */
|
|
342
|
+
borderSpacingX: number;
|
|
343
|
+
borderSpacingY: number;
|
|
344
|
+
captionSide: "top" | "bottom";
|
|
345
|
+
/** Computed `vertical-align` normalized (the companion's baseline
|
|
346
|
+
* lock is measuring-gated, so the read sees the authored/UA value).
|
|
347
|
+
* Consumed by table cells (`td`/`th` default to the UA's `middle`;
|
|
348
|
+
* `baseline` behaves as `start`) and by atomic inline boxes, where
|
|
349
|
+
* only `end` (bottom) acts — it drops the line's text to the box's
|
|
350
|
+
* last row (specs/cell-model.md). */
|
|
351
|
+
verticalAlign: "start" | "center" | "end";
|
|
352
|
+
/** Authored `z-index` (`null` = auto). Browser stacking is native;
|
|
353
|
+
* the renderers walk children in this order (stable, document-order
|
|
354
|
+
* ties) so decorations and plain text agree with it at overlaps. */
|
|
355
|
+
zIndex: number | null;
|
|
356
|
+
/** Set on collapsed-table participants; null everywhere else. */
|
|
357
|
+
latticeBorder: LatticeBorder | null;
|
|
358
|
+
/** Gap rules on flex/grid containers (specs/gap-decorations.md);
|
|
359
|
+
* null when unauthored. The used gap in a ruled axis floors at the
|
|
360
|
+
* rule width (deviation: rules take layout space — ink needs cells). */
|
|
361
|
+
ruleX: GapRule | null;
|
|
362
|
+
ruleY: GapRule | null;
|
|
291
363
|
}
|
|
292
364
|
export interface LayoutNode {
|
|
293
365
|
source: Element;
|
|
@@ -341,7 +413,18 @@ export interface LayoutNode {
|
|
|
341
413
|
padLeft: number;
|
|
342
414
|
padRight: number;
|
|
343
415
|
insets: PerSide<number | null> | null;
|
|
416
|
+
/** Paint-only text styling for the plain-text mode (the browser
|
|
417
|
+
* renders the real element). */
|
|
418
|
+
color: string | undefined;
|
|
419
|
+
fontWeight: string;
|
|
420
|
+
fontStyle: string;
|
|
421
|
+
textDecorationLine: string;
|
|
344
422
|
}[];
|
|
423
|
+
/** Per-character index into `inlineElements` (-1 = direct leaf text);
|
|
424
|
+
* present only when the run contains inline elements. Plain-text
|
|
425
|
+
* rendering maps colors, font styling, and relative inset shifts from
|
|
426
|
+
* it. */
|
|
427
|
+
charInline?: number[];
|
|
345
428
|
/** True on an atomic inline-level box (`inline-flex`/`inline-block`/
|
|
346
429
|
* `inline-grid`) riding its parent leaf's text run as a single
|
|
347
430
|
* unbreakable unit: the leaf's run holds an OBJECT REPLACEMENT
|
|
@@ -369,10 +452,24 @@ export interface LayoutNode {
|
|
|
369
452
|
* hides that text and warns instead of letting the browser paint it
|
|
370
453
|
* unpositioned. */
|
|
371
454
|
droppedText?: boolean;
|
|
455
|
+
/** Engine-generated glyph runs in this node's local coordinates
|
|
456
|
+
* (offset by its absolute position at paint time). Today: a collapsed
|
|
457
|
+
* table's border lattice; future producers (css-gaps rules,
|
|
458
|
+
* specs/gap-decorations.md) plug in here with no renderer changes. */
|
|
459
|
+
decorationRuns?: BorderRun[];
|
|
460
|
+
/** True on a node the table pass removed from rendering: misparented
|
|
461
|
+
* table content (no anonymous boxes — specs/table.md) and `<col>`/
|
|
462
|
+
* `<colgroup>` boxes (width carriers, never rendered). */
|
|
463
|
+
tableHidden?: boolean;
|
|
372
464
|
/** Outer height before min/max clamping — written by layoutNode; the
|
|
373
465
|
* column flex algorithm's base main size (CSS distributes from unclamped
|
|
374
466
|
* bases; limits apply via its freeze loop). */
|
|
375
467
|
unclampedHeight: number;
|
|
468
|
+
/** Content-derived outer height, before explicit-height/min-height
|
|
469
|
+
* flooring — written by layoutNode. Table cells align their content
|
|
470
|
+
* against this: an explicit cell height tallens the box (and floors
|
|
471
|
+
* the row), but `vertical-align` centers the CONTENT, per CSS. */
|
|
472
|
+
naturalContentHeight?: number;
|
|
376
473
|
/** Padding with percentages resolved to cells — written by layoutNode
|
|
377
474
|
* (percent resolves against the containing block width, which only
|
|
378
475
|
* 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,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,CAAC,E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AqE5C;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,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,MAAM,EAAE,CAE1F;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,MAAM,CAE5F;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,EAAE,CAUtD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,QAAQ,EAAE,CAahG;AAED,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAKjF;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,SAAI,GAAG,MAAM,CAGjG;AAMD;2CAC2C;AAC3C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,MAAM,CASrF;AAED;;;;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.
|
|
3
|
+
"version": "0.1.4",
|
|
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.11.15",
|
|
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
|
}
|
package/src/styles.css
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* ENGINE owns (geometry, typography locking, alignment/overflow enforcement)
|
|
9
9
|
* stay unlayered with `!important` so no utility can push content off-grid. */
|
|
10
10
|
|
|
11
|
+
/* Gap-decoration utilities + engine mirrors (specs/gap-decorations.md).
|
|
12
|
+
* Must precede all rules, per @import syntax. */
|
|
13
|
+
@import "./rules.css";
|
|
14
|
+
|
|
11
15
|
@layer base {
|
|
12
16
|
mono-wind {
|
|
13
17
|
display: block;
|
|
@@ -23,6 +27,14 @@
|
|
|
23
27
|
--mw-focus-color: currentColor;
|
|
24
28
|
}
|
|
25
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;
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
/* Normalize native form controls so they don't borrow browser chrome that
|
|
27
39
|
* would break the grid. Padding, margin, border-width, and box-sizing are
|
|
28
40
|
* handled by the engine-owned rules below. In `base` so utilities
|
|
@@ -61,7 +73,6 @@ mono-wind:not([data-mw-ready]) {
|
|
|
61
73
|
mono-wind * {
|
|
62
74
|
font-family: inherit !important;
|
|
63
75
|
font-size: inherit !important;
|
|
64
|
-
vertical-align: baseline !important;
|
|
65
76
|
}
|
|
66
77
|
|
|
67
78
|
/* Grid-template read assist (specs/grid.md), no-Typed-OM engines only
|
|
@@ -88,6 +99,9 @@ mono-wind[measuring] [data-mw-degrid] {
|
|
|
88
99
|
* laid-out ancestor (which sets the row multiple below) — `leading-*` on
|
|
89
100
|
* inline elements is ignored by design. */
|
|
90
101
|
mono-wind:not([measuring]) * {
|
|
102
|
+
/* Baseline-shift lock (cell-model): gated like the rest, so the style
|
|
103
|
+
* reader sees the authored/UA vertical-align (table cells read it). */
|
|
104
|
+
vertical-align: baseline !important;
|
|
91
105
|
white-space: normal !important;
|
|
92
106
|
overflow-wrap: anywhere !important;
|
|
93
107
|
letter-spacing: calc(var(--mw-rls, 0px) + var(--mw-ls) * var(--mw-cw, 1px)) !important;
|
|
@@ -203,6 +217,16 @@ mono-wind:not([measuring]) [data-mw-inline-box] {
|
|
|
203
217
|
max-width: none !important;
|
|
204
218
|
max-height: none !important;
|
|
205
219
|
border-width: 0 !important;
|
|
220
|
+
/* Gap rules are engine-painted glyphs (specs/gap-decorations.md);
|
|
221
|
+
* css-gaps browsers must not also paint their native (fractional)
|
|
222
|
+
* rules — e.g. between an emptied grid's explicit tracks. */
|
|
223
|
+
column-rule-style: none !important;
|
|
224
|
+
row-rule-style: none !important;
|
|
225
|
+
/* Authored z-index applies only where CSS says (positioned, flex/grid
|
|
226
|
+
* items) — absolutization would otherwise activate it everywhere. The
|
|
227
|
+
* engine writes --mw-z in exactly those cases; without it the calc()
|
|
228
|
+
* is invalid at computed-value time and z-index falls back to auto. */
|
|
229
|
+
z-index: calc(var(--mw-z)) !important;
|
|
206
230
|
padding-top: calc((var(--mw-pt, 0) + var(--mw-bt, 0)) * var(--mw-ch, 1px)) !important;
|
|
207
231
|
padding-right: calc(
|
|
208
232
|
max(0, var(--mw-pr, 0) + var(--mw-br, 0) - var(--mw-ls, 0)) * var(--mw-cw, 1px)
|
|
@@ -226,6 +250,14 @@ mono-wind:not([measuring]) [data-mw-inline-box] {
|
|
|
226
250
|
vertical-align: top !important;
|
|
227
251
|
}
|
|
228
252
|
|
|
253
|
+
/* Authored `vertical-align: bottom` on an atomic inline box: grid-exact
|
|
254
|
+
* in every engine (probed), so it passes through; the engine drops the
|
|
255
|
+
* line's text to the box's last row to match. middle/baseline are
|
|
256
|
+
* off-grid and behave as top (cell-model deviation). */
|
|
257
|
+
mono-wind:not([measuring]) [data-mw-inline-box][data-mw-vbottom] {
|
|
258
|
+
vertical-align: bottom !important;
|
|
259
|
+
}
|
|
260
|
+
|
|
229
261
|
/* Author-requested `overflow: hidden` or `overflow: clip` — both keep
|
|
230
262
|
* content inside the engine-allocated box. Uses `clip` (no scroll
|
|
231
263
|
* container, cheaper, more precise semantic for what we're doing). */
|
|
@@ -264,9 +296,15 @@ mono-wind:not([measuring]) [data-mw-dropped-text] > [data-mw-laid-out] {
|
|
|
264
296
|
visibility: visible !important;
|
|
265
297
|
}
|
|
266
298
|
|
|
299
|
+
/* Misparented table content (no anonymous boxes, specs/table.md) and
|
|
300
|
+
* <col>/<colgroup> boxes: fully hidden, subtree included. */
|
|
301
|
+
mono-wind:not([measuring]) [data-mw-table-hidden] {
|
|
302
|
+
display: none !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
267
305
|
/* Force off-grid text alignments back to `start`. `text-left`/`right`/`start`/
|
|
268
306
|
* `end` all land on whole cells (offset = (W - N) × cell width); `center` and
|
|
269
307
|
* `justify` produce fractional per-line offsets we can't snap to the grid. */
|
|
270
|
-
mono-wind [data-mw-text-align-blocked] {
|
|
308
|
+
mono-wind:not([measuring]) [data-mw-text-align-blocked] {
|
|
271
309
|
text-align: start !important;
|
|
272
310
|
}
|
package/dist/ascii.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { LayoutNode } from "./types.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Render a laid-out tree as plain-text ASCII art: borders as box-drawing
|
|
4
|
-
* glyphs, leaf text word-wrapped inside its content box, everything else as
|
|
5
|
-
* 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 renderAscii(root: LayoutNode): string;
|
|
16
|
-
//# sourceMappingURL=ascii.d.ts.map
|
package/dist/ascii.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii.d.ts","sourceRoot":"","sources":["../src/ascii.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAepD"}
|