@proteus-vue/render-backend 0.3.0-beta.21 → 0.3.0-beta.26
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/app-navigation.d.ts +57 -0
- package/dist/app-navigation.js +3017 -0
- package/dist/host-conformance.d.ts +7 -0
- package/dist/host-invoke-contract.d.ts +8 -0
- package/dist/host-invoke-contract.js +47 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +3007 -56
- package/dist/native.d.ts +67 -1
- package/dist/quickjs-host.d.ts +77 -0
- package/dist/screen-executor-host.d.ts +67 -0
- package/dist/screen-executor-host.js +151 -0
- package/dist/screen-executor.d.ts +239 -0
- package/dist/screen-executor.js +165 -0
- package/dist/screen-runtime.d.ts +96 -0
- package/dist/selfdraw-batch.d.ts +47 -0
- package/dist/superapp-runtime.d.ts +100 -0
- package/dist/tab-bar-spec.d.ts +35 -0
- package/dist/tab-bar-spec.js +17 -0
- package/package.json +23 -5
|
@@ -28,9 +28,15 @@ export interface HostRuntimeLike {
|
|
|
28
28
|
id: string;
|
|
29
29
|
state: 'created' | 'running' | 'suspended' | 'destroyed';
|
|
30
30
|
threads: string[];
|
|
31
|
+
/**
|
|
32
|
+
* 执行域列表。`real: false` = **逻辑域**(单线程宿主:无真并行——诚实声明,G-39.3);
|
|
33
|
+
* 真实 Worker 宿主(Web)为 `true`。★可选字段:既有 stub 不声明(视为 true)——
|
|
34
|
+
* 但"单线程宿主"必须显式写 false(否则框架会按真并行调度 ⇒ 静默降级)。
|
|
35
|
+
*/
|
|
31
36
|
workers: Array<{
|
|
32
37
|
id: string;
|
|
33
38
|
thread: string;
|
|
39
|
+
real?: boolean;
|
|
34
40
|
}>;
|
|
35
41
|
queue: Array<{
|
|
36
42
|
task: () => unknown;
|
|
@@ -43,6 +49,7 @@ export interface HostRuntimeLike {
|
|
|
43
49
|
createWorker(): {
|
|
44
50
|
id: string;
|
|
45
51
|
thread: string;
|
|
52
|
+
real?: boolean;
|
|
46
53
|
};
|
|
47
54
|
postMessage(): boolean;
|
|
48
55
|
enqueue(task: () => unknown, priority?: number): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** `screen.*` 执行器方法(三端**必须一致**——M5 执行器协议)。 */
|
|
2
|
+
export declare const HOST_SCREEN_METHODS: readonly ["screen.mount", "screen.visible", "screen.destroy", "screen.anim", "screen.rect", "screen.shared", "screen.stats"];
|
|
3
|
+
/** 能力族方法(`proteusHost.invoke` 非 `screen.*` 分支)。 */
|
|
4
|
+
export declare const HOST_CAPABILITY_METHODS: readonly ["host.context", "update.check", "update.apply", "window.setSize", "worker.create", "worker.post", "worker.terminate", "idle.request", "idle.cancel", "preload.assets", "extension.load", "mini-program.navigate", "webassembly.instantiate", "webassembly.validate", "webassembly.call", "webassembly.release", "native.calls"];
|
|
5
|
+
/** **合法省略**(某端不实现但非漂移——由引擎/平台提供)。键 = 端名(`android`/`ios`/`harmony`)。 */
|
|
6
|
+
export declare const HOST_METHOD_OPTIONAL: Record<string, readonly string[]>;
|
|
7
|
+
/** 契约全量(能力 + 屏幕)。 */
|
|
8
|
+
export declare const HOST_INVOKE_METHODS: readonly string[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// src/host-invoke-contract.ts
|
|
2
|
+
var HOST_SCREEN_METHODS = [
|
|
3
|
+
"screen.mount",
|
|
4
|
+
"screen.visible",
|
|
5
|
+
"screen.destroy",
|
|
6
|
+
"screen.anim",
|
|
7
|
+
"screen.rect",
|
|
8
|
+
"screen.shared",
|
|
9
|
+
"screen.stats"
|
|
10
|
+
];
|
|
11
|
+
var HOST_CAPABILITY_METHODS = [
|
|
12
|
+
// 宿主上下文 / 热更新 / 窗口
|
|
13
|
+
"host.context",
|
|
14
|
+
"update.check",
|
|
15
|
+
"update.apply",
|
|
16
|
+
"window.setSize",
|
|
17
|
+
// Worker(G-39 后台线程)
|
|
18
|
+
"worker.create",
|
|
19
|
+
"worker.post",
|
|
20
|
+
"worker.terminate",
|
|
21
|
+
// 空闲回调 / 预加载 / 扩展
|
|
22
|
+
"idle.request",
|
|
23
|
+
"idle.cancel",
|
|
24
|
+
"preload.assets",
|
|
25
|
+
"extension.load",
|
|
26
|
+
// 跳其他小程序(App 端对齐 Web:通常无对等)
|
|
27
|
+
"mini-program.navigate",
|
|
28
|
+
// WebAssembly(宿主运行时;★引擎内置 WASM 的端可不实现——见 HOST_METHOD_OPTIONAL)
|
|
29
|
+
"webassembly.instantiate",
|
|
30
|
+
"webassembly.validate",
|
|
31
|
+
"webassembly.call",
|
|
32
|
+
"webassembly.release",
|
|
33
|
+
// 宿主自报调用记账(判据"能力经壳执行")
|
|
34
|
+
"native.calls"
|
|
35
|
+
];
|
|
36
|
+
var HOST_METHOD_OPTIONAL = {
|
|
37
|
+
// iOS JSC 内建 WebAssembly(`typeof WebAssembly === 'object'`)⇒ 壳不实现 `webassembly.*`。
|
|
38
|
+
ios: ["webassembly.instantiate", "webassembly.validate", "webassembly.call", "webassembly.release"]
|
|
39
|
+
// 鸿蒙:能力族尚未接线(memUsage/gc 之外)——★**缺失已登记**(非合法省略;门禁以"覆盖率"报告,不静默)。
|
|
40
|
+
};
|
|
41
|
+
var HOST_INVOKE_METHODS = [...HOST_CAPABILITY_METHODS, ...HOST_SCREEN_METHODS];
|
|
42
|
+
export {
|
|
43
|
+
HOST_CAPABILITY_METHODS,
|
|
44
|
+
HOST_INVOKE_METHODS,
|
|
45
|
+
HOST_METHOD_OPTIONAL,
|
|
46
|
+
HOST_SCREEN_METHODS
|
|
47
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export type { HeadlessNode } from './headless';
|
|
|
6
6
|
export { createVueDomBackend } from './vue-dom';
|
|
7
7
|
export { createNativeBackend, createMockNativeAdapter } from './native';
|
|
8
8
|
export type { NativeViewDescriptor, NativeViewAdapter, MockNativeAdapter, NativePlatform } from './native';
|
|
9
|
+
export type { NativeBatchAdapter, NativeHostOp } from './native';
|
|
10
|
+
export { createSelfDrawBatchAdapter } from './selfdraw-batch';
|
|
11
|
+
export type { SelfDrawHostBridge, SelfDrawBatchAdapter, SelfDrawBatchOptions } from './selfdraw-batch';
|
|
9
12
|
export { createFlutterBackend, mapWidgetType, toWidgetTree } from './flutter';
|
|
10
13
|
export type { FlutterWidgetDescriptor } from './flutter';
|
|
11
14
|
export { renderComponentSnapshot, createControlReader } from './conformance-component';
|
|
@@ -20,6 +23,8 @@ export { createVueRendererOptions, createProteusRenderer, createProteusRendererF
|
|
|
20
23
|
export type { ProteusRenderer } from './vue-bridge';
|
|
21
24
|
export { createWebHostRuntime } from './web-host';
|
|
22
25
|
export type { WebHostRuntime, WebWorkerHandle, WebHostOptions } from './web-host';
|
|
26
|
+
export { createQuickJsHostRuntime } from './quickjs-host';
|
|
27
|
+
export type { QuickJsHostRuntime, QuickJsHostOptions, QuickJsHostCapabilities, LogicalWorkerHandle, NativeTransport, RuntimeRefusal, } from './quickjs-host';
|
|
23
28
|
export { createBackendSwitcher } from './hot-switch';
|
|
24
29
|
export type { BackendSwitcher, HotSwitchOptions } from './hot-switch';
|
|
25
30
|
export { CONTAINER_PROFILES, PAGE_STATE_TRANSITIONS, canTransitionPageState, FIVE_ATOMIC_STEPS, assertAtomicDestroy, createDestroyReport, DEFAULT_STACK_POLICY, profileOfContainer, } from './container-spi';
|
|
@@ -46,3 +51,14 @@ export type { PssRule, PssDiagnostic, PssAnalysisResult, PssAnalysisOptions, Sco
|
|
|
46
51
|
export type { OwnedStateListener } from './ownership';
|
|
47
52
|
export { HOSTS, ENGINES, HOST_ENGINE_MATRIX, matrixCombos, createEngine, runComboConformance, runHostEngineMatrix, formatMatrixReport } from './host-matrix';
|
|
48
53
|
export type { HostId, EngineId, ComboTier, MatrixCombo, ComboCheck, ComboConformanceResult, ComboConformanceOptions, MatrixRow, MatrixReport, MatrixOptions, } from './host-matrix';
|
|
54
|
+
export { createScreenExecutor, screenContentFromLayoutTemplate } from './screen-executor';
|
|
55
|
+
export type { ScreenCommandLike, ScreenTreeHost, ScreenAnimHost, RouteTransitionPlanner, RouteTransitionPlanLike, ScreenExecutor, ScreenExecutorOptions, ScreenExecutorStats, AnimLike, ScreenContent, ScreenContentNode, ScreenContentProvider, } from './screen-executor';
|
|
56
|
+
export { createHostScreenPorts, SCREEN_ANIM_DONE_KEY } from './screen-executor-host';
|
|
57
|
+
export { createScreenRuntime } from './screen-runtime';
|
|
58
|
+
export type { ScreenRuntime, ScreenRuntimeInstance, ScreenRuntimeArtifact, CreateScreenRuntimeOptions } from './screen-runtime';
|
|
59
|
+
export { HOST_INVOKE_METHODS, HOST_SCREEN_METHODS, HOST_CAPABILITY_METHODS, HOST_METHOD_OPTIONAL } from './host-invoke-contract';
|
|
60
|
+
export { TAB_BAR_SPEC } from './tab-bar-spec';
|
|
61
|
+
export type { TabBarSpec } from './tab-bar-spec';
|
|
62
|
+
export { createSuperappRuntime } from './superapp-runtime';
|
|
63
|
+
export type { SuperappRuntime, SuperappRuntimeOptions, SuperappHostPorts } from './superapp-runtime';
|
|
64
|
+
export type { HostInvokeChannel, HostScreenPorts, HostScreenPortsOptions } from './screen-executor-host';
|