@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.
Files changed (134) hide show
  1. package/dist/html/controls.d.ts +29 -2
  2. package/dist/html/controls.d.ts.map +1 -1
  3. package/dist/html/controls.js +70 -2
  4. package/dist/html/controls.js.map +1 -1
  5. package/dist/html/css/cascade.d.ts +42 -1
  6. package/dist/html/css/cascade.d.ts.map +1 -1
  7. package/dist/html/css/cascade.js +336 -16
  8. package/dist/html/css/cascade.js.map +1 -1
  9. package/dist/html/css/color.d.ts +18 -0
  10. package/dist/html/css/color.d.ts.map +1 -1
  11. package/dist/html/css/color.js +27 -0
  12. package/dist/html/css/color.js.map +1 -1
  13. package/dist/html/css/parse.d.ts +18 -4
  14. package/dist/html/css/parse.d.ts.map +1 -1
  15. package/dist/html/css/parse.js +66 -28
  16. package/dist/html/css/parse.js.map +1 -1
  17. package/dist/html/css/shapes.d.ts +44 -0
  18. package/dist/html/css/shapes.d.ts.map +1 -0
  19. package/dist/html/css/shapes.js +194 -0
  20. package/dist/html/css/shapes.js.map +1 -0
  21. package/dist/html/css/style.d.ts +128 -15
  22. package/dist/html/css/style.d.ts.map +1 -1
  23. package/dist/html/css/style.js +547 -144
  24. package/dist/html/css/style.js.map +1 -1
  25. package/dist/html/css/transform.d.ts +85 -0
  26. package/dist/html/css/transform.d.ts.map +1 -0
  27. package/dist/html/css/transform.js +425 -0
  28. package/dist/html/css/transform.js.map +1 -0
  29. package/dist/html/css/ua.d.ts.map +1 -1
  30. package/dist/html/css/ua.js +14 -2
  31. package/dist/html/css/ua.js.map +1 -1
  32. package/dist/html/css/values.d.ts +4 -0
  33. package/dist/html/css/values.d.ts.map +1 -1
  34. package/dist/html/css/values.js.map +1 -1
  35. package/dist/html/fonts.d.ts +55 -5
  36. package/dist/html/fonts.d.ts.map +1 -1
  37. package/dist/html/fonts.js +284 -23
  38. package/dist/html/fonts.js.map +1 -1
  39. package/dist/html/layout/axes.d.ts +14 -0
  40. package/dist/html/layout/axes.d.ts.map +1 -0
  41. package/dist/html/layout/axes.js +28 -0
  42. package/dist/html/layout/axes.js.map +1 -0
  43. package/dist/html/layout/block.d.ts +104 -12
  44. package/dist/html/layout/block.d.ts.map +1 -1
  45. package/dist/html/layout/block.js +410 -39
  46. package/dist/html/layout/block.js.map +1 -1
  47. package/dist/html/layout/boxes.d.ts +72 -1
  48. package/dist/html/layout/boxes.d.ts.map +1 -1
  49. package/dist/html/layout/boxes.js +40 -2
  50. package/dist/html/layout/boxes.js.map +1 -1
  51. package/dist/html/layout/cache.d.ts +1 -1
  52. package/dist/html/layout/cache.d.ts.map +1 -1
  53. package/dist/html/layout/cache.js +6 -0
  54. package/dist/html/layout/cache.js.map +1 -1
  55. package/dist/html/layout/css-grid.d.ts.map +1 -1
  56. package/dist/html/layout/css-grid.js +144 -24
  57. package/dist/html/layout/css-grid.js.map +1 -1
  58. package/dist/html/layout/flex.d.ts.map +1 -1
  59. package/dist/html/layout/flex.js +585 -85
  60. package/dist/html/layout/flex.js.map +1 -1
  61. package/dist/html/layout/inline.d.ts +3 -0
  62. package/dist/html/layout/inline.d.ts.map +1 -1
  63. package/dist/html/layout/inline.js +144 -54
  64. package/dist/html/layout/inline.js.map +1 -1
  65. package/dist/html/layout/multicol.d.ts +42 -0
  66. package/dist/html/layout/multicol.d.ts.map +1 -0
  67. package/dist/html/layout/multicol.js +897 -0
  68. package/dist/html/layout/multicol.js.map +1 -0
  69. package/dist/html/layout/shaping.d.ts +7 -0
  70. package/dist/html/layout/shaping.d.ts.map +1 -1
  71. package/dist/html/layout/shaping.js +25 -20
  72. package/dist/html/layout/shaping.js.map +1 -1
  73. package/dist/html/layout/table.d.ts.map +1 -1
  74. package/dist/html/layout/table.js +97 -31
  75. package/dist/html/layout/table.js.map +1 -1
  76. package/dist/html/node.d.ts +4 -0
  77. package/dist/html/node.d.ts.map +1 -1
  78. package/dist/html/node.js +319 -47
  79. package/dist/html/node.js.map +1 -1
  80. package/dist/html/paint.d.ts +83 -5
  81. package/dist/html/paint.d.ts.map +1 -1
  82. package/dist/html/paint.js +1474 -217
  83. package/dist/html/paint.js.map +1 -1
  84. package/dist/html/svg.d.ts +39 -9
  85. package/dist/html/svg.d.ts.map +1 -1
  86. package/dist/html/svg.js +482 -37
  87. package/dist/html/svg.js.map +1 -1
  88. package/dist/html/widgets.js +87 -7
  89. package/dist/html/widgets.js.map +1 -1
  90. package/dist/html/woff2.d.ts +14 -0
  91. package/dist/html/woff2.d.ts.map +1 -0
  92. package/dist/html/woff2.js +608 -0
  93. package/dist/html/woff2.js.map +1 -0
  94. package/dist/maps/controller.d.ts +17 -1
  95. package/dist/maps/controller.d.ts.map +1 -1
  96. package/dist/maps/controller.js +27 -7
  97. package/dist/maps/controller.js.map +1 -1
  98. package/dist/richtext/node.d.ts +8 -1
  99. package/dist/richtext/node.d.ts.map +1 -1
  100. package/dist/richtext/node.js +5 -1
  101. package/dist/richtext/node.js.map +1 -1
  102. package/dist/richtext/runs.d.ts +25 -6
  103. package/dist/richtext/runs.d.ts.map +1 -1
  104. package/dist/richtext/runs.js +240 -24
  105. package/dist/richtext/runs.js.map +1 -1
  106. package/package.json +1 -1
  107. package/src/html/controls.ts +85 -2
  108. package/src/html/css/cascade.ts +366 -8
  109. package/src/html/css/color.ts +29 -0
  110. package/src/html/css/parse.ts +71 -31
  111. package/src/html/css/shapes.ts +239 -0
  112. package/src/html/css/style.ts +652 -147
  113. package/src/html/css/transform.ts +459 -0
  114. package/src/html/css/ua.ts +15 -2
  115. package/src/html/css/values.ts +4 -0
  116. package/src/html/fonts.ts +312 -29
  117. package/src/html/layout/axes.ts +62 -0
  118. package/src/html/layout/block.ts +466 -37
  119. package/src/html/layout/boxes.ts +95 -3
  120. package/src/html/layout/cache.ts +6 -0
  121. package/src/html/layout/css-grid.ts +169 -32
  122. package/src/html/layout/flex.ts +686 -79
  123. package/src/html/layout/inline.ts +149 -55
  124. package/src/html/layout/multicol.ts +977 -0
  125. package/src/html/layout/shaping.ts +27 -18
  126. package/src/html/layout/table.ts +105 -35
  127. package/src/html/node.ts +354 -48
  128. package/src/html/paint.ts +1804 -315
  129. package/src/html/svg.ts +573 -36
  130. package/src/html/widgets.ts +95 -9
  131. package/src/html/woff2.ts +612 -0
  132. package/src/maps/controller.ts +28 -7
  133. package/src/richtext/node.ts +13 -2
  134. package/src/richtext/runs.ts +313 -35
