motionrail 0.6.0 → 0.6.1
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/frameworks/qwik/lib/index.qwik.cjs +4 -0
- package/frameworks/qwik/lib/index.qwik.mjs +4 -0
- package/frameworks/qwik/lib/main.qwik.cjs +36 -0
- package/frameworks/qwik/lib/main.qwik.mjs +36 -0
- package/frameworks/qwik/lib-types/index.d.ts +1 -0
- package/frameworks/qwik/lib-types/main.d.ts +7 -0
- package/package.json +5 -11
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
|
+
const qwik = require("@builder.io/qwik");
|
|
5
|
+
const motionrail = require("motionrail");
|
|
6
|
+
const MotionRail = qwik.component$(({ options, ...divProps }) => {
|
|
7
|
+
const containerRef = qwik.useSignal();
|
|
8
|
+
const motionRailRef = qwik.useSignal(null);
|
|
9
|
+
const optionsStore = qwik.useStore({
|
|
10
|
+
value: void 0
|
|
11
|
+
});
|
|
12
|
+
optionsStore.value = options;
|
|
13
|
+
qwik.useVisibleTask$(({ cleanup }) => {
|
|
14
|
+
if (!containerRef.value) return;
|
|
15
|
+
motionRailRef.value = new motionrail.MotionRail(containerRef.value, qwik.noSerialize(optionsStore.value) || {});
|
|
16
|
+
cleanup(() => {
|
|
17
|
+
if (motionRailRef.value) {
|
|
18
|
+
motionRailRef.value.destroy();
|
|
19
|
+
motionRailRef.value = null;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24
|
+
ref: containerRef,
|
|
25
|
+
"data-motionrail": true,
|
|
26
|
+
...divProps,
|
|
27
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28
|
+
"data-motionrail-scrollable": true,
|
|
29
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30
|
+
"data-motionrail-grid": true,
|
|
31
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
exports.MotionRail = MotionRail;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, useSignal, useStore, useVisibleTask$, noSerialize, Slot } from "@builder.io/qwik";
|
|
3
|
+
import { MotionRail as MotionRail$1 } from "motionrail";
|
|
4
|
+
const MotionRail = component$(({ options, ...divProps }) => {
|
|
5
|
+
const containerRef = useSignal();
|
|
6
|
+
const motionRailRef = useSignal(null);
|
|
7
|
+
const optionsStore = useStore({
|
|
8
|
+
value: void 0
|
|
9
|
+
});
|
|
10
|
+
optionsStore.value = options;
|
|
11
|
+
useVisibleTask$(({ cleanup }) => {
|
|
12
|
+
if (!containerRef.value) return;
|
|
13
|
+
motionRailRef.value = new MotionRail$1(containerRef.value, noSerialize(optionsStore.value) || {});
|
|
14
|
+
cleanup(() => {
|
|
15
|
+
if (motionRailRef.value) {
|
|
16
|
+
motionRailRef.value.destroy();
|
|
17
|
+
motionRailRef.value = null;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsx("div", {
|
|
22
|
+
ref: containerRef,
|
|
23
|
+
"data-motionrail": true,
|
|
24
|
+
...divProps,
|
|
25
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
26
|
+
"data-motionrail-scrollable": true,
|
|
27
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-motionrail-grid": true,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
MotionRail
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MotionRail } from './main';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MotionRailOptions } from "motionrail";
|
|
2
|
+
export interface MotionRailProps {
|
|
3
|
+
options?: MotionRailOptions;
|
|
4
|
+
}
|
|
5
|
+
export declare const MotionRail: import("@builder.io/qwik").Component<MotionRailProps & {
|
|
6
|
+
align?: string | undefined;
|
|
7
|
+
} & import("@builder.io/qwik").HTMLElementAttrs & import("@builder.io/qwik").QwikAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motionrail",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./main/dist/motionrail.umd.js",
|
|
6
6
|
"module": "./main/dist/motionrail.es.js",
|
|
@@ -79,16 +79,10 @@
|
|
|
79
79
|
},
|
|
80
80
|
"files": [
|
|
81
81
|
"main/dist",
|
|
82
|
-
"extensions
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"frameworks/react/dist",
|
|
87
|
-
"frameworks/vue/dist",
|
|
88
|
-
"frameworks/svelte/dist",
|
|
89
|
-
"frameworks/preact/dist",
|
|
90
|
-
"frameworks/solid/dist",
|
|
91
|
-
"frameworks/qwik/dist"
|
|
82
|
+
"extensions/*/dist",
|
|
83
|
+
"frameworks/*/dist",
|
|
84
|
+
"frameworks/qwik/lib-types",
|
|
85
|
+
"frameworks/qwik/lib"
|
|
92
86
|
],
|
|
93
87
|
"keywords": [
|
|
94
88
|
"carousel",
|