@heybox/hb-sdk 0.7.5-alpha.0 → 0.8.0-alpha
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/CHANGELOG.md +51 -0
- package/README.md +14 -14
- package/dist/cli-chunks/{build-V1YBdpzY.cjs → build-DJWFSM1B.cjs} +6 -5
- package/dist/cli-chunks/{context-Ba1Je-wT.cjs → context-DV2UK1Nz.cjs} +2 -2
- package/dist/cli-chunks/{create-CKGjqo9E.cjs → create-2HfoB48V.cjs} +1 -1
- package/dist/cli-chunks/{dev-XopYKLYZ.cjs → dev-Dgt2zS9k.cjs} +8 -8
- package/dist/cli-chunks/{doctor-BHbrYQqT.cjs → doctor-C95gIao_.cjs} +1 -1
- package/dist/cli-chunks/{index-DKWfX6Ut.cjs → index-BjoSXl8C.cjs} +2 -2
- package/dist/cli-chunks/{index-C9mpajVG.cjs → index-D62ANeBv.cjs} +14 -14
- package/dist/cli-chunks/{index.esm-SXAQ3WVR.cjs → index.esm-CigcxJ2B.cjs} +6 -6
- package/dist/cli-chunks/{login-BVWicWqe.cjs → login-Cumknwdx.cjs} +2 -2
- package/dist/cli-chunks/{project-vite-CBb38HJ3.cjs → project-vite-CcE-HMmd.cjs} +1 -1
- package/dist/cli-chunks/{remote-BG1u0NKT.cjs → remote-DDdP3xcE.cjs} +10 -8
- package/dist/cli-chunks/{runtime-gate-CtV7rWyX.cjs → runtime-gate-DFjw66kF.cjs} +20 -1
- package/dist/cli-chunks/{runtime-permission-env-D-8_jPG3.cjs → runtime-permission-env-CjsCe5bp.cjs} +13 -13
- package/dist/cli-chunks/{session-CJS_SEp9.cjs → session-BDi_AZSv.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/devtools/browser-dev-host/main.js +173 -68
- package/dist/index.cjs.js +113 -63
- package/dist/index.esm.js +113 -63
- package/dist/miniapp-publish.cjs.js +13 -13
- package/dist/miniapp-publish.esm.js +13 -13
- package/dist/templates/vue3-vite-ts/README.md.ejs +2 -0
- package/dist/templates/vue3-vite-ts/vite.config.ts +1 -1
- package/dist/vite.cjs.js +31 -4
- package/dist/vite.esm.js +31 -5
- package/package.json +10 -7
- package/skill/references/api-protocol.md +14 -2
- package/skill/references/api-root.md +42 -21
- package/skill/references/examples.md +1 -1
- package/skill/references/safety-boundaries.md +1 -1
- package/skill/scripts/sync-references.mjs +3 -1
- package/skill/skill.json +4 -4
- package/types/core/errors.d.ts +5 -5
- package/types/core/sdk.d.ts +5 -5
- package/types/core/singleton.d.ts +56 -6
- package/types/miniapp-manifest/schema.d.ts +5 -0
- package/types/miniapp-publish/index.d.ts +8 -8
- package/types/modules/auth/index.d.ts +15 -1
- package/types/modules/cloud/index.d.ts +75 -5
- package/types/modules/device/index.d.ts +31 -3
- package/types/modules/navigation/index.d.ts +46 -4
- package/types/modules/network/index.d.ts +22 -11
- package/types/modules/share/copy-link.d.ts +3 -3
- package/types/modules/share/index.d.ts +61 -5
- package/types/modules/share/screenshot.d.ts +3 -3
- package/types/modules/share/show-share-menu.d.ts +3 -3
- package/types/modules/storage/index.d.ts +38 -10
- package/types/modules/ui/index.d.ts +46 -4
- package/types/modules/user/get-info.d.ts +1 -1
- package/types/modules/user/index.d.ts +46 -4
- package/types/modules/user/steam-game-list.d.ts +2 -2
- package/types/modules/viewport/index.d.ts +36 -8
- package/types/vite/index.d.ts +15 -7
|
@@ -73,32 +73,60 @@ export type SetNavigationBarStyleResult = void;
|
|
|
73
73
|
export type { MiniProgramViewportMethod } from '../../protocol/capabilities';
|
|
74
74
|
/** 外部小程序可调用的 Viewport 模块。 */
|
|
75
75
|
export interface MiniProgramViewportModule {
|
|
76
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* 获取当前小程序窗口信息。
|
|
78
|
+
*
|
|
79
|
+
* @since 0.2.0-alpha.0
|
|
80
|
+
* @hbPlatform android
|
|
81
|
+
* @hbPlatform ios
|
|
82
|
+
* @hbPlatform ohos
|
|
83
|
+
* @hbPlatform windows
|
|
84
|
+
* @hbPlatform macos
|
|
85
|
+
* @hbClient android none
|
|
86
|
+
* @hbClient ios none
|
|
87
|
+
* @hbClient ohos none
|
|
88
|
+
* @hbClient windows none
|
|
89
|
+
* @hbClient macos none
|
|
90
|
+
*/
|
|
77
91
|
getWindowInfo(): Promise<GetWindowInfoResult>;
|
|
78
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* 设置导航栏关闭按钮与状态栏图标/文字的前景样式。
|
|
94
|
+
*
|
|
95
|
+
* @since 0.4.0
|
|
96
|
+
* @hbPlatform android
|
|
97
|
+
* @hbPlatform ios
|
|
98
|
+
* @hbPlatform ohos
|
|
99
|
+
* @hbPlatform windows
|
|
100
|
+
* @hbPlatform macos
|
|
101
|
+
* @hbClient android none
|
|
102
|
+
* @hbClient ios none
|
|
103
|
+
* @hbClient ohos none
|
|
104
|
+
* @hbClient windows none
|
|
105
|
+
* @hbClient macos none
|
|
106
|
+
*/
|
|
79
107
|
setNavigationBarStyle(options: MiniProgramSetNavigationBarStyleOptions): Promise<SetNavigationBarStyleResult>;
|
|
80
108
|
}
|
|
81
109
|
/**
|
|
82
110
|
* 获取当前小程序窗口信息。
|
|
83
111
|
*
|
|
84
|
-
* @param requester 底层 bridge 请求能力。
|
|
112
|
+
* @param requester - 底层 bridge 请求能力。
|
|
85
113
|
* @returns 当前小程序可用窗口信息。
|
|
86
|
-
* @throws {HbMiniProgramSDKError} 当 bridge、父容器或宿主能力调用失败时抛出。
|
|
114
|
+
* @throws {@link HbMiniProgramSDKError} 当 bridge、父容器或宿主能力调用失败时抛出。
|
|
87
115
|
*/
|
|
88
116
|
export declare function getWindowInfo(requester: MiniProgramRequester): Promise<GetWindowInfoResult>;
|
|
89
117
|
/**
|
|
90
118
|
* 设置导航栏关闭按钮与状态栏图标/文字的前景样式。
|
|
91
119
|
*
|
|
92
|
-
* @param requester 底层 bridge 请求能力。
|
|
93
|
-
* @param options 导航栏样式配置。
|
|
120
|
+
* @param requester - 底层 bridge 请求能力。
|
|
121
|
+
* @param options - 导航栏样式配置。
|
|
94
122
|
* @returns 宿主接受设置后 resolve。
|
|
95
|
-
* @throws {HbMiniProgramSDKError} 当 bridge、父容器或宿主能力调用失败时抛出。
|
|
123
|
+
* @throws {@link HbMiniProgramSDKError} 当 bridge、父容器或宿主能力调用失败时抛出。
|
|
96
124
|
*/
|
|
97
125
|
export declare function setNavigationBarStyle(requester: MiniProgramRequester, options: MiniProgramSetNavigationBarStyleOptions): Promise<SetNavigationBarStyleResult>;
|
|
98
126
|
/**
|
|
99
127
|
* 创建 Viewport 模块。
|
|
100
128
|
*
|
|
101
|
-
* @param requester 底层 bridge 请求能力。
|
|
129
|
+
* @param requester - 底层 bridge 请求能力。
|
|
102
130
|
* @returns 面向业务层的 Viewport 模块对象。
|
|
103
131
|
*/
|
|
104
132
|
export declare function createViewportModule(requester: MiniProgramRequester): MiniProgramViewportModule;
|
package/types/vite/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
type
|
|
1
|
+
import { MINIAPP_PLATFORM_VALUES, type MiniappPlatform } from '../miniapp-manifest/schema';
|
|
2
|
+
export interface MiniappManifestPlugin {
|
|
2
3
|
name: string;
|
|
3
4
|
config: (config: MiniappManifestUserConfig) => MiniappManifestUserConfig | void;
|
|
4
5
|
configResolved: (resolved: MiniappManifestResolvedConfig) => void;
|
|
@@ -6,15 +7,15 @@ type MiniappManifestPlugin = {
|
|
|
6
7
|
buildEnd: (error?: Error) => void;
|
|
7
8
|
transformIndexHtml: (html: string) => string;
|
|
8
9
|
closeBundle: (this: MiniappManifestPluginContext) => Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
interface MiniappManifestUserConfig {
|
|
10
|
+
}
|
|
11
|
+
export interface MiniappManifestUserConfig {
|
|
11
12
|
base?: string;
|
|
12
13
|
define?: Record<string, string>;
|
|
13
14
|
}
|
|
14
|
-
interface MiniappManifestPluginContext {
|
|
15
|
+
export interface MiniappManifestPluginContext {
|
|
15
16
|
warn: (message: string) => void;
|
|
16
17
|
}
|
|
17
|
-
interface MiniappManifestResolvedConfig {
|
|
18
|
+
export interface MiniappManifestResolvedConfig {
|
|
18
19
|
root: string;
|
|
19
20
|
command: 'build' | 'serve';
|
|
20
21
|
build: {
|
|
@@ -31,6 +32,13 @@ interface MiniappManifestResolvedConfig {
|
|
|
31
32
|
protocol?: 'ws' | 'wss';
|
|
32
33
|
};
|
|
33
34
|
};
|
|
35
|
+
plugins?: readonly {
|
|
36
|
+
name?: string;
|
|
37
|
+
}[];
|
|
38
|
+
}
|
|
39
|
+
export { MINIAPP_PLATFORM_VALUES };
|
|
40
|
+
export type { MiniappPlatform };
|
|
41
|
+
export interface MiniappManifestOptions {
|
|
42
|
+
platforms: readonly MiniappPlatform[];
|
|
34
43
|
}
|
|
35
|
-
export declare function miniappManifest(): MiniappManifestPlugin;
|
|
36
|
-
export {};
|
|
44
|
+
export declare function miniappManifest(options: MiniappManifestOptions): MiniappManifestPlugin;
|