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/borders.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { CellStyle, Rect } from "./types.ts";
|
|
2
|
-
|
|
3
|
-
export interface BorderRun {
|
|
4
|
-
glyph: string;
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
length: number;
|
|
8
|
-
color: string | undefined;
|
|
9
|
-
}
|
|
1
|
+
import type { RuleBreak, RuleVisibilityItems, BorderRun, BorderStyle, CellStyle, GapRule, Insets, LayoutNode, PerSide, Rect } from "./types.ts";
|
|
2
|
+
export type { BorderRun } from "./types.ts";
|
|
10
3
|
/**
|
|
11
4
|
* Emit runs of border glyphs for the box's engine-allocated border cells.
|
|
12
5
|
*
|
|
@@ -18,4 +11,80 @@ export interface BorderRun {
|
|
|
18
11
|
* only vertical/horizontal runs and skip corners that would overlap.
|
|
19
12
|
*/
|
|
20
13
|
export declare function collectBorderRuns(style: CellStyle, box: Rect, out: BorderRun[]): void;
|
|
14
|
+
/** Where CSS applies `z-index`: positioned elements and flex/grid
|
|
15
|
+
* items; inert on static block-flow children. */
|
|
16
|
+
export declare function zIndexApplies(child: LayoutNode, parent: LayoutNode): boolean;
|
|
17
|
+
/** Children in paint order (CSS 2.1 Appendix E, no floats or stacking
|
|
18
|
+
* contexts — negative z still paints over the parent): non-positioned
|
|
19
|
+
* block, then non-positioned inline, then positioned (asc z-index).
|
|
20
|
+
* Stable within a bucket, so DOM order breaks ties. Bucketed instead
|
|
21
|
+
* of full-sorted so the common case (single bucket, no z-index) is
|
|
22
|
+
* allocation-free. */
|
|
23
|
+
export declare function paintOrderedChildren(node: LayoutNode): LayoutNode[];
|
|
24
|
+
/** A style's straight line glyph, for lattice segments. */
|
|
25
|
+
export declare function lineGlyph(style: BorderStyle, axis: "h" | "v"): string;
|
|
26
|
+
/** Junction glyph for a lattice intersection, from which of the four
|
|
27
|
+
* arms exist. `double` has a full junction set; dashed/dotted (and mixed
|
|
28
|
+
* styles, decided by the caller) use the light set — the corner
|
|
29
|
+
* convention (specs/cell-model.md). Stubs (≤1 arm) fall back to plain
|
|
30
|
+
* line glyphs. */
|
|
31
|
+
export declare function junctionGlyph(style: BorderStyle, up: boolean, down: boolean, left: boolean, right: boolean): string;
|
|
32
|
+
/** One gap band a rule may occupy: `bandStart`/`bandSize` across the
|
|
33
|
+
* band's axis (x for a vertical rule), `start`/`end` along it. All in
|
|
34
|
+
* content-box cells. A `half` endpoint is an overlap-join extension
|
|
35
|
+
* tip: its ink reaches only the end cell's centerline, so meeting
|
|
36
|
+
* rules connect there (`┘`) instead of crossing past each other. */
|
|
37
|
+
export interface RuleSegment {
|
|
38
|
+
bandStart: number;
|
|
39
|
+
bandSize: number;
|
|
40
|
+
start: number;
|
|
41
|
+
end: number;
|
|
42
|
+
startHalf?: boolean;
|
|
43
|
+
endHalf?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** One cross-axis strip of a gap band: the cells beside a crossing
|
|
46
|
+
* track, `[start, end)` along the band, with what borders it. */
|
|
47
|
+
export interface GapStrip {
|
|
48
|
+
start: number;
|
|
49
|
+
end: number;
|
|
50
|
+
/** An item spans ACROSS the gap here — the gap doesn't exist. */
|
|
51
|
+
spanned: boolean;
|
|
52
|
+
/** The cells on either side of the gap hold items. */
|
|
53
|
+
beforeOccupied: boolean;
|
|
54
|
+
afterOccupied: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface GapSegment {
|
|
57
|
+
start: number;
|
|
58
|
+
end: number;
|
|
59
|
+
startHalf?: boolean;
|
|
60
|
+
endHalf?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Split one gap band into painted segments (specs/gap-decorations.md
|
|
64
|
+
* "Segments", probed in Chromium 151): track strips kept per spanning
|
|
65
|
+
* occupancy and rule-visibility-items, crossing-gap strips joined per
|
|
66
|
+
* rule-break, contiguous runs merged, endpoints retracted by the inset.
|
|
67
|
+
*/
|
|
68
|
+
export declare function ruleBandSegments(strips: GapStrip[], ruleBreak: RuleBreak, visibility: RuleVisibilityItems, inset: number | "overlap-join"): GapSegment[];
|
|
69
|
+
export interface GapRuleContext {
|
|
70
|
+
ruleX: GapRule | null;
|
|
71
|
+
ruleY: GapRule | null;
|
|
72
|
+
/** Column-gap bands (vertical lines) and row-gap bands (horizontal). */
|
|
73
|
+
vertical: RuleSegment[];
|
|
74
|
+
horizontal: RuleSegment[];
|
|
75
|
+
contentWidth: number;
|
|
76
|
+
contentHeight: number;
|
|
77
|
+
border: Insets;
|
|
78
|
+
borderStyle: PerSide<BorderStyle>;
|
|
79
|
+
borderColor: PerSide<string | undefined>;
|
|
80
|
+
padding: Insets;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Paint gap rules as node-local glyph runs: each rule centers in its
|
|
84
|
+
* band (floor on the leading side), crossings get junction glyphs from
|
|
85
|
+
* their arms, and a rule that reaches the content edge through zero
|
|
86
|
+
* padding tees into the container's innermost border ring. Mixed styles
|
|
87
|
+
* fall back to the light set; all-double crossings use the double set.
|
|
88
|
+
*/
|
|
89
|
+
export declare function collectGapRuleRuns(ctx: GapRuleContext): BorderRun[];
|
|
21
90
|
//# sourceMappingURL=borders.d.ts.map
|
package/dist/borders.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../src/borders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../src/borders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,UAAU,EACV,OAAO,EACP,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAkB5C;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,CAoBrF;AA+FD;iDACiD;AACjD,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAM5E;AAED;;;;;sBAKsB;AACtB,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,CAi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,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,EAAE,CAgFnE"}
|
package/dist/cdn.d.ts
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* One classic script tag, no build step. Bundles:
|
|
7
7
|
* - `@tailwindcss/browser` (compiles Tailwind classes in the browser at
|
|
8
8
|
* runtime, watching the DOM),
|
|
9
|
-
* - the monowind companion stylesheet (injected into <head>)
|
|
9
|
+
* - the monowind companion stylesheet (injected into <head>) and the
|
|
10
|
+
* rule-* utilities as Tailwind source for the in-browser compiler,
|
|
10
11
|
* - the engine, with <mono-wind> registered immediately.
|
|
11
12
|
*/
|
|
12
13
|
import "@tailwindcss/browser";
|
package/dist/cdn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdn.d.ts","sourceRoot":"","sources":["../src/cdn.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cdn.d.ts","sourceRoot":"","sources":["../src/cdn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,sBAAsB,CAAC"}
|