@react-x11/components 0.14.0 → 0.14.1
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/css/cascade.d.ts +42 -1
- package/dist/html/css/cascade.d.ts.map +1 -1
- package/dist/html/css/cascade.js +310 -12
- package/dist/html/css/cascade.js.map +1 -1
- package/dist/html/css/shapes.d.ts +44 -0
- package/dist/html/css/shapes.d.ts.map +1 -0
- package/dist/html/css/shapes.js +194 -0
- package/dist/html/css/shapes.js.map +1 -0
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +1 -15
- package/dist/html/css/style.js.map +1 -1
- package/dist/html/layout/block.d.ts +16 -5
- package/dist/html/layout/block.d.ts.map +1 -1
- package/dist/html/layout/block.js +26 -5
- package/dist/html/layout/block.js.map +1 -1
- package/dist/html/layout/boxes.d.ts +13 -0
- package/dist/html/layout/boxes.d.ts.map +1 -1
- package/dist/html/layout/boxes.js +18 -0
- package/dist/html/layout/boxes.js.map +1 -1
- package/dist/html/layout/css-grid.d.ts.map +1 -1
- package/dist/html/layout/css-grid.js +58 -10
- package/dist/html/layout/css-grid.js.map +1 -1
- package/dist/html/layout/flex.js +19 -6
- package/dist/html/layout/flex.js.map +1 -1
- package/dist/html/layout/table.d.ts.map +1 -1
- package/dist/html/layout/table.js +38 -16
- package/dist/html/layout/table.js.map +1 -1
- package/dist/html/node.d.ts +1 -0
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +57 -12
- package/dist/html/node.js.map +1 -1
- package/dist/html/paint.d.ts +4 -1
- package/dist/html/paint.d.ts.map +1 -1
- package/dist/html/paint.js +269 -84
- package/dist/html/paint.js.map +1 -1
- package/dist/html/svg.d.ts +27 -10
- package/dist/html/svg.d.ts.map +1 -1
- package/dist/html/svg.js +259 -46
- package/dist/html/svg.js.map +1 -1
- package/package.json +1 -1
- package/src/html/css/cascade.ts +343 -8
- package/src/html/css/shapes.ts +239 -0
- package/src/html/css/style.ts +1 -13
- package/src/html/layout/block.ts +27 -5
- package/src/html/layout/boxes.ts +30 -0
- package/src/html/layout/css-grid.ts +77 -13
- package/src/html/layout/flex.ts +22 -9
- package/src/html/layout/table.ts +45 -18
- package/src/html/node.ts +54 -11
- package/src/html/paint.ts +379 -90
- package/src/html/svg.ts +318 -39
|
@@ -148,19 +148,30 @@ export declare function percentHeightsIn(box: Box): boolean;
|
|
|
148
148
|
* stretched item's, a flexed one's in a container of a definite height (CSS
|
|
149
149
|
* Flexbox 9.8), a grid item's stretched down its area (CSS Grid 1, 11.1) —
|
|
150
150
|
* which what is in it takes its percentages of, and which an item that is
|
|
151
|
-
* a flex or grid container itself lays its own items out in
|
|
152
|
-
* `flex.ts` and `css-grid.ts` for the
|
|
151
|
+
* a flex or grid container itself lays its own items out in, and a table
|
|
152
|
+
* shares out among its rows. Set by `flex.ts` and `css-grid.ts` for the
|
|
153
|
+
* item's own layout alone.
|
|
153
154
|
*/
|
|
154
155
|
export declare const FLEXED_HEIGHT: WeakMap<Box, number>;
|
|
155
156
|
/**
|
|
156
157
|
* The content height a flex layout gave an item without making it definite:
|
|
157
158
|
* flexed along a column that has no height of its own, which 9.8 leaves
|
|
158
159
|
* indefinite. An item that is a flex or grid container lays its own items
|
|
159
|
-
* out in it all the same — it is its used size (9.7) —
|
|
160
|
-
* takes a percentage of it. Set by
|
|
161
|
-
* alone.
|
|
160
|
+
* out in it all the same — it is its used size (9.7) — as a table shares
|
|
161
|
+
* it among its rows, and nothing in it takes a percentage of it. Set by
|
|
162
|
+
* `flex.ts` for the item's own layout alone.
|
|
162
163
|
*/
|
|
163
164
|
export declare const USED_HEIGHT: WeakMap<Box, number>;
|
|
165
|
+
/**
|
|
166
|
+
* A table a grid stretches across its area, whose `auto` width is then the
|
|
167
|
+
* one it is laid out at. `normal` stretches any grid item but a replaced
|
|
168
|
+
* one (CSS Grid 1, 6.2), a table among them, where in a block's flow a
|
|
169
|
+
* table's `auto` width is its columns' (CSS 2.1 17.5.2; Blink leaves tables
|
|
170
|
+
* out of the boxes a block stretches, `space_utils.cc`, and stretches them
|
|
171
|
+
* in a grid, `grid_item.cc`). Set by `css-grid.ts` for the item's own
|
|
172
|
+
* layout alone, and never while its widths are measured.
|
|
173
|
+
*/
|
|
174
|
+
export declare const STRETCHED_ACROSS: WeakSet<Box>;
|
|
164
175
|
/**
|
|
165
176
|
* The content height `aspect-ratio` gives a box whose height is `auto`, from
|
|
166
177
|
* its width (CSS Sizing 4, 5.1): the ratio is of the box its `box-sizing`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/html/layout/block.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAEV,aAAa,EACb,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAA6B,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAUlD,OAAO,EAEL,GAAG,EAcJ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EAMhB,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,SAAS,EAA+B,MAAM,aAAa,CAAC;AAe1E,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC;uCACmC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;gCAC4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB;yEACqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;+EAE2E;IAC3E,UAAU,EAAE;QAAE,GAAG,EAAE,GAA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SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAazD;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAO3D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAKtD;AAeD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAW3C;AAoDD;;iEAEiE;AACjE,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,CAiDpE;AAyCD;+DAC+D;AAC/D,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAyChD;AAED;;;kEAGkE;AAClE,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GACrB,IAAI,CA2BN;AAID,OAAO,EAAE,WAAW,EAAE,CAAC;AAYvB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAoBpD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAM9D"}
|
|
@@ -1903,19 +1903,30 @@ function stretchHeight(box) {
|
|
|
1903
1903
|
* stretched item's, a flexed one's in a container of a definite height (CSS
|
|
1904
1904
|
* Flexbox 9.8), a grid item's stretched down its area (CSS Grid 1, 11.1) —
|
|
1905
1905
|
* which what is in it takes its percentages of, and which an item that is
|
|
1906
|
-
* a flex or grid container itself lays its own items out in
|
|
1907
|
-
* `flex.ts` and `css-grid.ts` for the
|
|
1906
|
+
* a flex or grid container itself lays its own items out in, and a table
|
|
1907
|
+
* shares out among its rows. Set by `flex.ts` and `css-grid.ts` for the
|
|
1908
|
+
* item's own layout alone.
|
|
1908
1909
|
*/
|
|
1909
1910
|
export const FLEXED_HEIGHT = new WeakMap();
|
|
1910
1911
|
/**
|
|
1911
1912
|
* The content height a flex layout gave an item without making it definite:
|
|
1912
1913
|
* flexed along a column that has no height of its own, which 9.8 leaves
|
|
1913
1914
|
* indefinite. An item that is a flex or grid container lays its own items
|
|
1914
|
-
* out in it all the same — it is its used size (9.7) —
|
|
1915
|
-
* takes a percentage of it. Set by
|
|
1916
|
-
* alone.
|
|
1915
|
+
* out in it all the same — it is its used size (9.7) — as a table shares
|
|
1916
|
+
* it among its rows, and nothing in it takes a percentage of it. Set by
|
|
1917
|
+
* `flex.ts` for the item's own layout alone.
|
|
1917
1918
|
*/
|
|
1918
1919
|
export const USED_HEIGHT = new WeakMap();
|
|
1920
|
+
/**
|
|
1921
|
+
* A table a grid stretches across its area, whose `auto` width is then the
|
|
1922
|
+
* one it is laid out at. `normal` stretches any grid item but a replaced
|
|
1923
|
+
* one (CSS Grid 1, 6.2), a table among them, where in a block's flow a
|
|
1924
|
+
* table's `auto` width is its columns' (CSS 2.1 17.5.2; Blink leaves tables
|
|
1925
|
+
* out of the boxes a block stretches, `space_utils.cc`, and stretches them
|
|
1926
|
+
* in a grid, `grid_item.cc`). Set by `css-grid.ts` for the item's own
|
|
1927
|
+
* layout alone, and never while its widths are measured.
|
|
1928
|
+
*/
|
|
1929
|
+
export const STRETCHED_ACROSS = new WeakSet();
|
|
1919
1930
|
/**
|
|
1920
1931
|
* Hand a box's children the height their percentages resolve against —
|
|
1921
1932
|
* through inline boxes, which are no containing block, to the inline-block
|
|
@@ -2639,6 +2650,16 @@ export function intrinsicWidth(box, seen) {
|
|
|
2639
2650
|
if (contained(box, CONTAIN_WIDTH)) {
|
|
2640
2651
|
return box.style.containIntrinsicWidth ?? 0;
|
|
2641
2652
|
}
|
|
2653
|
+
// a table is as wide as its layout made it: its columns, the spacing
|
|
2654
|
+
// either side of them and between, and its captions' least (`layoutTable`)
|
|
2655
|
+
// — at no width limit its widest, and at none its narrowest. What it
|
|
2656
|
+
// holds says less: its rows run from the first column to the last, the
|
|
2657
|
+
// spacing either side outside them, and measured by them a table in a
|
|
2658
|
+
// flex row, a grid, a float or an `inline-table` came to that much too
|
|
2659
|
+
// narrow, and its columns gave it up
|
|
2660
|
+
if (box.kind === 'table' && Number.isFinite(box.width)) {
|
|
2661
|
+
return Math.max(0, box.width - box.horizontalExtra);
|
|
2662
|
+
}
|
|
2642
2663
|
// a grid laid out at no width limit has its columns at their widest, and
|
|
2643
2664
|
// is as wide as they are — an item that runs past its column makes it no
|
|
2644
2665
|
// wider — or, where it has none, as where its items end
|