monowind 0.2.13 → 0.3.0
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/animate.d.ts.map +1 -1
- package/dist/animation.d.ts +40 -0
- package/dist/animation.d.ts.map +1 -0
- package/dist/cdn.js +741 -571
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts +13 -0
- package/dist/element.d.ts.map +1 -1
- package/dist/flex.d.ts.map +1 -1
- package/dist/index.js +7286 -6322
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +24 -6
- package/dist/layout.d.ts.map +1 -1
- package/dist/leaf.d.ts +0 -7
- package/dist/leaf.d.ts.map +1 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/observed.d.ts +5 -0
- package/dist/observed.d.ts.map +1 -0
- package/dist/paint.d.ts +34 -0
- package/dist/paint.d.ts.map +1 -1
- package/dist/plain-text.d.ts +45 -7
- package/dist/plain-text.d.ts.map +1 -1
- package/dist/pointer.d.ts +4 -1
- package/dist/pointer.d.ts.map +1 -1
- package/dist/positioning.d.ts +9 -2
- package/dist/positioning.d.ts.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/sticky.d.ts +4 -2
- package/dist/sticky.d.ts.map +1 -1
- package/dist/style.d.ts +18 -5
- package/dist/style.d.ts.map +1 -1
- package/dist/top-layer.d.ts +25 -0
- package/dist/top-layer.d.ts.map +1 -0
- package/dist/tree.d.ts.map +1 -1
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/styles.css +659 -501
package/dist/layout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LineSpan } from "./wrap.ts";
|
|
2
2
|
import type { TableData } from "./table.ts";
|
|
3
3
|
import type { FloatBox } from "./floats.ts";
|
|
4
|
-
import type { CellLength, CellStyle, LayoutNode, LineBand, NullableInsets, PerSide, Size, SizeLimit } from "./types.ts";
|
|
4
|
+
import type { CellLength, CellStyle, Insets, LayoutNode, LineBand, NullableInsets, PerSide, Size, SizeLimit } from "./types.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Core layout: the per-node sizing pipeline, block flow, and the shared
|
|
7
7
|
* sizing/intrinsic machinery. Flex lives in flex.ts, the positioning pass
|
|
@@ -14,7 +14,7 @@ import type { CellLength, CellStyle, LayoutNode, LineBand, NullableInsets, PerSi
|
|
|
14
14
|
* Layout entry point: mutates localRect on the root and each descendant.
|
|
15
15
|
* Coordinates are parent-relative (root's rect is at 0,0).
|
|
16
16
|
*/
|
|
17
|
-
export declare function layoutRoot(root: LayoutNode, availableWidth: number): {
|
|
17
|
+
export declare function layoutRoot(root: LayoutNode, availableWidth: number, syncScroll?: (root: LayoutNode) => void): {
|
|
18
18
|
height: number;
|
|
19
19
|
};
|
|
20
20
|
/** absolute / fixed boxes are out of normal flow. */
|
|
@@ -82,6 +82,19 @@ export declare function leafLineGeometry(node: LayoutNode, contentWidth: number,
|
|
|
82
82
|
totalRows: number;
|
|
83
83
|
bands: LineBand[] | undefined;
|
|
84
84
|
};
|
|
85
|
+
/** Where a leaf's line starts in its content box, for the paint and the
|
|
86
|
+
* inline-box placement alike (specs/cell-model.md "Text alignment"):
|
|
87
|
+
* the width it aligns in (its band's beside floats; its column's less
|
|
88
|
+
* the trailing letter-spacing gap in multicol, which the browser's own
|
|
89
|
+
* alignment includes; else the content's), its indent (the first line's
|
|
90
|
+
* alone: a `<br>` re-indents nothing, per CSS), and its `x` — the
|
|
91
|
+
* column's and the band's edge, the indent, and the `text-align`
|
|
92
|
+
* offset, whole cells. */
|
|
93
|
+
export declare function lineStart(node: LayoutNode, index: number, span: LineSpan, contentWidth: number): {
|
|
94
|
+
width: number;
|
|
95
|
+
indent: number;
|
|
96
|
+
x: number;
|
|
97
|
+
};
|
|
85
98
|
type LineOpener = (index: number, closed: readonly LineSpan[]) => number;
|
|
86
99
|
/** A leaf's line spans: hard `<br>` lines under nowrap/pre, greedy
|
|
87
100
|
* word-wrap at the content width otherwise — each line opened through
|
|
@@ -92,10 +105,12 @@ export declare function leafLineSpans(node: LayoutNode, contentWidth: number, op
|
|
|
92
105
|
* row tall unless an atomic inline box on the line is taller — the line
|
|
93
106
|
* grows to the tallest box (per CSS line-box growth). `vertical-align:
|
|
94
107
|
* bottom` on a box drops the line's TEXT to the box's last row
|
|
95
|
-
* (grid-exact in every engine, probed);
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
108
|
+
* (grid-exact in every engine, probed); a middle-aligned box puts it on
|
|
109
|
+
* the box's middle row, the lower of two for an even height; the
|
|
110
|
+
* largest offset wins. top/baseline behave as top (cell-model
|
|
111
|
+
* deviation — baseline is off-grid). Each box records its line's text
|
|
112
|
+
* row for its native placement. Requires the leaf's inline boxes to be
|
|
113
|
+
* laid out already (their rect heights are read here).
|
|
99
114
|
*/
|
|
100
115
|
export declare function leafLineMetrics(node: LayoutNode, spans: readonly LineSpan[]): {
|
|
101
116
|
heights: number[];
|
|
@@ -105,6 +120,9 @@ export declare function leafLineMetrics(node: LayoutNode, spans: readonly LineSp
|
|
|
105
120
|
* width (specs/gap-decorations.md deviation 1 — rules take layout
|
|
106
121
|
* space, so `rule` alone behaves as `gap-1 rule`). */
|
|
107
122
|
export declare function resolveGap(style: CellStyle, axis: "x" | "y", basis: number | undefined): number;
|
|
123
|
+
/** A box's border and padding on an axis, which its size never goes
|
|
124
|
+
* below (specs/cell-model.md "Box model"). */
|
|
125
|
+
export declare function edges(border: Insets, padding: Insets, axis: "x" | "y"): number;
|
|
108
126
|
/** Resolve a spacing length to cells against its containing-block basis.
|
|
109
127
|
* An indefinite basis (percent gap in an unbounded axis) resolves to 0. */
|
|
110
128
|
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,KAA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F"}
|
package/dist/leaf.d.ts
CHANGED
|
@@ -46,10 +46,6 @@ export interface LeafRegistration {
|
|
|
46
46
|
* also run under happy-dom/Node — `renderPlainText` traverses the
|
|
47
47
|
* same tree. */
|
|
48
48
|
render: (el: Element) => LeafContent;
|
|
49
|
-
/** Attributes whose changes re-render this leaf (merged into the
|
|
50
|
-
* host's mutation-observer filter; `class`/`style` and character
|
|
51
|
-
* data are always observed). */
|
|
52
|
-
observedAttributes?: string[];
|
|
53
49
|
/** The node whose contents a semantic gesture ON the leaf selects
|
|
54
50
|
* (specs/semantic-selection.md) — a shadow transcript that sits
|
|
55
51
|
* under the art, say. Absent: the leaf's light contents. */
|
|
@@ -65,9 +61,6 @@ export declare function registerLeafRenderer(registration: LeafRegistration): vo
|
|
|
65
61
|
* registering, …). Coalesced per frame by the hosts themselves. */
|
|
66
62
|
export declare function invalidateLeaves(): void;
|
|
67
63
|
export declare function leafRendererFor(tagName: string): LeafRegistration | undefined;
|
|
68
|
-
/** The union of every registration's observed attributes — the host
|
|
69
|
-
* extends its MutationObserver filter with these. */
|
|
70
|
-
export declare function leafObservedAttributes(): string[];
|
|
71
64
|
/** Host subscription to registry changes (registration or
|
|
72
65
|
* invalidation); returns the unsubscriber. Internal to the engine. */
|
|
73
66
|
export declare function onLeafRegistryChange(listener: () => void): () => void;
|
package/dist/leaf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leaf.d.ts","sourceRoot":"","sources":["../src/leaf.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH;;;wDAGwD;AACxD,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;oBACoB;AACpB,MAAM,WAAW,OAA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AAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;CAChD;AAKD;;;aAGa;AACb,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAezE;AAED;;mEAEmE;AACnE,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAE7E;AAED;sEACsE;AACtE,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGrE;AAED;wEACwE;AACxE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CAOzF"}
|
package/dist/metrics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED;;;;;;;;cAQc;AACd,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED;;;;;;;;cAQc;AACd,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,CAiCrF;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Whether a change to the attribute can change what the grid shows: a
|
|
2
|
+
* rendering attribute, any `data-*` but the engine's `data-mw-*` marks,
|
|
3
|
+
* or any attribute of a leaf, which its renderer reads. */
|
|
4
|
+
export declare function rendersAttribute(element: Element, name: string): boolean;
|
|
5
|
+
//# sourceMappingURL=observed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observed.d.ts","sourceRoot":"","sources":["../src/observed.ts"],"names":[],"mappings":"AAyEA;;2DAE2D;AAC3D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxE"}
|
package/dist/paint.d.ts
CHANGED
|
@@ -9,11 +9,45 @@ export interface PaintOptions {
|
|
|
9
9
|
glyphs?: PaintGlyphs;
|
|
10
10
|
selection?: RenderOptions["selection"];
|
|
11
11
|
cell?: RenderOptions["cell"];
|
|
12
|
+
/** Where the layers' nodes go (specs/layers.md): a positioned box
|
|
13
|
+
* at the grid's origin. */
|
|
14
|
+
layers?: HTMLElement;
|
|
15
|
+
/** False leaves every layer's box as placed, for a caller that
|
|
16
|
+
* places them once the light elements settle (`syncLayers`). */
|
|
17
|
+
placeLayers?: boolean;
|
|
12
18
|
}
|
|
13
19
|
/** Returns false when the paint was HELD: the caller asked to defer
|
|
14
20
|
* structural rebuilds (a primary press is down) and a selection
|
|
15
21
|
* anchor is in the grid — repeat the paint on release. */
|
|
16
22
|
export declare function paintGrid(root: LayoutNode, target: HTMLElement, options?: PaintOptions): boolean;
|
|
23
|
+
/** Every layer's box placed again from its root's computed effects,
|
|
24
|
+
* for a transition of one of them (specs/layers.md "Animation is
|
|
25
|
+
* sampled"): the copy alone, the cells as they are. */
|
|
26
|
+
export declare function syncLayers(container: HTMLElement): void;
|
|
27
|
+
/** A cell with the grid it is painted in — a layer's, at `x`, `y` of
|
|
28
|
+
* the main grid, or the main grid itself at 0, 0 — in main-grid
|
|
29
|
+
* cells. */
|
|
30
|
+
export interface CellHit {
|
|
31
|
+
col: number;
|
|
32
|
+
row: number;
|
|
33
|
+
grid: HTMLElement;
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}
|
|
37
|
+
/** The cell of a layer under the pointer (specs/layers.md): `x`, `y`
|
|
38
|
+
* in px from the grid's origin, taken through the layers' transforms
|
|
39
|
+
* — the one painted last first — to the cell of the layer's grid it
|
|
40
|
+
* lands on; null over none — a layer's blank cell past its root's
|
|
41
|
+
* border box (a shadow's, an overflowing child's), a cell covered by
|
|
42
|
+
* later ink, and a cell past the layer's clip are see-through. */
|
|
43
|
+
export declare function layerAt(container: HTMLElement, x: number, y: number): CellHit | null;
|
|
44
|
+
/** The grid of the layer painted last over a cell, in main-grid
|
|
45
|
+
* cells, with its origin; null off every layer. */
|
|
46
|
+
export declare function layerGridAt(container: HTMLElement, col: number, row: number): {
|
|
47
|
+
grid: HTMLElement;
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
} | null;
|
|
17
51
|
/** The painted cell strings, for callers walking the grid by cell. */
|
|
18
52
|
export declare function paintedCell(target: HTMLElement, col: number, row: number): string | undefined;
|
|
19
53
|
/** The grid's flat text offset of a cell (cell-model.md "Selection"):
|
package/dist/paint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../src/paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"paint.d.ts","sourceRoot":"","sources":["../src/paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAUjD,OAAO,KAAK,EAAwC,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3F,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,YAAY,CAAC;AAqCvD,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,OAAO,CAAC,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B;+BAC2B;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;oEACgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAQD;;0DAE0D;AAC1D,wBAAgB,SAAS,CACvB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAiBT;AAmCD;;uDAEuD;AACvD,wBAAgB,UAAU,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAGvD;AAED;;YAEY;AACZ,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAAW,CAAC;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;kEAKkE;AAClE,wBAAgB,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAsBpF;AAED;mDACmD;AACnD,wBAAgB,WAAW,CACzB,SAAS,EAAE,WAAW,EACtB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAepD;AAiVD,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE7F;AAqED;;0DAE0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAUlF"}
|
package/dist/plain-text.d.ts
CHANGED
|
@@ -79,11 +79,42 @@ export interface RenderOptions {
|
|
|
79
79
|
* paints[y])` — the DOM adapter (paint.ts) uses this, and tests
|
|
80
80
|
* assert paint fields against it. */
|
|
81
81
|
export declare function renderCellSegments(root: LayoutNode, options?: RenderOptions): CellSegment[][];
|
|
82
|
+
/** A layer (specs/layers.md): a layer root's subtree painted into a
|
|
83
|
+
* grid of its own — its cells' extent, the root's border box grown by
|
|
84
|
+
* what overflows it, at `x`, `y` of the main grid — in the order the
|
|
85
|
+
* walk opened it, `parent` the layer it opened inside. */
|
|
86
|
+
export interface PaintedLayer {
|
|
87
|
+
node: LayoutNode;
|
|
88
|
+
/** The root's border box, in main-grid cells. */
|
|
89
|
+
box: Rect;
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
width: number;
|
|
93
|
+
height: number;
|
|
94
|
+
grid: string[][];
|
|
95
|
+
paints: (CellPaint | undefined)[][];
|
|
96
|
+
/** The cells the ink painted after the layer covers, as `row × width
|
|
97
|
+
* + col`: blank in the grid, see-through for the pointer. */
|
|
98
|
+
holes: Set<number>;
|
|
99
|
+
/** The clips between the layer's root and the enclosing layer's (the
|
|
100
|
+
* grid's edge at the top), intersected, in main-grid cells, for the
|
|
101
|
+
* box the browser clips the transformed layer to; null unclipped.
|
|
102
|
+
* The clips above are the enclosing layer's. */
|
|
103
|
+
clip: Clip | null;
|
|
104
|
+
parent: PaintedLayer | null;
|
|
105
|
+
}
|
|
106
|
+
/** A layer's rows of segments, with the layer they were built from. */
|
|
107
|
+
export interface LayerRows {
|
|
108
|
+
layer: PaintedLayer;
|
|
109
|
+
segments: CellSegment[][];
|
|
110
|
+
}
|
|
82
111
|
/** The segments plus the cell strings they were built from — the cell ↔
|
|
83
|
-
* code-unit map a row needs once a cluster spans cells or code units
|
|
112
|
+
* code-unit map a row needs once a cluster spans cells or code units —
|
|
113
|
+
* and the layers' likewise, each apart from the main grid. */
|
|
84
114
|
export declare function renderGridRows(root: LayoutNode, options?: RenderOptions): {
|
|
85
115
|
segments: CellSegment[][];
|
|
86
116
|
cells: string[][];
|
|
117
|
+
layers: LayerRows[];
|
|
87
118
|
};
|
|
88
119
|
export declare function samePaint(a: CellPaint, b: CellPaint | undefined): boolean;
|
|
89
120
|
/** Apply a `CellPaint` to a `CSSStyleDeclaration`. Kept in this file
|
|
@@ -93,17 +124,24 @@ export declare function applyCellPaint(paint: CellPaint, style: CSSStyleDeclarat
|
|
|
93
124
|
/** True when a segment carries no paint — the DOM adapter emits a bare
|
|
94
125
|
* text node for these instead of an empty <span>. */
|
|
95
126
|
export declare function isBarePaint(paint: CellPaint): boolean;
|
|
127
|
+
/** The cells the ancestors' overflow leaves visible (specs/scrolling.md):
|
|
128
|
+
* their clips intersected; null where nothing clips. */
|
|
129
|
+
export type Clip = {
|
|
130
|
+
x0: number;
|
|
131
|
+
y0: number;
|
|
132
|
+
x1: number;
|
|
133
|
+
y1: number;
|
|
134
|
+
};
|
|
135
|
+
export declare const inClip: (clip: Clip | null, x: number, y: number) => boolean;
|
|
136
|
+
/** Whether a main-grid cell of a layer lies inside its clip and every
|
|
137
|
+
* enclosing layer's. */
|
|
138
|
+
export declare function layerShows(layer: PaintedLayer, x: number, y: number): boolean;
|
|
96
139
|
/** The cells a clipping container's content shows through, in
|
|
97
140
|
* absolute cells (specs/scrolling.md): its padding box on each
|
|
98
141
|
* clipping axis, the gutter excluded, unbounded on a visible axis;
|
|
99
142
|
* null for a container clipping neither. The paint culls ink here and
|
|
100
143
|
* hit-testing stops descending here. */
|
|
101
|
-
export declare function clipBounds(node: LayoutNode, absX: number, absY: number):
|
|
102
|
-
x0: number;
|
|
103
|
-
y0: number;
|
|
104
|
-
x1: number;
|
|
105
|
-
y1: number;
|
|
106
|
-
} | null;
|
|
144
|
+
export declare function clipBounds(node: LayoutNode, absX: number, absY: number): Clip | null;
|
|
107
145
|
/** Whether a cell lies on one of a fragmented leaf's line boxes — the
|
|
108
146
|
* hit test for paragraph-flow multicol children, whose `localRect` is
|
|
109
147
|
* the shared container box (specs/multicol.md): each line covers its
|
package/dist/plain-text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-text.d.ts","sourceRoot":"","sources":["../src/plain-text.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C,OAAO,KAAK,EAAU,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG3D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;;;uEAGuE;AACvE,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;sEACkE;IAClE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC;;;+BAG2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC;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IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;wEAIwE;AACxE,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAM7B"}
|
package/dist/pointer.d.ts
CHANGED
|
@@ -23,7 +23,10 @@ export declare function hitRect(node: LayoutNode, x: number, y: number): Rect;
|
|
|
23
23
|
* attribute does too. Overlapping siblings resolve to the TOPMOST in
|
|
24
24
|
* paint order (z-index, document-order ties), matching what the grid
|
|
25
25
|
* shows at that cell; the descent stops where a clipping container's
|
|
26
|
-
* paint does.
|
|
26
|
+
* paint does, a fixed box hit from the host's origin past it. The
|
|
27
|
+
* top-layer stack is tried first, from the top (specs/top-layer.md):
|
|
28
|
+
* a hit in it is the element's ancestors, then the element and its
|
|
29
|
+
* own descent. */
|
|
27
30
|
export declare function hitStack(root: LayoutNode, col: number, row: number): HitEntry[];
|
|
28
31
|
/** Inside an `inert` subtree: absent for user interaction, as natively
|
|
29
32
|
* — no hover, no wheel routing, no thumb drag, no focus, no text
|
package/dist/pointer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../src/pointer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;GAMG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB;4CACwC;IACxC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;wEAEwE;AACxE,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC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D;AACtD,wBAAiB,YAAY,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,SAAS,CAAC;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;CAAE,CAAC,CAWrE"}
|
package/dist/positioning.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { IntrinsicCache } from "./layout.ts";
|
|
2
|
-
import type { LayoutNode } from "./types.ts";
|
|
2
|
+
import type { LayoutNode, Rect } from "./types.ts";
|
|
3
3
|
interface Frame {
|
|
4
4
|
node: LayoutNode;
|
|
5
5
|
absX: number;
|
|
6
6
|
absY: number;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** An anchor as the boxes after it see it: its border box in the
|
|
9
|
+
* host's cells as laid out, and the scroll containers above it, whose
|
|
10
|
+
* offsets move it (specs/anchor-positioning.md). */
|
|
11
|
+
interface Anchor {
|
|
12
|
+
rect: Rect;
|
|
13
|
+
scrollers: LayoutNode[];
|
|
14
|
+
}
|
|
15
|
+
export declare function walkPositioned(node: LayoutNode, absX: number, absY: number, ancestors: Frame[], cache: IntrinsicCache, anchors?: Map<string, Anchor>): void;
|
|
9
16
|
export {};
|
|
10
17
|
//# sourceMappingURL=positioning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positioning.d.ts","sourceRoot":"","sources":["../src/positioning.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"positioning.d.ts","sourceRoot":"","sources":["../src/positioning.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAIV,UAAU,EAGV,IAAI,EACL,MAAM,YAAY,CAAC;AAoBpB,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;oDAEoD;AACpD,UAAU,MAAM;IACd,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,UAAU,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,KAAK,EAAE,EAClB,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,GACvC,IAAI,CA4CN"}
|
package/dist/render.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAY,UAAU,EAAyB,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAY7C;AAkID;;uEAEuE;AACvE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAiCvD"}
|
package/dist/sticky.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ export interface Span {
|
|
|
19
19
|
* inside its block — none of the shift toward a side the box already
|
|
20
20
|
* crosses. Insets in cells, `null` for `auto`. */
|
|
21
21
|
export declare function stickyShiftAxis(box: Span, block: Span, view: Span, startInset: number | null, endInset: number | null): number;
|
|
22
|
-
/** A sticky box,
|
|
23
|
-
*
|
|
22
|
+
/** A sticky box, a leaf holding sticky inline elements, or a fixed box
|
|
23
|
+
* off the top-layer stack — whose light element takes its ancestors'
|
|
24
|
+
* scroll back (render.ts) — with its ancestors from the root down,
|
|
25
|
+
* gathered once per layout. */
|
|
24
26
|
export interface StickyBox {
|
|
25
27
|
node: LayoutNode;
|
|
26
28
|
ancestors: LayoutNode[];
|
package/dist/sticky.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky.d.ts","sourceRoot":"","sources":["../src/sticky.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAc,UAAU,EAAgB,MAAM,YAAY,CAAC;AAEvE,6DAA6D;AAC7D,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;kDAIkD;AAClD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,CASR;AAED;
|
|
1
|
+
{"version":3,"file":"sticky.d.ts","sourceRoot":"","sources":["../src/sticky.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAc,UAAU,EAAgB,MAAM,YAAY,CAAC;AAEvE,6DAA6D;AAC7D,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;kDAIkD;AAClD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,IAAI,EACT,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,CASR;AAED;;;+BAG+B;AAC/B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,UAAU,EAAE,CAAC;CACzB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,EAAE,CAWhE;AAiBD;sDACsD;AACtD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAE1D"}
|
package/dist/style.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Overflow, CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate } from "./types.ts";
|
|
1
|
+
import type { Overflow, CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate, AnchorFallback, PositionArea } from "./types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Read the interpreted CellStyle for an element from its computed CSS.
|
|
4
4
|
*
|
|
@@ -11,10 +11,19 @@ import type { Overflow, CellMetrics, CellStyle, GridAreas, GridLine, GridTemplat
|
|
|
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
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
14
|
+
/** An element's `anchor-name`s; an invoker of a popover
|
|
15
|
+
* (`popovertarget`, `commandfor`) named for its target where the
|
|
16
|
+
* author names it not. */
|
|
17
|
+
export declare function readAnchorNames(el: Element, cs: CSSStyleDeclaration): string[];
|
|
18
|
+
/** A computed `position-area` as the engines serialize it — one keyword
|
|
19
|
+
* where the other axis spans all, or an ambiguous one for both axes —
|
|
20
|
+
* mapped for a horizontal left-to-right host; null for none. */
|
|
21
|
+
export declare function parsePositionArea(value: string): PositionArea | null;
|
|
22
|
+
/** A computed `position-try-fallbacks`: a list of tactics, each the flip
|
|
23
|
+
* keywords applied together, or an area of its own. */
|
|
24
|
+
export declare function parsePositionTryFallbacks(value: string): AnchorFallback[];
|
|
25
|
+
/** A computed color that paints nothing: one of alpha zero in any
|
|
26
|
+
* form, or the empty string and `currentcolor` happy-dom leaves
|
|
18
27
|
* unresolved. */
|
|
19
28
|
export declare function isTransparentColor(value: string): boolean;
|
|
20
29
|
/** Per-axis overflow (specs/scrolling.md). Longhands read first (the
|
|
@@ -37,6 +46,10 @@ export declare function trackingCells(letterSpacing: string, fontSizePx: number,
|
|
|
37
46
|
* cell-height ≠ 1em (default `line-height: normal` on the root makes
|
|
38
47
|
* the cell ~1.15em). */
|
|
39
48
|
export declare function lineGapRows(lineHeight: string, fontSizePx: number): number;
|
|
49
|
+
/** The paint-only properties a frame of an animation resamples onto a
|
|
50
|
+
* node (specs/animations.md): live on the light element, read off the
|
|
51
|
+
* node by the walk. */
|
|
52
|
+
export declare function readPaintStyle(cs: CSSStyleDeclaration): Pick<CellStyle, "color" | "opacity" | "borderColor">;
|
|
40
53
|
/**
|
|
41
54
|
* Parse a computed `grid-template-columns` / `grid-template-rows` value
|
|
42
55
|
* (specs/grid.md). Expected on a NON-grid element (see the degrid read in
|
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":"AAWA,OAAO,KAAK,EAEV,QAAQ,EAWR,WAAW,EACX,SAAS,EAMT,SAAS,EAET,QAAQ,EACR,YAAY,EAWZ,cAAc,EAEd,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,SAAS,CAyRX;AA+CD;;0BAE0B;AAC1B,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,mBAAmB,GAAG,MAAM,EAAE,C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,GAAG,QAAQ,CA0BrD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The top layer (specs/top-layer.md): which light elements are in it
|
|
3
|
+
* and in what order, kept per host from the toggle events it sees and
|
|
4
|
+
* assigned onto each layout's tree as the order the stack paints and
|
|
5
|
+
* hit-tests in.
|
|
6
|
+
*/
|
|
7
|
+
import type { LayoutNode } from "./types.ts";
|
|
8
|
+
/** Whether `el` is in the platform's top layer: an open popover or a
|
|
9
|
+
* modal dialog, the only candidates asked. A headless DOM without the
|
|
10
|
+
* pseudo-classes throws: none there. */
|
|
11
|
+
export declare function isTopLayer(el: Element): boolean;
|
|
12
|
+
/** A host's top-layer stack: its elements in the order they entered
|
|
13
|
+
* the top layer. */
|
|
14
|
+
export declare class TopLayer {
|
|
15
|
+
#private;
|
|
16
|
+
/** An element's entry, from its toggle; one already ranked keeps its
|
|
17
|
+
* place. */
|
|
18
|
+
enter(el: Element): void;
|
|
19
|
+
/** The stack onto a laid-out tree: its top-layer nodes ranked — an
|
|
20
|
+
* element found open without a record enters here, in tree order —
|
|
21
|
+
* and listed on the root in stack order with their ancestors; an
|
|
22
|
+
* element the tree no longer holds leaves. */
|
|
23
|
+
assign(root: LayoutNode): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=top-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-layer.d.ts","sourceRoot":"","sources":["../src/top-layer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,YAAY,CAAC;AAE5D;;wCAEwC;AACxC,wBAAgB,UAAU,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAO/C;AAED;oBACoB;AACpB,qBAAa,QAAQ;;IAInB;gBACY;IACZ,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAEvB;IAED;;;kDAG8C;IAC9C,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAyB7B;CACF"}
|
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":"AAwBA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAiB,UAAU,EAAW,MAAM,YAAY,CAAC;AAE7F;;;;4DAI4D;AAC5D,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;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,CAsCnB;AAED;;;;;;;8BAO8B;AAC9B,wBAAgB,aAAa,CAC3B,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,SAAS,EAAE,EAClB,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,cAAc,CAAC,EAAE,cAAc,EAC/B,QAAQ,CAAC,EAAE,SAAS,GACnB,UAAU,EAAE,CA2Cd;AAuBD;;;qCAGqC;AACrC,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,cAAc,CAAC,EAAE,cAAc,GAC9B,UAAU,GAAG,IAAI,CAWnB;AAED;;kDAEkD;AAClD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,SAAS,CAEX;AAirBD;8DAC8D;AAC9D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -150,6 +150,14 @@ interface GradientBase {
|
|
|
150
150
|
stops: GradientStop[];
|
|
151
151
|
}
|
|
152
152
|
export type BackgroundClip = "border-box" | "padding-box" | "content-box" | "text";
|
|
153
|
+
/** A layer root's `backdrop-filter` as computed (specs/layers.md): the
|
|
154
|
+
* companion locks it on the light element, whose backdrop would take
|
|
155
|
+
* in the layer's own cells, so the layer's box takes it from here —
|
|
156
|
+
* the root's other effects from the element's computed style, as the
|
|
157
|
+
* box is placed. */
|
|
158
|
+
export interface Layer {
|
|
159
|
+
backdropFilter: string;
|
|
160
|
+
}
|
|
153
161
|
/** A `background-image` layer the grid paints as a color per cell. */
|
|
154
162
|
export type Gradient = (GradientBase & {
|
|
155
163
|
kind: "linear";
|
|
@@ -589,6 +597,28 @@ export interface CellStyle {
|
|
|
589
597
|
* page — translucency blends with what's behind the host, never with
|
|
590
598
|
* covered cells (deviation; front paint wins a cell as always). */
|
|
591
599
|
opacity: number;
|
|
600
|
+
/** Set on a layer root — an element with a transform or a filter —
|
|
601
|
+
* whose subtree paints into its own node (specs/layers.md). */
|
|
602
|
+
layer: Layer | null;
|
|
603
|
+
/** Anchor positioning (specs/anchor-positioning.md): the element's
|
|
604
|
+
* `anchor-name`s (an invoker's is synthesized from its target's id),
|
|
605
|
+
* the name it is anchored to (a popover's implicit anchor from its
|
|
606
|
+
* own id), the area it takes, the fallbacks tried on overflow, and
|
|
607
|
+
* the axes `justify-self`/`align-self` center on the anchor. */
|
|
608
|
+
anchorNames: string[];
|
|
609
|
+
positionAnchor: string | null;
|
|
610
|
+
positionArea: PositionArea | null;
|
|
611
|
+
positionTryFallbacks: AnchorFallback[];
|
|
612
|
+
anchorCenter: {
|
|
613
|
+
x: boolean;
|
|
614
|
+
y: boolean;
|
|
615
|
+
};
|
|
616
|
+
/** In the platform's top layer — an open popover, a modal dialog —
|
|
617
|
+
* for the host's stack (specs/top-layer.md). */
|
|
618
|
+
topLayer: boolean;
|
|
619
|
+
/** The `::backdrop`'s look, for the box the browser draws under a
|
|
620
|
+
* top-layer element (specs/top-layer.md); null for none. */
|
|
621
|
+
backdrop: Backdrop | null;
|
|
592
622
|
/** The border glyph SET name from `--mw-border-glyphs` (`null` =
|
|
593
623
|
* default) — the theming vocabulary borders/lattices/rules resolve
|
|
594
624
|
* through (specs/theming.md); resolved on the decoration's owner. */
|
|
@@ -629,6 +659,35 @@ export interface CellStyle {
|
|
|
629
659
|
* fragments as one unbreakable unit (specs/multicol.md). */
|
|
630
660
|
breakInsideAvoid: boolean;
|
|
631
661
|
}
|
|
662
|
+
/** One axis of a `position-area`, in the axis's own direction: the
|
|
663
|
+
* cell before the anchor, the anchor's own, the cell after, a span of
|
|
664
|
+
* the anchor's with one side, or the whole containing block
|
|
665
|
+
* (specs/anchor-positioning.md). */
|
|
666
|
+
export type AreaSide = "start" | "center" | "end" | "span-start" | "span-end" | "span-all";
|
|
667
|
+
/** A `position-area`, physical: `x` across, `y` down. */
|
|
668
|
+
export interface PositionArea {
|
|
669
|
+
x: AreaSide;
|
|
670
|
+
y: AreaSide;
|
|
671
|
+
}
|
|
672
|
+
/** One entry of `position-try-fallbacks`: the flip tactics applied
|
|
673
|
+
* together, or an area of its own. */
|
|
674
|
+
export type AnchorFallback = {
|
|
675
|
+
flipBlock: boolean;
|
|
676
|
+
flipInline: boolean;
|
|
677
|
+
flipStart: boolean;
|
|
678
|
+
} | PositionArea;
|
|
679
|
+
/** A `::backdrop`'s computed look, as the backdrop box copies it. */
|
|
680
|
+
export interface Backdrop {
|
|
681
|
+
backgroundColor: string;
|
|
682
|
+
backgroundImage: string;
|
|
683
|
+
backdropFilter: string;
|
|
684
|
+
opacity: string;
|
|
685
|
+
}
|
|
686
|
+
/** A top-layer element's node with its ancestors from the root down. */
|
|
687
|
+
export interface TopLayerEntry {
|
|
688
|
+
node: LayoutNode;
|
|
689
|
+
ancestors: LayoutNode[];
|
|
690
|
+
}
|
|
632
691
|
export interface LayoutNode {
|
|
633
692
|
source: Element;
|
|
634
693
|
style: CellStyle;
|
|
@@ -691,6 +750,9 @@ export interface LayoutNode {
|
|
|
691
750
|
x: number;
|
|
692
751
|
y: number;
|
|
693
752
|
};
|
|
753
|
+
/** Its `anchor-name`s, for the boxes anchored to it
|
|
754
|
+
* (specs/anchor-positioning.md). */
|
|
755
|
+
anchorNames: string[];
|
|
694
756
|
/** Paint-only styling mirrored into the grid (the browser's own
|
|
695
757
|
* ink is transparent-locked). `backgroundColor` fills the run's
|
|
696
758
|
* cells — how a focus-inverted inline link shows its highlight. */
|
|
@@ -794,6 +856,34 @@ export interface LayoutNode {
|
|
|
794
856
|
x: number;
|
|
795
857
|
y: number;
|
|
796
858
|
};
|
|
859
|
+
/** A text leaf's last line's row from its border-box top: the
|
|
860
|
+
* baseline its box aligns by natively, for a middle-aligned inline
|
|
861
|
+
* box's placement (specs/cell-model.md "Typography"). */
|
|
862
|
+
baselineRow?: number;
|
|
863
|
+
/** An inline box's line's text row, from the box's top, as the line
|
|
864
|
+
* metrics settled it (specs/cell-model.md "Typography"). */
|
|
865
|
+
inlineTextRow?: number;
|
|
866
|
+
/** The area an anchored box took, its fallbacks tried
|
|
867
|
+
* (specs/anchor-positioning.md); written onto the light element. */
|
|
868
|
+
anchorArea?: PositionArea;
|
|
869
|
+
/** A fixed box's origin in the host's cells (specs/positioning.md),
|
|
870
|
+
* written by the positioning pass: the walks paint and hit it from
|
|
871
|
+
* here, outside its ancestors' scroll and clips. */
|
|
872
|
+
hostRect?: {
|
|
873
|
+
x: number;
|
|
874
|
+
y: number;
|
|
875
|
+
};
|
|
876
|
+
/** The box's place in the host's top-layer stack
|
|
877
|
+
* (specs/top-layer.md), assigned per layout: the walks skip it in
|
|
878
|
+
* place and take it after the tree, in this order. */
|
|
879
|
+
topLayerRank?: number;
|
|
880
|
+
/** The root's top-layer stack in paint order, each element with its
|
|
881
|
+
* ancestors from the root down; absent when empty. */
|
|
882
|
+
topLayer?: TopLayerEntry[];
|
|
883
|
+
/** On the root: the scroll containers whose scroll moves an anchor
|
|
884
|
+
* under a box it does not move (specs/anchor-positioning.md), so a
|
|
885
|
+
* scroll of one relays out. */
|
|
886
|
+
anchorScrollers?: Set<Element>;
|
|
797
887
|
/** The gutter cells this container actually reserved — `scroll`
|
|
798
888
|
* axes always, `auto` axes only when content overflows (the layout
|
|
799
889
|
* second pass). Paint, hit-testing, and thumb drags read THIS, not
|
|
@@ -883,6 +973,10 @@ export interface CellMetrics {
|
|
|
883
973
|
* strip an inline span's background leaves bare at each row's edge.
|
|
884
974
|
* The grid's spans pad by half of it (the host's `--mw-bgpad`). */
|
|
885
975
|
backgroundGap?: number;
|
|
976
|
+
/** The text baseline's offset within a row, in px: a middle-aligned
|
|
977
|
+
* inline box with a bottom-edge baseline is lowered from it (the
|
|
978
|
+
* host's `--mw-base`). */
|
|
979
|
+
baseline?: number;
|
|
886
980
|
}
|
|
887
981
|
export declare function defaultCellStyle(): CellStyle;
|
|
888
982
|
export declare function zeroInsets(): Insets;
|