@studiometa/js-toolkit 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Base/Base.cjs +325 -0
- package/Base/Base.cjs.map +7 -0
- package/Base/Base.d.ts +197 -0
- package/Base/Base.js +304 -0
- package/Base/Base.js.map +7 -0
- package/Base/features.cjs +1 -3
- package/Base/features.cjs.map +2 -2
- package/Base/features.d.ts +1 -1
- package/Base/features.js +1 -3
- package/Base/features.js.map +2 -2
- package/Base/index.cjs +2 -292
- package/Base/index.cjs.map +3 -3
- package/Base/index.d.ts +1 -193
- package/Base/index.js +1 -290
- package/Base/index.js.map +2 -2
- package/Base/managers/AbstractManager.d.ts +2 -2
- package/Base/managers/ChildrenManager.cjs +11 -7
- package/Base/managers/ChildrenManager.cjs.map +2 -2
- package/Base/managers/ChildrenManager.d.ts +1 -1
- package/Base/managers/ChildrenManager.js +12 -8
- package/Base/managers/ChildrenManager.js.map +2 -2
- package/Base/managers/OptionsManager.d.ts +9 -9
- package/Base/managers/RefsManager.cjs +13 -8
- package/Base/managers/RefsManager.cjs.map +2 -2
- package/Base/managers/RefsManager.js +14 -9
- package/Base/managers/RefsManager.js.map +2 -2
- package/Base/managers/ResponsiveOptionsManager.d.ts +1 -1
- package/Base/managers/ServicesManager.d.ts +2 -2
- package/Base/managers/index.cjs +0 -2
- package/Base/managers/index.cjs.map +2 -2
- package/Base/managers/index.d.ts +0 -1
- package/Base/managers/index.js +0 -2
- package/Base/managers/index.js.map +2 -2
- package/Base/types.d.ts +1 -1
- package/Base/utils.cjs +28 -1
- package/Base/utils.cjs.map +2 -2
- package/Base/utils.d.ts +4 -0
- package/Base/utils.js +29 -2
- package/Base/utils.js.map +2 -2
- package/decorators/index.cjs +1 -1
- package/decorators/index.cjs.map +2 -2
- package/decorators/index.d.ts +1 -1
- package/decorators/index.js +1 -1
- package/decorators/index.js.map +1 -1
- package/decorators/withDrag.d.ts +1 -1
- package/decorators/withScrolledInView/index.cjs +22 -0
- package/decorators/withScrolledInView/index.cjs.map +7 -0
- package/decorators/withScrolledInView/index.d.ts +2 -0
- package/decorators/withScrolledInView/index.js +3 -0
- package/decorators/withScrolledInView/index.js.map +7 -0
- package/decorators/withScrolledInView/types.cjs +19 -0
- package/decorators/withScrolledInView/types.cjs.map +7 -0
- package/decorators/withScrolledInView/types.d.ts +2 -0
- package/decorators/withScrolledInView/types.js +1 -0
- package/decorators/withScrolledInView/types.js.map +7 -0
- package/decorators/withScrolledInView/utils.cjs +99 -0
- package/decorators/withScrolledInView/utils.cjs.map +7 -0
- package/decorators/withScrolledInView/utils.d.ts +17 -0
- package/decorators/withScrolledInView/utils.js +77 -0
- package/decorators/withScrolledInView/utils.js.map +7 -0
- package/decorators/{withScrolledInView.cjs → withScrolledInView/withScrolledInView.cjs} +47 -46
- package/decorators/withScrolledInView/withScrolledInView.cjs.map +7 -0
- package/decorators/{withScrolledInView.d.ts → withScrolledInView/withScrolledInView.d.ts} +7 -11
- package/decorators/{withScrolledInView.js → withScrolledInView/withScrolledInView.js} +53 -45
- package/decorators/withScrolledInView/withScrolledInView.js.map +7 -0
- package/helpers/createApp.d.ts +1 -1
- package/helpers/getClosestParent.cjs +3 -11
- package/helpers/getClosestParent.cjs.map +2 -2
- package/helpers/getClosestParent.js +3 -11
- package/helpers/getClosestParent.js.map +2 -2
- package/helpers/importWhenIdle.d.ts +1 -1
- package/package.json +2 -2
- package/services/drag.d.ts +2 -2
- package/services/index.d.ts +7 -7
- package/services/key.d.ts +1 -1
- package/services/load.d.ts +1 -1
- package/services/pointer.d.ts +1 -1
- package/services/raf.d.ts +1 -1
- package/services/resize.d.ts +1 -1
- package/services/scroll.d.ts +1 -1
- package/utils/Queue.cjs +4 -1
- package/utils/Queue.cjs.map +2 -2
- package/utils/Queue.d.ts +1 -1
- package/utils/Queue.js +4 -1
- package/utils/Queue.js.map +2 -2
- package/utils/SmartQueue.cjs +57 -0
- package/utils/SmartQueue.cjs.map +7 -0
- package/utils/SmartQueue.d.ts +25 -0
- package/utils/SmartQueue.js +29 -0
- package/utils/SmartQueue.js.map +7 -0
- package/utils/css/animate.cjs +18 -1
- package/utils/css/animate.cjs.map +3 -3
- package/utils/css/animate.d.ts +6 -3
- package/utils/css/animate.js +18 -1
- package/utils/css/animate.js.map +3 -3
- package/utils/css/getOffsetSizes.cjs +1 -1
- package/utils/css/getOffsetSizes.cjs.map +1 -1
- package/utils/css/getOffsetSizes.js +1 -1
- package/utils/css/getOffsetSizes.js.map +1 -1
- package/utils/css/matrix.d.ts +1 -1
- package/utils/css/transform.d.ts +1 -1
- package/utils/css/transition.d.ts +2 -2
- package/utils/dom/ancestors.cjs +37 -0
- package/utils/dom/ancestors.cjs.map +7 -0
- package/utils/dom/ancestors.d.ts +8 -0
- package/utils/dom/ancestors.js +15 -0
- package/utils/dom/ancestors.js.map +7 -0
- package/utils/dom/index.cjs +21 -0
- package/utils/dom/index.cjs.map +7 -0
- package/utils/dom/index.d.ts +1 -0
- package/utils/dom/index.js +2 -0
- package/utils/dom/index.js.map +7 -0
- package/utils/index.cjs +4 -0
- package/utils/index.cjs.map +2 -2
- package/utils/index.d.ts +3 -0
- package/utils/index.js +4 -0
- package/utils/index.js.map +2 -2
- package/utils/is.cjs +1 -1
- package/utils/is.cjs.map +2 -2
- package/utils/is.js +1 -1
- package/utils/is.js.map +2 -2
- package/utils/math/createEases.d.ts +1 -1
- package/utils/nextTick.cjs +2 -5
- package/utils/nextTick.cjs.map +2 -2
- package/utils/nextTick.js +2 -5
- package/utils/nextTick.js.map +2 -2
- package/utils/tween.cjs +3 -2
- package/utils/tween.cjs.map +2 -2
- package/utils/tween.d.ts +2 -1
- package/utils/tween.js +3 -2
- package/utils/tween.js.map +2 -2
- package/utils/wait.cjs +31 -0
- package/utils/wait.cjs.map +7 -0
- package/utils/wait.d.ts +1 -0
- package/utils/wait.js +9 -0
- package/utils/wait.js.map +7 -0
- package/Base/managers/AsyncChildrenManager.cjs +0 -61
- package/Base/managers/AsyncChildrenManager.cjs.map +0 -7
- package/Base/managers/AsyncChildrenManager.d.ts +0 -18
- package/Base/managers/AsyncChildrenManager.js +0 -39
- package/Base/managers/AsyncChildrenManager.js.map +0 -7
- package/decorators/withScrolledInView.cjs.map +0 -7
- package/decorators/withScrolledInView.js.map +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../packages/js-toolkit/utils/dom/ancestors.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Get an ancestor matching the given condition.\n */\nexport function getAncestorWhere(element: HTMLElement, condition: (el: HTMLElement) => boolean) {\n if (!element) {\n return null;\n }\n\n const ancestor = element.parentElement;\n\n return condition(ancestor) ? ancestor : getAncestorWhere(ancestor, condition);\n}\n\n/**\n * Get an ancestor matching the given condition, stop when the until function is truthy.\n */\nexport function getAncestorWhereUntil(\n element: HTMLElement,\n condition: (el: HTMLElement) => boolean,\n until: (el: HTMLElement) => boolean,\n): HTMLElement | null {\n return getAncestorWhere(element, (el) => condition(el) || until(el));\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,iBAAiB,SAAsB,WAAyC;AAC9F,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,QAAQ;AAEzB,SAAO,UAAU,QAAQ,IAAI,WAAW,iBAAiB,UAAU,SAAS;AAC9E;AAKO,SAAS,sBACd,SACA,WACA,OACoB;AACpB,SAAO,iBAAiB,SAAS,CAAC,OAAO,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;AACrE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get an ancestor matching the given condition.
|
|
3
|
+
*/
|
|
4
|
+
export declare function getAncestorWhere(element: HTMLElement, condition: (el: HTMLElement) => boolean): any;
|
|
5
|
+
/**
|
|
6
|
+
* Get an ancestor matching the given condition, stop when the until function is truthy.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAncestorWhereUntil(element: HTMLElement, condition: (el: HTMLElement) => boolean, until: (el: HTMLElement) => boolean): HTMLElement | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function getAncestorWhere(element, condition) {
|
|
2
|
+
if (!element) {
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
const ancestor = element.parentElement;
|
|
6
|
+
return condition(ancestor) ? ancestor : getAncestorWhere(ancestor, condition);
|
|
7
|
+
}
|
|
8
|
+
function getAncestorWhereUntil(element, condition, until) {
|
|
9
|
+
return getAncestorWhere(element, (el) => condition(el) || until(el));
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
getAncestorWhere,
|
|
13
|
+
getAncestorWhereUntil
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ancestors.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../packages/js-toolkit/utils/dom/ancestors.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Get an ancestor matching the given condition.\n */\nexport function getAncestorWhere(element: HTMLElement, condition: (el: HTMLElement) => boolean) {\n if (!element) {\n return null;\n }\n\n const ancestor = element.parentElement;\n\n return condition(ancestor) ? ancestor : getAncestorWhere(ancestor, condition);\n}\n\n/**\n * Get an ancestor matching the given condition, stop when the until function is truthy.\n */\nexport function getAncestorWhereUntil(\n element: HTMLElement,\n condition: (el: HTMLElement) => boolean,\n until: (el: HTMLElement) => boolean,\n): HTMLElement | null {\n return getAncestorWhere(element, (el) => condition(el) || until(el));\n}\n"],
|
|
5
|
+
"mappings": "AAGO,SAAS,iBAAiB,SAAsB,WAAyC;AAC9F,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,QAAQ;AAEzB,SAAO,UAAU,QAAQ,IAAI,WAAW,iBAAiB,UAAU,SAAS;AAC9E;AAKO,SAAS,sBACd,SACA,WACA,OACoB;AACpB,SAAO,iBAAiB,SAAS,CAAC,OAAO,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;AACrE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// packages/js-toolkit/utils/dom/index.ts
|
|
17
|
+
var dom_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(dom_exports);
|
|
19
|
+
__reExport(dom_exports, require("./ancestors.cjs"), module.exports);
|
|
20
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
21
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ancestors.js';
|
package/utils/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
27
27
|
var utils_exports = {};
|
|
28
28
|
__export(utils_exports, {
|
|
29
29
|
Queue: () => import_Queue.Queue,
|
|
30
|
+
SmartQueue: () => import_SmartQueue.SmartQueue,
|
|
30
31
|
debounce: () => import_debounce.default,
|
|
31
32
|
focusTrap: () => import_focusTrap.default,
|
|
32
33
|
historyPush: () => import_history.push,
|
|
@@ -62,5 +63,8 @@ __reExport(utils_exports, require("./scheduler.cjs"), module.exports);
|
|
|
62
63
|
__reExport(utils_exports, require("./noop.cjs"), module.exports);
|
|
63
64
|
var import_tween = require("./tween.cjs");
|
|
64
65
|
var import_Queue = require("./Queue.cjs");
|
|
66
|
+
var import_SmartQueue = require("./SmartQueue.cjs");
|
|
67
|
+
__reExport(utils_exports, require("./dom/index.cjs"), module.exports);
|
|
68
|
+
__reExport(utils_exports, require("./wait.cjs"), module.exports);
|
|
65
69
|
if (module.exports.default) module.exports = module.exports.default;
|
|
66
70
|
//# sourceMappingURL=index.cjs.map
|
package/utils/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as debounce } from './debounce.js';\nexport { default as focusTrap } from './focusTrap.js';\nexport { default as keyCodes } from './keyCodes.js';\nexport { default as memoize } from './memoize.js';\nexport { nextFrame } from './nextFrame.js';\nexport { default as nextTick } from './nextTick.js';\nexport { default as nextMicrotask } from './nextMicrotask.js';\nexport { default as throttle } from './throttle.js';\nexport { default as scrollTo } from './scrollTo.js';\nexport * from './is.js';\nexport * from './has.js';\n// eslint-disable-next-line import/extensions\nexport * from './css/index.js';\nexport {\n objectToURLSearchParams,\n push as historyPush,\n replace as historyReplace,\n} from './history.js';\nexport * from './collide/index.js';\nexport * from './math/index.js';\nexport * from './string/index.js';\nexport * from './scheduler.js';\nexport * from './noop.js';\nexport { tween } from './tween.js';\nexport { Queue } from './Queue.js';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,uBAAqC;AACrC,sBAAoC;AACpC,qBAAmC;AACnC,uBAA0B;AAC1B,sBAAoC;AACpC,2BAAyC;AACzC,sBAAoC;AACpC,sBAAoC;AACpC,0BAAc,qBATd;AAUA,0BAAc,sBAVd;AAYA,0BAAc,4BAZd;AAaA,qBAIO;AACP,0BAAc,gCAlBd;AAmBA,0BAAc,6BAnBd;AAoBA,0BAAc,+BApBd;AAqBA,0BAAc,4BArBd;AAsBA,0BAAc,uBAtBd;AAuBA,mBAAsB;AACtB,mBAAsB;",
|
|
4
|
+
"sourcesContent": ["export { default as debounce } from './debounce.js';\nexport { default as focusTrap } from './focusTrap.js';\nexport { default as keyCodes } from './keyCodes.js';\nexport { default as memoize } from './memoize.js';\nexport { nextFrame } from './nextFrame.js';\nexport { default as nextTick } from './nextTick.js';\nexport { default as nextMicrotask } from './nextMicrotask.js';\nexport { default as throttle } from './throttle.js';\nexport { default as scrollTo } from './scrollTo.js';\nexport * from './is.js';\nexport * from './has.js';\n// eslint-disable-next-line import/extensions\nexport * from './css/index.js';\nexport {\n objectToURLSearchParams,\n push as historyPush,\n replace as historyReplace,\n} from './history.js';\nexport * from './collide/index.js';\nexport * from './math/index.js';\nexport * from './string/index.js';\nexport * from './scheduler.js';\nexport * from './noop.js';\nexport { tween } from './tween.js';\nexport { Queue } from './Queue.js';\nexport { SmartQueue } from './SmartQueue.js';\nexport * from './dom/index.js';\nexport * from './wait.js';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,uBAAqC;AACrC,sBAAoC;AACpC,qBAAmC;AACnC,uBAA0B;AAC1B,sBAAoC;AACpC,2BAAyC;AACzC,sBAAoC;AACpC,sBAAoC;AACpC,0BAAc,qBATd;AAUA,0BAAc,sBAVd;AAYA,0BAAc,4BAZd;AAaA,qBAIO;AACP,0BAAc,gCAlBd;AAmBA,0BAAc,6BAnBd;AAoBA,0BAAc,+BApBd;AAqBA,0BAAc,4BArBd;AAsBA,0BAAc,uBAtBd;AAuBA,mBAAsB;AACtB,mBAAsB;AACtB,wBAA2B;AAC3B,0BAAc,4BA1Bd;AA2BA,0BAAc,uBA3Bd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/index.d.ts
CHANGED
package/utils/index.js
CHANGED
|
@@ -22,8 +22,12 @@ export * from "./scheduler.js";
|
|
|
22
22
|
export * from "./noop.js";
|
|
23
23
|
import { tween } from "./tween.js";
|
|
24
24
|
import { Queue } from "./Queue.js";
|
|
25
|
+
import { SmartQueue } from "./SmartQueue.js";
|
|
26
|
+
export * from "./dom/index.js";
|
|
27
|
+
export * from "./wait.js";
|
|
25
28
|
export {
|
|
26
29
|
Queue,
|
|
30
|
+
SmartQueue,
|
|
27
31
|
default2 as debounce,
|
|
28
32
|
default3 as focusTrap,
|
|
29
33
|
push as historyPush,
|
package/utils/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as debounce } from './debounce.js';\nexport { default as focusTrap } from './focusTrap.js';\nexport { default as keyCodes } from './keyCodes.js';\nexport { default as memoize } from './memoize.js';\nexport { nextFrame } from './nextFrame.js';\nexport { default as nextTick } from './nextTick.js';\nexport { default as nextMicrotask } from './nextMicrotask.js';\nexport { default as throttle } from './throttle.js';\nexport { default as scrollTo } from './scrollTo.js';\nexport * from './is.js';\nexport * from './has.js';\n// eslint-disable-next-line import/extensions\nexport * from './css/index.js';\nexport {\n objectToURLSearchParams,\n push as historyPush,\n replace as historyReplace,\n} from './history.js';\nexport * from './collide/index.js';\nexport * from './math/index.js';\nexport * from './string/index.js';\nexport * from './scheduler.js';\nexport * from './noop.js';\nexport { tween } from './tween.js';\nexport { Queue } from './Queue.js';\n"],
|
|
5
|
-
"mappings": "AAAA,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA4B;AACrC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA2B;AACpC,cAAc;AACd,cAAc;AAEd,cAAc;AACd;AAAA,EACE;AAAA,EACQ;AAAA,EACG;AAAA,OACN;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,aAAa;AACtB,SAAS,aAAa;",
|
|
4
|
+
"sourcesContent": ["export { default as debounce } from './debounce.js';\nexport { default as focusTrap } from './focusTrap.js';\nexport { default as keyCodes } from './keyCodes.js';\nexport { default as memoize } from './memoize.js';\nexport { nextFrame } from './nextFrame.js';\nexport { default as nextTick } from './nextTick.js';\nexport { default as nextMicrotask } from './nextMicrotask.js';\nexport { default as throttle } from './throttle.js';\nexport { default as scrollTo } from './scrollTo.js';\nexport * from './is.js';\nexport * from './has.js';\n// eslint-disable-next-line import/extensions\nexport * from './css/index.js';\nexport {\n objectToURLSearchParams,\n push as historyPush,\n replace as historyReplace,\n} from './history.js';\nexport * from './collide/index.js';\nexport * from './math/index.js';\nexport * from './string/index.js';\nexport * from './scheduler.js';\nexport * from './noop.js';\nexport { tween } from './tween.js';\nexport { Queue } from './Queue.js';\nexport { SmartQueue } from './SmartQueue.js';\nexport * from './dom/index.js';\nexport * from './wait.js';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA4B;AACrC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA2B;AACpC,cAAc;AACd,cAAc;AAEd,cAAc;AACd;AAAA,EACE;AAAA,EACQ;AAAA,EACG;AAAA,OACN;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
package/utils/is.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var isFunction = (value) => typeof value === "function";
|
|
|
34
34
|
var isDefined = (value) => typeof value !== "undefined";
|
|
35
35
|
var isString = (value) => typeof value === "string";
|
|
36
36
|
var isObject = (value) => typeof value === "object" && !!value && value.toString() === "[object Object]";
|
|
37
|
-
var isNumber = (value) => typeof value === "number";
|
|
37
|
+
var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
38
38
|
var isBoolean = (value) => typeof value === "boolean";
|
|
39
39
|
var isArray = Array.isArray;
|
|
40
40
|
if (module.exports.default) module.exports = module.exports.default;
|
package/utils/is.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/is.ts"],
|
|
4
|
-
"sourcesContent": ["// eslint-disable-next-line no-undef\nexport const isDev = typeof __DEV__ !== 'undefined' && __DEV__;\n\n/**\n * Test if the given value is a function.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isFunction = (value: unknown): value is Function => typeof value === 'function';\n\n/**\n * Test if a value is defined or not.\n */\nexport const isDefined = (value: unknown): boolean => typeof value !== 'undefined';\n\n/**\n * Test if value is a string.\n */\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Test if the given value is an object.\n */\nexport const isObject = (value: unknown): boolean =>\n typeof value === 'object' && !!value && value.toString() === '[object Object]';\n\n/**\n * Test if a given value is a number.\n */\nexport const isNumber = (value: unknown): value is number
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,QAAQ,OAAO,YAAY,eAAe;AAMhD,IAAM,aAAa,CAAC,UAAsC,OAAO,UAAU;AAK3E,IAAM,YAAY,CAAC,UAA4B,OAAO,UAAU;AAKhE,IAAM,WAAW,CAAC,UAAoC,OAAO,UAAU;AAKvE,IAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM,SAAS,MAAM;AAKxD,IAAM,WAAW,CAAC,
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line no-undef\nexport const isDev = typeof __DEV__ !== 'undefined' && __DEV__;\n\n/**\n * Test if the given value is a function.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isFunction = (value: unknown): value is Function => typeof value === 'function';\n\n/**\n * Test if a value is defined or not.\n */\nexport const isDefined = (value: unknown): boolean => typeof value !== 'undefined';\n\n/**\n * Test if value is a string.\n */\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Test if the given value is an object.\n */\nexport const isObject = (value: unknown): boolean =>\n typeof value === 'object' && !!value && value.toString() === '[object Object]';\n\n/**\n * Test if a given value is a number.\n */\nexport const isNumber = (value: unknown): value is number =>\n typeof value === 'number' && !Number.isNaN(value);\n\n/**\n * Test if a given value is a boolean.\n */\nexport const isBoolean = (value: unknown): value is boolean => typeof value === 'boolean';\n\n// eslint-disable-next-line prefer-destructuring\nexport const isArray = Array.isArray;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,QAAQ,OAAO,YAAY,eAAe;AAMhD,IAAM,aAAa,CAAC,UAAsC,OAAO,UAAU;AAK3E,IAAM,YAAY,CAAC,UAA4B,OAAO,UAAU;AAKhE,IAAM,WAAW,CAAC,UAAoC,OAAO,UAAU;AAKvE,IAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM,SAAS,MAAM;AAKxD,IAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,OAAO,MAAM,KAAK;AAK3C,IAAM,YAAY,CAAC,UAAqC,OAAO,UAAU;AAGzE,IAAM,UAAU,MAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/is.js
CHANGED
|
@@ -3,7 +3,7 @@ const isFunction = (value) => typeof value === "function";
|
|
|
3
3
|
const isDefined = (value) => typeof value !== "undefined";
|
|
4
4
|
const isString = (value) => typeof value === "string";
|
|
5
5
|
const isObject = (value) => typeof value === "object" && !!value && value.toString() === "[object Object]";
|
|
6
|
-
const isNumber = (value) => typeof value === "number";
|
|
6
|
+
const isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
|
|
7
7
|
const isBoolean = (value) => typeof value === "boolean";
|
|
8
8
|
const isArray = Array.isArray;
|
|
9
9
|
export {
|
package/utils/is.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/is.ts"],
|
|
4
|
-
"sourcesContent": ["// eslint-disable-next-line no-undef\nexport const isDev = typeof __DEV__ !== 'undefined' && __DEV__;\n\n/**\n * Test if the given value is a function.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isFunction = (value: unknown): value is Function => typeof value === 'function';\n\n/**\n * Test if a value is defined or not.\n */\nexport const isDefined = (value: unknown): boolean => typeof value !== 'undefined';\n\n/**\n * Test if value is a string.\n */\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Test if the given value is an object.\n */\nexport const isObject = (value: unknown): boolean =>\n typeof value === 'object' && !!value && value.toString() === '[object Object]';\n\n/**\n * Test if a given value is a number.\n */\nexport const isNumber = (value: unknown): value is number
|
|
5
|
-
"mappings": "AACO,MAAM,QAAQ,OAAO,YAAY,eAAe;AAMhD,MAAM,aAAa,CAAC,UAAsC,OAAO,UAAU;AAK3E,MAAM,YAAY,CAAC,UAA4B,OAAO,UAAU;AAKhE,MAAM,WAAW,CAAC,UAAoC,OAAO,UAAU;AAKvE,MAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM,SAAS,MAAM;AAKxD,MAAM,WAAW,CAAC,
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line no-undef\nexport const isDev = typeof __DEV__ !== 'undefined' && __DEV__;\n\n/**\n * Test if the given value is a function.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const isFunction = (value: unknown): value is Function => typeof value === 'function';\n\n/**\n * Test if a value is defined or not.\n */\nexport const isDefined = (value: unknown): boolean => typeof value !== 'undefined';\n\n/**\n * Test if value is a string.\n */\nexport const isString = (value: unknown): value is string => typeof value === 'string';\n\n/**\n * Test if the given value is an object.\n */\nexport const isObject = (value: unknown): boolean =>\n typeof value === 'object' && !!value && value.toString() === '[object Object]';\n\n/**\n * Test if a given value is a number.\n */\nexport const isNumber = (value: unknown): value is number =>\n typeof value === 'number' && !Number.isNaN(value);\n\n/**\n * Test if a given value is a boolean.\n */\nexport const isBoolean = (value: unknown): value is boolean => typeof value === 'boolean';\n\n// eslint-disable-next-line prefer-destructuring\nexport const isArray = Array.isArray;\n"],
|
|
5
|
+
"mappings": "AACO,MAAM,QAAQ,OAAO,YAAY,eAAe;AAMhD,MAAM,aAAa,CAAC,UAAsC,OAAO,UAAU;AAK3E,MAAM,YAAY,CAAC,UAA4B,OAAO,UAAU;AAKhE,MAAM,WAAW,CAAC,UAAoC,OAAO,UAAU;AAKvE,MAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM,SAAS,MAAM;AAKxD,MAAM,WAAW,CAAC,UACvB,OAAO,UAAU,YAAY,CAAC,OAAO,MAAM,KAAK;AAK3C,MAAM,YAAY,CAAC,UAAqC,OAAO,UAAU;AAGzE,MAAM,UAAU,MAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/nextTick.cjs
CHANGED
|
@@ -23,12 +23,9 @@ __export(nextTick_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(nextTick_exports);
|
|
25
25
|
var import_is = require("./is.cjs");
|
|
26
|
+
var import_wait = require("./wait.cjs");
|
|
26
27
|
async function nextTick(fn) {
|
|
27
|
-
return
|
|
28
|
-
setTimeout(() => {
|
|
29
|
-
resolve((0, import_is.isFunction)(fn) && fn());
|
|
30
|
-
}, 0);
|
|
31
|
-
});
|
|
28
|
+
return (0, import_wait.wait)().then((0, import_is.isFunction)(fn) && fn);
|
|
32
29
|
}
|
|
33
30
|
if (module.exports.default) module.exports = module.exports.default;
|
|
34
31
|
//# sourceMappingURL=nextTick.cjs.map
|
package/utils/nextTick.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/nextTick.ts"],
|
|
4
|
-
"sourcesContent": ["import { isFunction } from './is.js';\n\n/**\n * Wait for the next tick.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default async function nextTick<T extends () => any>(\n fn?: T,\n): Promise<T extends void ? void : ReturnType<T>> {\n return
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;
|
|
4
|
+
"sourcesContent": ["import { isFunction } from './is.js';\nimport { wait } from './wait.js';\n\n/**\n * Wait for the next tick.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default async function nextTick<T extends () => any>(\n fn?: T,\n): Promise<T extends void ? void : ReturnType<T>> {\n return wait().then(isFunction(fn) && (fn as ReturnType<T>));\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAA2B;AAC3B,kBAAqB;AAMrB,eAAO,SACL,IACgD;AAChD,aAAO,kBAAK,EAAE,SAAK,sBAAW,EAAE,KAAM,EAAoB;AAC5D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/nextTick.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { isFunction } from "./is.js";
|
|
2
|
+
import { wait } from "./wait.js";
|
|
2
3
|
async function nextTick(fn) {
|
|
3
|
-
return
|
|
4
|
-
setTimeout(() => {
|
|
5
|
-
resolve(isFunction(fn) && fn());
|
|
6
|
-
}, 0);
|
|
7
|
-
});
|
|
4
|
+
return wait().then(isFunction(fn) && fn);
|
|
8
5
|
}
|
|
9
6
|
export {
|
|
10
7
|
nextTick as default
|
package/utils/nextTick.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/nextTick.ts"],
|
|
4
|
-
"sourcesContent": ["import { isFunction } from './is.js';\n\n/**\n * Wait for the next tick.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default async function nextTick<T extends () => any>(\n fn?: T,\n): Promise<T extends void ? void : ReturnType<T>> {\n return
|
|
5
|
-
"mappings": "AAAA,SAAS,kBAAkB;
|
|
4
|
+
"sourcesContent": ["import { isFunction } from './is.js';\nimport { wait } from './wait.js';\n\n/**\n * Wait for the next tick.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default async function nextTick<T extends () => any>(\n fn?: T,\n): Promise<T extends void ? void : ReturnType<T>> {\n return wait().then(isFunction(fn) && (fn as ReturnType<T>));\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAMrB,eAAO,SACL,IACgD;AAChD,SAAO,KAAK,EAAE,KAAK,WAAW,EAAE,KAAM,EAAoB;AAC5D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/tween.cjs
CHANGED
|
@@ -35,7 +35,7 @@ var import_is = require("./is.cjs");
|
|
|
35
35
|
var import_noop = require("./noop.cjs");
|
|
36
36
|
var import_raf = __toESM(require("../services/raf.cjs"), 1);
|
|
37
37
|
var id = 0;
|
|
38
|
-
var
|
|
38
|
+
var DEFAULT_PROGRESS_PRECISION = 1e-4;
|
|
39
39
|
function normalizeEase(ease) {
|
|
40
40
|
if (!(0, import_is.isDefined)(ease)) {
|
|
41
41
|
return import_noop.noopValue;
|
|
@@ -49,6 +49,7 @@ function tween(callback, options = {}) {
|
|
|
49
49
|
const raf = (0, import_raf.default)();
|
|
50
50
|
let progressValue = 0;
|
|
51
51
|
let easedProgress = 0;
|
|
52
|
+
const precision = options.precision ?? DEFAULT_PROGRESS_PRECISION;
|
|
52
53
|
const ease = normalizeEase(options.easing);
|
|
53
54
|
let duration = options.duration ?? 1;
|
|
54
55
|
duration *= 1e3;
|
|
@@ -68,7 +69,7 @@ function tween(callback, options = {}) {
|
|
|
68
69
|
}
|
|
69
70
|
progressValue = newProgress;
|
|
70
71
|
easedProgress = ease(progressValue);
|
|
71
|
-
if (Math.abs(1 - easedProgress) <
|
|
72
|
+
if (Math.abs(1 - easedProgress) < precision) {
|
|
72
73
|
progressValue = 1;
|
|
73
74
|
easedProgress = 1;
|
|
74
75
|
}
|
package/utils/tween.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/tween.ts"],
|
|
4
|
-
"sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\nimport type { EasingFunction } from './math/createEases.js';\n\nlet id = 0;\nconst
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4B;AAC5B,kBAAmC;AACnC,gBAAmC;AACnC,kBAA0C;AAC1C,iBAAmB;AAGnB,IAAI,KAAK;AACT,IAAM,
|
|
4
|
+
"sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\nimport type { EasingFunction } from './math/createEases.js';\n\nlet id = 0;\nconst DEFAULT_PROGRESS_PRECISION = 0.0001;\n\nexport type BezierCurve = [number, number, number, number];\n\nexport interface TweenOptions {\n duration?: number;\n easing?: EasingFunction | BezierCurve;\n precision?: number;\n onStart?: () => void;\n onProgress?: (progress: number, easedProgress: number) => void;\n onFinish?: (progress: number, easedProgress: number) => void;\n}\n\n/**\n * Normalize a easing function with default fallbacks.\n */\nexport function normalizeEase(ease: EasingFunction | BezierCurve): EasingFunction {\n if (!isDefined(ease)) {\n return linear;\n }\n\n if (isArray(ease)) {\n return cubicBezier(...ease);\n }\n\n return ease;\n}\n\n/**\n * Tween from 0 to 1.\n */\nexport function tween(callback: (progress: number) => unknown, options: TweenOptions = {}) {\n const raf = useRaf();\n\n let progressValue = 0;\n let easedProgress = 0;\n\n const precision = options.precision ?? DEFAULT_PROGRESS_PRECISION;\n const ease = normalizeEase(options.easing);\n let duration = options.duration ?? 1;\n duration *= 1000;\n\n let startTime = performance.now();\n let endTime = startTime + duration;\n\n const key = `tw-${id}`;\n id += 1;\n\n const { onStart = noop, onProgress = noop, onFinish = noop } = options;\n let isRunning = false;\n\n /**\n * Pause the animation.\n */\n function pause() {\n isRunning = false;\n raf.remove(key);\n }\n\n /**\n * Set the progress value.\n */\n function progress(newProgress: number) {\n if (typeof newProgress === 'undefined') {\n return easedProgress;\n }\n\n progressValue = newProgress;\n easedProgress = ease(progressValue);\n\n // Stop when reaching precision\n if (Math.abs(1 - easedProgress) < precision) {\n progressValue = 1;\n easedProgress = 1;\n }\n\n callback(easedProgress);\n onProgress(progressValue, easedProgress);\n\n if (easedProgress === 1) {\n pause();\n requestAnimationFrame(() => onFinish(progressValue, easedProgress));\n }\n\n return progressValue;\n }\n\n /**\n * Loop for rendering the animation.\n */\n function tick(props: { time: number }) {\n if (!isRunning) {\n raf.remove(key);\n return;\n }\n\n progress(clamp01(map(props.time, startTime, endTime, 0, 1)));\n }\n\n /**\n * Play the animation.\n */\n function start() {\n onStart();\n startTime = performance.now();\n endTime = startTime + duration;\n progressValue = 0;\n easedProgress = 0;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n /**\n * Play a paused animation.\n */\n function play() {\n if (isRunning) {\n return;\n }\n\n startTime = performance.now() - lerp(0, duration, progressValue);\n endTime = startTime + duration;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n return {\n start,\n finish: () => progress(1),\n pause,\n play,\n progress,\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4B;AAC5B,kBAAmC;AACnC,gBAAmC;AACnC,kBAA0C;AAC1C,iBAAmB;AAGnB,IAAI,KAAK;AACT,IAAM,6BAA6B;AAgB5B,SAAS,cAAc,MAAoD;AAChF,MAAI,KAAC,qBAAU,IAAI,GAAG;AACpB,WAAO,YAAAA;AAAA,EACT;AAEA,UAAI,mBAAQ,IAAI,GAAG;AACjB,eAAO,2BAAY,GAAG,IAAI;AAAA,EAC5B;AAEA,SAAO;AACT;AAKO,SAAS,MAAM,UAAyC,UAAwB,CAAC,GAAG;AACzF,QAAM,UAAM,WAAAC,SAAO;AAEnB,MAAI,gBAAgB;AACpB,MAAI,gBAAgB;AAEpB,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,OAAO,cAAc,QAAQ,MAAM;AACzC,MAAI,WAAW,QAAQ,YAAY;AACnC,cAAY;AAEZ,MAAI,YAAY,YAAY,IAAI;AAChC,MAAI,UAAU,YAAY;AAE1B,QAAM,MAAM,MAAM;AAClB,QAAM;AAEN,QAAM,EAAE,UAAU,kBAAM,aAAa,kBAAM,WAAW,iBAAK,IAAI;AAC/D,MAAI,YAAY;AAKhB,WAAS,QAAQ;AACf,gBAAY;AACZ,QAAI,OAAO,GAAG;AAAA,EAChB;AAKA,WAAS,SAAS,aAAqB;AACrC,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO;AAAA,IACT;AAEA,oBAAgB;AAChB,oBAAgB,KAAK,aAAa;AAGlC,QAAI,KAAK,IAAI,IAAI,aAAa,IAAI,WAAW;AAC3C,sBAAgB;AAChB,sBAAgB;AAAA,IAClB;AAEA,aAAS,aAAa;AACtB,eAAW,eAAe,aAAa;AAEvC,QAAI,kBAAkB,GAAG;AACvB,YAAM;AACN,4BAAsB,MAAM,SAAS,eAAe,aAAa,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AAKA,WAAS,KAAK,OAAyB;AACrC,QAAI,CAAC,WAAW;AACd,UAAI,OAAO,GAAG;AACd;AAAA,IACF;AAEA,iBAAS,yBAAQ,iBAAI,MAAM,MAAM,WAAW,SAAS,GAAG,CAAC,CAAC,CAAC;AAAA,EAC7D;AAKA,WAAS,QAAQ;AACf,YAAQ;AACR,gBAAY,YAAY,IAAI;AAC5B,cAAU,YAAY;AACtB,oBAAgB;AAChB,oBAAgB;AAChB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAKA,WAAS,OAAO;AACd,QAAI,WAAW;AACb;AAAA,IACF;AAEA,gBAAY,YAAY,IAAI,QAAI,kBAAK,GAAG,UAAU,aAAa;AAC/D,cAAU,YAAY;AACtB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAEA,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,MAAM,SAAS,CAAC;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["linear", "useRaf"]
|
|
7
7
|
}
|
package/utils/tween.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { EasingFunction } from './math/createEases.js';
|
|
2
|
-
export
|
|
2
|
+
export type BezierCurve = [number, number, number, number];
|
|
3
3
|
export interface TweenOptions {
|
|
4
4
|
duration?: number;
|
|
5
5
|
easing?: EasingFunction | BezierCurve;
|
|
6
|
+
precision?: number;
|
|
6
7
|
onStart?: () => void;
|
|
7
8
|
onProgress?: (progress: number, easedProgress: number) => void;
|
|
8
9
|
onFinish?: (progress: number, easedProgress: number) => void;
|
package/utils/tween.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isDefined, isArray } from "./is.js";
|
|
|
4
4
|
import { noop, noopValue as linear } from "./noop.js";
|
|
5
5
|
import useRaf from "../services/raf.js";
|
|
6
6
|
let id = 0;
|
|
7
|
-
const
|
|
7
|
+
const DEFAULT_PROGRESS_PRECISION = 1e-4;
|
|
8
8
|
function normalizeEase(ease) {
|
|
9
9
|
if (!isDefined(ease)) {
|
|
10
10
|
return linear;
|
|
@@ -18,6 +18,7 @@ function tween(callback, options = {}) {
|
|
|
18
18
|
const raf = useRaf();
|
|
19
19
|
let progressValue = 0;
|
|
20
20
|
let easedProgress = 0;
|
|
21
|
+
const precision = options.precision ?? DEFAULT_PROGRESS_PRECISION;
|
|
21
22
|
const ease = normalizeEase(options.easing);
|
|
22
23
|
let duration = options.duration ?? 1;
|
|
23
24
|
duration *= 1e3;
|
|
@@ -37,7 +38,7 @@ function tween(callback, options = {}) {
|
|
|
37
38
|
}
|
|
38
39
|
progressValue = newProgress;
|
|
39
40
|
easedProgress = ease(progressValue);
|
|
40
|
-
if (Math.abs(1 - easedProgress) <
|
|
41
|
+
if (Math.abs(1 - easedProgress) < precision) {
|
|
41
42
|
progressValue = 1;
|
|
42
43
|
easedProgress = 1;
|
|
43
44
|
}
|
package/utils/tween.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/utils/tween.ts"],
|
|
4
|
-
"sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\nimport type { EasingFunction } from './math/createEases.js';\n\nlet id = 0;\nconst
|
|
5
|
-
"mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,MAAM,KAAK,eAAe;AACnC,SAAS,WAAW,eAAe;AACnC,SAAS,MAAM,aAAa,cAAc;AAC1C,OAAO,YAAY;AAGnB,IAAI,KAAK;AACT,MAAM,
|
|
4
|
+
"sourcesContent": ["import { cubicBezier } from '@motionone/easing';\nimport { lerp, map, clamp01 } from './math/index.js';\nimport { isDefined, isArray } from './is.js';\nimport { noop, noopValue as linear } from './noop.js';\nimport useRaf from '../services/raf.js';\nimport type { EasingFunction } from './math/createEases.js';\n\nlet id = 0;\nconst DEFAULT_PROGRESS_PRECISION = 0.0001;\n\nexport type BezierCurve = [number, number, number, number];\n\nexport interface TweenOptions {\n duration?: number;\n easing?: EasingFunction | BezierCurve;\n precision?: number;\n onStart?: () => void;\n onProgress?: (progress: number, easedProgress: number) => void;\n onFinish?: (progress: number, easedProgress: number) => void;\n}\n\n/**\n * Normalize a easing function with default fallbacks.\n */\nexport function normalizeEase(ease: EasingFunction | BezierCurve): EasingFunction {\n if (!isDefined(ease)) {\n return linear;\n }\n\n if (isArray(ease)) {\n return cubicBezier(...ease);\n }\n\n return ease;\n}\n\n/**\n * Tween from 0 to 1.\n */\nexport function tween(callback: (progress: number) => unknown, options: TweenOptions = {}) {\n const raf = useRaf();\n\n let progressValue = 0;\n let easedProgress = 0;\n\n const precision = options.precision ?? DEFAULT_PROGRESS_PRECISION;\n const ease = normalizeEase(options.easing);\n let duration = options.duration ?? 1;\n duration *= 1000;\n\n let startTime = performance.now();\n let endTime = startTime + duration;\n\n const key = `tw-${id}`;\n id += 1;\n\n const { onStart = noop, onProgress = noop, onFinish = noop } = options;\n let isRunning = false;\n\n /**\n * Pause the animation.\n */\n function pause() {\n isRunning = false;\n raf.remove(key);\n }\n\n /**\n * Set the progress value.\n */\n function progress(newProgress: number) {\n if (typeof newProgress === 'undefined') {\n return easedProgress;\n }\n\n progressValue = newProgress;\n easedProgress = ease(progressValue);\n\n // Stop when reaching precision\n if (Math.abs(1 - easedProgress) < precision) {\n progressValue = 1;\n easedProgress = 1;\n }\n\n callback(easedProgress);\n onProgress(progressValue, easedProgress);\n\n if (easedProgress === 1) {\n pause();\n requestAnimationFrame(() => onFinish(progressValue, easedProgress));\n }\n\n return progressValue;\n }\n\n /**\n * Loop for rendering the animation.\n */\n function tick(props: { time: number }) {\n if (!isRunning) {\n raf.remove(key);\n return;\n }\n\n progress(clamp01(map(props.time, startTime, endTime, 0, 1)));\n }\n\n /**\n * Play the animation.\n */\n function start() {\n onStart();\n startTime = performance.now();\n endTime = startTime + duration;\n progressValue = 0;\n easedProgress = 0;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n /**\n * Play a paused animation.\n */\n function play() {\n if (isRunning) {\n return;\n }\n\n startTime = performance.now() - lerp(0, duration, progressValue);\n endTime = startTime + duration;\n isRunning = true;\n\n raf.add(key, tick);\n }\n\n return {\n start,\n finish: () => progress(1),\n pause,\n play,\n progress,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,MAAM,KAAK,eAAe;AACnC,SAAS,WAAW,eAAe;AACnC,SAAS,MAAM,aAAa,cAAc;AAC1C,OAAO,YAAY;AAGnB,IAAI,KAAK;AACT,MAAM,6BAA6B;AAgB5B,SAAS,cAAc,MAAoD;AAChF,MAAI,CAAC,UAAU,IAAI,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,IAAI,GAAG;AACjB,WAAO,YAAY,GAAG,IAAI;AAAA,EAC5B;AAEA,SAAO;AACT;AAKO,SAAS,MAAM,UAAyC,UAAwB,CAAC,GAAG;AACzF,QAAM,MAAM,OAAO;AAEnB,MAAI,gBAAgB;AACpB,MAAI,gBAAgB;AAEpB,QAAM,YAAY,QAAQ,aAAa;AACvC,QAAM,OAAO,cAAc,QAAQ,MAAM;AACzC,MAAI,WAAW,QAAQ,YAAY;AACnC,cAAY;AAEZ,MAAI,YAAY,YAAY,IAAI;AAChC,MAAI,UAAU,YAAY;AAE1B,QAAM,MAAM,MAAM;AAClB,QAAM;AAEN,QAAM,EAAE,UAAU,MAAM,aAAa,MAAM,WAAW,KAAK,IAAI;AAC/D,MAAI,YAAY;AAKhB,WAAS,QAAQ;AACf,gBAAY;AACZ,QAAI,OAAO,GAAG;AAAA,EAChB;AAKA,WAAS,SAAS,aAAqB;AACrC,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO;AAAA,IACT;AAEA,oBAAgB;AAChB,oBAAgB,KAAK,aAAa;AAGlC,QAAI,KAAK,IAAI,IAAI,aAAa,IAAI,WAAW;AAC3C,sBAAgB;AAChB,sBAAgB;AAAA,IAClB;AAEA,aAAS,aAAa;AACtB,eAAW,eAAe,aAAa;AAEvC,QAAI,kBAAkB,GAAG;AACvB,YAAM;AACN,4BAAsB,MAAM,SAAS,eAAe,aAAa,CAAC;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AAKA,WAAS,KAAK,OAAyB;AACrC,QAAI,CAAC,WAAW;AACd,UAAI,OAAO,GAAG;AACd;AAAA,IACF;AAEA,aAAS,QAAQ,IAAI,MAAM,MAAM,WAAW,SAAS,GAAG,CAAC,CAAC,CAAC;AAAA,EAC7D;AAKA,WAAS,QAAQ;AACf,YAAQ;AACR,gBAAY,YAAY,IAAI;AAC5B,cAAU,YAAY;AACtB,oBAAgB;AAChB,oBAAgB;AAChB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAKA,WAAS,OAAO;AACd,QAAI,WAAW;AACb;AAAA,IACF;AAEA,gBAAY,YAAY,IAAI,IAAI,KAAK,GAAG,UAAU,aAAa;AAC/D,cAAU,YAAY;AACtB,gBAAY;AAEZ,QAAI,IAAI,KAAK,IAAI;AAAA,EACnB;AAEA,SAAO;AAAA,IACL;AAAA,IACA,QAAQ,MAAM,SAAS,CAAC;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/utils/wait.cjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/utils/wait.ts
|
|
20
|
+
var wait_exports = {};
|
|
21
|
+
__export(wait_exports, {
|
|
22
|
+
wait: () => wait
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(wait_exports);
|
|
25
|
+
function wait(delay = 0) {
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
setTimeout(resolve, delay);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
31
|
+
//# sourceMappingURL=wait.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../packages/js-toolkit/utils/wait.ts"],
|
|
4
|
+
"sourcesContent": ["export function wait(delay = 0) {\n return new Promise((resolve) => {\n setTimeout(resolve, delay);\n });\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,KAAK,QAAQ,GAAG;AAC9B,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,eAAW,SAAS,KAAK;AAAA,EAC3B,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/utils/wait.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wait(delay?: number): Promise<unknown>;
|
package/utils/wait.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../packages/js-toolkit/utils/wait.ts"],
|
|
4
|
+
"sourcesContent": ["export function wait(delay = 0) {\n return new Promise((resolve) => {\n setTimeout(resolve, delay);\n });\n}\n"],
|
|
5
|
+
"mappings": "AAAO,SAAS,KAAK,QAAQ,GAAG;AAC9B,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,eAAW,SAAS,KAAK;AAAA,EAC3B,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// packages/js-toolkit/Base/managers/AsyncChildrenManager.ts
|
|
20
|
-
var AsyncChildrenManager_exports = {};
|
|
21
|
-
__export(AsyncChildrenManager_exports, {
|
|
22
|
-
AsyncChildrenManager: () => AsyncChildrenManager
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(AsyncChildrenManager_exports);
|
|
25
|
-
var import_ChildrenManager = require("./ChildrenManager.cjs");
|
|
26
|
-
var import_utils = require("../../utils/index.cjs");
|
|
27
|
-
var queue = new import_utils.Queue(10, import_utils.nextTick);
|
|
28
|
-
var AsyncChildrenManager = class extends import_ChildrenManager.ChildrenManager {
|
|
29
|
-
registerAll() {
|
|
30
|
-
Object.entries(this.__config.components).forEach(([name, component]) => {
|
|
31
|
-
queue.add(() => this.__register(name, component));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
__register(name, component) {
|
|
35
|
-
Object.defineProperty(this, name, {
|
|
36
|
-
enumerable: true,
|
|
37
|
-
configurable: true,
|
|
38
|
-
value: this.__getValue(name, component).map((childOrPromise) => {
|
|
39
|
-
if (childOrPromise instanceof Promise) {
|
|
40
|
-
childOrPromise.then((child) => {
|
|
41
|
-
if (child !== "terminated") {
|
|
42
|
-
this.__triggerHook("$mount", child, name);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
} else if (childOrPromise !== "terminated") {
|
|
46
|
-
this.__triggerHook("$mount", childOrPromise, name);
|
|
47
|
-
}
|
|
48
|
-
return childOrPromise;
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
__triggerHook(hook, instance, name) {
|
|
53
|
-
queue.add(() => {
|
|
54
|
-
super.__triggerHook(hook, instance, name);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
mountAll() {
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
if (module.exports.default) module.exports = module.exports.default;
|
|
61
|
-
//# sourceMappingURL=AsyncChildrenManager.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../packages/js-toolkit/Base/managers/AsyncChildrenManager.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-use-before-define */\nimport type { Base, BaseConstructor, BaseAsyncConstructor } from '../index.js';\nimport { ChildrenManager } from './ChildrenManager.js';\nimport { Queue, nextTick } from '../../utils/index.js';\n\nconst queue = new Queue(10, nextTick);\n\n/**\n * Children manager.\n */\nexport class AsyncChildrenManager extends ChildrenManager {\n /**\n * Register instances of all children components.\n */\n registerAll() {\n Object.entries(this.__config.components).forEach(([name, component]) => {\n queue.add(() => this.__register(name, component));\n });\n }\n\n __register(name: string, component: BaseConstructor | BaseAsyncConstructor): void {\n Object.defineProperty(this, name, {\n enumerable: true,\n configurable: true,\n value: this.__getValue(name, component).map((childOrPromise) => {\n if (childOrPromise instanceof Promise) {\n childOrPromise.then((child) => {\n if (child !== 'terminated') {\n this.__triggerHook('$mount', child, name);\n }\n });\n } else if (childOrPromise !== 'terminated') {\n this.__triggerHook('$mount', childOrPromise, name);\n }\n\n return childOrPromise;\n }),\n });\n }\n\n __triggerHook(hook: '$mount' | '$update' | '$destroy', instance: Base, name: string): void {\n queue.add(() => {\n super.__triggerHook(hook, instance, name);\n });\n }\n\n /**\n * Children are mounted right after they are registered in this AsyncChildrenManager class, so we\n * do not need to do anything in the `mountAll` method.\n */\n mountAll(): void {\n // silence is golden\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,6BAAgC;AAChC,mBAAgC;AAEhC,IAAM,QAAQ,IAAI,mBAAM,IAAI,qBAAQ;AAK7B,IAAM,uBAAN,cAAmC,uCAAgB;AAAA,EAIxD,cAAc;AACZ,WAAO,QAAQ,KAAK,SAAS,UAAU,EAAE,QAAQ,CAAC,CAAC,MAAM,SAAS,MAAM;AACtE,YAAM,IAAI,MAAM,KAAK,WAAW,MAAM,SAAS,CAAC;AAAA,IAClD,CAAC;AAAA,EACH;AAAA,EAEA,WAAW,MAAc,WAAyD;AAChF,WAAO,eAAe,MAAM,MAAM;AAAA,MAChC,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,OAAO,KAAK,WAAW,MAAM,SAAS,EAAE,IAAI,CAAC,mBAAmB;AAC9D,YAAI,0BAA0B,SAAS;AACrC,yBAAe,KAAK,CAAC,UAAU;AAC7B,gBAAI,UAAU,cAAc;AAC1B,mBAAK,cAAc,UAAU,OAAO,IAAI;AAAA,YAC1C;AAAA,UACF,CAAC;AAAA,QACH,WAAW,mBAAmB,cAAc;AAC1C,eAAK,cAAc,UAAU,gBAAgB,IAAI;AAAA,QACnD;AAEA,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,MAAyC,UAAgB,MAAoB;AACzF,UAAM,IAAI,MAAM;AACd,YAAM,cAAc,MAAM,UAAU,IAAI;AAAA,IAC1C,CAAC;AAAA,EACH;AAAA,EAMA,WAAiB;AAAA,EAEjB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Base, BaseConstructor, BaseAsyncConstructor } from '../index.js';
|
|
2
|
-
import { ChildrenManager } from './ChildrenManager.js';
|
|
3
|
-
/**
|
|
4
|
-
* Children manager.
|
|
5
|
-
*/
|
|
6
|
-
export declare class AsyncChildrenManager extends ChildrenManager {
|
|
7
|
-
/**
|
|
8
|
-
* Register instances of all children components.
|
|
9
|
-
*/
|
|
10
|
-
registerAll(): void;
|
|
11
|
-
__register(name: string, component: BaseConstructor | BaseAsyncConstructor): void;
|
|
12
|
-
__triggerHook(hook: '$mount' | '$update' | '$destroy', instance: Base, name: string): void;
|
|
13
|
-
/**
|
|
14
|
-
* Children are mounted right after they are registered in this AsyncChildrenManager class, so we
|
|
15
|
-
* do not need to do anything in the `mountAll` method.
|
|
16
|
-
*/
|
|
17
|
-
mountAll(): void;
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ChildrenManager } from "./ChildrenManager.js";
|
|
2
|
-
import { Queue, nextTick } from "../../utils/index.js";
|
|
3
|
-
const queue = new Queue(10, nextTick);
|
|
4
|
-
class AsyncChildrenManager extends ChildrenManager {
|
|
5
|
-
registerAll() {
|
|
6
|
-
Object.entries(this.__config.components).forEach(([name, component]) => {
|
|
7
|
-
queue.add(() => this.__register(name, component));
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
__register(name, component) {
|
|
11
|
-
Object.defineProperty(this, name, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
value: this.__getValue(name, component).map((childOrPromise) => {
|
|
15
|
-
if (childOrPromise instanceof Promise) {
|
|
16
|
-
childOrPromise.then((child) => {
|
|
17
|
-
if (child !== "terminated") {
|
|
18
|
-
this.__triggerHook("$mount", child, name);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
} else if (childOrPromise !== "terminated") {
|
|
22
|
-
this.__triggerHook("$mount", childOrPromise, name);
|
|
23
|
-
}
|
|
24
|
-
return childOrPromise;
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
__triggerHook(hook, instance, name) {
|
|
29
|
-
queue.add(() => {
|
|
30
|
-
super.__triggerHook(hook, instance, name);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
mountAll() {
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
AsyncChildrenManager
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=AsyncChildrenManager.js.map
|