@@ -0,0 +1,85 @@
1
+ import type { Len, UnitContext } from './values.js';
2
+ import type { ComputedStyle } from './style.js';
3
+ /** `matrix(a, b, c, d, e, f)`: the point (x, y) goes to
4
+ * (ax + cy + e, bx + dy + f), as a 2d context's `transform` has it. */
5
+ export type Matrix = readonly [number, number, number, number, number, number];
6
+ /** One function of a `transform` list: a translation by lengths, a
7
+ * percentage of the box's own width across and its height down, or a
8
+ * matrix — a run of the functions that are numbers alone, multiplied. */
9
+ export type TransformFunction = {
10
+ by: [Len, Len];
11
+ } | {
12
+ matrix: Matrix;
13
+ };
14
+ export declare const IDENTITY: Matrix;
15
+ /** `m` after `n`: the matrix that does `n` and then `m`, which is what two
16
+ * functions of a list come to, the first written being `m`. */
17
+ export declare function multiply(m: Matrix, n: Matrix): Matrix;
18
+ /** The matrix that undoes `m`, or null where none does: one that flattens
19
+ * the plane to a line or a point, which draws nothing (CSS Transforms 1,
20
+ * 6). */
21
+ export declare function invert(m: Matrix): Matrix | null;
22
+ /** Where a point goes. */
23
+ export declare function mapPoint(m: Matrix, x: number, y: number): [number, number];
24
+ /** The rectangle around where a rectangle goes: its four corners'. */
25
+ export declare function mapRect(m: Matrix, x: number, y: number, width: number, height: number): {
26
+ x: number;
27
+ y: number;
28
+ width: number;
29
+ height: number;
30
+ };
31
+ /** A rotation by degrees, clockwise as the page is seen. A quarter turn is
32
+ * its own numbers exactly: the cosine of ninety degrees computed is 6e-17,
33
+ * and a box turned on its side was a sliver of a pixel off the grid. */
34
+ export declare function rotation(degrees: number): Matrix;
35
+ /** An angle in degrees: a number with its unit, or a `calc()` of them —
36
+ * and a zero without one, where `bare` lets it be, as a transform
37
+ * function's argument does (CSS Values 4, 7.1). Null for anything else. */
38
+ export declare function parseAngle(value: string, bare?: boolean): number | null;
39
+ /**
40
+ * A `transform`: its functions in the order written. Null for `none`, and
41
+ * undefined for what is no transform list, which drops the declaration. A
42
+ * list that comes to nothing in the plane — `translateZ(0)`, which pages
43
+ * write to have a layer made — is a list of none, and a transform still: the
44
+ * box is a containing block and a stacking context as any transformed box
45
+ * is.
46
+ */
47
+ export declare function parseTransform(value: string, ctx: UnitContext): TransformFunction[] | null | undefined;
48
+ /**
49
+ * `rotate` (CSS Transforms 2, 4): an angle in degrees, about the axis out of
50
+ * the page where one is named. Null for `none`, and for a turn about any
51
+ * other axis, which is out of the plane; undefined for what is no value of
52
+ * it.
53
+ */
54
+ export declare function parseRotate(value: string): number | null | undefined;
55
+ /** `scale` (CSS Transforms 2, 5): across and down, the one factor both
56
+ * where one is written, and a depth that is nothing here. Null for
57
+ * `none`. */
58
+ export declare function parseScale(value: string): [number, number] | null | undefined;
59
+ type Transformed = Pick<ComputedStyle, 'translate' | 'rotate' | 'scale' | 'transform'>;
60
+ /** Whether a style transforms its box: any of the four properties at
61
+ * anything but `none`, whatever it comes to — which makes the box a
62
+ * containing block for all it holds and a stacking context (CSS
63
+ * Transforms 1, 3). */
64
+ export declare function transformed(style: Transformed): boolean;
65
+ /**
66
+ * A style's whole transform, for a box `width` by `height`, which its
67
+ * percentages are of: `translate`, then `rotate`, then `scale`, then the
68
+ * `transform` list (CSS Transforms 2, 7) — without its origin, which is
69
+ * where the box is.
70
+ */
71
+ export declare function matrixOf(style: Transformed, width: number, height: number): Matrix;
72
+ /** The part of a matrix that turns, scales and skews. */
73
+ export type Linear = readonly [number, number, number, number];
74
+ /**
75
+ * What a style's transform does besides move the box: null where that is
76
+ * nothing, as it is for every box but a few. The same for a box of any
77
+ * size — a translation's percentages are no part of it — so kept by the
78
+ * style.
79
+ */
80
+ export declare function linearOf(style: Transformed): Linear | null;
81
+ /** `linear` about a point: the matrix a box at that origin is drawn
82
+ * through, in the coordinates the point is in. */
83
+ export declare function about(linear: Linear, x: number, y: number): Matrix;
84
+ export {};
85
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/html/css/transform.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;wEACwE;AACxE,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/E;;0EAE0E;AAC1E,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,eAAO,MAAM,QAAQ,EAAE,MAA2B,CAAC;AAEnD;gEACgE;AAChE,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CASrD;AAED;;UAEU;AACV,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ/C;AAED,0BAA0B;AAC1B,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1E;AAED,sEAAsE;AACtE,wBAAgB,OAAO,CACrB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb;IAAE,CAAC,EAAE,MAAM,CAA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,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlE"}
@@ -0,0 +1,425 @@
1
+ // `transform`, and the properties that are one function of it each —
2
+ // `translate`, `rotate` and `scale` (CSS Transforms 1 and 2) — read down to
3
+ // what is drawn: a matrix in the plane.
4
+ //
5
+ // A transform moves nothing but the box it is on and what that holds, so it
6
+ // is no part of layout: the box is laid out where it would be, moved by the
7
+ // matrix's translation (`applyRelativeOffsets`), and painted through the
8
+ // rest of it, about its `transform-origin` (`paintTransformed`). The two
9
+ // halves are one matrix: with `L` its linear part, `t` its translation and
10
+ // `O` the origin, a point goes to `O + L(p - O) + t`, which is `L` about the
11
+ // origin of the box `t` moved. So the translation stays the layout's, where
12
+ // a hit test, a control's rectangle and the ink bounds already find it, and
13
+ // only a box that turns, scales or skews is painted through a matrix.
14
+ //
15
+ // The functions out of the plane — `rotateX()`, `translateZ()`,
16
+ // `perspective()` — are read and are no part of the matrix: a declaration
17
+ // that names one is kept, and drawn as the rest of its list.
18
+ import { parseMath } from './calc.js';
19
+ import { AUTO, parseLength, parseNumber, resolve, splitCommas, splitValue, } from './values.js';
20
+ export const IDENTITY = [1, 0, 0, 1, 0, 0];
21
+ /** `m` after `n`: the matrix that does `n` and then `m`, which is what two
22
+ * functions of a list come to, the first written being `m`. */
23
+ export function multiply(m, n) {
24
+ return [
25
+ m[0] * n[0] + m[2] * n[1],
26
+ m[1] * n[0] + m[3] * n[1],
27
+ m[0] * n[2] + m[2] * n[3],
28
+ m[1] * n[2] + m[3] * n[3],
29
+ m[0] * n[4] + m[2] * n[5] + m[4],
30
+ m[1] * n[4] + m[3] * n[5] + m[5],
31
+ ];
32
+ }
33
+ /** The matrix that undoes `m`, or null where none does: one that flattens
34
+ * the plane to a line or a point, which draws nothing (CSS Transforms 1,
35
+ * 6). */
36
+ export function invert(m) {
37
+ const det = m[0] * m[3] - m[1] * m[2];
38
+ if (!Number.isFinite(det) || Math.abs(det) < 1e-12)
39
+ return null;
40
+ const a = m[3] / det;
41
+ const b = -m[1] / det;
42
+ const c = -m[2] / det;
43
+ const d = m[0] / det;
44
+ return [a, b, c, d, -(a * m[4] + c * m[5]), -(b * m[4] + d * m[5])];
45
+ }
46
+ /** Where a point goes. */
47
+ export function mapPoint(m, x, y) {
48
+ return [m[0] * x + m[2] * y + m[4], m[1] * x + m[3] * y + m[5]];
49
+ }
50
+ /** The rectangle around where a rectangle goes: its four corners'. */
51
+ export function mapRect(m, x, y, width, height) {
52
+ let x1 = Infinity;
53
+ let y1 = Infinity;
54
+ let x2 = -Infinity;
55
+ let y2 = -Infinity;
56
+ for (let i = 0; i < 4; i += 1) {
57
+ const px = i & 1 ? x + width : x;
58
+ const py = i & 2 ? y + height : y;
59
+ const qx = m[0] * px + m[2] * py + m[4];
60
+ const qy = m[1] * px + m[3] * py + m[5];
61
+ if (qx < x1)
62
+ x1 = qx;
63
+ if (qx > x2)
64
+ x2 = qx;
65
+ if (qy < y1)
66
+ y1 = qy;
67
+ if (qy > y2)
68
+ y2 = qy;
69
+ }
70
+ return { x: x1, y: y1, width: x2 - x1, height: y2 - y1 };
71
+ }
72
+ /** A rotation by degrees, clockwise as the page is seen. A quarter turn is
73
+ * its own numbers exactly: the cosine of ninety degrees computed is 6e-17,
74
+ * and a box turned on its side was a sliver of a pixel off the grid. */
75
+ export function rotation(degrees) {
76
+ const quarters = degrees / 90;
77
+ if (Number.isInteger(quarters)) {
78
+ const at = ((quarters % 4) + 4) % 4;
79
+ const cos = at === 0 ? 1 : at === 2 ? -1 : 0;
80
+ const sin = at === 1 ? 1 : at === 3 ? -1 : 0;
81
+ // no negative zero: it is a zero that compares unequal to one
82
+ return [cos, sin, sin === 0 ? 0 : -sin, cos, 0, 0];
83
+ }
84
+ const angle = (degrees * Math.PI) / 180;
85
+ const cos = Math.cos(angle);
86
+ const sin = Math.sin(angle);
87
+ return [cos, sin, -sin, cos, 0, 0];
88
+ }
89
+ const DEGREES = {
90
+ deg: 1,
91
+ grad: 0.9,
92
+ rad: 180 / Math.PI,
93
+ turn: 360,
94
+ };
95
+ const ANGLE = /^([+-]?(?:\d*\.\d+|\d+)(?:e[+-]?\d+)?)(deg|grad|rad|turn)$/;
96
+ /** An angle in degrees: a number with its unit, or a `calc()` of them —
97
+ * and a zero without one, where `bare` lets it be, as a transform
98
+ * function's argument does (CSS Values 4, 7.1). Null for anything else. */
99
+ export function parseAngle(value, bare = true) {
100
+ const v = value.trim().toLowerCase();
101
+ const m = ANGLE.exec(v);
102
+ if (m)
103
+ return Number(m[1]) * DEGREES[m[2]];
104
+ if (bare && /^[+-]?0*\.?0+$/.test(v))
105
+ return 0;
106
+ if (!v.includes('('))
107
+ return null;
108
+ const sum = parseMath(v, (token) => {
109
+ const unit = ANGLE.exec(token);
110
+ return unit ? Number(unit[1]) * DEGREES[unit[2]] : null;
111
+ });
112
+ return typeof sum === 'number' ? sum : null;
113
+ }
114
+ /** A scale factor: a number, or a percentage of one (CSS Transforms 2, 5),
115
+ * or a `calc()` of either. */
116
+ function parseFactor(value) {
117
+ const v = value.trim();
118
+ if (v.endsWith('%')) {
119
+ const n = parseNumber(v.slice(0, -1));
120
+ return n === null ? null : n / 100;
121
+ }
122
+ const n = parseNumber(v);
123
+ if (n !== null)
124
+ return n;
125
+ if (!v.includes('('))
126
+ return null;
127
+ const sum = parseMath(v.toLowerCase(), () => null);
128
+ if (sum === null || sum === AUTO || typeof sum === 'number')
129
+ return null;
130
+ return sum.of ? null : sum.pct / 100;
131
+ }
132
+ function parseOffset(value, ctx) {
133
+ if (value === undefined)
134
+ return null;
135
+ const len = parseLength(value, ctx);
136
+ return len === AUTO ? null : len;
137
+ }
138
+ /**
139
+ * A `transform`: its functions in the order written. Null for `none`, and
140
+ * undefined for what is no transform list, which drops the declaration. A
141
+ * list that comes to nothing in the plane — `translateZ(0)`, which pages
142
+ * write to have a layer made — is a list of none, and a transform still: the
143
+ * box is a containing block and a stacking context as any transformed box
144
+ * is.
145
+ */
146
+ export function parseTransform(value, ctx) {
147
+ if (value.trim().toLowerCase() === 'none')
148
+ return null;
149
+ const parts = splitValue(value);
150
+ if (!parts.length)
151
+ return undefined;
152
+ const out = [];
153
+ for (const part of parts) {
154
+ const m = /^([a-z0-9]+)\((.*)\)$/is.exec(part.trim());
155
+ if (!m)
156
+ return undefined;
157
+ const args = splitCommas(m[2]).map((a) => a.trim());
158
+ const fn = functionOf(m[1].toLowerCase(), args, ctx);
159
+ if (fn === undefined)
160
+ return undefined;
161
+ if (fn === null)
162
+ continue;
163
+ const last = out[out.length - 1];
164
+ if ('matrix' in fn && last && 'matrix' in last) {
165
+ out[out.length - 1] = { matrix: multiply(last.matrix, fn.matrix) };
166
+ }
167
+ else
168
+ out.push(fn);
169
+ }
170
+ return out;
171
+ }
172
+ /** One function: what it is in the plane, null where that is nothing, and
173
+ * undefined where it is no function or its arguments are not its own. */
174
+ function functionOf(name, args, ctx) {
175
+ const count = args.length;
176
+ const angles = () => {
177
+ const out = args.map((a) => parseAngle(a));
178
+ return out.some((a) => a === null) ? null : out;
179
+ };
180
+ const factors = () => {
181
+ const out = args.map(parseFactor);
182
+ return out.some((n) => n === null) ? null : out;
183
+ };
184
+ const tan = (degrees) => Math.tan((degrees * Math.PI) / 180);
185
+ switch (name) {
186
+ case 'translate': {
187
+ if (count < 1 || count > 2)
188
+ return undefined;
189
+ const x = parseOffset(args[0], ctx);
190
+ const y = count === 2 ? parseOffset(args[1], ctx) : 0;
191
+ return x === null || y === null ? undefined : { by: [x, y] };
192
+ }
193
+ case 'translate3d': {
194
+ if (count !== 3)
195
+ return undefined;
196
+ const x = parseOffset(args[0], ctx);
197
+ const y = parseOffset(args[1], ctx);
198
+ if (x === null || y === null)
199
+ return undefined;
200
+ // a depth is a length, and no percentage
201
+ return typeof parseOffset(args[2], ctx) === 'number'
202
+ ? { by: [x, y] }
203
+ : undefined;
204
+ }
205
+ case 'translatex':
206
+ case 'translatey': {
207
+ const by = count === 1 ? parseOffset(args[0], ctx) : null;
208
+ if (by === null)
209
+ return undefined;
210
+ return { by: name === 'translatex' ? [by, 0] : [0, by] };
211
+ }
212
+ case 'translatez':
213
+ return count === 1 && typeof parseOffset(args[0], ctx) === 'number'
214
+ ? null
215
+ : undefined;
216
+ case 'scale': {
217
+ const f = count >= 1 && count <= 2 ? factors() : null;
218
+ return f ? { matrix: [f[0], 0, 0, f[1] ?? f[0], 0, 0] } : undefined;
219
+ }
220
+ case 'scale3d': {
221
+ const f = count === 3 ? factors() : null;
222
+ return f ? { matrix: [f[0], 0, 0, f[1], 0, 0] } : undefined;
223
+ }
224
+ case 'scalex':
225
+ case 'scaley': {
226
+ const f = count === 1 ? factors() : null;
227
+ if (!f)
228
+ return undefined;
229
+ return {
230
+ matrix: name === 'scalex' ? [f[0], 0, 0, 1, 0, 0] : [1, 0, 0, f[0], 0, 0],
231
+ };
232
+ }
233
+ case 'scalez':
234
+ return count === 1 && factors() ? null : undefined;
235
+ case 'rotate':
236
+ case 'rotatez': {
237
+ const a = count === 1 ? angles() : null;
238
+ return a ? { matrix: rotation(a[0]) } : undefined;
239
+ }
240
+ case 'rotatex':
241
+ case 'rotatey':
242
+ return count === 1 && angles() ? null : undefined;
243
+ case 'rotate3d': {
244
+ if (count !== 4)
245
+ return undefined;
246
+ const axis = args.slice(0, 3).map(parseNumber);
247
+ const angle = parseAngle(args[3]);
248
+ if (angle === null || axis.some((n) => n === null))
249
+ return undefined;
250
+ return axisRotation(axis, angle);
251
+ }
252
+ case 'skew': {
253
+ const a = count >= 1 && count <= 2 ? angles() : null;
254
+ return a
255
+ ? { matrix: [1, tan(a[1] ?? 0), tan(a[0]), 1, 0, 0] }
256
+ : undefined;
257
+ }
258
+ case 'skewx':
259
+ case 'skewy': {
260
+ const a = count === 1 ? angles() : null;
261
+ if (!a)
262
+ return undefined;
263
+ return {
264
+ matrix: name === 'skewx'
265
+ ? [1, 0, tan(a[0]), 1, 0, 0]
266
+ : [1, tan(a[0]), 0, 1, 0, 0],
267
+ };
268
+ }
269
+ case 'matrix':
270
+ case 'matrix3d': {
271
+ const n = args.map(parseNumber);
272
+ const flat = name === 'matrix';
273
+ if (n.length !== (flat ? 6 : 16) || n.some((v) => v === null)) {
274
+ return undefined;
275
+ }
276
+ const v = n;
277
+ // the plane's part of a 4×4, whose columns are written in turn; a
278
+ // matrix's translation is in CSS pixels, as a length without its unit
279
+ const [a, b, c, d, e, f] = flat
280
+ ? v
281
+ : [v[0], v[1], v[4], v[5], v[12], v[13]];
282
+ return { matrix: [a, b, c, d, e * ctx.scale, f * ctx.scale] };
283
+ }
284
+ case 'perspective': {
285
+ if (count !== 1)
286
+ return undefined;
287
+ if (args[0].toLowerCase() === 'none')
288
+ return null;
289
+ return typeof parseOffset(args[0], ctx) === 'number' ? null : undefined;
290
+ }
291
+ default:
292
+ return undefined;
293
+ }
294
+ }
295
+ /** A turn about an axis, where the axis is the one out of the page — the
296
+ * other way where it points into it; about any other it is out of the
297
+ * plane, and nothing here. */
298
+ function axisRotation(axis, angle) {
299
+ const [x, y, z] = axis;
300
+ if (x !== 0 || y !== 0 || z === 0)
301
+ return null;
302
+ return { matrix: rotation(z > 0 ? angle : -angle) };
303
+ }
304
+ /**
305
+ * `rotate` (CSS Transforms 2, 4): an angle in degrees, about the axis out of
306
+ * the page where one is named. Null for `none`, and for a turn about any
307
+ * other axis, which is out of the plane; undefined for what is no value of
308
+ * it.
309
+ */
310
+ export function parseRotate(value) {
311
+ const parts = splitValue(value.trim().toLowerCase());
312
+ if (parts.length === 1) {
313
+ if (parts[0] === 'none')
314
+ return null;
315
+ return parseAngle(parts[0], false) ?? undefined;
316
+ }
317
+ // an axis and an angle, in either order; the axis a letter or a vector
318
+ const at = parts.findIndex((p) => parseAngle(p, false) !== null);
319
+ const angle = at < 0 ? null : parseAngle(parts[at], false);
320
+ if (angle === null || (at !== 0 && at !== parts.length - 1))
321
+ return undefined;
322
+ const axis = parts.filter((_, i) => i !== at);
323
+ if (axis.length === 1) {
324
+ if (axis[0] === 'z')
325
+ return angle;
326
+ return axis[0] === 'x' || axis[0] === 'y' ? null : undefined;
327
+ }
328
+ const vector = axis.map(parseNumber);
329
+ if (vector.length !== 3 || vector.some((n) => n === null))
330
+ return undefined;
331
+ const turned = axisRotation(vector, 1);
332
+ if (!turned)
333
+ return null;
334
+ return vector[2] > 0 ? angle : -angle;
335
+ }
336
+ /** `scale` (CSS Transforms 2, 5): across and down, the one factor both
337
+ * where one is written, and a depth that is nothing here. Null for
338
+ * `none`. */
339
+ export function parseScale(value) {
340
+ const parts = splitValue(value.trim());
341
+ if (parts.length === 1 && parts[0].toLowerCase() === 'none')
342
+ return null;
343
+ if (parts.length < 1 || parts.length > 3)
344
+ return undefined;
345
+ const factors = parts.map(parseFactor);
346
+ if (factors.some((f) => f === null))
347
+ return undefined;
348
+ const [x, y] = factors;
349
+ return [x, y ?? x];
350
+ }
351
+ /** Whether a style transforms its box: any of the four properties at
352
+ * anything but `none`, whatever it comes to — which makes the box a
353
+ * containing block for all it holds and a stacking context (CSS
354
+ * Transforms 1, 3). */
355
+ export function transformed(style) {
356
+ return (style.transform !== null ||
357
+ style.translate !== null ||
358
+ style.rotate !== null ||
359
+ style.scale !== null);
360
+ }
361
+ /**
362
+ * A style's whole transform, for a box `width` by `height`, which its
363
+ * percentages are of: `translate`, then `rotate`, then `scale`, then the
364
+ * `transform` list (CSS Transforms 2, 7) — without its origin, which is
365
+ * where the box is.
366
+ */
367
+ export function matrixOf(style, width, height) {
368
+ let m = IDENTITY;
369
+ const moved = style.translate;
370
+ if (moved) {
371
+ m = [1, 0, 0, 1, resolve(moved[0], width, 0), resolve(moved[1], height, 0)];
372
+ }
373
+ if (style.rotate !== null)
374
+ m = multiply(m, rotation(style.rotate));
375
+ if (style.scale) {
376
+ m = multiply(m, [style.scale[0], 0, 0, style.scale[1], 0, 0]);
377
+ }
378
+ if (style.transform) {
379
+ for (const fn of style.transform) {
380
+ m = multiply(m, 'matrix' in fn
381
+ ? fn.matrix
382
+ : [
383
+ 1,
384
+ 0,
385
+ 0,
386
+ 1,
387
+ resolve(fn.by[0], width, 0),
388
+ resolve(fn.by[1], height, 0),
389
+ ]);
390
+ }
391
+ }
392
+ return m;
393
+ }
394
+ const LINEAR = new WeakMap();
395
+ /**
396
+ * What a style's transform does besides move the box: null where that is
397
+ * nothing, as it is for every box but a few. The same for a box of any
398
+ * size — a translation's percentages are no part of it — so kept by the
399
+ * style.
400
+ */
401
+ export function linearOf(style) {
402
+ if (style.transform === null &&
403
+ style.rotate === null &&
404
+ style.scale === null) {
405
+ return null;
406
+ }
407
+ let linear = LINEAR.get(style);
408
+ if (linear === undefined) {
409
+ const m = matrixOf(style, 0, 0);
410
+ const near = (a, b) => Math.abs(a - b) < 1e-9;
411
+ linear =
412
+ near(m[0], 1) && near(m[1], 0) && near(m[2], 0) && near(m[3], 1)
413
+ ? null
414
+ : [m[0], m[1], m[2], m[3]];
415
+ LINEAR.set(style, linear);
416
+ }
417
+ return linear;
418
+ }
419
+ /** `linear` about a point: the matrix a box at that origin is drawn
420
+ * through, in the coordinates the point is in. */
421
+ export function about(linear, x, y) {
422
+ const [a, b, c, d] = linear;
423
+ return [a, b, c, d, x - (a * x + c * y), y - (b * x + d * y)];
424
+ }
425
+ //# sourceMappingURL=transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/html/css/transform.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,4EAA4E;AAC5E,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,EAAE;AACF,gEAAgE;AAChE,0EAA0E;AAC1E,6DAA6D;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,GACX,M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AG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ua.d.ts","sourceRoot":"","sources":["../../../src/html/css/ua.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,wBAA+B,CAAC;AAM3D,wBAAgB,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAiB9C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAevD"}
1
+ {"version":3,"file":"ua.d.ts","sourceRoot":"","sources":["../../../src/html/css/ua.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,wBAA+B,CAAC;AAM3D,wBAAgB,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAkB9C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAevD"}
@@ -8,6 +8,12 @@
8
8
  // already using, so an unstyled document reads as part of the window. An
9
9
  // author stylesheet still overrides all of it — that is what makes it a UA
10
10
  // sheet and not a skin.
11
+ //
12
+ // The theme has the colours of one scheme. A document whose root is of the
13
+ // other — `color-scheme: light` under a dark palette — is a browser's in
14
+ // that one: the text and the links a `light-dark()` of the theme's and
15
+ // Chrome's (`inScheme`), over a canvas of that scheme (`paintDocument`).
16
+ import { SCHEME_COLORS } from './color.js';
11
17
  import { parseStylesheet } from './parse.js';
12
18
  /**
13
19
  * The declaration blocks that draw a control as the palette's widget rather
@@ -24,6 +30,7 @@ export const PALETTE_CHROME = new WeakSet();
24
30
  const CACHE = new Map();
25
31
  export function lookKey(look) {
26
32
  return [
33
+ look.colorScheme,
27
34
  look.color,
28
35
  look.fontFamily,
29
36
  look.fontSize,
@@ -67,6 +74,11 @@ export function uaStylesheet(look) {
67
74
  */
68
75
  function uaText(look) {
69
76
  const mono = look.monoFamily;
77
+ // the theme's colour where the element's scheme is the theme's, and a
78
+ // browser's own for the other scheme where it is not
79
+ const inScheme = (own, which) => look.colorScheme === 'dark'
80
+ ? `light-dark(${SCHEME_COLORS.light[which]}, ${own})`
81
+ : `light-dark(${own}, ${SCHEME_COLORS.dark[which]})`;
70
82
  return `
71
83
  html, body, div, p, h1, h2, h3, h4, h5, h6, ol, ul, li, dl, dt, dd,
72
84
  blockquote, pre, hr, table, form, fieldset, figure, figcaption, address,
@@ -89,7 +101,7 @@ bdo { unicode-bidi: isolate-override; }
89
101
  /* the theme's colour and font are the root's (\`initialStyle\`), and the
90
102
  body inherits them, from an author's \`html\` rule too */
91
103
  body { margin: 8px; }
92
- html { color: ${look.color}; }
104
+ html { color: ${inScheme(look.color, 'text')}; }
93
105
 
94
106
  p { margin: 1em 0; }
95
107
  h1 { font-size: 2em; font-weight: bold; margin: 0.67em 0; }
@@ -154,7 +166,7 @@ q::after { content: close-quote; }
154
166
  pointer moves, and a rule that changes nothing (the link is already
155
167
  underlined) would make every plain document pay that. An 'a' with no
156
168
  'href' is an anchor, not a link, and is drawn as the text around it. */
157
- a[href] { color: ${look.linkColor}; text-decoration: underline; cursor: pointer; }
169
+ a[href] { color: ${inScheme(look.linkColor, 'link')}; text-decoration: underline; cursor: pointer; }
158
170
 
159
171
  hr {
160
172
  margin: 0.5em auto;
@@ -1 +1 @@
1
- {"version":3,"file":"ua.js","sourceRoot":"","sources":["../../../src/html/css/ua.ts"],"names":[],"mappings":"A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,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA2BjB,IAAI,CAAC,WAAW;WAChC,IAAI,CAAC,UAAU;;;;;iBAKT,IAAI;;;;;;;qCAOgB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;mBAyBtB,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;;;;;0BAKzB,IAAI,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDzB,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,UAAU;eAC3C,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,QAAQ;;0BAE1B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAgCP,IAAI,CAAC,WAAW;sBACjB,IAAI,CAAC,OAAO;WACvB,IAAI,CAAC,KAAK;;;;4BAIO,IAAI,CAAC,UAAU;;4EAEiC,IAAI,CAAC,WAAW;;;;;;;;;;;CAW3F,CAAC;AACF,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO;;aAEI,IAAI,CAAC,WAAW;YACjB,IAAI,CAAC,aAAa,YAAY,IAAI,CAAC,WAAW;mBACvC,IAAI,CAAC,aAAa;;CAEpC,CAAC;AACF,CAAC"}
@@ -63,6 +63,10 @@ export interface UnitContext {
63
63
  * itself, with `@font-face`, put as the text engine knows them — see
64
64
  * `fonts.ts`. Absent, the list is the one the author wrote. */
65
65
  families?: (list: string) => string;
66
+ /** The family a `font-family` list with no generic family at its end
67
+ * goes on to: the document's own, for a list an author wrote, and none
68
+ * for the UA sheet's, which names the host's faces. */
69
+ fallbackFamily?: () => string | null;
66
70
  /** The element's line height and the root's, for `lh` and `rlh`, asked
67
71
  * only for a length in them; 1.2em where they are missing. */
68
72
  lh?: () => number;
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../src/html/css/values.ts"],"names":[],"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