wevu 7.4.0 → 7.5.0
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/README.md +2 -0
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +1 -1
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/reactivity/core.mjs +1 -1
- package/dist/dev/reactivity/ref.mjs +1 -1
- package/dist/dev/runtime/app/diagnostics.mjs +5 -1
- package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
- package/dist/dev/runtime/app/mount.mjs +8 -3
- package/dist/dev/runtime/app/mount.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/commitTracker.mjs +39 -4
- package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/observation.mjs +109 -0
- package/dist/dev/runtime/app/setData/observation.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs +12 -1
- package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setDataOptions.mjs +1 -0
- package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
- package/dist/dev/runtime/define/initialComputed.mjs +13 -12
- package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
- package/dist/dev/runtime/define/props.mjs +5 -1
- package/dist/dev/runtime/define/props.mjs.map +1 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +2 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
- package/dist/dev/runtime/define.mjs +1 -1
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
- package/dist/dev/runtime/register/component/props.mjs +14 -4
- package/dist/dev/runtime/register/component/props.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +27 -17
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component.mjs +2 -1
- package/dist/dev/runtime/register/component.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +14 -7
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs +78 -0
- package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +52 -8
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance.mjs +60 -19
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
- package/dist/fetch.mjs +1 -1
- package/dist/internal-template.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/reactive/patch.mjs +1 -1
- package/dist/reactivity/reactive/patchState.mjs +1 -1
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/watch/helpers.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -1
- package/dist/router/useRoute.mjs +1 -1
- package/dist/routerInternal/matching.mjs +1 -1
- package/dist/routerInternal/params.mjs +1 -1
- package/dist/routerInternal/path.mjs +1 -1
- package/dist/routerInternal/query.mjs +1 -1
- package/dist/routerInternal/records.mjs +1 -1
- package/dist/runtime/app/context.mjs +1 -1
- package/dist/runtime/app/diagnostics.mjs +1 -1
- package/dist/runtime/app/mount.mjs +1 -1
- package/dist/runtime/app/setData/commitTracker.d.mts +2 -1
- package/dist/runtime/app/setData/commitTracker.mjs +1 -1
- package/dist/runtime/app/setData/observation.d.mts +12 -0
- package/dist/runtime/app/setData/observation.mjs +1 -0
- package/dist/runtime/app/setData/scheduler.d.mts +1 -0
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/app/setDataOptions.mjs +1 -1
- package/dist/runtime/define/initialComputed.mjs +1 -1
- package/dist/runtime/define/props.mjs +1 -1
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/diff.mjs +1 -1
- package/dist/runtime/features/publicLayout.mjs +1 -1
- package/dist/runtime/features/scopedSlots.d.mts +2 -1
- package/dist/runtime/jsxIsland.mjs +1 -1
- package/dist/runtime/pageLayout.mjs +1 -1
- package/dist/runtime/pageScroll.mjs +1 -1
- package/dist/runtime/register/component/alipayRegistration.mjs +1 -1
- package/dist/runtime/register/component/lifecycle.mjs +1 -1
- package/dist/runtime/register/component/props.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
- package/dist/runtime/register/component.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/nativeDeclaration.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
- package/dist/runtime/register/runtimeInstance.d.mts +8 -4
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/setupTracking.mjs +1 -1
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/types/runtime.d.mts +1 -0
- package/dist/runtime/types/setData.d.mts +30 -0
- package/dist/scheduler.mjs +1 -1
- package/dist/web-apis.mjs +1 -1
- package/package.json +10 -9
- package/dist/dev/api/vitest/setup.d.mts +0 -1
- package/dist/dev/api/vitest.d.mts +0 -1
- package/dist/dev/api.d.mts +0 -1
- package/dist/dev/compiler.d.mts +0 -1
- package/dist/dev/fetch.d.mts +0 -9
- package/dist/dev/index.d.mts +0 -72
- package/dist/dev/internal-reactivity.d.mts +0 -18
- package/dist/dev/internal-runtime.d.mts +0 -45
- package/dist/dev/internal-template.d.mts +0 -2
- package/dist/dev/jsxTypes.d.mts +0 -9
- package/dist/dev/macros/shared.d.mts +0 -83
- package/dist/dev/macros.d.mts +0 -71
- package/dist/dev/reactivity/asyncDerivation.d.mts +0 -41
- package/dist/dev/reactivity/computed.d.mts +0 -25
- package/dist/dev/reactivity/core.d.mts +0 -35
- package/dist/dev/reactivity/index.d.mts +0 -16
- package/dist/dev/reactivity/reactive/mutation.d.mts +0 -21
- package/dist/dev/reactivity/reactive/patch.d.mts +0 -18
- package/dist/dev/reactivity/reactive/shallow.d.mts +0 -22
- package/dist/dev/reactivity/reactive/shared.d.mts +0 -4
- package/dist/dev/reactivity/reactive.d.mts +0 -42
- package/dist/dev/reactivity/readonly.d.mts +0 -27
- package/dist/dev/reactivity/ref.d.mts +0 -27
- package/dist/dev/reactivity/shallowRef.d.mts +0 -19
- package/dist/dev/reactivity/toRefs.d.mts +0 -43
- package/dist/dev/reactivity/traverse.d.mts +0 -8
- package/dist/dev/reactivity/watch/types.d.mts +0 -43
- package/dist/dev/reactivity/watch.d.mts +0 -22
- package/dist/dev/router/auto-routes.d.mts +0 -8
- package/dist/dev/router/createRouter.d.mts +0 -9
- package/dist/dev/router/navigationCore.d.mts +0 -7
- package/dist/dev/router/resolve.d.mts +0 -7
- package/dist/dev/router/routeSync.d.mts +0 -2
- package/dist/dev/router/scrollRestoration/adapters.d.mts +0 -8
- package/dist/dev/router/scrollRestoration/controller.d.mts +0 -8
- package/dist/dev/router/scrollRestoration/host.d.mts +0 -3
- package/dist/dev/router/scrollRestoration/index.d.mts +0 -9
- package/dist/dev/router/scrollRestoration/types.d.mts +0 -61
- package/dist/dev/router/types.d.mts +0 -267
- package/dist/dev/router/useRoute.d.mts +0 -20
- package/dist/dev/router/useRouter.d.mts +0 -9
- package/dist/dev/router.d.mts +0 -30
- package/dist/dev/routerInternal/location.d.mts +0 -2
- package/dist/dev/routerInternal/matching.d.mts +0 -2
- package/dist/dev/routerInternal/params.d.mts +0 -2
- package/dist/dev/routerInternal/query.d.mts +0 -7
- package/dist/dev/routerInternal/records.d.mts +0 -2
- package/dist/dev/routerInternal/recordsWarnings.d.mts +0 -2
- package/dist/dev/routerInternal/shared.d.mts +0 -9
- package/dist/dev/routerInternal/snapshots.d.mts +0 -2
- package/dist/dev/routerInternal/types.d.mts +0 -9
- package/dist/dev/runtime/app/pending.d.mts +0 -10
- package/dist/dev/runtime/app/setData/commitTracker.d.mts +0 -13
- package/dist/dev/runtime/app/setData/scheduler.d.mts +0 -51
- package/dist/dev/runtime/app.d.mts +0 -8
- package/dist/dev/runtime/capabilities.d.mts +0 -78
- package/dist/dev/runtime/css.d.mts +0 -14
- package/dist/dev/runtime/defaults.d.mts +0 -12
- package/dist/dev/runtime/define.d.mts +0 -118
- package/dist/dev/runtime/disposables.d.mts +0 -31
- package/dist/dev/runtime/elementIntersectionObserver.d.mts +0 -26
- package/dist/dev/runtime/features/inlineEvents.d.mts +0 -7
- package/dist/dev/runtime/features/jsxIslands.d.mts +0 -7
- package/dist/dev/runtime/features/layout.d.mts +0 -7
- package/dist/dev/runtime/features/patchStrategy.d.mts +0 -7
- package/dist/dev/runtime/features/publicLayout.d.mts +0 -24
- package/dist/dev/runtime/features/scopedSlots.d.mts +0 -23
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +0 -7
- package/dist/dev/runtime/features/templateRefs.d.mts +0 -7
- package/dist/dev/runtime/hooks/base.d.mts +0 -27
- package/dist/dev/runtime/hooks/register.d.mts +0 -30
- package/dist/dev/runtime/hooks/vue.d.mts +0 -52
- package/dist/dev/runtime/hooks.d.mts +0 -4
- package/dist/dev/runtime/index.d.mts +0 -46
- package/dist/dev/runtime/intersectionObserver.d.mts +0 -14
- package/dist/dev/runtime/jsxIsland.d.mts +0 -37
- package/dist/dev/runtime/layoutBridge.d.mts +0 -55
- package/dist/dev/runtime/noSetData.d.mts +0 -5
- package/dist/dev/runtime/pageEnvironment.d.mts +0 -50
- package/dist/dev/runtime/pageLayout.d.mts +0 -25
- package/dist/dev/runtime/pageScroll.d.mts +0 -29
- package/dist/dev/runtime/provide.d.mts +0 -60
- package/dist/dev/runtime/provideStore.d.mts +0 -7
- package/dist/dev/runtime/publicRuntime.d.mts +0 -22
- package/dist/dev/runtime/pullDownRefresh.d.mts +0 -12
- package/dist/dev/runtime/register/app.d.mts +0 -14
- package/dist/dev/runtime/register/component.d.mts +0 -17
- package/dist/dev/runtime/register/inline.d.mts +0 -15
- package/dist/dev/runtime/register/runtimeInstance.d.mts +0 -26
- package/dist/dev/runtime/register/setup.d.mts +0 -11
- package/dist/dev/runtime/register/watch.d.mts +0 -12
- package/dist/dev/runtime/register.d.mts +0 -5
- package/dist/dev/runtime/selectorQuery.d.mts +0 -54
- package/dist/dev/runtime/template.d.mts +0 -6
- package/dist/dev/runtime/templateRefTypes.d.mts +0 -12
- package/dist/dev/runtime/types/core.d.mts +0 -35
- package/dist/dev/runtime/types/miniprogram.d.mts +0 -84
- package/dist/dev/runtime/types/miniprogramHost.d.mts +0 -45
- package/dist/dev/runtime/types/miniprogramHostSources.d.mts +0 -112
- package/dist/dev/runtime/types/options.d.mts +0 -138
- package/dist/dev/runtime/types/props/propTypes.d.mts +0 -79
- package/dist/dev/runtime/types/props/router.d.mts +0 -51
- package/dist/dev/runtime/types/props/setup.d.mts +0 -96
- package/dist/dev/runtime/types/props.d.mts +0 -4
- package/dist/dev/runtime/types/runtime.d.mts +0 -59
- package/dist/dev/runtime/types/setData.d.mts +0 -237
- package/dist/dev/runtime/types.d.mts +0 -29
- package/dist/dev/runtime/uniAppHost.d.mts +0 -8
- package/dist/dev/runtime/updatePerformance.d.mts +0 -13
- package/dist/dev/runtime/use.d.mts +0 -13
- package/dist/dev/runtime/vueCompat/context.d.mts +0 -8
- package/dist/dev/runtime/vueCompat/model.d.mts +0 -30
- package/dist/dev/runtime/vueCompat/router.d.mts +0 -29
- package/dist/dev/runtime/vueCompat/templateRef.d.mts +0 -9
- package/dist/dev/runtime/vueCompat.d.mts +0 -5
- package/dist/dev/scheduler.d.mts +0 -4
- package/dist/dev/store/define.d.mts +0 -8
- package/dist/dev/store/manager.d.mts +0 -16
- package/dist/dev/store/storeToRefs.d.mts +0 -11
- package/dist/dev/store/types.d.mts +0 -106
- package/dist/dev/store.d.mts +0 -5
- package/dist/dev/version.d.mts +0 -4
- package/dist/dev/vue-augment.d.mts +0 -8
- package/dist/dev/vue-demi.d.mts +0 -87
- package/dist/dev/vue-types.d.mts +0 -19
- package/dist/dev/web-apis.d.mts +0 -3
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Ref } from "../reactivity/ref.mjs";
|
|
2
|
-
import { ComputedRef } from "../reactivity/computed.mjs";
|
|
3
|
-
import "../index.mjs";
|
|
4
|
-
//#region src/runtime/pageEnvironment.d.ts
|
|
5
|
-
export interface PageStackSnapshot {
|
|
6
|
-
canGoBack: boolean;
|
|
7
|
-
currentRoute: string;
|
|
8
|
-
stackLength: number;
|
|
9
|
-
}
|
|
10
|
-
export interface UsePageStackOptions {
|
|
11
|
-
autoRefresh?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface NavigationBarMetrics {
|
|
14
|
-
navigationBarHeight: number;
|
|
15
|
-
navigationHeight: number;
|
|
16
|
-
statusBarHeight: number;
|
|
17
|
-
}
|
|
18
|
-
export interface UseNavigationBarMetricsOptions {
|
|
19
|
-
autoRefresh?: boolean;
|
|
20
|
-
defaultNavigationBarHeight?: number;
|
|
21
|
-
defaultStatusBarHeight?: number;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 获取当前小程序页面栈的稳定快照。
|
|
25
|
-
*/
|
|
26
|
-
export declare function getCurrentPageStackSnapshot(): PageStackSnapshot;
|
|
27
|
-
/**
|
|
28
|
-
* 在 setup 中跟踪当前小程序页面栈状态。
|
|
29
|
-
*/
|
|
30
|
-
export declare function usePageStack(options?: UsePageStackOptions): {
|
|
31
|
-
canGoBack: ComputedRef<boolean>;
|
|
32
|
-
currentRoute: Ref<string, string>;
|
|
33
|
-
refresh: () => void;
|
|
34
|
-
stackLength: Ref<number, number>;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* 计算自定义导航栏所需的状态栏和胶囊占位高度。
|
|
38
|
-
*/
|
|
39
|
-
export declare function getNavigationBarMetrics(options?: Omit<UseNavigationBarMetricsOptions, 'autoRefresh'>): NavigationBarMetrics;
|
|
40
|
-
/**
|
|
41
|
-
* 在 setup 中跟踪自定义导航栏尺寸。
|
|
42
|
-
*/
|
|
43
|
-
export declare function useNavigationBarMetrics(options?: UseNavigationBarMetricsOptions): {
|
|
44
|
-
navigationBarHeight: Ref<number, number>;
|
|
45
|
-
navigationHeight: ComputedRef<number>;
|
|
46
|
-
refresh: () => void;
|
|
47
|
-
statusBarHeight: Ref<number, number>;
|
|
48
|
-
};
|
|
49
|
-
//#endregion
|
|
50
|
-
//# sourceMappingURL=pageEnvironment.d.mts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/pageLayout.d.ts
|
|
2
|
-
type PageLayoutProps = object;
|
|
3
|
-
export interface WevuPageLayoutMap {}
|
|
4
|
-
type ResolveTypedPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
|
|
5
|
-
type ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : PageLayoutProps;
|
|
6
|
-
type PageLayoutNamedState = { [Name in ResolveTypedPageLayoutName]: {
|
|
7
|
-
name: Name;
|
|
8
|
-
props: ResolveTypedPageLayoutProps<Name>;
|
|
9
|
-
}; }[ResolveTypedPageLayoutName];
|
|
10
|
-
export type PageLayoutState = PageLayoutNamedState | {
|
|
11
|
-
name: false;
|
|
12
|
-
props: Record<string, any>;
|
|
13
|
-
} | {
|
|
14
|
-
name: undefined;
|
|
15
|
-
props: Record<string, any>;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* 获取当前页面 layout 状态。
|
|
19
|
-
*/
|
|
20
|
-
export declare function usePageLayout(): Readonly<PageLayoutState>;
|
|
21
|
-
export declare function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props: PageLayoutProps): void;
|
|
22
|
-
export declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
23
|
-
export declare function resolveRuntimePageLayoutName(layout: string | false): string;
|
|
24
|
-
//#endregion
|
|
25
|
-
//# sourceMappingURL=pageLayout.d.mts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HostMiniProgramPageScrollOption } from "./types/miniprogramHost.mjs";
|
|
2
|
-
import "./types.mjs";
|
|
3
|
-
//#region src/runtime/pageScroll.d.ts
|
|
4
|
-
export interface UsePageScrollThrottleOptions {
|
|
5
|
-
/**
|
|
6
|
-
* 节流间隔(毫秒),默认 80ms。
|
|
7
|
-
*/
|
|
8
|
-
interval?: number;
|
|
9
|
-
/**
|
|
10
|
-
* 是否在窗口起始边缘立即触发,默认 true。
|
|
11
|
-
*/
|
|
12
|
-
leading?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* 是否在窗口结束边缘补一次回调,默认 true。
|
|
15
|
-
*/
|
|
16
|
-
trailing?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 持续滚动时的最大等待时间(毫秒)。
|
|
19
|
-
* 当 trailing 为 false 时,可用于兜底触发一次回调。
|
|
20
|
-
*/
|
|
21
|
-
maxWait?: number;
|
|
22
|
-
}
|
|
23
|
-
export type UsePageScrollThrottleStopHandle = () => void;
|
|
24
|
-
/**
|
|
25
|
-
* 在 setup 中注册节流后的 onPageScroll 监听,并在卸载时自动清理。
|
|
26
|
-
*/
|
|
27
|
-
export declare function usePageScrollThrottle(handler: (opt: HostMiniProgramPageScrollOption) => void, options?: UsePageScrollThrottleOptions): UsePageScrollThrottleStopHandle;
|
|
28
|
-
//#endregion
|
|
29
|
-
//# sourceMappingURL=pageScroll.d.mts.map
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { setGlobalProvidedValue } from "./provideStore.mjs";
|
|
2
|
-
//#region src/runtime/provide.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* 判断当前是否存在可用的注入上下文。
|
|
5
|
-
*
|
|
6
|
-
* wevu 的依赖注入上下文来自同步 `setup()` 阶段的当前实例。
|
|
7
|
-
*/
|
|
8
|
-
export declare function hasInjectionContext(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* 在组件上下文中向后代注入值(与 Vue 3 行为兼容),若没有当前实例则回落到全局存储。
|
|
11
|
-
*
|
|
12
|
-
* @param key 注入键,可为字符串、Symbol 或对象
|
|
13
|
-
* @param value 提供的值
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```ts
|
|
17
|
-
* defineComponent({
|
|
18
|
-
* setup() {
|
|
19
|
-
* provide(TOKEN_KEY, { data: 'value' })
|
|
20
|
-
* }
|
|
21
|
-
* })
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare function provide<T>(key: any, value: T): void;
|
|
25
|
-
/**
|
|
26
|
-
* 从祖先组件(或全局存储)读取提供的值。
|
|
27
|
-
*
|
|
28
|
-
* @param key 注入键,需与 provide 使用的键保持一致
|
|
29
|
-
* @param defaultValue 未找到提供者时的默认值
|
|
30
|
-
* @returns 匹配到的值或默认值
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* defineComponent({
|
|
35
|
-
* setup() {
|
|
36
|
-
* const data = inject(TOKEN_KEY)
|
|
37
|
-
* const value = inject('key', 'default')
|
|
38
|
-
* }
|
|
39
|
-
* })
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function inject<T>(key: any, defaultValue: T): T;
|
|
43
|
-
export declare function inject<T>(key: any): T | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* 全局注入值,适用于历史兼容场景。
|
|
46
|
-
*
|
|
47
|
-
* @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `provide()`,
|
|
48
|
-
* 在无实例上下文时 `provide()` 会自动回落到全局存储。
|
|
49
|
-
*/
|
|
50
|
-
export declare function provideGlobal<T>(key: any, value: T): void;
|
|
51
|
-
/**
|
|
52
|
-
* 从全局存储读取值,适用于历史兼容场景。
|
|
53
|
-
*
|
|
54
|
-
* @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `inject()`,
|
|
55
|
-
* 在无实例上下文时 `inject()` 会自动从全局存储读取。
|
|
56
|
-
*/
|
|
57
|
-
export declare function injectGlobal<T>(key: any, defaultValue?: T): T;
|
|
58
|
-
//#endregion
|
|
59
|
-
export { setGlobalProvidedValue };
|
|
60
|
-
//# sourceMappingURL=provide.d.mts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { setWevuDefaults as setWevuDefaults$1 } from "./defaults.mjs";
|
|
2
|
-
import { createWevuComponent as createWevuComponent$1, defineComponent as defineComponent$1 } from "./define.mjs";
|
|
3
|
-
import { CreateWevuScopedSlotComponentOptions } from "./features/scopedSlots.mjs";
|
|
4
|
-
import { createApp as createApp$1 } from "./app.mjs";
|
|
5
|
-
import { registerApp as registerApp$1 } from "./register/app.mjs";
|
|
6
|
-
import { registerComponent as registerComponent$1 } from "./register/component.mjs";
|
|
7
|
-
import { mountRuntimeInstance as mountRuntimeInstance$1 } from "./register/runtimeInstance.mjs";
|
|
8
|
-
import "./register.mjs";
|
|
9
|
-
//#region src/runtime/publicRuntime.d.ts
|
|
10
|
-
export declare const createApp: typeof createApp$1;
|
|
11
|
-
export declare const defineComponent: typeof defineComponent$1;
|
|
12
|
-
export declare const createWevuComponent: typeof createWevuComponent$1;
|
|
13
|
-
export declare const registerApp: typeof registerApp$1;
|
|
14
|
-
export declare const registerComponent: typeof registerComponent$1;
|
|
15
|
-
export declare const mountRuntimeInstance: typeof mountRuntimeInstance$1;
|
|
16
|
-
export declare const setWevuDefaults: typeof setWevuDefaults$1;
|
|
17
|
-
/**
|
|
18
|
-
* 创建公开入口的作用域插槽组件,并保留历史上的完整能力行为。
|
|
19
|
-
*/
|
|
20
|
-
export declare function createWevuScopedSlotComponent(overrides?: CreateWevuScopedSlotComponentOptions): void;
|
|
21
|
-
//#endregion
|
|
22
|
-
//# sourceMappingURL=publicRuntime.d.mts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/pullDownRefresh.d.ts
|
|
2
|
-
export type PullDownRefreshHandler = () => void | Promise<void>;
|
|
3
|
-
export interface UseAsyncPullDownRefreshOptions {
|
|
4
|
-
onError?: (error: unknown) => void | Promise<void>;
|
|
5
|
-
stopPullDownRefresh?: () => unknown | Promise<unknown>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* 注册下拉刷新回调,并在回调结束后自动停止宿主下拉刷新状态。
|
|
9
|
-
*/
|
|
10
|
-
export declare function useAsyncPullDownRefresh(refresh: PullDownRefreshHandler, options?: UseAsyncPullDownRefreshOptions): void;
|
|
11
|
-
//#endregion
|
|
12
|
-
//# sourceMappingURL=pullDownRefresh.d.mts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MiniProgramAppOptions } from "../types/miniprogram.mjs";
|
|
2
|
-
import { ComputedDefinitions, MethodDefinitions } from "../types/core.mjs";
|
|
3
|
-
import { RuntimeApp } from "../types/runtime.mjs";
|
|
4
|
-
import { DefineAppOptions } from "../types/options.mjs";
|
|
5
|
-
import "../types.mjs";
|
|
6
|
-
import { WatchMap } from "./watch.mjs";
|
|
7
|
-
//#region src/runtime/register/app.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* 注册 App 入口(框架内部使用)。
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare function registerApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineAppOptions<D, C, M>['setup'], mpOptions: MiniProgramAppOptions): void;
|
|
13
|
-
//#endregion
|
|
14
|
-
//# sourceMappingURL=app.d.mts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MiniProgramComponentRawOptions } from "../types/miniprogram.mjs";
|
|
2
|
-
import { ComponentPropsOptions } from "../types/props/propTypes.mjs";
|
|
3
|
-
import { ComputedDefinitions, MethodDefinitions } from "../types/core.mjs";
|
|
4
|
-
import { RuntimeApp } from "../types/runtime.mjs";
|
|
5
|
-
import { DefineComponentOptions } from "../types/options.mjs";
|
|
6
|
-
import "../types.mjs";
|
|
7
|
-
import { WatchMap } from "./watch.mjs";
|
|
8
|
-
//#region src/runtime/register/component.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* 注册组件入口(框架内部使用)。
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
|
|
14
|
-
registerNative?: boolean;
|
|
15
|
-
}): any;
|
|
16
|
-
//#endregion
|
|
17
|
-
//# sourceMappingURL=component.d.mts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/register/inline.d.ts
|
|
2
|
-
export interface InlineExpressionEntry {
|
|
3
|
-
keys: string[];
|
|
4
|
-
indexKeys?: string[];
|
|
5
|
-
scopeResolvers?: Array<InlineExpressionScopeResolver | ((ctx: any, scope: Record<string, any>, event: any) => any) | undefined>;
|
|
6
|
-
fn: (ctx: any, scope: Record<string, any>, event: any) => any;
|
|
7
|
-
}
|
|
8
|
-
interface InlineExpressionScopeResolver {
|
|
9
|
-
type: 'for-item';
|
|
10
|
-
path: string;
|
|
11
|
-
indexKey: string;
|
|
12
|
-
}
|
|
13
|
-
export type InlineExpressionMap = Record<string, InlineExpressionEntry>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=inline.d.mts.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsOptions } from "../types/props/propTypes.mjs";
|
|
2
|
-
import { ComputedDefinitions, MethodDefinitions } from "../types/core.mjs";
|
|
3
|
-
import { InternalRuntimeState, RuntimeApp, RuntimeInstance } from "../types/runtime.mjs";
|
|
4
|
-
import { DefineAppOptions, DefineComponentOptions } from "../types/options.mjs";
|
|
5
|
-
import "../types.mjs";
|
|
6
|
-
import { WatchMap } from "./watch.mjs";
|
|
7
|
-
//#region src/runtime/register/runtimeInstance.d.ts
|
|
8
|
-
type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'] | DefineAppOptions<D, C, M>['setup'];
|
|
9
|
-
/**
|
|
10
|
-
* 挂载运行时实例(框架内部注册流程使用)。
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
|
|
14
|
-
deferSetData?: boolean;
|
|
15
|
-
snapshotOmitKeys?: string[];
|
|
16
|
-
}): RuntimeInstance<D, C, M>;
|
|
17
|
-
export declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
|
|
18
|
-
/**
|
|
19
|
-
* 卸载运行时实例(框架内部注册流程使用)。
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
|
|
23
|
-
skipHooks?: boolean;
|
|
24
|
-
}): void;
|
|
25
|
-
//#endregion
|
|
26
|
-
//# sourceMappingURL=runtimeInstance.d.mts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/register/setup.d.ts
|
|
2
|
-
type SetupRunner = {
|
|
3
|
-
bivarianceHack: (props: Record<string, any>, ctx: any) => any;
|
|
4
|
-
}['bivarianceHack'];
|
|
5
|
-
/**
|
|
6
|
-
* 执行 setup 函数并注入运行时上下文(框架内部使用)。
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
10
|
-
//#endregion
|
|
11
|
-
//# sourceMappingURL=setup.d.mts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "../../reactivity/index.mjs";
|
|
2
|
-
import "../types.mjs";
|
|
3
|
-
//#region src/runtime/register/watch.d.ts
|
|
4
|
-
type WatchHandler = (this: any, value: any, oldValue: any) => void;
|
|
5
|
-
export type WatchDescriptor = WatchHandler | string | {
|
|
6
|
-
handler: WatchHandler | string;
|
|
7
|
-
immediate?: boolean;
|
|
8
|
-
deep?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type WatchMap = Record<string, WatchDescriptor>;
|
|
11
|
-
//#endregion
|
|
12
|
-
//# sourceMappingURL=watch.d.mts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { registerApp } from "./register/app.mjs";
|
|
2
|
-
import { registerComponent } from "./register/component.mjs";
|
|
3
|
-
import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./register/runtimeInstance.mjs";
|
|
4
|
-
import { runSetupFunction } from "./register/setup.mjs";
|
|
5
|
-
export { mountRuntimeInstance, registerApp, registerComponent, runSetupFunction, setRuntimeSetDataVisibility, teardownRuntimeInstance };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { HostMiniProgramBoundingClientRectResult, HostMiniProgramNodesRefFields, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery } from "./types/miniprogramHost.mjs";
|
|
2
|
-
import { InternalRuntimeState } from "./types/runtime.mjs";
|
|
3
|
-
import "./types.mjs";
|
|
4
|
-
//#region src/runtime/selectorQuery.d.ts
|
|
5
|
-
export interface UseSelectorQueryOptions {
|
|
6
|
-
context?: InternalRuntimeState | null;
|
|
7
|
-
}
|
|
8
|
-
export interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
9
|
-
all?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
12
|
-
all?: boolean;
|
|
13
|
-
fields: HostMiniProgramNodesRefFields;
|
|
14
|
-
}
|
|
15
|
-
export interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
16
|
-
all?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
19
|
-
all: true;
|
|
20
|
-
}
|
|
21
|
-
export interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
22
|
-
all: true;
|
|
23
|
-
fields: HostMiniProgramNodesRefFields;
|
|
24
|
-
}
|
|
25
|
-
export interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
26
|
-
all: true;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* 创建绑定当前小程序实例的选择器查询工厂。
|
|
30
|
-
*/
|
|
31
|
-
export declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
|
|
32
|
-
/**
|
|
33
|
-
* 创建绑定当前小程序实例的节点布局查询函数。
|
|
34
|
-
*/
|
|
35
|
-
export declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
|
|
36
|
-
all?: false;
|
|
37
|
-
}): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult | null>;
|
|
38
|
-
export declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
|
|
39
|
-
/**
|
|
40
|
-
* 创建绑定当前小程序实例的节点字段查询函数。
|
|
41
|
-
*/
|
|
42
|
-
export declare function useSelectorFields(options: UseSelectorFieldsOptions & {
|
|
43
|
-
all?: false;
|
|
44
|
-
}): (selector: string) => Promise<Record<string, any> | null>;
|
|
45
|
-
export declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
|
|
46
|
-
/**
|
|
47
|
-
* 创建绑定当前小程序实例的滚动位置查询函数。
|
|
48
|
-
*/
|
|
49
|
-
export declare function useScrollOffset(options?: UseScrollOffsetOptions & {
|
|
50
|
-
all?: false;
|
|
51
|
-
}): (selector: string) => Promise<HostMiniProgramScrollOffsetResult | null>;
|
|
52
|
-
export declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
|
|
53
|
-
//#endregion
|
|
54
|
-
//# sourceMappingURL=selectorQuery.d.mts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/template.d.ts
|
|
2
|
-
export declare function normalizeStyle(value: any): string;
|
|
3
|
-
export declare function normalizeClass(value: any): string;
|
|
4
|
-
export declare function resolvePropValue(target: any, key: string, fallback: any, preferProps?: boolean): any;
|
|
5
|
-
//#endregion
|
|
6
|
-
//# sourceMappingURL=template.d.mts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TemplateRefValue } from "./types.mjs";
|
|
2
|
-
import { AlipayIntrinsicElements } from "@weapp-core/types/alipay";
|
|
3
|
-
import { TtIntrinsicElements } from "@weapp-core/types/tt";
|
|
4
|
-
import { WeappIntrinsicElements } from "@weapp-core/types/weapp";
|
|
5
|
-
//#region src/runtime/templateRefTypes.d.ts
|
|
6
|
-
type MiniProgramTemplateRefTagName = keyof AlipayIntrinsicElements | keyof TtIntrinsicElements | keyof WeappIntrinsicElements;
|
|
7
|
-
type MiniProgramTemplateRefElements = { [K in MiniProgramTemplateRefTagName]: TemplateRefValue; };
|
|
8
|
-
declare global {
|
|
9
|
-
interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//# sourceMappingURL=templateRefTypes.d.mts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComputedGetter, WritableComputedOptions } from "../../reactivity/computed.mjs";
|
|
2
|
-
import "../../reactivity/index.mjs";
|
|
3
|
-
//#region src/runtime/types/core.d.ts
|
|
4
|
-
export type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
5
|
-
export type MethodDefinitions = Record<string, (...args: any[]) => any>;
|
|
6
|
-
export type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never; };
|
|
7
|
-
export type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never; };
|
|
8
|
-
export type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
|
|
9
|
-
$attrs: Record<string, any>;
|
|
10
|
-
$props: P;
|
|
11
|
-
$refs: Record<string, any>;
|
|
12
|
-
$slots: S;
|
|
13
|
-
$set: <T extends object, K extends PropertyKey>(object: T, property: K, value: any) => any;
|
|
14
|
-
$delete: (object: object, property: PropertyKey) => boolean;
|
|
15
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
16
|
-
$nextTick: <T = void>(fn?: (this: ComponentPublicInstance<D, C, M, P, S>) => T) => Promise<T>;
|
|
17
|
-
$options: {
|
|
18
|
-
name?: string;
|
|
19
|
-
};
|
|
20
|
-
$parent?: ComponentPublicInstance;
|
|
21
|
-
};
|
|
22
|
-
export interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
|
|
23
|
-
event?: Event;
|
|
24
|
-
valueProp?: ValueProp;
|
|
25
|
-
parser?: (payload: any) => T;
|
|
26
|
-
formatter?: (value: T) => Formatted;
|
|
27
|
-
}
|
|
28
|
-
export type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted; } & { [K in `on${Capitalize<Event>}`]: (event: any) => void; };
|
|
29
|
-
export interface ModelBinding<T = any> {
|
|
30
|
-
value: T;
|
|
31
|
-
update: (value: T) => void;
|
|
32
|
-
model: <Event extends string = 'input', ValueProp extends string = 'value', Formatted = T>(options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
//# sourceMappingURL=core.d.mts.map
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./miniprogramHost.mjs";
|
|
2
|
-
//#region src/runtime/types/miniprogram.d.ts
|
|
3
|
-
export interface MiniProgramAdapter {
|
|
4
|
-
/**
|
|
5
|
-
* 下发视图数据。返回 `void` 表示同步完成;异步适配器必须返回在宿主提交后兑现的 Promise。
|
|
6
|
-
*/
|
|
7
|
-
setData?: (payload: Record<string, any>) => void | Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
type MpComponentOptions = HostMiniProgramComponentTrivialOption;
|
|
10
|
-
export type MiniProgramBehaviorIdentifier = HostMiniProgramBehaviorIdentifier | string;
|
|
11
|
-
export type MiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = HostMiniProgramComponentPropertyValue<TProperty>;
|
|
12
|
-
export type MiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = HostMiniProgramComponentInstance<D, P, M, B>;
|
|
13
|
-
export interface MiniProgramComponentOptions {
|
|
14
|
-
/**
|
|
15
|
-
* 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
|
|
16
|
-
*/
|
|
17
|
-
behaviors?: MiniProgramBehaviorIdentifier[];
|
|
18
|
-
/**
|
|
19
|
-
* 组件接受的外部样式类。
|
|
20
|
-
*/
|
|
21
|
-
externalClasses?: MpComponentOptions['externalClasses'];
|
|
22
|
-
/**
|
|
23
|
-
* 组件间关系定义。
|
|
24
|
-
*/
|
|
25
|
-
relations?: MpComponentOptions['relations'];
|
|
26
|
-
/**
|
|
27
|
-
* 组件数据字段监听器,用于监听 properties 和 data 的变化。
|
|
28
|
-
*/
|
|
29
|
-
observers?: MpComponentOptions['observers'];
|
|
30
|
-
/**
|
|
31
|
-
* 组件生命周期声明对象:
|
|
32
|
-
* `created`/`attached`/`ready`/`moved`/`detached`/`error`。
|
|
33
|
-
*
|
|
34
|
-
* 注意:wevu 会在 `attached/ready/detached/moved/error` 阶段做桥接与包装。
|
|
35
|
-
* setup 默认在 `attached` 执行,可通过 `setupLifecycle = "created"` 切换回旧行为。
|
|
36
|
-
*/
|
|
37
|
-
lifetimes?: MpComponentOptions['lifetimes'];
|
|
38
|
-
/**
|
|
39
|
-
* 组件所在页面的生命周期声明对象:`show`/`hide`/`resize`/`routeDone`。
|
|
40
|
-
*/
|
|
41
|
-
pageLifetimes?: MpComponentOptions['pageLifetimes'];
|
|
42
|
-
/**
|
|
43
|
-
* 组件选项(multipleSlots/styleIsolation/pureDataPattern/virtualHost 等)。
|
|
44
|
-
*/
|
|
45
|
-
options?: MpComponentOptions['options'];
|
|
46
|
-
/**
|
|
47
|
-
* 定义段过滤器,用于自定义组件扩展。
|
|
48
|
-
*/
|
|
49
|
-
definitionFilter?: MpComponentOptions['definitionFilter'];
|
|
50
|
-
/**
|
|
51
|
-
* 组件自定义导出:当使用组件导出 behavior(例如微信中的 `wx://component-export`)时,
|
|
52
|
-
* 可用于指定组件被 selectComponent 调用时的返回值。
|
|
53
|
-
*
|
|
54
|
-
* wevu 默认会将 setup() 中通过 `expose()` 写入的内容作为 export() 返回值,
|
|
55
|
-
* 因此大多数情况下无需手动编写 export();若同时提供 export(),则会与 expose() 结果浅合并。
|
|
56
|
-
*/
|
|
57
|
-
export?: MpComponentOptions['export'];
|
|
58
|
-
/**
|
|
59
|
-
* 原生 properties(与 wevu 的 props 不同)。
|
|
60
|
-
*
|
|
61
|
-
* - 推荐:使用 wevu 的 `props` 选项,让运行时规范化为小程序 `properties`。
|
|
62
|
-
* - 兼容:也可以直接传入小程序 `properties`。
|
|
63
|
-
*/
|
|
64
|
-
properties?: MpComponentOptions['properties'];
|
|
65
|
-
/**
|
|
66
|
-
* 旧式生命周期(基础库 `2.2.3` 起推荐使用 `lifetimes` 字段)。
|
|
67
|
-
* 保留以增强类型提示与兼容性。
|
|
68
|
-
*/
|
|
69
|
-
created?: MpComponentOptions['created'];
|
|
70
|
-
attached?: MpComponentOptions['attached'];
|
|
71
|
-
ready?: MpComponentOptions['ready'];
|
|
72
|
-
moved?: MpComponentOptions['moved'];
|
|
73
|
-
detached?: MpComponentOptions['detached'];
|
|
74
|
-
error?: MpComponentOptions['error'];
|
|
75
|
-
}
|
|
76
|
-
export type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = HostMiniProgramAppOptions<T>;
|
|
77
|
-
export type MiniProgramInstance = HostMiniProgramComponentTrivialInstance | HostMiniProgramPageTrivialInstance | HostMiniProgramAppTrivialInstance;
|
|
78
|
-
export type MiniProgramPageLifetimes = Partial<HostMiniProgramPageLifetime>;
|
|
79
|
-
export type MiniProgramComponentRawOptions = Omit<HostMiniProgramComponentTrivialOption, 'behaviors'> & {
|
|
80
|
-
behaviors?: MiniProgramBehaviorIdentifier[];
|
|
81
|
-
} & MiniProgramPageLifetimes & Record<string, any>;
|
|
82
|
-
//#endregion
|
|
83
|
-
export type { HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime as MiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter as MiniProgramRouter, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, HostMiniProgramTriggerEventOptions as TriggerEventOptions };
|
|
84
|
-
//# sourceMappingURL=miniprogram.d.mts.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./miniprogramHostSources.mjs";
|
|
2
|
-
//#region src/runtime/types/miniprogramHost.d.ts
|
|
3
|
-
export type HostMiniProgramComponentBehaviorOptions = MiniProgramHostNamespace.Component.ComponentOptions;
|
|
4
|
-
export type HostMiniProgramComponentTrivialOption = MiniProgramHostNamespace.Component.TrivialOption;
|
|
5
|
-
export type HostMiniProgramBehaviorIdentifier = MiniProgramHostNamespace.Behavior.Identifier;
|
|
6
|
-
export type HostMiniProgramLaunchOptions = MiniProgramHostNamespace.App.LaunchShowOption;
|
|
7
|
-
export type HostMiniProgramPageNotFoundOptions = MiniProgramHostNamespace.App.PageNotFoundOption;
|
|
8
|
-
export type HostMiniProgramUnhandledRejectionResult = MiniProgramHostNamespace.OnUnhandledRejectionListenerResult;
|
|
9
|
-
export type HostMiniProgramThemeChangeResult = MiniProgramHostNamespace.OnThemeChangeListenerResult;
|
|
10
|
-
export type HostMiniProgramMemoryWarningResult = MiniProgramHostNamespace.OnMemoryWarningListenerResult;
|
|
11
|
-
export type HostMiniProgramPageScrollOption = MiniProgramHostNamespace.Page.IPageScrollOption;
|
|
12
|
-
export type HostMiniProgramTabItemTapOption = MiniProgramHostNamespace.Page.ITabItemTapOption;
|
|
13
|
-
export type HostMiniProgramPageResizeOption = MiniProgramHostNamespace.Page.IResizeOption;
|
|
14
|
-
export type HostMiniProgramShareAppMessageOption = MiniProgramHostNamespace.Page.IShareAppMessageOption;
|
|
15
|
-
export type HostMiniProgramAddToFavoritesOption = MiniProgramHostNamespace.Page.IAddToFavoritesOption;
|
|
16
|
-
export type HostMiniProgramSaveExitState = MiniProgramHostNamespace.Page.ISaveExitState;
|
|
17
|
-
export type HostMiniProgramRouter = MiniProgramHostNamespace.Component.Router;
|
|
18
|
-
export type HostMiniProgramSwitchTabOption = MiniProgramHostNamespace.SwitchTabOption;
|
|
19
|
-
export type HostMiniProgramReLaunchOption = MiniProgramHostNamespace.ReLaunchOption;
|
|
20
|
-
export type HostMiniProgramRedirectToOption = MiniProgramHostNamespace.RedirectToOption;
|
|
21
|
-
export type HostMiniProgramNavigateToOption = MiniProgramHostNamespace.NavigateToOption;
|
|
22
|
-
export type HostMiniProgramPageLifetime = MiniProgramHostNamespace.Page.ILifetime;
|
|
23
|
-
export type HostMiniProgramNodesRef = MiniProgramHostNamespace.NodesRef;
|
|
24
|
-
export type HostMiniProgramNodesRefFields = Parameters<HostMiniProgramNodesRef['fields']>[0];
|
|
25
|
-
export type HostMiniProgramBoundingClientRectResult = MiniProgramHostNamespace.BoundingClientRectCallbackResult;
|
|
26
|
-
export type HostMiniProgramScrollOffsetResult = MiniProgramHostNamespace.ScrollOffsetCallbackResult;
|
|
27
|
-
export type HostMiniProgramSelectorQuery = MiniProgramHostNamespace.SelectorQuery;
|
|
28
|
-
export type HostMiniProgramIntersectionObserverOptions = MiniProgramHostNamespace.CreateIntersectionObserverOption;
|
|
29
|
-
export type HostMiniProgramIntersectionObserver = MiniProgramHostNamespace.IntersectionObserver;
|
|
30
|
-
export type HostMiniProgramComponentPropertyOption = MiniProgramHostNamespace.Component.PropertyOption;
|
|
31
|
-
export type HostMiniProgramComponentMethodOption = MiniProgramHostNamespace.Component.MethodOption;
|
|
32
|
-
export type HostMiniProgramComponentEmptyArray = MiniProgramHostNamespace.Component.IEmptyArray;
|
|
33
|
-
export type HostMiniProgramComponentAllProperty = MiniProgramHostNamespace.Component.AllProperty;
|
|
34
|
-
export type HostMiniProgramComponentAllFullProperty = MiniProgramHostNamespace.Component.AllFullProperty;
|
|
35
|
-
export type HostMiniProgramComponentShortProperty = MiniProgramHostNamespace.Component.ShortProperty;
|
|
36
|
-
export type HostMiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = MiniProgramHostNamespace.Component.PropertyToData<TProperty>;
|
|
37
|
-
export type HostMiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = MiniProgramHostNamespace.Component.Instance<D, P, M, B>;
|
|
38
|
-
export type HostMiniProgramTriggerEventOptions = MiniProgramHostNamespace.Component.TriggerEventOption;
|
|
39
|
-
export type HostMiniProgramAppOptions<T extends Record<string, any>> = MiniProgramHostNamespace.App.Options<T>;
|
|
40
|
-
export type HostMiniProgramComponentTrivialInstance = MiniProgramHostNamespace.Component.TrivialInstance;
|
|
41
|
-
export type HostMiniProgramPageTrivialInstance = MiniProgramHostNamespace.Page.TrivialInstance;
|
|
42
|
-
export type HostMiniProgramAppTrivialInstance = MiniProgramHostNamespace.App.TrivialInstance;
|
|
43
|
-
//#endregion
|
|
44
|
-
export type { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract };
|
|
45
|
-
//# sourceMappingURL=miniprogramHost.d.mts.map
|