@antv/g 6.2.1 → 6.3.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.
Files changed (65) hide show
  1. package/dist/index.esm.js +3140 -5
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/index.js +3158 -26
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.umd.min.js +25 -22
  6. package/dist/index.umd.min.js.map +1 -1
  7. package/package.json +8 -8
  8. package/types/index.d.ts +5 -3
  9. package/types/index.d.ts.map +1 -1
  10. package/types/plugins/camera-api/AdvancedCamera.d.ts +44 -0
  11. package/types/plugins/camera-api/AdvancedCamera.d.ts.map +1 -0
  12. package/types/plugins/camera-api/index.d.ts +3 -0
  13. package/types/plugins/camera-api/index.d.ts.map +1 -0
  14. package/types/plugins/components/Arrow.d.ts +61 -0
  15. package/types/plugins/components/Arrow.d.ts.map +1 -0
  16. package/types/plugins/components/Sector.d.ts +21 -0
  17. package/types/plugins/components/Sector.d.ts.map +1 -0
  18. package/types/plugins/components/Sector2.d.ts +9 -0
  19. package/types/plugins/components/Sector2.d.ts.map +1 -0
  20. package/types/plugins/components/index.d.ts +3 -0
  21. package/types/plugins/components/index.d.ts.map +1 -0
  22. package/types/plugins/image-exporter/ImageExporter.d.ts +27 -0
  23. package/types/plugins/image-exporter/ImageExporter.d.ts.map +1 -0
  24. package/types/plugins/image-exporter/index.d.ts +3 -0
  25. package/types/plugins/image-exporter/index.d.ts.map +1 -0
  26. package/types/plugins/image-exporter/types.d.ts +12 -0
  27. package/types/plugins/image-exporter/types.d.ts.map +1 -0
  28. package/types/plugins/pattern/dots.d.ts +16 -0
  29. package/types/plugins/pattern/dots.d.ts.map +1 -0
  30. package/types/plugins/pattern/index.d.ts +4 -0
  31. package/types/plugins/pattern/index.d.ts.map +1 -0
  32. package/types/plugins/pattern/interfaces.d.ts +78 -0
  33. package/types/plugins/pattern/interfaces.d.ts.map +1 -0
  34. package/types/plugins/pattern/lines.d.ts +19 -0
  35. package/types/plugins/pattern/lines.d.ts.map +1 -0
  36. package/types/plugins/pattern/squares.d.ts +21 -0
  37. package/types/plugins/pattern/squares.d.ts.map +1 -0
  38. package/types/plugins/pattern/util.d.ts +18 -0
  39. package/types/plugins/pattern/util.d.ts.map +1 -0
  40. package/types/plugins/web-animations-api/dom/Animation.d.ts +135 -0
  41. package/types/plugins/web-animations-api/dom/Animation.d.ts.map +1 -0
  42. package/types/plugins/web-animations-api/dom/AnimationEffectTiming.d.ts +59 -0
  43. package/types/plugins/web-animations-api/dom/AnimationEffectTiming.d.ts.map +1 -0
  44. package/types/plugins/web-animations-api/dom/AnimationEvent.d.ts +12 -0
  45. package/types/plugins/web-animations-api/dom/AnimationEvent.d.ts.map +1 -0
  46. package/types/plugins/web-animations-api/dom/AnimationTimeline.d.ts +40 -0
  47. package/types/plugins/web-animations-api/dom/AnimationTimeline.d.ts.map +1 -0
  48. package/types/plugins/web-animations-api/dom/KeyframeEffect.d.ts +48 -0
  49. package/types/plugins/web-animations-api/dom/KeyframeEffect.d.ts.map +1 -0
  50. package/types/plugins/web-animations-api/dom/KeyframeList.d.ts +3 -0
  51. package/types/plugins/web-animations-api/dom/KeyframeList.d.ts.map +1 -0
  52. package/types/plugins/web-animations-api/dom/index.d.ts +6 -0
  53. package/types/plugins/web-animations-api/dom/index.d.ts.map +1 -0
  54. package/types/plugins/web-animations-api/index.d.ts +3 -0
  55. package/types/plugins/web-animations-api/index.d.ts.map +1 -0
  56. package/types/plugins/web-animations-api/utils/animation.d.ts +16 -0
  57. package/types/plugins/web-animations-api/utils/animation.d.ts.map +1 -0
  58. package/types/plugins/web-animations-api/utils/bezier-easing.d.ts +21 -0
  59. package/types/plugins/web-animations-api/utils/bezier-easing.d.ts.map +1 -0
  60. package/types/plugins/web-animations-api/utils/custom-easing.d.ts +16 -0
  61. package/types/plugins/web-animations-api/utils/custom-easing.d.ts.map +1 -0
  62. package/types/plugins/web-animations-api/utils/index.d.ts +5 -0
  63. package/types/plugins/web-animations-api/utils/index.d.ts.map +1 -0
  64. package/types/plugins/web-animations-api/utils/interpolation.d.ts +3 -0
  65. package/types/plugins/web-animations-api/utils/interpolation.d.ts.map +1 -0
