@chatsystem/client 1.1.14 → 1.1.16
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 +10 -1
- package/dist/index.js +21413 -22443
- package/dist/index.js.map +1 -0
- package/package.json +7 -6
- package/tsconfig.json +2 -9
- package/tsconfig.node.json +4 -6
- package/vite.config.ts +43 -9
- package/dist/.vite/manifest.json +0 -8
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatsystem/client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"pub": "tsc -b && npx vite build && npm publish"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@lottiefiles/dotlottie-react": "^0.15.0",
|
|
15
16
|
"joi": "^17.12.2",
|
|
16
17
|
"react-aria": "^3.32.1",
|
|
17
18
|
"react-intl": "^6.6.2",
|
|
18
19
|
"react-markdown": "^9.0.1",
|
|
19
20
|
"react-transition-group": "^4.4.5",
|
|
20
21
|
"rehype-raw": "^7.0.0",
|
|
21
|
-
"vite-plugin-css-injected-by-js": "^3.
|
|
22
|
+
"vite-plugin-css-injected-by-js": "^3.5.2"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/node": "^20.11.20",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"@types/react-transition-group": "^4.4.10",
|
|
28
29
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
29
30
|
"@typescript-eslint/parser": "^6.21.0",
|
|
30
|
-
"@vitejs/plugin-react-swc": "^
|
|
31
|
+
"@vitejs/plugin-react-swc": "^4.0.1",
|
|
31
32
|
"eslint": "^8.56.0",
|
|
32
33
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
33
34
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
@@ -35,9 +36,9 @@
|
|
|
35
36
|
"react-dom": "^18.2.0",
|
|
36
37
|
"tailwindcss": "^3.4.17",
|
|
37
38
|
"typescript": "^5.6.3",
|
|
38
|
-
"vite": "^
|
|
39
|
-
"vite-plugin-dts": "^4.
|
|
40
|
-
"vite-plugin-svgr": "^4.
|
|
39
|
+
"vite": "^7.1.3",
|
|
40
|
+
"vite-plugin-dts": "^4.5.4",
|
|
41
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"react": "^18.2.0",
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
2
|
"compilerOptions": {
|
|
4
3
|
"target": "ES2020",
|
|
5
4
|
"useDefineForClassFields": true,
|
|
@@ -8,25 +7,19 @@
|
|
|
8
7
|
"skipLibCheck": true,
|
|
9
8
|
"types": ["node"],
|
|
10
9
|
"noImplicitAny": false,
|
|
11
|
-
|
|
12
|
-
/* Bundler mode */
|
|
13
10
|
"moduleResolution": "bundler",
|
|
14
11
|
"allowImportingTsExtensions": true,
|
|
15
12
|
"resolveJsonModule": true,
|
|
16
13
|
"isolatedModules": true,
|
|
17
14
|
"noEmit": true,
|
|
18
15
|
"jsx": "react-jsx",
|
|
19
|
-
|
|
20
|
-
/* Linting */
|
|
21
16
|
"strict": true,
|
|
22
17
|
"noUnusedLocals": true,
|
|
23
18
|
"noUnusedParameters": true,
|
|
24
19
|
"noFallthroughCasesInSwitch": true,
|
|
25
|
-
"paths": {
|
|
26
|
-
"@/*" : ["./src/*"]
|
|
27
|
-
}
|
|
20
|
+
"paths": { "@/*": ["./src/*"] }
|
|
28
21
|
},
|
|
29
|
-
"include": ["./src"
|
|
22
|
+
"include": ["./src"],
|
|
30
23
|
"exclude": ["node_modules"],
|
|
31
24
|
"references": [{ "path": "./tsconfig.node.json" }]
|
|
32
25
|
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"composite": true,
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"allowSyntheticDefaultImports": true,
|
|
4
|
+
"module": "nodenext",
|
|
5
|
+
"moduleResolution": "nodenext",
|
|
6
|
+
"types": ["node"],
|
|
8
7
|
"strict": true
|
|
9
8
|
},
|
|
10
|
-
|
|
11
|
-
"include": ["vite.config.ts"]
|
|
9
|
+
"include": ["vite.config.ts", "tailwind.config.ts", "vitest.config.ts"]
|
|
12
10
|
}
|
package/vite.config.ts
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
1
|
+
// vite.config.ts
|
|
1
2
|
import { defineConfig } from "vite";
|
|
2
3
|
import react from "@vitejs/plugin-react-swc";
|
|
3
4
|
import path from "path";
|
|
4
5
|
import dts from "vite-plugin-dts";
|
|
5
6
|
import svgr from "vite-plugin-svgr";
|
|
6
|
-
// Takes all css file and add it into js to get one single file
|
|
7
7
|
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
|
8
8
|
|
|
9
|
-
// https://vitejs.dev/config/
|
|
10
9
|
export default defineConfig({
|
|
11
10
|
plugins: [
|
|
12
11
|
react(),
|
|
13
12
|
svgr(),
|
|
14
13
|
cssInjectedByJsPlugin(),
|
|
15
14
|
dts({
|
|
15
|
+
// good defaults for packages
|
|
16
|
+
insertTypesEntry: true,
|
|
16
17
|
rollupTypes: true,
|
|
17
18
|
}),
|
|
19
|
+
{
|
|
20
|
+
name: "debug-lottie-emit",
|
|
21
|
+
generateBundle(_, bundle) {
|
|
22
|
+
for (const [fileName, chunk] of Object.entries(bundle)) {
|
|
23
|
+
if (chunk.type === "asset" && fileName.endsWith(".lottie")) {
|
|
24
|
+
console.log(`[lottie] emitted -> ${fileName}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
},
|
|
18
29
|
],
|
|
30
|
+
|
|
31
|
+
// allow importing .lottie as assets (you already import with ?url)
|
|
32
|
+
assetsInclude: ["**/*.lottie"],
|
|
33
|
+
|
|
19
34
|
resolve: {
|
|
20
35
|
alias: {
|
|
21
36
|
"@": path.resolve(__dirname, "./src"),
|
|
@@ -23,18 +38,37 @@ export default defineConfig({
|
|
|
23
38
|
},
|
|
24
39
|
|
|
25
40
|
build: {
|
|
26
|
-
|
|
27
|
-
minify: true,
|
|
28
|
-
reportCompressedSize: true,
|
|
41
|
+
// Build the PACKAGE from the barrel (not main.tsx)
|
|
29
42
|
lib: {
|
|
30
|
-
entry: path.resolve(__dirname, "src/
|
|
31
|
-
fileName: "index",
|
|
43
|
+
entry: path.resolve(__dirname, "src/index.ts"),
|
|
32
44
|
name: "bubbleChat",
|
|
33
|
-
|
|
45
|
+
// file name for each format
|
|
46
|
+
fileName: (format) =>
|
|
47
|
+
format === "es" ? "index.js" : `index.${format}.js`,
|
|
48
|
+
formats: ["es"], // add "iife" below if you also want a <script> build
|
|
34
49
|
},
|
|
50
|
+
emitAssets: true,
|
|
51
|
+
sourcemap: true,
|
|
52
|
+
minify: true,
|
|
53
|
+
reportCompressedSize: true,
|
|
54
|
+
manifest: false, // usually not needed for a package
|
|
55
|
+
assetsInlineLimit: 0,
|
|
56
|
+
|
|
35
57
|
rollupOptions: {
|
|
58
|
+
// keep React external for npm packages
|
|
36
59
|
external: ["react", "react-dom"],
|
|
37
|
-
|
|
60
|
+
output: {
|
|
61
|
+
// place emitted assets; .lottie in its own folder
|
|
62
|
+
assetFileNames: (info) =>
|
|
63
|
+
info.name?.endsWith(".lottie")
|
|
64
|
+
? "assets/lottie/[name].[hash][extname]"
|
|
65
|
+
: "assets/[name].[hash][extname]",
|
|
66
|
+
// used only if you also build iife/umd
|
|
67
|
+
globals: {
|
|
68
|
+
react: "React",
|
|
69
|
+
"react-dom": "ReactDOM",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
38
72
|
},
|
|
39
73
|
},
|
|
40
74
|
});
|
package/dist/.vite/manifest.json
DELETED
package/vite.config.d.ts
DELETED
package/vite.config.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import react from "@vitejs/plugin-react-swc";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import dts from "vite-plugin-dts";
|
|
5
|
-
import svgr from "vite-plugin-svgr";
|
|
6
|
-
// Takes all css file and add it into js to get one single file
|
|
7
|
-
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
|
|
8
|
-
// https://vitejs.dev/config/
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
plugins: [
|
|
11
|
-
react(),
|
|
12
|
-
svgr(),
|
|
13
|
-
cssInjectedByJsPlugin(),
|
|
14
|
-
dts({
|
|
15
|
-
rollupTypes: true,
|
|
16
|
-
}),
|
|
17
|
-
],
|
|
18
|
-
resolve: {
|
|
19
|
-
alias: {
|
|
20
|
-
"@": path.resolve(__dirname, "./src"),
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
build: {
|
|
24
|
-
manifest: true,
|
|
25
|
-
minify: true,
|
|
26
|
-
reportCompressedSize: true,
|
|
27
|
-
lib: {
|
|
28
|
-
entry: path.resolve(__dirname, "src/main.tsx"),
|
|
29
|
-
fileName: "index",
|
|
30
|
-
name: "bubbleChat",
|
|
31
|
-
formats: ["es"],
|
|
32
|
-
},
|
|
33
|
-
rollupOptions: {
|
|
34
|
-
external: ["react", "react-dom"],
|
|
35
|
-
plugins: [],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|