@studiometa/js-toolkit 2.0.0-beta.9 → 2.0.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/index.cjs +284 -0
- package/Base/index.d.ts +36 -28
- package/Base/index.js +113 -197
- package/Base/managers/ChildrenManager.cjs +146 -0
- package/Base/managers/ChildrenManager.d.ts +11 -3
- package/Base/managers/ChildrenManager.js +60 -59
- package/Base/managers/EventsManager.cjs +183 -0
- package/Base/managers/EventsManager.d.ts +13 -20
- package/Base/managers/EventsManager.js +72 -112
- package/Base/managers/OptionsManager.cjs +173 -0
- package/Base/managers/OptionsManager.d.ts +20 -13
- package/Base/managers/OptionsManager.js +60 -91
- package/Base/managers/RefsManager.cjs +99 -0
- package/Base/managers/RefsManager.d.ts +4 -4
- package/Base/managers/RefsManager.js +28 -38
- package/Base/managers/ServicesManager.cjs +134 -0
- package/Base/managers/ServicesManager.d.ts +14 -8
- package/Base/managers/ServicesManager.js +42 -67
- package/Base/utils.cjs +41 -0
- package/Base/utils.d.ts +4 -4
- package/Base/utils.js +12 -11
- package/decorators/index.cjs +45 -0
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +20 -8
- package/decorators/withBreakpointManager.cjs +84 -0
- package/decorators/withBreakpointManager.d.ts +2 -2
- package/decorators/withBreakpointManager.js +18 -40
- package/decorators/withBreakpointObserver.cjs +114 -0
- package/decorators/withBreakpointObserver.d.ts +1 -1
- package/decorators/withBreakpointObserver.js +45 -88
- package/decorators/withDrag.cjs +53 -0
- package/decorators/withDrag.d.ts +1 -1
- package/decorators/withDrag.js +24 -26
- package/decorators/withExtraConfig.cjs +43 -0
- package/decorators/withExtraConfig.d.ts +1 -1
- package/decorators/withExtraConfig.js +17 -12
- package/decorators/withFreezedOptions.cjs +37 -0
- package/decorators/withFreezedOptions.d.ts +14 -0
- package/decorators/withFreezedOptions.js +15 -0
- package/decorators/withIntersectionObserver.cjs +61 -0
- package/decorators/withIntersectionObserver.d.ts +1 -1
- package/decorators/withIntersectionObserver.js +29 -33
- package/decorators/withMountWhenInView.cjs +68 -0
- package/decorators/withMountWhenInView.d.ts +1 -1
- package/decorators/withMountWhenInView.js +31 -53
- package/decorators/withScrolledInView.cjs +114 -0
- package/decorators/withScrolledInView.d.ts +1 -1
- package/decorators/withScrolledInView.js +35 -39
- package/decorators/withVue2.cjs +61 -0
- package/decorators/withVue2.js +27 -32
- package/helpers/createApp.cjs +52 -0
- package/helpers/createApp.d.ts +3 -26
- package/helpers/createApp.js +12 -12
- package/helpers/getInstanceFromElement.cjs +32 -0
- package/helpers/getInstanceFromElement.d.ts +14 -0
- package/helpers/getInstanceFromElement.js +10 -0
- package/helpers/importOnInteraction.cjs +52 -0
- package/helpers/importOnInteraction.d.ts +3 -5
- package/helpers/importOnInteraction.js +17 -18
- package/helpers/importWhenIdle.cjs +49 -0
- package/helpers/importWhenIdle.d.ts +3 -5
- package/helpers/importWhenIdle.js +14 -17
- package/helpers/importWhenVisible.cjs +50 -0
- package/helpers/importWhenVisible.d.ts +4 -6
- package/helpers/importWhenVisible.js +16 -18
- package/helpers/index.cjs +37 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +12 -4
- package/helpers/utils.cjs +35 -0
- package/helpers/utils.d.ts +3 -4
- package/helpers/utils.js +7 -6
- package/index.cjs +33 -0
- package/index.js +7 -4
- package/package.json +14 -4
- package/services/Service.cjs +76 -0
- package/services/Service.d.ts +9 -9
- package/services/Service.js +19 -32
- package/services/drag.cjs +212 -0
- package/services/drag.d.ts +3 -2
- package/services/drag.js +64 -69
- package/services/index.cjs +41 -0
- package/services/index.js +16 -7
- package/services/key.cjs +104 -0
- package/services/key.d.ts +1 -1
- package/services/key.js +28 -36
- package/services/load.cjs +72 -0
- package/services/load.d.ts +1 -1
- package/services/load.js +17 -19
- package/services/pointer.cjs +162 -0
- package/services/pointer.d.ts +1 -1
- package/services/pointer.js +43 -60
- package/services/raf.cjs +83 -0
- package/services/raf.d.ts +1 -1
- package/services/raf.js +20 -28
- package/services/resize.cjs +108 -0
- package/services/resize.d.ts +1 -1
- package/services/resize.js +33 -42
- package/services/scroll.cjs +131 -0
- package/services/scroll.d.ts +1 -1
- package/services/scroll.js +26 -35
- package/utils/collide/boundingRectToCircle.cjs +34 -0
- package/utils/collide/boundingRectToCircle.d.ts +6 -6
- package/utils/collide/boundingRectToCircle.js +7 -10
- package/utils/collide/collideCircleCircle.cjs +34 -0
- package/utils/collide/collideCircleCircle.d.ts +4 -4
- package/utils/collide/collideCircleCircle.js +8 -7
- package/utils/collide/collideCircleRect.cjs +46 -0
- package/utils/collide/collideCircleRect.d.ts +8 -8
- package/utils/collide/collideCircleRect.js +10 -12
- package/utils/collide/collidePointCircle.cjs +31 -0
- package/utils/collide/collidePointCircle.d.ts +6 -6
- package/utils/collide/collidePointCircle.js +8 -5
- package/utils/collide/collidePointRect.cjs +28 -0
- package/utils/collide/collidePointRect.d.ts +7 -7
- package/utils/collide/collidePointRect.js +5 -2
- package/utils/collide/collideRectRect.cjs +28 -0
- package/utils/collide/collideRectRect.d.ts +5 -5
- package/utils/collide/collideRectRect.js +5 -2
- package/utils/collide/index.cjs +39 -0
- package/utils/collide/index.js +14 -6
- package/utils/css/classes.cjs +47 -0
- package/utils/css/classes.d.ts +13 -12
- package/utils/css/classes.js +19 -15
- package/utils/css/index.cjs +38 -0
- package/utils/css/index.d.ts +2 -2
- package/utils/css/index.js +13 -6
- package/utils/css/matrix.cjs +30 -0
- package/utils/css/matrix.d.ts +14 -15
- package/utils/css/matrix.js +7 -5
- package/utils/css/styles.cjs +44 -0
- package/utils/css/styles.d.ts +8 -20
- package/utils/css/styles.js +12 -12
- package/utils/css/transition.cjs +120 -0
- package/utils/css/transition.d.ts +15 -9
- package/utils/css/transition.js +70 -119
- package/utils/debounce.cjs +34 -0
- package/utils/debounce.d.ts +4 -4
- package/utils/debounce.js +7 -9
- package/utils/focusTrap.cjs +82 -0
- package/utils/focusTrap.d.ts +1 -0
- package/utils/focusTrap.js +31 -22
- package/utils/history.cjs +89 -0
- package/utils/history.d.ts +13 -11
- package/utils/history.js +28 -57
- package/utils/index.cjs +54 -0
- package/utils/index.d.ts +4 -1
- package/utils/index.js +32 -11
- package/utils/keyCodes.cjs +35 -0
- package/utils/keyCodes.js +5 -2
- package/utils/math/clamp.cjs +28 -0
- package/utils/math/clamp.d.ts +1 -1
- package/utils/math/clamp.js +5 -2
- package/utils/math/clamp01.cjs +32 -0
- package/utils/math/clamp01.d.ts +1 -1
- package/utils/math/clamp01.js +6 -3
- package/utils/math/damp.cjs +28 -0
- package/utils/math/damp.d.ts +6 -6
- package/utils/math/damp.js +5 -4
- package/utils/math/ease.cjs +88 -0
- package/utils/math/ease.d.ts +7 -7
- package/utils/math/ease.js +50 -25
- package/utils/math/index.cjs +43 -0
- package/utils/math/index.js +17 -8
- package/utils/math/inertiaFinalValue.cjs +37 -0
- package/utils/math/inertiaFinalValue.d.ts +5 -5
- package/utils/math/inertiaFinalValue.js +8 -10
- package/utils/math/lerp.cjs +28 -0
- package/utils/math/lerp.d.ts +4 -4
- package/utils/math/lerp.js +5 -2
- package/utils/math/map.cjs +28 -0
- package/utils/math/map.d.ts +6 -6
- package/utils/math/map.js +5 -2
- package/utils/math/round.cjs +28 -0
- package/utils/math/round.d.ts +4 -4
- package/utils/math/round.js +5 -3
- package/utils/memoize.cjs +43 -0
- package/utils/memoize.d.ts +1 -1
- package/utils/memoize.js +10 -19
- package/utils/nextFrame.cjs +38 -0
- package/utils/nextFrame.d.ts +6 -6
- package/utils/nextFrame.js +13 -10
- package/utils/nextMicrotask.cjs +28 -0
- package/utils/nextMicrotask.d.ts +8 -0
- package/utils/nextMicrotask.js +6 -0
- package/utils/nextTick.cjs +30 -0
- package/utils/nextTick.d.ts +8 -0
- package/utils/nextTick.js +8 -0
- package/utils/object/autoBind.cjs +49 -0
- package/utils/object/autoBind.d.ts +3 -3
- package/utils/object/autoBind.js +12 -22
- package/utils/object/getAllProperties.cjs +37 -0
- package/utils/object/getAllProperties.d.ts +3 -3
- package/utils/object/getAllProperties.js +10 -13
- package/utils/object/index.cjs +33 -0
- package/utils/object/index.js +8 -3
- package/utils/object/isObject.cjs +28 -0
- package/utils/object/isObject.d.ts +1 -1
- package/utils/object/isObject.js +6 -3
- package/utils/scrollTo.cjs +80 -0
- package/utils/scrollTo.d.ts +1 -1
- package/utils/scrollTo.js +20 -40
- package/utils/string/index.cjs +47 -0
- package/utils/string/index.js +22 -10
- package/utils/string/withLeadingCharacters.cjs +32 -0
- package/utils/string/withLeadingCharacters.d.ts +3 -2
- package/utils/string/withLeadingCharacters.js +7 -4
- package/utils/string/withLeadingSlash.cjs +32 -0
- package/utils/string/withLeadingSlash.d.ts +1 -1
- package/utils/string/withLeadingSlash.js +7 -4
- package/utils/string/withTrailingCharacters.cjs +32 -0
- package/utils/string/withTrailingCharacters.d.ts +3 -2
- package/utils/string/withTrailingCharacters.js +7 -4
- package/utils/string/withTrailingSlash.cjs +32 -0
- package/utils/string/withTrailingSlash.d.ts +1 -1
- package/utils/string/withTrailingSlash.js +7 -4
- package/utils/string/withoutLeadingCharacters.cjs +28 -0
- package/utils/string/withoutLeadingCharacters.d.ts +3 -2
- package/utils/string/withoutLeadingCharacters.js +6 -3
- package/utils/string/withoutLeadingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutLeadingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutLeadingCharactersRecursive.js +8 -7
- package/utils/string/withoutLeadingSlash.cjs +32 -0
- package/utils/string/withoutLeadingSlash.d.ts +1 -1
- package/utils/string/withoutLeadingSlash.js +7 -4
- package/utils/string/withoutTrailingCharacters.cjs +28 -0
- package/utils/string/withoutTrailingCharacters.d.ts +3 -2
- package/utils/string/withoutTrailingCharacters.js +6 -3
- package/utils/string/withoutTrailingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutTrailingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutTrailingCharactersRecursive.js +8 -7
- package/utils/string/withoutTrailingSlash.cjs +32 -0
- package/utils/string/withoutTrailingSlash.d.ts +1 -1
- package/utils/string/withoutTrailingSlash.js +7 -4
- package/utils/throttle.cjs +36 -0
- package/utils/throttle.d.ts +3 -3
- package/utils/throttle.js +9 -9
- package/index.modern.js +0 -1
- package/index.umd.js +0 -1
package/helpers/createApp.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
function createApp(App, rootElement = document.body) {
|
|
2
|
+
let isLoaded = document.readyState === "complete";
|
|
3
|
+
let app;
|
|
5
4
|
if (!isLoaded) {
|
|
6
|
-
document.addEventListener(
|
|
7
|
-
if (document.readyState ===
|
|
5
|
+
document.addEventListener("readystatechange", () => {
|
|
6
|
+
if (document.readyState === "complete") {
|
|
8
7
|
app = new App(rootElement).$mount();
|
|
9
8
|
isLoaded = true;
|
|
10
9
|
}
|
|
@@ -12,10 +11,9 @@ export default function createApp(App, rootElement) {
|
|
|
12
11
|
} else {
|
|
13
12
|
app = new App(rootElement).$mount();
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (document.readyState === 'complete') {
|
|
14
|
+
const promise = new Promise((resolve) => {
|
|
15
|
+
document.addEventListener("readystatechange", () => {
|
|
16
|
+
if (document.readyState === "complete") {
|
|
19
17
|
setTimeout(() => resolve(app), 0);
|
|
20
18
|
}
|
|
21
19
|
});
|
|
@@ -24,7 +22,9 @@ export default function createApp(App, rootElement) {
|
|
|
24
22
|
if (isLoaded) {
|
|
25
23
|
return Promise.resolve(app);
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
return promise;
|
|
29
26
|
};
|
|
30
|
-
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
createApp as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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/helpers/getInstanceFromElement.js
|
|
20
|
+
var getInstanceFromElement_exports = {};
|
|
21
|
+
__export(getInstanceFromElement_exports, {
|
|
22
|
+
default: () => getInstanceFromElement
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(getInstanceFromElement_exports);
|
|
25
|
+
function getInstanceFromElement(element, Constructor) {
|
|
26
|
+
var _a;
|
|
27
|
+
if (!element.__base__) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return (_a = element.__base__.get(Constructor)) != null ? _a : null;
|
|
31
|
+
}
|
|
32
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('../Base/index.js').BaseConstructor} BaseConstructor
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Get a component instance from a DOM element.
|
|
6
|
+
* @template {BaseConstructor} T
|
|
7
|
+
* @param {HTMLElement & { __base__?: WeakMap<T, InstanceType<T>> }} element
|
|
8
|
+
* @param {T} Constructor
|
|
9
|
+
* @returns {null|InstanceType<T>}
|
|
10
|
+
*/
|
|
11
|
+
export default function getInstanceFromElement<T extends typeof import("../Base/index.js").default>(element: HTMLElement & {
|
|
12
|
+
__base__?: WeakMap<T, InstanceType<T>>;
|
|
13
|
+
}, Constructor: T): InstanceType<T>;
|
|
14
|
+
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
|
@@ -0,0 +1,52 @@
|
|
|
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/helpers/importOnInteraction.js
|
|
20
|
+
var importOnInteraction_exports = {};
|
|
21
|
+
__export(importOnInteraction_exports, {
|
|
22
|
+
default: () => importOnInteraction
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(importOnInteraction_exports);
|
|
25
|
+
var import_utils = require("./utils.cjs");
|
|
26
|
+
function importOnInteraction(fn, nameOrSelectorOrElement, events, parent) {
|
|
27
|
+
const normalizedEvents = typeof events === "string" ? [events] : events;
|
|
28
|
+
let ResolvedClass;
|
|
29
|
+
const resolver = (resolve) => {
|
|
30
|
+
fn().then((module2) => {
|
|
31
|
+
ResolvedClass = "default" in module2 ? module2.default : module2;
|
|
32
|
+
resolve(ResolvedClass);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
const elements = (0, import_utils.getTargetElements)(nameOrSelectorOrElement, parent == null ? void 0 : parent.$el);
|
|
37
|
+
const eventListenerOptions = {
|
|
38
|
+
capture: true,
|
|
39
|
+
passive: true,
|
|
40
|
+
once: true
|
|
41
|
+
};
|
|
42
|
+
const handler = () => {
|
|
43
|
+
resolver(resolve);
|
|
44
|
+
};
|
|
45
|
+
elements.forEach((element) => {
|
|
46
|
+
normalizedEvents.forEach((event) => {
|
|
47
|
+
element.addEventListener(event, handler, eventListenerOptions);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -6,20 +6,18 @@
|
|
|
6
6
|
* Import a component on an interaction.
|
|
7
7
|
*
|
|
8
8
|
* @template {BaseConstructor} T
|
|
9
|
-
*
|
|
10
9
|
* @param {() => Promise<T|{default:T}>} fn
|
|
11
10
|
* The import function.
|
|
12
11
|
* @param {string|HTMLElement|HTMLElement[]} nameOrSelectorOrElement
|
|
13
12
|
* The name or selector for the component.
|
|
14
13
|
* @param {string|string[]} events
|
|
15
14
|
* The events to listen to to trigger the import.
|
|
16
|
-
* @param {Base
|
|
15
|
+
* @param {Base} [parent]
|
|
17
16
|
* The parent component.
|
|
18
|
-
*
|
|
19
|
-
* @return {Promise<T>}
|
|
17
|
+
* @returns {Promise<T>}
|
|
20
18
|
*/
|
|
21
19
|
export default function importOnInteraction<T extends typeof import("../Base/index.js").default>(fn: () => Promise<T | {
|
|
22
20
|
default: T;
|
|
23
|
-
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], events: string | string[], parent?: Base
|
|
21
|
+
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], events: string | string[], parent?: Base): Promise<T>;
|
|
24
22
|
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
|
25
23
|
export type Base = import('../Base/index.js').default;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { getTargetElements } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ResolvedClass = 'default' in module ? module.default : module;
|
|
1
|
+
import { getTargetElements } from "./utils.js";
|
|
2
|
+
function importOnInteraction(fn, nameOrSelectorOrElement, events, parent) {
|
|
3
|
+
const normalizedEvents = typeof events === "string" ? [events] : events;
|
|
4
|
+
let ResolvedClass;
|
|
5
|
+
const resolver = (resolve) => {
|
|
6
|
+
fn().then((module) => {
|
|
7
|
+
ResolvedClass = "default" in module ? module.default : module;
|
|
9
8
|
resolve(ResolvedClass);
|
|
10
9
|
});
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var eventListenerOptions = {
|
|
11
|
+
return new Promise((resolve) => {
|
|
12
|
+
const elements = getTargetElements(nameOrSelectorOrElement, parent == null ? void 0 : parent.$el);
|
|
13
|
+
const eventListenerOptions = {
|
|
16
14
|
capture: true,
|
|
17
15
|
passive: true,
|
|
18
16
|
once: true
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
var handler = () => {
|
|
18
|
+
const handler = () => {
|
|
22
19
|
resolver(resolve);
|
|
23
20
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
normalizedEvents.forEach(event => {
|
|
21
|
+
elements.forEach((element) => {
|
|
22
|
+
normalizedEvents.forEach((event) => {
|
|
27
23
|
element.addEventListener(event, handler, eventListenerOptions);
|
|
28
24
|
});
|
|
29
25
|
});
|
|
30
26
|
});
|
|
31
|
-
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
importOnInteraction as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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/helpers/importWhenIdle.js
|
|
20
|
+
var importWhenIdle_exports = {};
|
|
21
|
+
__export(importWhenIdle_exports, {
|
|
22
|
+
default: () => importWhenIdle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(importWhenIdle_exports);
|
|
25
|
+
function importWhenIdle(fn, options) {
|
|
26
|
+
let ResolvedClass;
|
|
27
|
+
const resolver = (resolve) => {
|
|
28
|
+
fn().then((module2) => {
|
|
29
|
+
ResolvedClass = "default" in module2 ? module2.default : module2;
|
|
30
|
+
resolve(ResolvedClass);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return new Promise((resolve) => {
|
|
34
|
+
var _a;
|
|
35
|
+
const timeout = (_a = options == null ? void 0 : options.timeout) != null ? _a : 1;
|
|
36
|
+
if (!("requestIdleCallback" in window)) {
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
resolver(resolve);
|
|
39
|
+
}, timeout);
|
|
40
|
+
} else {
|
|
41
|
+
window.requestIdleCallback(() => {
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
resolver(resolve);
|
|
44
|
+
}, 0);
|
|
45
|
+
}, { timeout: options == null ? void 0 : options.timeout });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -6,17 +6,15 @@
|
|
|
6
6
|
* Import a component when user is idle.
|
|
7
7
|
*
|
|
8
8
|
* @template {BaseConstructor} T
|
|
9
|
-
*
|
|
10
9
|
* @param {() => Promise<T|{default:T}>} fn
|
|
11
10
|
* The import function.
|
|
12
|
-
* @param {ImportWhenIdleOptions
|
|
11
|
+
* @param {ImportWhenIdleOptions} [options]
|
|
13
12
|
* The time to wait before triggering the callback if never idle.
|
|
14
|
-
*
|
|
15
|
-
* @return {Promise<T>}
|
|
13
|
+
* @returns {Promise<T>}
|
|
16
14
|
*/
|
|
17
15
|
export default function importWhenIdle<T extends typeof import("../Base/index.js").default>(fn: () => Promise<T | {
|
|
18
16
|
default: T;
|
|
19
|
-
}>, options?: ImportWhenIdleOptions
|
|
17
|
+
}>, options?: ImportWhenIdleOptions): Promise<T>;
|
|
20
18
|
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
|
21
19
|
export type ImportWhenIdleOptions = {
|
|
22
20
|
timeout?: number;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ResolvedClass = 'default' in module ? module.default : module;
|
|
1
|
+
function importWhenIdle(fn, options) {
|
|
2
|
+
let ResolvedClass;
|
|
3
|
+
const resolver = (resolve) => {
|
|
4
|
+
fn().then((module) => {
|
|
5
|
+
ResolvedClass = "default" in module ? module.default : module;
|
|
7
6
|
resolve(ResolvedClass);
|
|
8
7
|
});
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var timeout = (_options$timeout = options === null || options === void 0 ? void 0 : options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : 1;
|
|
15
|
-
|
|
16
|
-
if (!('requestIdleCallback' in window)) {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const timeout = (_a = options == null ? void 0 : options.timeout) != null ? _a : 1;
|
|
12
|
+
if (!("requestIdleCallback" in window)) {
|
|
17
13
|
setTimeout(() => {
|
|
18
14
|
resolver(resolve);
|
|
19
15
|
}, timeout);
|
|
@@ -22,9 +18,10 @@ export default function importWhenIdle(fn, options) {
|
|
|
22
18
|
setTimeout(() => {
|
|
23
19
|
resolver(resolve);
|
|
24
20
|
}, 0);
|
|
25
|
-
}, {
|
|
26
|
-
timeout: options === null || options === void 0 ? void 0 : options.timeout
|
|
27
|
-
});
|
|
21
|
+
}, { timeout: options == null ? void 0 : options.timeout });
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
importWhenIdle as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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/helpers/importWhenVisible.js
|
|
20
|
+
var importWhenVisible_exports = {};
|
|
21
|
+
__export(importWhenVisible_exports, {
|
|
22
|
+
default: () => importWhenVisible
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(importWhenVisible_exports);
|
|
25
|
+
var import_utils = require("./utils.cjs");
|
|
26
|
+
function importWhenVisible(fn, nameOrSelectorOrElement, parent, observerOptions = {}) {
|
|
27
|
+
let ResolvedClass;
|
|
28
|
+
const resolver = (resolve, cb) => {
|
|
29
|
+
fn().then((module2) => {
|
|
30
|
+
ResolvedClass = "default" in module2 ? module2.default : module2;
|
|
31
|
+
resolve(ResolvedClass);
|
|
32
|
+
if (typeof cb === "function") {
|
|
33
|
+
cb();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
return new Promise((resolve) => {
|
|
38
|
+
const observer = new IntersectionObserver((entries) => {
|
|
39
|
+
const someEntriesAreVisible = entries.some((entry) => entry.isIntersecting);
|
|
40
|
+
if (someEntriesAreVisible) {
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
resolver(resolve, () => observer.disconnect());
|
|
43
|
+
}, 0);
|
|
44
|
+
}
|
|
45
|
+
}, observerOptions);
|
|
46
|
+
const elements = (0, import_utils.getTargetElements)(nameOrSelectorOrElement, parent == null ? void 0 : parent.$el);
|
|
47
|
+
elements.forEach((element) => observer.observe(element));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -6,20 +6,18 @@
|
|
|
6
6
|
* Import a component when it is visible.
|
|
7
7
|
*
|
|
8
8
|
* @template {BaseConstructor} T
|
|
9
|
-
*
|
|
10
9
|
* @param {() => Promise<T|{default:T}>} fn
|
|
11
10
|
* The import function.
|
|
12
11
|
* @param {string|HTMLElement|HTMLElement[]} nameOrSelectorOrElement
|
|
13
12
|
* The name or selector for the component.
|
|
14
|
-
* @param {Base
|
|
13
|
+
* @param {Base} [parent]
|
|
15
14
|
* The parent component.
|
|
16
|
-
* @param {IntersectionObserverInit
|
|
15
|
+
* @param {IntersectionObserverInit} [observerOptions]
|
|
17
16
|
* Options for the `IntersectionObserver` instance.
|
|
18
|
-
*
|
|
19
|
-
* @return {Promise<T>}
|
|
17
|
+
* @returns {Promise<T>}
|
|
20
18
|
*/
|
|
21
19
|
export default function importWhenVisible<T extends typeof import("../Base/index.js").default>(fn: () => Promise<T | {
|
|
22
20
|
default: T;
|
|
23
|
-
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], parent?: Base
|
|
21
|
+
}>, nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], parent?: Base, observerOptions?: IntersectionObserverInit): Promise<T>;
|
|
24
22
|
export type Base = import('../Base/index.js').default;
|
|
25
23
|
export type BaseConstructor = import('../Base/index.js').BaseConstructor;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { getTargetElements } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
fn().then(module => {
|
|
8
|
-
ResolvedClass = 'default' in module ? module.default : module;
|
|
1
|
+
import { getTargetElements } from "./utils.js";
|
|
2
|
+
function importWhenVisible(fn, nameOrSelectorOrElement, parent, observerOptions = {}) {
|
|
3
|
+
let ResolvedClass;
|
|
4
|
+
const resolver = (resolve, cb) => {
|
|
5
|
+
fn().then((module) => {
|
|
6
|
+
ResolvedClass = "default" in module ? module.default : module;
|
|
9
7
|
resolve(ResolvedClass);
|
|
10
|
-
|
|
11
|
-
if (typeof cb === 'function') {
|
|
8
|
+
if (typeof cb === "function") {
|
|
12
9
|
cb();
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var someEntriesAreVisible = entries.some(entry => entry.isIntersecting);
|
|
20
|
-
|
|
13
|
+
return new Promise((resolve) => {
|
|
14
|
+
const observer = new IntersectionObserver((entries) => {
|
|
15
|
+
const someEntriesAreVisible = entries.some((entry) => entry.isIntersecting);
|
|
21
16
|
if (someEntriesAreVisible) {
|
|
22
17
|
setTimeout(() => {
|
|
23
18
|
resolver(resolve, () => observer.disconnect());
|
|
24
19
|
}, 0);
|
|
25
20
|
}
|
|
26
21
|
}, observerOptions);
|
|
27
|
-
|
|
28
|
-
elements.forEach(element => observer.observe(element));
|
|
22
|
+
const elements = getTargetElements(nameOrSelectorOrElement, parent == null ? void 0 : parent.$el);
|
|
23
|
+
elements.forEach((element) => observer.observe(element));
|
|
29
24
|
});
|
|
30
|
-
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
importWhenVisible as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/helpers/index.js
|
|
23
|
+
var helpers_exports = {};
|
|
24
|
+
__export(helpers_exports, {
|
|
25
|
+
createApp: () => import_createApp.default,
|
|
26
|
+
getInstanceFromElement: () => import_getInstanceFromElement.default,
|
|
27
|
+
importOnInteraction: () => import_importOnInteraction.default,
|
|
28
|
+
importWhenIdle: () => import_importWhenIdle.default,
|
|
29
|
+
importWhenVisible: () => import_importWhenVisible.default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(helpers_exports);
|
|
32
|
+
var import_createApp = __toESM(require("./createApp.cjs"), 1);
|
|
33
|
+
var import_getInstanceFromElement = __toESM(require("./getInstanceFromElement.cjs"), 1);
|
|
34
|
+
var import_importOnInteraction = __toESM(require("./importOnInteraction.cjs"), 1);
|
|
35
|
+
var import_importWhenIdle = __toESM(require("./importWhenIdle.cjs"), 1);
|
|
36
|
+
var import_importWhenVisible = __toESM(require("./importWhenVisible.cjs"), 1);
|
|
37
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/helpers/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as createApp } from "./createApp.js";
|
|
2
|
+
export { default as getInstanceFromElement } from "./getInstanceFromElement.js";
|
|
2
3
|
export { default as importOnInteraction } from "./importOnInteraction.js";
|
|
3
4
|
export { default as importWhenIdle } from "./importWhenIdle.js";
|
|
4
5
|
export { default as importWhenVisible } from "./importWhenVisible.js";
|
package/helpers/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { default as default2 } from "./createApp.js";
|
|
2
|
+
import { default as default3 } from "./getInstanceFromElement.js";
|
|
3
|
+
import { default as default4 } from "./importOnInteraction.js";
|
|
4
|
+
import { default as default5 } from "./importWhenIdle.js";
|
|
5
|
+
import { default as default6 } from "./importWhenVisible.js";
|
|
6
|
+
export {
|
|
7
|
+
default2 as createApp,
|
|
8
|
+
default3 as getInstanceFromElement,
|
|
9
|
+
default4 as importOnInteraction,
|
|
10
|
+
default5 as importWhenIdle,
|
|
11
|
+
default6 as importWhenVisible
|
|
12
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
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/helpers/utils.js
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
getTargetElements: () => getTargetElements
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var import_utils = require("../Base/utils.cjs");
|
|
26
|
+
function getTargetElements(nameOrSelectorOrElement, context) {
|
|
27
|
+
if (typeof nameOrSelectorOrElement === "string") {
|
|
28
|
+
return (0, import_utils.getComponentElements)(nameOrSelectorOrElement, context);
|
|
29
|
+
}
|
|
30
|
+
if (!Array.isArray(nameOrSelectorOrElement)) {
|
|
31
|
+
return [nameOrSelectorOrElement];
|
|
32
|
+
}
|
|
33
|
+
return nameOrSelectorOrElement;
|
|
34
|
+
}
|
|
35
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/helpers/utils.d.ts
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {string|HTMLElement|HTMLElement[]} nameOrSelectorOrElement
|
|
5
5
|
* The original selector or element, or list of elements.
|
|
6
|
-
* @param {HTMLElement
|
|
6
|
+
* @param {HTMLElement} [context]
|
|
7
7
|
* The optional context to use to query for elements.
|
|
8
|
-
*
|
|
9
|
-
* @return {HTMLElement[]} A normalized list of elements.
|
|
8
|
+
* @returns {HTMLElement[]} A normalized list of elements.
|
|
10
9
|
*/
|
|
11
|
-
export function getTargetElements(nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], context?: HTMLElement
|
|
10
|
+
export function getTargetElements(nameOrSelectorOrElement: string | HTMLElement | HTMLElement[], context?: HTMLElement): HTMLElement[];
|
package/helpers/utils.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { getComponentElements } from
|
|
2
|
-
|
|
3
|
-
if (typeof nameOrSelectorOrElement ===
|
|
1
|
+
import { getComponentElements } from "../Base/utils.js";
|
|
2
|
+
function getTargetElements(nameOrSelectorOrElement, context) {
|
|
3
|
+
if (typeof nameOrSelectorOrElement === "string") {
|
|
4
4
|
return getComponentElements(nameOrSelectorOrElement, context);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
if (!Array.isArray(nameOrSelectorOrElement)) {
|
|
8
7
|
return [nameOrSelectorOrElement];
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return nameOrSelectorOrElement;
|
|
12
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
getTargetElements
|
|
13
|
+
};
|
package/index.cjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
|
|
23
|
+
// packages/js-toolkit/index.js
|
|
24
|
+
var js_toolkit_exports = {};
|
|
25
|
+
__export(js_toolkit_exports, {
|
|
26
|
+
Base: () => import_Base.default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(js_toolkit_exports);
|
|
29
|
+
var import_Base = __toESM(require("./Base/index.cjs"), 1);
|
|
30
|
+
__reExport(js_toolkit_exports, require("./decorators/index.cjs"), module.exports);
|
|
31
|
+
__reExport(js_toolkit_exports, require("./helpers/index.cjs"), module.exports);
|
|
32
|
+
__reExport(js_toolkit_exports, require("./services/index.cjs"), module.exports);
|
|
33
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
import { default as default2 } from "./Base/index.js";
|
|
2
|
+
export * from "./decorators/index.js";
|
|
3
|
+
export * from "./helpers/index.js";
|
|
4
|
+
export * from "./services/index.js";
|
|
5
|
+
export {
|
|
6
|
+
default2 as Base
|
|
7
|
+
};
|