@doubao-apps/create 0.0.19 → 0.0.20

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.
@@ -116,6 +116,18 @@ closePage();
116
116
 
117
117
  ***
118
118
 
119
+ ### exitApp()
120
+
121
+ > **exitApp**(): `Promise`\<`object`\>
122
+
123
+ 退去当前所有页面
124
+
125
+ #### Returns
126
+
127
+ `Promise`\<`object`\>
128
+
129
+ ***
130
+
119
131
  ### getAccountInfo()
120
132
 
121
133
  > **getAccountInfo**(`params`?): `Promise`\<[`GetAccountInfoResult`](doubao-apps-sdk-open-api.md#getaccountinforesult)\>
@@ -352,7 +364,7 @@ Returns a Promise containing privacy setting information
352
364
  #### Example
353
365
 
354
366
  ```typescript
355
- import { getScreenBrightness } from '@byted-doubao-apps/framework/api';
367
+ import { getScreenBrightness } from '@doubao-apps/framework/api';
356
368
 
357
369
  const result = await getScreenBrightness();
358
370
 
@@ -593,7 +605,7 @@ Returns a Promise containing the login credential code
593
605
 
594
606
  拨打电话。
595
607
 
596
- 入参与微信豆包 App `wx.makePhoneCall` 对齐。
608
+ 入参与宿主应用的拨打电话能力对齐。
597
609
 
598
610
  #### Parameters
599
611
 
@@ -647,6 +659,36 @@ await makePhoneCall({ phoneNumber: '10086' });
647
659
 
648
660
  ***
649
661
 
662
+ ### onKeyboardHeightChange()
663
+
664
+ > **onKeyboardHeightChange**(`handler`): () => `void`
665
+
666
+ 监听键盘高度变化事件。
667
+
668
+ #### Parameters
669
+
670
+ • **handler**
671
+
672
+ #### Returns
673
+
674
+ `Function`
675
+
676
+ ##### Returns
677
+
678
+ `void`
679
+
680
+ #### Example
681
+
682
+ ```typescript
683
+ import { onKeyboardHeightChange } from '@doubao-apps/framework/api';
684
+
685
+ const unsubscribe = onKeyboardHeightChange(({ height }) => {
686
+ console.log('Keyboard height change event:', { height });
687
+ });
688
+ ```
689
+
690
+ ***
691
+
650
692
  ### openApp()
651
693
 
652
694
  > **openApp**(`params`): `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
@@ -874,6 +916,32 @@ await sendQueryMessage({ content: '订阅消息', type: 'text' })
874
916
 
875
917
  ***
876
918
 
919
+ ### setClipboardData()
920
+
921
+ > **setClipboardData**(`params`): `Promise`\<`object`\>
922
+
923
+ 设置系统剪贴板内容。
924
+
925
+ #### Parameters
926
+
927
+ • **params**: [`SetClipboardDataParams`](doubao-apps-sdk-open-api.md#setclipboarddataparams)
928
+
929
+ #### Returns
930
+
931
+ `Promise`\<`object`\>
932
+
933
+ 返回一个 Promise,在剪贴板内容设置成功时解析。
934
+
935
+ #### Example
936
+
937
+ ```typescript
938
+ import { setClipboardData } from '@doubao-apps/framework/api';
939
+
940
+ await setClipboardData({ data: 'hello' });
941
+ ```
942
+
943
+ ***
944
+
877
945
  ### setStorage()
878
946
 
879
947
  > **setStorage**\<`TData`\>(`params`): `Promise`\<`object`\>
@@ -1387,6 +1455,18 @@ key 对应的数据
1387
1455
 
1388
1456
  ***
1389
1457
 
1458
+ ### KeyboardHeightChangeEvent
1459
+
1460
+ #### Properties
1461
+
1462
+ ##### height
1463
+
1464
+ > **height**: `number`
1465
+
1466
+ 键盘高度,单位 px。
1467
+
1468
+ ***
1469
+
1390
1470
  ### LoginRequest
1391
1471
 
1392
1472
  #### Properties
@@ -1706,6 +1786,18 @@ HTTP 状态码。
1706
1786
 
1707
1787
  ***
1708
1788
 
1789
+ ### SetClipboardDataParams
1790
+
1791
+ #### Properties
1792
+
1793
+ ##### data
1794
+
1795
+ > **data**: `string`
1796
+
1797
+ 需要设置的剪贴板内容
1798
+
1799
+ ***
1800
+
1709
1801
  ### SetStorageParams\<TData\>
1710
1802
 
1711
1803
  #### Type parameters
@@ -6,10 +6,10 @@
6
6
  "build": "doubao build"
7
7
  },
8
8
  "dependencies": {
9
- "@doubao-apps/framework": "^0.0.19"
9
+ "@doubao-apps/framework": "^0.0.20"
10
10
  },
11
11
  "devDependencies": {
12
- "@doubao-apps/kit": "^0.0.19",
12
+ "@doubao-apps/kit": "^0.0.20",
13
13
  "typescript": "5.5.3"
14
14
  },
15
15
  "version": "0.0.16"
@@ -116,6 +116,18 @@ closePage();
116
116
 
117
117
  ***
118
118
 
119
+ ### exitApp()
120
+
121
+ > **exitApp**(): `Promise`\<`object`\>
122
+
123
+ 退去当前所有页面
124
+
125
+ #### Returns
126
+
127
+ `Promise`\<`object`\>
128
+
129
+ ***
130
+
119
131
  ### getAccountInfo()
120
132
 
121
133
  > **getAccountInfo**(`params`?): `Promise`\<[`GetAccountInfoResult`](doubao-apps-sdk-open-api.md#getaccountinforesult)\>
@@ -352,7 +364,7 @@ Returns a Promise containing privacy setting information
352
364
  #### Example
353
365
 
354
366
  ```typescript
355
- import { getScreenBrightness } from '@byted-doubao-apps/framework/api';
367
+ import { getScreenBrightness } from '@doubao-apps/framework/api';
356
368
 
357
369
  const result = await getScreenBrightness();
358
370
 
@@ -593,7 +605,7 @@ Returns a Promise containing the login credential code
593
605
 
594
606
  拨打电话。
595
607
 
596
- 入参与微信豆包 App `wx.makePhoneCall` 对齐。
608
+ 入参与宿主应用的拨打电话能力对齐。
597
609
 
598
610
  #### Parameters
599
611
 
@@ -647,6 +659,36 @@ await makePhoneCall({ phoneNumber: '10086' });
647
659
 
648
660
  ***
649
661
 
662
+ ### onKeyboardHeightChange()
663
+
664
+ > **onKeyboardHeightChange**(`handler`): () => `void`
665
+
666
+ 监听键盘高度变化事件。
667
+
668
+ #### Parameters
669
+
670
+ • **handler**
671
+
672
+ #### Returns
673
+
674
+ `Function`
675
+
676
+ ##### Returns
677
+
678
+ `void`
679
+
680
+ #### Example
681
+
682
+ ```typescript
683
+ import { onKeyboardHeightChange } from '@doubao-apps/framework/api';
684
+
685
+ const unsubscribe = onKeyboardHeightChange(({ height }) => {
686
+ console.log('Keyboard height change event:', { height });
687
+ });
688
+ ```
689
+
690
+ ***
691
+
650
692
  ### openApp()
651
693
 
652
694
  > **openApp**(`params`): `Promise`\<[`OpenAppResult`](doubao-apps-sdk-open-api.md#openappresult)\>
@@ -874,6 +916,32 @@ await sendQueryMessage({ content: '订阅消息', type: 'text' })
874
916
 
875
917
  ***
876
918
 
919
+ ### setClipboardData()
920
+
921
+ > **setClipboardData**(`params`): `Promise`\<`object`\>
922
+
923
+ 设置系统剪贴板内容。
924
+
925
+ #### Parameters
926
+
927
+ • **params**: [`SetClipboardDataParams`](doubao-apps-sdk-open-api.md#setclipboarddataparams)
928
+
929
+ #### Returns
930
+
931
+ `Promise`\<`object`\>
932
+
933
+ 返回一个 Promise,在剪贴板内容设置成功时解析。
934
+
935
+ #### Example
936
+
937
+ ```typescript
938
+ import { setClipboardData } from '@doubao-apps/framework/api';
939
+
940
+ await setClipboardData({ data: 'hello' });
941
+ ```
942
+
943
+ ***
944
+
877
945
  ### setStorage()
878
946
 
879
947
  > **setStorage**\<`TData`\>(`params`): `Promise`\<`object`\>
@@ -1387,6 +1455,18 @@ key 对应的数据
1387
1455
 
1388
1456
  ***
1389
1457
 
1458
+ ### KeyboardHeightChangeEvent
1459
+
1460
+ #### Properties
1461
+
1462
+ ##### height
1463
+
1464
+ > **height**: `number`
1465
+
1466
+ 键盘高度,单位 px。
1467
+
1468
+ ***
1469
+
1390
1470
  ### LoginRequest
1391
1471
 
1392
1472
  #### Properties
@@ -1706,6 +1786,18 @@ HTTP 状态码。
1706
1786
 
1707
1787
  ***
1708
1788
 
1789
+ ### SetClipboardDataParams
1790
+
1791
+ #### Properties
1792
+
1793
+ ##### data
1794
+
1795
+ > **data**: `string`
1796
+
1797
+ 需要设置的剪贴板内容
1798
+
1799
+ ***
1800
+
1709
1801
  ### SetStorageParams\<TData\>
1710
1802
 
1711
1803
  #### Type parameters
@@ -6,10 +6,10 @@
6
6
  "build": "doubao build"
7
7
  },
8
8
  "dependencies": {
9
- "@doubao-apps/framework": "^0.0.19"
9
+ "@doubao-apps/framework": "^0.0.20"
10
10
  },
11
11
  "devDependencies": {
12
- "@doubao-apps/kit": "^0.0.19",
12
+ "@doubao-apps/kit": "^0.0.20",
13
13
  "typescript": "5.5.3"
14
14
  },
15
15
  "version": "0.0.16"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubao-apps/create",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Create Doubao Apps projects with a single command",
5
5
  "type": "module",
6
6
  "bin": {