solid-slider 1.3.0 → 1.3.3
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/README.md +12 -1
- package/dist/adaptiveHeight/adaptiveHeight.d.ts +11 -0
- package/dist/adaptiveHeight/adaptiveHeight.jsx +18 -0
- package/dist/adaptiveHeight/index.common.js +23 -0
- package/dist/adaptiveHeight/index.common.js.map +1 -0
- package/dist/adaptiveHeight/index.module.js +21 -0
- package/dist/adaptiveHeight/index.module.js.map +1 -0
- package/dist/adaptiveHeight/style.css +3 -0
- package/dist/autoplay/autoplay.d.ts +27 -0
- package/dist/autoplay/autoplay.jsx +32 -0
- package/dist/autoplay/index.common.js +40 -0
- package/dist/autoplay/index.common.js.map +1 -0
- package/dist/autoplay/index.module.js +38 -0
- package/dist/autoplay/index.module.js.map +1 -0
- package/dist/index/components.d.ts +50 -0
- package/dist/index/components.jsx +51 -0
- package/dist/index/index.common.js +176 -0
- package/dist/index/index.common.js.map +1 -0
- package/dist/index/index.d.ts +2 -0
- package/dist/index/index.jsx +2 -0
- package/dist/index/index.module.js +163 -0
- package/dist/index/index.module.js.map +1 -0
- package/dist/index/primitive.d.ts +39 -0
- package/dist/index/primitive.js +58 -0
- package/dist/slider.css +1 -1
- package/package.json +32 -12
- package/dist/chunk-NXJS66U5.mjs +0 -20
- package/dist/index.d.ts +0 -92
- package/dist/index.js +0 -158
- package/dist/index.mjs +0 -114
- package/dist/plugins/autoplay.js +0 -41
- package/dist/plugins/autoplay.mjs +0 -21
package/README.md
CHANGED
|
@@ -154,6 +154,15 @@ Solid Slider is meant to be a lightweight and compact wrapper of Keen-Slider. It
|
|
|
154
154
|
|
|
155
155
|
Thie library exports it's own CSS which is the basic Keen-Slider implementation for convenience. If you supply options as an accessor function, the slider will reactively update the configuration so that you don't have to destroy and recreate the slider. As of Keen-Slider 6 plugins are now fully supported. You may supply them as a param in createSlider. Note that plugins are not reactively updated and must be supplied on creation.
|
|
156
156
|
|
|
157
|
+
## Roadmap
|
|
158
|
+
|
|
159
|
+
- [ ] Create [adaptiveHeight](https://codesandbox.io/s/github/rcbyr/keen-slider-sandboxes/tree/v6/misc/adaptive-height/react?file=/src/App.js:191-403) plugin
|
|
160
|
+
- [ ] Add Dots components (to display a row of dots below the slider)
|
|
161
|
+
- [ ] Add slider thumbnail navigation
|
|
162
|
+
- [ ] Add slider loader
|
|
163
|
+
- [ ] Build [timepicker](https://keen-slider.io/examples#timepicker) component
|
|
164
|
+
- [ ] Create [Scroll Wheel](https://keen-slider.io/examples#scroll-wheel-controls) component
|
|
165
|
+
|
|
157
166
|
## Changelog
|
|
158
167
|
|
|
159
168
|
- 1.0.0 - Initial release
|
|
@@ -162,7 +171,9 @@ Thie library exports it's own CSS which is the basic Keen-Slider implementation
|
|
|
162
171
|
- 1.2.5 - Added autoplay plugin and general plugin structure.
|
|
163
172
|
- 1.2.7 - Maybe I should actually export the .css? That'd be a good idea, right? /s
|
|
164
173
|
- 1.2.9 - Updated timer primitive and patched issue with current slide setting from initial options.
|
|
165
|
-
- 1.3.
|
|
174
|
+
- 1.3.1 - Introduced Slider, SliderProvider and SliderButton for ease.
|
|
175
|
+
- 1.3.2 - Patched issue with initial slide not setting current signal.
|
|
176
|
+
- 1.3.5 - Updated to latest SolidJS version.
|
|
166
177
|
|
|
167
178
|
## Keen Options API
|
|
168
179
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KeenSliderInstance } from "keen-slider";
|
|
2
|
+
/**
|
|
3
|
+
* Adaptive height is a plugin that adjusts the height of the slider to the content on change.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const [create] = createSlider({}, [adaptiveHeight]);
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
declare const adaptiveHeight: () => (slider: KeenSliderInstance) => void;
|
|
11
|
+
export default adaptiveHeight;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adaptive height is a plugin that adjusts the height of the slider to the content on change.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* const [create] = createSlider({}, [adaptiveHeight]);
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
const adaptiveHeight = () => {
|
|
10
|
+
return (slider) => {
|
|
11
|
+
function updateHeight() {
|
|
12
|
+
slider.container.style.height = slider.slides[slider.track.details.rel].offsetHeight + "px";
|
|
13
|
+
}
|
|
14
|
+
slider.on("created", updateHeight);
|
|
15
|
+
slider.on("slideChanged", updateHeight);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default adaptiveHeight;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Adaptive height is a plugin that adjusts the height of the slider to the content on change.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const [create] = createSlider({}, [adaptiveHeight]);
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
const adaptiveHeight = () => {
|
|
12
|
+
return slider => {
|
|
13
|
+
function updateHeight() {
|
|
14
|
+
slider.container.style.height = slider.slides[slider.track.details.rel].offsetHeight + "px";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
slider.on("created", updateHeight);
|
|
18
|
+
slider.on("slideChanged", updateHeight);
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
module.exports = adaptiveHeight;
|
|
23
|
+
//# sourceMappingURL=index.common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.common.js","sources":["../../src/plugins/adaptiveHeight.tsx"],"sourcesContent":["import { Accessor, createEffect } from \"solid-js\";\nimport { makeTimer } from \"@solid-primitives/timer\";\nimport { KeenSliderInstance } from \"keen-slider\";\n\n/**\n * Adaptive height is a plugin that adjusts the height of the slider to the content on change.\n *\n * @example\n * ```ts\n * const [create] = createSlider({}, [adaptiveHeight]);\n * ```\n */\nconst adaptiveHeight = () => {\n return (slider: KeenSliderInstance) => {\n function updateHeight() {\n slider.container.style.height = slider.slides[slider.track.details.rel].offsetHeight + \"px\";\n }\n slider.on(\"created\", updateHeight);\n slider.on(\"slideChanged\", updateHeight);\n };\n};\n\nexport default adaptiveHeight;\n"],"names":["adaptiveHeight","slider","updateHeight","container","style","height","slides","track","details","rel","offsetHeight","on"],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,cAAc,GAAG,MAAM;AAC3B,EAAA,OAAQC,MAAD,IAAgC;AACrC,IAAA,SAASC,YAAT,GAAwB;AACtBD,MAAAA,MAAM,CAACE,SAAP,CAAiBC,KAAjB,CAAuBC,MAAvB,GAAgCJ,MAAM,CAACK,MAAP,CAAcL,MAAM,CAACM,KAAP,CAAaC,OAAb,CAAqBC,GAAnC,CAAA,CAAwCC,YAAxC,GAAuD,IAAvF,CAAA;AACD,KAAA;;AACDT,IAAAA,MAAM,CAACU,EAAP,CAAU,SAAV,EAAqBT,YAArB,CAAA,CAAA;AACAD,IAAAA,MAAM,CAACU,EAAP,CAAU,cAAV,EAA0BT,YAA1B,CAAA,CAAA;AACD,GAND,CAAA;AAOD;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adaptive height is a plugin that adjusts the height of the slider to the content on change.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* const [create] = createSlider({}, [adaptiveHeight]);
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
const adaptiveHeight = () => {
|
|
10
|
+
return slider => {
|
|
11
|
+
function updateHeight() {
|
|
12
|
+
slider.container.style.height = slider.slides[slider.track.details.rel].offsetHeight + "px";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
slider.on("created", updateHeight);
|
|
16
|
+
slider.on("slideChanged", updateHeight);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { adaptiveHeight as default };
|
|
21
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../src/plugins/adaptiveHeight.tsx"],"sourcesContent":["import { Accessor, createEffect } from \"solid-js\";\nimport { makeTimer } from \"@solid-primitives/timer\";\nimport { KeenSliderInstance } from \"keen-slider\";\n\n/**\n * Adaptive height is a plugin that adjusts the height of the slider to the content on change.\n *\n * @example\n * ```ts\n * const [create] = createSlider({}, [adaptiveHeight]);\n * ```\n */\nconst adaptiveHeight = () => {\n return (slider: KeenSliderInstance) => {\n function updateHeight() {\n slider.container.style.height = slider.slides[slider.track.details.rel].offsetHeight + \"px\";\n }\n slider.on(\"created\", updateHeight);\n slider.on(\"slideChanged\", updateHeight);\n };\n};\n\nexport default adaptiveHeight;\n"],"names":["adaptiveHeight","slider","updateHeight","container","style","height","slides","track","details","rel","offsetHeight","on"],"mappings":"AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,cAAc,GAAG,MAAM;AAC3B,EAAA,OAAQC,MAAD,IAAgC;AACrC,IAAA,SAASC,YAAT,GAAwB;AACtBD,MAAAA,MAAM,CAACE,SAAP,CAAiBC,KAAjB,CAAuBC,MAAvB,GAAgCJ,MAAM,CAACK,MAAP,CAAcL,MAAM,CAACM,KAAP,CAAaC,OAAb,CAAqBC,GAAnC,CAAA,CAAwCC,YAAxC,GAAuD,IAAvF,CAAA;AACD,KAAA;;AACDT,IAAAA,MAAM,CAACU,EAAP,CAAU,SAAV,EAAqBT,YAArB,CAAA,CAAA;AACAD,IAAAA,MAAM,CAACU,EAAP,CAAU,cAAV,EAA0BT,YAA1B,CAAA,CAAA;AACD,GAND,CAAA;AAOD;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Accessor } from "solid-js";
|
|
2
|
+
import { KeenSliderInstance } from "keen-slider";
|
|
3
|
+
/**
|
|
4
|
+
* Provides an autoplay plugin.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} interval Interval in milliseconds for switching slides
|
|
7
|
+
* @param {object} options Options to customize the autoplay
|
|
8
|
+
* @param {Function} options.pause A pause signal to control the autoplay
|
|
9
|
+
* @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.
|
|
10
|
+
* @param {object} options.animation Allows for control of duration and easing.
|
|
11
|
+
* @param {number} options.duration Duration for transitioning the slide.
|
|
12
|
+
* @param {number} options.easing Easing function for the transition animation.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const [create] = createSlider({}, [autoplay]);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare const autoplay: (interval: number, options: {
|
|
20
|
+
pause?: Accessor<boolean>;
|
|
21
|
+
pauseOnDrag?: boolean;
|
|
22
|
+
animation?: {
|
|
23
|
+
duration?: number;
|
|
24
|
+
easing?: (t: number) => number;
|
|
25
|
+
};
|
|
26
|
+
}) => (slider: KeenSliderInstance) => void;
|
|
27
|
+
export default autoplay;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createEffect } from "solid-js";
|
|
2
|
+
import { makeTimer } from "@solid-primitives/timer";
|
|
3
|
+
/**
|
|
4
|
+
* Provides an autoplay plugin.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} interval Interval in milliseconds for switching slides
|
|
7
|
+
* @param {object} options Options to customize the autoplay
|
|
8
|
+
* @param {Function} options.pause A pause signal to control the autoplay
|
|
9
|
+
* @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.
|
|
10
|
+
* @param {object} options.animation Allows for control of duration and easing.
|
|
11
|
+
* @param {number} options.duration Duration for transitioning the slide.
|
|
12
|
+
* @param {number} options.easing Easing function for the transition animation.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const [create] = createSlider({}, [autoplay]);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const autoplay = (interval = 1000, options) => {
|
|
20
|
+
return (slider) => {
|
|
21
|
+
let dispose;
|
|
22
|
+
const start = () => {
|
|
23
|
+
dispose = makeTimer(() => slider.moveToIdx(slider.track.details.position + 1, true, options.animation), interval, setInterval);
|
|
24
|
+
};
|
|
25
|
+
// Pause the slider on drag
|
|
26
|
+
if (options.pauseOnDrag || true) {
|
|
27
|
+
slider.on("dragStarted", () => dispose());
|
|
28
|
+
}
|
|
29
|
+
createEffect(() => (!options.pause || options.pause() === false ? start() : dispose()));
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default autoplay;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var solidJs = require('solid-js');
|
|
4
|
+
var timer = require('@solid-primitives/timer');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Provides an autoplay plugin.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} interval Interval in milliseconds for switching slides
|
|
10
|
+
* @param {object} options Options to customize the autoplay
|
|
11
|
+
* @param {Function} options.pause A pause signal to control the autoplay
|
|
12
|
+
* @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.
|
|
13
|
+
* @param {object} options.animation Allows for control of duration and easing.
|
|
14
|
+
* @param {number} options.duration Duration for transitioning the slide.
|
|
15
|
+
* @param {number} options.easing Easing function for the transition animation.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const [create] = createSlider({}, [autoplay]);
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
const autoplay = (interval = 1000, options) => {
|
|
23
|
+
return slider => {
|
|
24
|
+
let dispose;
|
|
25
|
+
|
|
26
|
+
const start = () => {
|
|
27
|
+
dispose = timer.makeTimer(() => slider.moveToIdx(slider.track.details.position + 1, true, options.animation), interval, setInterval);
|
|
28
|
+
}; // Pause the slider on drag
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if (options.pauseOnDrag || true) {
|
|
32
|
+
slider.on("dragStarted", () => dispose());
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
solidJs.createEffect(() => !options.pause || options.pause() === false ? start() : dispose());
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
module.exports = autoplay;
|
|
40
|
+
//# sourceMappingURL=index.common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.common.js","sources":["../../src/plugins/autoplay.tsx"],"sourcesContent":["import { Accessor, createEffect } from \"solid-js\";\nimport { makeTimer } from \"@solid-primitives/timer\";\nimport { KeenSliderInstance } from \"keen-slider\";\n\n/**\n * Provides an autoplay plugin.\n *\n * @param {number} interval Interval in milliseconds for switching slides\n * @param {object} options Options to customize the autoplay\n * @param {Function} options.pause A pause signal to control the autoplay\n * @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.\n * @param {object} options.animation Allows for control of duration and easing.\n * @param {number} options.duration Duration for transitioning the slide.\n * @param {number} options.easing Easing function for the transition animation.\n *\n * @example\n * ```ts\n * const [create] = createSlider({}, [autoplay]);\n * ```\n */\nconst autoplay = (\n interval: number = 1000,\n options: {\n pause?: Accessor<boolean>;\n pauseOnDrag?: boolean;\n animation?: {\n duration?: number;\n easing?: (t: number) => number;\n };\n }\n) => {\n return (slider: KeenSliderInstance) => {\n let dispose: Function;\n const start = () => {\n dispose = makeTimer(\n () => slider.moveToIdx(slider.track.details.position + 1, true, options.animation),\n interval,\n setInterval\n );\n };\n // Pause the slider on drag\n if (options.pauseOnDrag || true) {\n slider.on(\"dragStarted\", () => dispose());\n }\n createEffect(() => (!options.pause || options.pause() === false ? start() : dispose()));\n };\n};\n\nexport default autoplay;\n"],"names":["autoplay","interval","options","slider","dispose","start","makeTimer","moveToIdx","track","details","position","animation","setInterval","pauseOnDrag","on","createEffect","pause"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,QAAQ,GAAG,CACfC,QAAgB,GAAG,IADJ,EAEfC,OAFe,KAUZ;AACH,EAAA,OAAQC,MAAD,IAAgC;AACrC,IAAA,IAAIC,OAAJ,CAAA;;AACA,IAAMC,MAAAA,KAAK,GAAG,MAAM;AAClBD,MAAAA,OAAO,GAAGE,eAAS,CACjB,MAAMH,MAAM,CAACI,SAAP,CAAiBJ,MAAM,CAACK,KAAP,CAAaC,OAAb,CAAqBC,QAArB,GAAgC,CAAjD,EAAoD,IAApD,EAA0DR,OAAO,CAACS,SAAlE,CADW,EAEjBV,QAFiB,EAGjBW,WAHiB,CAAnB,CAAA;AAKD,KAND,CAFqC;;;AAUrC,IAAA,IAAIV,OAAO,CAACW,WAAR,IAAuB,IAA3B,EAAiC;AAC/BV,MAAAA,MAAM,CAACW,EAAP,CAAU,aAAV,EAAyB,MAAMV,OAAO,EAAtC,CAAA,CAAA;AACD,KAAA;;AACDW,IAAAA,oBAAY,CAAC,MAAO,CAACb,OAAO,CAACc,KAAT,IAAkBd,OAAO,CAACc,KAAR,EAAA,KAAoB,KAAtC,GAA8CX,KAAK,EAAnD,GAAwDD,OAAO,EAAvE,CAAZ,CAAA;AACD,GAdD,CAAA;AAeD;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createEffect } from 'solid-js';
|
|
2
|
+
import { makeTimer } from '@solid-primitives/timer';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Provides an autoplay plugin.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} interval Interval in milliseconds for switching slides
|
|
8
|
+
* @param {object} options Options to customize the autoplay
|
|
9
|
+
* @param {Function} options.pause A pause signal to control the autoplay
|
|
10
|
+
* @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.
|
|
11
|
+
* @param {object} options.animation Allows for control of duration and easing.
|
|
12
|
+
* @param {number} options.duration Duration for transitioning the slide.
|
|
13
|
+
* @param {number} options.easing Easing function for the transition animation.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const [create] = createSlider({}, [autoplay]);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
const autoplay = (interval = 1000, options) => {
|
|
21
|
+
return slider => {
|
|
22
|
+
let dispose;
|
|
23
|
+
|
|
24
|
+
const start = () => {
|
|
25
|
+
dispose = makeTimer(() => slider.moveToIdx(slider.track.details.position + 1, true, options.animation), interval, setInterval);
|
|
26
|
+
}; // Pause the slider on drag
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
if (options.pauseOnDrag || true) {
|
|
30
|
+
slider.on("dragStarted", () => dispose());
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
createEffect(() => !options.pause || options.pause() === false ? start() : dispose());
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { autoplay as default };
|
|
38
|
+
//# sourceMappingURL=index.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.js","sources":["../../src/plugins/autoplay.tsx"],"sourcesContent":["import { Accessor, createEffect } from \"solid-js\";\nimport { makeTimer } from \"@solid-primitives/timer\";\nimport { KeenSliderInstance } from \"keen-slider\";\n\n/**\n * Provides an autoplay plugin.\n *\n * @param {number} interval Interval in milliseconds for switching slides\n * @param {object} options Options to customize the autoplay\n * @param {Function} options.pause A pause signal to control the autoplay\n * @param {boolean} options.pauseOnDrag Denotes of the autoplay should pause on drag.\n * @param {object} options.animation Allows for control of duration and easing.\n * @param {number} options.duration Duration for transitioning the slide.\n * @param {number} options.easing Easing function for the transition animation.\n *\n * @example\n * ```ts\n * const [create] = createSlider({}, [autoplay]);\n * ```\n */\nconst autoplay = (\n interval: number = 1000,\n options: {\n pause?: Accessor<boolean>;\n pauseOnDrag?: boolean;\n animation?: {\n duration?: number;\n easing?: (t: number) => number;\n };\n }\n) => {\n return (slider: KeenSliderInstance) => {\n let dispose: Function;\n const start = () => {\n dispose = makeTimer(\n () => slider.moveToIdx(slider.track.details.position + 1, true, options.animation),\n interval,\n setInterval\n );\n };\n // Pause the slider on drag\n if (options.pauseOnDrag || true) {\n slider.on(\"dragStarted\", () => dispose());\n }\n createEffect(() => (!options.pause || options.pause() === false ? start() : dispose()));\n };\n};\n\nexport default autoplay;\n"],"names":["autoplay","interval","options","slider","dispose","start","makeTimer","moveToIdx","track","details","position","animation","setInterval","pauseOnDrag","on","createEffect","pause"],"mappings":";;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACMA,MAAAA,QAAQ,GAAG,CACfC,QAAgB,GAAG,IADJ,EAEfC,OAFe,KAUZ;AACH,EAAA,OAAQC,MAAD,IAAgC;AACrC,IAAA,IAAIC,OAAJ,CAAA;;AACA,IAAMC,MAAAA,KAAK,GAAG,MAAM;AAClBD,MAAAA,OAAO,GAAGE,SAAS,CACjB,MAAMH,MAAM,CAACI,SAAP,CAAiBJ,MAAM,CAACK,KAAP,CAAaC,OAAb,CAAqBC,QAArB,GAAgC,CAAjD,EAAoD,IAApD,EAA0DR,OAAO,CAACS,SAAlE,CADW,EAEjBV,QAFiB,EAGjBW,WAHiB,CAAnB,CAAA;AAKD,KAND,CAFqC;;;AAUrC,IAAA,IAAIV,OAAO,CAACW,WAAR,IAAuB,IAA3B,EAAiC;AAC/BV,MAAAA,MAAM,CAACW,EAAP,CAAU,aAAV,EAAyB,MAAMV,OAAO,EAAtC,CAAA,CAAA;AACD,KAAA;;AACDW,IAAAA,YAAY,CAAC,MAAO,CAACb,OAAO,CAACc,KAAT,IAAkBd,OAAO,CAACc,KAAR,EAAA,KAAoB,KAAtC,GAA8CX,KAAK,EAAnD,GAAwDD,OAAO,EAAvE,CAAZ,CAAA;AACD,GAdD,CAAA;AAeD;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Component } from "solid-js";
|
|
2
|
+
import { KeenSliderOptions, KeenSliderPlugin } from "keen-slider";
|
|
3
|
+
interface Func<T> {
|
|
4
|
+
([...args]: any, args2?: any): T;
|
|
5
|
+
}
|
|
6
|
+
export declare function returnType<T>(func: Func<T>): T;
|
|
7
|
+
export declare const SliderContext: import("solid-js").Context<import("solid-js").Signal<{
|
|
8
|
+
current: import("solid-js").Accessor<number>;
|
|
9
|
+
next: import("solid-js").Accessor<void>;
|
|
10
|
+
prev: import("solid-js").Accessor<void>;
|
|
11
|
+
moveTo: (id: number, duration?: number, absolute?: boolean, easing?: (t: number) => number) => void;
|
|
12
|
+
details: import("solid-js").Accessor<import("keen-slider").TrackDetails>;
|
|
13
|
+
slider: import("solid-js").Accessor<import("keen-slider").KeenSliderInstance<{}, {}, import("keen-slider").KeenSliderHooks>>;
|
|
14
|
+
destroy: import("solid-js").Accessor<void>;
|
|
15
|
+
}>>;
|
|
16
|
+
/**
|
|
17
|
+
* A helpful and simple Provider to wrap your Slider if controls such as SliderButton are used.
|
|
18
|
+
*
|
|
19
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
20
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SliderProvider: Component;
|
|
23
|
+
/**
|
|
24
|
+
* Main Slider component for specifying the Slider on the page.
|
|
25
|
+
*
|
|
26
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
27
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Slider: Component<{
|
|
30
|
+
options?: KeenSliderOptions;
|
|
31
|
+
plugins?: KeenSliderPlugin[];
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Provides a helpful button with next/prev to pair with your slider.
|
|
35
|
+
*
|
|
36
|
+
* @param props {boolean} next - Specify if this should be a next button.
|
|
37
|
+
* @param props {boolean} prev - Specify if this should be a prev button.
|
|
38
|
+
* @param props {string} class - Class to override the button.
|
|
39
|
+
* @param props {object} classList - List of classes to override the button.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SliderButton: Component<{
|
|
42
|
+
next?: boolean;
|
|
43
|
+
prev?: boolean;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
class?: string;
|
|
46
|
+
classList?: {
|
|
47
|
+
[k: string]: boolean | undefined;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createContext, useContext, createSignal } from "solid-js";
|
|
2
|
+
import { createSlider } from "./primitive";
|
|
3
|
+
import { isServer } from "solid-js/web";
|
|
4
|
+
export function returnType(func) {
|
|
5
|
+
return {};
|
|
6
|
+
}
|
|
7
|
+
const sliderValues = returnType(createSlider);
|
|
8
|
+
// Main context for the slider
|
|
9
|
+
export const SliderContext = createContext(createSignal(null));
|
|
10
|
+
/**
|
|
11
|
+
* A helpful and simple Provider to wrap your Slider if controls such as SliderButton are used.
|
|
12
|
+
*
|
|
13
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
14
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
15
|
+
*/
|
|
16
|
+
export const SliderProvider = props => (<SliderContext.Provider value={createSignal(null)}>{props.children}</SliderContext.Provider>);
|
|
17
|
+
/**
|
|
18
|
+
* Main Slider component for specifying the Slider on the page.
|
|
19
|
+
*
|
|
20
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
21
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
22
|
+
*/
|
|
23
|
+
export const Slider = props => {
|
|
24
|
+
if (isServer)
|
|
25
|
+
return props.children;
|
|
26
|
+
const [, setHelpers] = useContext(SliderContext);
|
|
27
|
+
const [slider, helpers] = createSlider(props.options || {}, ...(props.plugins || []));
|
|
28
|
+
setHelpers(helpers);
|
|
29
|
+
slider;
|
|
30
|
+
return <div use:slider>{props.children}</div>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Provides a helpful button with next/prev to pair with your slider.
|
|
34
|
+
*
|
|
35
|
+
* @param props {boolean} next - Specify if this should be a next button.
|
|
36
|
+
* @param props {boolean} prev - Specify if this should be a prev button.
|
|
37
|
+
* @param props {string} class - Class to override the button.
|
|
38
|
+
* @param props {object} classList - List of classes to override the button.
|
|
39
|
+
*/
|
|
40
|
+
export const SliderButton = props => {
|
|
41
|
+
const context = useContext(SliderContext);
|
|
42
|
+
const changeSlide = () => {
|
|
43
|
+
if (context == null)
|
|
44
|
+
return;
|
|
45
|
+
const [helpers] = context;
|
|
46
|
+
props.next ? helpers()?.next() : helpers()?.prev();
|
|
47
|
+
};
|
|
48
|
+
return (<button disabled={props.disabled || false} class={props.class} classList={props.classList} onClick={changeSlide}>
|
|
49
|
+
{props.children}
|
|
50
|
+
</button>);
|
|
51
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var solidJs = require('solid-js');
|
|
6
|
+
var KeenSlider = require('keen-slider');
|
|
7
|
+
var web = require('solid-js/web');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var KeenSlider__default = /*#__PURE__*/_interopDefaultLegacy(KeenSlider);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a slider powered by KeenSlider.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} options Values to initialize the slider with
|
|
17
|
+
* @param {Array} plugins Extensions that enhance KeenSlider options
|
|
18
|
+
* @returns {[create: Function, helpers: Object]} Returns mount and helper methods
|
|
19
|
+
* @returns {Function} create Mounts the slider on provided element
|
|
20
|
+
* @returns {Function} helpers.current Current slide number
|
|
21
|
+
* @returns {Function} helpers.current Current slide number
|
|
22
|
+
* @returns {Function} helpers.next Function to trigger the next slide
|
|
23
|
+
* @returns {Function} helpers.prev Function to trigger the previous slide
|
|
24
|
+
* @returns {Function<Object>} helpers.details Provides details about the current slider
|
|
25
|
+
* @returns {Function} helpers.slider Returns the KeenSlider instance
|
|
26
|
+
* @returns {Function} helpers.destroy Manual destroy function
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const [create, { prev, next }] = createSlider();
|
|
31
|
+
* <div use:slider>...</div>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
const createSlider = (options, ...plugins) => {
|
|
35
|
+
let slider;
|
|
36
|
+
|
|
37
|
+
const opts = () => typeof options == "function" ? options() : options;
|
|
38
|
+
|
|
39
|
+
const [current, setCurrent] = solidJs.createSignal(opts()?.initial || 0);
|
|
40
|
+
|
|
41
|
+
const destroy = () => slider && slider.destroy(); // Slider creation method and directive function
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
const create = el => {
|
|
45
|
+
el.classList.add("keen-slider"); // @ts-ignore
|
|
46
|
+
|
|
47
|
+
const getOptions = () => ({
|
|
48
|
+
selector: el.childNodes,
|
|
49
|
+
...opts()
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
solidJs.onMount(() => {
|
|
53
|
+
slider = new KeenSlider__default["default"](el, getOptions(), plugins);
|
|
54
|
+
slider.on("slideChanged", () => setCurrent(slider.track.details.rel));
|
|
55
|
+
});
|
|
56
|
+
solidJs.onCleanup(destroy);
|
|
57
|
+
|
|
58
|
+
if (typeof options === "function") {
|
|
59
|
+
solidJs.createEffect(solidJs.on(() => options, () => slider && slider.update(getOptions())));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return [create, {
|
|
64
|
+
current,
|
|
65
|
+
next: () => slider && slider.next(),
|
|
66
|
+
prev: () => slider && slider.prev(),
|
|
67
|
+
details: () => slider ? slider.track.details : {},
|
|
68
|
+
slider: () => slider,
|
|
69
|
+
moveTo: (id, duration = 250, absolute = false, easing) => slider?.moveToIdx(id, absolute, {
|
|
70
|
+
duration,
|
|
71
|
+
easing: easing
|
|
72
|
+
}),
|
|
73
|
+
destroy
|
|
74
|
+
}];
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const _tmpl$ = /*#__PURE__*/web.template(`<div></div>`, 2),
|
|
78
|
+
_tmpl$2 = /*#__PURE__*/web.template(`<button></button>`, 2);
|
|
79
|
+
|
|
80
|
+
function returnType(func) {
|
|
81
|
+
return {};
|
|
82
|
+
}
|
|
83
|
+
// Main context for the slider
|
|
84
|
+
const SliderContext = solidJs.createContext(solidJs.createSignal(null));
|
|
85
|
+
/**
|
|
86
|
+
* A helpful and simple Provider to wrap your Slider if controls such as SliderButton are used.
|
|
87
|
+
*
|
|
88
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
89
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
const SliderProvider = props => web.createComponent(SliderContext.Provider, {
|
|
93
|
+
get value() {
|
|
94
|
+
return solidJs.createSignal(null);
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
get children() {
|
|
98
|
+
return props.children;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* Main Slider component for specifying the Slider on the page.
|
|
104
|
+
*
|
|
105
|
+
* @param props {KeenSliderOptions} options - Accepts all KeenSlider options.
|
|
106
|
+
* @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
const Slider = props => {
|
|
110
|
+
if (web.isServer) return props.children;
|
|
111
|
+
const [, setHelpers] = solidJs.useContext(SliderContext);
|
|
112
|
+
const [slider, helpers] = createSlider(props.options || {}, ...(props.plugins || []));
|
|
113
|
+
setHelpers(helpers);
|
|
114
|
+
return (() => {
|
|
115
|
+
const _el$ = _tmpl$.cloneNode(true);
|
|
116
|
+
|
|
117
|
+
slider(_el$, () => true);
|
|
118
|
+
|
|
119
|
+
web.insert(_el$, () => props.children);
|
|
120
|
+
|
|
121
|
+
return _el$;
|
|
122
|
+
})();
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Provides a helpful button with next/prev to pair with your slider.
|
|
126
|
+
*
|
|
127
|
+
* @param props {boolean} next - Specify if this should be a next button.
|
|
128
|
+
* @param props {boolean} prev - Specify if this should be a prev button.
|
|
129
|
+
* @param props {string} class - Class to override the button.
|
|
130
|
+
* @param props {object} classList - List of classes to override the button.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
const SliderButton = props => {
|
|
134
|
+
const context = solidJs.useContext(SliderContext);
|
|
135
|
+
|
|
136
|
+
const changeSlide = () => {
|
|
137
|
+
if (context == null) return;
|
|
138
|
+
const [helpers] = context;
|
|
139
|
+
props.next ? helpers()?.next() : helpers()?.prev();
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
return (() => {
|
|
143
|
+
const _el$2 = _tmpl$2.cloneNode(true);
|
|
144
|
+
|
|
145
|
+
_el$2.$$click = changeSlide;
|
|
146
|
+
|
|
147
|
+
web.insert(_el$2, () => props.children);
|
|
148
|
+
|
|
149
|
+
web.effect(_p$ => {
|
|
150
|
+
const _v$ = props.disabled || false,
|
|
151
|
+
_v$2 = props.class,
|
|
152
|
+
_v$3 = props.classList;
|
|
153
|
+
|
|
154
|
+
_v$ !== _p$._v$ && (_el$2.disabled = _p$._v$ = _v$);
|
|
155
|
+
_v$2 !== _p$._v$2 && (_el$2.className = _p$._v$2 = _v$2);
|
|
156
|
+
_p$._v$3 = web.classList(_el$2, _v$3, _p$._v$3);
|
|
157
|
+
return _p$;
|
|
158
|
+
}, {
|
|
159
|
+
_v$: undefined,
|
|
160
|
+
_v$2: undefined,
|
|
161
|
+
_v$3: undefined
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
return _el$2;
|
|
165
|
+
})();
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
web.delegateEvents(["click"]);
|
|
169
|
+
|
|
170
|
+
exports.Slider = Slider;
|
|
171
|
+
exports.SliderButton = SliderButton;
|
|
172
|
+
exports.SliderContext = SliderContext;
|
|
173
|
+
exports.SliderProvider = SliderProvider;
|
|
174
|
+
exports.createSlider = createSlider;
|
|
175
|
+
exports.returnType = returnType;
|
|
176
|
+
//# sourceMappingURL=index.common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.common.js","sources":["../../src/primitive.ts","../../src/components.tsx"],"sourcesContent":["import { on, onMount, createSignal, onCleanup, Accessor, createEffect } from \"solid-js\";\nimport KeenSlider, {\n KeenSliderHooks,\n KeenSliderInstance,\n KeenSliderOptions,\n KeenSliderPlugin,\n TrackDetails\n} from \"keen-slider\";\n\ndeclare module \"solid-js\" {\n namespace JSX {\n interface Directives {\n slider: {};\n }\n }\n}\n\n/**\n * Creates a slider powered by KeenSlider.\n *\n * @param {Object} options Values to initialize the slider with\n * @param {Array} plugins Extensions that enhance KeenSlider options\n * @returns {[create: Function, helpers: Object]} Returns mount and helper methods\n * @returns {Function} create Mounts the slider on provided element\n * @returns {Function} helpers.current Current slide number\n * @returns {Function} helpers.current Current slide number\n * @returns {Function} helpers.next Function to trigger the next slide\n * @returns {Function} helpers.prev Function to trigger the previous slide\n * @returns {Function<Object>} helpers.details Provides details about the current slider\n * @returns {Function} helpers.slider Returns the KeenSlider instance\n * @returns {Function} helpers.destroy Manual destroy function\n *\n * @example\n * ```ts\n * const [create, { prev, next }] = createSlider();\n * <div use:slider>...</div>\n * ```\n */\nexport const createSlider = <O = {}, P = {}, H extends string = KeenSliderHooks>(\n options?: KeenSliderOptions<O, P, H> | Accessor<KeenSliderOptions<O, P, H>>,\n ...plugins: KeenSliderPlugin<O, P, H>[]\n): [\n create: (el: HTMLElement) => void,\n helpers: {\n current: Accessor<number>;\n next: Accessor<void>;\n prev: Accessor<void>;\n moveTo: (\n id: number,\n duration?: number,\n absolute?: boolean,\n easing?: (t: number) => number\n ) => void;\n details: Accessor<TrackDetails>;\n slider: Accessor<KeenSliderInstance<O, P, H> | undefined>;\n destroy: Accessor<void>;\n }\n] => {\n let slider: KeenSliderInstance<O, P, H> | undefined;\n const opts = () => typeof options == \"function\" ? options() : options;\n const [current, setCurrent] = createSignal(opts()?.initial || 0);\n const destroy = () => slider && slider.destroy();\n // Slider creation method and directive function\n const create = (el: HTMLElement) => {\n el.classList.add(\"keen-slider\");\n // @ts-ignore\n const getOptions: Accessor<KeenSliderOptions<O, P, H> | undefined> = () => ({\n selector: el.childNodes,\n ...(opts())\n });\n onMount(() => {\n slider = new KeenSlider<O, P, H>(el, getOptions(), plugins);\n slider.on(\"slideChanged\", () => setCurrent(slider!.track.details.rel));\n });\n onCleanup(destroy);\n if (typeof options === \"function\") {\n createEffect(\n on(\n () => options,\n () => slider && slider.update(getOptions())\n )\n );\n }\n };\n return [\n create,\n {\n current,\n next: () => slider && slider.next(),\n prev: () => slider && slider.prev(),\n details: () => (slider ? slider.track.details : ({} as TrackDetails)),\n slider: () => slider,\n moveTo: (id: number, duration = 250, absolute = false, easing?: (t: number) => number) =>\n slider?.moveToIdx(id, absolute, { duration, easing: easing }),\n destroy\n }\n ];\n};\n","import { Component, createContext, useContext, createSignal, createMemo } from \"solid-js\";\nimport { createSlider } from \"./primitive\";\nimport { KeenSliderOptions, KeenSliderPlugin } from \"keen-slider\";\nimport { isServer } from \"solid-js/web\";\n\n// The following is a hacky way of extracting SliderHelpers\ninterface Func<T> {\n ([...args]: any, args2?: any): T;\n}\nexport function returnType<T>(func: Func<T>) {\n return {} as T;\n}\nconst sliderValues = returnType(createSlider);\ntype SliderHelpers = typeof sliderValues[1];\n\n// Main context for the slider\nexport const SliderContext = createContext(createSignal<SliderHelpers | null>(null));\n\n/**\n * A helpful and simple Provider to wrap your Slider if controls such as SliderButton are used.\n *\n * @param props {KeenSliderOptions} options - Accepts all KeenSlider options.\n * @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.\n */\nexport const SliderProvider: Component = props => (\n <SliderContext.Provider value={createSignal(null)}>{props.children}</SliderContext.Provider>\n);\n\n/**\n * Main Slider component for specifying the Slider on the page.\n *\n * @param props {KeenSliderOptions} options - Accepts all KeenSlider options.\n * @param props {KeenSLiderPlugin} plugins - A list of Solid Slider or Keen slider plugins.\n */\nexport const Slider: Component<{\n options?: KeenSliderOptions;\n plugins?: KeenSliderPlugin[];\n}> = props => {\n if (isServer) return props.children;\n const [, setHelpers] = useContext(SliderContext);\n const [slider, helpers] = createSlider(props.options || {}, ...(props.plugins || []));\n setHelpers(helpers);\n slider;\n return <div use:slider>{props.children}</div>;\n};\n\n/**\n * Provides a helpful button with next/prev to pair with your slider.\n *\n * @param props {boolean} next - Specify if this should be a next button.\n * @param props {boolean} prev - Specify if this should be a prev button.\n * @param props {string} class - Class to override the button.\n * @param props {object} classList - List of classes to override the button.\n */\nexport const SliderButton: Component<{\n next?: boolean;\n prev?: boolean;\n disabled?: boolean;\n class?: string;\n classList?: { [k: string]: boolean | undefined };\n}> = props => {\n const context = useContext(SliderContext);\n const changeSlide = () => {\n if (context == null) return;\n const [helpers] = context;\n props.next ? helpers()?.next() : helpers()?.prev();\n };\n return (\n <button\n disabled={props.disabled || false}\n class={props.class}\n classList={props.classList}\n onClick={changeSlide}\n >\n {props.children}\n </button>\n );\n};\n"],"names":["createSlider","options","plugins","slider","opts","current","setCurrent","createSignal","initial","destroy","create","el","classList","add","getOptions","selector","childNodes","onMount","KeenSlider","on","track","details","rel","onCleanup","createEffect","update","next","prev","moveTo","id","duration","absolute","easing","moveToIdx","returnType","func","SliderContext","createContext","SliderProvider","props","_$createComponent","children","Slider","isServer","setHelpers","useContext","helpers","SliderButton","context","changeSlide","_$effect","disabled","class","_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