@studiometa/js-toolkit 2.10.0 → 2.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/helpers/importOnMediaQuery.cjs +1 -1
- package/helpers/importOnMediaQuery.cjs.map +1 -1
- package/helpers/importOnMediaQuery.js +1 -1
- package/helpers/importOnMediaQuery.js.map +1 -1
- package/helpers/index.cjs +1 -1
- package/helpers/index.cjs.map +1 -1
- package/helpers/index.d.ts +1 -1
- package/helpers/index.js +1 -1
- package/helpers/index.js.map +1 -1
- package/package.json +1 -1
package/decorators/index.cjs
CHANGED
|
@@ -27,6 +27,6 @@ __reExport(decorators_exports, require("./withResponsiveOptions.cjs"), module.ex
|
|
|
27
27
|
__reExport(decorators_exports, require("./withScrolledInView/index.cjs"), module.exports);
|
|
28
28
|
__reExport(decorators_exports, require("./withVue2.cjs"), module.exports);
|
|
29
29
|
__reExport(decorators_exports, require("./withMountOnMediaQuery.cjs"), module.exports);
|
|
30
|
-
__reExport(decorators_exports, require("./withMountWhenPrefersMotion"), module.exports);
|
|
30
|
+
__reExport(decorators_exports, require("./withMountWhenPrefersMotion.cjs"), module.exports);
|
|
31
31
|
if (module.exports.default) module.exports = module.exports.default;
|
|
32
32
|
//# sourceMappingURL=index.cjs.map
|
package/decorators/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/decorators/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './withBreakpointManager.js';\nexport * from './withBreakpointObserver.js';\nexport * from './withDrag.js';\nexport * from './withExtraConfig.js';\nexport * from './withFreezedOptions.js';\nexport * from './withIntersectionObserver.js';\nexport * from './withMountWhenInView.js';\nexport * from './withResponsiveOptions.js';\nexport * from './withScrolledInView/index.js';\nexport * from './withVue2.js';\nexport * from './withMountOnMediaQuery.js';\nexport * from './withMountWhenPrefersMotion';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,wCAAd;AACA,+BAAc,yCADd;AAEA,+BAAc,2BAFd;AAGA,+BAAc,kCAHd;AAIA,+BAAc,qCAJd;AAKA,+BAAc,2CALd;AAMA,+BAAc,sCANd;AAOA,+BAAc,wCAPd;AAQA,+BAAc,2CARd;AASA,+BAAc,2BATd;AAUA,+BAAc,wCAVd;AAWA,+BAAc,
|
|
4
|
+
"sourcesContent": ["export * from './withBreakpointManager.js';\nexport * from './withBreakpointObserver.js';\nexport * from './withDrag.js';\nexport * from './withExtraConfig.js';\nexport * from './withFreezedOptions.js';\nexport * from './withIntersectionObserver.js';\nexport * from './withMountWhenInView.js';\nexport * from './withResponsiveOptions.js';\nexport * from './withScrolledInView/index.js';\nexport * from './withVue2.js';\nexport * from './withMountOnMediaQuery.js';\nexport * from './withMountWhenPrefersMotion.js';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,wCAAd;AACA,+BAAc,yCADd;AAEA,+BAAc,2BAFd;AAGA,+BAAc,kCAHd;AAIA,+BAAc,qCAJd;AAKA,+BAAc,2CALd;AAMA,+BAAc,sCANd;AAOA,+BAAc,wCAPd;AAQA,+BAAc,2CARd;AASA,+BAAc,2BATd;AAUA,+BAAc,wCAVd;AAWA,+BAAc,6CAXd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/decorators/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export * from './withResponsiveOptions.js';
|
|
|
9
9
|
export * from './withScrolledInView/index.js';
|
|
10
10
|
export * from './withVue2.js';
|
|
11
11
|
export * from './withMountOnMediaQuery.js';
|
|
12
|
-
export * from './withMountWhenPrefersMotion';
|
|
12
|
+
export * from './withMountWhenPrefersMotion.js';
|
package/decorators/index.js
CHANGED
|
@@ -9,5 +9,5 @@ export * from "./withResponsiveOptions.js";
|
|
|
9
9
|
export * from "./withScrolledInView/index.js";
|
|
10
10
|
export * from "./withVue2.js";
|
|
11
11
|
export * from "./withMountOnMediaQuery.js";
|
|
12
|
-
export * from "./withMountWhenPrefersMotion";
|
|
12
|
+
export * from "./withMountWhenPrefersMotion.js";
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/decorators/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/decorators/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './withBreakpointManager.js';\nexport * from './withBreakpointObserver.js';\nexport * from './withDrag.js';\nexport * from './withExtraConfig.js';\nexport * from './withFreezedOptions.js';\nexport * from './withIntersectionObserver.js';\nexport * from './withMountWhenInView.js';\nexport * from './withResponsiveOptions.js';\nexport * from './withScrolledInView/index.js';\nexport * from './withVue2.js';\nexport * from './withMountOnMediaQuery.js';\nexport * from './withMountWhenPrefersMotion';\n"],
|
|
4
|
+
"sourcesContent": ["export * from './withBreakpointManager.js';\nexport * from './withBreakpointObserver.js';\nexport * from './withDrag.js';\nexport * from './withExtraConfig.js';\nexport * from './withFreezedOptions.js';\nexport * from './withIntersectionObserver.js';\nexport * from './withMountWhenInView.js';\nexport * from './withResponsiveOptions.js';\nexport * from './withScrolledInView/index.js';\nexport * from './withVue2.js';\nexport * from './withMountOnMediaQuery.js';\nexport * from './withMountWhenPrefersMotion.js';\n"],
|
|
5
5
|
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,7 +22,7 @@ __export(importOnMediaQuery_exports, {
|
|
|
22
22
|
default: () => importOnMediaQuery
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(importOnMediaQuery_exports);
|
|
25
|
-
var import_utils = require("../utils");
|
|
25
|
+
var import_utils = require("../utils/index.cjs");
|
|
26
26
|
function importOnMediaQuery(fn, media) {
|
|
27
27
|
const resolver = (0, import_utils.getComponentResolver)(fn);
|
|
28
28
|
return new Promise((resolve) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/helpers/importOnMediaQuery.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseConstructor } from '../Base/index.js';\nimport { getComponentResolver } from '../utils';\n\n/**\n * Import a component when given media query is true.\n *\n * @template {BaseConstructor} T\n * @param {() => Promise<T|{default:T}>} fn\n * The import function.\n * @param {string} media\n * The media query name and value (see https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_features)\n * @returns {Promise<T>}\n */\nexport default function importOnMediaQuery<T extends BaseConstructor = BaseConstructor>(\n fn: () => Promise<T | { default: T }>,\n media: string,\n): Promise<T> {\n const resolver = getComponentResolver(fn);\n\n return new Promise((resolve) => {\n const mediaQueryList = window.matchMedia(media);\n\n if (mediaQueryList.matches) {\n resolver(resolve);\n }\n\n const changeHandler = (event: MediaQueryListEvent) => {\n if (event.matches) {\n setTimeout(() => {\n // Remove listener and mount the component\n resolver(resolve, () => mediaQueryList.removeEventListener('change', changeHandler));\n }, 0);\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n });\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { BaseConstructor } from '../Base/index.js';\nimport { getComponentResolver } from '../utils/index.js';\n\n/**\n * Import a component when given media query is true.\n *\n * @template {BaseConstructor} T\n * @param {() => Promise<T|{default:T}>} fn\n * The import function.\n * @param {string} media\n * The media query name and value (see https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_features)\n * @returns {Promise<T>}\n */\nexport default function importOnMediaQuery<T extends BaseConstructor = BaseConstructor>(\n fn: () => Promise<T | { default: T }>,\n media: string,\n): Promise<T> {\n const resolver = getComponentResolver(fn);\n\n return new Promise((resolve) => {\n const mediaQueryList = window.matchMedia(media);\n\n if (mediaQueryList.matches) {\n resolver(resolve);\n }\n\n const changeHandler = (event: MediaQueryListEvent) => {\n if (event.matches) {\n setTimeout(() => {\n // Remove listener and mount the component\n resolver(resolve, () => mediaQueryList.removeEventListener('change', changeHandler));\n }, 0);\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n });\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAqC;AAYtB,SAAR,mBACL,IACA,OACY;AACZ,QAAM,eAAW,mCAAqB,EAAE;AAExC,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,iBAAiB,OAAO,WAAW,KAAK;AAE9C,QAAI,eAAe,SAAS;AAC1B,eAAS,OAAO;AAAA,IAClB;AAEA,UAAM,gBAAgB,CAAC,UAA+B;AACpD,UAAI,MAAM,SAAS;AACjB,mBAAW,MAAM;AAEf,mBAAS,SAAS,MAAM,eAAe,oBAAoB,UAAU,aAAa,CAAC;AAAA,QACrF,GAAG,CAAC;AAAA,MACN;AAAA,IACF;AAGA,mBAAe,iBAAiB,UAAU,aAAa;AAAA,EACzD,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/helpers/importOnMediaQuery.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseConstructor } from '../Base/index.js';\nimport { getComponentResolver } from '../utils';\n\n/**\n * Import a component when given media query is true.\n *\n * @template {BaseConstructor} T\n * @param {() => Promise<T|{default:T}>} fn\n * The import function.\n * @param {string} media\n * The media query name and value (see https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_features)\n * @returns {Promise<T>}\n */\nexport default function importOnMediaQuery<T extends BaseConstructor = BaseConstructor>(\n fn: () => Promise<T | { default: T }>,\n media: string,\n): Promise<T> {\n const resolver = getComponentResolver(fn);\n\n return new Promise((resolve) => {\n const mediaQueryList = window.matchMedia(media);\n\n if (mediaQueryList.matches) {\n resolver(resolve);\n }\n\n const changeHandler = (event: MediaQueryListEvent) => {\n if (event.matches) {\n setTimeout(() => {\n // Remove listener and mount the component\n resolver(resolve, () => mediaQueryList.removeEventListener('change', changeHandler));\n }, 0);\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n });\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { BaseConstructor } from '../Base/index.js';\nimport { getComponentResolver } from '../utils/index.js';\n\n/**\n * Import a component when given media query is true.\n *\n * @template {BaseConstructor} T\n * @param {() => Promise<T|{default:T}>} fn\n * The import function.\n * @param {string} media\n * The media query name and value (see https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_features)\n * @returns {Promise<T>}\n */\nexport default function importOnMediaQuery<T extends BaseConstructor = BaseConstructor>(\n fn: () => Promise<T | { default: T }>,\n media: string,\n): Promise<T> {\n const resolver = getComponentResolver(fn);\n\n return new Promise((resolve) => {\n const mediaQueryList = window.matchMedia(media);\n\n if (mediaQueryList.matches) {\n resolver(resolve);\n }\n\n const changeHandler = (event: MediaQueryListEvent) => {\n if (event.matches) {\n setTimeout(() => {\n // Remove listener and mount the component\n resolver(resolve, () => mediaQueryList.removeEventListener('change', changeHandler));\n }, 0);\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n });\n}\n"],
|
|
5
5
|
"mappings": "AACA,SAAS,4BAA4B;AAYtB,SAAR,mBACL,IACA,OACY;AACZ,QAAM,WAAW,qBAAqB,EAAE;AAExC,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,iBAAiB,OAAO,WAAW,KAAK;AAE9C,QAAI,eAAe,SAAS;AAC1B,eAAS,OAAO;AAAA,IAClB;AAEA,UAAM,gBAAgB,CAAC,UAA+B;AACpD,UAAI,MAAM,SAAS;AACjB,mBAAW,MAAM;AAEf,mBAAS,SAAS,MAAM,eAAe,oBAAoB,UAAU,aAAa,CAAC;AAAA,QACrF,GAAG,CAAC;AAAA,MACN;AAAA,IACF;AAGA,mBAAe,iBAAiB,UAAU,aAAa;AAAA,EACzD,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/helpers/index.cjs
CHANGED
|
@@ -44,6 +44,6 @@ var import_importOnInteraction = __toESM(require("./importOnInteraction.cjs"), 1
|
|
|
44
44
|
var import_importWhenIdle = __toESM(require("./importWhenIdle.cjs"), 1);
|
|
45
45
|
var import_importWhenVisible = __toESM(require("./importWhenVisible.cjs"), 1);
|
|
46
46
|
var import_importOnMediaQuery = __toESM(require("./importOnMediaQuery.cjs"), 1);
|
|
47
|
-
var import_importWhenPrefersMotion = __toESM(require("./importWhenPrefersMotion"), 1);
|
|
47
|
+
var import_importWhenPrefersMotion = __toESM(require("./importWhenPrefersMotion.cjs"), 1);
|
|
48
48
|
if (module.exports.default) module.exports = module.exports.default;
|
|
49
49
|
//# sourceMappingURL=index.cjs.map
|
package/helpers/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/helpers/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './getDirectChildren.js';\nexport { default as createApp } from './createApp.js';\nexport { default as getClosestParent } from './getClosestParent.js';\nexport { default as getInstanceFromElement } from './getInstanceFromElement.js';\nexport { default as importOnInteraction } from './importOnInteraction.js';\nexport { default as importWhenIdle } from './importWhenIdle.js';\nexport { default as importWhenVisible } from './importWhenVisible.js';\nexport { default as importOnMediaQuery } from './importOnMediaQuery.js';\nexport { default as importWhenPrefersMotion } from './importWhenPrefersMotion';\n"],
|
|
4
|
+
"sourcesContent": ["export * from './getDirectChildren.js';\nexport { default as createApp } from './createApp.js';\nexport { default as getClosestParent } from './getClosestParent.js';\nexport { default as getInstanceFromElement } from './getInstanceFromElement.js';\nexport { default as importOnInteraction } from './importOnInteraction.js';\nexport { default as importWhenIdle } from './importWhenIdle.js';\nexport { default as importWhenVisible } from './importWhenVisible.js';\nexport { default as importOnMediaQuery } from './importOnMediaQuery.js';\nexport { default as importWhenPrefersMotion } from './importWhenPrefersMotion.js';\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAc,oCAAd;AACA,uBAAqC;AACrC,8BAA4C;AAC5C,oCAAkD;AAClD,iCAA+C;AAC/C,4BAA0C;AAC1C,+BAA6C;AAC7C,gCAA8C;AAC9C,qCAAmD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/helpers/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export { default as importOnInteraction } from './importOnInteraction.js';
|
|
|
6
6
|
export { default as importWhenIdle } from './importWhenIdle.js';
|
|
7
7
|
export { default as importWhenVisible } from './importWhenVisible.js';
|
|
8
8
|
export { default as importOnMediaQuery } from './importOnMediaQuery.js';
|
|
9
|
-
export { default as importWhenPrefersMotion } from './importWhenPrefersMotion';
|
|
9
|
+
export { default as importWhenPrefersMotion } from './importWhenPrefersMotion.js';
|
package/helpers/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { default as default5 } from "./importOnInteraction.js";
|
|
|
6
6
|
import { default as default6 } from "./importWhenIdle.js";
|
|
7
7
|
import { default as default7 } from "./importWhenVisible.js";
|
|
8
8
|
import { default as default8 } from "./importOnMediaQuery.js";
|
|
9
|
-
import { default as default9 } from "./importWhenPrefersMotion";
|
|
9
|
+
import { default as default9 } from "./importWhenPrefersMotion.js";
|
|
10
10
|
export {
|
|
11
11
|
default2 as createApp,
|
|
12
12
|
default3 as getClosestParent,
|
package/helpers/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/js-toolkit/helpers/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './getDirectChildren.js';\nexport { default as createApp } from './createApp.js';\nexport { default as getClosestParent } from './getClosestParent.js';\nexport { default as getInstanceFromElement } from './getInstanceFromElement.js';\nexport { default as importOnInteraction } from './importOnInteraction.js';\nexport { default as importWhenIdle } from './importWhenIdle.js';\nexport { default as importWhenVisible } from './importWhenVisible.js';\nexport { default as importOnMediaQuery } from './importOnMediaQuery.js';\nexport { default as importWhenPrefersMotion } from './importWhenPrefersMotion';\n"],
|
|
4
|
+
"sourcesContent": ["export * from './getDirectChildren.js';\nexport { default as createApp } from './createApp.js';\nexport { default as getClosestParent } from './getClosestParent.js';\nexport { default as getInstanceFromElement } from './getInstanceFromElement.js';\nexport { default as importOnInteraction } from './importOnInteraction.js';\nexport { default as importWhenIdle } from './importWhenIdle.js';\nexport { default as importWhenVisible } from './importWhenVisible.js';\nexport { default as importOnMediaQuery } from './importOnMediaQuery.js';\nexport { default as importWhenPrefersMotion } from './importWhenPrefersMotion.js';\n"],
|
|
5
5
|
"mappings": "AAAA,cAAc;AACd,SAAoB,WAAXA,gBAA4B;AACrC,SAAoB,WAAXA,gBAAmC;AAC5C,SAAoB,WAAXA,gBAAyC;AAClD,SAAoB,WAAXA,gBAAsC;AAC/C,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA0C;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|