wevu 6.21.0 → 6.22.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/dist/dev/index.mjs +2 -1
- package/dist/dev/internal-runtime.mjs +2 -1
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/runtime/css.mjs +37 -0
- package/dist/dev/runtime/css.mjs.map +1 -0
- package/dist/dev/runtime/define.mjs +5 -3
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/vue-demi.mjs +2 -1
- package/dist/dev/vue-demi.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/internal-runtime.d.mts +2 -1
- package/dist/internal-runtime.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/runtime/css.d.mts +14 -0
- package/dist/runtime/css.mjs +1 -0
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/index.d.mts +2 -1
- package/dist/vue-demi.d.mts +2 -1
- package/dist/vue-demi.mjs +1 -1
- package/package.json +6 -6
package/dist/dev/index.mjs
CHANGED
|
@@ -27,6 +27,7 @@ import { registerApp } from "./runtime/register/app.mjs";
|
|
|
27
27
|
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, waitForLayoutHost } from "./runtime/layoutBridge.mjs";
|
|
28
28
|
import { registerComponent } from "./runtime/register/component.mjs";
|
|
29
29
|
import { createApp } from "./runtime/app.mjs";
|
|
30
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
30
31
|
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
31
32
|
import { createWevuComponent, createWevuScopedSlotComponent, defineComponent } from "./runtime/define.mjs";
|
|
32
33
|
import { useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -49,4 +50,4 @@ import { storeToRefs } from "./store/storeToRefs.mjs";
|
|
|
49
50
|
|
|
50
51
|
export * from "@wevu/web-apis"
|
|
51
52
|
|
|
52
|
-
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
53
|
+
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
@@ -14,6 +14,7 @@ import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJ
|
|
|
14
14
|
import { resolveLayoutBridge, resolveLayoutHost, useLayoutBridge, useLayoutHosts, waitForLayoutHost } from "./runtime/layoutBridge.mjs";
|
|
15
15
|
import { registerComponent } from "./runtime/register/component.mjs";
|
|
16
16
|
import { createApp } from "./runtime/app.mjs";
|
|
17
|
+
import { useCssModule, useCssVars } from "./runtime/css.mjs";
|
|
17
18
|
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
18
19
|
import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
|
|
19
20
|
import { useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -31,4 +32,4 @@ import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router
|
|
|
31
32
|
import { useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
32
33
|
import { createUniAppHost } from "./runtime/uniAppHost.mjs";
|
|
33
34
|
|
|
34
|
-
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
35
|
+
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
package/dist/dev/package.mjs
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { unref } from "../reactivity/ref.mjs";
|
|
2
|
+
import { computed } from "../reactivity/computed.mjs";
|
|
3
|
+
import { assertInSetup } from "./hooks/base.mjs";
|
|
4
|
+
import { WEVU_CSS_MODULES_KEY, WEVU_CSS_VARS_STYLE_KEY } from "@weapp-core/constants";
|
|
5
|
+
|
|
6
|
+
//#region src/runtime/css.ts
|
|
7
|
+
function stringifyCssVars(values) {
|
|
8
|
+
return Object.entries(values).map(([key, value]) => `--${key}:${value == null ? "" : String(unref(value))}`).join(";");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 读取当前 SFC 的 CSS Modules 映射。
|
|
12
|
+
*/
|
|
13
|
+
function useCssModule(name = "$style") {
|
|
14
|
+
const modules = assertInSetup("useCssModule")[WEVU_CSS_MODULES_KEY];
|
|
15
|
+
const resolved = modules === null || modules === void 0 ? void 0 : modules[name];
|
|
16
|
+
if (!resolved || typeof resolved !== "object") throw new Error(`useCssModule() 找不到名为 ${JSON.stringify(name)} 的 CSS Module`);
|
|
17
|
+
return resolved;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 注册编译器生成的响应式 CSS 变量。
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
function useCssVars(getter) {
|
|
24
|
+
const instance = assertInSetup("useCssVars");
|
|
25
|
+
const runtime = instance.__wevu;
|
|
26
|
+
const style = computed(() => {
|
|
27
|
+
var _runtime$proxy;
|
|
28
|
+
return stringifyCssVars(getter((_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : instance));
|
|
29
|
+
});
|
|
30
|
+
if ((runtime === null || runtime === void 0 ? void 0 : runtime.state) && typeof runtime.state === "object") runtime.state[WEVU_CSS_VARS_STYLE_KEY] = style;
|
|
31
|
+
if ((runtime === null || runtime === void 0 ? void 0 : runtime.setupState) && typeof runtime.setupState === "object") runtime.setupState[WEVU_CSS_VARS_STYLE_KEY] = style;
|
|
32
|
+
return style;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { useCssModule, useCssVars };
|
|
37
|
+
//# sourceMappingURL=css.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.mjs","names":[],"sources":["../../../src/runtime/css.ts"],"sourcesContent":["import type { ComputedRef } from '../reactivity'\nimport { WEVU_CSS_MODULES_KEY, WEVU_CSS_VARS_STYLE_KEY } from '@weapp-core/constants'\nimport { computed, unref } from '../reactivity'\nimport { assertInSetup } from './hooks/base'\n\nfunction stringifyCssVars(values: Record<string, unknown>) {\n return Object.entries(values)\n .map(([key, value]) => `--${key}:${value == null ? '' : String(unref(value as any))}`)\n .join(';')\n}\n\n/**\n * 读取当前 SFC 的 CSS Modules 映射。\n */\nexport function useCssModule(name = '$style'): Record<string, string> {\n const instance = assertInSetup('useCssModule') as Record<string, any>\n const modules = instance[WEVU_CSS_MODULES_KEY]\n const resolved = modules?.[name]\n if (!resolved || typeof resolved !== 'object') {\n throw new Error(`useCssModule() 找不到名为 ${JSON.stringify(name)} 的 CSS Module`)\n }\n return resolved\n}\n\n/**\n * 注册编译器生成的响应式 CSS 变量。\n * @internal\n */\nexport function useCssVars(getter: (context: Record<string, any>) => Record<string, unknown>): ComputedRef<string> {\n const instance = assertInSetup('useCssVars') as Record<string, any>\n const runtime = instance.__wevu\n const style = computed(() => stringifyCssVars(getter(runtime?.proxy ?? instance)))\n if (runtime?.state && typeof runtime.state === 'object') {\n runtime.state[WEVU_CSS_VARS_STYLE_KEY] = style\n }\n if (runtime?.setupState && typeof runtime.setupState === 'object') {\n runtime.setupState[WEVU_CSS_VARS_STYLE_KEY] = style\n }\n return style\n}\n"],"mappings":";;;;;;AAKA,SAAS,iBAAiB,QAAiC;CACzD,OAAO,OAAO,QAAQ,MAAM,CAAC,CAC1B,KAAK,CAAC,KAAK,WAAW,KAAK,IAAI,GAAG,SAAS,OAAO,KAAK,OAAO,MAAM,KAAY,CAAC,GAAG,CAAC,CACrF,KAAK,GAAG;AACb;;;;AAKA,SAAgB,aAAa,OAAO,UAAkC;CAEpE,MAAM,UADW,cAAc,cACR,CAAC,CAAC;CACzB,MAAM,6DAAW,QAAU;CAC3B,IAAI,CAAC,YAAY,OAAO,aAAa,UACnC,MAAM,IAAI,MAAM,wBAAwB,KAAK,UAAU,IAAI,EAAE,cAAc;CAE7E,OAAO;AACT;;;;;AAMA,SAAgB,WAAW,QAAwF;CACjH,MAAM,WAAW,cAAc,YAAY;CAC3C,MAAM,UAAU,SAAS;CACzB,MAAM,QAAQ,eAAe;;0BAAiB,2EAAO,QAAS,gEAAS,QAAQ,CAAC;EAAC;CACjF,uDAAI,QAAS,UAAS,OAAO,QAAQ,UAAU,UAC7C,QAAQ,MAAM,2BAA2B;CAE3C,uDAAI,QAAS,eAAc,OAAO,QAAQ,eAAe,UACvD,QAAQ,WAAW,2BAA2B;CAEhD,OAAO;AACT"}
|
|
@@ -10,7 +10,7 @@ import { applyOptionsApiProvide, resolveOptionsApiInjections } from "./define/op
|
|
|
10
10
|
import { normalizeProps } from "./define/props.mjs";
|
|
11
11
|
import { createScopedSlotOptions } from "./define/scopedSlotOptions.mjs";
|
|
12
12
|
import { applySetupResult } from "./define/setupResult.mjs";
|
|
13
|
-
import { WEVU_FUNCTION_PROP_PATHS_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_SCOPE_KEY } from "@weapp-core/constants";
|
|
13
|
+
import { WEVU_CSS_MODULES_KEY, WEVU_FUNCTION_PROP_PATHS_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SLOT_OWNER_ID_KEY, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_SCOPE_KEY } from "@weapp-core/constants";
|
|
14
14
|
|
|
15
15
|
//#region src/runtime/define.ts
|
|
16
16
|
let scopedSlotCreator;
|
|
@@ -58,7 +58,7 @@ function defineComponent(options) {
|
|
|
58
58
|
}
|
|
59
59
|
function createComponentDefinition(options, registerNative) {
|
|
60
60
|
if (registerNative) ensureScopedSlotComponentGlobal();
|
|
61
|
-
const { __typeProps: _typeProps, data, computed, methods, setData, watch, setup, props, inject: injectOptions, provide: provideOptions, allowFunctionProps, ...mpOptions } = resolveVueComponentOptions(applyWevuComponentDefaults(options));
|
|
61
|
+
const { __typeProps: _typeProps, data, computed, methods, setData, watch, setup, props, inject: injectOptions, provide: provideOptions, allowFunctionProps, [WEVU_CSS_MODULES_KEY]: cssModules, ...mpOptions } = resolveVueComponentOptions(applyWevuComponentDefaults(options));
|
|
62
62
|
const rawFunctionPropPaths = mpOptions[WEVU_FUNCTION_PROP_PATHS_KEY];
|
|
63
63
|
const functionPropPaths = Array.isArray(rawFunctionPropPaths) ? [...new Set(rawFunctionPropPaths.filter((path) => typeof path === "string" && path.length > 0))] : [];
|
|
64
64
|
delete mpOptions[WEVU_FUNCTION_PROP_PATHS_KEY];
|
|
@@ -74,14 +74,16 @@ function createComponentDefinition(options, registerNative) {
|
|
|
74
74
|
const normalizedMpOptions = normalizeProps(mpOptions, props);
|
|
75
75
|
const initialDataContext = resolveInitialDataContext(normalizedMpOptions.properties, methods);
|
|
76
76
|
const resolvedData = typeof data === "function" ? () => data.call(initialDataContext) : data;
|
|
77
|
-
const setupWrapper = typeof setup === "function" || injectOptions != null || provideOptions != null ? ((props, ctx) => {
|
|
77
|
+
const setupWrapper = typeof setup === "function" || injectOptions != null || provideOptions != null || cssModules ? ((props, ctx) => {
|
|
78
78
|
var _ref, _proxy;
|
|
79
|
+
if (cssModules && typeof cssModules === "object") ctx.instance[WEVU_CSS_MODULES_KEY] = cssModules;
|
|
79
80
|
const publicInstance = (_ref = (_proxy = ctx === null || ctx === void 0 ? void 0 : ctx.proxy) !== null && _proxy !== void 0 ? _proxy : ctx === null || ctx === void 0 ? void 0 : ctx.instance) !== null && _ref !== void 0 ? _ref : Object.create(null);
|
|
80
81
|
const injected = resolveOptionsApiInjections(injectOptions, publicInstance);
|
|
81
82
|
if (provideOptions != null) applyOptionsApiProvide(provideOptions, publicInstance);
|
|
82
83
|
const setupResult = typeof setup === "function" ? runSetupFunction(setup, props, ctx) : void 0;
|
|
83
84
|
const result = {
|
|
84
85
|
...injected,
|
|
86
|
+
...cssModules !== null && cssModules !== void 0 ? cssModules : {},
|
|
85
87
|
...setupResult !== null && setupResult !== void 0 ? setupResult : {}
|
|
86
88
|
};
|
|
87
89
|
if (ctx && Object.keys(result).length) applySetupResult(ctx.runtime, ctx.instance, result, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.mjs","names":[],"sources":["../../../src/runtime/define.ts"],"sourcesContent":["import type { RuntimeComponentDefinitionOptions } from './define/componentDefinition'\nimport type { InlineExpressionMap } from './register/inline'\nimport type { TemplateRefBinding } from './templateRefs'\nimport type {\n ComponentPropsOptions,\n ComponentPublicInstance,\n ComputedDefinitions,\n DefineComponent,\n DefineComponentOptions,\n InferProps,\n MethodDefinitions,\n MiniProgramComponentPropertyOption,\n MiniProgramComponentRawOptions,\n ShallowUnwrapRef,\n} from './types'\nimport {\n WEVU_FUNCTION_PROP_PATHS_KEY,\n WEVU_SCOPED_SLOT_CREATOR_KEY,\n WEVU_SLOT_OWNER_ID_KEY,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n} from '@weapp-core/constants'\nimport { hasOwn } from '../utils'\nimport { applyWevuComponentDefaults } from './defaults'\nimport {\n createRuntimeComponentDefinition,\n} from './define/componentDefinition'\nimport { resolveNativeInitialData } from './define/initialComputed'\nimport { resolveVueComponentOptions } from './define/options'\nimport { applyOptionsApiProvide, resolveOptionsApiInjections } from './define/optionsApi'\nimport { normalizeProps } from './define/props'\nimport { createScopedSlotOptions } from './define/scopedSlotOptions'\nimport { applySetupResult } from './define/setupResult'\nimport { getScopedSlotHostGlobalObject } from './platform'\nimport { runSetupFunction } from './register'\nimport { allocateOwnerId } from './scopedSlots'\n\nlet scopedSlotCreator: (() => void) | undefined\nconst componentLifecycleDefinitions = new WeakMap<object, Record<string, any>>()\n\nfunction ensureScopedSlotComponentGlobal() {\n const globalObject = getScopedSlotHostGlobalObject()\n if (!globalObject) {\n return\n }\n const globalRecord = globalObject as Record<string, any>\n if (scopedSlotCreator && globalRecord[WEVU_SCOPED_SLOT_CREATOR_KEY] !== scopedSlotCreator) {\n globalRecord[WEVU_SCOPED_SLOT_CREATOR_KEY] = scopedSlotCreator\n }\n}\n\nfunction resolveInitialDataContext(properties: unknown, methods: MethodDefinitions | undefined) {\n const context: Record<string, unknown> = { ...(methods ?? {}) }\n if (!properties || typeof properties !== 'object') {\n return context\n }\n for (const [name, definition] of Object.entries(properties)) {\n if (definition && typeof definition === 'object' && hasOwn(definition, 'value')) {\n context[name] = (definition as Record<string, unknown>).value\n }\n }\n return context\n}\n\nfunction shouldSeedNativeSlotOwnerId(\n mpOptions: Record<string, any>,\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n return Boolean((mpOptions as any).__wevu_isPage)\n && Array.isArray(setData?.pick)\n && setData.pick.includes(WEVU_SLOT_OWNER_ID_KEY)\n}\n\nfunction shouldDeclareNativeSlotOwnerId(\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n return Array.isArray(setData?.pick)\n && setData.pick.includes(WEVU_SLOT_OWNER_ID_KEY)\n}\n\nfunction hasScopedSlotHostProperties(mpOptions: Record<string, any>) {\n const properties = mpOptions.properties\n return Boolean(\n properties\n && typeof properties === 'object'\n && (\n WEVU_SLOT_OWNER_ID_PROP in properties\n || WEVU_SLOT_SCOPE_KEY in properties\n ),\n )\n}\n\nfunction resolveScopedSlotHostSetData(\n mpOptions: Record<string, any>,\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n if (setData?.strategy !== 'patch' || !hasScopedSlotHostProperties(mpOptions)) {\n return setData\n }\n return {\n ...setData,\n strategy: 'diff' as const,\n }\n}\n\n/**\n * defineComponent 返回的组件定义描述,用于手动注册或高级用法。\n */\nexport interface ComponentDefinition<\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> {\n /**\n * 内部 runtime app(高级能力使用),不对外暴露正式 API。\n * @internal\n */\n __wevu_runtime: import('./types').RuntimeApp<D, C, M>\n\n /**\n * 内部选项快照(高级能力使用),包含 data/computed/methods 等。\n * @internal\n */\n __wevu_options: {\n data: () => D\n computed: C\n methods: M\n setData: import('./types').SetDataSnapshotOptions | undefined\n watch: Record<string, any> | undefined\n setup: ((props: any, ctx: any) => any) | undefined\n mpOptions: MiniProgramComponentRawOptions\n }\n}\n\nfunction materializeComponentDefinition(\n componentOptions: RuntimeComponentDefinitionOptions,\n registerNative = false,\n) {\n const { lifecycleDefinition, runtimeApp } = createRuntimeComponentDefinition(componentOptions, registerNative)\n const definition: ComponentDefinition<any, any, any> = {\n __wevu_runtime: runtimeApp as any,\n __wevu_options: componentOptions as ComponentDefinition<any, any, any>['__wevu_options'],\n }\n componentLifecycleDefinitions.set(definition, lifecycleDefinition)\n return definition\n}\n\ntype SetupBindings<S> = Exclude<S, void> extends never ? Record<string, never> : Exclude<S, void>\ntype ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P\n\nexport interface WevuComponentConstructor<\n Props,\n RawBindings,\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> {\n new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>\n}\n\nexport type WevuDefinedComponent<\n PropsOrPropOptions,\n RawBindings,\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> = DefineComponent<PropsOrPropOptions, RawBindings, D, C, M> & ComponentDefinition<D, C, M>\nexport interface SetupContextWithTypeProps<TypeProps> {\n props: TypeProps\n [key: string]: any\n}\nexport type SetupFunctionWithTypeProps<\n TypeProps,\n> = (\n props: TypeProps,\n ctx: SetupContextWithTypeProps<TypeProps>,\n) => Record<string, any> | void\nexport interface DefineComponentTypePropsOptions<TypeProps> {\n __typeProps: TypeProps\n setup?: SetupFunctionWithTypeProps<TypeProps>\n [key: string]: any\n}\nexport interface DefineComponentWithTypeProps<TypeProps> {\n new (): { $props: TypeProps } & Record<string, any>\n}\n\n/**\n * 按 Vue 3 风格定义一个小程序组件/页面。\n *\n * - 统一注册为 `Component()`\n *\n * @param options 组件定义项\n * @returns 可手动注册的组件定义\n *\n * @example\n * ```ts\n * defineComponent({\n * data: () => ({ count: 0 }),\n * setup() {\n * onMounted(() => console.log('已挂载'))\n * }\n * })\n * ```\n *\n * @example\n * ```ts\n * defineComponent({\n * setup() {\n * onPageScroll(() => {})\n * }\n * })\n * ```\n */\n// @ts-expect-error -- TS2589:__typeProps 签名的重载实例化深度过高。\nexport function defineComponent<\n TypeProps = any,\n>(\n options: DefineComponentTypePropsOptions<TypeProps>,\n): DefineComponentWithTypeProps<TypeProps>\nexport function defineComponent<\n P extends ComponentPropsOptions = ComponentPropsOptions,\n D extends object = Record<string, any>,\n C extends ComputedDefinitions = ComputedDefinitions,\n M extends MethodDefinitions = MethodDefinitions,\n S extends Record<string, any> | void = Record<string, any> | void,\n>(\n options: DefineComponentOptions<P, D, C, M, S>,\n): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>\nexport function defineComponent(\n options: DefineComponentOptions<any, any, any, any, any>,\n): WevuComponentConstructor<Record<string, any>, Record<string, any>, Record<string, any>, ComputedDefinitions, MethodDefinitions>\n & ComponentDefinition<any, any, any> {\n // eslint-disable-next-line ts/no-use-before-define -- 重载实现需保持在内部共享工厂之前。\n return createComponentDefinition(options, true) as any\n}\n\nfunction createComponentDefinition(\n options: DefineComponentOptions<any, any, any, any, any>,\n registerNative: boolean,\n) {\n if (registerNative) {\n ensureScopedSlotComponentGlobal()\n }\n const resolvedOptions = resolveVueComponentOptions(applyWevuComponentDefaults(options))\n const {\n __typeProps: _typeProps,\n data,\n computed,\n methods,\n setData,\n watch,\n setup,\n props,\n inject: injectOptions,\n provide: provideOptions,\n allowFunctionProps,\n ...mpOptions\n } = resolvedOptions\n\n const rawFunctionPropPaths = (mpOptions as any)[WEVU_FUNCTION_PROP_PATHS_KEY]\n const functionPropPaths: string[] = Array.isArray(rawFunctionPropPaths)\n ? [...new Set(rawFunctionPropPaths.filter((path: unknown): path is string => typeof path === 'string' && path.length > 0))]\n : []\n delete (mpOptions as any)[WEVU_FUNCTION_PROP_PATHS_KEY]\n\n const rawResolvedSetData = allowFunctionProps === true\n ? {\n ...(setData ?? {}),\n includeFunctions: true,\n functionPaths: functionPropPaths,\n }\n : allowFunctionProps === false\n ? setData\n : functionPropPaths.length\n ? {\n ...(setData ?? {}),\n functionPaths: functionPropPaths,\n }\n : setData\n const resolvedSetData = resolveScopedSlotHostSetData(mpOptions, rawResolvedSetData)\n const setupFunctionPropKeys = new Set(\n functionPropPaths\n .filter(path => !path.includes('.')),\n )\n\n const normalizedMpOptions = normalizeProps(mpOptions, props)\n const initialDataContext = resolveInitialDataContext(normalizedMpOptions.properties, methods)\n const resolvedData = typeof data === 'function'\n ? () => data.call(initialDataContext)\n : data\n\n const hasOptionsApiContext = injectOptions != null || provideOptions != null\n const setupWrapper = typeof setup === 'function' || hasOptionsApiContext\n ? ((props, ctx) => {\n const publicInstance = (ctx as any)?.proxy ?? (ctx as any)?.instance ?? Object.create(null)\n const injected = resolveOptionsApiInjections(injectOptions, publicInstance)\n if (provideOptions != null) {\n applyOptionsApiProvide(provideOptions, publicInstance)\n }\n const setupResult = typeof setup === 'function'\n ? runSetupFunction(setup as any, props as Record<string, any>, ctx as any) as Record<string, any> | void\n : undefined\n const result = {\n ...injected,\n ...(setupResult ?? {}),\n }\n if (ctx && Object.keys(result).length) {\n applySetupResult((ctx as any).runtime, (ctx as any).instance, result, {\n includeFunctionsInState: allowFunctionProps === true,\n functionPropPaths: allowFunctionProps === false ? undefined : setupFunctionPropKeys,\n })\n }\n return result\n }) satisfies DefineComponentOptions<ComponentPropsOptions, any, any, any, any>['setup']\n : undefined\n\n const nativeData = typeof resolvedData === 'function'\n ? resolvedData()\n : resolvedData\n const shouldDeclareOwnerId = shouldDeclareNativeSlotOwnerId(resolvedSetData)\n const seededNativeData = shouldDeclareOwnerId\n ? {\n ...(nativeData && typeof nativeData === 'object' ? nativeData : {}),\n [WEVU_SLOT_OWNER_ID_KEY]: shouldSeedNativeSlotOwnerId(mpOptions, resolvedSetData)\n ? (nativeData as any)?.[WEVU_SLOT_OWNER_ID_KEY] || allocateOwnerId()\n : (nativeData as any)?.[WEVU_SLOT_OWNER_ID_KEY] || '',\n }\n : nativeData\n const nativeInitialData = resolveNativeInitialData(seededNativeData, computed as ComputedDefinitions, resolvedSetData, methods as Record<string, any> | undefined)\n const mpOptionsWithProps = nativeInitialData !== undefined\n ? {\n ...normalizedMpOptions,\n data: nativeInitialData,\n }\n : normalizedMpOptions\n\n const componentOptions: RuntimeComponentDefinitionOptions = {\n data: resolvedData as () => Record<string, any>,\n computed: computed as ComputedDefinitions,\n methods: methods as MethodDefinitions,\n setData: resolvedSetData,\n watch,\n setup: setupWrapper,\n mpOptions: mpOptionsWithProps as MiniProgramComponentRawOptions,\n }\n\n const definition = materializeComponentDefinition(componentOptions, registerNative)\n\n return definition as unknown as WevuComponentConstructor<\n ResolveProps<ComponentPropsOptions>,\n Record<string, any>,\n Record<string, any>,\n ComputedDefinitions,\n MethodDefinitions\n > & ComponentDefinition<any, any, any>\n}\n\n/**\n * 创建不触发宿主全局注册的 Wevu 组件定义。\n *\n * @param options 组件选项\n * @internal\n */\nexport function createWevuComponentDefinition(\n options: DefineComponentOptions<any, any, any, any, any>,\n) {\n return createComponentDefinition(options, false)\n}\n\n/**\n * 从现有组件定义派生拥有独立应用上下文的组件定义。\n *\n * @param definition 已解析的 Wevu 组件定义\n * @internal\n */\nexport function createIsolatedWevuComponentDefinition(definition: object) {\n const componentOptions = (definition as ComponentDefinition<any, any, any>).__wevu_options\n if (!componentOptions) {\n throw new TypeError('无法从非 Wevu 组件定义创建独立运行时')\n }\n return materializeComponentDefinition(componentOptions)\n}\n\n/**\n * 获取组件定义对应的宿主生命周期定义。\n *\n * @param definition Wevu 组件定义\n * @internal\n */\nexport function getWevuComponentLifecycleDefinition(definition: object) {\n return componentLifecycleDefinitions.get(definition)\n}\n\n/**\n * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。\n *\n * @param options 组件选项,可能包含小程序特有的 properties\n * @internal\n */\nexport function createWevuComponent<\n P extends ComponentPropsOptions = ComponentPropsOptions,\n D extends object = Record<string, any>,\n C extends ComputedDefinitions = ComputedDefinitions,\n M extends MethodDefinitions = MethodDefinitions,\n>(\n options: DefineComponentOptions<P, D, C, M> & { properties?: MiniProgramComponentPropertyOption },\n): void {\n ensureScopedSlotComponentGlobal()\n const {\n properties,\n props,\n ...restOptions\n } = options\n\n const baseOptions = {\n ...restOptions,\n allowNullPropInput: (restOptions as any).allowNullPropInput ?? true,\n __wevu_allowNullPropInput: true,\n }\n\n // 将 properties 合并到 mpOptions,保持小程序属性定义\n const finalOptions = normalizeProps(baseOptions, props, properties)\n\n defineComponent(finalOptions)\n}\n\n/**\n * scoped slot 兼容组件入口(编译产物内部使用)。\n * @internal\n */\nexport function createWevuScopedSlotComponent(\n overrides?: {\n computed?: ComputedDefinitions\n inlineMap?: InlineExpressionMap\n templateRefs?: TemplateRefBinding[]\n },\n): void {\n const baseOptions = createScopedSlotOptions(overrides)\n createWevuComponent(baseOptions as any)\n}\n\nscopedSlotCreator = createWevuScopedSlotComponent\nensureScopedSlotComponentGlobal()\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,IAAI;AACJ,MAAM,gDAAgC,IAAI,QAAqC;AAE/E,SAAS,kCAAkC;CACzC,MAAM,eAAe,8BAA8B;CACnD,IAAI,CAAC,cACH;CAEF,MAAM,eAAe;CACrB,IAAI,qBAAqB,aAAa,kCAAkC,mBACtE,aAAa,gCAAgC;AAEjD;AAEA,SAAS,0BAA0B,YAAqB,SAAwC;CAC9F,MAAM,UAAmC,EAAE,GAAI,mDAAW,CAAC,EAAG;CAC9D,IAAI,CAAC,cAAc,OAAO,eAAe,UACvC,OAAO;CAET,KAAK,MAAM,CAAC,MAAM,eAAe,OAAO,QAAQ,UAAU,GACxD,IAAI,cAAc,OAAO,eAAe,YAAY,OAAO,YAAY,OAAO,GAC5E,QAAQ,QAAS,WAAuC;CAG5D,OAAO;AACT;AAEA,SAAS,4BACP,WACA,SACA;CACA,OAAO,QAAS,UAAkB,aAAa,KAC1C,MAAM,0DAAQ,QAAS,IAAI,KAC3B,QAAQ,KAAK,SAAS,sBAAsB;AACnD;AAEA,SAAS,+BACP,SACA;CACA,OAAO,MAAM,0DAAQ,QAAS,IAAI,KAC7B,QAAQ,KAAK,SAAS,sBAAsB;AACnD;AAEA,SAAS,4BAA4B,WAAgC;CACnE,MAAM,aAAa,UAAU;CAC7B,OAAO,QACL,cACG,OAAO,eAAe,aAEvB,2BAA2B,cACxB,uBAAuB,WAE9B;AACF;AAEA,SAAS,6BACP,WACA,SACA;CACA,uDAAI,QAAS,cAAa,WAAW,CAAC,4BAA4B,SAAS,GACzE,OAAO;CAET,OAAO;EACL,GAAG;EACH,UAAU;CACZ;AACF;AA+BA,SAAS,+BACP,kBACA,iBAAiB,OACjB;CACA,MAAM,EAAE,qBAAqB,eAAe,iCAAiC,kBAAkB,cAAc;CAC7G,MAAM,aAAiD;EACrD,gBAAgB;EAChB,gBAAgB;CAClB;CACA,8BAA8B,IAAI,YAAY,mBAAmB;CACjE,OAAO;AACT;AAmFA,SAAgB,gBACd,SAEqC;CAErC,OAAO,0BAA0B,SAAS,IAAI;AAChD;AAEA,SAAS,0BACP,SACA,gBACA;CACA,IAAI,gBACF,gCAAgC;CAGlC,MAAM,EACJ,aAAa,YACb,MACA,UACA,SACA,SACA,OACA,OACA,OACA,QAAQ,eACR,SAAS,gBACT,oBACA,GAAG,cAbmB,2BAA2B,2BAA2B,OAAO,CAcnE;CAElB,MAAM,uBAAwB,UAAkB;CAChD,MAAM,oBAA8B,MAAM,QAAQ,oBAAoB,IAClE,CAAC,GAAG,IAAI,IAAI,qBAAqB,QAAQ,SAAkC,OAAO,SAAS,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,IACxH,CAAC;CACL,OAAQ,UAAkB;CAgB1B,MAAM,kBAAkB,6BAA6B,WAd1B,uBAAuB,OAC9C;EACE,GAAI,mDAAW,CAAC;EAChB,kBAAkB;EAClB,eAAe;CACjB,IACA,uBAAuB,QACrB,UACA,kBAAkB,SAChB;EACE,GAAI,mDAAW,CAAC;EAChB,eAAe;CACjB,IACA,OAC0E;CAClF,MAAM,wBAAwB,IAAI,IAChC,kBACG,QAAO,SAAQ,CAAC,KAAK,SAAS,GAAG,CAAC,CACvC;CAEA,MAAM,sBAAsB,eAAe,WAAW,KAAK;CAC3D,MAAM,qBAAqB,0BAA0B,oBAAoB,YAAY,OAAO;CAC5F,MAAM,eAAe,OAAO,SAAS,mBAC3B,KAAK,KAAK,kBAAkB,IAClC;CAGJ,MAAM,eAAe,OAAO,UAAU,cADT,iBAAiB,QAAQ,kBAAkB,SAElE,OAAO,QAAQ;;EACjB,MAAM,6EAAkB,IAAa,0FAAU,IAAa,+CAAY,OAAO,OAAO,IAAI;EAC1F,MAAM,WAAW,4BAA4B,eAAe,cAAc;EAC1E,IAAI,kBAAkB,MACpB,uBAAuB,gBAAgB,cAAc;EAEvD,MAAM,cAAc,OAAO,UAAU,aACjC,iBAAiB,OAAc,OAA8B,GAAU,IACvE;EACJ,MAAM,SAAS;GACb,GAAG;GACH,GAAI,+DAAe,CAAC;EACtB;EACA,IAAI,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,QAC7B,iBAAkB,IAAY,SAAU,IAAY,UAAU,QAAQ;GACpE,yBAAyB,uBAAuB;GAChD,mBAAmB,uBAAuB,QAAQ,SAAY;EAChE,CAAC;EAEH,OAAO;CACT,KACE;CAEJ,MAAM,aAAa,OAAO,iBAAiB,aACvC,aAAa,IACb;CAEJ,MAAM,mBADuB,+BAA+B,eAChB,IACxC;EACE,GAAI,cAAc,OAAO,eAAe,WAAW,aAAa,CAAC;GAChE,yBAAyB,4BAA4B,WAAW,eAAe,6DAC3E,WAAqB,4BAA2B,gBAAgB,6DAChE,WAAqB,4BAA2B;CACvD,IACA;CACJ,MAAM,oBAAoB,yBAAyB,kBAAkB,UAAiC,iBAAiB,OAA0C;CAoBjK,OAFmB,+BAA+B;EAThD,MAAM;EACI;EACD;EACT,SAAS;EACT;EACA,OAAO;EACP,WAdyB,sBAAsB,SAC7C;GACE,GAAG;GACH,MAAM;EACR,IACA;CAY6D,GAAG,cAEpD;AAOlB;;;;;;;AAQA,SAAgB,8BACd,SACA;CACA,OAAO,0BAA0B,SAAS,KAAK;AACjD;;;;;;;AAQA,SAAgB,sCAAsC,YAAoB;CACxE,MAAM,mBAAoB,WAAkD;CAC5E,IAAI,CAAC,kBACH,MAAM,IAAI,UAAU,uBAAuB;CAE7C,OAAO,+BAA+B,gBAAgB;AACxD;;;;;;;AAQA,SAAgB,oCAAoC,YAAoB;CACtE,OAAO,8BAA8B,IAAI,UAAU;AACrD;;;;;;;AAQA,SAAgB,oBAMd,SACM;;CACN,gCAAgC;CAChC,MAAM,EACJ,YACA,OACA,GAAG,gBACD;CAEJ,MAAM,cAAc;EAClB,GAAG;EACH,2CAAqB,YAAoB,uFAAsB;EAC/D,2BAA2B;CAC7B;CAKA,gBAFqB,eAAe,aAAa,OAAO,UAE7B,CAAC;AAC9B;;;;;AAMA,SAAgB,8BACd,WAKM;CAEN,oBADoB,wBAAwB,SACd,CAAQ;AACxC;AAEA,oBAAoB;AACpB,gCAAgC"}
|
|
1
|
+
{"version":3,"file":"define.mjs","names":[],"sources":["../../../src/runtime/define.ts"],"sourcesContent":["import type { RuntimeComponentDefinitionOptions } from './define/componentDefinition'\nimport type { InlineExpressionMap } from './register/inline'\nimport type { TemplateRefBinding } from './templateRefs'\nimport type {\n ComponentPropsOptions,\n ComponentPublicInstance,\n ComputedDefinitions,\n DefineComponent,\n DefineComponentOptions,\n InferProps,\n MethodDefinitions,\n MiniProgramComponentPropertyOption,\n MiniProgramComponentRawOptions,\n ShallowUnwrapRef,\n} from './types'\nimport {\n WEVU_CSS_MODULES_KEY,\n WEVU_FUNCTION_PROP_PATHS_KEY,\n WEVU_SCOPED_SLOT_CREATOR_KEY,\n WEVU_SLOT_OWNER_ID_KEY,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n} from '@weapp-core/constants'\nimport { hasOwn } from '../utils'\nimport { applyWevuComponentDefaults } from './defaults'\nimport {\n createRuntimeComponentDefinition,\n} from './define/componentDefinition'\nimport { resolveNativeInitialData } from './define/initialComputed'\nimport { resolveVueComponentOptions } from './define/options'\nimport { applyOptionsApiProvide, resolveOptionsApiInjections } from './define/optionsApi'\nimport { normalizeProps } from './define/props'\nimport { createScopedSlotOptions } from './define/scopedSlotOptions'\nimport { applySetupResult } from './define/setupResult'\nimport { getScopedSlotHostGlobalObject } from './platform'\nimport { runSetupFunction } from './register'\nimport { allocateOwnerId } from './scopedSlots'\n\nlet scopedSlotCreator: (() => void) | undefined\nconst componentLifecycleDefinitions = new WeakMap<object, Record<string, any>>()\n\nfunction ensureScopedSlotComponentGlobal() {\n const globalObject = getScopedSlotHostGlobalObject()\n if (!globalObject) {\n return\n }\n const globalRecord = globalObject as Record<string, any>\n if (scopedSlotCreator && globalRecord[WEVU_SCOPED_SLOT_CREATOR_KEY] !== scopedSlotCreator) {\n globalRecord[WEVU_SCOPED_SLOT_CREATOR_KEY] = scopedSlotCreator\n }\n}\n\nfunction resolveInitialDataContext(properties: unknown, methods: MethodDefinitions | undefined) {\n const context: Record<string, unknown> = { ...(methods ?? {}) }\n if (!properties || typeof properties !== 'object') {\n return context\n }\n for (const [name, definition] of Object.entries(properties)) {\n if (definition && typeof definition === 'object' && hasOwn(definition, 'value')) {\n context[name] = (definition as Record<string, unknown>).value\n }\n }\n return context\n}\n\nfunction shouldSeedNativeSlotOwnerId(\n mpOptions: Record<string, any>,\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n return Boolean((mpOptions as any).__wevu_isPage)\n && Array.isArray(setData?.pick)\n && setData.pick.includes(WEVU_SLOT_OWNER_ID_KEY)\n}\n\nfunction shouldDeclareNativeSlotOwnerId(\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n return Array.isArray(setData?.pick)\n && setData.pick.includes(WEVU_SLOT_OWNER_ID_KEY)\n}\n\nfunction hasScopedSlotHostProperties(mpOptions: Record<string, any>) {\n const properties = mpOptions.properties\n return Boolean(\n properties\n && typeof properties === 'object'\n && (\n WEVU_SLOT_OWNER_ID_PROP in properties\n || WEVU_SLOT_SCOPE_KEY in properties\n ),\n )\n}\n\nfunction resolveScopedSlotHostSetData(\n mpOptions: Record<string, any>,\n setData: DefineComponentOptions<any, any, any, any, any>['setData'],\n) {\n if (setData?.strategy !== 'patch' || !hasScopedSlotHostProperties(mpOptions)) {\n return setData\n }\n return {\n ...setData,\n strategy: 'diff' as const,\n }\n}\n\n/**\n * defineComponent 返回的组件定义描述,用于手动注册或高级用法。\n */\nexport interface ComponentDefinition<\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> {\n /**\n * 内部 runtime app(高级能力使用),不对外暴露正式 API。\n * @internal\n */\n __wevu_runtime: import('./types').RuntimeApp<D, C, M>\n\n /**\n * 内部选项快照(高级能力使用),包含 data/computed/methods 等。\n * @internal\n */\n __wevu_options: {\n data: () => D\n computed: C\n methods: M\n setData: import('./types').SetDataSnapshotOptions | undefined\n watch: Record<string, any> | undefined\n setup: ((props: any, ctx: any) => any) | undefined\n mpOptions: MiniProgramComponentRawOptions\n }\n}\n\nfunction materializeComponentDefinition(\n componentOptions: RuntimeComponentDefinitionOptions,\n registerNative = false,\n) {\n const { lifecycleDefinition, runtimeApp } = createRuntimeComponentDefinition(componentOptions, registerNative)\n const definition: ComponentDefinition<any, any, any> = {\n __wevu_runtime: runtimeApp as any,\n __wevu_options: componentOptions as ComponentDefinition<any, any, any>['__wevu_options'],\n }\n componentLifecycleDefinitions.set(definition, lifecycleDefinition)\n return definition\n}\n\ntype SetupBindings<S> = Exclude<S, void> extends never ? Record<string, never> : Exclude<S, void>\ntype ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P\n\nexport interface WevuComponentConstructor<\n Props,\n RawBindings,\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> {\n new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>\n}\n\nexport type WevuDefinedComponent<\n PropsOrPropOptions,\n RawBindings,\n D extends object,\n C extends ComputedDefinitions,\n M extends MethodDefinitions,\n> = DefineComponent<PropsOrPropOptions, RawBindings, D, C, M> & ComponentDefinition<D, C, M>\nexport interface SetupContextWithTypeProps<TypeProps> {\n props: TypeProps\n [key: string]: any\n}\nexport type SetupFunctionWithTypeProps<\n TypeProps,\n> = (\n props: TypeProps,\n ctx: SetupContextWithTypeProps<TypeProps>,\n) => Record<string, any> | void\nexport interface DefineComponentTypePropsOptions<TypeProps> {\n __typeProps: TypeProps\n setup?: SetupFunctionWithTypeProps<TypeProps>\n [key: string]: any\n}\nexport interface DefineComponentWithTypeProps<TypeProps> {\n new (): { $props: TypeProps } & Record<string, any>\n}\n\n/**\n * 按 Vue 3 风格定义一个小程序组件/页面。\n *\n * - 统一注册为 `Component()`\n *\n * @param options 组件定义项\n * @returns 可手动注册的组件定义\n *\n * @example\n * ```ts\n * defineComponent({\n * data: () => ({ count: 0 }),\n * setup() {\n * onMounted(() => console.log('已挂载'))\n * }\n * })\n * ```\n *\n * @example\n * ```ts\n * defineComponent({\n * setup() {\n * onPageScroll(() => {})\n * }\n * })\n * ```\n */\n// @ts-expect-error -- TS2589:__typeProps 签名的重载实例化深度过高。\nexport function defineComponent<\n TypeProps = any,\n>(\n options: DefineComponentTypePropsOptions<TypeProps>,\n): DefineComponentWithTypeProps<TypeProps>\nexport function defineComponent<\n P extends ComponentPropsOptions = ComponentPropsOptions,\n D extends object = Record<string, any>,\n C extends ComputedDefinitions = ComputedDefinitions,\n M extends MethodDefinitions = MethodDefinitions,\n S extends Record<string, any> | void = Record<string, any> | void,\n>(\n options: DefineComponentOptions<P, D, C, M, S>,\n): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>\nexport function defineComponent(\n options: DefineComponentOptions<any, any, any, any, any>,\n): WevuComponentConstructor<Record<string, any>, Record<string, any>, Record<string, any>, ComputedDefinitions, MethodDefinitions>\n & ComponentDefinition<any, any, any> {\n // eslint-disable-next-line ts/no-use-before-define -- 重载实现需保持在内部共享工厂之前。\n return createComponentDefinition(options, true) as any\n}\n\nfunction createComponentDefinition(\n options: DefineComponentOptions<any, any, any, any, any>,\n registerNative: boolean,\n) {\n if (registerNative) {\n ensureScopedSlotComponentGlobal()\n }\n const resolvedOptions = resolveVueComponentOptions(applyWevuComponentDefaults(options))\n const {\n __typeProps: _typeProps,\n data,\n computed,\n methods,\n setData,\n watch,\n setup,\n props,\n inject: injectOptions,\n provide: provideOptions,\n allowFunctionProps,\n [WEVU_CSS_MODULES_KEY]: cssModules,\n ...mpOptions\n } = resolvedOptions\n\n const rawFunctionPropPaths = (mpOptions as any)[WEVU_FUNCTION_PROP_PATHS_KEY]\n const functionPropPaths: string[] = Array.isArray(rawFunctionPropPaths)\n ? [...new Set(rawFunctionPropPaths.filter((path: unknown): path is string => typeof path === 'string' && path.length > 0))]\n : []\n delete (mpOptions as any)[WEVU_FUNCTION_PROP_PATHS_KEY]\n\n const rawResolvedSetData = allowFunctionProps === true\n ? {\n ...(setData ?? {}),\n includeFunctions: true,\n functionPaths: functionPropPaths,\n }\n : allowFunctionProps === false\n ? setData\n : functionPropPaths.length\n ? {\n ...(setData ?? {}),\n functionPaths: functionPropPaths,\n }\n : setData\n const resolvedSetData = resolveScopedSlotHostSetData(mpOptions, rawResolvedSetData)\n const setupFunctionPropKeys = new Set(\n functionPropPaths\n .filter(path => !path.includes('.')),\n )\n\n const normalizedMpOptions = normalizeProps(mpOptions, props)\n const initialDataContext = resolveInitialDataContext(normalizedMpOptions.properties, methods)\n const resolvedData = typeof data === 'function'\n ? () => data.call(initialDataContext)\n : data\n\n const hasOptionsApiContext = injectOptions != null || provideOptions != null\n const setupWrapper = typeof setup === 'function' || hasOptionsApiContext || cssModules\n ? ((props, ctx) => {\n if (cssModules && typeof cssModules === 'object') {\n ;((ctx as any).instance as Record<string, any>)[WEVU_CSS_MODULES_KEY] = cssModules\n }\n const publicInstance = (ctx as any)?.proxy ?? (ctx as any)?.instance ?? Object.create(null)\n const injected = resolveOptionsApiInjections(injectOptions, publicInstance)\n if (provideOptions != null) {\n applyOptionsApiProvide(provideOptions, publicInstance)\n }\n const setupResult = typeof setup === 'function'\n ? runSetupFunction(setup as any, props as Record<string, any>, ctx as any) as Record<string, any> | void\n : undefined\n const result = {\n ...injected,\n ...(cssModules ?? {}),\n ...(setupResult ?? {}),\n }\n if (ctx && Object.keys(result).length) {\n applySetupResult((ctx as any).runtime, (ctx as any).instance, result, {\n includeFunctionsInState: allowFunctionProps === true,\n functionPropPaths: allowFunctionProps === false ? undefined : setupFunctionPropKeys,\n })\n }\n return result\n }) satisfies DefineComponentOptions<ComponentPropsOptions, any, any, any, any>['setup']\n : undefined\n\n const nativeData = typeof resolvedData === 'function'\n ? resolvedData()\n : resolvedData\n const shouldDeclareOwnerId = shouldDeclareNativeSlotOwnerId(resolvedSetData)\n const seededNativeData = shouldDeclareOwnerId\n ? {\n ...(nativeData && typeof nativeData === 'object' ? nativeData : {}),\n [WEVU_SLOT_OWNER_ID_KEY]: shouldSeedNativeSlotOwnerId(mpOptions, resolvedSetData)\n ? (nativeData as any)?.[WEVU_SLOT_OWNER_ID_KEY] || allocateOwnerId()\n : (nativeData as any)?.[WEVU_SLOT_OWNER_ID_KEY] || '',\n }\n : nativeData\n const nativeInitialData = resolveNativeInitialData(seededNativeData, computed as ComputedDefinitions, resolvedSetData, methods as Record<string, any> | undefined)\n const mpOptionsWithProps = nativeInitialData !== undefined\n ? {\n ...normalizedMpOptions,\n data: nativeInitialData,\n }\n : normalizedMpOptions\n\n const componentOptions: RuntimeComponentDefinitionOptions = {\n data: resolvedData as () => Record<string, any>,\n computed: computed as ComputedDefinitions,\n methods: methods as MethodDefinitions,\n setData: resolvedSetData,\n watch,\n setup: setupWrapper,\n mpOptions: mpOptionsWithProps as MiniProgramComponentRawOptions,\n }\n\n const definition = materializeComponentDefinition(componentOptions, registerNative)\n\n return definition as unknown as WevuComponentConstructor<\n ResolveProps<ComponentPropsOptions>,\n Record<string, any>,\n Record<string, any>,\n ComputedDefinitions,\n MethodDefinitions\n > & ComponentDefinition<any, any, any>\n}\n\n/**\n * 创建不触发宿主全局注册的 Wevu 组件定义。\n *\n * @param options 组件选项\n * @internal\n */\nexport function createWevuComponentDefinition(\n options: DefineComponentOptions<any, any, any, any, any>,\n) {\n return createComponentDefinition(options, false)\n}\n\n/**\n * 从现有组件定义派生拥有独立应用上下文的组件定义。\n *\n * @param definition 已解析的 Wevu 组件定义\n * @internal\n */\nexport function createIsolatedWevuComponentDefinition(definition: object) {\n const componentOptions = (definition as ComponentDefinition<any, any, any>).__wevu_options\n if (!componentOptions) {\n throw new TypeError('无法从非 Wevu 组件定义创建独立运行时')\n }\n return materializeComponentDefinition(componentOptions)\n}\n\n/**\n * 获取组件定义对应的宿主生命周期定义。\n *\n * @param definition Wevu 组件定义\n * @internal\n */\nexport function getWevuComponentLifecycleDefinition(definition: object) {\n return componentLifecycleDefinitions.get(definition)\n}\n\n/**\n * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。\n *\n * @param options 组件选项,可能包含小程序特有的 properties\n * @internal\n */\nexport function createWevuComponent<\n P extends ComponentPropsOptions = ComponentPropsOptions,\n D extends object = Record<string, any>,\n C extends ComputedDefinitions = ComputedDefinitions,\n M extends MethodDefinitions = MethodDefinitions,\n>(\n options: DefineComponentOptions<P, D, C, M> & { properties?: MiniProgramComponentPropertyOption },\n): void {\n ensureScopedSlotComponentGlobal()\n const {\n properties,\n props,\n ...restOptions\n } = options\n\n const baseOptions = {\n ...restOptions,\n allowNullPropInput: (restOptions as any).allowNullPropInput ?? true,\n __wevu_allowNullPropInput: true,\n }\n\n // 将 properties 合并到 mpOptions,保持小程序属性定义\n const finalOptions = normalizeProps(baseOptions, props, properties)\n\n defineComponent(finalOptions)\n}\n\n/**\n * scoped slot 兼容组件入口(编译产物内部使用)。\n * @internal\n */\nexport function createWevuScopedSlotComponent(\n overrides?: {\n computed?: ComputedDefinitions\n inlineMap?: InlineExpressionMap\n templateRefs?: TemplateRefBinding[]\n },\n): void {\n const baseOptions = createScopedSlotOptions(overrides)\n createWevuComponent(baseOptions as any)\n}\n\nscopedSlotCreator = createWevuScopedSlotComponent\nensureScopedSlotComponentGlobal()\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,IAAI;AACJ,MAAM,gDAAgC,IAAI,QAAqC;AAE/E,SAAS,kCAAkC;CACzC,MAAM,eAAe,8BAA8B;CACnD,IAAI,CAAC,cACH;CAEF,MAAM,eAAe;CACrB,IAAI,qBAAqB,aAAa,kCAAkC,mBACtE,aAAa,gCAAgC;AAEjD;AAEA,SAAS,0BAA0B,YAAqB,SAAwC;CAC9F,MAAM,UAAmC,EAAE,GAAI,mDAAW,CAAC,EAAG;CAC9D,IAAI,CAAC,cAAc,OAAO,eAAe,UACvC,OAAO;CAET,KAAK,MAAM,CAAC,MAAM,eAAe,OAAO,QAAQ,UAAU,GACxD,IAAI,cAAc,OAAO,eAAe,YAAY,OAAO,YAAY,OAAO,GAC5E,QAAQ,QAAS,WAAuC;CAG5D,OAAO;AACT;AAEA,SAAS,4BACP,WACA,SACA;CACA,OAAO,QAAS,UAAkB,aAAa,KAC1C,MAAM,0DAAQ,QAAS,IAAI,KAC3B,QAAQ,KAAK,SAAS,sBAAsB;AACnD;AAEA,SAAS,+BACP,SACA;CACA,OAAO,MAAM,0DAAQ,QAAS,IAAI,KAC7B,QAAQ,KAAK,SAAS,sBAAsB;AACnD;AAEA,SAAS,4BAA4B,WAAgC;CACnE,MAAM,aAAa,UAAU;CAC7B,OAAO,QACL,cACG,OAAO,eAAe,aAEvB,2BAA2B,cACxB,uBAAuB,WAE9B;AACF;AAEA,SAAS,6BACP,WACA,SACA;CACA,uDAAI,QAAS,cAAa,WAAW,CAAC,4BAA4B,SAAS,GACzE,OAAO;CAET,OAAO;EACL,GAAG;EACH,UAAU;CACZ;AACF;AA+BA,SAAS,+BACP,kBACA,iBAAiB,OACjB;CACA,MAAM,EAAE,qBAAqB,eAAe,iCAAiC,kBAAkB,cAAc;CAC7G,MAAM,aAAiD;EACrD,gBAAgB;EAChB,gBAAgB;CAClB;CACA,8BAA8B,IAAI,YAAY,mBAAmB;CACjE,OAAO;AACT;AAmFA,SAAgB,gBACd,SAEqC;CAErC,OAAO,0BAA0B,SAAS,IAAI;AAChD;AAEA,SAAS,0BACP,SACA,gBACA;CACA,IAAI,gBACF,gCAAgC;CAGlC,MAAM,EACJ,aAAa,YACb,MACA,UACA,SACA,SACA,OACA,OACA,OACA,QAAQ,eACR,SAAS,gBACT,qBACC,uBAAuB,YACxB,GAAG,cAdmB,2BAA2B,2BAA2B,OAAO,CAenE;CAElB,MAAM,uBAAwB,UAAkB;CAChD,MAAM,oBAA8B,MAAM,QAAQ,oBAAoB,IAClE,CAAC,GAAG,IAAI,IAAI,qBAAqB,QAAQ,SAAkC,OAAO,SAAS,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,IACxH,CAAC;CACL,OAAQ,UAAkB;CAgB1B,MAAM,kBAAkB,6BAA6B,WAd1B,uBAAuB,OAC9C;EACE,GAAI,mDAAW,CAAC;EAChB,kBAAkB;EAClB,eAAe;CACjB,IACA,uBAAuB,QACrB,UACA,kBAAkB,SAChB;EACE,GAAI,mDAAW,CAAC;EAChB,eAAe;CACjB,IACA,OAC0E;CAClF,MAAM,wBAAwB,IAAI,IAChC,kBACG,QAAO,SAAQ,CAAC,KAAK,SAAS,GAAG,CAAC,CACvC;CAEA,MAAM,sBAAsB,eAAe,WAAW,KAAK;CAC3D,MAAM,qBAAqB,0BAA0B,oBAAoB,YAAY,OAAO;CAC5F,MAAM,eAAe,OAAO,SAAS,mBAC3B,KAAK,KAAK,kBAAkB,IAClC;CAGJ,MAAM,eAAe,OAAO,UAAU,cADT,iBAAiB,QAAQ,kBAAkB,QACI,eACtE,OAAO,QAAQ;;EACjB,IAAI,cAAc,OAAO,eAAe,UACrC,AAAE,IAAY,SAAiC,wBAAwB;EAE1E,MAAM,6EAAkB,IAAa,0FAAU,IAAa,+CAAY,OAAO,OAAO,IAAI;EAC1F,MAAM,WAAW,4BAA4B,eAAe,cAAc;EAC1E,IAAI,kBAAkB,MACpB,uBAAuB,gBAAgB,cAAc;EAEvD,MAAM,cAAc,OAAO,UAAU,aACjC,iBAAiB,OAAc,OAA8B,GAAU,IACvE;EACJ,MAAM,SAAS;GACb,GAAG;GACH,GAAI,4DAAc,CAAC;GACnB,GAAI,+DAAe,CAAC;EACtB;EACA,IAAI,OAAO,OAAO,KAAK,MAAM,CAAC,CAAC,QAC7B,iBAAkB,IAAY,SAAU,IAAY,UAAU,QAAQ;GACpE,yBAAyB,uBAAuB;GAChD,mBAAmB,uBAAuB,QAAQ,SAAY;EAChE,CAAC;EAEH,OAAO;CACT,KACE;CAEJ,MAAM,aAAa,OAAO,iBAAiB,aACvC,aAAa,IACb;CAEJ,MAAM,mBADuB,+BAA+B,eAChB,IACxC;EACE,GAAI,cAAc,OAAO,eAAe,WAAW,aAAa,CAAC;GAChE,yBAAyB,4BAA4B,WAAW,eAAe,6DAC3E,WAAqB,4BAA2B,gBAAgB,6DAChE,WAAqB,4BAA2B;CACvD,IACA;CACJ,MAAM,oBAAoB,yBAAyB,kBAAkB,UAAiC,iBAAiB,OAA0C;CAoBjK,OAFmB,+BAA+B;EAThD,MAAM;EACI;EACD;EACT,SAAS;EACT;EACA,OAAO;EACP,WAdyB,sBAAsB,SAC7C;GACE,GAAG;GACH,MAAM;EACR,IACA;CAY6D,GAAG,cAEpD;AAOlB;;;;;;;AAQA,SAAgB,8BACd,SACA;CACA,OAAO,0BAA0B,SAAS,KAAK;AACjD;;;;;;;AAQA,SAAgB,sCAAsC,YAAoB;CACxE,MAAM,mBAAoB,WAAkD;CAC5E,IAAI,CAAC,kBACH,MAAM,IAAI,UAAU,uBAAuB;CAE7C,OAAO,+BAA+B,gBAAgB;AACxD;;;;;;;AAQA,SAAgB,oCAAoC,YAAoB;CACtE,OAAO,8BAA8B,IAAI,UAAU;AACrD;;;;;;;AAQA,SAAgB,oBAMd,SACM;;CACN,gCAAgC;CAChC,MAAM,EACJ,YACA,OACA,GAAG,gBACD;CAEJ,MAAM,cAAc;EAClB,GAAG;EACH,2CAAqB,YAAoB,uFAAsB;EAC/D,2BAA2B;CAC7B;CAKA,gBAFqB,eAAe,aAAa,OAAO,UAE7B,CAAC;AAC9B;;;;;AAMA,SAAgB,8BACd,WAKM;CAEN,oBADoB,wBAAwB,SACd,CAAQ;AACxC;AAEA,oBAAoB;AACpB,gCAAgC"}
|
package/dist/dev/vue-demi.mjs
CHANGED
|
@@ -27,6 +27,7 @@ import { registerApp } from "./runtime/register/app.mjs";
|
|
|
27
27
|
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, waitForLayoutHost } from "./runtime/layoutBridge.mjs";
|
|
28
28
|
import { registerComponent } from "./runtime/register/component.mjs";
|
|
29
29
|
import { createApp } from "./runtime/app.mjs";
|
|
30
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
30
31
|
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
31
32
|
import { createWevuComponent, createWevuScopedSlotComponent, defineComponent } from "./runtime/define.mjs";
|
|
32
33
|
import { useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -68,5 +69,5 @@ const Vue2 = void 0;
|
|
|
68
69
|
function install() {}
|
|
69
70
|
|
|
70
71
|
//#endregion
|
|
71
|
-
export { Vue2, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
72
|
+
export { Vue2, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
72
73
|
//# sourceMappingURL=vue-demi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-demi.mjs","names":[],"sources":["../../src/vue-demi.ts"],"sourcesContent":["export * from './index'\nexport { version } from './version'\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue2 = false\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue3 = true\n\n/**\n * 与 `vue-demi` 保持一致,Vue 3 分支下不暴露 Vue 2 构造器。\n */\nexport const Vue2 = undefined\n\n/**\n * Vue 3 分支的 `vue-demi.install()` 为 no-op,这里保持同样语义。\n */\nexport function install() {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vue-demi.mjs","names":[],"sources":["../../src/vue-demi.ts"],"sourcesContent":["export * from './index'\nexport { version } from './version'\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue2 = false\n\n/**\n * 标记当前兼容层运行在 Vue 3 风格分支。\n */\nexport const isVue3 = true\n\n/**\n * 与 `vue-demi` 保持一致,Vue 3 分支下不暴露 Vue 2 构造器。\n */\nexport const Vue2 = undefined\n\n/**\n * Vue 3 分支的 `vue-demi.install()` 为 no-op,这里保持同样语义。\n */\nexport function install() {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAa,SAAS;;;;AAKtB,MAAa,SAAS;;;;AAKtB,MAAa,OAAO;;;;AAKpB,SAAgB,UAAU,CAAC"}
|
package/dist/index.d.mts
CHANGED
|
@@ -31,6 +31,7 @@ import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, Templa
|
|
|
31
31
|
import "./runtime/templateRefTypes.mjs";
|
|
32
32
|
import "./vue-augment.mjs";
|
|
33
33
|
import { createApp } from "./runtime/app.mjs";
|
|
34
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
34
35
|
import { WevuDefaults, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
|
|
35
36
|
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent, createWevuComponent, createWevuScopedSlotComponent, defineComponent } from "./runtime/define.mjs";
|
|
36
37
|
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -69,4 +70,4 @@ import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
|
|
|
69
70
|
import "./store.mjs";
|
|
70
71
|
import { version } from "./version.mjs";
|
|
71
72
|
export * from "@wevu/web-apis";
|
|
72
|
-
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
|
73
|
+
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{registerPageLayoutBridge as Ke,registerRuntimeLayoutHosts as qe,resolveLayoutBridge as Je,resolveLayoutHost as Ye,unregisterPageLayoutBridge as Xe,unregisterRuntimeLayoutHosts as Ze,useLayoutBridge as Qe,useLayoutHosts as $e,waitForLayoutHost as et}from"./runtime/layoutBridge.mjs";import{registerComponent as tt}from"./runtime/register/component.mjs";import{createApp as nt}from"./runtime/app.mjs";import{hasInjectionContext as
|
|
1
|
+
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{registerPageLayoutBridge as Ke,registerRuntimeLayoutHosts as qe,resolveLayoutBridge as Je,resolveLayoutHost as Ye,unregisterPageLayoutBridge as Xe,unregisterRuntimeLayoutHosts as Ze,useLayoutBridge as Qe,useLayoutHosts as $e,waitForLayoutHost as et}from"./runtime/layoutBridge.mjs";import{registerComponent as tt}from"./runtime/register/component.mjs";import{createApp as nt}from"./runtime/app.mjs";import{useCssModule as rt}from"./runtime/css.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{createWevuComponent as lt,createWevuScopedSlotComponent as ut,defineComponent as dt}from"./runtime/define.mjs";import{useDisposables as ft}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as pt}from"./runtime/elementIntersectionObserver.mjs";import{useIntersectionObserver as mt}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as ht,getNavigationBarMetrics as gt,useNavigationBarMetrics as _t,usePageStack as vt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as yt}from"./runtime/pageScroll.mjs";import{useAsyncPullDownRefresh as bt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as xt,useScrollOffset as St,useSelectorFields as Ct,useSelectorQuery as wt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Tt,normalizeStyle as Et,resolvePropValue as Dt}from"./runtime/template.mjs";import{useUpdatePerformanceListener as Ot}from"./runtime/updatePerformance.mjs";import{defineAppSetup as kt,use as At}from"./runtime/use.mjs";import{useAttrs as jt,useNativeInstance as Mt,useSlots as Nt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Pt,useBindModel as Ft,useChangeModel as It,useModel as Lt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as Rt,useNativeRouter as zt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Bt}from"./runtime/vueCompat/templateRef.mjs";import{createStore as Vt}from"./store/manager.mjs";import{defineStore as Ht}from"./store/define.mjs";import{storeToRefs as Ut}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";export{l as addMutationRecorder,t as batch,L as callHookList,R as callHookReturn,pe as callUpdateHooks,E as computed,nt as createApp,Vt as createStore,lt as createWevuComponent,ut as createWevuScopedSlotComponent,x as customRef,kt as defineAppSetup,dt as defineComponent,Ht as defineStore,n as effect,r as effectScope,i as endBatch,z as getCurrentInstance,ht as getCurrentPageStackSnapshot,a as getCurrentScope,B as getCurrentSetupContext,we as getDeepWatchStrategy,gt as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,je as isNoSetData,D as isProxy,_ as isRaw,v as isReactive,O as isReadonly,S as isRef,m as isShallowReactive,j as isShallowRef,Me as markNoSetData,y as markRaw,Pt as mergeModels,He as mountRuntimeInstance,e as nextTick,Tt as normalizeClass,Et as normalizeStyle,me as onActivated,U as onAddToFavorites,W as onAttached,he as onBeforeMount,ge as onBeforeUnmount,_e as onBeforeUpdate,ve as onDeactivated,G as onDetached,K as onError,ye as onErrorCaptured,q as onHide,J as onLaunch,Y as onLoad,X as onMemoryWarning,be as onMounted,Z as onMoved,Q as onPageNotFound,$ as onPageScroll,ee as onPullDownRefresh,te as onReachBottom,ne as onReady,re as onResize,ie as onRouteDone,ae as onSaveExitState,o as onScopeDispose,xe as onServerPrefetch,oe as onShareAppMessage,se as onShareTimeline,ce as onShow,le as onTabItemTap,ue as onThemeChange,de as onUnhandledRejection,fe as onUnload,Se as onUnmounted,Ce as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,k as readonly,C as ref,Ge as registerApp,tt as registerComponent,Ke as registerPageLayoutBridge,qe as registerRuntimeLayoutHosts,u as removeMutationRecorder,Ne as resetWevuDefaults,Je as resolveLayoutBridge,Ye as resolveLayoutHost,Dt as resolvePropValue,Ie as resolveRuntimePageLayoutName,Ve as runSetupFunction,V as setCurrentInstance,H as setCurrentSetupContext,Te as setDeepWatchStrategy,Fe as setGlobalProvidedValue,Le as setPageLayout,Ue as setRuntimeSetDataVisibility,Pe as setWevuDefaults,h as shallowReactive,A as shallowReadonly,M as shallowRef,s as startBatch,c as stop,Ut as storeToRefs,Re as syncRuntimePageLayoutState,ze as syncRuntimePageLayoutStateFromRuntime,We as teardownRuntimeInstance,d as toRaw,P as toRef,F as toRefs,w as toValue,p as touchReactive,I as traverse,N as triggerRef,T as unref,Xe as unregisterPageLayoutBridge,Ze as unregisterRuntimeLayoutHosts,At as use,bt as useAsyncPullDownRefresh,jt as useAttrs,Ft as useBindModel,xt as useBoundingClientRect,It as useChangeModel,rt as useCssModule,ft as useDisposables,pt as useElementIntersectionObserver,mt as useIntersectionObserver,Qe as useLayoutBridge,$e as useLayoutHosts,Lt as useModel,Mt as useNativeInstance,Rt as useNativePageRouter,zt as useNativeRouter,_t as useNavigationBarMetrics,Be as usePageLayout,yt as usePageScrollThrottle,vt as usePageStack,St as useScrollOffset,Ct as useSelectorFields,wt as useSelectorQuery,Nt as useSlots,Bt as useTemplateRef,Ot as useUpdatePerformanceListener,Ae as version,et as waitForLayoutHost,Ee as watch,De as watchEffect,Oe as watchPostEffect,ke as watchSyncEffect};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createApp } from "./runtime/app.mjs";
|
|
2
|
+
import { useCssModule, useCssVars } from "./runtime/css.mjs";
|
|
2
3
|
import { INTERNAL_DEFAULTS_SCOPE_KEY, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
|
|
3
4
|
import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
|
|
4
5
|
import { useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -33,4 +34,4 @@ import { version } from "./version.mjs";
|
|
|
33
34
|
import { takePendingRuntimeAppRegistration } from "./runtime/app/pending.mjs";
|
|
34
35
|
import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
|
|
35
36
|
import { createUniAppHost } from "./runtime/uniAppHost.mjs";
|
|
36
|
-
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
37
|
+
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{callHookList as e,callHookReturn as t,getCurrentInstance as n,getCurrentSetupContext as r,setCurrentInstance as i,setCurrentSetupContext as a}from"./runtime/hooks/base.mjs";import{onAddToFavorites as o,onAttached as s,onDetached as c,onError as l,onHide as u,onLaunch as d,onLoad as f,onMemoryWarning as p,onMoved as m,onPageNotFound as h,onPageScroll as g,onPullDownRefresh as _,onReachBottom as v,onReady as y,onResize as b,onRouteDone as x,onSaveExitState as S,onShareAppMessage as C,onShareTimeline as w,onShow as T,onTabItemTap as E,onThemeChange as D,onUnhandledRejection as O,onUnload as k}from"./runtime/hooks/register.mjs";import{onActivated as A,onBeforeMount as j,onBeforeUnmount as M,onBeforeUpdate as N,onDeactivated as P,onErrorCaptured as F,onMounted as I,onServerPrefetch as L,onUnmounted as R,onUpdated as z}from"./runtime/hooks/vue.mjs";import{version as B}from"./version.mjs";import{isNoSetData as V,markNoSetData as H}from"./runtime/noSetData.mjs";import{takePendingRuntimeAppRegistration as U}from"./runtime/app/pending.mjs";import{INTERNAL_DEFAULTS_SCOPE_KEY as W,resetWevuDefaults as G,setWevuDefaults as K}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as q}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as J,setPageLayout as Y,syncRuntimePageLayoutState as X,syncRuntimePageLayoutStateFromRuntime as Z,usePageLayout as Q}from"./runtime/pageLayout.mjs";import{runSetupFunction as $}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as ee,setRuntimeSetDataVisibility as te,teardownRuntimeInstance as ne}from"./runtime/register/runtimeInstance.mjs";import{registerApp as re}from"./runtime/register/app.mjs";import{Fragment as ie,createTextVNode as ae,createVNode as oe,isVNode as se,mergeProps as ce,normalizeJsxIsland as le,resolveComponent as ue,resolveDirective as de,transformOn as fe,vModelCheckbox as pe,vModelRadio as me,vModelSelect as he,vModelText as ge,vShow as _e,withDirectives as ve}from"./runtime/jsxIsland.mjs";import{resolveLayoutBridge as ye,resolveLayoutHost as be,useLayoutBridge as xe,useLayoutHosts as Se,waitForLayoutHost as Ce}from"./runtime/layoutBridge.mjs";import{registerComponent as we}from"./runtime/register/component.mjs";import{createApp as Te}from"./runtime/app.mjs";import{
|
|
1
|
+
import{callHookList as e,callHookReturn as t,getCurrentInstance as n,getCurrentSetupContext as r,setCurrentInstance as i,setCurrentSetupContext as a}from"./runtime/hooks/base.mjs";import{onAddToFavorites as o,onAttached as s,onDetached as c,onError as l,onHide as u,onLaunch as d,onLoad as f,onMemoryWarning as p,onMoved as m,onPageNotFound as h,onPageScroll as g,onPullDownRefresh as _,onReachBottom as v,onReady as y,onResize as b,onRouteDone as x,onSaveExitState as S,onShareAppMessage as C,onShareTimeline as w,onShow as T,onTabItemTap as E,onThemeChange as D,onUnhandledRejection as O,onUnload as k}from"./runtime/hooks/register.mjs";import{onActivated as A,onBeforeMount as j,onBeforeUnmount as M,onBeforeUpdate as N,onDeactivated as P,onErrorCaptured as F,onMounted as I,onServerPrefetch as L,onUnmounted as R,onUpdated as z}from"./runtime/hooks/vue.mjs";import{version as B}from"./version.mjs";import{isNoSetData as V,markNoSetData as H}from"./runtime/noSetData.mjs";import{takePendingRuntimeAppRegistration as U}from"./runtime/app/pending.mjs";import{INTERNAL_DEFAULTS_SCOPE_KEY as W,resetWevuDefaults as G,setWevuDefaults as K}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as q}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as J,setPageLayout as Y,syncRuntimePageLayoutState as X,syncRuntimePageLayoutStateFromRuntime as Z,usePageLayout as Q}from"./runtime/pageLayout.mjs";import{runSetupFunction as $}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as ee,setRuntimeSetDataVisibility as te,teardownRuntimeInstance as ne}from"./runtime/register/runtimeInstance.mjs";import{registerApp as re}from"./runtime/register/app.mjs";import{Fragment as ie,createTextVNode as ae,createVNode as oe,isVNode as se,mergeProps as ce,normalizeJsxIsland as le,resolveComponent as ue,resolveDirective as de,transformOn as fe,vModelCheckbox as pe,vModelRadio as me,vModelSelect as he,vModelText as ge,vShow as _e,withDirectives as ve}from"./runtime/jsxIsland.mjs";import{resolveLayoutBridge as ye,resolveLayoutHost as be,useLayoutBridge as xe,useLayoutHosts as Se,waitForLayoutHost as Ce}from"./runtime/layoutBridge.mjs";import{registerComponent as we}from"./runtime/register/component.mjs";import{createApp as Te}from"./runtime/app.mjs";import{useCssModule as Ee,useCssVars as De}from"./runtime/css.mjs";import{hasInjectionContext as Oe,inject as ke,injectGlobal as Ae,provide as je,provideGlobal as Me}from"./runtime/provide.mjs";import{createIsolatedWevuComponentDefinition as Ne,createWevuComponent as Pe,createWevuComponentDefinition as Fe,createWevuScopedSlotComponent as Ie,defineComponent as Le,getWevuComponentLifecycleDefinition as Re}from"./runtime/define.mjs";import{useDisposables as ze}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as Be}from"./runtime/elementIntersectionObserver.mjs";import{useIntersectionObserver as Ve}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as He,getNavigationBarMetrics as Ue,useNavigationBarMetrics as We,usePageStack as Ge}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as Ke}from"./runtime/pageScroll.mjs";import{useAsyncPullDownRefresh as qe}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as Je,useScrollOffset as Ye,useSelectorFields as Xe,useSelectorQuery as Ze}from"./runtime/selectorQuery.mjs";import{useUpdatePerformanceListener as Qe}from"./runtime/updatePerformance.mjs";import{defineAppSetup as $e,use as et}from"./runtime/use.mjs";import{useAttrs as tt,useNativeInstance as nt,useSlots as rt}from"./runtime/vueCompat/context.mjs";import{mergeModels as it,useBindModel as at,useChangeModel as ot,useModel as st}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as ct,useNativeRouter as lt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as ut}from"./runtime/vueCompat/templateRef.mjs";import{createUniAppHost as dt}from"./runtime/uniAppHost.mjs";export{ie as Fragment,W as INTERNAL_DEFAULTS_SCOPE_KEY,e as callHookList,t as callHookReturn,Te as createApp,Ne as createIsolatedWevuComponentDefinition,ae as createTextVNode,dt as createUniAppHost,oe as createVNode,Pe as createWevuComponent,Fe as createWevuComponentDefinition,Ie as createWevuScopedSlotComponent,$e as defineAppSetup,Le as defineComponent,n as getCurrentInstance,He as getCurrentPageStackSnapshot,r as getCurrentSetupContext,Ue as getNavigationBarMetrics,Re as getWevuComponentLifecycleDefinition,Oe as hasInjectionContext,ke as inject,Ae as injectGlobal,V as isNoSetData,se as isVNode,H as markNoSetData,it as mergeModels,ce as mergeProps,ee as mountRuntimeInstance,le as normalizeJsxIsland,A as onActivated,o as onAddToFavorites,s as onAttached,j as onBeforeMount,M as onBeforeUnmount,N as onBeforeUpdate,P as onDeactivated,c as onDetached,l as onError,F as onErrorCaptured,u as onHide,d as onLaunch,f as onLoad,p as onMemoryWarning,I as onMounted,m as onMoved,h as onPageNotFound,g as onPageScroll,_ as onPullDownRefresh,v as onReachBottom,y as onReady,b as onResize,x as onRouteDone,S as onSaveExitState,L as onServerPrefetch,C as onShareAppMessage,w as onShareTimeline,T as onShow,E as onTabItemTap,D as onThemeChange,O as onUnhandledRejection,k as onUnload,R as onUnmounted,z as onUpdated,je as provide,Me as provideGlobal,re as registerApp,we as registerComponent,G as resetWevuDefaults,ue as resolveComponent,de as resolveDirective,ye as resolveLayoutBridge,be as resolveLayoutHost,J as resolveRuntimePageLayoutName,$ as runSetupFunction,i as setCurrentInstance,a as setCurrentSetupContext,q as setGlobalProvidedValue,Y as setPageLayout,te as setRuntimeSetDataVisibility,K as setWevuDefaults,X as syncRuntimePageLayoutState,Z as syncRuntimePageLayoutStateFromRuntime,U as takePendingRuntimeAppRegistration,ne as teardownRuntimeInstance,fe as transformOn,et as use,qe as useAsyncPullDownRefresh,tt as useAttrs,at as useBindModel,Je as useBoundingClientRect,ot as useChangeModel,Ee as useCssModule,De as useCssVars,ze as useDisposables,Be as useElementIntersectionObserver,Ve as useIntersectionObserver,xe as useLayoutBridge,Se as useLayoutHosts,st as useModel,nt as useNativeInstance,ct as useNativePageRouter,lt as useNativeRouter,We as useNavigationBarMetrics,Q as usePageLayout,Ke as usePageScrollThrottle,Ge as usePageStack,Ye as useScrollOffset,Xe as useSelectorFields,Ze as useSelectorQuery,rt as useSlots,ut as useTemplateRef,Qe as useUpdatePerformanceListener,pe as vModelCheckbox,me as vModelRadio,he as vModelSelect,ge as vModelText,_e as vShow,B as version,Ce as waitForLayoutHost,ve as withDirectives};
|
package/dist/package.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`6.
|
|
1
|
+
var e=`6.22.0`;export{e as version};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComputedRef } from "../reactivity/computed.mjs";
|
|
2
|
+
import "../reactivity/index.mjs";
|
|
3
|
+
//#region src/runtime/css.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 读取当前 SFC 的 CSS Modules 映射。
|
|
6
|
+
*/
|
|
7
|
+
declare function useCssModule(name?: string): Record<string, string>;
|
|
8
|
+
/**
|
|
9
|
+
* 注册编译器生成的响应式 CSS 变量。
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
declare function useCssVars(getter: (context: Record<string, any>) => Record<string, unknown>): ComputedRef<string>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useCssModule, useCssVars };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unref as e}from"../reactivity/ref.mjs";import{computed as t}from"../reactivity/computed.mjs";import{assertInSetup as n}from"./hooks/base.mjs";import{WEVU_CSS_MODULES_KEY as r,WEVU_CSS_VARS_STYLE_KEY as i}from"@weapp-core/constants";function a(t){return Object.entries(t).map(([t,n])=>`--${t}:${n==null?``:String(e(n))}`).join(`;`)}function o(e=`$style`){let t=n(`useCssModule`)[r],i=t==null?void 0:t[e];if(!i||typeof i!=`object`)throw Error(`useCssModule() 找不到名为 ${JSON.stringify(e)} 的 CSS Module`);return i}function s(e){let r=n(`useCssVars`),o=r.__wevu,s=t(()=>{var t;return a(e((t=o==null?void 0:o.proxy)==null?r:t))});return o!=null&&o.state&&typeof o.state==`object`&&(o.state[i]=s),o!=null&&o.setupState&&typeof o.setupState==`object`&&(o.setupState[i]=s),s}export{o as useCssModule,s as useCssVars};
|
package/dist/runtime/define.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{hasOwn as t}from"../utils.mjs";import{applyWevuComponentDefaults as n}from"./defaults.mjs";import{allocateOwnerId as r}from"./scopedSlots.mjs";import{runSetupFunction as i}from"./register/setup.mjs";import{createRuntimeComponentDefinition as a}from"./define/componentDefinition.mjs";import{resolveNativeInitialData as o}from"./define/initialComputed.mjs";import{resolveVueComponentOptions as s}from"./define/options.mjs";import{applyOptionsApiProvide as c,resolveOptionsApiInjections as l}from"./define/optionsApi.mjs";import{normalizeProps as u}from"./define/props.mjs";import{createScopedSlotOptions as d}from"./define/scopedSlotOptions.mjs";import{applySetupResult as f}from"./define/setupResult.mjs";import{
|
|
1
|
+
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{hasOwn as t}from"../utils.mjs";import{applyWevuComponentDefaults as n}from"./defaults.mjs";import{allocateOwnerId as r}from"./scopedSlots.mjs";import{runSetupFunction as i}from"./register/setup.mjs";import{createRuntimeComponentDefinition as a}from"./define/componentDefinition.mjs";import{resolveNativeInitialData as o}from"./define/initialComputed.mjs";import{resolveVueComponentOptions as s}from"./define/options.mjs";import{applyOptionsApiProvide as c,resolveOptionsApiInjections as l}from"./define/optionsApi.mjs";import{normalizeProps as u}from"./define/props.mjs";import{createScopedSlotOptions as d}from"./define/scopedSlotOptions.mjs";import{applySetupResult as f}from"./define/setupResult.mjs";import{WEVU_CSS_MODULES_KEY as p,WEVU_FUNCTION_PROP_PATHS_KEY as m,WEVU_SCOPED_SLOT_CREATOR_KEY as h,WEVU_SLOT_OWNER_ID_KEY as g,WEVU_SLOT_OWNER_ID_PROP as _,WEVU_SLOT_SCOPE_KEY as v}from"@weapp-core/constants";let y;const b=new WeakMap;function x(){let t=e();if(!t)return;let n=t;y&&n[h]!==y&&(n[h]=y)}function S(e,n){let r={...n==null?{}:n};if(!e||typeof e!=`object`)return r;for(let[n,i]of Object.entries(e))i&&typeof i==`object`&&t(i,`value`)&&(r[n]=i.value);return r}function C(e,t){return!!e.__wevu_isPage&&Array.isArray(t==null?void 0:t.pick)&&t.pick.includes(g)}function w(e){return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(g)}function T(e){let t=e.properties;return!!(t&&typeof t==`object`&&(_ in t||v in t))}function E(e,t){return(t==null?void 0:t.strategy)!==`patch`||!T(e)?t:{...t,strategy:`diff`}}function D(e,t=!1){let{lifecycleDefinition:n,runtimeApp:r}=a(e,t),i={__wevu_runtime:r,__wevu_options:e};return b.set(i,n),i}function O(e){return k(e,!0)}function k(e,t){t&&x();let{__typeProps:a,data:d,computed:h,methods:_,setData:v,watch:y,setup:b,props:T,inject:O,provide:k,allowFunctionProps:A,[p]:j,...M}=s(n(e)),N=M[m],P=Array.isArray(N)?[...new Set(N.filter(e=>typeof e==`string`&&e.length>0))]:[];delete M[m];let F=E(M,A===!0?{...v==null?{}:v,includeFunctions:!0,functionPaths:P}:A===!1?v:P.length?{...v==null?{}:v,functionPaths:P}:v),I=new Set(P.filter(e=>!e.includes(`.`))),L=u(M,T),R=S(L.properties,_),z=typeof d==`function`?()=>d.call(R):d,B=typeof b==`function`||O!=null||k!=null||j?((e,t)=>{var n,r;j&&typeof j==`object`&&(t.instance[p]=j);let a=(n=(r=t==null?void 0:t.proxy)==null?t==null?void 0:t.instance:r)==null?Object.create(null):n,o=l(O,a);k!=null&&c(k,a);let s=typeof b==`function`?i(b,e,t):void 0,u={...o,...j==null?{}:j,...s==null?{}:s};return t&&Object.keys(u).length&&f(t.runtime,t.instance,u,{includeFunctionsInState:A===!0,functionPropPaths:A===!1?void 0:I}),u}):void 0,V=typeof z==`function`?z():z,H=w(F)?{...V&&typeof V==`object`?V:{},[g]:C(M,F)?(V==null?void 0:V[g])||r():(V==null?void 0:V[g])||``}:V,U=o(H,h,F,_);return D({data:z,computed:h,methods:_,setData:F,watch:y,setup:B,mpOptions:U===void 0?L:{...L,data:U}},t)}function A(e){return k(e,!1)}function j(e){let t=e.__wevu_options;if(!t)throw TypeError(`无法从非 Wevu 组件定义创建独立运行时`);return D(t)}function M(e){return b.get(e)}function N(e){var t;x();let{properties:n,props:r,...i}=e,a={...i,allowNullPropInput:(t=i.allowNullPropInput)==null||t,__wevu_allowNullPropInput:!0};O(u(a,r,n))}function P(e){N(d(e))}y=P,x();export{j as createIsolatedWevuComponentDefinition,N as createWevuComponent,A as createWevuComponentDefinition,P as createWevuScopedSlotComponent,O as defineComponent,M as getWevuComponentLifecycleDefinition};
|
package/dist/runtime/index.d.mts
CHANGED
|
@@ -13,6 +13,7 @@ import { SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
|
13
13
|
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./types/options.mjs";
|
|
14
14
|
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./types.mjs";
|
|
15
15
|
import { createApp } from "./app.mjs";
|
|
16
|
+
import { useCssModule } from "./css.mjs";
|
|
16
17
|
import { WevuDefaults, resetWevuDefaults, setWevuDefaults } from "./defaults.mjs";
|
|
17
18
|
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent, createWevuComponent, createWevuScopedSlotComponent, defineComponent } from "./define.mjs";
|
|
18
19
|
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./disposables.mjs";
|
|
@@ -44,4 +45,4 @@ import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeMo
|
|
|
44
45
|
import { useNativePageRouter, useNativeRouter } from "./vueCompat/router.mjs";
|
|
45
46
|
import { TemplateRef, useTemplateRef } from "./vueCompat/templateRef.mjs";
|
|
46
47
|
import "./vueCompat.mjs";
|
|
47
|
-
export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
|
|
48
|
+
export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
|
package/dist/vue-demi.d.mts
CHANGED
|
@@ -28,6 +28,7 @@ import { SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setDat
|
|
|
28
28
|
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
|
|
29
29
|
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
|
|
30
30
|
import { createApp } from "./runtime/app.mjs";
|
|
31
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
31
32
|
import { WevuDefaults, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
|
|
32
33
|
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent, createWevuComponent, createWevuScopedSlotComponent, defineComponent } from "./runtime/define.mjs";
|
|
33
34
|
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
|
|
@@ -83,4 +84,4 @@ declare const Vue2: undefined;
|
|
|
83
84
|
*/
|
|
84
85
|
declare function install(): void;
|
|
85
86
|
//#endregion
|
|
86
|
-
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, Vue2, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
|
87
|
+
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type MiniProgramCSSProperties, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramDatasetAttributes, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramHtmlAliasIntrinsicElements, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type MiniProgramIntrinsicElementBaseAttributes, type MiniProgramIntrinsicElements, type MiniProgramIntrinsicEventHandler, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, Vue2, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WeappCSSProperties, type WeappDatasetAttributes, type WeappHtmlAliasIntrinsicElements, type WeappIntrinsicElementBaseAttributes, type WeappIntrinsicElements, type WeappIntrinsicEventHandler, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, install, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, isVue2, isVue3, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
package/dist/vue-demi.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{registerPageLayoutBridge as Ke,registerRuntimeLayoutHosts as qe,resolveLayoutBridge as Je,resolveLayoutHost as Ye,unregisterPageLayoutBridge as Xe,unregisterRuntimeLayoutHosts as Ze,useLayoutBridge as Qe,useLayoutHosts as $e,waitForLayoutHost as et}from"./runtime/layoutBridge.mjs";import{registerComponent as tt}from"./runtime/register/component.mjs";import{createApp as nt}from"./runtime/app.mjs";import{hasInjectionContext as
|
|
1
|
+
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{registerPageLayoutBridge as Ke,registerRuntimeLayoutHosts as qe,resolveLayoutBridge as Je,resolveLayoutHost as Ye,unregisterPageLayoutBridge as Xe,unregisterRuntimeLayoutHosts as Ze,useLayoutBridge as Qe,useLayoutHosts as $e,waitForLayoutHost as et}from"./runtime/layoutBridge.mjs";import{registerComponent as tt}from"./runtime/register/component.mjs";import{createApp as nt}from"./runtime/app.mjs";import{useCssModule as rt}from"./runtime/css.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{createWevuComponent as lt,createWevuScopedSlotComponent as ut,defineComponent as dt}from"./runtime/define.mjs";import{useDisposables as ft}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as pt}from"./runtime/elementIntersectionObserver.mjs";import{useIntersectionObserver as mt}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as ht,getNavigationBarMetrics as gt,useNavigationBarMetrics as _t,usePageStack as vt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as yt}from"./runtime/pageScroll.mjs";import{useAsyncPullDownRefresh as bt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as xt,useScrollOffset as St,useSelectorFields as Ct,useSelectorQuery as wt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Tt,normalizeStyle as Et,resolvePropValue as Dt}from"./runtime/template.mjs";import{useUpdatePerformanceListener as Ot}from"./runtime/updatePerformance.mjs";import{defineAppSetup as kt,use as At}from"./runtime/use.mjs";import{useAttrs as jt,useNativeInstance as Mt,useSlots as Nt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Pt,useBindModel as Ft,useChangeModel as It,useModel as Lt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as Rt,useNativeRouter as zt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Bt}from"./runtime/vueCompat/templateRef.mjs";import{createStore as Vt}from"./store/manager.mjs";import{defineStore as Ht}from"./store/define.mjs";import{storeToRefs as Ut}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Wt=!1,Gt=!0,Kt=void 0;function qt(){}export{Kt as Vue2,l as addMutationRecorder,t as batch,L as callHookList,R as callHookReturn,pe as callUpdateHooks,E as computed,nt as createApp,Vt as createStore,lt as createWevuComponent,ut as createWevuScopedSlotComponent,x as customRef,kt as defineAppSetup,dt as defineComponent,Ht as defineStore,n as effect,r as effectScope,i as endBatch,z as getCurrentInstance,ht as getCurrentPageStackSnapshot,a as getCurrentScope,B as getCurrentSetupContext,we as getDeepWatchStrategy,gt as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,qt as install,je as isNoSetData,D as isProxy,_ as isRaw,v as isReactive,O as isReadonly,S as isRef,m as isShallowReactive,j as isShallowRef,Wt as isVue2,Gt as isVue3,Me as markNoSetData,y as markRaw,Pt as mergeModels,He as mountRuntimeInstance,e as nextTick,Tt as normalizeClass,Et as normalizeStyle,me as onActivated,U as onAddToFavorites,W as onAttached,he as onBeforeMount,ge as onBeforeUnmount,_e as onBeforeUpdate,ve as onDeactivated,G as onDetached,K as onError,ye as onErrorCaptured,q as onHide,J as onLaunch,Y as onLoad,X as onMemoryWarning,be as onMounted,Z as onMoved,Q as onPageNotFound,$ as onPageScroll,ee as onPullDownRefresh,te as onReachBottom,ne as onReady,re as onResize,ie as onRouteDone,ae as onSaveExitState,o as onScopeDispose,xe as onServerPrefetch,oe as onShareAppMessage,se as onShareTimeline,ce as onShow,le as onTabItemTap,ue as onThemeChange,de as onUnhandledRejection,fe as onUnload,Se as onUnmounted,Ce as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,k as readonly,C as ref,Ge as registerApp,tt as registerComponent,Ke as registerPageLayoutBridge,qe as registerRuntimeLayoutHosts,u as removeMutationRecorder,Ne as resetWevuDefaults,Je as resolveLayoutBridge,Ye as resolveLayoutHost,Dt as resolvePropValue,Ie as resolveRuntimePageLayoutName,Ve as runSetupFunction,V as setCurrentInstance,H as setCurrentSetupContext,Te as setDeepWatchStrategy,Fe as setGlobalProvidedValue,Le as setPageLayout,Ue as setRuntimeSetDataVisibility,Pe as setWevuDefaults,h as shallowReactive,A as shallowReadonly,M as shallowRef,s as startBatch,c as stop,Ut as storeToRefs,Re as syncRuntimePageLayoutState,ze as syncRuntimePageLayoutStateFromRuntime,We as teardownRuntimeInstance,d as toRaw,P as toRef,F as toRefs,w as toValue,p as touchReactive,I as traverse,N as triggerRef,T as unref,Xe as unregisterPageLayoutBridge,Ze as unregisterRuntimeLayoutHosts,At as use,bt as useAsyncPullDownRefresh,jt as useAttrs,Ft as useBindModel,xt as useBoundingClientRect,It as useChangeModel,rt as useCssModule,ft as useDisposables,pt as useElementIntersectionObserver,mt as useIntersectionObserver,Qe as useLayoutBridge,$e as useLayoutHosts,Lt as useModel,Mt as useNativeInstance,Rt as useNativePageRouter,zt as useNativeRouter,_t as useNavigationBarMetrics,Be as usePageLayout,yt as usePageScrollThrottle,vt as usePageStack,St as useScrollOffset,Ct as useSelectorFields,wt as useSelectorQuery,Nt as useSlots,Bt as useTemplateRef,Ot as useUpdatePerformanceListener,Ae as version,et as waitForLayoutHost,Ee as watch,De as watchEffect,Oe as watchPostEffect,ke as watchSyncEffect};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.
|
|
4
|
+
"version": "6.22.0",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -226,11 +226,11 @@
|
|
|
226
226
|
},
|
|
227
227
|
"dependencies": {
|
|
228
228
|
"vue": "^3.5.41",
|
|
229
|
-
"@weapp-core/constants": "0.
|
|
230
|
-
"@
|
|
231
|
-
"@wevu/compiler": "6.
|
|
232
|
-
"@wevu/web-apis": "1.2.
|
|
233
|
-
"@
|
|
229
|
+
"@weapp-core/constants": "0.2.0",
|
|
230
|
+
"@wevu/api": "0.2.16",
|
|
231
|
+
"@wevu/compiler": "6.22.0",
|
|
232
|
+
"@wevu/web-apis": "1.2.35",
|
|
233
|
+
"@weapp-core/shared": "3.1.1"
|
|
234
234
|
},
|
|
235
235
|
"scripts": {
|
|
236
236
|
"dev": "tsdown -w",
|