@react-x11/components 0.12.0 → 0.14.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/html/controls.d.ts +41 -5
- package/dist/html/controls.d.ts.map +1 -1
- package/dist/html/controls.js +85 -57
- package/dist/html/controls.js.map +1 -1
- package/dist/html/css/cascade.d.ts +134 -20
- package/dist/html/css/cascade.d.ts.map +1 -1
- package/dist/html/css/cascade.js +545 -126
- package/dist/html/css/cascade.js.map +1 -1
- package/dist/html/css/color.d.ts +18 -0
- package/dist/html/css/color.d.ts.map +1 -1
- package/dist/html/css/color.js +27 -0
- package/dist/html/css/color.js.map +1 -1
- package/dist/html/css/parse.d.ts +47 -6
- package/dist/html/css/parse.d.ts.map +1 -1
- package/dist/html/css/parse.js +336 -30
- package/dist/html/css/parse.js.map +1 -1
- package/dist/html/css/style.d.ts +142 -15
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +563 -147
- package/dist/html/css/style.js.map +1 -1
- package/dist/html/css/transform.d.ts +85 -0
- package/dist/html/css/transform.d.ts.map +1 -0
- package/dist/html/css/transform.js +425 -0
- package/dist/html/css/transform.js.map +1 -0
- package/dist/html/css/ua.d.ts +11 -1
- package/dist/html/css/ua.d.ts.map +1 -1
- package/dist/html/css/ua.js +73 -9
- package/dist/html/css/ua.js.map +1 -1
- package/dist/html/css/values.d.ts +4 -0
- package/dist/html/css/values.d.ts.map +1 -1
- package/dist/html/css/values.js.map +1 -1
- package/dist/html/dom.d.ts.map +1 -1
- package/dist/html/dom.js +3 -1
- package/dist/html/dom.js.map +1 -1
- package/dist/html/fonts.d.ts +78 -4
- package/dist/html/fonts.d.ts.map +1 -1
- package/dist/html/fonts.js +373 -19
- package/dist/html/fonts.js.map +1 -1
- package/dist/html/form.d.ts +200 -0
- package/dist/html/form.d.ts.map +1 -0
- package/dist/html/form.js +801 -0
- package/dist/html/form.js.map +1 -0
- package/dist/html/index.d.ts +12 -0
- package/dist/html/index.d.ts.map +1 -1
- package/dist/html/index.js +30 -301
- package/dist/html/index.js.map +1 -1
- package/dist/html/layout/axes.d.ts +14 -0
- package/dist/html/layout/axes.d.ts.map +1 -0
- package/dist/html/layout/axes.js +28 -0
- package/dist/html/layout/axes.js.map +1 -0
- package/dist/html/layout/block.d.ts +93 -12
- package/dist/html/layout/block.d.ts.map +1 -1
- package/dist/html/layout/block.js +393 -39
- package/dist/html/layout/block.js.map +1 -1
- package/dist/html/layout/boxes.d.ts +90 -2
- package/dist/html/layout/boxes.d.ts.map +1 -1
- package/dist/html/layout/boxes.js +74 -10
- package/dist/html/layout/boxes.js.map +1 -1
- package/dist/html/layout/cache.d.ts +1 -1
- package/dist/html/layout/cache.d.ts.map +1 -1
- package/dist/html/layout/cache.js +6 -0
- package/dist/html/layout/cache.js.map +1 -1
- package/dist/html/layout/css-grid.d.ts.map +1 -1
- package/dist/html/layout/css-grid.js +90 -18
- package/dist/html/layout/css-grid.js.map +1 -1
- package/dist/html/layout/flex.d.ts.map +1 -1
- package/dist/html/layout/flex.js +574 -84
- package/dist/html/layout/flex.js.map +1 -1
- package/dist/html/layout/inline.d.ts +3 -0
- package/dist/html/layout/inline.d.ts.map +1 -1
- package/dist/html/layout/inline.js +154 -54
- package/dist/html/layout/inline.js.map +1 -1
- package/dist/html/layout/multicol.d.ts +42 -0
- package/dist/html/layout/multicol.d.ts.map +1 -0
- package/dist/html/layout/multicol.js +897 -0
- package/dist/html/layout/multicol.js.map +1 -0
- package/dist/html/layout/shaping.d.ts +7 -0
- package/dist/html/layout/shaping.d.ts.map +1 -1
- package/dist/html/layout/shaping.js +25 -20
- package/dist/html/layout/shaping.js.map +1 -1
- package/dist/html/layout/table.d.ts.map +1 -1
- package/dist/html/layout/table.js +62 -18
- package/dist/html/layout/table.js.map +1 -1
- package/dist/html/node.d.ts +90 -15
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +771 -186
- package/dist/html/node.js.map +1 -1
- package/dist/html/paint.d.ts +101 -5
- package/dist/html/paint.d.ts.map +1 -1
- package/dist/html/paint.js +1502 -160
- package/dist/html/paint.js.map +1 -1
- package/dist/html/svg.d.ts +15 -2
- package/dist/html/svg.d.ts.map +1 -1
- package/dist/html/svg.js +249 -17
- package/dist/html/svg.js.map +1 -1
- package/dist/html/widgets.d.ts +29 -0
- package/dist/html/widgets.d.ts.map +1 -0
- package/dist/html/widgets.js +700 -0
- package/dist/html/widgets.js.map +1 -0
- package/dist/html/woff2.d.ts +14 -0
- package/dist/html/woff2.d.ts.map +1 -0
- package/dist/html/woff2.js +608 -0
- package/dist/html/woff2.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/maps/controller.d.ts +17 -1
- package/dist/maps/controller.d.ts.map +1 -1
- package/dist/maps/controller.js +27 -7
- package/dist/maps/controller.js.map +1 -1
- package/dist/richtext/node.d.ts +8 -1
- package/dist/richtext/node.d.ts.map +1 -1
- package/dist/richtext/node.js +5 -1
- package/dist/richtext/node.js.map +1 -1
- package/dist/richtext/runs.d.ts +25 -6
- package/dist/richtext/runs.d.ts.map +1 -1
- package/dist/richtext/runs.js +240 -24
- package/dist/richtext/runs.js.map +1 -1
- package/package.json +2 -2
- package/src/html/controls.ts +114 -51
- package/src/html/css/cascade.ts +614 -140
- package/src/html/css/color.ts +29 -0
- package/src/html/css/parse.ts +388 -33
- package/src/html/css/style.ts +688 -150
- package/src/html/css/transform.ts +459 -0
- package/src/html/css/ua.ts +77 -10
- package/src/html/css/values.ts +4 -0
- package/src/html/dom.ts +3 -1
- package/src/html/fonts.ts +417 -24
- package/src/html/form.ts +962 -0
- package/src/html/index.ts +49 -338
- package/src/html/layout/axes.ts +62 -0
- package/src/html/layout/block.ts +447 -37
- package/src/html/layout/boxes.ts +143 -14
- package/src/html/layout/cache.ts +6 -0
- package/src/html/layout/css-grid.ts +95 -22
- package/src/html/layout/flex.ts +675 -78
- package/src/html/layout/inline.ts +159 -55
- package/src/html/layout/multicol.ts +977 -0
- package/src/html/layout/shaping.ts +27 -18
- package/src/html/layout/table.ts +62 -19
- package/src/html/node.ts +798 -172
- package/src/html/paint.ts +1742 -241
- package/src/html/svg.ts +277 -19
- package/src/html/widgets.ts +821 -0
- package/src/html/woff2.ts +612 -0
- package/src/index.ts +1 -0
- package/src/maps/controller.ts +28 -7
- package/src/richtext/node.ts +13 -2
- package/src/richtext/runs.ts +313 -35
package/dist/html/controls.d.ts
CHANGED
|
@@ -21,6 +21,14 @@ export interface ControlRect {
|
|
|
21
21
|
y: number;
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
24
|
+
/**
|
|
25
|
+
* The element's computed face and size: what `measureControl` measured
|
|
26
|
+
* its box in, and so what the widget sets its text in. The palette's,
|
|
27
|
+
* from the UA sheet, unless the page set its own — `font: inherit`, which
|
|
28
|
+
* a CSS reset gives every control, for one.
|
|
29
|
+
*/
|
|
30
|
+
fontFamily: string;
|
|
31
|
+
fontSize: number;
|
|
24
32
|
/**
|
|
25
33
|
* Set on a text field or a `<select>` whose own box the author styled —
|
|
26
34
|
* gave it a border or a background (`styledField`). The document draws
|
|
@@ -37,6 +45,23 @@ export interface ControlRect {
|
|
|
37
45
|
* invisible, over its label.
|
|
38
46
|
*/
|
|
39
47
|
opacity?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The part of the document the element shows through, where that is not
|
|
50
|
+
* all of its box: what its own `clip` and `clip-path` leave of it, and
|
|
51
|
+
* what the boxes that clip their overflow around it, and every
|
|
52
|
+
* `clip-path` above it, do (`clipAround`). The widget is cut to it, as
|
|
53
|
+
* the element's own drawing is. With no area, none of the element shows
|
|
54
|
+
* — a control a page hides for a screen reader alone, 1px square under
|
|
55
|
+
* `clip: rect(0, 0, 0, 0)` or `clip-path: inset(50%)`, beside the one it
|
|
56
|
+
* draws itself — and the widget is not seen and takes no press, and
|
|
57
|
+
* still takes the keyboard's focus, as the element does in a browser.
|
|
58
|
+
*/
|
|
59
|
+
clip?: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
};
|
|
40
65
|
}
|
|
41
66
|
/** Where a styled field's widget goes, and how its text looks. */
|
|
42
67
|
export interface BareField {
|
|
@@ -45,7 +70,9 @@ export interface BareField {
|
|
|
45
70
|
width: number;
|
|
46
71
|
height: number;
|
|
47
72
|
color: string;
|
|
73
|
+
/** @deprecated The rect's own `fontFamily`, which every rect carries. */
|
|
48
74
|
fontFamily: string;
|
|
75
|
+
/** @deprecated The rect's own `fontSize`, which every rect carries. */
|
|
49
76
|
fontSize: number;
|
|
50
77
|
/**
|
|
51
78
|
* A `<select>`'s: whether it draws its arrow. It does unless the page set
|
|
@@ -54,8 +81,17 @@ export interface BareField {
|
|
|
54
81
|
*/
|
|
55
82
|
chevron?: boolean;
|
|
56
83
|
}
|
|
57
|
-
/** The rectangles every control in a laid-out document landed on.
|
|
58
|
-
|
|
84
|
+
/** The rectangles every control in a laid-out document landed on. `scale`
|
|
85
|
+
* is the document's device pixels to a CSS one. */
|
|
86
|
+
export declare function controlRectsOf(tree: BoxTree, scale?: number): ControlRect[];
|
|
87
|
+
type Rect = {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
};
|
|
93
|
+
/** What two rectangles share, of no area where they share nothing. */
|
|
94
|
+
export declare function between(a: Rect, b: Rect): Rect;
|
|
59
95
|
/**
|
|
60
96
|
* Whether a field's box is the author's to draw: one given a border or a
|
|
61
97
|
* background of its own, which the UA sheet gives no control, or set to
|
|
@@ -91,8 +127,8 @@ export declare function optionsOf(el: Element): {
|
|
|
91
127
|
value: string;
|
|
92
128
|
label: string;
|
|
93
129
|
}[];
|
|
94
|
-
/** Which option a `<select>`
|
|
130
|
+
/** Which option a `<select>` shows: the one it has selected, which is the
|
|
131
|
+
* first where none is marked (`selectedOptions`). */
|
|
95
132
|
export declare function selectedOption(el: Element): string | null;
|
|
96
|
-
|
|
97
|
-
export declare function textareaValue(el: Element): string;
|
|
133
|
+
export {};
|
|
98
134
|
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/html/controls.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../src/html/controls.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,OAAO,KAAK,EAAO,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;qCAGqC;AACrC,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,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,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,CAiB/C;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAKzE;AAED;sDACsD;AACtD,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAGzD"}
|
package/dist/html/controls.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { attr, tagOf } from './dom.js';
|
|
2
|
+
import { optionElements, optionLabel, optionValue, selectedOptions, } from './form.js';
|
|
3
|
+
import { invert } from './css/transform.js';
|
|
2
4
|
import { isTransparent } from './css/values.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
import { placedMatrix } from './layout/block.js';
|
|
6
|
+
import { clipAround } from './paint.js';
|
|
7
|
+
/** The rectangles every control in a laid-out document landed on. `scale`
|
|
8
|
+
* is the document's device pixels to a CSS one. */
|
|
9
|
+
export function controlRectsOf(tree, scale = 1) {
|
|
5
10
|
const out = [];
|
|
6
11
|
for (const box of tree.controls) {
|
|
7
12
|
if (!box.el)
|
|
@@ -18,13 +23,35 @@ export function controlRectsOf(tree) {
|
|
|
18
23
|
y: box.y,
|
|
19
24
|
width: box.width,
|
|
20
25
|
height: box.height,
|
|
26
|
+
fontFamily: box.style.fontFamily,
|
|
27
|
+
fontSize: box.style.fontSize,
|
|
21
28
|
};
|
|
22
29
|
let opacity = 1;
|
|
30
|
+
// A box scaled to nothing draws nothing of what it holds (CSS
|
|
31
|
+
// Transforms 1, 6), which is how a page keeps a menu it has not opened.
|
|
32
|
+
// A widget in it is not mounted; one in a box turned or scaled to
|
|
33
|
+
// anything else is mounted where the box was laid out, as it is — a
|
|
34
|
+
// widget is a node of its own, which no matrix of the document's reaches.
|
|
35
|
+
let flattened = false;
|
|
23
36
|
for (let at = box; at; at = at.parent) {
|
|
24
37
|
opacity *= at.style.opacity;
|
|
38
|
+
const matrix = placedMatrix(at);
|
|
39
|
+
if (matrix && !invert(matrix))
|
|
40
|
+
flattened = true;
|
|
25
41
|
}
|
|
42
|
+
if (flattened)
|
|
43
|
+
continue;
|
|
26
44
|
if (opacity < 1)
|
|
27
45
|
rect.opacity = Math.max(0, opacity);
|
|
46
|
+
// cut by the clips around it where they do not leave it whole, and by
|
|
47
|
+
// its own box where it clips itself
|
|
48
|
+
const shown = pixelsOf(box);
|
|
49
|
+
const around = clipAround(box, scale);
|
|
50
|
+
if (clipsItself(box)) {
|
|
51
|
+
rect.clip = around ? between(around, shown) : shown;
|
|
52
|
+
}
|
|
53
|
+
else if (around && !covers(around, shown))
|
|
54
|
+
rect.clip = around;
|
|
28
55
|
if (styledField(box.replaced, box.style)) {
|
|
29
56
|
rect.bare = {
|
|
30
57
|
x: box.contentX,
|
|
@@ -43,6 +70,50 @@ export function controlRectsOf(tree) {
|
|
|
43
70
|
}
|
|
44
71
|
return out;
|
|
45
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Whether a control is cut to its own box: one the page gave an `overflow`
|
|
75
|
+
* other than `visible`, as an inline block's content is cut (CSS 2.1
|
|
76
|
+
* 11.1.1). A browser paints no control past its border box whatever its
|
|
77
|
+
* `overflow` says, scaling a checkbox into a box a pixel square; a widget
|
|
78
|
+
* has a size of its own, and is cut where the page said its box cuts. At
|
|
79
|
+
* the border box, which the widget's own frame is drawn in. A text field is
|
|
80
|
+
* left out: it cuts its own text, and a sheet that gives every `<textarea>`
|
|
81
|
+
* `overflow: auto`, as normalize.css does, asks for nothing here.
|
|
82
|
+
*/
|
|
83
|
+
function clipsItself(box) {
|
|
84
|
+
if (box.replaced === 'input' || box.replaced === 'textarea')
|
|
85
|
+
return false;
|
|
86
|
+
return box.style.overflowX !== 'visible' || box.style.overflowY !== 'visible';
|
|
87
|
+
}
|
|
88
|
+
/** A box's border box on the pixels it is drawn on. */
|
|
89
|
+
function pixelsOf(box) {
|
|
90
|
+
const x = Math.round(box.x);
|
|
91
|
+
const y = Math.round(box.y);
|
|
92
|
+
return {
|
|
93
|
+
x,
|
|
94
|
+
y,
|
|
95
|
+
width: Math.round(box.x + box.width) - x,
|
|
96
|
+
height: Math.round(box.y + box.height) - y,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/** What two rectangles share, of no area where they share nothing. */
|
|
100
|
+
export function between(a, b) {
|
|
101
|
+
const x = Math.max(a.x, b.x);
|
|
102
|
+
const y = Math.max(a.y, b.y);
|
|
103
|
+
return {
|
|
104
|
+
x,
|
|
105
|
+
y,
|
|
106
|
+
width: Math.max(0, Math.min(a.x + a.width, b.x + b.width) - x),
|
|
107
|
+
height: Math.max(0, Math.min(a.y + a.height, b.y + b.height) - y),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** Whether a clip leaves a rectangle whole. */
|
|
111
|
+
function covers(clip, rect) {
|
|
112
|
+
return (clip.x <= rect.x &&
|
|
113
|
+
clip.y <= rect.y &&
|
|
114
|
+
clip.x + clip.width >= rect.x + rect.width &&
|
|
115
|
+
clip.y + clip.height >= rect.y + rect.height);
|
|
116
|
+
}
|
|
46
117
|
/**
|
|
47
118
|
* Whether a field's box is the author's to draw: one given a border or a
|
|
48
119
|
* background of its own, which the UA sheet gives no control, or set to
|
|
@@ -164,10 +235,13 @@ export function buttonLabel(el) {
|
|
|
164
235
|
if (trimmed)
|
|
165
236
|
return trimmed;
|
|
166
237
|
}
|
|
238
|
+
const type = (attr(el, 'type') ?? '').trim().toLowerCase();
|
|
239
|
+
// an image button with no image yet says what the image would have
|
|
240
|
+
if (type === 'image')
|
|
241
|
+
return attr(el, 'alt') || attr(el, 'value') || 'Submit';
|
|
167
242
|
const value = attr(el, 'value');
|
|
168
243
|
if (value)
|
|
169
244
|
return value;
|
|
170
|
-
const type = (attr(el, 'type') ?? '').toLowerCase();
|
|
171
245
|
if (type === 'submit')
|
|
172
246
|
return 'Submit';
|
|
173
247
|
if (type === 'reset')
|
|
@@ -176,62 +250,16 @@ export function buttonLabel(el) {
|
|
|
176
250
|
}
|
|
177
251
|
/** A `<select>`'s options, as the widget's item list. */
|
|
178
252
|
export function optionsOf(el) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
continue;
|
|
184
|
-
const tag = tagOf(child);
|
|
185
|
-
if (tag === 'option') {
|
|
186
|
-
let label = '';
|
|
187
|
-
for (const kid of child.children) {
|
|
188
|
-
if (kid.type === 'text')
|
|
189
|
-
label += kid.data;
|
|
190
|
-
}
|
|
191
|
-
const trimmed = label.trim();
|
|
192
|
-
out.push({ value: attr(child, 'value') ?? trimmed, label: trimmed });
|
|
193
|
-
}
|
|
194
|
-
else if (tag === 'optgroup') {
|
|
195
|
-
walk(child);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
walk(el);
|
|
200
|
-
return out;
|
|
253
|
+
return optionElements(el).map((option) => ({
|
|
254
|
+
value: optionValue(option),
|
|
255
|
+
label: optionLabel(option),
|
|
256
|
+
}));
|
|
201
257
|
}
|
|
202
|
-
/** Which option a `<select>`
|
|
258
|
+
/** Which option a `<select>` shows: the one it has selected, which is the
|
|
259
|
+
* first where none is marked (`selectedOptions`). */
|
|
203
260
|
export function selectedOption(el) {
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
for (const child of node.children) {
|
|
207
|
-
if (child.type !== 'tag')
|
|
208
|
-
continue;
|
|
209
|
-
if (tagOf(child) === 'option' && attr(child, 'selected') !== undefined) {
|
|
210
|
-
let label = '';
|
|
211
|
-
for (const kid of child.children) {
|
|
212
|
-
if (kid.type === 'text')
|
|
213
|
-
label += kid.data;
|
|
214
|
-
}
|
|
215
|
-
return attr(child, 'value') ?? label.trim();
|
|
216
|
-
}
|
|
217
|
-
const nested = walk(child);
|
|
218
|
-
if (nested !== null)
|
|
219
|
-
return nested;
|
|
220
|
-
}
|
|
221
|
-
return null;
|
|
222
|
-
};
|
|
223
|
-
return walk(el) ?? options[0]?.value ?? null;
|
|
224
|
-
}
|
|
225
|
-
/** A `<textarea>`'s initial text — its content, not an attribute. */
|
|
226
|
-
export function textareaValue(el) {
|
|
227
|
-
let text = '';
|
|
228
|
-
for (const child of el.children) {
|
|
229
|
-
if (child.type === 'text')
|
|
230
|
-
text += child.data;
|
|
231
|
-
}
|
|
232
|
-
// HTML drops one leading newline after the open tag, which is why a
|
|
233
|
-
// pretty-printed `<textarea>` does not start with a blank line.
|
|
234
|
-
return text.replace(/^\r?\n/, '');
|
|
261
|
+
const [option] = selectedOptions(el);
|
|
262
|
+
return option ? optionValue(option) : null;
|
|
235
263
|
}
|
|
236
264
|
function numberAttr(el, name) {
|
|
237
265
|
const raw = attr(el, name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.js","sourceRoot":"","sources":["../../src/html/controls.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"controls.js","sourceRoot":"","sources":["../../src/html/controls.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EACX,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA+ExC;oDACoD;AACpD,MAAM,UAAU,cAAc,CAAC,IAAa,EAAE,KAAK,GAAG,CAAC;IACrD,MAAM,GAAG,GAAkB,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC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EAAW;IAC/B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC;QAChC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;+CAE+C;AAC/C,SAAS,SAAS,CAAC,KAAoB,EAAE,KAAuB;IAC9D,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE;YACzC,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,MAAM,EAAE,KAAK,CAAC,UAAU;YACxB,KAAK,EAAE,KAAK,CAAC,SAAS;SACvB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC7C,uEAAuE;QACvE,gCAAgC;QAChC,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -9,25 +9,73 @@ export interface SharedStyle {
|
|
|
9
9
|
style: ComputedStyle;
|
|
10
10
|
key: number;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The styles of the build before, for a build that only some elements'
|
|
14
|
+
* styles can differ in (`Cascade.beginSharing`): what each element's came
|
|
15
|
+
* to, and the elements to style again — `restyle`, each with everything in
|
|
16
|
+
* it, since a style is its parent's and the rules', and a rule reads an
|
|
17
|
+
* element's ancestors.
|
|
18
|
+
*/
|
|
19
|
+
export interface KeptStyles {
|
|
20
|
+
styles: ReadonlyMap<Element, {
|
|
21
|
+
style: ComputedStyle;
|
|
22
|
+
inFlex: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
restyle: ReadonlySet<Element>;
|
|
25
|
+
}
|
|
26
|
+
/** What the pointer entering or leaving an element can change
|
|
27
|
+
* (`Cascade.hoverTouches`): nothing, the element and what is in it, or
|
|
28
|
+
* those and the siblings after it. */
|
|
29
|
+
export type HoverTouch = 0 | 1 | 2;
|
|
30
|
+
export declare const HOVER_UNTOUCHED = 0;
|
|
31
|
+
export declare const HOVER_TOUCHED = 1;
|
|
32
|
+
export declare const HOVER_FOLLOWED = 2;
|
|
33
|
+
/** Which pseudo-elements' rules test the pointer (`Cascade.hoverPseudo`). */
|
|
34
|
+
export declare const HOVER_PSEUDO_NONE = 0;
|
|
35
|
+
export declare const HOVER_PSEUDO_GENERATED = 1;
|
|
36
|
+
export declare const HOVER_PSEUDO_OTHER = 2;
|
|
37
|
+
/**
|
|
38
|
+
* What a `::selection` makes of the text it covers (CSS Pseudo 4, 3.2): the
|
|
39
|
+
* colour the text is drawn in, null for its own, and the band under it,
|
|
40
|
+
* null for none.
|
|
41
|
+
*/
|
|
42
|
+
export interface SelectionStyle {
|
|
43
|
+
color: string | null;
|
|
44
|
+
background: string | null;
|
|
45
|
+
}
|
|
12
46
|
/**
|
|
13
47
|
* The compounds of a selector that test `:hover`, each without it (and
|
|
14
48
|
* without an `:active` beside it), and whether one is followed by a sibling
|
|
15
|
-
* combinator, which reaches the element's later siblings.
|
|
16
|
-
*
|
|
17
|
-
* `:is(
|
|
49
|
+
* combinator, which reaches the element's later siblings.
|
|
50
|
+
*
|
|
51
|
+
* A `:hover` inside `:is()`, `:where()` or `:not()` is found where it is:
|
|
52
|
+
* each takes a selector list and matches the element it is written on, so
|
|
53
|
+
* a list entry of one compound tests that element — `a:not(:hover)` is a
|
|
54
|
+
* compound of `a`'s that tests the pointer — and an entry with combinators
|
|
55
|
+
* in it names an ancestor or an earlier sibling, as it would outside.
|
|
56
|
+
* Tailwind 4 writes every `group-hover:` that way, `:is(:where(.group):hover
|
|
57
|
+
* *)`, and a page of them built its document again on every move. Whatever
|
|
58
|
+
* the nesting, the element whose hover changed is one a compound found here
|
|
59
|
+
* matches, and what changes with it is itself, what is in it, and what
|
|
60
|
+
* follows it where a sibling combinator is in play: a selector reads an
|
|
61
|
+
* element, its ancestors and the siblings before each of them, and nothing
|
|
62
|
+
* else. `nested` is left for a function this cannot read a selector list
|
|
63
|
+
* in — `:nth-child(… of :hover)`, `:host()` — which reaches elements no
|
|
64
|
+
* compound names.
|
|
18
65
|
*
|
|
19
|
-
* A `:hover` in a compound's `:has()` is the
|
|
20
|
-
*
|
|
66
|
+
* A `:hover` in a compound's `:has()` is the other way about, since what
|
|
67
|
+
* it tests is below: the compound, without its `:has()`, is an ancestor of
|
|
21
68
|
* the element the pointer is over — or an earlier sibling of it or of an
|
|
22
69
|
* ancestor, where the argument starts at a sibling (Selectors 4, 4.5). So
|
|
23
|
-
* it is given as an anchor (`has`)
|
|
70
|
+
* it is given as an anchor (`has`).
|
|
24
71
|
*
|
|
25
72
|
* `:active` is not the pointer's here: nothing sets it (`setPointer` is
|
|
26
73
|
* handed none), so a selector that tests only it never changes as the
|
|
27
74
|
* pointer moves — Wikipedia's buttons' `:focus:not(:active)` among them.
|
|
28
75
|
* A press that sets it would have to be counted here too.
|
|
29
76
|
*/
|
|
30
|
-
export declare function pointerCompounds(selector: string):
|
|
77
|
+
export declare function pointerCompounds(selector: string): PointerCompounds;
|
|
78
|
+
export interface PointerCompounds {
|
|
31
79
|
compounds: string[];
|
|
32
80
|
siblings: boolean;
|
|
33
81
|
nested: boolean;
|
|
@@ -35,7 +83,10 @@ export declare function pointerCompounds(selector: string): {
|
|
|
35
83
|
anchor: string;
|
|
36
84
|
siblings: boolean;
|
|
37
85
|
}[];
|
|
38
|
-
|
|
86
|
+
/** The compounds and anchors a sibling combinator follows: the ones
|
|
87
|
+
* whose elements' later siblings change with them. */
|
|
88
|
+
followed: string[];
|
|
89
|
+
}
|
|
39
90
|
/** What `Cascade.firstLetterRules` found for an element. */
|
|
40
91
|
export interface FirstLetterRules {
|
|
41
92
|
readonly el: Element;
|
|
@@ -81,11 +132,9 @@ export declare class Cascade {
|
|
|
81
132
|
* pointer inside a functional pseudo-class, which reaches elements no
|
|
82
133
|
* compound names. */
|
|
83
134
|
hoverLocal: boolean;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
|
|
87
|
-
/** The compounds whose `:has()` tests the pointer, each without it, and
|
|
88
|
-
* whether its argument starts at a sibling (`hoverAnchors`). */
|
|
135
|
+
/** The compounds whose `:has()` tests the pointer, each without it,
|
|
136
|
+
* whether its argument starts at a sibling, and whether a sibling
|
|
137
|
+
* combinator follows it (`hoverAnchors`). */
|
|
89
138
|
private _hoverAnchors;
|
|
90
139
|
private _anchorMatchers;
|
|
91
140
|
private _pointer;
|
|
@@ -125,6 +174,12 @@ export declare class Cascade {
|
|
|
125
174
|
/** The families the document loads itself (`fonts.ts`), or null for a
|
|
126
175
|
* document with no `@font-face`. */
|
|
127
176
|
private _families;
|
|
177
|
+
/** The root element's computed style: its `font-size` is what a `rem`
|
|
178
|
+
* is and its line height what an `rlh` is (CSS Values 4, 6.1.1), in
|
|
179
|
+
* every element but the root, whose own declarations measure them from
|
|
180
|
+
* the initial values. Set as the root's style is computed, which a build
|
|
181
|
+
* does ahead of every element under it. */
|
|
182
|
+
private _root;
|
|
128
183
|
private _mapFamilies;
|
|
129
184
|
/** Whether any declaration has a length in `lh` or `rlh`: only then is
|
|
130
185
|
* the line height settled ahead of the declarations that read it. */
|
|
@@ -136,21 +191,35 @@ export declare class Cascade {
|
|
|
136
191
|
/** Whether a pointer move can change what this cascade produces. */
|
|
137
192
|
get hoverSensitive(): boolean;
|
|
138
193
|
setPointer(pointer: PointerState): void;
|
|
194
|
+
/**
|
|
195
|
+
* Which pseudo-elements' rules test the pointer: none's
|
|
196
|
+
* (`HOVER_PSEUDO_NONE`); a `::before`'s or an `::after`'s only
|
|
197
|
+
* (`HOVER_PSEUDO_GENERATED`), whose boxes a move restyles where they are
|
|
198
|
+
* as it does an element's; or a `::first-line`'s, a `::first-letter`'s
|
|
199
|
+
* or a `::marker`'s (`HOVER_PSEUDO_OTHER`), which layout styles and a
|
|
200
|
+
* move cannot.
|
|
201
|
+
*/
|
|
202
|
+
get hoverPseudo(): 0 | 1 | 2;
|
|
139
203
|
/**
|
|
140
204
|
* Whether the pointer entering or leaving `el` can change a style: one of
|
|
141
205
|
* the compounds a selector tests the pointer in matches it, the pointer
|
|
142
206
|
* aside. A move between two paragraphs of a page whose only such rule is
|
|
143
|
-
* `a:hover` touches nothing, and restyles nothing.
|
|
207
|
+
* `a:hover` touches nothing, and restyles nothing. `HOVER_FOLLOWED`
|
|
208
|
+
* where a sibling combinator follows one that matches, so the element's
|
|
209
|
+
* later siblings can change with it — those rules' elements alone: a
|
|
210
|
+
* sheet with one `.peer:hover ~ *` in it does not make every row of a
|
|
211
|
+
* table restyle the rows after it.
|
|
144
212
|
*/
|
|
145
|
-
hoverTouches(el: Element):
|
|
213
|
+
hoverTouches(el: Element): HoverTouch;
|
|
146
214
|
/**
|
|
147
215
|
* The elements whose `:has()` may have changed its answer as `el` was
|
|
148
216
|
* hovered or left: the ancestors of it a compound whose `:has()` tests
|
|
149
217
|
* the pointer names, and their earlier siblings and its own where the
|
|
150
218
|
* argument starts at a sibling — a superset, which is restyled and found
|
|
151
|
-
* the same where it did not. Into `into
|
|
219
|
+
* the same where it did not. Into `into`, each with whether its later
|
|
220
|
+
* siblings can change with it (`hoverTouches`).
|
|
152
221
|
*/
|
|
153
|
-
hoverAnchors(el: Element, into: Element
|
|
222
|
+
hoverAnchors(el: Element, into: Map<Element, HoverTouch>): void;
|
|
154
223
|
private _noteHover;
|
|
155
224
|
/** A selector compiled as a rule's is, or null where css-select refuses
|
|
156
225
|
* it, as a rule it refuses drops out of the cascade. */
|
|
@@ -169,9 +238,23 @@ export declare class Cascade {
|
|
|
169
238
|
private _customs;
|
|
170
239
|
private _ids;
|
|
171
240
|
private _nextId;
|
|
172
|
-
/**
|
|
173
|
-
*
|
|
174
|
-
|
|
241
|
+
/** The styles kept from the build before, while a build that keeps them
|
|
242
|
+
* runs, and what each kept element shares under in this one. */
|
|
243
|
+
private _kept;
|
|
244
|
+
private _keptShared;
|
|
245
|
+
/**
|
|
246
|
+
* A box tree is about to be built: the styles shared in the last build
|
|
247
|
+
* were computed against a pointer and a viewport that may have moved.
|
|
248
|
+
*
|
|
249
|
+
* With `kept`, only its `restyle` elements are matched: a build the
|
|
250
|
+
* pointer asked for — a hover that moved something — changes the styles
|
|
251
|
+
* of the elements the move reached, and every other element's is what it
|
|
252
|
+
* was. Matching them all again was most of such a build: a frame of 550 ms
|
|
253
|
+
* on a page with a Tailwind sheet, and 150 without it.
|
|
254
|
+
*/
|
|
255
|
+
beginSharing(kept?: KeptStyles | null): void;
|
|
256
|
+
/** The build is over: nothing later is answered from what it kept. */
|
|
257
|
+
endSharing(): void;
|
|
175
258
|
/**
|
|
176
259
|
* An element's custom properties: its parent's, or its own over them —
|
|
177
260
|
* shared by every element whose parent has the same ones and whose own
|
|
@@ -249,6 +332,24 @@ export declare class Cascade {
|
|
|
249
332
|
* a number is set in, and a `content` it is set as instead.
|
|
250
333
|
*/
|
|
251
334
|
markerStyle(el: Element, style: ComputedStyle): ComputedStyle | null;
|
|
335
|
+
/** Whether any rule styles a `::selection`: a document with none draws
|
|
336
|
+
* a selection in the palette's colour, and asks nothing. */
|
|
337
|
+
get hasSelection(): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* An element's `::selection`, over its parent's (`parent`, null for the
|
|
340
|
+
* palette's own): the colour and the background the rules that reach it
|
|
341
|
+
* set, and its parent's for either they leave alone. Both inherit along
|
|
342
|
+
* the chain of highlights rather than the elements' (CSS Pseudo 4, 3.5,
|
|
343
|
+
* "highlight inheritance"), which is what Chrome draws: a `<span>` in a
|
|
344
|
+
* `div::selection { background: red }` is selected in red, and a `<p>`
|
|
345
|
+
* whose own rule sets only a colour keeps the red under it.
|
|
346
|
+
*
|
|
347
|
+
* The palette's highlight is taken only where no rule has set either
|
|
348
|
+
* (3.6, "paired defaults"): one that sets a colour and no background is
|
|
349
|
+
* selected over none, as Chrome has it. A rule that sets neither — a
|
|
350
|
+
* `text-shadow` only — leaves the element where its parent was.
|
|
351
|
+
*/
|
|
352
|
+
selectionStyle(el: Element, style: ComputedStyle, parent: SelectionStyle | null): SelectionStyle | null;
|
|
252
353
|
/**
|
|
253
354
|
* An element's `::first-line` style, inheriting from its own, or null
|
|
254
355
|
* when no rule reaches it (CSS 2.1 5.12.1).
|
|
@@ -302,6 +403,19 @@ export declare class Cascade {
|
|
|
302
403
|
style: ComputedStyle;
|
|
303
404
|
html: ComputedStyle | null;
|
|
304
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* Whether the pointer's move from `was` to where it is changed which
|
|
408
|
+
* rules match `el`, or its `::before`, `::after` or another of its
|
|
409
|
+
* pseudo-elements: the rules that test `:hover` asked under both, and
|
|
410
|
+
* nothing else, since no other rule's answer is the pointer's. An element
|
|
411
|
+
* they answer the same for, under a parent whose style is what it was, has
|
|
412
|
+
* the style it had — which is most of what a move reaches: the rows of a
|
|
413
|
+
* hovered table body, what is in a hovered card.
|
|
414
|
+
*/
|
|
415
|
+
pointerChanged(el: Element, was: PointerState): boolean;
|
|
416
|
+
/** The ids of the rules testing the pointer that match `el` as things
|
|
417
|
+
* stand, the element's and each pseudo-element's. */
|
|
418
|
+
private _pointerAnswers;
|
|
305
419
|
/** The rules of `index` that match `el`, pushed onto `out` as candidates,
|
|
306
420
|
* and their ids onto `matched` in the order they were tried. */
|
|
307
421
|
private _matchInto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascade.d.ts","sourceRoot":"","sources":["../../../src/html/css/cascade.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAW1C,OAAO,KA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