well-waterfall 1.1.3 → 1.1.4

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.
Files changed (30) hide show
  1. package/package.json +16 -13
  2. package/src/index.ts +0 -1
  3. package/src/modules/controller.ts +1 -1
  4. package/src/modules/thumbs.ts +1 -1
  5. package/src/types/globals.d.ts +15 -0
  6. package/src/util.ts +1 -1
  7. package/vite.config.ts +28 -0
  8. package/dist/index.js +0 -854
  9. package/dist/types/Waterfall/src/lib/attributes.d.ts +0 -3
  10. package/dist/types/Waterfall/src/modules/accessibility.d.ts +0 -2
  11. package/dist/types/Waterfall/src/modules/breakpoints.d.ts +0 -32
  12. package/dist/types/Waterfall/src/modules/controller.d.ts +0 -7
  13. package/dist/types/Waterfall/src/modules/effect.d.ts +0 -27
  14. package/dist/types/Waterfall/src/modules/general.d.ts +0 -94
  15. package/dist/types/Waterfall/src/modules/hashhistory.d.ts +0 -10
  16. package/dist/types/Waterfall/src/modules/input.d.ts +0 -16
  17. package/dist/types/Waterfall/src/modules/layout.d.ts +0 -4
  18. package/dist/types/Waterfall/src/modules/manipulation.d.ts +0 -1
  19. package/dist/types/Waterfall/src/modules/navigation.d.ts +0 -10
  20. package/dist/types/Waterfall/src/modules/pagination.d.ts +0 -26
  21. package/dist/types/Waterfall/src/modules/playback.d.ts +0 -17
  22. package/dist/types/Waterfall/src/modules/scrollbar.d.ts +0 -13
  23. package/dist/types/Waterfall/src/modules/slideCount.d.ts +0 -4
  24. package/dist/types/Waterfall/src/modules/thumbs.d.ts +0 -3
  25. package/dist/types/Waterfall/src/modules/zoom.d.ts +0 -9
  26. package/dist/types/Waterfall/src/util.d.ts +0 -10
  27. package/dist/types/Waterfall/src/waterfall.d.ts +0 -2
  28. package/dist/types/attributes.d.ts +0 -1
  29. package/src/types/waterfall.d.ts +0 -12
  30. package/src/types/webpack-env.d.ts +0 -1
package/package.json CHANGED
@@ -1,35 +1,38 @@
1
1
  {
2
2
  "name": "well-waterfall",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "An attribute-based wrapper of SwiperJS for Webflow",
5
- "main": "dist/index.js",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/globals.d.ts"
13
+ }
14
+ },
6
15
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "build": "webpack --config webpack.config.js",
16
+ "dev": "vite",
17
+ "build": "vite build",
9
18
  "tsc": "tsc --noEmit"
10
19
  },
11
20
  "keywords": [],
12
21
  "author": "kevingerstner",
13
22
  "license": "ISC",
14
23
  "dependencies": {
15
- "css-loader": "^7.1.2",
16
- "fs": "^0.0.1-security",
17
- "style-loader": "^4.0.0",
18
- "swiper": "^11.2.10",
19
- "webpack": "^5.95.0"
24
+ "swiper": "^11.2.10"
20
25
  },
21
26
  "devDependencies": {
22
- "@types/jquery": "^3.5.32",
23
27
  "@types/node": "^22.10.5",
24
- "@types/webpack": "^5.28.5",
25
28
  "@typescript-eslint/eslint-plugin": "^8.26.1",
26
29
  "@typescript-eslint/parser": "^8.26.1",
30
+ "@vitejs/plugin-react": "^5.0.0",
27
31
  "eslint": "^9.22.0",
28
32
  "eslint-config-prettier": "^9.1.0",
29
33
  "eslint-plugin-prettier": "^5.2.1",
30
34
  "prettier": "^3.4.2",
31
- "ts-loader": "^9.5.1",
32
35
  "typescript": "^5.7.3",
33
- "webpack-cli": "^5.1.4"
36
+ "vite": "^7.1.2"
34
37
  }
35
38
  }
package/src/index.ts CHANGED
@@ -2,7 +2,6 @@ import Swiper from "swiper/bundle";
2
2
  import "swiper/css/bundle";
3
3
 
4
4
  import { SwiperOptions } from "swiper/types";
5
- import { Waterfall } from "./types/waterfall";
6
5
 
7
6
  import { removeNullOrUndefinedKeys, parseString, parseBoolean } from "./util";
8
7
  import { navigationConfig } from "./modules/navigation";
@@ -1,4 +1,4 @@
1
- import { Waterfall } from "types/waterfall";
1
+ import { Waterfall } from "waterfall";
2
2
  import { getSwipersByName, parseBoolean, parseString } from "../util";
3
3
  import Swiper from "swiper";
4
4
  import { ATTR_CONTROLLER, ATTR_CONTROLLER_BY, ATTR_CONTROLLER_INVERSE } from "../lib/attributes";
@@ -1,6 +1,6 @@
1
1
  import { ThumbsOptions } from "swiper/types";
2
2
  import { parseBoolean, parseNumber, parseString } from "../util";
3
- import { Waterfall } from "types/waterfall";
3
+ import { Waterfall } from "waterfall";
4
4
  import {
5
5
  ATTR_THUMBS,
6
6
  ATTR_THUMBS_AUTO_SCROLL_OFFSET,
@@ -0,0 +1,15 @@
1
+ import Swiper from "swiper";
2
+ import type pkg from "../../package.json";
3
+
4
+ declare global {
5
+ interface Waterfall {
6
+ name: string;
7
+ swiper: Swiper;
8
+ }
9
+ interface Window {
10
+ waterfalls: Waterfall[];
11
+ }
12
+ const APP_VERSION: typeof pkg.version;
13
+ }
14
+
15
+ export {};
package/src/util.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Swiper from "swiper";
2
- import { Waterfall } from "types/waterfall";
2
+ import { Waterfall } from "waterfall";
3
3
 
4
4
  export function printDebug(debug: boolean, str: string, el: any) {
5
5
  if (!debug) return;
package/vite.config.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
+ import path from "path";
4
+ import pkg from "./package.json";
5
+
6
+ export default defineConfig({
7
+ build: {
8
+ outDir: "dist",
9
+ lib: {
10
+ entry: path.resolve(__dirname, "src/index.ts"),
11
+ name: "Waterfall",
12
+ formats: ["es"],
13
+ fileName: "index",
14
+ },
15
+ sourcemap: true,
16
+ },
17
+ plugins: [react()],
18
+ resolve: {
19
+ alias: {
20
+ "@": path.resolve(__dirname, "./src"), // adjust to your src folder
21
+ lib: path.resolve(__dirname, "src/lib"),
22
+ },
23
+ extensions: [".js", ".ts", ".json"],
24
+ },
25
+ define: {
26
+ APP_VERSION: JSON.stringify(pkg.version),
27
+ },
28
+ });