@doubao-dev/plugin-app-dev 0.0.0-stage → 0.0.40-canary-dea0ddc73-20261026073950

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 (107) hide show
  1. package/README.md +10 -2
  2. package/dist/147.js +9 -0
  3. package/dist/assets.d.ts +5 -0
  4. package/dist/assets.js +4 -0
  5. package/dist/index.d.ts +43 -0
  6. package/dist/index.js +1378 -0
  7. package/dist/plugin.d.ts +102 -0
  8. package/dist/plugin.js +4995 -0
  9. package/dist/preview.js +16 -0
  10. package/dist/rslib-runtime.js +33 -0
  11. package/dist/skills/doubao-plugin-app/SKILL.md +21 -0
  12. package/dist/skills/doubao-plugin-app/references/app-development.md +85 -0
  13. package/dist/skills/doubao-plugin-app/references/frontend/components/container-overlay.md +131 -0
  14. package/dist/skills/doubao-plugin-app/references/frontend/components/form-controls.md +146 -0
  15. package/dist/skills/doubao-plugin-app/references/frontend/components/interactive-controls.md +120 -0
  16. package/dist/skills/doubao-plugin-app/references/frontend/components/map-canvas.md +107 -0
  17. package/dist/skills/doubao-plugin-app/references/frontend/components/overview.md +43 -0
  18. package/dist/skills/doubao-plugin-app/references/frontend/components/scroll-list.md +149 -0
  19. package/dist/skills/doubao-plugin-app/references/frontend/components/text-media.md +209 -0
  20. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/01-/345/237/272/347/241/200.md +1389 -0
  21. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/02-/347/263/273/347/273/237.md +1376 -0
  22. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/03-/350/207/252/345/256/232/344/271/211/351/200/232/344/277/241.md +127 -0
  23. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/04-/345/256/232/344/275/215.md +784 -0
  24. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/05-/345/255/230/345/202/250.md +1176 -0
  25. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/06-/350/267/257/347/224/261.md +839 -0
  26. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/07-/347/225/214/351/235/242.md +376 -0
  27. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/08-/344/272/244/344/272/222.md +1319 -0
  28. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/09-/350/276/223/345/205/245.md +192 -0
  29. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/10-/347/275/221/347/273/234.md +900 -0
  30. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/11-/345/252/222/344/275/223.md +1496 -0
  31. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/12-/344/270/232/345/212/241/350/203/275/345/212/233.md +1281 -0
  32. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/13-/347/231/273/345/275/225.md +511 -0
  33. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/14-/346/224/257/344/273/230.md +943 -0
  34. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/15-/346/225/260/346/215/256/345/210/206/346/236/220.md +124 -0
  35. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/16-/350/223/235/347/211/231.md +3364 -0
  36. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/17-wi-fi.md +1028 -0
  37. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/18-/345/212/240/351/200/237/345/272/246/350/256/241.md +354 -0
  38. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/19-ibeacon.md +508 -0
  39. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/20-/347/275/227/347/233/230.md +320 -0
  40. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/21-/350/256/276/345/244/207/346/226/271/345/220/221.md +351 -0
  41. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/22-/351/231/200/350/236/272/344/273/252.md +354 -0
  42. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/23-/345/252/222/344/275/223-/350/256/276/345/244/207-/347/275/221/347/273/234.md +264 -0
  43. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/24-/347/237/255/344/277/241.md +155 -0
  44. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/25-/346/227/240/351/232/234/347/242/215.md +144 -0
  45. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/26-/345/237/272/347/241/200/344/277/241/346/201/257.md +238 -0
  46. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/27-/347/224/265/346/261/240.md +235 -0
  47. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/28-/345/211/252/350/264/264/346/235/277.md +303 -0
  48. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/29-/345/212/240/345/257/206.md +126 -0
  49. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/30-/346/227/245/345/216/206.md +417 -0
  50. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/31-/347/224/265/350/257/235.md +144 -0
  51. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/32-/346/211/253/347/240/201.md +236 -0
  52. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/33-/345/261/217/345/271/225.md +747 -0
  53. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/34-/351/234/207/345/212/250.md +277 -0
  54. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/35-/346/226/207/344/273/266/347/263/273/347/273/237.md +431 -0
  55. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/common-errors.md +69 -0
  56. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/groups.md +43 -0
  57. package/dist/skills/doubao-plugin-app/references/frontend/doubao-agentic-service-api/quick-reference.md +436 -0
  58. package/dist/skills/doubao-plugin-app/references/frontend/examples/common-patterns.md +590 -0
  59. package/dist/skills/doubao-plugin-app/references/frontend/examples/doubao-agentic-service-api-recipes.md +209 -0
  60. package/dist/skills/doubao-plugin-app/references/frontend/examples/page-widget-basics.md +368 -0
  61. package/dist/skills/doubao-plugin-app/references/frontend/examples/page-widget-recipes.md +65 -0
  62. package/dist/skills/doubao-plugin-app/references/frontend/framework/core.md +283 -0
  63. package/dist/skills/doubao-plugin-app/references/frontend/guides/auth.md +277 -0
  64. package/dist/skills/doubao-plugin-app/references/frontend/guides/best-practices.md +574 -0
  65. package/dist/skills/doubao-plugin-app/references/frontend/guides/client-tools-and-events.md +209 -0
  66. package/dist/skills/doubao-plugin-app/references/frontend/guides/component-development.md +832 -0
  67. package/dist/skills/doubao-plugin-app/references/frontend/guides/debugger-mcp.md +537 -0
  68. package/dist/skills/doubao-plugin-app/references/frontend/guides/expired-widget.md +101 -0
  69. package/dist/skills/doubao-plugin-app/references/frontend/guides/performance-optimization.md +417 -0
  70. package/dist/skills/doubao-plugin-app/references/frontend/guides/troubleshooting.md +278 -0
  71. package/dist/skills/doubao-plugin-app/references/frontend/lynx/best-practices.md +720 -0
  72. package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/pseudo-classes.md +149 -0
  73. package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/selectors.md +224 -0
  74. package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/supported-properties.md +269 -0
  75. package/dist/skills/doubao-plugin-app/references/frontend/lynx/css/values-and-units.md +314 -0
  76. package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/flex-layout.md +334 -0
  77. package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/grid-layout.md +408 -0
  78. package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/linear-layout.md +355 -0
  79. package/dist/skills/doubao-plugin-app/references/frontend/lynx/layout/relative-layout.md +189 -0
  80. package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/css-differences.md +737 -0
  81. package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/migration-guide.md +669 -0
  82. package/dist/skills/doubao-plugin-app/references/frontend/lynx/lynx-vs-web/unsupported-features.md +290 -0
  83. package/dist/skills/doubao-plugin-app/references/frontend/lynx/overview.md +60 -0
  84. package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/animation.md +243 -0
  85. package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/responsive.md +194 -0
  86. package/dist/skills/doubao-plugin-app/references/frontend/lynx/patterns/theming.md +143 -0
  87. package/dist/skills/doubao-plugin-app/references/frontend/lynx/quick-reference.md +229 -0
  88. package/dist/skills/doubao-plugin-app/references/frontend/rules/dos-and-donts.md +479 -0
  89. package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/design-boundary.md +46 -0
  90. package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/overview.md +118 -0
  91. package/dist/skills/doubao-plugin-app/references/frontend/widget-templates/props.md +301 -0
  92. package/dist/skills/doubao-plugin-app/references/mcp-and-cards.md +38 -0
  93. package/dist/templates/README.md.template +11 -0
  94. package/dist/templates/com.doubao/app/manifest.yaml +41 -0
  95. package/dist/templates/com.doubao/app/package.json.template +13 -0
  96. package/dist/templates/com.doubao/app/src/app.config.ts.template +5 -0
  97. package/dist/templates/com.doubao/app/src/app.ts.template +3 -0
  98. package/dist/templates/com.doubao/app/src/pages/home/index.css +14 -0
  99. package/dist/templates/com.doubao/app/src/pages/home/index.tsx.template +14 -0
  100. package/dist/templates/com.doubao/app/src/widgets/example/index.tsx.template +29 -0
  101. package/dist/templates/com.doubao/app/tsconfig.json +19 -0
  102. package/dist/templates/mcp.json +9 -0
  103. package/dist/templates/plugin.json.template +29 -0
  104. package/dist/templates/skills/example/SKILL.md.template +14 -0
  105. package/dist/upload.d.ts +44 -0
  106. package/dist/upload.js +38 -0
  107. package/package.json +60 -3
