@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,277 @@
1
+ # 豆包应用插件的端能力 API: 震动
2
+
3
+ 触发短震动和长震动。
4
+
5
+ [返回目录](./groups.md) | [返回速查](./quick-reference.md)
6
+
7
+ ## 速查
8
+
9
+ | API | 说明 |
10
+ | --- | --- |
11
+ | [vibrateShort](#vibrateshort) | 触发短震动。 |
12
+ | [vibrateLong](#vibratelong) | 触发长震动。 |
13
+
14
+ ## API 详情
15
+
16
+ <a id="vibrateshort"></a>
17
+ ### vibrateShort()
18
+
19
+ # vibrateShort
20
+
21
+ 触发短震动。
22
+
23
+ ## 扫码预览
24
+ ![扫码预览 vibrateShort](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fapi%252Fdevice%252Fvibrate%252Findex)
25
+
26
+ ## 使用限制
27
+
28
+ > [!WARNING]
29
+ > **Android**:Android 要求必传 type,省略可能导致调用不生效;未显式传 type 的调用在 Android 上行为不确定。
30
+
31
+ ## 支持版本
32
+
33
+ 前端库版本不低于 `0.0.25`。
34
+
35
+ ## 支持平台
36
+
37
+ <table>
38
+ <thead>
39
+ <tr><th>平台</th><th>支持情况</th></tr>
40
+ </thead>
41
+ <tbody>
42
+ <tr><td>Android</td><td>支持</td></tr>
43
+ <tr><td>iOS</td><td>支持</td></tr>
44
+ <tr><td>PC</td><td>不支持</td></tr>
45
+ <tr><td>HarmonyOS</td><td>不支持</td></tr>
46
+ </tbody>
47
+ </table>
48
+
49
+ ## 支持场景
50
+
51
+ <table>
52
+ <thead>
53
+ <tr><th>场景</th><th>支持情况</th></tr>
54
+ </thead>
55
+ <tbody>
56
+ <tr><td>页面</td><td>支持</td></tr>
57
+ <tr><td>卡片</td><td>支持</td></tr>
58
+ </tbody>
59
+ </table>
60
+
61
+ ## 使用说明
62
+
63
+ - 建议显式传入 type,避免在 Android 上因缺省参数导致震动不生效
64
+
65
+ ## 调用方式
66
+
67
+ ### 异步 API
68
+
69
+ ```typescript
70
+ vibrateShort(params?: VibrateShortParams): Promise<object>
71
+ ```
72
+
73
+ ## 入参
74
+
75
+ <table>
76
+ <thead>
77
+ <tr><th>名称</th><th>类型</th><th>必填</th><th>默认值</th><th>约束</th><th>说明</th></tr>
78
+ </thead>
79
+ <tbody>
80
+ <tr><td><code>type</code></td><td><code>VibrateShortType</code></td><td>否</td><td><code>medium</code></td><td>heavy 为强震动,medium 为中等震动,light 为轻微震动</td><td>震动强度类型。Android:Android 要求必传 type,省略可能导致调用不生效。</td></tr>
81
+ </tbody>
82
+ </table>
83
+
84
+ ## 调用示例
85
+
86
+ ```typescript
87
+ import { vibrateShort } from '@doubao-dev/framework/api';
88
+
89
+ await vibrateShort({ type: 'medium' });
90
+ ```
91
+
92
+ ## 成功返回
93
+
94
+ 无返回字段。
95
+
96
+ ### 返回示例
97
+
98
+ ```json
99
+ {}
100
+ ```
101
+
102
+ ## 错误处理
103
+
104
+ 错误对象和通用错误码见 [通用错误处理](./common-errors.md#错误返回)。
105
+
106
+ ### 失败示例
107
+
108
+ ```json
109
+ {
110
+ "errNo": 103,
111
+ "errMsg": "feature not support"
112
+ }
113
+ ```
114
+
115
+ ### 错误码
116
+
117
+ <table>
118
+ <thead>
119
+ <tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
120
+ </thead>
121
+ <tbody>
122
+ <tr><td><code>103</code></td><td><code>feature not support</code></td><td>Android、iOS</td><td>Android 设备无振动器或不支持震动能力,或 iOS 系统版本低于 13.0</td><td>提示用户当前设备或系统不支持震动,避免依赖该能力</td></tr>
123
+ </tbody>
124
+ </table>
125
+
126
+ #### 通用错误码
127
+
128
+ <table>
129
+ <thead>
130
+ <tr><th>errNo</th><th>errMsg</th><th>说明</th><th>平台</th></tr>
131
+ </thead>
132
+ <tbody>
133
+ <tr><td><code>102</code></td><td><code>internal error</code></td><td>内部错误</td><td>Android</td></tr>
134
+ </tbody>
135
+ </table>
136
+
137
+ ## 平台差异
138
+
139
+ - **Android**:设备不支持震动或触发震动失败时返回 102 internal error;iOS 无对应失败错误码
140
+
141
+ <a id="vibratelong"></a>
142
+ ### vibrateLong()
143
+
144
+ # vibrateLong
145
+
146
+ 触发长震动。
147
+
148
+ ## 扫码预览
149
+ ![扫码预览 vibrateLong](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fapi%252Fdevice%252Fvibrate%252Findex)
150
+
151
+ ## 使用限制
152
+
153
+ > [!WARNING]
154
+ > **Android、iOS**:Android 固定震动约 400ms 且在设备不支持时可能失败,iOS 恒返回成功;依赖统一成功语义的调用方在双端体验不一致。
155
+
156
+ ## 支持版本
157
+
158
+ 前端库版本不低于 `0.0.25`。
159
+
160
+ ## 支持平台
161
+
162
+ <table>
163
+ <thead>
164
+ <tr><th>平台</th><th>支持情况</th></tr>
165
+ </thead>
166
+ <tbody>
167
+ <tr><td>Android</td><td>支持</td></tr>
168
+ <tr><td>iOS</td><td>支持</td></tr>
169
+ <tr><td>PC</td><td>不支持</td></tr>
170
+ <tr><td>HarmonyOS</td><td>不支持</td></tr>
171
+ </tbody>
172
+ </table>
173
+
174
+ ## 支持场景
175
+
176
+ <table>
177
+ <thead>
178
+ <tr><th>场景</th><th>支持情况</th></tr>
179
+ </thead>
180
+ <tbody>
181
+ <tr><td>页面</td><td>支持</td></tr>
182
+ <tr><td>卡片</td><td>支持</td></tr>
183
+ </tbody>
184
+ </table>
185
+
186
+ ## 使用说明
187
+
188
+ - Android 长震动时长固定约 400ms,无法自定义
189
+
190
+ ## 调用方式
191
+
192
+ ### 异步 API
193
+
194
+ ```typescript
195
+ vibrateLong(params?: object): Promise<object>
196
+ ```
197
+
198
+ ## 入参
199
+
200
+ 无。
201
+
202
+ ## 调用示例
203
+
204
+ ```typescript
205
+ import { vibrateLong } from '@doubao-dev/framework/api';
206
+
207
+ await vibrateLong();
208
+ ```
209
+
210
+ ## 成功返回
211
+
212
+ 无返回字段。
213
+
214
+ ### 返回示例
215
+
216
+ ```json
217
+ {}
218
+ ```
219
+
220
+ ## 错误处理
221
+
222
+ 错误对象和通用错误码见 [通用错误处理](./common-errors.md#错误返回)。
223
+
224
+ ### 失败示例
225
+
226
+ ```json
227
+ {
228
+ "errNo": 103,
229
+ "errMsg": "feature not support"
230
+ }
231
+ ```
232
+
233
+ ### 错误码
234
+
235
+ <table>
236
+ <thead>
237
+ <tr><th>errNo</th><th>errMsg</th><th>平台</th><th>触发条件</th><th>处理建议</th></tr>
238
+ </thead>
239
+ <tbody>
240
+ <tr><td><code>103</code></td><td><code>feature not support</code></td><td>Android</td><td>Android 设备无振动器或不支持震动能力</td><td>提示用户当前设备不支持震动,避免依赖该能力</td></tr>
241
+ </tbody>
242
+ </table>
243
+
244
+ #### 通用错误码
245
+
246
+ <table>
247
+ <thead>
248
+ <tr><th>errNo</th><th>errMsg</th><th>说明</th><th>平台</th></tr>
249
+ </thead>
250
+ <tbody>
251
+ <tr><td><code>102</code></td><td><code>internal error</code></td><td>内部错误</td><td>Android</td></tr>
252
+ </tbody>
253
+ </table>
254
+
255
+ ## 平台差异
256
+
257
+ - **iOS**:长震动恒返回成功,无失败错误码
258
+
259
+ ## 相关类型
260
+
261
+ <a id="vibrateshorttype"></a>
262
+ ### VibrateShortType
263
+
264
+ 短震动类型。
265
+
266
+ #### Type
267
+
268
+ `'heavy' | 'medium' | 'light'`
269
+
270
+ <a id="vibrateshortparams"></a>
271
+ ### VibrateShortParams
272
+
273
+ 短震动请求参数。
274
+
275
+ #### Properties
276
+
277
+ • **type?**: `VibrateShortType` - 震动强度类型