@@ -0,0 +1,59 @@
1
+ import type { KeyframeEffect } from './KeyframeEffect';
2
+ /**
3
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming
4
+ */
5
+ export declare class AnimationEffectTiming implements EffectTiming {
6
+ /**
7
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/delay
8
+ */
9
+ delay: number;
10
+ /**
11
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/direction
12
+ */
13
+ direction: PlaybackDirection;
14
+ /**
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/duration
16
+ */
17
+ duration: number | 'auto';
18
+ /**
19
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing
20
+ */
21
+ private _easing;
22
+ easingFunction: (x: number) => number;
23
+ get easing(): string;
24
+ set easing(value: string);
25
+ /**
26
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/endDelay
27
+ */
28
+ endDelay: number;
29
+ /**
30
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/fill
31
+ */
32
+ fill: FillMode;
33
+ /**
34
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/iterationStart
35
+ */
36
+ iterationStart: number;
37
+ /**
38
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/iterations
39
+ */
40
+ iterations: number;
41
+ /**
42
+ * @deprecated
43
+ */
44
+ playbackRate: number;
45
+ /**
46
+ * ref to effect
47
+ */
48
+ effect: KeyframeEffect;
49
+ composite: string;
50
+ /**
51
+ * ComputedEffectTiming
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getComputedTiming
53
+ */
54
+ activeDuration: number;
55
+ endTime: number;
56
+ currentIteration: number | null;
57
+ progress: number | null;
58
+ }
59
+ //# sourceMappingURL=AnimationEffectTiming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimationEffectTiming.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/AnimationEffectTiming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,qBAAa,qBAAsB,YAAW,YAAY;IACxD;;OAEG;IACH,KAAK,SAAK;IAEV;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAY;IAExC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAU;IAEnC;;OAEG;IACH,OAAO,CAAC,OAAO,CAAY;IAC3B,cAAc,wBAAU;IACxB,IAAI,MAAM,IAGQ,MAAM,CADvB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAGvB;IAED;;OAEG;IACH,QAAQ,SAAK;IAEb;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAU;IAExB;;OAEG;IACH,cAAc,SAAK;IAEnB;;OAEG;IACH,UAAU,SAAK;IAEf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB,OAAO,EAAE,MAAM,CAAC;IAEhB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;CAChC"}
@@ -0,0 +1,12 @@
1
+ import type { EventService } from '@antv/g-lite';
2
+ import { FederatedEvent } from '@antv/g-lite';
3
+ import type { Animation } from './Animation';
4
+ /**
5
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationPlaybackEvent
6
+ */
7
+ export declare class AnimationEvent extends FederatedEvent implements AnimationPlaybackEvent {
8
+ currentTime: number | null;
9
+ timelineTime: number;
10
+ constructor(manager: EventService | null, target: Animation, currentTime: number | null, timelineTime: number);
11
+ }
12
+ //# sourceMappingURL=AnimationEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimationEvent.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/AnimationEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AAEH,qBAAa,cACX,SAAQ,cACR,YAAW,sBAAsB;IAKxB,WAAW,EAAE,MAAM,GAAG,IAAI;IAC1B,YAAY,EAAE,MAAM;gBAH3B,OAAO,EAAE,YAAY,GAAG,IAAI,EAC5B,MAAM,EAAE,SAAS,EACV,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,YAAY,EAAE,MAAM;CAgB9B"}
@@ -0,0 +1,40 @@
1
+ import type { IDocument, IAnimationTimeline, IElement, IAnimation } from '@antv/g-lite';
2
+ import { Animation } from './Animation';
3
+ export declare function compareAnimations(leftAnimation: IAnimation, rightAnimation: IAnimation): number;
4
+ /**
5
+ * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
6
+ */
7
+ export declare class AnimationTimeline implements IAnimationTimeline {
8
+ private document;
9
+ /**
10
+ * all active animations
11
+ */
12
+ animations: Animation[];
13
+ private ticking;
14
+ private timelineTicking;
15
+ private hasRestartedThisFrame;
16
+ animationsWithPromises: Animation[];
17
+ private inTick;
18
+ private pendingEffects;
19
+ currentTime: number | null;
20
+ private rafId;
21
+ private rafCallbacks;
22
+ private frameId;
23
+ constructor(document: IDocument);
24
+ getAnimations(): Animation[];
25
+ isTicking(): boolean;
26
+ play(target: IElement, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
27
+ applyDirtiedAnimation(animation: Animation): void;
28
+ restart(): boolean;
29
+ destroy(): void;
30
+ applyPendingEffects(): void;
31
+ private updateAnimationsPromises;
32
+ private discardAnimations;
33
+ private restartWebAnimationsNextTick;
34
+ private webAnimationsNextTick;
35
+ private processRafCallbacks;
36
+ private rAF;
37
+ private requestAnimationFrame;
38
+ tick(t: number, isAnimationFrame: boolean, updatingAnimations: IAnimation[]): Animation[][];
39
+ }
40
+ //# sourceMappingURL=AnimationTimeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimationTimeline.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/AnimationTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,UAAU,EACzB,cAAc,EAAE,UAAU,UAG3B;AAED;;GAEG;AACH,qBAAa,iBAAkB,YAAW,kBAAkB;IAyB9C,OAAO,CAAC,QAAQ;IAxB5B;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAM;IAE7B,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,qBAAqB,CAAS;IAEtC,sBAAsB,EAAE,SAAS,EAAE,CAAM;IAEzC,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,cAAc,CAAiC;IAEvD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAElC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,YAAY,CAAuC;IAE3D,OAAO,CAAC,OAAO,CAAS;gBAEJ,QAAQ,EAAE,SAAS;IAEvC,aAAa;IAKb,SAAS;IAIT,IAAI,CACF,MAAM,EAAE,QAAQ,EAChB,SAAS,EAAE,QAAQ,EAAE,GAAG,wBAAwB,GAAG,IAAI,EACvD,OAAO,CAAC,EAAE,MAAM,GAAG,wBAAwB,GAC1C,SAAS;IAeZ,qBAAqB,CAAC,SAAS,EAAE,SAAS;IAwB1C,OAAO;IASP,OAAO;IAIP,mBAAmB;IAOnB,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,4BAA4B;IAOpC,OAAO,CAAC,qBAAqB,CAQ3B;IAEF,OAAO,CAAC,mBAAmB,CAUzB;IAEF,OAAO,CAAC,GAAG;IAWX,OAAO,CAAC,qBAAqB;IAQ7B,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE;CA0C5E"}
@@ -0,0 +1,48 @@
1
+ import { IElement, IKeyframeEffect } from '@antv/g-lite';
2
+ import type { Animation } from './Animation';
3
+ import { AnimationEffectTiming } from './AnimationEffectTiming';
4
+ export declare function makeTiming(timingInput: KeyframeEffectOptions, forGroup: boolean): AnimationEffectTiming;
5
+ export declare function normalizeTimingInput(timingInput: KeyframeEffectOptions | number | undefined, forGroup: boolean): AnimationEffectTiming;
6
+ export declare function numericTimingToObject(timingInput: KeyframeEffectOptions | number): KeyframeEffectOptions;
7
+ /**
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyframeEffect
9
+ * @example
10
+ const circleDownKeyframes = new KeyframeEffect(
11
+ circle, // element to animate
12
+ [
13
+ { transform: 'translateY(0)' }, // keyframe
14
+ { transform: 'translateY(100)' } // keyframe
15
+ ],
16
+ { duration: 3000, fill: 'forwards' } // keyframe options
17
+ );
18
+ *
19
+ */
20
+ export declare class KeyframeEffect implements IKeyframeEffect {
21
+ composite: CompositeOperation;
22
+ iterationComposite: IterationCompositeOperation;
23
+ target: IElement | null;
24
+ animation: Animation | null;
25
+ timing: AnimationEffectTiming;
26
+ private computedTiming;
27
+ normalizedKeyframes: ComputedKeyframe[];
28
+ private timeFraction;
29
+ private interpolations;
30
+ constructor(target: IElement | null, effectInput: Keyframe[] | PropertyIndexedKeyframes | null, timingInput?: KeyframeEffectOptions | number);
31
+ applyInterpolations(): void;
32
+ update(localTime: number | null): boolean;
33
+ getKeyframes(): ComputedKeyframe[];
34
+ setKeyframes(keyframes: Keyframe[] | PropertyIndexedKeyframes | null): void;
35
+ /**
36
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getComputedTiming
37
+ */
38
+ getComputedTiming(): ComputedEffectTiming;
39
+ /**
40
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/getTiming
41
+ */
42
+ getTiming(): EffectTiming;
43
+ /**
44
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEffect/updateTiming
45
+ */
46
+ updateTiming(timing?: OptionalEffectTiming): void;
47
+ }
48
+ //# sourceMappingURL=KeyframeEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyframeEffect.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/KeyframeEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAW,MAAM,cAAc,CAAC;AAMlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,wBAAgB,UAAU,CACxB,WAAW,EAAE,qBAAqB,EAClC,QAAQ,EAAE,OAAO,yBA0ClB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,qBAAqB,GAAG,MAAM,GAAG,SAAS,EACvD,QAAQ,EAAE,OAAO,yBAIlB;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,qBAAqB,GAAG,MAAM,yBAU5C;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAe,YAAW,eAAe;IACpD,SAAS,EAAE,kBAAkB,CAAa;IAC1C,kBAAkB,EAAE,2BAA2B,CAAa;IAE5D,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;IAExB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAE5B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,OAAO,CAAC,cAAc,CAAuB;IAE7C,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;IAExC,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,cAAc,CAAwC;gBAG5D,MAAM,EAAE,QAAQ,GAAG,IAAI,EACvB,WAAW,EAAE,QAAQ,EAAE,GAAG,wBAAwB,GAAG,IAAI,EACzD,WAAW,CAAC,EAAE,qBAAqB,GAAG,MAAM;IAqD9C,mBAAmB;IAOnB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO;IAYzC,YAAY,IAAI,gBAAgB,EAAE;IAGlC,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,wBAAwB,GAAG,IAAI,GAAG,IAAI;IAG3E;;OAEG;IACH,iBAAiB,IAAI,oBAAoB;IAGzC;;OAEG;IACH,SAAS,IAAI,YAAY;IAGzB;;OAEG;IACH,YAAY,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,IAAI;CAKlD"}
@@ -0,0 +1,3 @@
1
+ import type { AnimationEffectTiming } from './AnimationEffectTiming';
2
+ export declare function normalizeKeyframes(effectInput: Keyframe[] | PropertyIndexedKeyframes | null, timing?: AnimationEffectTiming): ComputedKeyframe[];
3
+ //# sourceMappingURL=KeyframeList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyframeList.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/KeyframeList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAiErE,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,QAAQ,EAAE,GAAG,wBAAwB,GAAG,IAAI,EACzD,MAAM,CAAC,EAAE,qBAAqB,GAC7B,gBAAgB,EAAE,CA6GpB"}
@@ -0,0 +1,6 @@
1
+ export * from './Animation';
2
+ export * from './AnimationEvent';
3
+ export * from './AnimationTimeline';
4
+ export * from './KeyframeEffect';
5
+ export * from './KeyframeList';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/dom/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './dom';
2
+ export { EasingFunctions } from './utils';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/web-animations-api/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AnimationEffectTiming } from '../dom/AnimationEffectTiming';
2
+ export declare const linear: (x: number) => number;
3
+ export declare function parseEasingFunction(normalizedEasing: string): (t: number) => number;
4
+ export declare function calculateActiveDuration(timing: EffectTiming): number;
5
+ export declare function calculateIterationProgress(activeDuration: number, localTime: number, timing: AnimationEffectTiming): number;
6
+ /**
7
+ * From: [https://easings.net]
8
+ * Read More about easings on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming/easing)
9
+ */
10
+ export declare const EASINGS: Record<string, string>;
11
+ export declare const EasingKeys: string[];
12
+ /**
13
+ * Converts users input into a usable easing function string
14
+ */
15
+ export declare const getEase: (ease?: keyof typeof EASINGS) => string;
16
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/utils/animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM,WAE/B,CAAC;AAwBF,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,GACvB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAmBvB;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,UAG3D;AAuJD,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,qBAAqB,UA+C9B;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4C1C,CAAC;AACF,eAAO,MAAM,UAAU,UAAuB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAM,MAAM,OAAO,OAAgB,KAAG,MAI7D,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * https://github.com/gre/bezier-easing
3
+ * BezierEasing - use bezier curve for transition easing function
4
+ * by Gaëtan Renaudeau 2014 - 2015 – MIT License
5
+ */
6
+ export declare const NEWTON_ITERATIONS = 4;
7
+ export declare const NEWTON_MIN_SLOPE = 0.001;
8
+ export declare const SUBDIVISION_PRECISION = 1e-7;
9
+ export declare const SUBDIVISION_MAX_ITERATIONS = 10;
10
+ export declare const kSplineTableSize = 11;
11
+ export declare const kSampleStepSize: number;
12
+ export declare const float32ArraySupported: boolean;
13
+ export declare const A: (aA1: number, aA2: number) => number;
14
+ export declare const B: (aA1: number, aA2: number) => number;
15
+ export declare const C: (aA1: number) => number;
16
+ export declare const calcBezier: (aT: number, aA1: number, aA2: number) => number;
17
+ export declare const getSlope: (aT: number, aA1: number, aA2: number) => number;
18
+ export declare const binarySubdivide: (aX: number, aA: number, aB: number, mX1: number, mX2: number) => number;
19
+ export declare const newtonRaphsonIterate: (aX: number, aGuessT: number, mX1: number, mX2: number) => number;
20
+ export declare const bezier: (mX1: number, mY1: number, mX2: number, mY2: number) => (t: number) => number;
21
+ //# sourceMappingURL=bezier-easing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bezier-easing.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/utils/bezier-easing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,qBAAqB,OAAY,CAAC;AAC/C,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,eAAe,QAAiC,CAAC;AAE9D,eAAO,MAAM,qBAAqB,SAAqC,CAAC;AAExE,eAAO,MAAM,CAAC,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,WAAgC,CAAC;AAC3E,eAAO,MAAM,CAAC,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,WAA0B,CAAC;AACrE,eAAO,MAAM,CAAC,GAAI,KAAK,MAAM,WAAc,CAAC;AAG5C,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,WACR,CAAC;AAGxD,eAAO,MAAM,QAAQ,GAAI,IAAI,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,WACE,CAAC;AAChE,eAAO,MAAM,eAAe,GAC1B,IAAI,MAAM,EACV,IAAI,MAAM,EACV,IAAI,MAAM,EACV,KAAK,MAAM,EACX,KAAK,MAAM,WAeZ,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,IAAI,MAAM,EACV,SAAS,MAAM,EACf,KAAK,MAAM,EACX,KAAK,MAAM,WAWZ,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,SAI5B,MAAM,WAgDlD,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * ported from https://github.com/okikio/native/blob/master/packages/animate/src/custom-easing.ts
3
+ */
4
+ import type { TypeEasingFunction } from '@antv/g-lite';
5
+ export declare const convertToDash: (str: string) => string;
6
+ export type TypeColor = string | number | (string | number)[];
7
+ export type TypeRGBAFunction = (color: TypeColor) => number[];
8
+ /**
9
+ * The default list of easing functions, do note this is different from {@link EASING}
10
+ */
11
+ type EasingFunctionType = 'steps' | 'step-start' | 'step-end' | 'linear' | 'cubic-bezier' | 'ease' | 'in' | 'out' | 'in-out' | 'out-in' | 'in-quad' | 'out-quad' | 'in-out-quad' | 'out-in-quad' | 'in-cubic' | 'out-cubic' | 'in-out-cubic' | 'out-in-cubic' | 'in-quart' | 'out-quart' | 'in-out-quart' | 'out-in-quart' | 'in-quint' | 'out-quint' | 'in-out-quint' | 'out-in-quint' | 'in-expo' | 'out-expo' | 'in-out-expo' | 'out-in-expo' | 'in-sine' | 'out-sine' | 'in-out-sine' | 'out-in-sine' | 'in-circ' | 'out-circ' | 'in-out-circ' | 'out-in-circ' | 'in-back' | 'out-back' | 'in-out-back' | 'out-in-back' | 'in-bounce' | 'out-bounce' | 'in-out-bounce' | 'out-in-bounce' | 'in-elastic' | 'out-elastic' | 'in-out-elastic' | 'out-in-elastic' | 'spring' | 'spring-in' | 'spring-out' | 'spring-in-out' | 'spring-out-in';
12
+ export declare const EasingFunctions: Record<EasingFunctionType, TypeEasingFunction>;
13
+ /** Re-maps a number from one range to another. Numbers outside the range are not clamped to 0 and 1, because out-of-range values are often intentional and useful. */
14
+ export declare const getEasingFunction: (ease: string) => any;
15
+ export {};
16
+ //# sourceMappingURL=custom-easing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-easing.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/utils/custom-easing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIvD,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,WAKxC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,EAAE,CAAC;AAoK9D;;GAEG;AACH,KAAK,kBAAkB,GACnB,OAAO,GACP,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,cAAc,GACd,MAAM,GACN,IAAI,GACJ,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,aAAa,GACb,aAAa,GACb,UAAU,GACV,WAAW,GACX,cAAc,GACd,cAAc,GACd,UAAU,GACV,WAAW,GACX,cAAc,GACd,cAAc,GACd,UAAU,GACV,WAAW,GACX,cAAc,GACd,cAAc,GACd,SAAS,GACT,UAAU,GACV,aAAa,GACb,aAAa,GACb,SAAS,GACT,UAAU,GACV,aAAa,GACb,aAAa,GACb,SAAS,GACT,UAAU,GACV,aAAa,GACb,aAAa,GACb,SAAS,GACT,UAAU,GACV,aAAa,GACb,aAAa,GACb,WAAW,GACX,YAAY,GACZ,eAAe,GACf,eAAe,GACf,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,eAAe,GACf,eAAe,CAAC;AACpB,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAqE1E,CAAC;AAYF,sKAAsK;AACtK,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,QAE7C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './animation';
2
+ export * from './bezier-easing';
3
+ export * from './custom-easing';
4
+ export * from './interpolation';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IAnimationEffectTiming, IElement } from '@antv/g-lite';
2
+ export declare function convertEffectInput(keyframes: ComputedKeyframe[], timing: IAnimationEffectTiming, target: IElement | null): (target: IElement, fraction: number) => void;
3
+ //# sourceMappingURL=interpolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-animations-api/utils/interpolation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,QAAQ,EAGT,MAAM,cAAc,CAAC;AAKtB,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,EAAE,EAC7B,MAAM,EAAE,sBAAsB,EAC9B,MAAM,EAAE,QAAQ,GAAG,IAAI,IAWN,QAAQ,QAAQ,EAAE,UAAU,MAAM,UAsCpD"}