@@ -0,0 +1,376 @@
1
+ # 豆包应用插件的端能力 API: 界面
2
+
3
+ 对话框状态、Toast、Loading、Modal、ActionSheet、BottomSheet、返回前提醒、键盘和输入框能力。
4
+
5
+ [返回目录](./groups.md) | [返回速查](./quick-reference.md)
6
+
7
+ ## 速查
8
+
9
+ | API | 说明 |
10
+ | --- | --- |
11
+ | [getChatPanelInfo](#getchatpanelinfo) | 获取当前对话框状态快照。 调用不会改变对话框状态,也不会触发高度变化事件。 |
12
+ | [setChatPanelState](#setchatpanelstate) | 设置对话框展示状态。 |
13
+ | [onChatPanelHeightChanged](#onchatpanelheightchanged) | 监听对话框高度或展示状态变化。 注册后不会立即回调当前值。需要当前状态时,先调用 getChatPanelInfo。<br><br>返回取消监听函数。 |
14
+
15
+ ## API 详情
16
+
17
+ <a id="getchatpanelinfo"></a>
18
+ ### getChatPanelInfo()
19
+
20
+ ---
21
+ internal: true
22
+ ---
23
+
24
+ # getChatPanelInfo
25
+
26
+ 获取当前对话框状态快照。
27
+
28
+ 调用不会改变对话框状态,也不会触发高度变化事件。
29
+
30
+ ## 支持版本
31
+
32
+ 前端库版本不低于 `0.0.42`。
33
+
34
+ ## 支持平台
35
+
36
+ <table>
37
+ <thead>
38
+ <tr><th>平台</th><th>支持情况</th></tr>
39
+ </thead>
40
+ <tbody>
41
+ <tr><td>Android</td><td>支持</td></tr>
42
+ <tr><td>iOS</td><td>支持</td></tr>
43
+ <tr><td>PC</td><td>不支持</td></tr>
44
+ <tr><td>HarmonyOS</td><td>不支持</td></tr>
45
+ </tbody>
46
+ </table>
47
+
48
+ ## 支持场景
49
+
50
+ <table>
51
+ <thead>
52
+ <tr><th>场景</th><th>支持情况</th></tr>
53
+ </thead>
54
+ <tbody>
55
+ <tr><td>页面</td><td>支持</td></tr>
56
+ <tr><td>卡片</td><td>不支持</td></tr>
57
+ </tbody>
58
+ </table>
59
+
60
+ ## 接入准备
61
+
62
+ ### 前置条件
63
+
64
+ - 当前页面需在 app.config.ts 中声明 chat.enabled 为 true
65
+
66
+ ## 使用说明
67
+
68
+ - 调用只读取当前状态,不会改变对话框状态或触发高度变化事件。
69
+
70
+ ## 调用方式
71
+
72
+ ### 异步 API
73
+
74
+ ```typescript
75
+ getChatPanelInfo(params?: object): Promise<ChatPanelInfo>
76
+ ```
77
+
78
+ ## 入参
79
+
80
+ 无。
81
+
82
+ ## 调用示例
83
+
84
+ ```typescript
85
+ import { getChatPanelInfo } from '@doubao-dev/framework/api';
86
+
87
+ const { height, state } = await getChatPanelInfo();
88
+ console.log('current chat panel', { height, state });
89
+ ```
90
+
91
+ ## 成功返回
92
+
93
+ <table>
94
+ <thead>
95
+ <tr><th>名称</th><th>类型</th><th>必返</th><th>约束</th><th>说明</th></tr>
96
+ </thead>
97
+ <tbody>
98
+ <tr><td><code>height</code></td><td><code>number</code></td><td>是</td><td>大于等于 0;收起态高度也可能大于 0</td><td>对话框实际占用的垂直高度,单位为 px,包含被键盘抬高的区域,隐藏时为 0。</td></tr>
99
+ <tr><td><code>state</code></td><td><code>ChatPanelState</code></td><td>是</td><td>-</td><td>对话框当前展示状态。<br><br>- `preview` 表示从收起态发送消息后、收到回复前的中间态。<br>- `invisible` 表示对话框当前不可见。<br>- `floating` 表示对话框当前以悬浮形态展示。</td></tr>
100
+ </tbody>
101
+ </table>
102
+
103
+ ### 返回示例
104
+
105
+ ```json
106
+ {
107
+ "height": 336,
108
+ "state": "expanded"
109
+ }
110
+ ```
111
+
112
+ <a id="setchatpanelstate"></a>
113
+ ### setChatPanelState()
114
+
115
+ ---
116
+ internal: true
117
+ ---
118
+
119
+ # setChatPanelState
120
+
121
+ 设置对话框展示状态。
122
+
123
+ ## 支持版本
124
+
125
+ 前端库版本不低于 `0.5.0`。
126
+
127
+ ## 支持平台
128
+
129
+ <table>
130
+ <thead>
131
+ <tr><th>平台</th><th>支持情况</th></tr>
132
+ </thead>
133
+ <tbody>
134
+ <tr><td>Android</td><td>支持</td></tr>
135
+ <tr><td>iOS</td><td>支持</td></tr>
136
+ <tr><td>PC</td><td>不支持</td></tr>
137
+ <tr><td>HarmonyOS</td><td>不支持</td></tr>
138
+ </tbody>
139
+ </table>
140
+
141
+ ## 支持场景
142
+
143
+ <table>
144
+ <thead>
145
+ <tr><th>场景</th><th>支持情况</th></tr>
146
+ </thead>
147
+ <tbody>
148
+ <tr><td>页面</td><td>支持</td></tr>
149
+ <tr><td>卡片</td><td>不支持</td></tr>
150
+ </tbody>
151
+ </table>
152
+
153
+ ## 接入准备
154
+
155
+ ### 前置条件
156
+
157
+ - 当前页面需在 app.config.ts 中声明 chat.enabled 为 true
158
+
159
+ ## 使用说明
160
+
161
+ - preview 是只读状态,不能作为目标状态;floating 用于将对话框切换为悬浮胶囊态;设置 invisible 后可通过 collapsed、expanded 或 floating 再次显示对话框。
162
+
163
+ ## 调用方式
164
+
165
+ ### 异步 API
166
+
167
+ ```typescript
168
+ setChatPanelState(params: SetChatPanelStateParams): Promise<object>
169
+ ```
170
+
171
+ ## 入参
172
+
173
+ <table>
174
+ <thead>
175
+ <tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
176
+ </thead>
177
+ <tbody>
178
+ <tr><td><code>state</code></td><td><code>ChatPanelTargetState</code></td><td>是</td><td>-</td><td>-</td><td>目标状态。<br><br>- `collapsed`:显示对话框并完全收起面板。<br>- `expanded`:显示对话框并完全展开面板。<br>- `invisible`:隐藏对话框。<br>- `floating`:将对话框切换为悬浮胶囊态。</td></tr>
179
+ </tbody>
180
+ </table>
181
+
182
+ ## 调用示例
183
+
184
+ ```typescript
185
+ import { setChatPanelState } from '@doubao-dev/framework/api';
186
+
187
+ await setChatPanelState({ state: 'collapsed' });
188
+ ```
189
+
190
+ ## 成功返回
191
+
192
+ 无返回字段。
193
+
194
+ ### 返回示例
195
+
196
+ ```json
197
+ {}
198
+ ```
199
+
200
+ ## 错误处理
201
+
202
+ 错误对象和通用错误码见 [通用错误处理](./common-errors.md#错误返回)。
203
+
204
+ ### 失败示例
205
+
206
+ ```json
207
+ {
208
+ "errNo": 104,
209
+ "errMsg": "invalid parameter"
210
+ }
211
+ ```
212
+
213
+ ### 错误码
214
+
215
+ <table>
216
+ <thead>
217
+ <tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
218
+ </thead>
219
+ <tbody>
220
+ <tr><td><code>104</code></td><td><code>invalid parameter</code></td><td>Android、iOS</td><td>state 不是 collapsed、expanded、invisible 或 floating</td><td>传入受支持的目标状态后重试。</td></tr>
221
+ <tr><td><code>116</code></td><td><code>resource not found</code></td><td>Android</td><td>当前应用插件实例不存在</td><td>确认当前页面仍处于运行状态后重试。</td></tr>
222
+ </tbody>
223
+ </table>
224
+
225
+ #### 通用错误码
226
+
227
+ <table>
228
+ <thead>
229
+ <tr><th>errNo</th><th>errMsg</th><th>说明</th><th>平台</th></tr>
230
+ </thead>
231
+ <tbody>
232
+ <tr><td><code>102</code></td><td><code>internal error</code></td><td>内部错误</td><td>Android</td></tr>
233
+ </tbody>
234
+ </table>
235
+
236
+ <a id="onchatpanelheightchanged"></a>
237
+ ### onChatPanelHeightChanged()
238
+
239
+ ---
240
+ internal: true
241
+ ---
242
+
243
+ # onChatPanelHeightChanged
244
+
245
+ 监听对话框高度或展示状态变化。
246
+
247
+ 注册后不会立即回调当前值。需要当前状态时,先调用 getChatPanelInfo。
248
+
249
+ ## 支持版本
250
+
251
+ 前端库版本不低于 `0.0.42`。
252
+
253
+ ## 支持平台
254
+
255
+ <table>
256
+ <thead>
257
+ <tr><th>平台</th><th>支持情况</th></tr>
258
+ </thead>
259
+ <tbody>
260
+ <tr><td>Android</td><td>支持</td></tr>
261
+ <tr><td>iOS</td><td>支持</td></tr>
262
+ <tr><td>PC</td><td>不支持</td></tr>
263
+ <tr><td>HarmonyOS</td><td>不支持</td></tr>
264
+ </tbody>
265
+ </table>
266
+
267
+ ## 支持场景
268
+
269
+ <table>
270
+ <thead>
271
+ <tr><th>场景</th><th>支持情况</th></tr>
272
+ </thead>
273
+ <tbody>
274
+ <tr><td>页面</td><td>支持</td></tr>
275
+ <tr><td>卡片</td><td>不支持</td></tr>
276
+ </tbody>
277
+ </table>
278
+
279
+ ## 接入准备
280
+
281
+ ### 前置条件
282
+
283
+ - 当前页面需在 app.config.ts 中声明 chat.enabled 为 true
284
+
285
+ ## 使用说明
286
+
287
+ - 注册后不立即回调当前值;页面卸载前调用返回的取消函数。
288
+
289
+ ## 调用方式
290
+
291
+ ### 事件监听 API
292
+
293
+ ```typescript
294
+ onChatPanelHeightChanged(callback: (event: ChatPanelInfo) => void): () => void
295
+ ```
296
+
297
+ ## 入参
298
+
299
+ 无。
300
+
301
+ ## 调用示例
302
+
303
+ ```typescript
304
+ import { onChatPanelHeightChanged } from '@doubao-dev/framework/api';
305
+
306
+ const off = onChatPanelHeightChanged(({ height, state }) => {
307
+ console.log('chat panel changed', { height, state });
308
+ });
309
+
310
+ off();
311
+ ```
312
+
313
+ ## 回调参数
314
+
315
+ <table>
316
+ <thead>
317
+ <tr><th>名称</th><th>类型</th><th>必返</th><th>约束</th><th>说明</th></tr>
318
+ </thead>
319
+ <tbody>
320
+ <tr><td><code>event.height</code></td><td><code>number</code></td><td>是</td><td>大于等于 0;收起态高度也可能大于 0</td><td>对话框实际占用的垂直高度,单位为 px,包含被键盘抬高的区域,隐藏时为 0。</td></tr>
321
+ <tr><td><code>event.state</code></td><td><code>ChatPanelState</code></td><td>是</td><td>-</td><td>对话框当前展示状态。<br><br>- `preview` 表示从收起态发送消息后、收到回复前的中间态。<br>- `invisible` 表示对话框当前不可见。<br>- `floating` 表示对话框当前以悬浮形态展示。</td></tr>
322
+ </tbody>
323
+ </table>
324
+
325
+ ## 返回值
326
+
327
+ 返回 () => void。
328
+
329
+ ### 回调示例
330
+
331
+ ```json
332
+ {
333
+ "height": 336,
334
+ "state": "expanded"
335
+ }
336
+ ```
337
+
338
+ ## 相关类型
339
+
340
+ <a id="chatpanelstate"></a>
341
+ ### ChatPanelState
342
+
343
+ 对话框展示状态。
344
+
345
+ #### Type
346
+
347
+ `'collapsed' | 'expanded' | 'preview' | 'invisible' | 'floating'`
348
+
349
+ <a id="chatpanelinfo"></a>
350
+ ### ChatPanelInfo
351
+
352
+ 对话框状态快照。
353
+
354
+ #### Properties
355
+
356
+ • **height**: `number` - 对话框实际占用的垂直高度,单位为 px,包含被键盘抬高的区域,隐藏时为 0
357
+ • **state**: `ChatPanelState` - 对话框当前展示状态。 - preview 表示从收起态发送消息后、收到回复前的中间态。 - invisible 表示对话框当前不可见。 - floating 表示对话框当前以悬浮形态展示
358
+
359
+ <a id="chatpaneltargetstate"></a>
360
+ ### ChatPanelTargetState
361
+
362
+ 可主动设置的对话框展示状态。 preview 是对话回复过程中的只读状态,不能主动设置。
363
+
364
+ #### Type
365
+
366
+ `Exclude<ChatPanelState, 'preview'>`
367
+
368
+ <a id="setchatpanelstateparams"></a>
369
+ ### SetChatPanelStateParams
370
+
371
+ 设置对话框状态的参数。
372
+
373
+ #### Properties
374
+
375
+ • **state**: `ChatPanelTargetState` - 目标状态。 - collapsed:显示对话框并完全收起面板。 - expanded:显示对话框并完全展开面板。 - invisible:隐藏对话框。 - floating:将对话框切换为悬浮胶囊态
376
+ • **extra?**: `Record<string, string>` - 本次面板状态切换的扩展参数;show_reason 指定本次切换的展示原因