vevet 4.0.0-beta.0 → 4.0.0-beta.2
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/lib/cjs/Vevet/index.js +1 -1
- package/lib/cjs/components/ScrollBar/index.js +10 -18
- package/lib/cjs/components/ScrollBar/index.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/common/index.js +0 -3
- package/lib/cjs/utils/common/index.js.map +1 -1
- package/lib/cjs/utils/internal/getApp.js.map +1 -1
- package/lib/cjs/utils/internal/pickObjectProps.js.map +1 -0
- package/lib/cjs/utils/internal/times.js +14 -0
- package/lib/cjs/utils/internal/times.js.map +1 -0
- package/lib/esm/Vevet/index.js +1 -1
- package/lib/esm/components/ScrollBar/index.js +10 -14
- package/lib/esm/components/ScrollBar/index.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/common/index.js +0 -3
- package/lib/esm/utils/common/index.js.map +1 -1
- package/lib/esm/utils/internal/getApp.js.map +1 -1
- package/lib/esm/utils/internal/pickObjectProps.js.map +1 -0
- package/lib/esm/utils/internal/times.js +10 -0
- package/lib/esm/utils/internal/times.js.map +1 -0
- package/lib/types/components/ScrollBar/index.d.ts +0 -4
- package/lib/types/components/ScrollBar/index.d.ts.map +1 -1
- package/lib/types/index.d.ts +7 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/utils/common/index.d.ts +0 -3
- package/lib/types/utils/common/index.d.ts.map +1 -1
- package/lib/types/utils/internal/getApp.d.ts +1 -9
- package/lib/types/utils/internal/getApp.d.ts.map +1 -1
- package/lib/types/utils/internal/pickObjectProps.d.ts.map +1 -0
- package/lib/types/utils/internal/times.d.ts +2 -0
- package/lib/types/utils/internal/times.d.ts.map +1 -0
- package/package.json +8 -5
- package/src/Vevet/events/createViewport/stories/index.tsx +1 -1
- package/src/Vevet/index.ts +1 -1
- package/src/Vevet/stories/index.tsx +1 -1
- package/src/components/CustomScroll/stories/Default.tsx +1 -1
- package/src/components/CustomScroll/stories/WithHorizontal.tsx +1 -1
- package/src/components/CustomScroll/stories/WithInnerLerp.tsx +1 -1
- package/src/components/CustomScrollDragPlugin/stories/index.tsx +1 -1
- package/src/components/CustomScrollKeyboardPlugin/stories/index.tsx +1 -1
- package/src/components/Marquee/stories/index.tsx +1 -1
- package/src/components/ScrollBar/index.ts +12 -22
- package/src/components/ScrollBar/stories/Default.tsx +1 -1
- package/src/components/ScrollBar/stories/WithCustomScrollComponent.tsx +1 -1
- package/src/components/ScrollBar/stories/WithInnerScroll.tsx +1 -1
- package/src/components/ScrollView/stories/index.tsx +1 -1
- package/src/components/SlideProgress/stories/index.tsx +1 -1
- package/src/index.ts +8 -0
- package/src/utils/common/index.ts +0 -3
- package/src/utils/internal/getApp.ts +0 -9
- package/src/utils/internal/times.ts +14 -0
- package/lib/cjs/utils/common/objectKeys.js +0 -19
- package/lib/cjs/utils/common/objectKeys.js.map +0 -1
- package/lib/cjs/utils/common/pickObjectProps.js.map +0 -1
- package/lib/cjs/utils/common/times.js +0 -31
- package/lib/cjs/utils/common/times.js.map +0 -1
- package/lib/esm/utils/common/objectKeys.js +0 -15
- package/lib/esm/utils/common/objectKeys.js.map +0 -1
- package/lib/esm/utils/common/pickObjectProps.js.map +0 -1
- package/lib/esm/utils/common/times.js +0 -27
- package/lib/esm/utils/common/times.js.map +0 -1
- package/lib/types/utils/common/objectKeys.d.ts +0 -13
- package/lib/types/utils/common/objectKeys.d.ts.map +0 -1
- package/lib/types/utils/common/pickObjectProps.d.ts.map +0 -1
- package/lib/types/utils/common/times.d.ts +0 -19
- package/lib/types/utils/common/times.d.ts.map +0 -1
- package/src/utils/common/objectKeys.ts +0 -14
- package/src/utils/common/times.ts +0 -31
- /package/lib/cjs/utils/{common → internal}/pickObjectProps.js +0 -0
- /package/lib/esm/utils/{common → internal}/pickObjectProps.js +0 -0
- /package/lib/types/utils/{common → internal}/pickObjectProps.d.ts +0 -0
- /package/src/utils/{common → internal}/pickObjectProps.ts +0 -0
package/lib/cjs/Vevet/index.js
CHANGED
|
@@ -63,7 +63,16 @@ var ScrollBar = /** @class */ (function (_super) {
|
|
|
63
63
|
_this._xBar = new Bar_1.Bar(__assign(__assign({}, barProps), { direction: 'x' }));
|
|
64
64
|
_this._yBar = new Bar_1.Bar(__assign(__assign({}, barProps), { direction: 'y' }));
|
|
65
65
|
// add classnames
|
|
66
|
-
|
|
66
|
+
if (_this.container instanceof Window) {
|
|
67
|
+
_this.toggleClassName((0, getApp_1.getApp)().html, _this.className('-parent'), true);
|
|
68
|
+
_this.toggleClassName((0, getApp_1.getApp)().body, _this.className('-parent'), true);
|
|
69
|
+
}
|
|
70
|
+
else if (_this.container instanceof Element) {
|
|
71
|
+
_this.toggleClassName(_this.container, _this.className('-parent'), true);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
_this.toggleClassName(_this.container.container, _this.className('-parent'), true);
|
|
75
|
+
}
|
|
67
76
|
// initialize the class
|
|
68
77
|
if (canInit) {
|
|
69
78
|
_this.init();
|
|
@@ -90,23 +99,6 @@ var ScrollBar = /** @class */ (function (_super) {
|
|
|
90
99
|
enumerable: false,
|
|
91
100
|
configurable: true
|
|
92
101
|
});
|
|
93
|
-
Object.defineProperty(ScrollBar.prototype, "scrollableElement", {
|
|
94
|
-
/**
|
|
95
|
-
* Returns the scrollable element within the container.
|
|
96
|
-
*/
|
|
97
|
-
get: function () {
|
|
98
|
-
var container = this.container;
|
|
99
|
-
if (container instanceof Window) {
|
|
100
|
-
return (0, getApp_1.getApp)().body;
|
|
101
|
-
}
|
|
102
|
-
if (container instanceof Element) {
|
|
103
|
-
return container;
|
|
104
|
-
}
|
|
105
|
-
return container.container;
|
|
106
|
-
},
|
|
107
|
-
enumerable: false,
|
|
108
|
-
configurable: true
|
|
109
|
-
});
|
|
110
102
|
Object.defineProperty(ScrollBar.prototype, "domParent", {
|
|
111
103
|
/**
|
|
112
104
|
* Returns the DOM element where the scroll bars will be appended.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ScrollBar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,6BAA4B;AAE5B,8CAA+D;AAE/D,uDAAsD;AACtD,kDAAiD;AAIjD;;;;;;GAMG;AACH;IAMU,6BAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ScrollBar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAsC;AAEtC,6BAA4B;AAE5B,8CAA+D;AAE/D,uDAAsD;AACtD,kDAAiD;AAIjD;;;;;;GAMG;AACH;IAMU,6BAA4D;IAgFpE,mBAAY,YAA4C,EAAE,OAAc;QAAd,wBAAA,EAAA,cAAc;QAAxE,YACE,kBAAM,YAAY,EAAE,KAAK,CAAC,SAoD3B;QAlDS,IAAA,SAAS,GAAK,KAAI,CAAC,KAAK,UAAf,CAAgB;QAEjC,gBAAgB;QAChB,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;YACjC,IAAM,OAAO,GAAG,IAAA,qBAAS,EAAC,SAAS,CAAC,CAAC;YACrC,IAAI,OAAO,EAAE;gBACX,KAAI,CAAC,UAAU,GAAG,OAAO,CAAC;aAC3B;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;aAC9C;SACF;aAAM;YACL,KAAI,CAAC,UAAU,GAAG,SAAgB,CAAC;SACpC;QAED,cAAc;QACd,IAAM,QAAQ,yBACT,KAAI,CAAC,KAAK,KACb,SAAS,EAAE,KAAI,CAAC,SAAS,EACzB,SAAS,EAAE,KAAI,CAAC,SAAS,EACzB,MAAM,EAAE,KAAI,CAAC,MAAM,GACpB,CAAC;QAEF,KAAI,CAAC,KAAK,GAAG,IAAI,SAAG,uBACf,QAAQ,KACX,SAAS,EAAE,GAAG,IACd,CAAC;Q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,IAAI,SAAS;YAC3B,CAAC,CAAC,SAAS,CAAC,WAAW,CACnB,QAAQ,EACR,cAAM,OAAA,aAAa,CAAC,cAAc,EAAE,EAA9B,CAA8B,EACpC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CACpB;YACH,CAAC,CAAC,SAAS,CAAC;QAEhB,IAAI,CAAC,oBAAoB,CAAC;YACxB,aAAa,CAAC,MAAM,EAAE,CAAC;YACvB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,iBAAiB;QACjB,aAAa,CAAC,MAAM,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACO,kCAAc,GAAxB;QACE,iBAAM,cAAc,WAAE,CAAC;QAEvB,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,0BAAM,GAAb;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACO,4BAAQ,GAAlB;QACE,iBAAM,QAAQ,WAAE,CAAC;QAEjB,eAAe;QACf,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;IACH,gBAAC;AAAD,CAAC,AAnND,CAMU,qBAAc,GA6MvB;AAnNY,8BAAS"}
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAiD;AAIjD;;;;GAIG;AACU,QAAA,KAAK,GAAG,CACnB,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,eAAM,GAAE,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC;AASZ,mDAAiC;AAEjC,0CAAwB;AAExB,yCAAuB;AAEvB,+CAA6B;AAE7B,0CAAwB"}
|
|
@@ -15,9 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./normalizedTimeoutCallback"), exports);
|
|
18
|
-
__exportStar(require("./objectKeys"), exports);
|
|
19
18
|
__exportStar(require("./PCancelable"), exports);
|
|
20
|
-
__exportStar(require("./pickObjectProps"), exports);
|
|
21
19
|
__exportStar(require("./uid"), exports);
|
|
22
|
-
__exportStar(require("./times"), exports);
|
|
23
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,gDAA8B;AAC9B,wCAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getApp.js","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;
|
|
1
|
+
{"version":3,"file":"getApp.js","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC,SAAgB,MAAM;;IACpB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,IAAM,QAAQ,GAAG,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE,CAAC;QAE1C,IAAM,GAAG,GAAG,IAAA,aAAK,EAAC,QAAQ,CAAC,CAAC;QAE5B,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC;KACvB;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAVD,wBAUC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,aAAa;IACb,gDAAgD;IAChD,MAAM,CAAC,qBAAqB,GAAG,MAAM,EAAE,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickObjectProps.js","sourceRoot":"","sources":["../../../../src/utils/internal/pickObjectProps.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,eAAe,CAG7B,MAAS,EAAE,IAAS;IACpB,IAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG;QACf,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAoB,CAAC;AAC9B,CAAC;AAXD,0CAWC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.times = void 0;
|
|
4
|
+
function times(callback, count) {
|
|
5
|
+
var index = 0;
|
|
6
|
+
var list = [];
|
|
7
|
+
while (index < count) {
|
|
8
|
+
list.push(callback(index, count));
|
|
9
|
+
index += 1;
|
|
10
|
+
}
|
|
11
|
+
return list;
|
|
12
|
+
}
|
|
13
|
+
exports.times = times;
|
|
14
|
+
//# sourceMappingURL=times.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"times.js","sourceRoot":"","sources":["../../../../src/utils/internal/times.ts"],"names":[],"mappings":";;;AAAA,SAAgB,KAAK,CACnB,QAA6C,EAC7C,KAAa;IAEb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAM,IAAI,GAAQ,EAAE,CAAC;IAErB,OAAO,KAAK,GAAG,KAAK,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAClC,KAAK,IAAI,CAAC,CAAC;KACZ;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,sBAaC"}
|
package/lib/esm/Vevet/index.js
CHANGED
|
@@ -23,19 +23,6 @@ export class ScrollBar extends ComponentClass {
|
|
|
23
23
|
get container() {
|
|
24
24
|
return this._container;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Returns the scrollable element within the container.
|
|
28
|
-
*/
|
|
29
|
-
get scrollableElement() {
|
|
30
|
-
const { container } = this;
|
|
31
|
-
if (container instanceof Window) {
|
|
32
|
-
return getApp().body;
|
|
33
|
-
}
|
|
34
|
-
if (container instanceof Element) {
|
|
35
|
-
return container;
|
|
36
|
-
}
|
|
37
|
-
return container.container;
|
|
38
|
-
}
|
|
39
26
|
/**
|
|
40
27
|
* Returns the DOM element where the scroll bars will be appended.
|
|
41
28
|
*/
|
|
@@ -88,7 +75,16 @@ export class ScrollBar extends ComponentClass {
|
|
|
88
75
|
this._xBar = new Bar(Object.assign(Object.assign({}, barProps), { direction: 'x' }));
|
|
89
76
|
this._yBar = new Bar(Object.assign(Object.assign({}, barProps), { direction: 'y' }));
|
|
90
77
|
// add classnames
|
|
91
|
-
|
|
78
|
+
if (this.container instanceof Window) {
|
|
79
|
+
this.toggleClassName(getApp().html, this.className('-parent'), true);
|
|
80
|
+
this.toggleClassName(getApp().body, this.className('-parent'), true);
|
|
81
|
+
}
|
|
82
|
+
else if (this.container instanceof Element) {
|
|
83
|
+
this.toggleClassName(this.container, this.className('-parent'), true);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.toggleClassName(this.container.container, this.className('-parent'), true);
|
|
87
|
+
}
|
|
92
88
|
// initialize the class
|
|
93
89
|
if (canInit) {
|
|
94
90
|
this.init();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ScrollBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD;;;;;;GAMG;AACH,MAAM,OAAO,SAMX,SAAQ,cAA4D;IAC1D,gBAAgB;QACxB,uCACK,KAAK,CAAC,gBAAgB,EAAE,KAC3B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,KAAK,EAChB,cAAc,EAAE,EAAE,EAClB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE,IAAI,EACpB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,EAAE,EACX,cAAc,EAAE,QAAQ,IACxB;IACJ,CAAC;IAED,IAAI,MAAM;QACR,OAAO,GAAG,MAAM,EAAE,CAAC,MAAM,WAAW,CAAC;IACvC,CAAC;IAKD;;OAEG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ScrollBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD;;;;;;GAMG;AACH,MAAM,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MAAM,EAAE,CAAC;IACrB,CAAC;IAED;;OAEG;IACO,QAAQ;QAChB,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,eAAe;QACf,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;CACF"}
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC;AASZ,cAAc,kBAAkB,CAAC;AAEjC,cAAc,SAAS,CAAC;AAExB,cAAc,QAAQ,CAAC;AAEvB,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getApp.js","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"getApp.js","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,UAAU,MAAM;;IACpB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,MAAM,QAAQ,GAAG,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE,CAAC;QAE1C,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE5B,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC;KACvB;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,aAAa;IACb,gDAAgD;IAChD,MAAM,CAAC,qBAAqB,GAAG,MAAM,EAAE,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickObjectProps.js","sourceRoot":"","sources":["../../../../src/utils/internal/pickObjectProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe,CAG7B,MAAS,EAAE,IAAS;IACpB,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"times.js","sourceRoot":"","sources":["../../../../src/utils/internal/times.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CACnB,QAA6C,EAC7C,KAAa;IAEb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAQ,EAAE,CAAC;IAErB,OAAO,KAAK,GAAG,KAAK,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAClC,KAAK,IAAI,CAAC,CAAC;KACZ;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -28,10 +28,6 @@ export declare class ScrollBar<StaticProps extends NScrollBar.IStaticProps = NSc
|
|
|
28
28
|
* The container element or window where the scroll is applied.
|
|
29
29
|
*/
|
|
30
30
|
get container(): Window | Element | CustomScroll<import("../CustomScroll").NCustomScroll.IStaticProps, import("../CustomScroll").NCustomScroll.IChangeableProps, import("../CustomScroll").NCustomScroll.ICallbacksTypes>;
|
|
31
|
-
/**
|
|
32
|
-
* Returns the scrollable element within the container.
|
|
33
|
-
*/
|
|
34
|
-
get scrollableElement(): Element;
|
|
35
31
|
/**
|
|
36
32
|
* Returns the DOM element where the scroll bars will be appended.
|
|
37
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScrollBar/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAK/D,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B;;;;;;GAMG;AACH,qBAAa,SAAS,CACpB,WAAW,SAAS,UAAU,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,EACrE,eAAe,SACb,UAAU,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,EAC3D,cAAc,SACZ,UAAU,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CACzD,SAAQ,cAAc,CAAC,WAAW,EAAE,eAAe,EAAE,cAAc,CAAC;IACpE,SAAS,CAAC,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AE,WAAW,GAAG,eAAe,EAAE,OAAO,UAAO;IAuDxE;;OAEG;IACH,SAAS,CAAC,KAAK;IAMf;;OAEG;IACH,SAAS,CAAC,UAAU;IA+BpB;;OAEG;IACH,SAAS,CAAC,cAAc;IAMxB;;OAEG;IACI,MAAM;IAKb;;OAEG;IACH,SAAS,CAAC,QAAQ;CAOnB"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { IVevet } from './Vevet/global';
|
|
2
|
+
import { IVevetProps } from './Vevet/types';
|
|
2
3
|
/**
|
|
3
4
|
* Vevet Application
|
|
4
5
|
*
|
|
5
6
|
* @see {@linkcode IVevet}
|
|
6
7
|
*/
|
|
7
8
|
export declare const vevet: IVevet;
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
vevetApp: IVevet;
|
|
12
|
+
VEVET_PROPS: Partial<IVevetProps>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
export * from './Vevet/exported';
|
|
9
16
|
export * from './utils';
|
|
10
17
|
export * from './base';
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,KAAK,QAEP,CAAC;AAEZ,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;KACnC;CACF;AAED,cAAc,kBAAkB,CAAC;AAEjC,cAAc,SAAS,CAAC;AAExB,cAAc,QAAQ,CAAC;AAEvB,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { IVevetProps } from '../../Vevet/types';
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
vevetApp: IVevet;
|
|
6
|
-
VEVET_PROPS: Partial<IVevetProps>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export declare function getApp(): IVevet;
|
|
1
|
+
export declare function getApp(): import("../..").IVevet;
|
|
10
2
|
//# sourceMappingURL=getApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getApp.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getApp.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/getApp.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,2BAUrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickObjectProps.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/pickObjectProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,MAAM,CAAC,EACjB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAQlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../../../src/utils/internal/times.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,CAAC,EACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAC7C,KAAK,EAAE,MAAM,GACZ,CAAC,EAAE,CAUL"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vevet",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
4
|
-
"description": "Vevet -
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
4
|
+
"description": "Vevet - A JavaScript Library for Creative Developers",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"storybook": "storybook dev -p 6006",
|
|
7
7
|
"lint": "npm run lint:js && npm run lint:style",
|
|
@@ -28,25 +28,28 @@
|
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
30
|
"vevet",
|
|
31
|
+
"helpers",
|
|
32
|
+
"animations",
|
|
31
33
|
"callbacks",
|
|
32
34
|
"viewport",
|
|
33
35
|
"onresize",
|
|
34
36
|
"onload",
|
|
35
|
-
"
|
|
37
|
+
"responsive",
|
|
36
38
|
"mutableProps",
|
|
37
39
|
"wheel",
|
|
38
40
|
"animationframe",
|
|
39
41
|
"fps",
|
|
40
42
|
"timeline",
|
|
43
|
+
"canvas",
|
|
41
44
|
"ctx2d",
|
|
42
|
-
"
|
|
45
|
+
"prerender",
|
|
43
46
|
"cursor",
|
|
44
47
|
"drag",
|
|
45
48
|
"swipe",
|
|
46
49
|
"marquee",
|
|
47
50
|
"preloader",
|
|
48
51
|
"scrollbar",
|
|
49
|
-
"
|
|
52
|
+
"smooth scroll",
|
|
50
53
|
"split text"
|
|
51
54
|
],
|
|
52
55
|
"files": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { pickObjectProps } from '@/utils/common';
|
|
3
2
|
import { getApp } from '@/utils/internal/getApp';
|
|
3
|
+
import { pickObjectProps } from '@/utils/internal/pickObjectProps';
|
|
4
4
|
|
|
5
5
|
export const Component: FC = () => {
|
|
6
6
|
const [features, setFeatures] = useState<Record<string, boolean | number>>();
|
package/src/Vevet/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { pickObjectProps } from '@/utils/common';
|
|
3
2
|
import { getApp } from '@/utils/internal/getApp';
|
|
3
|
+
import { pickObjectProps } from '@/utils/internal/pickObjectProps';
|
|
4
4
|
|
|
5
5
|
export const Component: FC = () => {
|
|
6
6
|
const [features, setFeatures] =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { CustomScroll } from '..';
|
|
3
|
-
import { times } from '@/utils/
|
|
3
|
+
import { times } from '@/utils/internal/times';
|
|
4
4
|
|
|
5
5
|
export const DefaultComponent: FC = () => {
|
|
6
6
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { CustomScroll } from '..';
|
|
3
|
-
import { times } from '@/utils/
|
|
3
|
+
import { times } from '@/utils/internal/times';
|
|
4
4
|
|
|
5
5
|
export const WithHorizontalComponent: FC = () => {
|
|
6
6
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { CustomScroll } from '..';
|
|
3
|
-
import { times } from '@/utils/
|
|
3
|
+
import { times } from '@/utils/internal/times';
|
|
4
4
|
|
|
5
5
|
export const WithInnerLerpComponent: FC = () => {
|
|
6
6
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { CustomScrollDragPlugin } from '..';
|
|
3
3
|
import { CustomScroll } from '@/components/CustomScroll';
|
|
4
|
-
import { times } from '@/utils/
|
|
4
|
+
import { times } from '@/utils/internal/times';
|
|
5
5
|
|
|
6
6
|
export const Component: FC = () => {
|
|
7
7
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React, { FC, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { CustomScrollKeyboardPlugin } from '..';
|
|
4
4
|
import { CustomScroll } from '@/components/CustomScroll';
|
|
5
|
-
import { times } from '@/utils/
|
|
5
|
+
import { times } from '@/utils/internal/times';
|
|
6
6
|
|
|
7
7
|
export const Component: FC = () => {
|
|
8
8
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -51,23 +51,6 @@ export class ScrollBar<
|
|
|
51
51
|
return this._container;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/**
|
|
55
|
-
* Returns the scrollable element within the container.
|
|
56
|
-
*/
|
|
57
|
-
get scrollableElement() {
|
|
58
|
-
const { container } = this;
|
|
59
|
-
|
|
60
|
-
if (container instanceof Window) {
|
|
61
|
-
return getApp().body;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (container instanceof Element) {
|
|
65
|
-
return container;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return container.container;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
54
|
/**
|
|
72
55
|
* Returns the DOM element where the scroll bars will be appended.
|
|
73
56
|
*/
|
|
@@ -155,11 +138,18 @@ export class ScrollBar<
|
|
|
155
138
|
});
|
|
156
139
|
|
|
157
140
|
// add classnames
|
|
158
|
-
this.
|
|
159
|
-
this.
|
|
160
|
-
this.className('-parent'),
|
|
161
|
-
|
|
162
|
-
|
|
141
|
+
if (this.container instanceof Window) {
|
|
142
|
+
this.toggleClassName(getApp().html, this.className('-parent'), true);
|
|
143
|
+
this.toggleClassName(getApp().body, this.className('-parent'), true);
|
|
144
|
+
} else if (this.container instanceof Element) {
|
|
145
|
+
this.toggleClassName(this.container, this.className('-parent'), true);
|
|
146
|
+
} else {
|
|
147
|
+
this.toggleClassName(
|
|
148
|
+
this.container.container,
|
|
149
|
+
this.className('-parent'),
|
|
150
|
+
true,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
163
153
|
|
|
164
154
|
// initialize the class
|
|
165
155
|
if (canInit) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef } from 'react';
|
|
2
|
-
import { times } from '@/utils/common';
|
|
3
2
|
import { CustomScroll } from '@/components/CustomScroll';
|
|
4
3
|
import { ScrollBar } from '..';
|
|
4
|
+
import { times } from '@/utils/internal/times';
|
|
5
5
|
|
|
6
6
|
export const WithCustomScrollComponent: FC = () => {
|
|
7
7
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useEffect, useRef } from 'react';
|
|
2
|
-
import { times } from '@/utils/common';
|
|
3
2
|
import { ScrollBar } from '..';
|
|
3
|
+
import { times } from '@/utils/internal/times';
|
|
4
4
|
|
|
5
5
|
export const WithInnerScrollComponent: FC = () => {
|
|
6
6
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
import React, { FC, useEffect, useRef } from 'react';
|
|
3
3
|
import { ScrollView } from '..';
|
|
4
|
-
import { times } from '@/utils/
|
|
4
|
+
import { times } from '@/utils/internal/times';
|
|
5
5
|
|
|
6
6
|
export const Component: FC = () => {
|
|
7
7
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
import React, { FC, useEffect, useRef } from 'react';
|
|
3
3
|
import { SlideProgress } from '..';
|
|
4
|
-
import { times } from '@/utils/
|
|
4
|
+
import { times } from '@/utils/internal/times';
|
|
5
5
|
|
|
6
6
|
export const Component: FC = () => {
|
|
7
7
|
const containerRef = useRef<HTMLDivElement>(null);
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { getApp } from './utils/internal/getApp';
|
|
2
2
|
import { IVevet } from './Vevet/global';
|
|
3
|
+
import { IVevetProps } from './Vevet/types';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Vevet Application
|
|
@@ -10,6 +11,13 @@ export const vevet = (
|
|
|
10
11
|
typeof window !== 'undefined' ? getApp() : undefined
|
|
11
12
|
) as IVevet;
|
|
12
13
|
|
|
14
|
+
declare global {
|
|
15
|
+
interface Window {
|
|
16
|
+
vevetApp: IVevet;
|
|
17
|
+
VEVET_PROPS: Partial<IVevetProps>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
export * from './Vevet/exported';
|
|
14
22
|
|
|
15
23
|
export * from './utils';
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { Vevet } from '@/src/Vevet';
|
|
2
|
-
import { IVevet } from '@/src/Vevet/global';
|
|
3
|
-
import { IVevetProps } from '@/src/Vevet/types';
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
vevetApp: IVevet;
|
|
8
|
-
VEVET_PROPS: Partial<IVevetProps>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
2
|
|
|
12
3
|
export function getApp() {
|
|
13
4
|
if (!window.vevetApp) {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.objectKeys = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Retrieves the keys of an object as an array of the object's keys.
|
|
6
|
-
*
|
|
7
|
-
* This function ensures that the returned keys are typed correctly based on the input object.
|
|
8
|
-
*
|
|
9
|
-
* @param object - The object from which the keys will be retrieved.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* const person = { name: 'Alice', age: 25 };
|
|
13
|
-
* const keys = objectKeys(person); // ['name', 'age']
|
|
14
|
-
*/
|
|
15
|
-
function objectKeys(object) {
|
|
16
|
-
return Object.keys(object);
|
|
17
|
-
}
|
|
18
|
-
exports.objectKeys = objectKeys;
|
|
19
|
-
//# sourceMappingURL=objectKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objectKeys.js","sourceRoot":"","sources":["../../../../src/utils/common/objectKeys.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAI,MAAS;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAa,CAAgB,CAAC;AACnD,CAAC;AAFD,gCAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickObjectProps.js","sourceRoot":"","sources":["../../../../src/utils/common/pickObjectProps.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,eAAe,CAG7B,MAAS,EAAE,IAAS;IACpB,IAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG;QACf,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAoB,CAAC;AAC9B,CAAC;AAXD,0CAWC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.times = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Repeats a function `n` times and returns an array of the results.
|
|
6
|
-
*
|
|
7
|
-
* The function executes the provided `callback` for each iteration, passing the current index and the total count as arguments.
|
|
8
|
-
* It collects and returns the results of the callback in an array.
|
|
9
|
-
*
|
|
10
|
-
* @param callback - The function to be called on each iteration. Receives the current index and the total count.
|
|
11
|
-
* @param count - The number of times to execute the callback.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* const result = times((index, count) => index / count, 5);
|
|
15
|
-
* // => [0, 0.2, 0.4, 0.6, 0.8]
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* const repeatedStrings = times(() => 'hello', 3);
|
|
19
|
-
* // => ['hello', 'hello', 'hello']
|
|
20
|
-
*/
|
|
21
|
-
function times(callback, count) {
|
|
22
|
-
var index = 0;
|
|
23
|
-
var list = [];
|
|
24
|
-
while (index < count) {
|
|
25
|
-
list.push(callback(index, count));
|
|
26
|
-
index += 1;
|
|
27
|
-
}
|
|
28
|
-
return list;
|
|
29
|
-
}
|
|
30
|
-
exports.times = times;
|
|
31
|
-
//# sourceMappingURL=times.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"times.js","sourceRoot":"","sources":["../../../../src/utils/common/times.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,KAAK,CACnB,QAA6C,EAC7C,KAAa;IAEb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAM,IAAI,GAAQ,EAAE,CAAC;IAErB,OAAO,KAAK,GAAG,KAAK,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAClC,KAAK,IAAI,CAAC,CAAC;KACZ;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,sBAaC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the keys of an object as an array of the object's keys.
|
|
3
|
-
*
|
|
4
|
-
* This function ensures that the returned keys are typed correctly based on the input object.
|
|
5
|
-
*
|
|
6
|
-
* @param object - The object from which the keys will be retrieved.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const person = { name: 'Alice', age: 25 };
|
|
10
|
-
* const keys = objectKeys(person); // ['name', 'age']
|
|
11
|
-
*/
|
|
12
|
-
export function objectKeys(object) {
|
|
13
|
-
return Object.keys(object);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=objectKeys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objectKeys.js","sourceRoot":"","sources":["../../../../src/utils/common/objectKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAI,MAAS;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAa,CAAgB,CAAC;AACnD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickObjectProps.js","sourceRoot":"","sources":["../../../../src/utils/common/pickObjectProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,eAAe,CAG7B,MAAS,EAAE,IAAS;IACpB,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Repeats a function `n` times and returns an array of the results.
|
|
3
|
-
*
|
|
4
|
-
* The function executes the provided `callback` for each iteration, passing the current index and the total count as arguments.
|
|
5
|
-
* It collects and returns the results of the callback in an array.
|
|
6
|
-
*
|
|
7
|
-
* @param callback - The function to be called on each iteration. Receives the current index and the total count.
|
|
8
|
-
* @param count - The number of times to execute the callback.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const result = times((index, count) => index / count, 5);
|
|
12
|
-
* // => [0, 0.2, 0.4, 0.6, 0.8]
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const repeatedStrings = times(() => 'hello', 3);
|
|
16
|
-
* // => ['hello', 'hello', 'hello']
|
|
17
|
-
*/
|
|
18
|
-
export function times(callback, count) {
|
|
19
|
-
let index = 0;
|
|
20
|
-
const list = [];
|
|
21
|
-
while (index < count) {
|
|
22
|
-
list.push(callback(index, count));
|
|
23
|
-
index += 1;
|
|
24
|
-
}
|
|
25
|
-
return list;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=times.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"times.js","sourceRoot":"","sources":["../../../../src/utils/common/times.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,KAAK,CACnB,QAA6C,EAC7C,KAAa;IAEb,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAQ,EAAE,CAAC;IAErB,OAAO,KAAK,GAAG,KAAK,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAClC,KAAK,IAAI,CAAC,CAAC;KACZ;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the keys of an object as an array of the object's keys.
|
|
3
|
-
*
|
|
4
|
-
* This function ensures that the returned keys are typed correctly based on the input object.
|
|
5
|
-
*
|
|
6
|
-
* @param object - The object from which the keys will be retrieved.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const person = { name: 'Alice', age: 25 };
|
|
10
|
-
* const keys = objectKeys(person); // ['name', 'age']
|
|
11
|
-
*/
|
|
12
|
-
export declare function objectKeys<T>(object: T): (keyof T)[];
|
|
13
|
-
//# sourceMappingURL=objectKeys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objectKeys.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/objectKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAEpD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickObjectProps.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/pickObjectProps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,MAAM,CAAC,EACjB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAQlC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Repeats a function `n` times and returns an array of the results.
|
|
3
|
-
*
|
|
4
|
-
* The function executes the provided `callback` for each iteration, passing the current index and the total count as arguments.
|
|
5
|
-
* It collects and returns the results of the callback in an array.
|
|
6
|
-
*
|
|
7
|
-
* @param callback - The function to be called on each iteration. Receives the current index and the total count.
|
|
8
|
-
* @param count - The number of times to execute the callback.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const result = times((index, count) => index / count, 5);
|
|
12
|
-
* // => [0, 0.2, 0.4, 0.6, 0.8]
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const repeatedStrings = times(() => 'hello', 3);
|
|
16
|
-
* // => ['hello', 'hello', 'hello']
|
|
17
|
-
*/
|
|
18
|
-
export declare function times<T>(callback: (index: number, count: number) => T, count: number): T[];
|
|
19
|
-
//# sourceMappingURL=times.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../../../src/utils/common/times.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAC7C,KAAK,EAAE,MAAM,GACZ,CAAC,EAAE,CAUL"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the keys of an object as an array of the object's keys.
|
|
3
|
-
*
|
|
4
|
-
* This function ensures that the returned keys are typed correctly based on the input object.
|
|
5
|
-
*
|
|
6
|
-
* @param object - The object from which the keys will be retrieved.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const person = { name: 'Alice', age: 25 };
|
|
10
|
-
* const keys = objectKeys(person); // ['name', 'age']
|
|
11
|
-
*/
|
|
12
|
-
export function objectKeys<T>(object: T): (keyof T)[] {
|
|
13
|
-
return Object.keys(object as any) as (keyof T)[];
|
|
14
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Repeats a function `n` times and returns an array of the results.
|
|
3
|
-
*
|
|
4
|
-
* The function executes the provided `callback` for each iteration, passing the current index and the total count as arguments.
|
|
5
|
-
* It collects and returns the results of the callback in an array.
|
|
6
|
-
*
|
|
7
|
-
* @param callback - The function to be called on each iteration. Receives the current index and the total count.
|
|
8
|
-
* @param count - The number of times to execute the callback.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const result = times((index, count) => index / count, 5);
|
|
12
|
-
* // => [0, 0.2, 0.4, 0.6, 0.8]
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const repeatedStrings = times(() => 'hello', 3);
|
|
16
|
-
* // => ['hello', 'hello', 'hello']
|
|
17
|
-
*/
|
|
18
|
-
export function times<T>(
|
|
19
|
-
callback: (index: number, count: number) => T,
|
|
20
|
-
count: number,
|
|
21
|
-
): T[] {
|
|
22
|
-
let index = 0;
|
|
23
|
-
const list: T[] = [];
|
|
24
|
-
|
|
25
|
-
while (index < count) {
|
|
26
|
-
list.push(callback(index, count));
|
|
27
|
-
index += 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return list;
|
|
31
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|