yt-chat-components 1.1.2 → 1.1.3
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/.idea/modules.xml +1 -1
- package/.idea/sonarlint/issuestore/3/6/364385cedcce4c06de1901392ffeeac0caef0f3c +0 -0
- package/.idea/sonarlint/issuestore/3/9/39129446b425a1d640160c068e4194e96639eedf +0 -0
- package/.idea/sonarlint/issuestore/4/a/4a2f33951ce07c1ff7184f91877aa13db05d3785 +0 -0
- package/.idea/sonarlint/issuestore/4/a/4a7b99bdbee5792679d347b6474463bf5e14b66d +0 -0
- package/.idea/sonarlint/issuestore/4/b/4b015aa5428c4d4c3d672893ec23f5fe3969f9be +0 -0
- package/.idea/sonarlint/issuestore/4/b/4b6989b8ccae808ebc45d02230d336ea53800365 +0 -0
- package/.idea/sonarlint/issuestore/6/1/61ebb9fd6e8cf9082658121d5d81e297791dacd0 +0 -0
- package/.idea/sonarlint/issuestore/6/c/6c024c1d0ad64656b9d4b0695ec3c49c0454addf +0 -0
- package/.idea/sonarlint/issuestore/6/e/6e75fc1c07c3a427a86fc213ca9479caaaff00ea +0 -0
- package/.idea/sonarlint/issuestore/8/d/8d6123af13a140f93e06299fff7ea23c547e9ec8 +0 -0
- package/.idea/sonarlint/issuestore/c/c/cc2352788140b6778ac06df4b33f50b390d2d8be +0 -0
- package/.idea/sonarlint/issuestore/d/5/d5595158cc48f9bf3e51b06f6e6805a8fd2d6262 +0 -0
- package/.idea/sonarlint/issuestore/d/7/d747cbed4201192dfa83a1a51345b020a050b647 +0 -0
- package/.idea/sonarlint/issuestore/d/9/d938938695d447dadda115e28781c6541f53fc4f +0 -0
- package/.idea/sonarlint/issuestore/index.pb +31 -3
- package/build/static/js/bundle.min.js +2 -0
- package/build/static/js/bundle.min.js.LICENSE.txt +132 -0
- package/package.json +79 -78
- package/public/index.html +108 -108
- package/src/YtChatView/chatWidget/chatWindow/chatMessage/index.tsx +498 -464
- package/src/YtChatView/chatWidget/chatWindow/controllers/index.ts +249 -249
- package/src/YtChatView/chatWidget/chatWindow/index.module.css +196 -196
- package/src/YtChatView/chatWidget/chatWindow/index.tsx +1099 -1086
- package/src/YtChatView/chatWidget/chatWindow/types/chatWidget/index.ts +50 -50
- package/src/YtChatView/chatWidget/index.tsx +2593 -2591
- package/src/YtChatView/logoBtn/index.css +3 -3
- package/src/YtChatView/logoBtn/index.jsx +103 -103
- package/src/YtChatView/logoSplitBtn/index.css +3 -3
- package/src/YtChatView/logoSplitBtn/index.jsx +105 -105
- package/src/YtChatView/mobileChat/index.jsx +945 -945
- package/src/YtChatView/mobileChat/index.module.css +253 -253
- package/src/YtChatView/previewDialog/index.jsx +600 -600
- package/src/YtChatView/previewDialog/index.module.css +253 -253
- package/src/chatWidget/chatWindow/index.tsx +426 -426
- package/src/chatWidget/index.tsx +2193 -2193
- package/src/index.tsx +10 -10
- package/webpack.config.js +50 -50
- package/dist/build/static/js/bundle.min.js +0 -1
- /package/.idea/{langflow-embedded-chat-clone.iml → langflow-embedded-chat.iml} +0 -0
- /package/.idea/sonarlint/issuestore/{7/0/7030d0b2f71b999ff89a343de08c414af32fc93a → 0/f/0f8c0c92cf798431ebb931ff6e997b1af86ecee5} +0 -0
- /package/.idea/sonarlint/issuestore/{9/c/9cfff9a6d27bd6c255aa751213163c7901fb8ce7 → 2/7/27e69cb561aeea20c1afbdd32d260dd60b89a81b} +0 -0
package/src/index.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import LogoBtn from './YtChatView/logoBtn/index';
|
|
4
|
-
import ToolDialog from "./YtChatView/previewDialog/index";
|
|
5
|
-
import LogoSplitBtn from "./YtChatView/logoSplitBtn/index";
|
|
6
|
-
import MobileChatPage from "./YtChatView/mobileChat";
|
|
7
|
-
|
|
8
|
-
// 手动注入 React 和 ReactDOM 到全局
|
|
9
|
-
window.React = React;
|
|
10
|
-
window.ReactDOM = ReactDOM;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import LogoBtn from './YtChatView/logoBtn/index';
|
|
4
|
+
import ToolDialog from "./YtChatView/previewDialog/index";
|
|
5
|
+
import LogoSplitBtn from "./YtChatView/logoSplitBtn/index";
|
|
6
|
+
import MobileChatPage from "./YtChatView/mobileChat";
|
|
7
|
+
|
|
8
|
+
// 手动注入 React 和 ReactDOM 到全局
|
|
9
|
+
window.React = React;
|
|
10
|
+
window.ReactDOM = ReactDOM;
|
|
11
11
|
export {ToolDialog, LogoSplitBtn, LogoBtn, MobileChatPage}
|
package/webpack.config.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
mode: "production",
|
|
5
|
-
entry: "./src/index.tsx",
|
|
6
|
-
output: {
|
|
7
|
-
filename: "bundle.min.js",
|
|
8
|
-
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
-
libraryTarget: "umd",
|
|
10
|
-
globalObject: "this",
|
|
11
|
-
library: "YtChatComponents", // 可选,定义全局命名空间
|
|
12
|
-
},
|
|
13
|
-
module: {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.(jsx|js|tsx|ts)$/,
|
|
17
|
-
exclude: /node_modules/,
|
|
18
|
-
use: {
|
|
19
|
-
loader: "babel-loader",
|
|
20
|
-
options: {
|
|
21
|
-
presets: [
|
|
22
|
-
"@babel/preset-env",
|
|
23
|
-
"@babel/preset-react",
|
|
24
|
-
"@babel/preset-typescript",
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
test: /\.css$/,
|
|
31
|
-
use: ["style-loader", "css-loader"],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
test: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
35
|
-
use: {
|
|
36
|
-
loader: "url-loader",
|
|
37
|
-
options: {
|
|
38
|
-
limit: 1000000,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
resolve: {
|
|
45
|
-
extensions: [".jsx", ".js", ".tsx", ".ts"],
|
|
46
|
-
},
|
|
47
|
-
optimization: {
|
|
48
|
-
minimize: true,
|
|
49
|
-
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
50
|
-
},
|
|
1
|
+
const path = require("path");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
mode: "production",
|
|
5
|
+
entry: "./src/index.tsx",
|
|
6
|
+
output: {
|
|
7
|
+
filename: "bundle.min.js",
|
|
8
|
+
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
+
libraryTarget: "umd",
|
|
10
|
+
globalObject: "this",
|
|
11
|
+
library: "YtChatComponents", // 可选,定义全局命名空间
|
|
12
|
+
},
|
|
13
|
+
module: {
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
test: /\.(jsx|js|tsx|ts)$/,
|
|
17
|
+
exclude: /node_modules/,
|
|
18
|
+
use: {
|
|
19
|
+
loader: "babel-loader",
|
|
20
|
+
options: {
|
|
21
|
+
presets: [
|
|
22
|
+
"@babel/preset-env",
|
|
23
|
+
"@babel/preset-react",
|
|
24
|
+
"@babel/preset-typescript",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
test: /\.css$/,
|
|
31
|
+
use: ["style-loader", "css-loader"],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
test: /\.(png|jpg|jpeg|gif|svg)$/,
|
|
35
|
+
use: {
|
|
36
|
+
loader: "url-loader",
|
|
37
|
+
options: {
|
|
38
|
+
limit: 1000000,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
resolve: {
|
|
45
|
+
extensions: [".jsx", ".js", ".tsx", ".ts"],
|
|
46
|
+
},
|
|
47
|
+
optimization: {
|
|
48
|
+
minimize: true,
|
|
49
|
+
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
50
|
+
},
|
|
51
51
|
};
|