@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Element } from 'domhandler';
|
|
2
2
|
import type { TextRun } from '../../richtext/index.js';
|
|
3
|
-
import type { Cascade } from '../css/cascade.js';
|
|
3
|
+
import type { Cascade, KeptStyles, SelectionStyle } from '../css/cascade.js';
|
|
4
4
|
import type { CollapsedTable } from './collapse.js';
|
|
5
5
|
import type { IntrinsicSize } from '../svg.js';
|
|
6
6
|
import type { ComputedStyle } from '../css/style.js';
|
|
@@ -142,6 +142,17 @@ export interface LineText {
|
|
|
142
142
|
x: number;
|
|
143
143
|
width: number;
|
|
144
144
|
}[];
|
|
145
|
+
/**
|
|
146
|
+
* How far the line goes on past this text for the collapsible spaces it
|
|
147
|
+
* ends on, which its engine, laying out a piece of a line as a line,
|
|
148
|
+
* stripped: the room they take where more follows them on the line, and
|
|
149
|
+
* none where the line ends on them, since CSS removes them there (CSS
|
|
150
|
+
* Text 3, 4.1.2). They are the text's, in the elements they are in, and
|
|
151
|
+
* `trailRun` is the run they are the end of: whose underline, line
|
|
152
|
+
* through and highlight go on under them.
|
|
153
|
+
*/
|
|
154
|
+
trail?: number;
|
|
155
|
+
trailRun?: TextRun;
|
|
145
156
|
/** Any offset in the layout's own text as a document index — how a run
|
|
146
157
|
* under the pointer finds the element whose text it is. Per pass: the
|
|
147
158
|
* layout may be one an earlier pass made (`TextLayoutCache`), and the
|
|
@@ -437,6 +448,9 @@ export declare const FIRST_LINE: WeakMap<Box, ComputedStyle>;
|
|
|
437
448
|
* applies to from `parent` and the rest from its parent's own style.
|
|
438
449
|
*/
|
|
439
450
|
export type FirstLineStyler = (box: Box, parent: ComputedStyle) => ComputedStyle;
|
|
451
|
+
/** The `::selection` of the element a box's text is in, or null for the
|
|
452
|
+
* palette's highlight (`Cascade.selectionStyle`). */
|
|
453
|
+
export type SelectionStyler = (box: Box | null) => SelectionStyle | null;
|
|
440
454
|
/** The url of an image generated content put in a pseudo-element: it has
|
|
441
455
|
* no element of its own to name it (`imageUrlOf`). */
|
|
442
456
|
export declare const CONTENT_IMAGES: WeakMap<Box, string>;
|
|
@@ -499,12 +513,16 @@ export declare const CLAMPED: WeakSet<Box>;
|
|
|
499
513
|
/** A grid's tracks as its layout left them, each column's and each row's
|
|
500
514
|
* start and end from the content box's corner, with the lines of each
|
|
501
515
|
* axis by number and by name: what an absolutely positioned box's grid
|
|
502
|
-
* area is found in (CSS Grid 1, 9.1).
|
|
516
|
+
* area is found in (CSS Grid 1, 9.1). And the first of its items in
|
|
517
|
+
* row-major order, where they were placed and not where they were
|
|
518
|
+
* written, which the grid's own baseline is taken from (10.6): null for a
|
|
519
|
+
* grid with no item. */
|
|
503
520
|
export interface GridTracks {
|
|
504
521
|
cols: [number, number][];
|
|
505
522
|
rows: [number, number][];
|
|
506
523
|
colLines: GridLines;
|
|
507
524
|
rowLines: GridLines;
|
|
525
|
+
first: Box | null;
|
|
508
526
|
}
|
|
509
527
|
export declare const GRID_TRACKS: WeakMap<Box, GridTracks>;
|
|
510
528
|
/** A flex box's children in the order it lays them out and paints them,
|
|
@@ -516,6 +534,50 @@ export declare const PAINT_ORDER: WeakMap<Box, Box[]>;
|
|
|
516
534
|
* 9.2.1.1), though they stand outside it, and its rect takes them in, as
|
|
517
535
|
* a browser's does (`elementRect`). */
|
|
518
536
|
export declare const CUT_BLOCKS: WeakMap<Box, Box[]>;
|
|
537
|
+
/** Where a block that clearance moved below the floats would have stood
|
|
538
|
+
* without it, its border edge's top (CSS 2.1 9.5.2): a browser's
|
|
539
|
+
* fragment of an inline box around such a block starts there, and takes
|
|
540
|
+
* the clearance in (`elementRect`). Only the blocks that had clearance. */
|
|
541
|
+
export declare const CLEARED_FROM: WeakMap<Box, number>;
|
|
542
|
+
/**
|
|
543
|
+
* One piece of a block that a column break falls inside (CSS Multi-column
|
|
544
|
+
* 1): its border box in one column, as far as the box goes in it, and where
|
|
545
|
+
* the whole box would stand there — the box its background and its borders
|
|
546
|
+
* are drawn as, cut to the piece (`box-decoration-break: slice`).
|
|
547
|
+
*/
|
|
548
|
+
export interface ColumnPiece {
|
|
549
|
+
x: number;
|
|
550
|
+
y: number;
|
|
551
|
+
width: number;
|
|
552
|
+
height: number;
|
|
553
|
+
/** The top of the whole box, in this column, and its height. */
|
|
554
|
+
wholeY: number;
|
|
555
|
+
wholeHeight: number;
|
|
556
|
+
}
|
|
557
|
+
/** The pieces of each block a column break falls inside, in the order of
|
|
558
|
+
* the columns. The block's own rect is what takes them all in, as a
|
|
559
|
+
* browser's bounding rect of it is. */
|
|
560
|
+
export declare const COLUMN_PIECES: WeakMap<Box, ColumnPiece[]>;
|
|
561
|
+
/** The lines of a box that columns took apart: they are not one under
|
|
562
|
+
* another, and a search that counts on their tops rising reads them all
|
|
563
|
+
* instead. */
|
|
564
|
+
export declare const COLUMN_LINES: WeakSet<LineBox[]>;
|
|
565
|
+
/**
|
|
566
|
+
* The rows of a text's layout that are in the text's own column, from the
|
|
567
|
+
* layout's origin, where the layout's lines went to more than one: a layout
|
|
568
|
+
* is drawn whole, so it is drawn once for each column, there, and clipped
|
|
569
|
+
* to the rows that are that column's. One object for all the texts of a
|
|
570
|
+
* layout in a column, which is what tells a draw of it from another.
|
|
571
|
+
*/
|
|
572
|
+
export declare const COLUMN_ROWS: WeakMap<LineText, {
|
|
573
|
+
top: number;
|
|
574
|
+
bottom: number;
|
|
575
|
+
}>;
|
|
576
|
+
/** Whether any layout has broken a box between columns: what the walks
|
|
577
|
+
* that would ask the three maps above of every box ask first. */
|
|
578
|
+
export declare const columned: {
|
|
579
|
+
any: boolean;
|
|
580
|
+
};
|
|
519
581
|
/** The element a pseudo-element's box is generated from, which has no
|
|
520
582
|
* element of its own (`Box.pseudo`): whose the images its styles name are,
|
|
521
583
|
* when the host is asked for them. */
|
|
@@ -549,6 +611,10 @@ export interface BoxTree {
|
|
|
549
611
|
controls: Box[];
|
|
550
612
|
/** Every box carrying an `href`, for click and hover. */
|
|
551
613
|
links: Box[];
|
|
614
|
+
/** The style of an anonymous box under a parent's (`anonymousStyles`):
|
|
615
|
+
* the one the fix-up gave each it made, and what such a box takes when
|
|
616
|
+
* its parent's style changes where it is (`HtmlViewNode._hoverInPlace`). */
|
|
617
|
+
anonymous: AnonymousStyle;
|
|
552
618
|
/** Every box with a `background-image`, a border image or a mask image,
|
|
553
619
|
* an element's or a pseudo-element's, for the host to be asked for: a
|
|
554
620
|
* document has a handful, and finding them was a walk over every box
|
|
@@ -574,6 +640,10 @@ export interface BoxTree {
|
|
|
574
640
|
/** Each box's style on a first line (`FirstLineStyler`), where any
|
|
575
641
|
* block has a `::first-line`. */
|
|
576
642
|
firstLineStyler: FirstLineStyler | null;
|
|
643
|
+
/** Each box's `::selection` (`SelectionStyler`), where any rule styles
|
|
644
|
+
* one: worked out as a selection is first painted over it, not as the
|
|
645
|
+
* tree is built, since most builds are never selected in. */
|
|
646
|
+
selectionStyler: SelectionStyler | null;
|
|
577
647
|
/** Whether a float or an out-of-flow box sits in an inline box: where
|
|
578
648
|
* none does, layout looks for them among a block's own children and
|
|
579
649
|
* goes through no inline box to find them. */
|
|
@@ -590,9 +660,16 @@ export interface BoxTree {
|
|
|
590
660
|
* (`Cascade.rootStyle`), whose background is the canvas's; null where
|
|
591
661
|
* the document has either. */
|
|
592
662
|
impliedHtml: ComputedStyle | null;
|
|
663
|
+
/** The scheme the palette is, which the element the document is drawn
|
|
664
|
+
* in is of: where the root element's is the other, the canvas is that
|
|
665
|
+
* scheme's and opaque (`paintDocument`). */
|
|
666
|
+
paletteScheme: 'light' | 'dark';
|
|
593
667
|
}
|
|
594
668
|
export interface BuildOptions {
|
|
595
669
|
cascade: Cascade;
|
|
670
|
+
/** The styles of the tree this one replaces, where only some elements'
|
|
671
|
+
* can have changed since (`Cascade.beginSharing`). */
|
|
672
|
+
kept?: KeptStyles | null;
|
|
596
673
|
/** Device pixels per CSS pixel. An image's pixels and a `width="600"`
|
|
597
674
|
* attribute are CSS pixels; every box is device, so both are multiplied
|
|
598
675
|
* on the way in. Default 1. */
|
|
@@ -629,6 +706,17 @@ export declare function transformInPlace(text: string, transform: ComputedStyle[
|
|
|
629
706
|
* from the end, where it is almost always decided by the last character.
|
|
630
707
|
*/
|
|
631
708
|
export declare function letteredAfter(text: string, lettered: boolean): boolean;
|
|
709
|
+
/**
|
|
710
|
+
* The style of an anonymous box inside a parent: what the parent passes on
|
|
711
|
+
* by inheritance, and every other property at its initial value, as CSS 2.1
|
|
712
|
+
* gives anonymous boxes theirs (9.2.1.1, 17.2.1). An anonymous box that took
|
|
713
|
+
* the parent's style itself took its height, its padding and borders, its
|
|
714
|
+
* background, its relative offset and its opacity a second time — the text
|
|
715
|
+
* in `<div style="padding: 20px">text<p>…</p></div>` sat 40px in, and the
|
|
716
|
+
* paragraph after it the height of the div further down. One per parent
|
|
717
|
+
* style, which the cascade already shares between elements.
|
|
718
|
+
*/
|
|
719
|
+
export type AnonymousStyle = (parent: ComputedStyle, display: ComputedStyle['display']) => ComputedStyle;
|
|
632
720
|
/**
|
|
633
721
|
* Whether a text is white space alone: CSS's white space, which is the
|
|
634
722
|
* space, the tab and the three line breaks and nothing else (CSS Text 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boxes.d.ts","sourceRoot":"","sources":["../../../src/html/layout/boxes.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAUvD,OAAO,KAAK,EAAE,OAAO,EAAoB,MAAM,mBA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OAAO,CAGT;AAq0CD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,eAAe,CAAC,EACzC,QAAQ,UAAQ,GACf,MAAM,CAWR;AAoED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAyBtE;AAieD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,KAC9B,aAAa,CAAC;AA0InB;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAYD;;;+DAG+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAQtD"}
|
|
@@ -271,6 +271,30 @@ export const PAINT_ORDER = new WeakMap();
|
|
|
271
271
|
* 9.2.1.1), though they stand outside it, and its rect takes them in, as
|
|
272
272
|
* a browser's does (`elementRect`). */
|
|
273
273
|
export const CUT_BLOCKS = new WeakMap();
|
|
274
|
+
/** Where a block that clearance moved below the floats would have stood
|
|
275
|
+
* without it, its border edge's top (CSS 2.1 9.5.2): a browser's
|
|
276
|
+
* fragment of an inline box around such a block starts there, and takes
|
|
277
|
+
* the clearance in (`elementRect`). Only the blocks that had clearance. */
|
|
278
|
+
export const CLEARED_FROM = new WeakMap();
|
|
279
|
+
/** The pieces of each block a column break falls inside, in the order of
|
|
280
|
+
* the columns. The block's own rect is what takes them all in, as a
|
|
281
|
+
* browser's bounding rect of it is. */
|
|
282
|
+
export const COLUMN_PIECES = new WeakMap();
|
|
283
|
+
/** The lines of a box that columns took apart: they are not one under
|
|
284
|
+
* another, and a search that counts on their tops rising reads them all
|
|
285
|
+
* instead. */
|
|
286
|
+
export const COLUMN_LINES = new WeakSet();
|
|
287
|
+
/**
|
|
288
|
+
* The rows of a text's layout that are in the text's own column, from the
|
|
289
|
+
* layout's origin, where the layout's lines went to more than one: a layout
|
|
290
|
+
* is drawn whole, so it is drawn once for each column, there, and clipped
|
|
291
|
+
* to the rows that are that column's. One object for all the texts of a
|
|
292
|
+
* layout in a column, which is what tells a draw of it from another.
|
|
293
|
+
*/
|
|
294
|
+
export const COLUMN_ROWS = new WeakMap();
|
|
295
|
+
/** Whether any layout has broken a box between columns: what the walks
|
|
296
|
+
* that would ask the three maps above of every box ask first. */
|
|
297
|
+
export const columned = { any: false };
|
|
274
298
|
/** The element a pseudo-element's box is generated from, which has no
|
|
275
299
|
* element of its own (`Box.pseudo`): whose the images its styles name are,
|
|
276
300
|
* when the host is asked for them. */
|
|
@@ -343,7 +367,7 @@ class Builder {
|
|
|
343
367
|
}
|
|
344
368
|
run(root) {
|
|
345
369
|
const cascade = this._options.cascade;
|
|
346
|
-
cascade.beginSharing();
|
|
370
|
+
cascade.beginSharing(this._options.kept ?? null);
|
|
347
371
|
const { style: rootStyle, html: impliedHtml } = cascade.rootStyle(hasBody(root), hasHtml(root));
|
|
348
372
|
const rootBox = new Box('block', null, rootStyle);
|
|
349
373
|
// a fragment's root stands in for a `<body>`, counters and all
|
|
@@ -359,10 +383,13 @@ class Builder {
|
|
|
359
383
|
// it carries no margins of its own and cannot collapse with anything.
|
|
360
384
|
this._children(root, rootBox, rootStyle, false, null, ROOT_SHARE_KEY);
|
|
361
385
|
this._endLine();
|
|
362
|
-
|
|
386
|
+
cascade.endSharing();
|
|
387
|
+
const anonymous = anonymousStyles(cascade.initial);
|
|
388
|
+
fixUp(rootBox, anonymous);
|
|
363
389
|
assignSubtreeRanges(rootBox);
|
|
364
390
|
return {
|
|
365
391
|
root: rootBox,
|
|
392
|
+
anonymous,
|
|
366
393
|
text: this._chunks.join(''),
|
|
367
394
|
textBoxes: this._textBoxes,
|
|
368
395
|
textStyles: this._textStyles,
|
|
@@ -375,10 +402,37 @@ class Builder {
|
|
|
375
402
|
negative: this._negative,
|
|
376
403
|
firstLine: this._firstLine,
|
|
377
404
|
firstLineStyler: this._firstLine ? this._firstLineStyler() : null,
|
|
405
|
+
selectionStyler: cascade.hasSelection ? this._selectionStyler() : null,
|
|
378
406
|
nestedOutOfLine: this._nestedOutOfLine,
|
|
379
407
|
movedInline: this._movedInline,
|
|
380
408
|
clipText: this._clipText,
|
|
381
409
|
impliedHtml,
|
|
410
|
+
paletteScheme: cascade.initial.colorScheme,
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/** `BoxTree.selectionStyler`, over this build's cascade: an element's
|
|
414
|
+
* over its parent's, each once. A box with no element of its own — text,
|
|
415
|
+
* an anonymous box — is its nearest element's. */
|
|
416
|
+
_selectionStyler() {
|
|
417
|
+
const cascade = this._options.cascade;
|
|
418
|
+
const styles = this._styles;
|
|
419
|
+
const known = new Map();
|
|
420
|
+
const of = (el) => {
|
|
421
|
+
let found = known.get(el);
|
|
422
|
+
if (found !== undefined)
|
|
423
|
+
return found;
|
|
424
|
+
// the parser keeps a document to 256 elements deep (`dom.ts`)
|
|
425
|
+
const parent = isElement(el.parent) ? of(el.parent) : null;
|
|
426
|
+
const own = styles.get(el)?.style;
|
|
427
|
+
found = own ? cascade.selectionStyle(el, own, parent) : parent;
|
|
428
|
+
known.set(el, found);
|
|
429
|
+
return found;
|
|
430
|
+
};
|
|
431
|
+
return (box) => {
|
|
432
|
+
let at = box;
|
|
433
|
+
while (at && !at.el)
|
|
434
|
+
at = at.parent;
|
|
435
|
+
return at?.el ? of(at.el) : null;
|
|
382
436
|
};
|
|
383
437
|
}
|
|
384
438
|
/** `BoxTree.firstLineStyler`, over this build's cascade. */
|
|
@@ -491,7 +545,7 @@ class Builder {
|
|
|
491
545
|
}
|
|
492
546
|
}
|
|
493
547
|
// a translation is moved by the same pass
|
|
494
|
-
if (style.translate || style.
|
|
548
|
+
if (style.translate || style.transform)
|
|
495
549
|
this._relative = true;
|
|
496
550
|
if (style.backgroundClipText)
|
|
497
551
|
this._clipText = true;
|
|
@@ -527,14 +581,20 @@ class Builder {
|
|
|
527
581
|
return;
|
|
528
582
|
}
|
|
529
583
|
// an `<object>` is its image once it has one, and its content until;
|
|
530
|
-
// an `<embed>` its image, and a `<video>` its poster, or a frame
|
|
584
|
+
// an `<embed>` its image, and a `<video>` its poster, or a frame; an
|
|
585
|
+
// image button its image, and a button saying what it is for until it
|
|
586
|
+
// has one, so it can be pressed either way
|
|
531
587
|
const replaced = tag === 'object'
|
|
532
588
|
? this._options.imageSize(el)
|
|
533
589
|
? 'image'
|
|
534
590
|
: 'none'
|
|
535
591
|
: (tag === 'embed' || tag === 'video') && this._options.imageSize(el)
|
|
536
592
|
? 'image'
|
|
537
|
-
:
|
|
593
|
+
: isImageButton(el, tag)
|
|
594
|
+
? this._options.imageSize(el)
|
|
595
|
+
? 'image'
|
|
596
|
+
: 'button'
|
|
597
|
+
: replacedKind(el, tag);
|
|
538
598
|
if (replaced !== 'none') {
|
|
539
599
|
this._replaced(el, tag, replaced, style, into);
|
|
540
600
|
return;
|
|
@@ -789,7 +849,7 @@ class Builder {
|
|
|
789
849
|
}
|
|
790
850
|
}
|
|
791
851
|
// a translation is moved by the same pass
|
|
792
|
-
if (style.translate || style.
|
|
852
|
+
if (style.translate || style.transform)
|
|
793
853
|
this._relative = true;
|
|
794
854
|
if (style.backgroundClipText)
|
|
795
855
|
this._clipText = true;
|
|
@@ -1729,6 +1789,10 @@ function setIntrinsics(box, size, scale) {
|
|
|
1729
1789
|
ratio: size.ratio,
|
|
1730
1790
|
};
|
|
1731
1791
|
}
|
|
1792
|
+
/** An `<input type=image>`: a picture that submits its form. */
|
|
1793
|
+
function isImageButton(el, tag) {
|
|
1794
|
+
return (tag === 'input' && (attr(el, 'type') ?? '').trim().toLowerCase() === 'image');
|
|
1795
|
+
}
|
|
1732
1796
|
function replacedKind(el, tag) {
|
|
1733
1797
|
switch (tag) {
|
|
1734
1798
|
case 'img':
|
|
@@ -2024,16 +2088,16 @@ function namesImages(style) {
|
|
|
2024
2088
|
function anonymousStyles(initial) {
|
|
2025
2089
|
const made = new WeakMap();
|
|
2026
2090
|
return (parent, display) => {
|
|
2027
|
-
let byDisplay = made.get(parent
|
|
2091
|
+
let byDisplay = made.get(parent);
|
|
2028
2092
|
if (!byDisplay) {
|
|
2029
2093
|
byDisplay = new Map();
|
|
2030
|
-
made.set(parent
|
|
2094
|
+
made.set(parent, byDisplay);
|
|
2031
2095
|
}
|
|
2032
2096
|
let style = byDisplay.get(display);
|
|
2033
2097
|
if (!style) {
|
|
2034
2098
|
// `display` is the one property it does not start from: it is the
|
|
2035
2099
|
// box the fix-up made, and layout asks the style what a box is
|
|
2036
|
-
style = inherit(parent
|
|
2100
|
+
style = inherit(parent, initial);
|
|
2037
2101
|
style.display = display;
|
|
2038
2102
|
byDisplay.set(display, style);
|
|
2039
2103
|
}
|
|
@@ -2124,7 +2188,7 @@ function wrapOrphans(box, kind, accept, anonymous) {
|
|
|
2124
2188
|
}
|
|
2125
2189
|
}
|
|
2126
2190
|
function anonymousOf(parent, kind, run, anonymous, display = kind) {
|
|
2127
|
-
const box = new Box(kind, null, anonymous(parent, display));
|
|
2191
|
+
const box = new Box(kind, null, anonymous(parent.style, display));
|
|
2128
2192
|
box.parent = parent;
|
|
2129
2193
|
for (const child of run) {
|
|
2130
2194
|
child.parent = box;
|