@tencentcloud/chat-uikit-react 3.4.2 → 3.4.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.
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@tencentcloud/chat-uikit-react",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "type": "module",
5
+ "main": "dist/index.js",
5
6
  "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
6
8
  "exports": {
7
9
  ".": {
10
+ "types": "./dist/index.d.ts",
8
11
  "import": "./dist/index.js"
9
12
  }
10
13
  },
@@ -40,7 +43,7 @@
40
43
  },
41
44
  "dependencies": {
42
45
  "@mui/base": "5.0.0-beta.66",
43
- "tuikit-atomicx-react": "3.4.2",
46
+ "tuikit-atomicx-react": "3.4.4",
44
47
  "classnames": "^2.5.1",
45
48
  "react-transition-group": "^4.4.5",
46
49
  "zustand": "^5.0.0"
@@ -1,117 +0,0 @@
1
- #!/bin/bash
2
-
3
- # 定义颜色代码
4
- GREEN="\033[32m"
5
- NC="\033[0m" # No Color
6
-
7
- # 更通用的格式化输出函数
8
- print_msg() {
9
- local message=$1
10
- local value=$2
11
- echo -e "${GREEN}>>>${NC} ${message} ${GREEN}${value}${NC}"
12
- }
13
-
14
- # demo 使用通用函数
15
- print_msg "initial nvm node18"
16
- print_msg "initial dir" "`pwd`"
17
- print_msg "node version" "`node -v`"
18
- print_msg "npm version" "`npm -v`"
19
- print_msg "pnpm version" "`pnpm -v`"
20
-
21
- # -------------------------------------------------------------
22
- # | 重写 pnpm-workspace.yaml
23
- # | 1. 要求当前处于 chat/packages/chat-uikit-react
24
- # | 2. 重写 pnpm-workspace.yaml 文件 仅安装 react 相关依赖
25
- # | 3. 安装 nvm 和 node18
26
- # | 4. pnpm install
27
- # | 5. 构建前置项目依赖
28
- # | 1. base/packages/eslint-config-hybrid
29
- # | 2. base/packages/uikit-base-component-react
30
- # -------------------------------------------------------------
31
-
32
- cd ../../
33
-
34
- # -------------------------------------------------------------
35
- # | 重写 pnpm-workspace.yaml 文件 仅安装 react 相关依赖
36
- # -------------------------------------------------------------
37
-
38
- cat > ./pnpm-workspace.yaml << 'EOF'
39
- packages:
40
- # hybrid common packages
41
- - '../base/packages/uikit-base-component-react'
42
- - '../base/packages/eslint-config-hybrid'
43
-
44
- # ui packages
45
- - 'packages/chat-uikit-react'
46
-
47
- # react demo packages
48
- - 'demos/react/*'
49
- EOF
50
-
51
- cd packages/chat-uikit-react
52
-
53
- # -------------------------------------------------------------
54
- # | 安装 nvm 和 node18
55
- # -------------------------------------------------------------
56
- # 检查是否已安装 nvm
57
- if [ -d "$HOME/.nvm" ]; then
58
- print_msg "nvm is already installed"
59
- else
60
- # 安装 nvm
61
- print_msg "nvm not installed, installing nvm..."
62
- wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
63
- fi
64
-
65
- # 添加 nvm 配置到 .bashrc(如果不存在)
66
- if ! grep -q "NVM_DIR" ~/.bashrc; then
67
- print_msg "Adding nvm configuration to .bashrc..."
68
- echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc
69
- echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
70
- fi
71
-
72
- # 重新加载 .bashrc
73
- source ~/.bashrc
74
-
75
- # 检查 nvm 命令是否存在
76
- if ! command -v nvm &> /dev/null; then
77
- print_msg "Error: nvm is not installed."
78
- exit 1
79
- fi
80
-
81
- # 安装 Node.js 18 并设置为默认版本
82
- print_msg "Installing Node.js 18..."
83
- nvm install 18
84
- nvm alias default 18
85
- nvm use 18
86
-
87
- # 验证安装
88
- print_msg "validating environment..."
89
- print_msg "Node.js version:" "`node -v`"
90
- print_msg "npm version:" "`npm -v`"
91
- print_msg "pnpm version:" "`pnpm -v`"
92
-
93
- # 检查 node 版本是否为 18.x
94
- node_version=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
95
- if [ "$node_version" != "18" ]; then
96
- print_msg ">>> Error: Required node version 18.x, but got $(node -v)"
97
- exit 1
98
- fi
99
-
100
- print_msg "Setup nvm and node18 environment completed successfully!"
101
-
102
-
103
- # -------------------------------------------------------------
104
- # | 安装依赖
105
- # -------------------------------------------------------------
106
-
107
- pnpm install
108
-
109
- # -------------------------------------------------------------
110
- # | 构建前置项目依赖
111
- # -------------------------------------------------------------
112
-
113
- cd ../../../base/packages/uikit-base-component-react
114
- pnpm run build
115
-
116
- cd ../../../chat/packages/chat-uikit-react
117
- pnpm run build