Minor updates
This commit is contained in:
0
.npmignore
Normal file
0
.npmignore
Normal file
@@ -19,6 +19,7 @@
|
|||||||
"svelte carousel",
|
"svelte carousel",
|
||||||
"image carousel"
|
"image carousel"
|
||||||
],
|
],
|
||||||
|
"license": "Apache-2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
"dev": "rollup -c -w",
|
"dev": "rollup -c -w",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script>
|
<script>
|
||||||
import { NEXT, PREV } from '../direction'
|
import { NEXT, PREV } from '../../direction'
|
||||||
/**
|
/**
|
||||||
* Indicates direction of the arrow ('next', 'prev')
|
* Indicates direction of the arrow ('next', 'prev')
|
||||||
*/
|
*/
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onDestroy, onMount, tick } from 'svelte'
|
import { onDestroy, onMount, tick } from 'svelte'
|
||||||
import { store } from '../store'
|
import { store } from '../../store'
|
||||||
import Dots from '../Dots/Dots.svelte'
|
import Dots from '../Dots/Dots.svelte'
|
||||||
import Arrow from '../Arrow/Arrow.svelte'
|
import Arrow from '../Arrow/Arrow.svelte'
|
||||||
import { NEXT, PREV } from '../direction'
|
import { NEXT, PREV } from '../../direction'
|
||||||
import { swipeable } from '../swipeable'
|
import { swipeable } from '../../utils/swipeable'
|
||||||
import {
|
import {
|
||||||
addResizeEventListener,
|
addResizeEventListener,
|
||||||
removeResizeEventListener
|
removeResizeEventListener
|
||||||
} from '../utils/event'
|
} from '../../utils/event'
|
||||||
|
|
||||||
const directionFnDescription = {
|
const directionFnDescription = {
|
||||||
[NEXT]: showNextPage,
|
[NEXT]: showNextPage,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Carousel from './Carousel.svelte'
|
import Carousel from './Carousel.svelte'
|
||||||
import { NEXT } from '../direction'
|
import { NEXT } from '../../direction'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Next/Previos arrows
|
* Enable Next/Previos arrows
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Carousel from './Carousel.svelte'
|
import Carousel from './Carousel.svelte'
|
||||||
import { NEXT } from '../direction'
|
import { NEXT } from '../../direction'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Next/Previos arrows
|
* Enable Next/Previos arrows
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Carousel from './Carousel.svelte'
|
import Carousel from './Carousel.svelte'
|
||||||
import { NEXT } from '../direction'
|
import { NEXT } from '../../direction'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Next/Previos arrows
|
* Enable Next/Previos arrows
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
import Carousel from './Carousel/Carousel.svelte'
|
import Carousel from './components/Carousel/Carousel.svelte'
|
||||||
|
|
||||||
export default Carousel;
|
export default Carousel;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { NEXT, PREV } from './direction'
|
import { NEXT, PREV } from '../direction'
|
||||||
import {
|
import {
|
||||||
addStartEventListener,
|
addStartEventListener,
|
||||||
removeStartEventListener,
|
removeStartEventListener,
|
||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
addEndEventListener,
|
addEndEventListener,
|
||||||
removeEndEventListener,
|
removeEndEventListener,
|
||||||
createDispatcher
|
createDispatcher
|
||||||
} from './utils/event'
|
} from './event'
|
||||||
|
|
||||||
function getCoords(event) {
|
function getCoords(event) {
|
||||||
if (event instanceof TouchEvent) {
|
if (event instanceof TouchEvent) {
|
||||||
@@ -23,7 +23,6 @@ function getCoords(event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: rename to slidable
|
|
||||||
export function swipeable(node, { thresholdProvider }) {
|
export function swipeable(node, { thresholdProvider }) {
|
||||||
const dispatch = createDispatcher(node)
|
const dispatch = createDispatcher(node)
|
||||||
let x
|
let x
|
||||||
Reference in New Issue
Block a user