monowind 0.2.9 → 0.2.11

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":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AA6LA,QAAA,MAAM,eAAe,EAEhB,OAAO,WAAW,CAAC;AAExB,qBAAa,eAAgB,SAAQ,eAAe;;IAClD,MAAM,CAAC,kBAAkB,WAAuB;IA6HhD,cAsBC;IAkBD,iBAAiB,IAAI,IAAI,CAmGxB;IAED,oBAAoB,IAAI,IAAI,CAyC3B;IA+iCD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CA+B1F;IAED;;;;0DAIsD;IACtD,WAAW,IAAI,MAAM,CAIpB;CAyQF;AAED;+DAC+D;AAC/D,wBAAgB,cAAc,IAAI,IAAI,CAIrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF;AAyDD;;;;;;;;;yDASyD;AACzD,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAMR"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAkOA,QAAA,MAAM,eAAe,EAEhB,OAAO,WAAW,CAAC;AAExB,qBAAa,eAAgB,SAAQ,eAAe;;IAClD,MAAM,CAAC,kBAAkB,WAAuB;IA4IhD,cAsBC;IAkBD,iBAAiB,IAAI,IAAI,CAoGxB;IAED,oBAAoB,IAAI,IAAI,CA4C3B;IA0oCD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CA+B1F;IAED;;;;0DAIsD;IACtD,WAAW,IAAI,MAAM,CAIpB;CA8QF;AAED;+DAC+D;AAC/D,wBAAgB,cAAc,IAAI,IAAI,CAIrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF;AAyDD;;;;;;;;;yDASyD;AACzD,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAMR"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Float geometry (specs/float.md): the exclusion rectangles a block
3
+ * container's floats reserve, and the queries block layout makes of
4
+ * them — the usable span for a line box, where the next float lands,
5
+ * and how far `clear` pushes a box down. Pure rect math in the
6
+ * container's CONTENT-box cells; placement and native flow live in
7
+ * layout.ts.
8
+ */
9
+ export interface FloatBox {
10
+ /** Margin box, in the container's content-box cells. */
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ side: "left" | "right";
16
+ }
17
+ /** The horizontal span left for a line box of `height` rows at row `y`:
18
+ * past the left floats it overlaps, short of the right ones. */
19
+ export declare function bandAt(boxes: FloatBox[], contentWidth: number, y: number, height?: number): {
20
+ x: number;
21
+ width: number;
22
+ };
23
+ /** Where a float of this margin-box size lands (CSS 2.1 §9.5.1): the
24
+ * first fit from the flow cursor, never above an earlier float's top. */
25
+ export declare function placeFloat(boxes: FloatBox[], contentWidth: number, side: "left" | "right", top: number, width: number, height: number): {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ /** The first row from `top` whose band holds a box of this margin-box
30
+ * size — that row, else the first float bottom below it that does —
31
+ * and the box's x at the band's `side`. A box wider than every band
32
+ * starts at the last candidate's edge and overflows, per CSS. */
33
+ export declare function firstFit(boxes: FloatBox[], contentWidth: number, side: "left" | "right", top: number, width: number, height: number): {
34
+ x: number;
35
+ y: number;
36
+ };
37
+ /** The row a `clear` box starts at: below the margin boxes of the floats
38
+ * it names, when they reach past the flow cursor. */
39
+ export declare function clearanceBelow(boxes: FloatBox[], clear: "none" | "left" | "right" | "both", y: number): number;
40
+ /** The lowest float bottom, or zero: a container contains its floats
41
+ * (specs/float.md), so its content height reaches here. */
42
+ export declare function floatsBottom(boxes: FloatBox[]): number;
43
+ //# sourceMappingURL=floats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floats.d.ts","sourceRoot":"","sources":["../src/floats.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,QAAQ;IACvB,wDAAwD;IACxD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;gEACgE;AAChE,wBAAgB,MAAM,CACpB,KAAK,EAAE,QAAQ,EAAE,EACjB,YAAY,EAAE,MAAM,EACpB,CAAC,EAAE,MAAM,EACT,MAAM,SAAI,GACT;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAS9B;AAED;yEACyE;AACzE,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,EAAE,EACjB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,GAAG,OAAO,EACtB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAI1B;AAED;;;iEAGiE;AACjE,wBAAgB,QAAQ,CACtB,KAAK,EAAE,QAAQ,EAAE,EACjB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,GAAG,OAAO,EACtB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAU1B;AAED;qDACqD;AACrD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,EAAE,EACjB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EACzC,CAAC,EAAE,MAAM,GACR,MAAM,CAQR;AAED;2DAC2D;AAC3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,CAEtD"}
@@ -20,6 +20,13 @@ export interface GlyphBox {
20
20
  /** The vertical period of a shade's lattice at that scale, in px
21
21
  * (set for shades only). */
22
22
  period?: number;
23
+ /** How far the glyph's content area — what a browser's selection
24
+ * highlight covers — reaches past the box above and below, in px
25
+ * (set with `period`). */
26
+ reach?: {
27
+ above: number;
28
+ below: number;
29
+ };
23
30
  }
24
31
  /** Where the baseline of `glyph` lands, in px from the top of a box a
25
32
  * row tall with that `font-size` factor and `line-height`. */
@@ -48,9 +55,11 @@ export declare class GlyphBoxes {
48
55
  * and at least the row's height). Nothing is cached while fonts are
49
56
  * still loading. */
50
57
  box(cluster: string, cells: number, paint?: CellPaint): GlyphBox | null;
51
- /** How far down a shade's lattice sits in `row` so that it carries
52
- * on from the row above: what remains of the period after the rows
53
- * above it. */
58
+ /** How far a shade's lattice moves in `row` so that it carries on
59
+ * from the row above: down by the phase, or up by the rest of the
60
+ * period when down would carry the glyph's content area off the
61
+ * box's top and up keeps it past the bottom — a selection highlight
62
+ * covers the content area, and the move must not bare the box. */
54
63
  shift(box: GlyphBox, row: number): number;
55
64
  }
56
65
  //# sourceMappingURL=glyph-box.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glyph-box.d.ts","sourceRoot":"","sources":["../src/glyph-box.ts"],"names":[],"mappings":"AAAA,O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