@saasquatch/squatch-js 2.7.0-2 → 2.7.0-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 (47) hide show
  1. package/{dist copy/api/AnalyticsApi.d.ts → dist/api/AnalyticsApi.d.ts} +1 -1
  2. package/{dist copy/api/EventsApi.d.ts → dist/api/EventsApi.d.ts} +1 -1
  3. package/{dist copy/api/WidgetApi.d.ts → dist/api/WidgetApi.d.ts} +1 -1
  4. package/{dist copy/async.d.ts → dist/async.d.ts} +1 -1
  5. package/dist/squatch.cjs.js +2120 -7
  6. package/dist/squatch.cjs.js.map +1 -0
  7. package/{dist copy/squatch.d.ts → dist/squatch.d.ts} +9 -9
  8. package/dist/squatch.esm.js +2161 -0
  9. package/dist/squatch.esm.js.map +1 -0
  10. package/dist/squatch.js +2126 -9
  11. package/dist/squatch.js.map +1 -0
  12. package/dist/squatch.min.js +6 -0
  13. package/{dist copy/types.d.ts → dist/types.d.ts} +1 -1
  14. package/{dist copy/utils/decodeUserJwt.d.ts → dist/utils/decodeUserJwt.d.ts} +1 -1
  15. package/{dist copy/utils/io.d.ts → dist/utils/io.d.ts} +1 -1
  16. package/{dist copy/utils/utmUtils.d.ts → dist/utils/utmUtils.d.ts} +1 -1
  17. package/{dist copy/utils/validate.d.ts → dist/utils/validate.d.ts} +1 -1
  18. package/{dist copy/widgets/EmbedWidget.d.ts → dist/widgets/EmbedWidget.d.ts} +1 -1
  19. package/{dist copy/widgets/PopupWidget.d.ts → dist/widgets/PopupWidget.d.ts} +1 -1
  20. package/{dist copy/widgets/Widget.d.ts → dist/widgets/Widget.d.ts} +3 -3
  21. package/{dist copy/widgets/Widgets.d.ts → dist/widgets/Widgets.d.ts} +2 -2
  22. package/{dist copy/widgets/declarative/DeclarativeWidget.d.ts → dist/widgets/declarative/DeclarativeWidget.d.ts} +5 -5
  23. package/{dist copy/widgets/declarative/DeclarativeWidgets.d.ts → dist/widgets/declarative/DeclarativeWidgets.d.ts} +1 -1
  24. package/package.json +9 -8
  25. package/vite.config.ts +19 -4
  26. package/coverage/clover.xml +0 -917
  27. package/coverage/coverage-final.json +0 -21
  28. package/coverage/lcov-report/base.css +0 -224
  29. package/coverage/lcov-report/block-navigation.js +0 -87
  30. package/coverage/lcov-report/favicon.png +0 -0
  31. package/coverage/lcov-report/prettify.css +0 -1
  32. package/coverage/lcov-report/prettify.js +0 -2
  33. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  34. package/coverage/lcov-report/sorter.js +0 -196
  35. package/coverage/lcov.info +0 -1669
  36. package/dist/squatch.es.js +0 -1622
  37. package/dist copy/squatch.cjs.js +0 -48
  38. package/dist copy/squatch.es.js +0 -1622
  39. package/dist copy/squatch.esm.js +0 -2317
  40. package/dist copy/squatch.esm.js.map +0 -1
  41. package/dist copy/squatch.js +0 -2337
  42. package/dist copy/squatch.js.map +0 -1
  43. /package/{dist copy → dist}/api/graphql.d.ts +0 -0
  44. /package/{dist copy → dist}/docs.d.ts +0 -0
  45. /package/{dist copy → dist}/globals.d.ts +0 -0
  46. /package/{dist copy → dist}/utils/cookieUtils.d.ts +0 -0
  47. /package/{dist copy → dist}/utils/domready.d.ts +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saasquatch/squatch-js",
