Minor updates

This commit is contained in:
Vadim
2021-01-24 17:00:26 +03:00
parent 6ecde0fe53
commit cb8fdf57d9
17 changed files with 12 additions and 12 deletions

0
.npmignore Normal file
View File

View 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",

View File

@@ -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')
*/ */

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,3 +1,3 @@
import Carousel from './Carousel/Carousel.svelte' import Carousel from './components/Carousel/Carousel.svelte'
export default Carousel; export default Carousel;

View File

@@ -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