@react-x11/components 0.16.0 → 0.17.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/css/animation.d.ts +91 -0
- package/dist/html/css/animation.d.ts.map +1 -0
- package/dist/html/css/animation.js +430 -0
- package/dist/html/css/animation.js.map +1 -0
- package/dist/html/css/cascade.d.ts +27 -4
- package/dist/html/css/cascade.d.ts.map +1 -1
- package/dist/html/css/cascade.js +94 -6
- package/dist/html/css/cascade.js.map +1 -1
- package/dist/html/css/parse.d.ts +35 -0
- package/dist/html/css/parse.d.ts.map +1 -1
- package/dist/html/css/parse.js +115 -2
- package/dist/html/css/parse.js.map +1 -1
- package/dist/html/css/style.d.ts +5 -0
- package/dist/html/css/style.d.ts.map +1 -1
- package/dist/html/css/style.js +57 -7
- package/dist/html/css/style.js.map +1 -1
- package/dist/html/css/ua.js +12 -8
- package/dist/html/css/ua.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 +28 -0
- package/dist/html/layout/boxes.js.map +1 -1
- package/dist/html/layout/flex.d.ts.map +1 -1
- package/dist/html/layout/flex.js +237 -67
- package/dist/html/layout/flex.js.map +1 -1
- package/dist/html/layout/inline.d.ts.map +1 -1
- package/dist/html/layout/inline.js +41 -11
- package/dist/html/layout/inline.js.map +1 -1
- package/dist/html/node.d.ts.map +1 -1
- package/dist/html/node.js +12 -0
- package/dist/html/node.js.map +1 -1
- package/package.json +1 -1
- package/src/html/css/animation.ts +466 -0
- package/src/html/css/cascade.ts +130 -7
- package/src/html/css/parse.ts +151 -2
- package/src/html/css/style.ts +69 -7
- package/src/html/css/ua.ts +12 -8
- package/src/html/layout/boxes.ts +40 -0
- package/src/html/layout/flex.ts +251 -75
- package/src/html/layout/inline.ts +43 -9
- package/src/html/node.ts +12 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Declaration, KeyframesRule } from './parse.js';
|
|
2
|
+
/**
|
|
3
|
+
* An easing function (CSS Easing 2), as an animation's timing function or
|
|
4
|
+
* a keyframe's: the identity, a cubic Bézier, steps, or the points of a
|
|
5
|
+
* `linear()` with every input placed.
|
|
6
|
+
*/
|
|
7
|
+
export type Easing = {
|
|
8
|
+
type: 'linear';
|
|
9
|
+
} | {
|
|
10
|
+
type: 'cubic';
|
|
11
|
+
x1: number;
|
|
12
|
+
y1: number;
|
|
13
|
+
x2: number;
|
|
14
|
+
y2: number;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'steps';
|
|
17
|
+
count: number;
|
|
18
|
+
position: StepPosition;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'points';
|
|
21
|
+
points: readonly {
|
|
22
|
+
input: number;
|
|
23
|
+
output: number;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
export type StepPosition = 'jump-start' | 'jump-end' | 'jump-none' | 'jump-both';
|
|
27
|
+
export type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
|
|
28
|
+
export type FillMode = 'none' | 'forwards' | 'backwards' | 'both';
|
|
29
|
+
export type PlayState = 'running' | 'paused';
|
|
30
|
+
/**
|
|
31
|
+
* An element's animations: each longhand's list as computed. There are as
|
|
32
|
+
* many animations as `names` has entries; a shorter list of another
|
|
33
|
+
* longhand repeats, and a longer one is cut (CSS Animations 1, 4).
|
|
34
|
+
*/
|
|
35
|
+
export interface Animations {
|
|
36
|
+
/** `animation-name`: the `@keyframes` each runs, null for `none`. */
|
|
37
|
+
readonly names: readonly (string | null)[];
|
|
38
|
+
/** `animation-duration`, in milliseconds: `auto` is 0. */
|
|
39
|
+
readonly durations: readonly number[];
|
|
40
|
+
/** `animation-timing-function`. */
|
|
41
|
+
readonly easings: readonly Easing[];
|
|
42
|
+
/** `animation-delay`, in milliseconds, before the first iteration. */
|
|
43
|
+
readonly delays: readonly number[];
|
|
44
|
+
/** `animation-iteration-count`: `infinite` is `Infinity`. */
|
|
45
|
+
readonly iterations: readonly number[];
|
|
46
|
+
readonly directions: readonly AnimationDirection[];
|
|
47
|
+
readonly fillModes: readonly FillMode[];
|
|
48
|
+
readonly playStates: readonly PlayState[];
|
|
49
|
+
}
|
|
50
|
+
/** The initial value of every longhand: one animation, of nothing. Every
|
|
51
|
+
* element without one shares it, which is how the cascade tells. */
|
|
52
|
+
export declare const NO_ANIMATIONS: Animations;
|
|
53
|
+
/** The longhands, by property name, and the list each is. */
|
|
54
|
+
export declare const ANIMATION_LONGHANDS: Record<string, keyof Animations>;
|
|
55
|
+
/**
|
|
56
|
+
* `animations` with one longhand's list set from a declaration's value, or
|
|
57
|
+
* null where the value is not a list of that longhand's values and the
|
|
58
|
+
* declaration is dropped.
|
|
59
|
+
*/
|
|
60
|
+
export declare function animationLonghand(animations: Animations, key: keyof Animations, value: string): Animations | null;
|
|
61
|
+
/**
|
|
62
|
+
* The `animation` shorthand: a comma list of animations, each its
|
|
63
|
+
* longhands' values in any order and the rest at their initial values — or
|
|
64
|
+
* null where an item is not one. The first time is the duration and the
|
|
65
|
+
* second the delay; a keyword goes to the first longhand it is a value of
|
|
66
|
+
* that the item has not set, and only then is it the name, so that
|
|
67
|
+
* `animation: none` is a fill mode and `animation: 1s forwards slide` names
|
|
68
|
+
* `slide` (CSS Animations 1, 4.9).
|
|
69
|
+
*/
|
|
70
|
+
export declare function parseAnimation(value: string): Animations | null;
|
|
71
|
+
/** A `<time>` in milliseconds: `2s`, `150ms`, a `calc()` of them; null
|
|
72
|
+
* for anything else. */
|
|
73
|
+
export declare function parseTime(value: string): number | null;
|
|
74
|
+
/**
|
|
75
|
+
* An easing function (CSS Easing 2): a keyword, `cubic-bezier()`,
|
|
76
|
+
* `steps()` or `linear()`; null for anything else.
|
|
77
|
+
*/
|
|
78
|
+
export declare function parseEasing(value: string): Easing | null;
|
|
79
|
+
/**
|
|
80
|
+
* The declarations an element's animations leave on its style once each
|
|
81
|
+
* has run one iteration at no length, one list an animation, in the order
|
|
82
|
+
* they are named — a later one over an earlier where both set a property
|
|
83
|
+
* (CSS Animations 1, 4.2). An animation leaves the frame it ends on where
|
|
84
|
+
* it fills forwards: the `to` frame, or the `from` frame where it plays in
|
|
85
|
+
* reverse, merged where several frames are at that offset, a later one's
|
|
86
|
+
* declaration over an earlier one's. A property the frame does not set is
|
|
87
|
+
* the element's own, which there is nothing to say about. Null where no
|
|
88
|
+
* animation leaves anything.
|
|
89
|
+
*/
|
|
90
|
+
export declare function restingFrames(animations: Animations, keyframesOf: (name: string) => KeyframesRule | null): Declaration[][] | null;
|
|
91
|
+
//# sourceMappingURL=animation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/html/css/animation.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7D;;;;GAIG;AACH,MAAM,MAAM,MAAM,GACd;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC;AAE7E,MAAM,MAAM,YAAY,GACtB,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAC5B,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,mBAAmB,CAAC;AAE3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wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyBxD;AAiFD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,aAAa,GAAG,IAAI,GAClD,WAAW,EAAE,EAAE,GAAG,IAAI,CAiBxB"}
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
// `animation` and its longhands (CSS Animations 1, 4), read into the lists
|
|
2
|
+
// an element's animations are, and what those animations leave on its
|
|
3
|
+
// style.
|
|
4
|
+
//
|
|
5
|
+
// Nothing here runs an animation: a document is drawn as it stands once
|
|
6
|
+
// each of its animations has run one iteration at no length. One that
|
|
7
|
+
// fills forwards then holds the frame it ended on, and any other leaves
|
|
8
|
+
// the style it started from. That is the moment the Zen Garden bench holds
|
|
9
|
+
// Chrome at (`scripts/zengarden/chrome.ts`), and the one a page that fades
|
|
10
|
+
// its panels in and holds them is meant to be seen at: drawn as it starts,
|
|
11
|
+
// a panel that animates in from nothing is never there. So the cascade asks
|
|
12
|
+
// `restingFrames` for the declarations of each such frame and applies them
|
|
13
|
+
// above the author's own, as the animation origin is (CSS Cascade 5, 6.1).
|
|
14
|
+
import { parseMath } from './calc.js';
|
|
15
|
+
import { parseNumber, splitCommas, splitValue } from './values.js';
|
|
16
|
+
const LINEAR = { type: 'linear' };
|
|
17
|
+
const EASE = { type: 'cubic', x1: 0.25, y1: 0.1, x2: 0.25, y2: 1 };
|
|
18
|
+
/** The easing keywords (CSS Easing 2, 2.2 and 3.1). */
|
|
19
|
+
const EASINGS = {
|
|
20
|
+
linear: LINEAR,
|
|
21
|
+
ease: EASE,
|
|
22
|
+
'ease-in': { type: 'cubic', x1: 0.42, y1: 0, x2: 1, y2: 1 },
|
|
23
|
+
'ease-out': { type: 'cubic', x1: 0, y1: 0, x2: 0.58, y2: 1 },
|
|
24
|
+
'ease-in-out': { type: 'cubic', x1: 0.42, y1: 0, x2: 0.58, y2: 1 },
|
|
25
|
+
'step-start': { type: 'steps', count: 1, position: 'jump-start' },
|
|
26
|
+
'step-end': { type: 'steps', count: 1, position: 'jump-end' },
|
|
27
|
+
};
|
|
28
|
+
/** The initial value of every longhand: one animation, of nothing. Every
|
|
29
|
+
* element without one shares it, which is how the cascade tells. */
|
|
30
|
+
export const NO_ANIMATIONS = {
|
|
31
|
+
names: [null],
|
|
32
|
+
durations: [0],
|
|
33
|
+
easings: [EASE],
|
|
34
|
+
delays: [0],
|
|
35
|
+
iterations: [1],
|
|
36
|
+
directions: ['normal'],
|
|
37
|
+
fillModes: ['none'],
|
|
38
|
+
playStates: ['running'],
|
|
39
|
+
};
|
|
40
|
+
/** The longhands, by property name, and the list each is. */
|
|
41
|
+
export const ANIMATION_LONGHANDS = {
|
|
42
|
+
'animation-name': 'names',
|
|
43
|
+
'animation-duration': 'durations',
|
|
44
|
+
'animation-timing-function': 'easings',
|
|
45
|
+
'animation-delay': 'delays',
|
|
46
|
+
'animation-iteration-count': 'iterations',
|
|
47
|
+
'animation-direction': 'directions',
|
|
48
|
+
'animation-fill-mode': 'fillModes',
|
|
49
|
+
'animation-play-state': 'playStates',
|
|
50
|
+
};
|
|
51
|
+
const DIRECTIONS = new Set([
|
|
52
|
+
'normal',
|
|
53
|
+
'reverse',
|
|
54
|
+
'alternate',
|
|
55
|
+
'alternate-reverse',
|
|
56
|
+
]);
|
|
57
|
+
const FILL_MODES = new Set(['none', 'forwards', 'backwards', 'both']);
|
|
58
|
+
const PLAY_STATES = new Set(['running', 'paused']);
|
|
59
|
+
/** One value of each longhand's list; undefined where it is none, and so
|
|
60
|
+
* is null but for a name, where it is `none`. */
|
|
61
|
+
const ONE = {
|
|
62
|
+
names: animationName,
|
|
63
|
+
durations: (v) => (v.toLowerCase() === 'auto' ? 0 : duration(v)),
|
|
64
|
+
easings: parseEasing,
|
|
65
|
+
delays: parseTime,
|
|
66
|
+
iterations: iterationCount,
|
|
67
|
+
directions: (v) => keyword(v, DIRECTIONS),
|
|
68
|
+
fillModes: (v) => keyword(v, FILL_MODES),
|
|
69
|
+
playStates: (v) => keyword(v, PLAY_STATES),
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* `animations` with one longhand's list set from a declaration's value, or
|
|
73
|
+
* null where the value is not a list of that longhand's values and the
|
|
74
|
+
* declaration is dropped.
|
|
75
|
+
*/
|
|
76
|
+
export function animationLonghand(animations, key, value) {
|
|
77
|
+
const read = ONE[key];
|
|
78
|
+
const list = [];
|
|
79
|
+
for (const item of splitCommas(value)) {
|
|
80
|
+
const one = read(item.trim());
|
|
81
|
+
if (one === undefined || (one === null && key !== 'names'))
|
|
82
|
+
return null;
|
|
83
|
+
list.push(one);
|
|
84
|
+
}
|
|
85
|
+
return { ...animations, [key]: list };
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The `animation` shorthand: a comma list of animations, each its
|
|
89
|
+
* longhands' values in any order and the rest at their initial values — or
|
|
90
|
+
* null where an item is not one. The first time is the duration and the
|
|
91
|
+
* second the delay; a keyword goes to the first longhand it is a value of
|
|
92
|
+
* that the item has not set, and only then is it the name, so that
|
|
93
|
+
* `animation: none` is a fill mode and `animation: 1s forwards slide` names
|
|
94
|
+
* `slide` (CSS Animations 1, 4.9).
|
|
95
|
+
*/
|
|
96
|
+
export function parseAnimation(value) {
|
|
97
|
+
const names = [];
|
|
98
|
+
const durations = [];
|
|
99
|
+
const easings = [];
|
|
100
|
+
const delays = [];
|
|
101
|
+
const iterations = [];
|
|
102
|
+
const directions = [];
|
|
103
|
+
const fillModes = [];
|
|
104
|
+
const playStates = [];
|
|
105
|
+
for (const item of splitCommas(value)) {
|
|
106
|
+
const tokens = splitValue(item.trim());
|
|
107
|
+
if (!tokens.length)
|
|
108
|
+
return null;
|
|
109
|
+
let name;
|
|
110
|
+
let time = 0;
|
|
111
|
+
let dur;
|
|
112
|
+
let del;
|
|
113
|
+
let easing;
|
|
114
|
+
let count;
|
|
115
|
+
let direction;
|
|
116
|
+
let fill;
|
|
117
|
+
let play;
|
|
118
|
+
for (const token of tokens) {
|
|
119
|
+
const lower = token.toLowerCase();
|
|
120
|
+
const t = parseTime(token);
|
|
121
|
+
if (t !== null) {
|
|
122
|
+
if (time === 0) {
|
|
123
|
+
if (t < 0)
|
|
124
|
+
return null;
|
|
125
|
+
dur = t;
|
|
126
|
+
}
|
|
127
|
+
else if (time === 1) {
|
|
128
|
+
del = t;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
time += 1;
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (easing === undefined) {
|
|
137
|
+
const e = parseEasing(token);
|
|
138
|
+
if (e !== null) {
|
|
139
|
+
easing = e;
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (count === undefined) {
|
|
144
|
+
const n = iterationCount(token);
|
|
145
|
+
if (n !== null) {
|
|
146
|
+
count = n;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (direction === undefined && DIRECTIONS.has(lower)) {
|
|
151
|
+
direction = lower;
|
|
152
|
+
}
|
|
153
|
+
else if (fill === undefined && FILL_MODES.has(lower)) {
|
|
154
|
+
fill = lower;
|
|
155
|
+
}
|
|
156
|
+
else if (play === undefined && PLAY_STATES.has(lower)) {
|
|
157
|
+
play = lower;
|
|
158
|
+
}
|
|
159
|
+
else if (name === undefined) {
|
|
160
|
+
const n = animationName(token);
|
|
161
|
+
if (n === undefined)
|
|
162
|
+
return null;
|
|
163
|
+
name = n;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
names.push(name ?? null);
|
|
170
|
+
durations.push(dur ?? 0);
|
|
171
|
+
easings.push(easing ?? EASE);
|
|
172
|
+
delays.push(del ?? 0);
|
|
173
|
+
iterations.push(count ?? 1);
|
|
174
|
+
directions.push(direction ?? 'normal');
|
|
175
|
+
fillModes.push(fill ?? 'none');
|
|
176
|
+
playStates.push(play ?? 'running');
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
names,
|
|
180
|
+
durations,
|
|
181
|
+
easings,
|
|
182
|
+
delays,
|
|
183
|
+
iterations,
|
|
184
|
+
directions,
|
|
185
|
+
fillModes,
|
|
186
|
+
playStates,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/** An `animation-name` entry: the name, null for `none`, and undefined for
|
|
190
|
+
* what is neither — a CSS-wide keyword, `default`, or no identifier. */
|
|
191
|
+
function animationName(value) {
|
|
192
|
+
const v = value.trim();
|
|
193
|
+
if (v[0] === '"' || v[0] === "'") {
|
|
194
|
+
const q = v[0];
|
|
195
|
+
return v.length >= 2 && v[v.length - 1] === q ? v.slice(1, -1) : undefined;
|
|
196
|
+
}
|
|
197
|
+
const lower = v.toLowerCase();
|
|
198
|
+
if (lower === 'none')
|
|
199
|
+
return null;
|
|
200
|
+
if (!IDENT.test(v) || RESERVED.has(lower))
|
|
201
|
+
return undefined;
|
|
202
|
+
return v;
|
|
203
|
+
}
|
|
204
|
+
const IDENT = /^-?(?:[_a-zA-Z\u0080-]|--)[\w\u0080--]*$/;
|
|
205
|
+
const RESERVED = new Set([
|
|
206
|
+
'inherit',
|
|
207
|
+
'initial',
|
|
208
|
+
'unset',
|
|
209
|
+
'revert',
|
|
210
|
+
'revert-layer',
|
|
211
|
+
'default',
|
|
212
|
+
]);
|
|
213
|
+
/** A `<time>` in milliseconds: `2s`, `150ms`, a `calc()` of them; null
|
|
214
|
+
* for anything else. */
|
|
215
|
+
export function parseTime(value) {
|
|
216
|
+
const v = value.trim().toLowerCase();
|
|
217
|
+
const m = TIME.exec(v);
|
|
218
|
+
if (m)
|
|
219
|
+
return Number(m[1]) * (m[2] === 's' ? 1000 : 1);
|
|
220
|
+
if (!v.includes('('))
|
|
221
|
+
return null;
|
|
222
|
+
const sum = parseMath(v, (token) => {
|
|
223
|
+
const unit = TIME.exec(token);
|
|
224
|
+
return unit ? Number(unit[1]) * (unit[2] === 's' ? 1000 : 1) : null;
|
|
225
|
+
});
|
|
226
|
+
return typeof sum === 'number' ? sum : null;
|
|
227
|
+
}
|
|
228
|
+
const TIME = /^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(s|ms)$/;
|
|
229
|
+
/** A duration: a time that is not negative. */
|
|
230
|
+
function duration(value) {
|
|
231
|
+
const t = parseTime(value);
|
|
232
|
+
return t !== null && t >= 0 ? t : null;
|
|
233
|
+
}
|
|
234
|
+
/** `infinite`, or a number that is not negative. */
|
|
235
|
+
function iterationCount(value) {
|
|
236
|
+
const v = value.trim().toLowerCase();
|
|
237
|
+
if (v === 'infinite')
|
|
238
|
+
return Infinity;
|
|
239
|
+
const n = parseNumber(v);
|
|
240
|
+
return n !== null && n >= 0 ? n : null;
|
|
241
|
+
}
|
|
242
|
+
function keyword(value, set) {
|
|
243
|
+
const v = value.trim().toLowerCase();
|
|
244
|
+
return set.has(v) ? v : null;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* An easing function (CSS Easing 2): a keyword, `cubic-bezier()`,
|
|
248
|
+
* `steps()` or `linear()`; null for anything else.
|
|
249
|
+
*/
|
|
250
|
+
export function parseEasing(value) {
|
|
251
|
+
const v = value.trim().toLowerCase();
|
|
252
|
+
const named = EASINGS[v];
|
|
253
|
+
if (named)
|
|
254
|
+
return named;
|
|
255
|
+
const m = /^(cubic-bezier|steps|linear)\((.*)\)$/s.exec(v);
|
|
256
|
+
if (!m)
|
|
257
|
+
return null;
|
|
258
|
+
const args = splitCommas(m[2]);
|
|
259
|
+
if (m[1] === 'cubic-bezier') {
|
|
260
|
+
if (args.length !== 4)
|
|
261
|
+
return null;
|
|
262
|
+
const [x1, y1, x2, y2] = args.map(parseNumber);
|
|
263
|
+
if (x1 === null || y1 === null || x2 === null || y2 === null)
|
|
264
|
+
return null;
|
|
265
|
+
// the x of each control point is a time, inside the interval
|
|
266
|
+
if (x1 < 0 || x1 > 1 || x2 < 0 || x2 > 1)
|
|
267
|
+
return null;
|
|
268
|
+
return { type: 'cubic', x1, y1, x2, y2 };
|
|
269
|
+
}
|
|
270
|
+
if (m[1] === 'steps') {
|
|
271
|
+
if (args.length < 1 || args.length > 2)
|
|
272
|
+
return null;
|
|
273
|
+
const count = parseNumber(args[0]);
|
|
274
|
+
if (count === null || !Number.isInteger(count))
|
|
275
|
+
return null;
|
|
276
|
+
const position = stepPosition(args[1]);
|
|
277
|
+
if (!position)
|
|
278
|
+
return null;
|
|
279
|
+
if (count < (position === 'jump-none' ? 2 : 1))
|
|
280
|
+
return null;
|
|
281
|
+
return { type: 'steps', count, position };
|
|
282
|
+
}
|
|
283
|
+
return linearPoints(args);
|
|
284
|
+
}
|
|
285
|
+
function stepPosition(value) {
|
|
286
|
+
const v = value?.trim() ?? 'jump-end';
|
|
287
|
+
if (v === 'start')
|
|
288
|
+
return 'jump-start';
|
|
289
|
+
if (v === 'end')
|
|
290
|
+
return 'jump-end';
|
|
291
|
+
return v === 'jump-start' ||
|
|
292
|
+
v === 'jump-end' ||
|
|
293
|
+
v === 'jump-none' ||
|
|
294
|
+
v === 'jump-both'
|
|
295
|
+
? v
|
|
296
|
+
: null;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* `linear()`'s stops as points (CSS Easing 2, 2.1.1): each an output with
|
|
300
|
+
* up to two input percentages, two making two points. The first point
|
|
301
|
+
* with no input is at 0 and the last at 1, an input less than one before
|
|
302
|
+
* it is that one, and the points between two that have one are spread
|
|
303
|
+
* evenly between them.
|
|
304
|
+
*/
|
|
305
|
+
function linearPoints(args) {
|
|
306
|
+
const points = [];
|
|
307
|
+
for (const arg of args) {
|
|
308
|
+
const parts = splitValue(arg.trim());
|
|
309
|
+
let output = null;
|
|
310
|
+
const inputs = [];
|
|
311
|
+
for (const part of parts) {
|
|
312
|
+
if (part.endsWith('%')) {
|
|
313
|
+
const pct = parseNumber(part.slice(0, -1));
|
|
314
|
+
if (pct === null || inputs.length === 2)
|
|
315
|
+
return null;
|
|
316
|
+
inputs.push(pct / 100);
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
if (output !== null)
|
|
320
|
+
return null;
|
|
321
|
+
output = parseNumber(part);
|
|
322
|
+
if (output === null)
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (output === null)
|
|
327
|
+
return null;
|
|
328
|
+
if (!inputs.length)
|
|
329
|
+
points.push({ input: null, output });
|
|
330
|
+
for (const input of inputs)
|
|
331
|
+
points.push({ input, output });
|
|
332
|
+
}
|
|
333
|
+
if (points.length < 2)
|
|
334
|
+
return null;
|
|
335
|
+
if (points[0].input === null)
|
|
336
|
+
points[0].input = 0;
|
|
337
|
+
const last = points[points.length - 1];
|
|
338
|
+
if (last.input === null)
|
|
339
|
+
last.input = Math.max(1, highest(points));
|
|
340
|
+
let largest = -Infinity;
|
|
341
|
+
for (const point of points) {
|
|
342
|
+
if (point.input === null)
|
|
343
|
+
continue;
|
|
344
|
+
if (point.input < largest)
|
|
345
|
+
point.input = largest;
|
|
346
|
+
largest = point.input;
|
|
347
|
+
}
|
|
348
|
+
for (let i = 1; i < points.length;) {
|
|
349
|
+
if (points[i].input !== null) {
|
|
350
|
+
i += 1;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
let j = i + 1;
|
|
354
|
+
while (points[j].input === null)
|
|
355
|
+
j += 1;
|
|
356
|
+
const from = points[i - 1].input;
|
|
357
|
+
const to = points[j].input;
|
|
358
|
+
for (let k = i; k < j; k += 1) {
|
|
359
|
+
points[k].input = from + ((to - from) * (k - i + 1)) / (j - i + 1);
|
|
360
|
+
}
|
|
361
|
+
i = j + 1;
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
type: 'points',
|
|
365
|
+
points: points,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
/** The largest input placed so far. */
|
|
369
|
+
function highest(points) {
|
|
370
|
+
let out = -Infinity;
|
|
371
|
+
for (const point of points) {
|
|
372
|
+
if (point.input !== null && point.input > out)
|
|
373
|
+
out = point.input;
|
|
374
|
+
}
|
|
375
|
+
return out;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The declarations an element's animations leave on its style once each
|
|
379
|
+
* has run one iteration at no length, one list an animation, in the order
|
|
380
|
+
* they are named — a later one over an earlier where both set a property
|
|
381
|
+
* (CSS Animations 1, 4.2). An animation leaves the frame it ends on where
|
|
382
|
+
* it fills forwards: the `to` frame, or the `from` frame where it plays in
|
|
383
|
+
* reverse, merged where several frames are at that offset, a later one's
|
|
384
|
+
* declaration over an earlier one's. A property the frame does not set is
|
|
385
|
+
* the element's own, which there is nothing to say about. Null where no
|
|
386
|
+
* animation leaves anything.
|
|
387
|
+
*/
|
|
388
|
+
export function restingFrames(animations, keyframesOf) {
|
|
389
|
+
let out = null;
|
|
390
|
+
const { names, directions, fillModes } = animations;
|
|
391
|
+
for (let i = 0; i < names.length; i += 1) {
|
|
392
|
+
const name = names[i];
|
|
393
|
+
if (name === null)
|
|
394
|
+
continue;
|
|
395
|
+
const fill = fillModes[i % fillModes.length];
|
|
396
|
+
if (fill !== 'forwards' && fill !== 'both')
|
|
397
|
+
continue;
|
|
398
|
+
const rule = keyframesOf(name);
|
|
399
|
+
if (!rule)
|
|
400
|
+
continue;
|
|
401
|
+
const direction = directions[i % directions.length];
|
|
402
|
+
const reversed = direction === 'reverse' || direction === 'alternate-reverse';
|
|
403
|
+
const frame = endFrame(rule, reversed ? 0 : 1);
|
|
404
|
+
if (frame.length)
|
|
405
|
+
(out ??= []).push(frame);
|
|
406
|
+
}
|
|
407
|
+
return out;
|
|
408
|
+
}
|
|
409
|
+
/** The declarations at one offset of a `@keyframes`, in the order written:
|
|
410
|
+
* one array per rule and offset, so the cascade sees the same one each
|
|
411
|
+
* time it asks. */
|
|
412
|
+
function endFrame(rule, offset) {
|
|
413
|
+
let ends = END_FRAMES.get(rule);
|
|
414
|
+
if (!ends) {
|
|
415
|
+
ends = [null, null];
|
|
416
|
+
END_FRAMES.set(rule, ends);
|
|
417
|
+
}
|
|
418
|
+
let frame = ends[offset];
|
|
419
|
+
if (!frame) {
|
|
420
|
+
frame = [];
|
|
421
|
+
for (const f of rule.frames) {
|
|
422
|
+
if (f.offsets.includes(offset))
|
|
423
|
+
frame.push(...f.declarations);
|
|
424
|
+
}
|
|
425
|
+
ends[offset] = frame;
|
|
426
|
+
}
|
|
427
|
+
return frame;
|
|
428
|
+
}
|
|
429
|
+
const END_FRAMES = new WeakMap();
|
|
430
|
+
//# sourceMappingURL=animation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.js","sourceRoot":"","sources":["../../../src/html/css/animation.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,sEAAsE;AACtE,SAAS;AACT,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,wEAAwE;AACxE,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA4CnE,MAAM,MAAM,GAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC1C,MAAM,IAAI,GAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;AAE3E,uDAAuD;AACvD,MAAM,OAAO,GAA2B;IACtC,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE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CAAC,CAAC;QACpB,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,EAAE,CAAC;QACX,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC;QAChE,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,GAAG,IAAI,OAAO,EAG3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Element as DomElement } from 'domhandler';
|
|
2
2
|
import type { Element } from 'domhandler';
|
|
3
|
-
import type { Declaration, Stylesheet } from './parse.js';
|
|
3
|
+
import type { Declaration, KeyframesRule, Stylesheet } from './parse.js';
|
|
4
4
|
import type { ComputedStyle, RootLook } from './style.js';
|
|
5
5
|
import type { FontFamilies } from '../fonts.js';
|
|
6
6
|
import { CounterStyles } from './counter-styles.js';
|
|
@@ -11,8 +11,11 @@ declare const enum Origin {
|
|
|
11
11
|
Presentation = 1,
|
|
12
12
|
Author = 2,
|
|
13
13
|
Inline = 3,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** What an animation leaves (`restingFrames`): over every declaration
|
|
15
|
+
* but an `!important` one (CSS Cascade 5, 6.1). */
|
|
16
|
+
Animation = 4,
|
|
17
|
+
AuthorImportant = 5,
|
|
18
|
+
InlineImportant = 6
|
|
16
19
|
}
|
|
17
20
|
interface Candidate {
|
|
18
21
|
origin: Origin;
|
|
@@ -247,6 +250,9 @@ export declare class Cascade {
|
|
|
247
250
|
readonly breakpoints: number[];
|
|
248
251
|
/** The counter styles the sheets define, over the predefined ones. */
|
|
249
252
|
readonly counterStyles: CounterStyles;
|
|
253
|
+
/** The `@keyframes` rules, by name, in document order: which one a name
|
|
254
|
+
* finds turns on the media in force (`keyframes`). */
|
|
255
|
+
private _keyframes;
|
|
250
256
|
/** A face's x-height, for `ex`, where the fonts can say. */
|
|
251
257
|
private _xHeightOf;
|
|
252
258
|
private _xHeights;
|
|
@@ -359,6 +365,14 @@ export declare class Cascade {
|
|
|
359
365
|
* band produce identical styles, which is what lets a resize skip
|
|
360
366
|
* restyling. */
|
|
361
367
|
mediaBand(width: number): number;
|
|
368
|
+
/**
|
|
369
|
+
* The `@keyframes` an animation's name finds, or null: of the rules of
|
|
370
|
+
* the name whose media hold, the one in the latest layer — no layer
|
|
371
|
+
* outranking any, as for a style rule — and the last of those, but that
|
|
372
|
+
* an `@-webkit-keyframes` never takes the place of an `@keyframes`, as in
|
|
373
|
+
* Blink (`ScopedStyleResolver::AddKeyframeStyle`).
|
|
374
|
+
*/
|
|
375
|
+
keyframes(name: string): KeyframesRule | null;
|
|
362
376
|
/** Computed styles by sharing key, for one build (`sharedStyleFor`): one
|
|
363
377
|
* map for the elements shared without matching, one for the elements
|
|
364
378
|
* shared by what they matched. */
|
|
@@ -501,8 +515,17 @@ export declare class Cascade {
|
|
|
501
515
|
/** A style's computed line height as a length, for `lh`: `normal` as
|
|
502
516
|
* its font's own, asked once per face, or 1.2em. */
|
|
503
517
|
private _lineHeightOf;
|
|
504
|
-
/**
|
|
518
|
+
/**
|
|
519
|
+
* `styleFor`, from the rules and hints already gathered for `el`, and
|
|
520
|
+
* what its animations leave on it (`restingFrames`). Which animations an
|
|
521
|
+
* element has is the cascade's answer, so an element with one that
|
|
522
|
+
* leaves a frame is styled twice: the second time with the frame's
|
|
523
|
+
* declarations among the rest, at the animation origin, over the
|
|
524
|
+
* author's normal ones and under their `!important` ones.
|
|
525
|
+
*/
|
|
505
526
|
private _computeStyle;
|
|
527
|
+
/** The style the candidates come to, in their order. */
|
|
528
|
+
private _cascadeStyle;
|
|
506
529
|
/** One declaration, its `var()`s replaced first. One that names a
|
|
507
530
|
* custom property with no value, and has no fallback, is invalid at
|
|
508
531
|
* computed-value time, and the property is as though `unset`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cascade.d.ts","sourceRoot":"","sources":["../../../src/html/css/cascade.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAS,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAW1C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"cascade.d.ts","sourceRoot":"","sources":["../../../src/html/css/cascade.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAS,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAW1C,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EAEb,UAAU,EACX,MAAM,YAAY,CAAC;AAkBpB,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAoB,MAAM,qBAAqB,CAAC;AAetE,OAAO,KAAK,EAAgB,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzE,8EAA8E;AAC9E,mBAAW,MAAM;IACf,SAAS,IAAI;IACb,YAAY,IAAI;IAChB,MAAM,IAAI;IACV,MAAM,IAAI;IACV;wDACoD;IACpD,SAAS,IAAI;IACb,eAAe,IAAI;IACnB,eAAe,IAAI;CACpB;AAED,UAAU,SAAS;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,W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