3
3
  "type": "module",
4
- "version": "2.7.0-2",
4
+ "version": "2.7.0-4",
5
5
  "description": "The official Referral SaaSquatch Javascript Web/Browser SDK https://docs.referralsaasquatch.com/developer/squatchjs/",
6
6
  "license": "MIT",
7
7
  "author": "ReferralSaaSquatch.com, Inc.",
@@ -28,7 +28,8 @@
28
28
  "sideEffects": false,
29
29
  "scripts": {
30
30
  "build:es": "vite build",
31
- "build": "run-s build:es build:docs",
31
+ "minify:umd": "terser dist/squatch.js -o dist/squatch.min.js",
32
+ "build": "run-s build:es minify:umd build:docs",
32
33
  "watch": "vite serve",
33
34
  "declaration": "tsc --emitDeclarationOnly",
34
35
  "test:browser": "cucumber-js",
@@ -95,22 +96,22 @@
95
96
  "react-url-query": "^1.5.0",
96
97
  "serve": "^11.3.0",
97
98
  "size-limit": "^8.2.4",
99
+ "terser": "^5.39.1",
98
100
  "ts-jest": "^29.1.1",
99
101
  "ts-loader": "^7.0.4",
100
102
  "ts-node": "^8.10.2",
101
103
  "tsd": "^0.13.1",
102
104
  "typedoc": "^0.24.8",
103
105
  "typescript": "^5.1.6",
104
- "webpack-bundle-analyzer": "^4.9.0",
105
- "webpack-cli": "^6.0.1",
106
- "webpack-visualizer-plugin": "^0.1.11"
106
+ "vite": "^6.2.4",
107
+ "vite-bundle-analyzer": "^0.18.1",
108
+ "vite-plugin-dts": "^4.5.3",
109
+ "vite-tsconfig-paths": "^5.1.4"
107
110
  },
108
111
  "prettier": {},
109
112
  "dependencies": {
110
113
  "debug": "^3.2.6",
111
- "js-cookie": "^3.0.5",
112
- "vite": "^6.0.11",
113
- "vite-tsconfig-paths": "^5.1.4"
114
+ "js-cookie": "^3.0.5"
114
115
  },
115
116
  "browserslist": "> 0.25%, not dead",
116
117
  "msw": {
package/vite.config.ts CHANGED
@@ -1,9 +1,16 @@
1
1
  import { resolve } from "path";
2
2
  import { defineConfig } from "vite";
3
3
  import tsconfigPaths from "vite-tsconfig-paths";
4
+ import dts from "vite-plugin-dts";
4
5
 
5
6
  export default defineConfig({
6
- plugins: [tsconfigPaths()],
7
+ plugins: [
8
+ tsconfigPaths(),
9
+ dts({
10
+ outDir: "dist",
11
+ tsconfigPath: "./tsconfig.json",
12
+ }),
13
+ ],
7
14
  server: {
8
15
  port: 3000,
9
16
  },
@@ -11,17 +18,25 @@ export default defineConfig({
11
18
  lib: {
12
19
  formats: ["es", "cjs", "umd"],
13
20
  entry: resolve(__dirname, "src/squatch.ts"),
14
- fileName: (format) =>
15
- format === "umd" ? "squatch.js" : `squatch.${format}.js`,
21
+ fileName: (format) => {
22
+ if (format === "es") {
23
+ return "squatch.esm.js";
24
+ } else if (format === "umd") {
25
+ return "squatch.js";
26
+ } else {
27
+ return `squatch.${format}.js`;
28
+ }
29
+ },
16
30
  name: "squatch",
17
31
  },
18
32
  outDir: resolve(__dirname, "dist"),
19
- minify: true,
33
+ minify: false,
20
34
  rollupOptions: {
21
35
  output: {
22
36
  amd: { define: "false" },
23
37
  format: "umd",
24
38
  },
25
39
  },
40
+ sourcemap: true,
26
41
  },
27
42
  });