@doubao-dev/framework 0.3.0 → 0.4.0-rc.1

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/api.d.ts CHANGED
@@ -4130,12 +4130,13 @@ export declare interface GetConnectedWifiResult {
4130
4130
  * @containerSupport Widget | supported
4131
4131
  * @platformSupport Android | supported | 支持获取设备信息
4132
4132
  * @platformSupport iOS | supported | 支持获取设备信息
4133
- * @platformSupport PC | unsupported | 暂不支持
4133
+ * @platformSupport PC | supported | Flow Web 支持获取设备信息
4134
4134
  * @platformSupport HarmonyOS | unsupported | 暂不支持
4135
- * @permission none | - | none | Android,iOS | 无需额外权限
4135
+ * @permission none | - | none | Android,iOS,PC | 无需额外权限
4136
4136
  * @precondition All | 无额外前置条件
4137
4137
  * @platformNote Android | `abi`、`deviceAbi`、`cpuType` 仅 Android 返回
4138
4138
  * @platformNote iOS | 不返回 `abi`、`deviceAbi`、`cpuType`
4139
+ * @platformNote PC | Flow Web 浏览器的 `platform` 返回 `web`;Windows、macOS 桌面客户端分别返回 `windows`、`mac`,不返回 Android 专属字段
4139
4140
  * @resultExample
4140
4141
  * ```json
4141
4142
  * {
@@ -4147,7 +4148,7 @@ export declare interface GetConnectedWifiResult {
4147
4148
  * "memorySize": "8192"
4148
4149
  * }
4149
4150
  * ```
4150
- * @errorCode none | - | - | Android,iOS | 当前实现未稳定返回顶层 errNo/errMsg | 根据异常信息重试
4151
+ * @errorCode none | - | - | Android,iOS,PC | 当前实现未稳定返回顶层 errNo/errMsg | 根据异常信息重试
4151
4152
  *
4152
4153
  * @public
4153
4154
  */
package/dist/config.d.ts CHANGED
@@ -53,9 +53,9 @@ declare type AIWidgetMetadata = {
53
53
  */
54
54
  description?: string;
55
55
  /**
56
- * Widget box type in Chat UI
56
+ * Widget box type in Chat UI. custom_box leaves background, radius and border to the business UI.
57
57
  */
58
- boxType?: 'inbox' | 'full_box';
58
+ boxType?: 'inbox' | 'full_box' | 'custom_box';
59
59
  /**
60
60
  * Whether add widget border
61
61
  */
@@ -287,7 +287,7 @@ export declare type DoubaoAppsWidgetMetaConfig = Omit<AIWidgetMetadata, 'id'> &
287
287
  id?: string;
288
288
  name?: string;
289
289
  description?: string;
290
- boxType?: 'inbox' | 'full_box';
290
+ boxType?: AIWidgetMetadata['boxType'];
291
291
  border?: boolean;
292
292
  keywords?: string[];
293
293
  icons?: Icons;
package/dist/index.d.ts CHANGED
@@ -200,6 +200,48 @@ export declare type AIViewContext = MessageMeta & {
200
200
  };
201
201
  };
202
202
 
203
+ declare type AIWidgetMetadata = {
204
+ /**
205
+ * The widget unique identifier
206
+ */
207
+ id: string;
208
+ /**
209
+ * widget name
210
+ */
211
+ name?: string;
212
+ /**
213
+ * Describe the characteristics of widget
214
+ */
215
+ description?: string;
216
+ /**
217
+ * Widget box type in Chat UI. custom_box leaves background, radius and border to the business UI.
218
+ */
219
+ boxType?: 'inbox' | 'full_box' | 'custom_box';
220
+ /**
221
+ * Whether add widget border
222
+ */
223
+ border?: boolean;
224
+ /**
225
+ * Keywords of things
226
+ */
227
+ keywords?: string[];
228
+ /**
229
+ * Icons
230
+ */
231
+ icons?: Icons;
232
+ /**
233
+ * Set extra widget properties
234
+ */
235
+ prop?: string;
236
+ /**
237
+ * Widget title type
238
+ * - none: 默认,无标题
239
+ * - normal: 常规标题
240
+ * - float: 浮动标题
241
+ */
242
+ titleType?: 'none' | 'normal' | 'float';
243
+ };
244
+
203
245
  export declare type AnyObject = Record<string, any>;
204
246
 
205
247
  export declare type App<T extends DefineAppOptions = DefineAppOptions> = T & {
@@ -936,7 +978,7 @@ declare type WidgetToolExtraMetadata = {
936
978
  /**
937
979
  * Widget box type in Chat UI
938
980
  */
939
- boxType?: 'inbox' | 'full_box';
981
+ boxType?: AIWidgetMetadata['boxType'];
940
982
  /**
941
983
  * Whether add widget border
942
984
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubao-dev/framework",
3
- "version": "0.3.0",
3
+ "version": "0.4.0-rc.1",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -68,7 +68,7 @@
68
68
  "types.d.ts"
69
69
  ],
70
70
  "dependencies": {
71
- "@lynx-js/types": "4.1.0",
71
+ "@lynx-js/types": "4.2.1",
72
72
  "@types/react": "18.3.27"
73
73
  },
74
74
  "publishConfig": {