@react-x11/components 0.13.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/controls.d.ts +29 -2
- package/dist/html/controls.d.ts.map +1 -1
- package/dist/html/controls.js +70 -2
- package/dist/html/controls.js.map +1 -1
- 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 +336 -16
- 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 +18 -4
- package/dist/html/css/parse.d.ts.map +1 -1
- package/dist/html/css/parse.js +66 -28
- package/dist/html/css/parse.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 +128 -15
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +547 -144
- 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.map +1 -1
- package/dist/html/css/ua.js +14 -2
- 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/fonts.d.ts +55 -5
- package/dist/html/fonts.d.ts.map +1 -1
- package/dist/html/fonts.js +284 -23
- package/dist/html/fonts.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 +104 -12
- package/dist/html/layout/block.d.ts.map +1 -1
- package/dist/html/layout/block.js +410 -39
- package/dist/html/layout/block.js.map +1 -1
- package/dist/html/layout/boxes.d.ts +72 -1
- package/dist/html/layout/boxes.d.ts.map +1 -1
- package/dist/html/layout/boxes.js +40 -2
- 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 +144 -24
- 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 +585 -85
- 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 +144 -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 +97 -31
- package/dist/html/layout/table.js.map +1 -1
- package/dist/html/node.d.ts +4 -0
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +319 -47
- package/dist/html/node.js.map +1 -1
- package/dist/html/paint.d.ts +83 -5
- package/dist/html/paint.d.ts.map +1 -1
- package/dist/html/paint.js +1474 -217
- package/dist/html/paint.js.map +1 -1
- package/dist/html/svg.d.ts +39 -9
- package/dist/html/svg.d.ts.map +1 -1
- package/dist/html/svg.js +482 -37
- package/dist/html/svg.js.map +1 -1
- package/dist/html/widgets.js +87 -7
- package/dist/html/widgets.js.map +1 -1
- 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/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 +1 -1
- package/src/html/controls.ts +85 -2
- package/src/html/css/cascade.ts +366 -8
- package/src/html/css/color.ts +29 -0
- package/src/html/css/parse.ts +71 -31
- package/src/html/css/shapes.ts +239 -0
- package/src/html/css/style.ts +652 -147
- package/src/html/css/transform.ts +459 -0
- package/src/html/css/ua.ts +15 -2
- package/src/html/css/values.ts +4 -0
- package/src/html/fonts.ts +312 -29
- package/src/html/layout/axes.ts +62 -0
- package/src/html/layout/block.ts +466 -37
- package/src/html/layout/boxes.ts +95 -3
- package/src/html/layout/cache.ts +6 -0
- package/src/html/layout/css-grid.ts +169 -32
- package/src/html/layout/flex.ts +686 -79
- package/src/html/layout/inline.ts +149 -55
- package/src/html/layout/multicol.ts +977 -0
- package/src/html/layout/shaping.ts +27 -18
- package/src/html/layout/table.ts +105 -35
- package/src/html/node.ts +354 -48
- package/src/html/paint.ts +1804 -315
- package/src/html/svg.ts +573 -36
- package/src/html/widgets.ts +95 -9
- package/src/html/woff2.ts +612 -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/svg.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Element } from 'domhandler';
|
|
2
2
|
import { isSvgRoot } from './dom.js';
|
|
3
|
+
import type { ShapeStyles } from './css/shapes.js';
|
|
3
4
|
export { isSvgRoot };
|
|
4
5
|
/** What an image says about its own size, in CSS pixels: a width and a
|
|
5
6
|
* height — a raster image always has both, an SVG those that are absolute
|
|
@@ -9,13 +10,6 @@ export interface IntrinsicSize {
|
|
|
9
10
|
height: number | null;
|
|
10
11
|
ratio: number;
|
|
11
12
|
}
|
|
12
|
-
/**
|
|
13
|
-
* The `width`/`height` of an inline `<svg>` as CSS: they are presentation
|
|
14
|
-
* attributes for the properties of the same names (SVG 2, 5.1.1), so
|
|
15
|
-
* `height="50%"` is a percentage of the containing block like a style's.
|
|
16
|
-
* A bare number is pixels; null for what CSS would not parse.
|
|
17
|
-
*/
|
|
18
|
-
export declare function svgSizeHint(value: string): string | null;
|
|
19
13
|
/**
|
|
20
14
|
* An SVG root's intrinsic size and ratio (SVG 2, "Intrinsic sizing
|
|
21
15
|
* properties of the viewport of SVG images"): its `width` and `height` where
|
|
@@ -50,23 +44,59 @@ export declare class SvgDrawing {
|
|
|
50
44
|
private _seen;
|
|
51
45
|
private _seenLast;
|
|
52
46
|
private _seenViewport;
|
|
47
|
+
/** The `fill` and `stroke` the view's tree was last given its root's,
|
|
48
|
+
* and what the document's rules gave the elements in it. */
|
|
49
|
+
private _seenPaint;
|
|
53
50
|
/** Whether a length in the tree is a percentage of the viewport; null
|
|
54
51
|
* until the tree is first read. */
|
|
55
52
|
private _percent;
|
|
53
|
+
/** Whether a `<use>` in the tree is one `SvgView` cannot draw as it
|
|
54
|
+
* stands (`needsExpanding`). */
|
|
55
|
+
private _uses;
|
|
56
|
+
/** The document's last node when a `<use>` was last looked up and its
|
|
57
|
+
* element not found: a streamed document may bring it yet, and has
|
|
58
|
+
* when its last node is another. Undefined where none was missing. */
|
|
59
|
+
private _missingAt;
|
|
56
60
|
private _failed;
|
|
57
61
|
/** An SVG image's own document, rather than an element of this one. */
|
|
58
62
|
private readonly _standalone;
|
|
59
63
|
/** The background an image's root gives its canvas; undefined until it
|
|
60
64
|
* is first read. */
|
|
61
65
|
private _canvas;
|
|
66
|
+
/** An SVG image's own style sheets, its `<style>` elements': read at its
|
|
67
|
+
* first draw, and none for most images. */
|
|
68
|
+
private _sheets;
|
|
69
|
+
/** A cascade over them for each colour scheme and scale the image is
|
|
70
|
+
* drawn at, and what each gave it: by the viewport it was asked at where
|
|
71
|
+
* a sheet reads the viewport, and under one key where none does. */
|
|
72
|
+
private _cascades;
|
|
62
73
|
constructor(root: Element, intrinsics: IntrinsicSize, standalone?: boolean);
|
|
63
74
|
/**
|
|
64
75
|
* Draw into a rectangle — the box's content box, in device pixels —
|
|
65
76
|
* clipped to it. The `viewBox`, where there is one, is fitted to it as
|
|
66
77
|
* `preserveAspectRatio` says; without one a user unit is a CSS pixel,
|
|
67
|
-
* which is `scale` device pixels. `color` is `currentColor
|
|
78
|
+
* which is `scale` device pixels. `color` is `currentColor`, and `fill`
|
|
79
|
+
* and `stroke` the root's own where the document's styles set them (SVG
|
|
80
|
+
* 2, 13.2): they are properties, which a style sheet's rule sets over
|
|
81
|
+
* the presentation attribute, and what is in the drawing inherits them
|
|
82
|
+
* from its root. `shapes` is what the rules give the elements inside it,
|
|
83
|
+
* the same way, where they give any.
|
|
84
|
+
*/
|
|
85
|
+
draw(ctx: ClipContext, x: number, y: number, w: number, h: number, scale: number, color?: string, fill?: string | null, stroke?: string | null, shapes?: ShapeStyles | null): void;
|
|
86
|
+
/**
|
|
87
|
+
* Draw an SVG image — an `<img>`'s, a background's, a list marker's — as
|
|
88
|
+
* `draw` does, painted as its own style sheets say. An image is a
|
|
89
|
+
* document of its own: no rule of the page's reaches into it, and its
|
|
90
|
+
* `color` is not the page's. What its `<style>` elements say is given
|
|
91
|
+
* its elements as the page's rules are given a drawing inline, and its
|
|
92
|
+
* root its `color`, `fill` and `stroke`, which an inline root has from
|
|
93
|
+
* its box. `scheme` is the colour scheme of the element that embeds it:
|
|
94
|
+
* what `prefers-color-scheme` answers inside it, as Chrome has it.
|
|
68
95
|
*/
|
|
69
|
-
|
|
96
|
+
drawImage(ctx: ClipContext, x: number, y: number, w: number, h: number, scale: number, scheme?: 'light' | 'dark'): void;
|
|
97
|
+
/** What an image's own style sheets give it, drawn `w` by `h` device
|
|
98
|
+
* pixels, or null where it has none. */
|
|
99
|
+
private _ownPaint;
|
|
70
100
|
private _viewFor;
|
|
71
101
|
}
|
|
72
102
|
/** The drawing of an inline `<svg>`. */
|
package/dist/html/svg.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/html/svg.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAQ,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/html/svg.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAQ,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAa,MAAM,UAAU,CAAC;AAIhD,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB;;0EAE0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAqED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,SAAK,GAAG,aAAa,CAWvE;AAwBD,0EAA0E;AAC1E,UAAU,WAAW;IACnB,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,IAAI,CAAC;IAChB,SAAS,CAAC,IAAI,IAAI,CAAC;IACnB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE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