monowind 0.1.3 → 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/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 { 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,51 @@ 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: stable-sorted by effective z-index,
|
|
18
|
+
* document order breaking ties — mirrored by both renderers so
|
|
19
|
+
* decorations and plain text agree with browser stacking at overlaps (a
|
|
20
|
+
* simplified model: no stacking contexts, negative z still paints over
|
|
21
|
+
* the parent's own glyphs). */
|
|
22
|
+
export declare function paintOrderedChildren(node: LayoutNode): LayoutNode[];
|
|
23
|
+
/** A style's straight line glyph, for lattice segments. */
|
|
24
|
+
export declare function lineGlyph(style: BorderStyle, axis: "h" | "v"): string;
|
|
25
|
+
/** Junction glyph for a lattice intersection, from which of the four
|
|
26
|
+
* arms exist. `double` has a full junction set; dashed/dotted (and mixed
|
|
27
|
+
* styles, decided by the caller) use the light set — the corner
|
|
28
|
+
* convention (specs/cell-model.md). Stubs (≤1 arm) fall back to plain
|
|
29
|
+
* line glyphs. */
|
|
30
|
+
export declare function junctionGlyph(style: BorderStyle, up: boolean, down: boolean, left: boolean, right: boolean): string;
|
|
31
|
+
/** One gap band a rule may occupy: `bandStart`/`bandSize` across the
|
|
32
|
+
* band's axis (x for a vertical rule), `start`/`end` along it. All in
|
|
33
|
+
* content-box cells. */
|
|
34
|
+
export interface RuleSegment {
|
|
35
|
+
bandStart: number;
|
|
36
|
+
bandSize: number;
|
|
37
|
+
start: number;
|
|
38
|
+
end: number;
|
|
39
|
+
}
|
|
40
|
+
export interface GapRuleContext {
|
|
41
|
+
ruleX: GapRule | null;
|
|
42
|
+
ruleY: GapRule | null;
|
|
43
|
+
/** Column-gap bands (vertical lines) and row-gap bands (horizontal). */
|
|
44
|
+
vertical: RuleSegment[];
|
|
45
|
+
horizontal: RuleSegment[];
|
|
46
|
+
contentWidth: number;
|
|
47
|
+
contentHeight: number;
|
|
48
|
+
border: Insets;
|
|
49
|
+
borderStyle: PerSide<BorderStyle>;
|
|
50
|
+
borderColor: PerSide<string | undefined>;
|
|
51
|
+
padding: Insets;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Paint gap rules as node-local glyph runs: each rule centers in its
|
|
55
|
+
* band (floor on the leading side), crossings get junction glyphs from
|
|
56
|
+
* their arms, and a rule that reaches the content edge through zero
|
|
57
|
+
* padding tees into the container's innermost border ring. Mixed styles
|
|
58
|
+
* fall back to the light set; all-double crossings use the double set.
|
|
59
|
+
*/
|
|
60
|
+
export declare function collectGapRuleRuns(ctx: GapRuleContext): BorderRun[];
|
|
21
61
|
//# 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,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;AAMD;;;;+BAI+B;AAC/B,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,CAEnE;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAGrE;AAED;;;;kBAIkB;AAClB,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,GACb,MAAM,CAGR;AAgED;;wBAEwB;AACxB,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,wEAAwE;IACxE,QAAQ,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,CAqEnE"}
|
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"}
|