|
1 | 1 | /* eslint-disable */ |
2 | 2 | import type { Debugger } from "debug"; |
3 | | -import type { |
4 | | - AnimationDirection, |
5 | | - AnimationFillMode, |
6 | | - AnimationPlayState, |
7 | | - MediaFeatureNameFor_MediaFeatureId, |
8 | | -} from "lightningcss"; |
| 3 | +import type { MediaFeatureNameFor_MediaFeatureId } from "lightningcss"; |
9 | 4 |
|
10 | 5 | import { VAR_SYMBOL } from "../runtime/native/reactivity"; |
11 | 6 |
|
@@ -147,134 +142,12 @@ export type InlineVariable = { |
147 | 142 | [key: string]: unknown | undefined; |
148 | 143 | }; |
149 | 144 |
|
150 | | -/****************************** Animations V1 ******************************/ |
151 | | - |
152 | | -/** |
153 | | - * An animation with a fallback style value |
154 | | - */ |
155 | | -export type AnimationWithDefault_V1 = |
156 | | - | [AnimationRule_V1] |
157 | | - | [AnimationRule_V1, StyleFunction]; |
158 | | - |
159 | | -/** |
160 | | - * A CSS Animation rule |
161 | | - */ |
162 | | -export interface AnimationRule_V1 { |
163 | | - /** |
164 | | - * The animation delay. |
165 | | - */ |
166 | | - de?: number[]; |
167 | | - /** |
168 | | - * The direction of the animation. |
169 | | - */ |
170 | | - di?: AnimationDirection[]; |
171 | | - /** |
172 | | - * The animation duration. |
173 | | - */ |
174 | | - du?: number[]; |
175 | | - /** |
176 | | - * The animation fill mode. |
177 | | - */ |
178 | | - f?: AnimationFillMode[]; |
179 | | - /** |
180 | | - * The number of times the animation will run. |
181 | | - */ |
182 | | - i?: number[]; |
183 | | - /** |
184 | | - * The animation name. |
185 | | - */ |
186 | | - n?: string[]; |
187 | | - /** |
188 | | - * The current play state of the animation. |
189 | | - */ |
190 | | - p?: AnimationPlayState[]; |
191 | | - /** |
192 | | - * The animation timeline. |
193 | | - */ |
194 | | - t?: never[]; |
195 | | - /** |
196 | | - * The easing function for the animation. |
197 | | - */ |
198 | | - e?: EasingFunction[]; |
199 | | -} |
200 | | - |
201 | | -export type AnimationKeyframes_V1 = |
202 | | - | [AnimationInterpolation_V1[]] |
203 | | - | [AnimationInterpolation_V1[], AnimationEasing[]]; |
204 | | - |
205 | | -export type AnimationEasing = number | [number, EasingFunction]; |
206 | | - |
207 | | -export type AnimationInterpolation_V1 = |
208 | | - | [string, number[], StyleDescriptor[]] |
209 | | - | [string, number[], StyleDescriptor[], number] |
210 | | - | [string, number[], StyleDescriptor[], number, AnimationInterpolationType]; |
211 | | - |
212 | | -export type AnimationInterpolationType = "color" | "%" | undefined; |
213 | | - |
214 | | -export type EasingFunction = |
215 | | - | "linear" |
216 | | - | "ease" |
217 | | - | "ease-in" |
218 | | - | "ease-out" |
219 | | - | "ease-in-out" |
220 | | - | { |
221 | | - type: "cubic-bezier"; |
222 | | - /** |
223 | | - * The x-position of the first point in the curve. |
224 | | - */ |
225 | | - x1: number; |
226 | | - /** |
227 | | - * The x-position of the second point in the curve. |
228 | | - */ |
229 | | - x2: number; |
230 | | - /** |
231 | | - * The y-position of the first point in the curve. |
232 | | - */ |
233 | | - y1: number; |
234 | | - /** |
235 | | - * The y-position of the second point in the curve. |
236 | | - */ |
237 | | - y2: number; |
238 | | - } |
239 | | - | { |
240 | | - type: "steps"; |
241 | | - /** |
242 | | - * The number of intervals in the function. |
243 | | - */ |
244 | | - c: number; |
245 | | - /** |
246 | | - * The step position. |
247 | | - */ |
248 | | - p?: "start" | "end" | "jump-none" | "jump-both"; |
249 | | - }; |
250 | | - |
251 | 145 | /****************************** Animations V2 ******************************/ |
252 | 146 |
|
253 | 147 | export type Animation_V2 = [string, AnimationKeyframes_V2[]]; |
254 | 148 | export type AnimationRecord = Record<string, AnimationKeyframes_V2[]>; |
255 | 149 | export type AnimationKeyframes_V2 = [string | number, StyleDeclaration[]]; |
256 | 150 |
|
257 | | -/****************************** Transitions *****************************/ |
258 | | - |
259 | | -export type TransitionRule = { |
260 | | - /** |
261 | | - * Delay before the transition starts in milliseconds. |
262 | | - */ |
263 | | - de?: number[]; |
264 | | - /** |
265 | | - * Duration of the transition in milliseconds. |
266 | | - */ |
267 | | - du?: number[]; |
268 | | - /** |
269 | | - * Property to transition. |
270 | | - */ |
271 | | - p?: string[]; |
272 | | - /** |
273 | | - * Easing function for the transition. |
274 | | - */ |
275 | | - e?: EasingFunction[]; |
276 | | -}; |
277 | | - |
278 | 151 | /****************************** Conditions ******************************/ |
279 | 152 |
|
280 | 153 | export type MediaCondition = |
@@ -368,7 +241,7 @@ export type LoggerOptions = { |
368 | 241 | export interface CompilerCollection extends CompilerOptions { |
369 | 242 | features: FeatureFlagRecord; |
370 | 243 | rules: Map<string, StyleRule[]>; |
371 | | - keyframes: Map<string, AnimationKeyframes_V1 | AnimationKeyframes_V2[]>; |
| 244 | + keyframes: Map<string, AnimationKeyframes_V2[]>; |
372 | 245 | darkMode?: string | null; |
373 | 246 | rootVariables: VariableRecord; |
374 | 247 | universalVariables: VariableRecord; |
|
0 commit comments