-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathkute.d.ts
3054 lines (3054 loc) · 115 KB
/
kute.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare module "kute.js/src/objects/supportedProperties" {
export default supportedProperties;
const supportedProperties: {};
}
declare module "kute.js/src/objects/defaultValues" {
export default defaultValues;
const defaultValues: {};
}
declare module "kute.js/src/objects/defaultOptions" {
export default defaultOptions;
namespace defaultOptions {
const duration: number;
const delay: number;
const easing: string;
const repeat: number;
const repeatDelay: number;
const yoyo: boolean;
const resetStart: boolean;
const offset: number;
}
}
declare module "kute.js/src/objects/prepareProperty" {
export default prepareProperty;
const prepareProperty: {};
}
declare module "kute.js/src/objects/prepareStart" {
export default prepareStart;
const prepareStart: {};
}
declare module "kute.js/src/objects/onStart" {
export default onStart;
const onStart: {};
}
declare module "kute.js/src/objects/onComplete" {
export default onComplete;
const onComplete: {};
}
declare module "kute.js/src/objects/crossCheck" {
export default crossCheck;
const crossCheck: {};
}
declare module "kute.js/src/objects/linkProperty" {
export default linkProperty;
const linkProperty: {};
}
declare module "kute.js/src/objects/util" {
export default Util;
const Util: {};
}
declare module "kute.js/src/objects/interpolate" {
export default interpolate;
const interpolate: {};
}
declare module "kute.js/src/animation/animation" {
/**
* Animation Class
*
* Registers components by populating KUTE.js objects and makes sure
* no duplicate component / property is allowed.
*/
export default class Animation {
/**
* @constructor
* @param {KUTE.fullComponent} Component
*/
constructor(Component: KUTE.fullComponent);
}
}
declare module "kute.js/src/animation/animationBase" {
/**
* Animation Base Class
*
* Registers components by populating KUTE.js objects and makes sure
* no duplicate component / property is allowed.
*
* This class only registers the minimal amount of component information
* required to enable components animation, which means value processing
* as well as `to()` and `allTo()` methods are not supported.
*/
export default class AnimationBase {
/**
* @class
* @param {KUTE.baseComponent} Component
*/
constructor(Component: KUTE.baseComponent);
_: number;
}
}
declare module "kute.js/src/animation/animationDevelopment" {
/**
* Animation Development Class
*
* Registers components by populating KUTE.js objects and makes sure
* no duplicate component / property is allowed.
*
* In addition to the default class, this one provides more component
* information to help you with custom component development.
*/
export default class AnimationDevelopment extends Animation {
/**
*
* @param {KUTE.fullComponent} args
*/
constructor(Component: any);
}
import Animation from "kute.js/src/animation/animation";
}
declare module "kute.js/src/process/getStyleForProperty" {
/**
* getStyleForProperty
*
* Returns the computed style property for element for .to() method.
* Used by for the `.to()` static method.
*
* @param {Element} elem
* @param {string} propertyName
* @returns {string}
*/
export default function getStyleForProperty(elem: Element, propertyName: string): string;
}
declare module "kute.js/src/interpolation/numbers" {
/**
* Numbers Interpolation Function.
*
* @param {number} a start value
* @param {number} b end value
* @param {number} v progress
* @returns {number} the interpolated number
*/
export default function numbers(a: number, b: number, v: number): number;
}
declare module "kute.js/src/util/trueDimension" {
export default trueDimension;
/**
* trueDimension
*
* Returns the string value of a specific CSS property converted into a nice
* { v = value, u = unit } object.
*
* @param {string} dimValue the property string value
* @param {boolean | number} isAngle sets the utility to investigate angles
* @returns {{v: number, u: string}} the true {value, unit} tuple
*/
function trueDimension(dimValue: string, isAngle: boolean | number): {
v: number;
u: string;
};
}
declare module "kute.js/src/objects/kute" {
export default KEC;
/**
* The KUTE.js Execution Context
*/
const KEC: {};
}
declare module "kute.js/src/components/backgroundPositionBase" {
/**
* Sets the property update function.
* @param {string} prop the property name
*/
export function onStartBgPos(prop: string): void;
export default BackgroundPositionBase;
namespace BackgroundPositionBase {
const component: string;
const property: string;
namespace Interpolate {
export { numbers };
}
namespace functions {
export { onStartBgPos as onStart };
}
}
import numbers from "kute.js/src/interpolation/numbers";
}
declare module "kute.js/src/components/backgroundPosition" {
export default BackgroundPosition;
namespace BackgroundPosition {
export const component: string;
export const property: string;
export const defaultValue: number[];
export namespace Interpolate {
export { numbers };
}
export { bgPositionFunctions as functions };
export namespace Util {
export { trueDimension };
}
}
import numbers from "kute.js/src/interpolation/numbers";
namespace bgPositionFunctions {
export { getBgPos as prepareStart };
export { prepareBgPos as prepareProperty };
export { onStartBgPos as onStart };
}
import trueDimension from "kute.js/src/util/trueDimension";
/**
* Returns the property computed style.
* @param {string} prop the property
* @returns {string} the property computed style
*/
function getBgPos(prop: string): string;
/**
* Returns the property tween object.
* @param {string} _ the property name
* @param {string} value the property value
* @returns {number[]} the property tween object
*/
function prepareBgPos(_: string, value: string): number[];
import { onStartBgPos } from "kute.js/src/components/backgroundPositionBase";
}
declare module "kute.js/src/interpolation/units" {
/**
* Units Interpolation Function.
*
* @param {number} a start value
* @param {number} b end value
* @param {string} u unit
* @param {number} v progress
* @returns {string} the interpolated value + unit string
*/
export default function units(a: number, b: number, u: string, v: number): string;
}
declare module "kute.js/src/components/borderRadiusBase" {
/**
* Sets the property update function.
* @param {string} tweenProp the property name
*/
export function radiusOnStartFn(tweenProp: string): void;
export default BorderRadiusBase;
namespace BorderRadiusBase {
const component: string;
const category: string;
namespace Interpolate {
export { units };
}
namespace functions {
export { radiusOnStart as onStart };
}
}
import units from "kute.js/src/interpolation/units";
const radiusOnStart: {};
}
declare module "kute.js/src/components/borderRadius" {
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @returns {string} the property computed style
*/
export function getRadius(tweenProp: string): string;
/**
* Returns the property tween object.
* @param {string} value the property value
* @returns {{v: number, u: string}} the property tween object
*/
export function prepareRadius(_: any, value: string): {
v: number;
u: string;
};
export namespace radiusFunctions {
export { getRadius as prepareStart };
export { prepareRadius as prepareProperty };
export { radiusOnStart as onStart };
}
export default BorderRadius;
const radiusOnStart: {};
namespace BorderRadius {
export const component: string;
export const category: string;
export { radiusProps as properties };
export { radiusValues as defaultValues };
export namespace Interpolate {
export { units };
}
export { radiusFunctions as functions };
export namespace Util {
export { trueDimension };
}
}
const radiusProps: string[];
const radiusValues: {};
import units from "kute.js/src/interpolation/units";
import trueDimension from "kute.js/src/util/trueDimension";
}
declare module "kute.js/src/components/boxModelBase" {
/**
* Sets the update function for the property.
* @param {string} tweenProp the property name
*/
export function boxModelOnStart(tweenProp: string): void;
export default BoxModelBase;
namespace BoxModelBase {
export const component: string;
export const category: string;
export { baseBoxProps as properties };
export namespace Interpolate {
export { numbers };
}
export namespace functions {
export { baseBoxOnStart as onStart };
}
}
const baseBoxProps: string[];
import numbers from "kute.js/src/interpolation/numbers";
const baseBoxOnStart: {};
}
declare module "kute.js/src/components/boxModel" {
export default BoxModel;
namespace BoxModel {
export const component: string;
export const category: string;
export { boxModelProperties as properties };
export { boxModelValues as defaultValues };
export namespace Interpolate {
export { numbers };
}
export { boxModelFunctions as functions };
}
const boxModelProperties: string[];
const boxModelValues: {};
import numbers from "kute.js/src/interpolation/numbers";
namespace boxModelFunctions {
export { getBoxModel as prepareStart };
export { prepareBoxModel as prepareProperty };
export { boxPropsOnStart as onStart };
}
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @returns {string} computed style for property
*/
function getBoxModel(tweenProp: string): string;
/**
* Returns the property tween object.
* @param {string} tweenProp the property name
* @param {string} value the property value
* @returns {number} the property tween object
*/
function prepareBoxModel(tweenProp: string, value: string): number;
const boxPropsOnStart: {};
}
declare module "kute.js/src/components/boxModelEssential" {
export default BoxModelEssential;
namespace BoxModelEssential {
export const component: string;
export const category: string;
export { essentialBoxProps as properties };
export { essentialBoxPropsValues as defaultValues };
export namespace Interpolate {
export { numbers };
}
export { essentialBoxModelFunctions as functions };
export namespace Util {
export { trueDimension };
}
}
const essentialBoxProps: string[];
namespace essentialBoxPropsValues {
const top: number;
const left: number;
const width: number;
const height: number;
}
import numbers from "kute.js/src/interpolation/numbers";
namespace essentialBoxModelFunctions {
export { getBoxModel as prepareStart };
export { prepareBoxModel as prepareProperty };
export { essentialBoxOnStart as onStart };
}
import trueDimension from "kute.js/src/util/trueDimension";
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @returns {string} computed style for property
*/
function getBoxModel(tweenProp: string): string;
/**
* Returns the property tween object.
* @param {string} tweenProp the property name
* @param {string} value the property name
* @returns {number} the property tween object
*/
function prepareBoxModel(tweenProp: string, value: string): number;
const essentialBoxOnStart: {};
}
declare module "kute.js/src/components/clipPropertyBase" {
/**
* Sets the property update function.
* @param {string} tweenProp the property name
*/
export function onStartClip(tweenProp: string): void;
export default ClipPropertyBase;
namespace ClipPropertyBase {
const component: string;
const property: string;
namespace Interpolate {
export { numbers };
}
namespace functions {
export { onStartClip as onStart };
}
}
import numbers from "kute.js/src/interpolation/numbers";
}
declare module "kute.js/src/components/clipProperty" {
export default ClipProperty;
namespace ClipProperty {
export const component: string;
export const property: string;
export const defaultValue: number[];
export namespace Interpolate {
export { numbers };
}
export { clipFunctions as functions };
export namespace Util {
export { trueDimension };
}
}
import numbers from "kute.js/src/interpolation/numbers";
namespace clipFunctions {
export { getClip as prepareStart };
export { prepareClip as prepareProperty };
export { onStartClip as onStart };
}
import trueDimension from "kute.js/src/util/trueDimension";
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @returns {string | number[]} computed style for property
*/
function getClip(tweenProp: string): string | number[];
/**
* Returns the property tween object.
* @param {string} _ the property name
* @param {string} value the property value
* @returns {number[]} the property tween object
*/
function prepareClip(_: string, value: string): number[];
import { onStartClip } from "kute.js/src/components/clipPropertyBase";
}
declare module "kute.js/src/util/hexToRGB" {
export default hexToRGB;
/**
* hexToRGB
*
* Converts a #HEX color format into RGB
* and returns a color object {r,g,b}.
*
* @param {string} hex the degree angle
* @returns {KUTE.colorObject | null} the radian angle
*/
function hexToRGB(hex: string): KUTE.colorObject | null;
}
declare module "kute.js/src/util/trueColor" {
export default trueColor;
/**
* trueColor
*
* Transform any color to rgba()/rgb() and return a nice RGB(a) object.
*
* @param {string} colorString the color input
* @returns {KUTE.colorObject} the {r,g,b,a} color object
*/
function trueColor(colorString: string): KUTE.colorObject;
}
declare module "kute.js/src/interpolation/colors" {
/**
* Color Interpolation Function.
*
* @param {KUTE.colorObject} a start color
* @param {KUTE.colorObject} b end color
* @param {number} v progress
* @returns {string} the resulting color
*/
export default function colors(a: KUTE.colorObject, b: KUTE.colorObject, v: number): string;
}
declare module "kute.js/src/components/colorPropertiesBase" {
/**
* Sets the property update function.
* @param {string} tweenProp the property name
*/
export function onStartColors(tweenProp: string): void;
export namespace baseColors {
const component: string;
const category: string;
namespace Interpolate {
export { numbers };
export { colors };
}
namespace functions {
export { colorsOnStart as onStart };
}
}
export default baseColors;
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
const colorsOnStart: {};
}
declare module "kute.js/src/components/colorProperties" {
export default colorProperties;
namespace colorProperties {
export const component: string;
export const category: string;
export { supportedColors as properties };
export { defaultColors as defaultValues };
export namespace Interpolate {
export { numbers };
export { colors };
}
export { colorFunctions as functions };
export namespace Util {
export { trueColor };
}
}
const supportedColors: string[];
const defaultColors: {};
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
namespace colorFunctions {
export { getColor as prepareStart };
export { prepareColor as prepareProperty };
export { colorsOnStart as onStart };
}
import trueColor from "kute.js/src/util/trueColor";
/**
* Returns the current property computed style.
* @param {string} prop the property name
* @returns {string} property computed style
*/
function getColor(prop: string): string;
/**
* Returns the property tween object.
* @param {string} _ the property name
* @param {string} value the property value
* @returns {KUTE.colorObject} the property tween object
*/
function prepareColor(_: string, value: string): KUTE.colorObject;
const colorsOnStart: {};
}
declare module "kute.js/src/process/getInlineStyle" {
/**
* getInlineStyle
* Returns the transform style for element from
* cssText. Used by for the `.to()` static method.
*
* @param {Element} el target element
* @returns {object}
*/
export default function getInlineStyle(el: Element): object;
}
declare module "kute.js/src/util/getPrefix" {
export default getPrefix;
/**
* getPrefix
*
* Returns browser CSS3 prefix. Keep `for()`
* for wider browser support.
*
* @returns {?string} the browser prefix
*/
function getPrefix(): string | null;
}
declare module "kute.js/src/util/trueProperty" {
export default trueProperty;
/**
* trueProperty
*
* Returns prefixed property name in a legacy browser
* or the regular name in modern browsers.
*
* @param {string} property the property name
* @returns {string} the right property name for every browser
*/
function trueProperty(property: string): string;
}
declare module "kute.js/src/components/crossBrowserMove" {
/**
* Sets the property update function.
* @param {string} tweenProp the `path` property
*/
export function onStartComponent(tweenProp: string): void;
export namespace baseCrossBrowserMove {
const component: string;
const property: string;
namespace Interpolate {
export { numbers };
}
namespace functions {
export { onStartComponent as onStart };
}
}
export default crossBrowserMove;
import numbers from "kute.js/src/interpolation/numbers";
namespace crossBrowserMove {
const component_1: string;
export { component_1 as component };
const property_1: string;
export { property_1 as property };
export const defaultValue: number[];
export namespace Interpolate_1 {
export { numbers };
}
export { Interpolate_1 as Interpolate };
export { componentFunctions as functions };
export namespace Util {
export { trueProperty };
}
}
namespace componentFunctions {
export { getComponentCurrentValue as prepareStart };
export { prepareComponentValue as prepareProperty };
export { onStartComponent as onStart };
}
import trueProperty from "kute.js/src/util/trueProperty";
/**
* Returns the property current style.
*/
function getComponentCurrentValue(): number[];
/**
* Returns the property tween object.
* @param {string} _ property name
* @param {string} value property value
* @returns {number[]} the property tween object
*/
function prepareComponentValue(_: string, value: string): number[];
}
declare module "kute.js/src/components/filterEffectsBase" {
/**
* Sets the `drop-shadow` sub-property update function.
* * disimbiguation `dropshadow` interpolation function and `dropShadow` property
* @param {string} tweenProp the property name
*/
export function dropshadow(a: any, b: any, v: any): string;
/**
* Sets the property update function.
* @param {string} tweenProp the property name
*/
export function onStartFilter(tweenProp: string): void;
export default baseFilter;
namespace baseFilter {
const component: string;
const property: string;
namespace Interpolate {
export { numbers as opacity };
export { numbers as blur };
export { numbers as saturate };
export { numbers as grayscale };
export { numbers as brightness };
export { numbers as contrast };
export { numbers as sepia };
export { numbers as invert };
export { numbers as hueRotate };
export namespace dropShadow {
export { numbers };
export { colors };
export { dropshadow };
}
}
namespace functions {
export { onStartFilter as onStart };
}
}
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
}
declare module "kute.js/src/components/filterEffects" {
export default filterEffects;
namespace filterEffects {
export const component: string;
export const property: string;
export namespace defaultValue {
const opacity: number;
const blur: number;
const saturate: number;
const grayscale: number;
const brightness: number;
const contrast: number;
const sepia: number;
const invert: number;
const hueRotate: number;
const dropShadow: (number | {
r: number;
g: number;
b: number;
})[];
const url: string;
}
export namespace Interpolate {
export { numbers as opacity };
export { numbers as blur };
export { numbers as saturate };
export { numbers as grayscale };
export { numbers as brightness };
export { numbers as contrast };
export { numbers as sepia };
export { numbers as invert };
export { numbers as hueRotate };
export namespace dropShadow_1 {
export { numbers };
export { colors };
export { dropshadow };
}
export { dropShadow_1 as dropShadow };
}
export { filterFunctions as functions };
export namespace Util {
export { parseDropShadow };
export { parseFilterString };
export { replaceDashNamespace };
export { trueColor };
}
}
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
import { dropshadow } from "kute.js/src/components/filterEffectsBase";
namespace filterFunctions {
export { getFilter as prepareStart };
export { prepareFilter as prepareProperty };
export { onStartFilter as onStart };
export { crossCheckFilter as crossCheck };
}
/**
* Returns `drop-shadow` sub-property object.
* @param {(string | number)[]} shadow and `Array` with `drop-shadow` parameters
* @returns {KUTE.filterList['dropShadow']} the expected `drop-shadow` values
*/
function parseDropShadow(shadow: (string | number)[]): KUTE.filterList['dropShadow'];
/**
* Returns an array with current filter sub-properties values.
* @param {string} currentStyle the current filter computed style
* @returns {{[x: string]: number}} the filter tuple
*/
function parseFilterString(currentStyle: string): {
[x: string]: number;
};
/**
* Returns camelCase filter sub-property.
* @param {string} str source string
* @returns {string} camelCase property name
*/
function replaceDashNamespace(str: string): string;
import trueColor from "kute.js/src/util/trueColor";
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @param {string} value the property value
* @returns {string} computed style for property
*/
function getFilter(tweenProp: string, value: string): string;
/**
* Returns the property tween object.
* @param {string} _ the property name
* @param {string} value the property name
* @returns {KUTE.filterList} the property tween object
*/
function prepareFilter(_: string, value: string): KUTE.filterList;
import { onStartFilter } from "kute.js/src/components/filterEffectsBase";
/**
* Adds missing sub-properties in `valuesEnd` from `valuesStart`.
* @param {string} tweenProp the property name
*/
function crossCheckFilter(tweenProp: string): void;
}
declare module "kute.js/src/components/htmlAttributesBase" {
export namespace onStartAttr {
/**
* onStartAttr.attr
*
* Sets the sub-property update function.
* @param {string} tweenProp the property name
*/
function attr(tweenProp: string): void;
/**
* onStartAttr.attr
*
* Sets the sub-property update function.
* @param {string} tweenProp the property name
*/
function attr(tweenProp: string): void;
/**
* onStartAttr.attributes
*
* Sets the update function for the property.
* @param {string} tweenProp the property name
*/
function attributes(tweenProp: string): void;
/**
* onStartAttr.attributes
*
* Sets the update function for the property.
* @param {string} tweenProp the property name
*/
function attributes(tweenProp: string): void;
}
export default baseAttributes;
export const attributes: {};
namespace baseAttributes {
export { ComponentName as component };
export const property: string;
export namespace Interpolate {
export { numbers };
export { colors };
}
export namespace functions {
export { onStartAttr as onStart };
}
}
const ComponentName: "baseHTMLAttributes";
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
}
declare module "kute.js/src/components/htmlAttributes" {
/**
* Returns the current attribute value.
* @param {string} _ the property name
* @param {string} value the property value
* @returns {{[x:string]: string}} attribute value
*/
export function getAttr(_: string, value: string): {
[x: string]: string;
};
/**
* Returns the property tween object.
* @param {string} tweenProp the property name
* @param {string} attrObj the property value
* @returns {number} the property tween object
*/
export function prepareAttr(tweenProp: string, attrObj: string): number;
export default htmlAttributes;
namespace htmlAttributes {
export { ComponentName as component };
export const property: string;
export const subProperties: string[];
export const defaultValue: {
fill: string;
stroke: string;
'stop-color': string;
opacity: number;
'stroke-opacity': number;
'fill-opacity': number;
};
export namespace Interpolate {
export { numbers };
export { colors };
}
export { attrFunctions as functions };
export namespace Util {
export { replaceUppercase };
export { trueColor };
export { trueDimension };
}
}
const ComponentName: "htmlAttributes";
import numbers from "kute.js/src/interpolation/numbers";
import colors from "kute.js/src/interpolation/colors";
namespace attrFunctions {
export { getAttr as prepareStart };
export { prepareAttr as prepareProperty };
export { onStartAttr as onStart };
}
/**
* Returns non-camelcase property name.
* @param {string} a the camelcase property name
* @returns {string} the non-camelcase property name
*/
function replaceUppercase(a: string): string;
import trueColor from "kute.js/src/util/trueColor";
import trueDimension from "kute.js/src/util/trueDimension";
import { onStartAttr } from "kute.js/src/components/htmlAttributesBase";
}
declare module "kute.js/src/components/opacityPropertyBase" {
/**
* Sets the property update function.
* @param {string} tweenProp the property name
*/
export function onStartOpacity(tweenProp: string): void;
export default OpacityPropertyBase;
namespace OpacityPropertyBase {
const component: string;
const property: string;
namespace Interpolate {
export { numbers };
}
namespace functions {
export { onStartOpacity as onStart };
}
}
import numbers from "kute.js/src/interpolation/numbers";
}
declare module "kute.js/src/components/opacityProperty" {
export default OpacityProperty;
namespace OpacityProperty {
export const component: string;
export const property: string;
export const defaultValue: number;
export namespace Interpolate {
export { numbers };
}
export { opacityFunctions as functions };
}
import numbers from "kute.js/src/interpolation/numbers";
namespace opacityFunctions {
export { getOpacity as prepareStart };
export { prepareOpacity as prepareProperty };
export { onStartOpacity as onStart };
}
/**
* Returns the current property computed style.
* @param {string} tweenProp the property name
* @returns {string} computed style for property
*/
function getOpacity(tweenProp: string): string;
/**
* Returns the property tween object.
* @param {string} _ the property name
* @param {string} value the property value
* @returns {number} the property tween object
*/
function prepareOpacity(_: string, value: string): number;
import { onStartOpacity } from "kute.js/src/components/opacityPropertyBase";
}
declare module "kute.js/src/components/scrollPropertyBase" {
/**
* Prevent further scroll events until scroll animation is over.
* @param {Event} e event object
*/
export function preventScroll(e: Event): void;
/**
* Returns the scroll element / target.
* @returns {{el: Element, st: Element}}
*/
export function getScrollTargets(): {
el: Element;
st: Element;
};
/**
* Toggles scroll prevention callback on scroll events.
* @param {string} action addEventListener / removeEventListener
* @param {Element} element target
*/
export function toggleScrollEvents(action: string, element: Element): void;
/**
* Action performed before scroll animation start.
*/
export function scrollIn(): void;
/**
* Action performed when scroll animation ends.
*/
export function scrollOut(): void;
/**
* * Sets the scroll target.
* * Adds the scroll prevention event listener.
* * Sets the property update function.
* @param {string} tweenProp the property name
*/
export function onStartScroll(tweenProp: string): void;
export class onStartScroll {
/**
* * Sets the scroll target.
* * Adds the scroll prevention event listener.
* * Sets the property update function.
* @param {string} tweenProp the property name
*/
constructor(tweenProp: string);
element: HTMLElement | undefined;
}
/**
* Removes the scroll prevention event listener.
*/
export function onCompleteScroll(): void;
export const scrollContainer: HTMLElement;
export default ScrollPropertyBase;
namespace ScrollPropertyBase {
const component: string;
const property: string;
namespace Interpolate {
export { numbers };
}
namespace functions {
export { onStartScroll as onStart };
export { onCompleteScroll as onComplete };
}
namespace Util {
export { preventScroll };
export { scrollIn };
export { scrollOut };
export { getScrollTargets };
}
}
import numbers from "kute.js/src/interpolation/numbers";
}
declare module "kute.js/src/components/scrollProperty" {
export default ScrollProperty;
namespace ScrollProperty {
export const component: string;
export const property: string;
export const defaultValue: number;
export namespace Interpolate {
export { numbers };
}
export { scrollFunctions as functions };