react-spring-carousel 3.0.0-beta-1.0.0 → 3.0.0-beta-1.0.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/dist/index.d.ts +106 -0
- package/dist/react-spring-carousel.js +1454 -0
- package/package.json +13 -1
- package/.storybook/main.ts +0 -17
- package/.storybook/preview.ts +0 -15
- package/eslint.config.js +0 -28
- package/index.html +0 -13
- package/lib/events.ts +0 -39
- package/lib/index.tsx +0 -980
- package/lib/types.ts +0 -44
- package/lib/useEventsModule.ts +0 -51
- package/lib/utils.ts +0 -42
- package/lib/vite-env.d.ts +0 -1
- package/src/stories/Button.stories.ts +0 -52
- package/src/stories/Button.tsx +0 -48
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Main.stories.ts +0 -14
- package/src/stories/Main.tsx +0 -87
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/button.css +0 -30
- package/src/stories/main.css +0 -37
- package/src/storybook.global.styles.css +0 -5
- package/tsconfig.app.json +0 -24
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -22
- package/vite.config.ts +0 -30
package/package.json
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-spring-carousel",
|
|
3
|
-
"version": "3.0.0-beta-1.0.
|
|
3
|
+
"version": "3.0.0-beta-1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"main": "./dist/index.react-spring-carousel.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/*"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
5
17
|
"scripts": {
|
|
6
18
|
"dev": "vite",
|
|
7
19
|
"build": "tsc -b && vite build",
|
package/.storybook/main.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
5
|
-
addons: [
|
|
6
|
-
"@storybook/addon-onboarding",
|
|
7
|
-
"@storybook/addon-links",
|
|
8
|
-
"@storybook/addon-essentials",
|
|
9
|
-
"@chromatic-com/storybook",
|
|
10
|
-
"@storybook/addon-interactions",
|
|
11
|
-
],
|
|
12
|
-
framework: {
|
|
13
|
-
name: "@storybook/react-vite",
|
|
14
|
-
options: {},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export default config;
|
package/.storybook/preview.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Preview } from "@storybook/react";
|
|
2
|
-
import "../src/storybook.global.styles.css";
|
|
3
|
-
|
|
4
|
-
const preview: Preview = {
|
|
5
|
-
parameters: {
|
|
6
|
-
controls: {
|
|
7
|
-
matchers: {
|
|
8
|
-
color: /(background|color)$/i,
|
|
9
|
-
date: /Date$/i,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default preview;
|
package/eslint.config.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
import reactHooks from "eslint-plugin-react-hooks";
|
|
4
|
-
import reactRefresh from "eslint-plugin-react-refresh";
|
|
5
|
-
import tseslint from "typescript-eslint";
|
|
6
|
-
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
{ ignores: ["dist"] },
|
|
9
|
-
{
|
|
10
|
-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
-
files: ["**/*.{ts,tsx}"],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 2020,
|
|
14
|
-
globals: globals.browser,
|
|
15
|
-
},
|
|
16
|
-
plugins: {
|
|
17
|
-
"react-hooks": reactHooks,
|
|
18
|
-
"react-refresh": reactRefresh,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
...reactHooks.configs.recommended.rules,
|
|
22
|
-
"react-refresh/only-export-components": [
|
|
23
|
-
"warn",
|
|
24
|
-
{ allowConstantExport: true },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
);
|
package/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + React + TS</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="root"></div>
|
|
11
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/lib/events.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { FullGestureState } from "@use-gesture/react";
|
|
2
|
-
|
|
3
|
-
export type SlideActionType = "drag" | "click";
|
|
4
|
-
export type SlideDirection = "prev" | "next";
|
|
5
|
-
|
|
6
|
-
export type OnDrag = Omit<FullGestureState<"drag">, "event"> & {
|
|
7
|
-
eventName: "onDrag";
|
|
8
|
-
slideActionType: SlideActionType;
|
|
9
|
-
};
|
|
10
|
-
type OnSlideStartChange = {
|
|
11
|
-
eventName: "onSlideStartChange";
|
|
12
|
-
slideDirection: SlideDirection;
|
|
13
|
-
sliceActionType: SlideActionType;
|
|
14
|
-
nextItem: {
|
|
15
|
-
index: number;
|
|
16
|
-
id: string;
|
|
17
|
-
startReached: boolean | undefined;
|
|
18
|
-
endReached: boolean | undefined;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
type OnSlideChangeComplete = {
|
|
22
|
-
eventName: "onSlideChangeComplete";
|
|
23
|
-
slideDirection: SlideDirection;
|
|
24
|
-
sliceActionType: SlideActionType;
|
|
25
|
-
currentItem: {
|
|
26
|
-
index: number;
|
|
27
|
-
id: string;
|
|
28
|
-
startReached: boolean | undefined;
|
|
29
|
-
endReached: boolean | undefined;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export type SpringCarouselEvents =
|
|
34
|
-
| OnSlideStartChange
|
|
35
|
-
| OnSlideChangeComplete
|
|
36
|
-
| OnDrag;
|
|
37
|
-
export type SpringCarouselEventsEventHandler = (
|
|
38
|
-
props: SpringCarouselEvents
|
|
39
|
-
) => void;
|