@weapp-vite/web 1.5.2 → 1.5.4

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/index.mjs CHANGED
@@ -3,31 +3,31 @@ import { transformWxssToCss } from "./css/wxss.mjs";
3
3
  import { weappWebPlugin } from "./plugin/index.mjs";
4
4
  import { setRuntimeWarningOptions } from "./runtime/warning.mjs";
5
5
  import { installWebHostGlobals } from "./runtime/hostGlobals.mjs";
6
+ import { getRuntimeClipboard, getRuntimeDialogs, getRuntimeFetch, getRuntimeStorage, getWebRuntimeHost, openRuntimeUrl, resetWebRuntimeHost, setWebRuntimeHost } from "./runtime/host/index.mjs";
7
+ import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getDeviceInfo, getFuzzyLocation, getLocation, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getSystemInfo, getSystemInfoSync, getSystemSetting, getUserInfo, getUserProfile, getWindowInfo, login, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openSetting, vibrateShort } from "./runtime/polyfill/deviceAuthSystemApi.mjs";
8
+ import { configureWebSeo, resetWebDocumentHead, setupWebResourceHints, syncWebDocumentHead, updateWebDocumentTitle } from "./runtime/seo/index.mjs";
6
9
  import { injectStyle, removeStyle } from "./runtime/style.mjs";
7
10
  import { ensureButtonDefined, setButtonFormConfig } from "./runtime/button/index.mjs";
8
11
  import { getRuntimeExecutionMode, setRuntimeExecutionMode } from "./runtime/execution.mjs";
9
12
  import { createRenderContext } from "./runtime/renderContext.mjs";
10
13
  import { defineComponent } from "./runtime/component/index.mjs";
11
- import { bindRuntimeEvent } from "./runtime/eventBinding.mjs";
12
- import { getRuntimeClipboard, getRuntimeDialogs, getRuntimeFetch, getRuntimeStorage, getWebRuntimeHost, openRuntimeUrl, resetWebRuntimeHost, setWebRuntimeHost } from "./runtime/host/index.mjs";
13
14
  import { resolveImageModeStyle } from "./runtime/nativeComponents/image.mjs";
14
15
  import { createInputEventDetail } from "./runtime/nativeComponents/input.mjs";
15
- import { setNavigationBarMetrics } from "./runtime/navigationBar/index.mjs";
16
- import { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from "./runtime/viewport/index.mjs";
17
- import { setupRpx } from "./runtime/rpx.mjs";
18
- import { configureWebSeo, resetWebDocumentHead, setupWebResourceHints, syncWebDocumentHead, updateWebDocumentTitle } from "./runtime/seo/index.mjs";
19
- import { disposeWebRouting, getWebRoutingConfig, resolveWebRoutingConfig } from "./runtime/polyfill/routeRuntime/history.mjs";
20
- import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./runtime/polyfill/routeRuntime.mjs";
21
16
  import { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./runtime/polyfill/runtimeDataApi.mjs";
22
17
  import { createScrollEventDetail } from "./runtime/nativeComponents/scrollView.mjs";
23
18
  import { createSwitchEventDetail } from "./runtime/nativeComponents/switch.mjs";
24
19
  import { createTextareaLineChangeDetail } from "./runtime/nativeComponents/textarea.mjs";
25
20
  import { createVideoProgressDetail, createVideoTimeUpdateDetail, resolveVideoObjectFit } from "./runtime/nativeComponents/video/helpers.mjs";
26
21
  import { ensureNativeComponentsDefined } from "./runtime/nativeComponents/index.mjs";
27
- import { setPageLayout } from "./runtime/pageLayout.mjs";
28
- import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getDeviceInfo, getFuzzyLocation, getLocation, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getSystemInfo, getSystemInfoSync, getSystemSetting, getUserInfo, getUserProfile, getWindowInfo, login, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openSetting, vibrateShort } from "./runtime/polyfill/deviceAuthSystemApi.mjs";
22
+ import { setNavigationBarMetrics } from "./runtime/navigationBar/index.mjs";
23
+ import { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from "./runtime/viewport/index.mjs";
24
+ import { setupRpx } from "./runtime/rpx.mjs";
25
+ import { disposeWebRouting, getWebRoutingConfig, resolveWebRoutingConfig } from "./runtime/polyfill/routeRuntime/history.mjs";
26
+ import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./runtime/polyfill/routeRuntime.mjs";
29
27
  import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, hideTabBarRedDot, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, removeTabBarBadge, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, setTabBarBadge, setTabBarItem, setTabBarStyle, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showTabBarRedDot, showToast, updateShareMenu } from "./runtime/polyfill/uiMediaApi.mjs";
30
28
  import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./runtime/polyfill/index.mjs";
29
+ import { bindRuntimeEvent } from "./runtime/eventBinding.mjs";
30
+ import { setPageLayout } from "./runtime/pageLayout.mjs";
31
31
  import { createTemplate, renderTemplate } from "./runtime/legacyTemplate/index.mjs";
32
32
  import { installWebModuleRegistration, registerWebWevuApp, registerWebWevuComponent, registerWebWevuComponentFactory } from "./runtime/wevu.mjs";
33
33
 
@@ -10,8 +10,8 @@ import { resolveRelationNodes } from "./relations.mjs";
10
10
  import { createWebSlotsProxy } from "./slots.mjs";
11
11
  import { assignDataPath, cloneValue, coerceValue, parseDataPath, resolveDataPath, toCamelCase } from "./utils.mjs";
12
12
  import { clearVirtualHostClasses, clearVirtualHostParts, syncVirtualHostClasses, syncVirtualHostParts } from "./virtualHost.mjs";
13
- import { html } from "lit";
14
13
  import { WEVU_HOST_COMMIT_PROMISE_KEY } from "@weapp-core/constants";
14
+ import { html } from "lit";
15
15
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
16
16
 
17
17
  //#region src/runtime/component/element.ts
@@ -1,31 +1,31 @@
1
1
  import { __exportAll, __reExport } from "../_virtual/_rolldown/runtime.mjs";
2
2
  import { setRuntimeWarningOptions } from "./warning.mjs";
3
3
  import { installWebHostGlobals } from "./hostGlobals.mjs";
4
+ import { getRuntimeClipboard, getRuntimeDialogs, getRuntimeFetch, getRuntimeStorage, getWebRuntimeHost, openRuntimeUrl, resetWebRuntimeHost, setWebRuntimeHost } from "./host/index.mjs";
5
+ import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getDeviceInfo, getFuzzyLocation, getLocation, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getSystemInfo, getSystemInfoSync, getSystemSetting, getUserInfo, getUserProfile, getWindowInfo, login, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openSetting, vibrateShort } from "./polyfill/deviceAuthSystemApi.mjs";
6
+ import { configureWebSeo, resetWebDocumentHead, setupWebResourceHints, syncWebDocumentHead, updateWebDocumentTitle } from "./seo/index.mjs";
4
7
  import { injectStyle, removeStyle } from "./style.mjs";
5
8
  import { ensureButtonDefined, setButtonFormConfig } from "./button/index.mjs";
6
9
  import { getRuntimeExecutionMode, setRuntimeExecutionMode } from "./execution.mjs";
7
10
  import { createRenderContext } from "./renderContext.mjs";
8
11
  import { defineComponent } from "./component/index.mjs";
9
- import { bindRuntimeEvent } from "./eventBinding.mjs";
10
- import { getRuntimeClipboard, getRuntimeDialogs, getRuntimeFetch, getRuntimeStorage, getWebRuntimeHost, openRuntimeUrl, resetWebRuntimeHost, setWebRuntimeHost } from "./host/index.mjs";
11
12
  import { resolveImageModeStyle } from "./nativeComponents/image.mjs";
12
13
  import { createInputEventDetail } from "./nativeComponents/input.mjs";
13
- import { setNavigationBarMetrics } from "./navigationBar/index.mjs";
14
- import { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from "./viewport/index.mjs";
15
- import { setupRpx } from "./rpx.mjs";
16
- import { configureWebSeo, resetWebDocumentHead, setupWebResourceHints, syncWebDocumentHead, updateWebDocumentTitle } from "./seo/index.mjs";
17
- import { disposeWebRouting, getWebRoutingConfig, resolveWebRoutingConfig } from "./polyfill/routeRuntime/history.mjs";
18
- import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./polyfill/routeRuntime.mjs";
19
14
  import { clearStorage, clearStorageSync, createCanvasContext, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./polyfill/runtimeDataApi.mjs";
20
15
  import { createScrollEventDetail } from "./nativeComponents/scrollView.mjs";
21
16
  import { createSwitchEventDetail } from "./nativeComponents/switch.mjs";
22
17
  import { createTextareaLineChangeDetail } from "./nativeComponents/textarea.mjs";
23
18
  import { createVideoProgressDetail, createVideoTimeUpdateDetail, resolveVideoObjectFit } from "./nativeComponents/video/helpers.mjs";
24
19
  import { ensureNativeComponentsDefined } from "./nativeComponents/index.mjs";
25
- import { setPageLayout } from "./pageLayout.mjs";
26
- import { authorize, checkSession, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getDeviceInfo, getFuzzyLocation, getLocation, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getSystemInfo, getSystemInfoSync, getSystemSetting, getUserInfo, getUserProfile, getWindowInfo, login, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openSetting, vibrateShort } from "./polyfill/deviceAuthSystemApi.mjs";
20
+ import { setNavigationBarMetrics } from "./navigationBar/index.mjs";
21
+ import { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from "./viewport/index.mjs";
22
+ import { setupRpx } from "./rpx.mjs";
23
+ import { disposeWebRouting, getWebRoutingConfig, resolveWebRoutingConfig } from "./polyfill/routeRuntime/history.mjs";
24
+ import { getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./polyfill/routeRuntime.mjs";
27
25
  import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, hideTabBarRedDot, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, removeTabBarBadge, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, setTabBarBadge, setTabBarItem, setTabBarStyle, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showTabBarRedDot, showToast, updateShareMenu } from "./polyfill/uiMediaApi.mjs";
28
- import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./polyfill/index.mjs";
26
+ import { canIUse, createInterstitialAd, createRewardedVideoAd, getExtConfig, getExtConfigSync, getLogManager, getUpdateManager, hideNavigationBarLoading, installMiniProgramGlobals, reportAnalytics, setBackgroundColor, setBackgroundTextStyle, setNavigationBarColor, setNavigationBarTitle, showNavigationBarLoading } from "./polyfill/index.mjs";
27
+ import { bindRuntimeEvent } from "./eventBinding.mjs";
28
+ import { setPageLayout } from "./pageLayout.mjs";
29
29
  import { createTemplate, renderTemplate } from "./legacyTemplate/index.mjs";
30
30
  import { installWebModuleRegistration, registerWebWevuApp, registerWebWevuComponent, registerWebWevuComponentFactory } from "./wevu.mjs";
31
31
 
@@ -33,6 +33,7 @@ export * from "wevu/internal-runtime"
33
33
 
34
34
  //#region src/runtime/index.ts
35
35
  installWebHostGlobals();
36
+ installMiniProgramGlobals();
36
37
 
37
38
  //#endregion
38
39
  export { authorize, bindRuntimeEvent, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, configureWebSeo, createCanvasContext, createInputEventDetail, createInterstitialAd, createRenderContext, createRewardedVideoAd, createScrollEventDetail, createSelectorQuery, createSwitchEventDetail, createTemplate, createTextareaLineChangeDetail, createVKSession, createVideoContext, createVideoProgressDetail, createVideoTimeUpdateDetail, createWorker, defineComponent, disposeWebRouting, downloadFile, ensureButtonDefined, ensureNativeComponentsDefined, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getRuntimeClipboard, getRuntimeDialogs, getRuntimeExecutionMode, getRuntimeFetch, getRuntimeStorage, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWebRoutingConfig, getWebRuntimeHost, getWebViewportWidth, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, hideTabBarRedDot, initializePageRoutes, injectStyle, installWebHostGlobals, installWebModuleRegistration, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offAppHide, offAppShow, offNetworkStatusChange, offWindowResize, onAppHide, onAppShow, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openRuntimeUrl, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, registerWebWevuApp, registerWebWevuComponent, registerWebWevuComponentFactory, removeStorage, removeStorageSync, removeStyle, removeTabBarBadge, renderTemplate, reportAnalytics, request, requestPayment, requestSubscribeMessage, resetWebDocumentHead, resetWebRuntimeHost, resolveImageModeStyle, resolveVideoObjectFit, resolveWebRoutingConfig, resolveWebViewportConfig, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setButtonFormConfig, setClipboardData, setNavigationBarColor, setNavigationBarMetrics, setNavigationBarTitle, setPageLayout, setRuntimeExecutionMode, setRuntimeWarningOptions, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setWebRuntimeHost, setupRpx, setupWebResourceHints, setupWebViewport, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showTabBarRedDot, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, syncWebDocumentHead, updateShareMenu, updateWebDocumentTitle, uploadFile, vibrateShort };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/runtime/index.ts"],"sourcesContent":["import { installWebHostGlobals } from './hostGlobals'\n\ninstallWebHostGlobals()\n\nexport type { WebTabBarConfig, WebTabBarItem } from './appShell/tabBar'\nexport { ensureButtonDefined, setButtonFormConfig } from './button'\nexport type { ButtonFormConfig } from './button'\nexport { defineComponent } from './component'\nexport { bindRuntimeEvent } from './eventBinding'\nexport { getRuntimeExecutionMode, setRuntimeExecutionMode } from './execution'\nexport {\n getRuntimeClipboard,\n getRuntimeDialogs,\n getRuntimeFetch,\n getRuntimeStorage,\n getWebRuntimeHost,\n openRuntimeUrl,\n resetWebRuntimeHost,\n setWebRuntimeHost,\n} from './host'\nexport type { WebRuntimeClipboard, WebRuntimeDialogs, WebRuntimeHost, WebRuntimeStorage } from './host'\nexport { installWebHostGlobals } from './hostGlobals'\nexport {\n createInputEventDetail,\n createScrollEventDetail,\n createSwitchEventDetail,\n createTextareaLineChangeDetail,\n createVideoProgressDetail,\n createVideoTimeUpdateDetail,\n ensureNativeComponentsDefined,\n resolveImageModeStyle,\n resolveVideoObjectFit,\n} from './nativeComponents'\nexport { setNavigationBarMetrics } from './navigationBar'\nexport type { NavigationBarMetrics } from './navigationBar'\nexport { setPageLayout } from './pageLayout'\nexport {\n authorize,\n canIUse,\n checkSession,\n chooseAddress,\n chooseFile,\n chooseImage,\n chooseLocation,\n chooseMedia,\n chooseMessageFile,\n chooseVideo,\n clearStorage,\n clearStorageSync,\n compressImage,\n compressVideo,\n createCanvasContext,\n createInterstitialAd,\n createRewardedVideoAd,\n createSelectorQuery,\n createVideoContext,\n createVKSession,\n createWorker,\n downloadFile,\n exitMiniProgram,\n getAccountInfoSync,\n getAppAuthorizeSetting,\n getAppBaseInfo,\n getBatteryInfo,\n getBatteryInfoSync,\n getClipboardData,\n getDeviceInfo,\n getEnterOptionsSync,\n getExtConfig,\n getExtConfigSync,\n getFileSystemManager,\n getFuzzyLocation,\n getImageInfo,\n getLaunchOptionsSync,\n getLocation,\n getLogManager,\n getMenuButtonBoundingClientRect,\n getNetworkType,\n getSetting,\n getStorage,\n getStorageInfo,\n getStorageInfoSync,\n getStorageSync,\n getSystemInfo,\n getSystemInfoSync,\n getSystemSetting,\n getUpdateManager,\n getUserInfo,\n getUserProfile,\n getVideoInfo,\n getWindowInfo,\n hideKeyboard,\n hideLoading,\n hideNavigationBarLoading,\n hideTabBar,\n hideTabBarRedDot,\n initializePageRoutes,\n loadSubPackage,\n login,\n makePhoneCall,\n navigateBack,\n navigateTo,\n navigateToMiniProgram,\n nextTick,\n offAppHide,\n offAppShow,\n offNetworkStatusChange,\n offWindowResize,\n onAppHide,\n onAppShow,\n onNetworkStatusChange,\n onWindowResize,\n openAppAuthorizeSetting,\n openCustomerServiceChat,\n openDocument,\n openLocation,\n openSetting,\n openVideoEditor,\n pageScrollTo,\n preloadSubpackage,\n previewImage,\n previewMedia,\n redirectTo,\n registerApp,\n registerComponent,\n registerPage,\n reLaunch,\n removeStorage,\n removeStorageSync,\n removeTabBarBadge,\n reportAnalytics,\n request,\n requestPayment,\n requestSubscribeMessage,\n saveFile,\n saveFileToDisk,\n saveImageToPhotosAlbum,\n saveVideoToPhotosAlbum,\n scanCode,\n setBackgroundColor,\n setBackgroundTextStyle,\n setClipboardData,\n setNavigationBarColor,\n setNavigationBarTitle,\n setStorage,\n setStorageSync,\n setTabBarBadge,\n setTabBarItem,\n setTabBarStyle,\n showActionSheet,\n showLoading,\n showModal,\n showNavigationBarLoading,\n showShareMenu,\n showTabBar,\n showTabBarRedDot,\n showToast,\n startPullDownRefresh,\n stopPullDownRefresh,\n switchTab,\n updateShareMenu,\n uploadFile,\n vibrateShort,\n} from './polyfill'\nexport type { AppHideCallback, AppHideOptions, AppLaunchOptions, AppShowCallback } from './polyfill'\nexport {\n disposeWebRouting,\n getWebRoutingConfig,\n resolveWebRoutingConfig,\n} from './polyfill/routeRuntime/history'\nexport type {\n ResolvedWebRoutingConfig,\n WebRouteHistoryState,\n WebRouteTarget,\n WebRoutingConfig,\n WebRoutingMode,\n} from './polyfill/routeRuntime/history'\nexport { createRenderContext } from './renderContext'\nexport type { RenderContext } from './renderContext'\nexport { setupRpx } from './rpx'\nexport type { RpxConfig } from './rpx'\nexport {\n configureWebSeo,\n resetWebDocumentHead,\n setupWebResourceHints,\n syncWebDocumentHead,\n updateWebDocumentTitle,\n} from './seo'\nexport type { WebPageHead, WebResourceHint, WebResourceHintRelation, WebResourceHintsConfig, WebSeoConfig } from './seo'\nexport { injectStyle, removeStyle } from './style'\nexport { createTemplate, renderTemplate } from './template'\nexport type { TemplateRenderer, TemplateScope } from './template'\nexport { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from './viewport'\nexport type { ResolvedWebViewportConfig, WebViewportConfig } from './viewport'\nexport { setRuntimeWarningOptions } from './warning'\nexport type { RuntimeWarningLevel, RuntimeWarningOptions } from './warning'\nexport {\n installWebModuleRegistration,\n registerWebWevuApp,\n registerWebWevuComponent,\n registerWebWevuComponentFactory,\n} from './wevu'\nexport * from 'wevu/internal-runtime'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sBAAsB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/runtime/index.ts"],"sourcesContent":["import { installWebHostGlobals } from './hostGlobals'\nimport { installMiniProgramGlobals } from './polyfill'\n\ninstallWebHostGlobals()\ninstallMiniProgramGlobals()\n\nexport type { WebTabBarConfig, WebTabBarItem } from './appShell/tabBar'\nexport { ensureButtonDefined, setButtonFormConfig } from './button'\nexport type { ButtonFormConfig } from './button'\nexport { defineComponent } from './component'\nexport { bindRuntimeEvent } from './eventBinding'\nexport { getRuntimeExecutionMode, setRuntimeExecutionMode } from './execution'\nexport {\n getRuntimeClipboard,\n getRuntimeDialogs,\n getRuntimeFetch,\n getRuntimeStorage,\n getWebRuntimeHost,\n openRuntimeUrl,\n resetWebRuntimeHost,\n setWebRuntimeHost,\n} from './host'\nexport type { WebRuntimeClipboard, WebRuntimeDialogs, WebRuntimeHost, WebRuntimeStorage } from './host'\nexport { installWebHostGlobals } from './hostGlobals'\nexport {\n createInputEventDetail,\n createScrollEventDetail,\n createSwitchEventDetail,\n createTextareaLineChangeDetail,\n createVideoProgressDetail,\n createVideoTimeUpdateDetail,\n ensureNativeComponentsDefined,\n resolveImageModeStyle,\n resolveVideoObjectFit,\n} from './nativeComponents'\nexport { setNavigationBarMetrics } from './navigationBar'\nexport type { NavigationBarMetrics } from './navigationBar'\nexport { setPageLayout } from './pageLayout'\nexport {\n authorize,\n canIUse,\n checkSession,\n chooseAddress,\n chooseFile,\n chooseImage,\n chooseLocation,\n chooseMedia,\n chooseMessageFile,\n chooseVideo,\n clearStorage,\n clearStorageSync,\n compressImage,\n compressVideo,\n createCanvasContext,\n createInterstitialAd,\n createRewardedVideoAd,\n createSelectorQuery,\n createVideoContext,\n createVKSession,\n createWorker,\n downloadFile,\n exitMiniProgram,\n getAccountInfoSync,\n getAppAuthorizeSetting,\n getAppBaseInfo,\n getBatteryInfo,\n getBatteryInfoSync,\n getClipboardData,\n getDeviceInfo,\n getEnterOptionsSync,\n getExtConfig,\n getExtConfigSync,\n getFileSystemManager,\n getFuzzyLocation,\n getImageInfo,\n getLaunchOptionsSync,\n getLocation,\n getLogManager,\n getMenuButtonBoundingClientRect,\n getNetworkType,\n getSetting,\n getStorage,\n getStorageInfo,\n getStorageInfoSync,\n getStorageSync,\n getSystemInfo,\n getSystemInfoSync,\n getSystemSetting,\n getUpdateManager,\n getUserInfo,\n getUserProfile,\n getVideoInfo,\n getWindowInfo,\n hideKeyboard,\n hideLoading,\n hideNavigationBarLoading,\n hideTabBar,\n hideTabBarRedDot,\n initializePageRoutes,\n loadSubPackage,\n login,\n makePhoneCall,\n navigateBack,\n navigateTo,\n navigateToMiniProgram,\n nextTick,\n offAppHide,\n offAppShow,\n offNetworkStatusChange,\n offWindowResize,\n onAppHide,\n onAppShow,\n onNetworkStatusChange,\n onWindowResize,\n openAppAuthorizeSetting,\n openCustomerServiceChat,\n openDocument,\n openLocation,\n openSetting,\n openVideoEditor,\n pageScrollTo,\n preloadSubpackage,\n previewImage,\n previewMedia,\n redirectTo,\n registerApp,\n registerComponent,\n registerPage,\n reLaunch,\n removeStorage,\n removeStorageSync,\n removeTabBarBadge,\n reportAnalytics,\n request,\n requestPayment,\n requestSubscribeMessage,\n saveFile,\n saveFileToDisk,\n saveImageToPhotosAlbum,\n saveVideoToPhotosAlbum,\n scanCode,\n setBackgroundColor,\n setBackgroundTextStyle,\n setClipboardData,\n setNavigationBarColor,\n setNavigationBarTitle,\n setStorage,\n setStorageSync,\n setTabBarBadge,\n setTabBarItem,\n setTabBarStyle,\n showActionSheet,\n showLoading,\n showModal,\n showNavigationBarLoading,\n showShareMenu,\n showTabBar,\n showTabBarRedDot,\n showToast,\n startPullDownRefresh,\n stopPullDownRefresh,\n switchTab,\n updateShareMenu,\n uploadFile,\n vibrateShort,\n} from './polyfill'\nexport type { AppHideCallback, AppHideOptions, AppLaunchOptions, AppShowCallback } from './polyfill'\nexport {\n disposeWebRouting,\n getWebRoutingConfig,\n resolveWebRoutingConfig,\n} from './polyfill/routeRuntime/history'\nexport type {\n ResolvedWebRoutingConfig,\n WebRouteHistoryState,\n WebRouteTarget,\n WebRoutingConfig,\n WebRoutingMode,\n} from './polyfill/routeRuntime/history'\nexport { createRenderContext } from './renderContext'\nexport type { RenderContext } from './renderContext'\nexport { setupRpx } from './rpx'\nexport type { RpxConfig } from './rpx'\nexport {\n configureWebSeo,\n resetWebDocumentHead,\n setupWebResourceHints,\n syncWebDocumentHead,\n updateWebDocumentTitle,\n} from './seo'\nexport type { WebPageHead, WebResourceHint, WebResourceHintRelation, WebResourceHintsConfig, WebSeoConfig } from './seo'\nexport { injectStyle, removeStyle } from './style'\nexport { createTemplate, renderTemplate } from './template'\nexport type { TemplateRenderer, TemplateScope } from './template'\nexport { getWebViewportWidth, resolveWebViewportConfig, setupWebViewport } from './viewport'\nexport type { ResolvedWebViewportConfig, WebViewportConfig } from './viewport'\nexport { setRuntimeWarningOptions } from './warning'\nexport type { RuntimeWarningLevel, RuntimeWarningOptions } from './warning'\nexport {\n installWebModuleRegistration,\n registerWebWevuApp,\n registerWebWevuComponent,\n registerWebWevuComponentFactory,\n} from './wevu'\nexport * from 'wevu/internal-runtime'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sBAAsB;AACtB,0BAA0B"}
@@ -2,8 +2,8 @@ import { getNativeComponentDescriptor } from "../../shared/nativeComponents.mjs"
2
2
  import { emitRuntimeWarning } from "../warning.mjs";
3
3
  import { dispatchMiniProgramEvent, readBooleanAttribute, resolveContainingShadowRoot } from "./helpers.mjs";
4
4
  import { ensureNativeComponentStyle } from "./style.mjs";
5
- import { navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from "../polyfill/routeRuntime.mjs";
6
5
  import { exitMiniProgram, navigateToMiniProgram } from "../polyfill/runtimeDataApi.mjs";
6
+ import { navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from "../polyfill/routeRuntime.mjs";
7
7
 
8
8
  //#region src/runtime/nativeComponents/navigator.ts
9
9
  const BaseElement = globalThis.HTMLElement ?? class {};
@@ -1,11 +1,9 @@
1
1
  import { emitRuntimeWarning } from "../warning.mjs";
2
- import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
3
- import { getAppInstance, getCurrentPagesInternal, getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./routeRuntime.mjs";
4
- import { WEB_USER_DATA_PATH } from "./files.mjs";
5
- import { clearStorage, clearStorageSync, createCanvasContext, createIntersectionObserver, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, runtimeDataApi_exports, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./runtimeDataApi.mjs";
6
2
  import { createAnimation } from "./animation.mjs";
3
+ import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
7
4
  import { setBackgroundColorBridge, setBackgroundTextStyleBridge } from "./background.mjs";
8
5
  import { createCloudBridge } from "./cloud.mjs";
6
+ import { WEB_USER_DATA_PATH } from "./files.mjs";
9
7
  import { canIUseBridge } from "./runtimeCapabilityApi.mjs";
10
8
  import { authorize, checkSession, deviceAuthSystemApi_exports, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getDeviceInfo, getFuzzyLocation, getLocation, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getSystemInfo, getSystemInfoSync, getSystemSetting, getUserInfo, getUserProfile, getWindowInfo, login, offNetworkStatusChange, offWindowResize, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openSetting, rpx2px, upx2px, vibrateShort } from "./deviceAuthSystemApi.mjs";
11
9
  import { $emit, $off, $on, $once, eventBus_exports } from "./eventBus.mjs";
@@ -13,6 +11,8 @@ import { loadFontFace } from "./font.mjs";
13
11
  import { getLocale } from "./locale.mjs";
14
12
  import { createNavigationBarRuntimeBridge } from "./navigationBarRuntime.mjs";
15
13
  import { createInterstitialAdBridge, createRewardedVideoAdBridge, getExtConfigBridge, getExtConfigSyncBridge, getLogManagerBridge, getUpdateManagerBridge, reportAnalyticsBridge } from "./platformApi.mjs";
14
+ import { clearStorage, clearStorageSync, createCanvasContext, createIntersectionObserver, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getFileSystemManager, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, hideKeyboard, loadSubPackage, navigateToMiniProgram, nextTick, pageScrollTo, preloadSubpackage, removeStorage, removeStorageSync, request, runtimeDataApi_exports, setStorage, setStorageSync, startPullDownRefresh, stopPullDownRefresh, uploadFile } from "./runtimeDataApi.mjs";
15
+ import { getAppInstance, getCurrentPagesInternal, getEnterOptionsSync, getLaunchOptionsSync, initializePageRoutes, navigateBack, navigateTo, offAppHide, offAppShow, onAppHide, onAppShow, reLaunch, redirectTo, registerApp, registerComponent, registerPage, switchTab } from "./routeRuntime.mjs";
16
16
  import { chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, compressImage, compressVideo, getClipboardData, getImageInfo, getVideoInfo, hideLoading, hideTabBar, hideTabBarRedDot, makePhoneCall, openCustomerServiceChat, openDocument, openLocation, openVideoEditor, previewImage, previewMedia, removeTabBarBadge, requestPayment, requestSubscribeMessage, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setClipboardData, setTabBarBadge, setTabBarItem, setTabBarStyle, showActionSheet, showLoading, showModal, showShareMenu, showTabBar, showTabBarRedDot, showToast, uiMediaApi_exports, updateShareMenu } from "./uiMediaApi.mjs";
17
17
  import { getDefaultMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys } from "@weapp-core/shared";
18
18
 
@@ -70,49 +70,52 @@ function getLogManager(options) {
70
70
  function reportAnalytics(eventName, data) {
71
71
  reportAnalyticsBridge(eventName, data);
72
72
  }
73
- const miniProgramBridge = globalTarget[DEFAULT_MINI_PROGRAM_GLOBAL_KEY] ?? {};
74
- Object.assign(miniProgramBridge, {
75
- navigateTo,
76
- navigateBack,
77
- redirectTo,
78
- switchTab,
79
- reLaunch,
80
- getLaunchOptionsSync,
81
- getEnterOptionsSync,
82
- offAppHide,
83
- offAppShow,
84
- onAppHide,
85
- onAppShow,
86
- ...runtimeDataApi_exports,
87
- setNavigationBarTitle,
88
- setNavigationBarColor,
89
- setBackgroundColor,
90
- setBackgroundTextStyle,
91
- showNavigationBarLoading,
92
- hideNavigationBarLoading,
93
- ...uiMediaApi_exports,
94
- ...deviceAuthSystemApi_exports,
95
- ...eventBus_exports,
96
- loadFontFace,
97
- getLocale,
98
- createAnimation,
99
- createRewardedVideoAd,
100
- createInterstitialAd,
101
- getExtConfigSync,
102
- getExtConfig,
103
- getUpdateManager,
104
- getLogManager,
105
- reportAnalytics,
106
- canIUse,
107
- cloud: cloudBridge
108
- });
109
- const miniProgramEnv = miniProgramBridge.env ?? {};
110
- if (typeof miniProgramEnv.USER_DATA_PATH !== "string" || !miniProgramEnv.USER_DATA_PATH.trim()) miniProgramEnv.USER_DATA_PATH = WEB_USER_DATA_PATH;
111
- miniProgramBridge.env = miniProgramEnv;
112
- for (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) globalTarget[runtimeGlobalKey] = miniProgramBridge;
113
- if (typeof globalTarget.getApp !== "function") globalTarget.getApp = getAppInstance;
114
- if (typeof globalTarget.getCurrentPages !== "function") globalTarget.getCurrentPages = getCurrentPagesInternal;
73
+ /** 由公开运行时入口显式安装,确保拆分发布后的子模块不被摇树优化移除。 */
74
+ function installMiniProgramGlobals() {
75
+ const miniProgramBridge = globalTarget[DEFAULT_MINI_PROGRAM_GLOBAL_KEY] ?? {};
76
+ Object.assign(miniProgramBridge, {
77
+ navigateTo,
78
+ navigateBack,
79
+ redirectTo,
80
+ switchTab,
81
+ reLaunch,
82
+ getLaunchOptionsSync,
83
+ getEnterOptionsSync,
84
+ offAppHide,
85
+ offAppShow,
86
+ onAppHide,
87
+ onAppShow,
88
+ ...runtimeDataApi_exports,
89
+ setNavigationBarTitle,
90
+ setNavigationBarColor,
91
+ setBackgroundColor,
92
+ setBackgroundTextStyle,
93
+ showNavigationBarLoading,
94
+ hideNavigationBarLoading,
95
+ ...uiMediaApi_exports,
96
+ ...deviceAuthSystemApi_exports,
97
+ ...eventBus_exports,
98
+ loadFontFace,
99
+ getLocale,
100
+ createAnimation,
101
+ createRewardedVideoAd,
102
+ createInterstitialAd,
103
+ getExtConfigSync,
104
+ getExtConfig,
105
+ getUpdateManager,
106
+ getLogManager,
107
+ reportAnalytics,
108
+ canIUse,
109
+ cloud: cloudBridge
110
+ });
111
+ const miniProgramEnv = miniProgramBridge.env ?? {};
112
+ if (typeof miniProgramEnv.USER_DATA_PATH !== "string" || !miniProgramEnv.USER_DATA_PATH.trim()) miniProgramEnv.USER_DATA_PATH = WEB_USER_DATA_PATH;
113
+ miniProgramBridge.env = miniProgramEnv;
114
+ for (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) globalTarget[runtimeGlobalKey] = miniProgramBridge;
115
+ if (typeof globalTarget.getApp !== "function") globalTarget.getApp = getAppInstance;
116
+ if (typeof globalTarget.getCurrentPages !== "function") globalTarget.getCurrentPages = getCurrentPagesInternal;
117
+ }
115
118
 
116
119
  //#endregion
117
- export { $emit, $off, $on, $once, authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createIntersectionObserver, createInterstitialAd, createRewardedVideoAd, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, hideTabBarRedDot, initializePageRoutes, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offAppHide, offAppShow, offNetworkStatusChange, offWindowResize, onAppHide, onAppShow, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, removeTabBarBadge, reportAnalytics, request, requestPayment, requestSubscribeMessage, rpx2px, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setClipboardData, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showTabBarRedDot, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, updateShareMenu, uploadFile, upx2px, vibrateShort };
120
+ export { $emit, $off, $on, $once, authorize, canIUse, checkSession, chooseAddress, chooseFile, chooseImage, chooseLocation, chooseMedia, chooseMessageFile, chooseVideo, clearStorage, clearStorageSync, compressImage, compressVideo, createCanvasContext, createIntersectionObserver, createInterstitialAd, createRewardedVideoAd, createSelectorQuery, createVKSession, createVideoContext, createWorker, downloadFile, exitMiniProgram, getAccountInfoSync, getAppAuthorizeSetting, getAppBaseInfo, getBatteryInfo, getBatteryInfoSync, getClipboardData, getDeviceInfo, getEnterOptionsSync, getExtConfig, getExtConfigSync, getFileSystemManager, getFuzzyLocation, getImageInfo, getLaunchOptionsSync, getLocation, getLogManager, getMenuButtonBoundingClientRect, getNetworkType, getSetting, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getSystemSetting, getUpdateManager, getUserInfo, getUserProfile, getVideoInfo, getWindowInfo, hideKeyboard, hideLoading, hideNavigationBarLoading, hideTabBar, hideTabBarRedDot, initializePageRoutes, installMiniProgramGlobals, loadSubPackage, login, makePhoneCall, navigateBack, navigateTo, navigateToMiniProgram, nextTick, offAppHide, offAppShow, offNetworkStatusChange, offWindowResize, onAppHide, onAppShow, onNetworkStatusChange, onWindowResize, openAppAuthorizeSetting, openCustomerServiceChat, openDocument, openLocation, openSetting, openVideoEditor, pageScrollTo, preloadSubpackage, previewImage, previewMedia, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStorage, removeStorageSync, removeTabBarBadge, reportAnalytics, request, requestPayment, requestSubscribeMessage, rpx2px, saveFile, saveFileToDisk, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, setBackgroundColor, setBackgroundTextStyle, setClipboardData, setNavigationBarColor, setNavigationBarTitle, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, showActionSheet, showLoading, showModal, showNavigationBarLoading, showShareMenu, showTabBar, showTabBarRedDot, showToast, startPullDownRefresh, stopPullDownRefresh, switchTab, updateShareMenu, uploadFile, upx2px, vibrateShort };
118
121
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["runtimeDataApi","uiMediaApi","deviceAuthSystemApi","eventBusApi"],"sources":["../../../src/runtime/polyfill/index.ts"],"sourcesContent":["import type {\n AdBaseOptions,\n CloudBridge,\n GetExtConfigOptions,\n InterstitialAd,\n LogManager,\n LogManagerOptions,\n MiniProgramAsyncOptions,\n MiniProgramBaseResult,\n RewardedVideoAd,\n SetBackgroundColorOptions,\n SetBackgroundTextStyleOptions,\n UpdateManager,\n} from './types'\nimport { getDefaultMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys } from '@weapp-core/shared'\nimport { emitRuntimeWarning } from '../warning'\nimport { createAnimation } from './animation'\nimport {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n setBackgroundColorBridge,\n setBackgroundTextStyleBridge,\n} from './background'\nimport { createCloudBridge } from './cloud'\nimport * as deviceAuthSystemApi from './deviceAuthSystemApi'\nimport * as eventBusApi from './eventBus'\nimport { WEB_USER_DATA_PATH } from './files'\nimport { loadFontFace } from './font'\nimport { getLocale } from './locale'\nimport { createNavigationBarRuntimeBridge } from './navigationBarRuntime'\nimport {\n createInterstitialAdBridge,\n createRewardedVideoAdBridge,\n getExtConfigBridge,\n getExtConfigSyncBridge,\n getLogManagerBridge,\n getUpdateManagerBridge,\n reportAnalyticsBridge,\n} from './platformApi'\nimport {\n getAppInstance,\n getCurrentPagesInternal,\n getEnterOptionsSync,\n getLaunchOptionsSync,\n navigateBack,\n navigateTo,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n redirectTo,\n reLaunch,\n switchTab,\n} from './routeRuntime'\nimport {\n canIUseBridge,\n} from './runtimeCapabilityApi'\nimport * as runtimeDataApi from './runtimeDataApi'\nimport * as uiMediaApi from './uiMediaApi'\n\nexport { createAnimation } from './animation'\nexport * from './deviceAuthSystemApi'\nexport * from './eventBus'\nexport { loadFontFace } from './font'\nexport { getLocale } from './locale'\n\nexport {\n getEnterOptionsSync,\n getLaunchOptionsSync,\n initializePageRoutes,\n navigateBack,\n navigateTo,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n redirectTo,\n registerApp,\n registerComponent,\n registerPage,\n reLaunch,\n switchTab,\n} from './routeRuntime'\n\nexport type { AppHideCallback, AppHideOptions, AppLaunchOptions, AppShowCallback } from './routeRuntime/options'\n\nexport * from './runtimeDataApi'\nexport * from './uiMediaApi'\n\nconst MINI_PROGRAM_GLOBAL_KEYS = getMiniProgramRuntimeGlobalKeys()\nconst DEFAULT_MINI_PROGRAM_GLOBAL_KEY = getDefaultMiniProgramRuntimeGlobalKey()\nconst globalTarget = globalThis as Record<string, unknown>\n\nfunction resolveMiniProgramBridge() {\n for (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) {\n const candidate = globalTarget[runtimeGlobalKey]\n if (candidate && typeof candidate === 'object') {\n return candidate as Record<string, unknown>\n }\n }\n return undefined\n}\n\nconst navigationBarRuntimeBridge = createNavigationBarRuntimeBridge(\n () => getCurrentPagesInternal() as Array<HTMLElement & { renderRoot?: ShadowRoot | HTMLElement }>,\n emitRuntimeWarning,\n)\n\nexport function setNavigationBarTitle(options: { title: string }) {\n return navigationBarRuntimeBridge.setNavigationBarTitle(options)\n}\n\nexport function setNavigationBarColor(options: {\n frontColor?: string\n backgroundColor?: string\n animation?: { duration?: number, timingFunction?: string }\n}) {\n return navigationBarRuntimeBridge.setNavigationBarColor(options)\n}\n\nexport function showNavigationBarLoading() {\n return navigationBarRuntimeBridge.showNavigationBarLoading()\n}\n\nexport function hideNavigationBarLoading() {\n return navigationBarRuntimeBridge.hideNavigationBarLoading()\n}\n\nexport function setBackgroundColor(options?: SetBackgroundColorOptions) {\n return setBackgroundColorBridge(options)\n}\n\nexport function setBackgroundTextStyle(options?: SetBackgroundTextStyleOptions) {\n return setBackgroundTextStyleBridge(options)\n}\n\nexport function canIUse(schema: string) {\n return canIUseBridge(resolveMiniProgramBridge(), schema)\n}\n\nconst cloudBridge: CloudBridge = createCloudBridge(\n (options, result) => callMiniProgramAsyncSuccess(\n options as unknown as MiniProgramAsyncOptions<MiniProgramBaseResult> | undefined,\n result as MiniProgramBaseResult,\n ),\n (options, errMsg) => callMiniProgramAsyncFailure(\n options as unknown as MiniProgramAsyncOptions<MiniProgramBaseResult> | undefined,\n errMsg,\n ),\n) as CloudBridge\n\nexport function createRewardedVideoAd(options?: AdBaseOptions): RewardedVideoAd {\n return createRewardedVideoAdBridge(options)\n}\n\nexport function createInterstitialAd(options?: AdBaseOptions): InterstitialAd {\n return createInterstitialAdBridge(options)\n}\n\nexport function getExtConfigSync() {\n return getExtConfigSyncBridge()\n}\n\nexport function getExtConfig(options?: GetExtConfigOptions) {\n return getExtConfigBridge(options)\n}\n\nexport function getUpdateManager(): UpdateManager {\n return getUpdateManagerBridge()\n}\n\nexport function getLogManager(options?: LogManagerOptions): LogManager {\n return getLogManagerBridge(options)\n}\n\nexport function reportAnalytics(eventName: string, data?: Record<string, unknown>) {\n reportAnalyticsBridge(eventName, data)\n}\n\nconst miniProgramBridge = (globalTarget[DEFAULT_MINI_PROGRAM_GLOBAL_KEY] as Record<string, unknown> | undefined) ?? {}\nObject.assign(miniProgramBridge, {\n navigateTo,\n navigateBack,\n redirectTo,\n switchTab,\n reLaunch,\n getLaunchOptionsSync,\n getEnterOptionsSync,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n ...runtimeDataApi,\n setNavigationBarTitle,\n setNavigationBarColor,\n setBackgroundColor,\n setBackgroundTextStyle,\n showNavigationBarLoading,\n hideNavigationBarLoading,\n ...uiMediaApi,\n ...deviceAuthSystemApi,\n ...eventBusApi,\n loadFontFace,\n getLocale,\n createAnimation,\n createRewardedVideoAd,\n createInterstitialAd,\n getExtConfigSync,\n getExtConfig,\n getUpdateManager,\n getLogManager,\n reportAnalytics,\n canIUse,\n cloud: cloudBridge,\n})\nconst miniProgramEnv = (miniProgramBridge.env as Record<string, unknown> | undefined) ?? {}\nif (typeof miniProgramEnv.USER_DATA_PATH !== 'string' || !miniProgramEnv.USER_DATA_PATH.trim()) {\n miniProgramEnv.USER_DATA_PATH = WEB_USER_DATA_PATH\n}\nminiProgramBridge.env = miniProgramEnv\nfor (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) {\n globalTarget[runtimeGlobalKey] = miniProgramBridge\n}\nif (typeof globalTarget.getApp !== 'function') {\n globalTarget.getApp = getAppInstance\n}\nif (typeof globalTarget.getCurrentPages !== 'function') {\n globalTarget.getCurrentPages = getCurrentPagesInternal\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2FA,MAAM,2BAA2B,gCAAgC;AACjE,MAAM,kCAAkC,sCAAsC;AAC9E,MAAM,eAAe;AAErB,SAAS,2BAA2B;CAClC,KAAK,MAAM,oBAAoB,0BAA0B;EACvD,MAAM,YAAY,aAAa;EAC/B,IAAI,aAAa,OAAO,cAAc,UACpC,OAAO;CAEX;AAEF;AAEA,MAAM,6BAA6B,uCAC3B,wBAAwB,GAC9B,kBACF;AAEA,SAAgB,sBAAsB,SAA4B;CAChE,OAAO,2BAA2B,sBAAsB,OAAO;AACjE;AAEA,SAAgB,sBAAsB,SAInC;CACD,OAAO,2BAA2B,sBAAsB,OAAO;AACjE;AAEA,SAAgB,2BAA2B;CACzC,OAAO,2BAA2B,yBAAyB;AAC7D;AAEA,SAAgB,2BAA2B;CACzC,OAAO,2BAA2B,yBAAyB;AAC7D;AAEA,SAAgB,mBAAmB,SAAqC;CACtE,OAAO,yBAAyB,OAAO;AACzC;AAEA,SAAgB,uBAAuB,SAAyC;CAC9E,OAAO,6BAA6B,OAAO;AAC7C;AAEA,SAAgB,QAAQ,QAAgB;CACtC,OAAO,cAAc,yBAAyB,GAAG,MAAM;AACzD;AAEA,MAAM,cAA2B,mBAC9B,SAAS,WAAW,4BACnB,SACA,MACF,IACC,SAAS,WAAW,4BACnB,SACA,MACF,CACF;AAEA,SAAgB,sBAAsB,SAA0C;CAC9E,OAAO,4BAA4B,OAAO;AAC5C;AAEA,SAAgB,qBAAqB,SAAyC;CAC5E,OAAO,2BAA2B,OAAO;AAC3C;AAEA,SAAgB,mBAAmB;CACjC,OAAO,uBAAuB;AAChC;AAEA,SAAgB,aAAa,SAA+B;CAC1D,OAAO,mBAAmB,OAAO;AACnC;AAEA,SAAgB,mBAAkC;CAChD,OAAO,uBAAuB;AAChC;AAEA,SAAgB,cAAc,SAAyC;CACrE,OAAO,oBAAoB,OAAO;AACpC;AAEA,SAAgB,gBAAgB,WAAmB,MAAgC;CACjF,sBAAsB,WAAW,IAAI;AACvC;AAEA,MAAM,oBAAqB,aAAa,oCAA4E,CAAC;AACrH,OAAO,OAAO,mBAAmB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAGA;CACH;CACA;CACA;CACA;CACA;CACA;CACA,GAAGC;CACH,GAAGC;CACH,GAAGC;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,OAAO;AACT,CAAC;AACD,MAAM,iBAAkB,kBAAkB,OAA+C,CAAC;AAC1F,IAAI,OAAO,eAAe,mBAAmB,YAAY,CAAC,eAAe,eAAe,KAAK,GAC3F,eAAe,iBAAiB;AAElC,kBAAkB,MAAM;AACxB,KAAK,MAAM,oBAAoB,0BAC7B,aAAa,oBAAoB;AAEnC,IAAI,OAAO,aAAa,WAAW,YACjC,aAAa,SAAS;AAExB,IAAI,OAAO,aAAa,oBAAoB,YAC1C,aAAa,kBAAkB"}
1
+ {"version":3,"file":"index.mjs","names":["runtimeDataApi","uiMediaApi","deviceAuthSystemApi","eventBusApi"],"sources":["../../../src/runtime/polyfill/index.ts"],"sourcesContent":["import type {\n AdBaseOptions,\n CloudBridge,\n GetExtConfigOptions,\n InterstitialAd,\n LogManager,\n LogManagerOptions,\n MiniProgramAsyncOptions,\n MiniProgramBaseResult,\n RewardedVideoAd,\n SetBackgroundColorOptions,\n SetBackgroundTextStyleOptions,\n UpdateManager,\n} from './types'\nimport { getDefaultMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys } from '@weapp-core/shared'\nimport { emitRuntimeWarning } from '../warning'\nimport { createAnimation } from './animation'\nimport {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n setBackgroundColorBridge,\n setBackgroundTextStyleBridge,\n} from './background'\nimport { createCloudBridge } from './cloud'\nimport * as deviceAuthSystemApi from './deviceAuthSystemApi'\nimport * as eventBusApi from './eventBus'\nimport { WEB_USER_DATA_PATH } from './files'\nimport { loadFontFace } from './font'\nimport { getLocale } from './locale'\nimport { createNavigationBarRuntimeBridge } from './navigationBarRuntime'\nimport {\n createInterstitialAdBridge,\n createRewardedVideoAdBridge,\n getExtConfigBridge,\n getExtConfigSyncBridge,\n getLogManagerBridge,\n getUpdateManagerBridge,\n reportAnalyticsBridge,\n} from './platformApi'\nimport {\n getAppInstance,\n getCurrentPagesInternal,\n getEnterOptionsSync,\n getLaunchOptionsSync,\n navigateBack,\n navigateTo,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n redirectTo,\n reLaunch,\n switchTab,\n} from './routeRuntime'\nimport {\n canIUseBridge,\n} from './runtimeCapabilityApi'\nimport * as runtimeDataApi from './runtimeDataApi'\nimport * as uiMediaApi from './uiMediaApi'\n\nexport { createAnimation } from './animation'\nexport * from './deviceAuthSystemApi'\nexport * from './eventBus'\nexport { loadFontFace } from './font'\nexport { getLocale } from './locale'\n\nexport {\n getEnterOptionsSync,\n getLaunchOptionsSync,\n initializePageRoutes,\n navigateBack,\n navigateTo,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n redirectTo,\n registerApp,\n registerComponent,\n registerPage,\n reLaunch,\n switchTab,\n} from './routeRuntime'\n\nexport type { AppHideCallback, AppHideOptions, AppLaunchOptions, AppShowCallback } from './routeRuntime/options'\n\nexport * from './runtimeDataApi'\nexport * from './uiMediaApi'\n\nconst MINI_PROGRAM_GLOBAL_KEYS = getMiniProgramRuntimeGlobalKeys()\nconst DEFAULT_MINI_PROGRAM_GLOBAL_KEY = getDefaultMiniProgramRuntimeGlobalKey()\nconst globalTarget = globalThis as Record<string, unknown>\n\nfunction resolveMiniProgramBridge() {\n for (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) {\n const candidate = globalTarget[runtimeGlobalKey]\n if (candidate && typeof candidate === 'object') {\n return candidate as Record<string, unknown>\n }\n }\n return undefined\n}\n\nconst navigationBarRuntimeBridge = createNavigationBarRuntimeBridge(\n () => getCurrentPagesInternal() as Array<HTMLElement & { renderRoot?: ShadowRoot | HTMLElement }>,\n emitRuntimeWarning,\n)\n\nexport function setNavigationBarTitle(options: { title: string }) {\n return navigationBarRuntimeBridge.setNavigationBarTitle(options)\n}\n\nexport function setNavigationBarColor(options: {\n frontColor?: string\n backgroundColor?: string\n animation?: { duration?: number, timingFunction?: string }\n}) {\n return navigationBarRuntimeBridge.setNavigationBarColor(options)\n}\n\nexport function showNavigationBarLoading() {\n return navigationBarRuntimeBridge.showNavigationBarLoading()\n}\n\nexport function hideNavigationBarLoading() {\n return navigationBarRuntimeBridge.hideNavigationBarLoading()\n}\n\nexport function setBackgroundColor(options?: SetBackgroundColorOptions) {\n return setBackgroundColorBridge(options)\n}\n\nexport function setBackgroundTextStyle(options?: SetBackgroundTextStyleOptions) {\n return setBackgroundTextStyleBridge(options)\n}\n\nexport function canIUse(schema: string) {\n return canIUseBridge(resolveMiniProgramBridge(), schema)\n}\n\nconst cloudBridge: CloudBridge = createCloudBridge(\n (options, result) => callMiniProgramAsyncSuccess(\n options as unknown as MiniProgramAsyncOptions<MiniProgramBaseResult> | undefined,\n result as MiniProgramBaseResult,\n ),\n (options, errMsg) => callMiniProgramAsyncFailure(\n options as unknown as MiniProgramAsyncOptions<MiniProgramBaseResult> | undefined,\n errMsg,\n ),\n) as CloudBridge\n\nexport function createRewardedVideoAd(options?: AdBaseOptions): RewardedVideoAd {\n return createRewardedVideoAdBridge(options)\n}\n\nexport function createInterstitialAd(options?: AdBaseOptions): InterstitialAd {\n return createInterstitialAdBridge(options)\n}\n\nexport function getExtConfigSync() {\n return getExtConfigSyncBridge()\n}\n\nexport function getExtConfig(options?: GetExtConfigOptions) {\n return getExtConfigBridge(options)\n}\n\nexport function getUpdateManager(): UpdateManager {\n return getUpdateManagerBridge()\n}\n\nexport function getLogManager(options?: LogManagerOptions): LogManager {\n return getLogManagerBridge(options)\n}\n\nexport function reportAnalytics(eventName: string, data?: Record<string, unknown>) {\n reportAnalyticsBridge(eventName, data)\n}\n\n/** 由公开运行时入口显式安装,确保拆分发布后的子模块不被摇树优化移除。 */\nexport function installMiniProgramGlobals(): void {\n const miniProgramBridge = (globalTarget[DEFAULT_MINI_PROGRAM_GLOBAL_KEY] as Record<string, unknown> | undefined) ?? {}\n Object.assign(miniProgramBridge, {\n navigateTo,\n navigateBack,\n redirectTo,\n switchTab,\n reLaunch,\n getLaunchOptionsSync,\n getEnterOptionsSync,\n offAppHide,\n offAppShow,\n onAppHide,\n onAppShow,\n ...runtimeDataApi,\n setNavigationBarTitle,\n setNavigationBarColor,\n setBackgroundColor,\n setBackgroundTextStyle,\n showNavigationBarLoading,\n hideNavigationBarLoading,\n ...uiMediaApi,\n ...deviceAuthSystemApi,\n ...eventBusApi,\n loadFontFace,\n getLocale,\n createAnimation,\n createRewardedVideoAd,\n createInterstitialAd,\n getExtConfigSync,\n getExtConfig,\n getUpdateManager,\n getLogManager,\n reportAnalytics,\n canIUse,\n cloud: cloudBridge,\n })\n const miniProgramEnv = (miniProgramBridge.env as Record<string, unknown> | undefined) ?? {}\n if (typeof miniProgramEnv.USER_DATA_PATH !== 'string' || !miniProgramEnv.USER_DATA_PATH.trim()) {\n miniProgramEnv.USER_DATA_PATH = WEB_USER_DATA_PATH\n }\n miniProgramBridge.env = miniProgramEnv\n for (const runtimeGlobalKey of MINI_PROGRAM_GLOBAL_KEYS) {\n globalTarget[runtimeGlobalKey] = miniProgramBridge\n }\n if (typeof globalTarget.getApp !== 'function') {\n globalTarget.getApp = getAppInstance\n }\n if (typeof globalTarget.getCurrentPages !== 'function') {\n globalTarget.getCurrentPages = getCurrentPagesInternal\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2FA,MAAM,2BAA2B,gCAAgC;AACjE,MAAM,kCAAkC,sCAAsC;AAC9E,MAAM,eAAe;AAErB,SAAS,2BAA2B;CAClC,KAAK,MAAM,oBAAoB,0BAA0B;EACvD,MAAM,YAAY,aAAa;EAC/B,IAAI,aAAa,OAAO,cAAc,UACpC,OAAO;CAEX;AAEF;AAEA,MAAM,6BAA6B,uCAC3B,wBAAwB,GAC9B,kBACF;AAEA,SAAgB,sBAAsB,SAA4B;CAChE,OAAO,2BAA2B,sBAAsB,OAAO;AACjE;AAEA,SAAgB,sBAAsB,SAInC;CACD,OAAO,2BAA2B,sBAAsB,OAAO;AACjE;AAEA,SAAgB,2BAA2B;CACzC,OAAO,2BAA2B,yBAAyB;AAC7D;AAEA,SAAgB,2BAA2B;CACzC,OAAO,2BAA2B,yBAAyB;AAC7D;AAEA,SAAgB,mBAAmB,SAAqC;CACtE,OAAO,yBAAyB,OAAO;AACzC;AAEA,SAAgB,uBAAuB,SAAyC;CAC9E,OAAO,6BAA6B,OAAO;AAC7C;AAEA,SAAgB,QAAQ,QAAgB;CACtC,OAAO,cAAc,yBAAyB,GAAG,MAAM;AACzD;AAEA,MAAM,cAA2B,mBAC9B,SAAS,WAAW,4BACnB,SACA,MACF,IACC,SAAS,WAAW,4BACnB,SACA,MACF,CACF;AAEA,SAAgB,sBAAsB,SAA0C;CAC9E,OAAO,4BAA4B,OAAO;AAC5C;AAEA,SAAgB,qBAAqB,SAAyC;CAC5E,OAAO,2BAA2B,OAAO;AAC3C;AAEA,SAAgB,mBAAmB;CACjC,OAAO,uBAAuB;AAChC;AAEA,SAAgB,aAAa,SAA+B;CAC1D,OAAO,mBAAmB,OAAO;AACnC;AAEA,SAAgB,mBAAkC;CAChD,OAAO,uBAAuB;AAChC;AAEA,SAAgB,cAAc,SAAyC;CACrE,OAAO,oBAAoB,OAAO;AACpC;AAEA,SAAgB,gBAAgB,WAAmB,MAAgC;CACjF,sBAAsB,WAAW,IAAI;AACvC;;AAGA,SAAgB,4BAAkC;CAChD,MAAM,oBAAqB,aAAa,oCAA4E,CAAC;CACrH,OAAO,OAAO,mBAAmB;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAGA;EACH;EACA;EACA;EACA;EACA;EACA;EACA,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;CACT,CAAC;CACD,MAAM,iBAAkB,kBAAkB,OAA+C,CAAC;CAC1F,IAAI,OAAO,eAAe,mBAAmB,YAAY,CAAC,eAAe,eAAe,KAAK,GAC3F,eAAe,iBAAiB;CAElC,kBAAkB,MAAM;CACxB,KAAK,MAAM,oBAAoB,0BAC7B,aAAa,oBAAoB;CAEnC,IAAI,OAAO,aAAa,WAAW,YACjC,aAAa,SAAS;CAExB,IAAI,OAAO,aAAa,oBAAoB,YAC1C,aAAa,kBAAkB;AAEnC"}
@@ -1,5 +1,5 @@
1
- import { openRuntimeUrl } from "../host/index.mjs";
2
1
  import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
2
+ import { openRuntimeUrl } from "../host/index.mjs";
3
3
  import { getGlobalDialogHandlers } from "./ui.mjs";
4
4
  import { readClipboardData, resolveScanCodeResult, writeClipboardData } from "./interaction.mjs";
5
5
 
@@ -1,5 +1,5 @@
1
- import { openRuntimeUrl } from "../host/index.mjs";
2
1
  import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
2
+ import { openRuntimeUrl } from "../host/index.mjs";
3
3
  import { normalizeFuzzyCoordinate, normalizeGeoNumber, parseChooseAddressPromptInput, parseChooseLocationPromptInput, readCurrentLocation, readPresetChooseAddress, readPresetChooseLocation, readPresetFuzzyLocation } from "./location.mjs";
4
4
  import { openTargetInNewWindow } from "./mediaActions.mjs";
5
5
  import { getGlobalDialogHandlers } from "./ui.mjs";
@@ -1,6 +1,6 @@
1
1
  import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "../async.mjs";
2
- import { normalizeFilePath, resolveOpenDocumentUrl, resolveSaveFilePath, saveMemoryFile } from "../files.mjs";
3
2
  import { openTargetInNewWindow, triggerDownload } from "../mediaActions.mjs";
3
+ import { normalizeFilePath, resolveOpenDocumentUrl, resolveSaveFilePath, saveMemoryFile } from "../files.mjs";
4
4
 
5
5
  //#region src/runtime/polyfill/mediaApi/file.ts
6
6
  function saveImageToPhotosAlbumBridge(options) {
@@ -1,7 +1,7 @@
1
- import { setTabBarBadgeState, setTabBarRedDotState, setTabBarVisible, updateTabBarItem, updateTabBarStyle } from "../appShell/tabBar/index.mjs";
2
1
  import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
3
- import { readNetworkStatusSnapshot } from "./network/status.mjs";
4
2
  import { normalizeActionSheetItems, resolveActionSheetSelection, resolveModalSelection } from "./ui.mjs";
3
+ import { setTabBarBadgeState, setTabBarRedDotState, setTabBarVisible, updateTabBarItem, updateTabBarStyle } from "../appShell/tabBar/index.mjs";
4
+ import { readNetworkStatusSnapshot } from "./network/status.mjs";
5
5
  import { normalizeSubscribeTemplateIds, resolveSubscribeDecisionMap } from "./subscribe.mjs";
6
6
 
7
7
  //#region src/runtime/polyfill/menuApi.ts
@@ -1,6 +1,6 @@
1
1
  import { callMiniProgramAsyncSuccess, scheduleMicrotask } from "./async.mjs";
2
- import { createLogManagerBridge, createUpdateManagerBridge, readExtConfigValue, readRuntimeConsole, reportAnalyticsEvent, resolveUpdateManagerPreset } from "./platformRuntime.mjs";
3
2
  import { createInterstitialAdImpl, createRewardedVideoAdImpl } from "./ad.mjs";
3
+ import { createLogManagerBridge, createUpdateManagerBridge, readExtConfigValue, readRuntimeConsole, reportAnalyticsEvent, resolveUpdateManagerPreset } from "./platformRuntime.mjs";
4
4
 
5
5
  //#region src/runtime/polyfill/platformApi.ts
6
6
  function createRewardedVideoAdBridge(options) {
@@ -1,6 +1,6 @@
1
1
  import { ensureAppContainer, onDocumentReady } from "../../appShell/container.mjs";
2
- import { attachRouteMeta } from "./lifecycle.mjs";
3
2
  import { bindPageScrollOwner, getPageContainer, restoreEntryScrollPosition, setEntryScrollOwner } from "./scroll.mjs";
3
+ import { attachRouteMeta } from "./lifecycle.mjs";
4
4
 
5
5
  //#region src/runtime/polyfill/routeRuntime/dom.ts
6
6
  function applyEntryVisibility(entry) {
@@ -1,5 +1,5 @@
1
- import { hidePageInstance, showPageInstance } from "./lifecycle.mjs";
2
1
  import { captureEntryScrollPosition, restoreEntryScrollPosition } from "./scroll.mjs";
2
+ import { hidePageInstance, showPageInstance } from "./lifecycle.mjs";
3
3
  import { mountEntryToDom, setEntryActiveInDom, unmountEntryFromDom } from "./dom.mjs";
4
4
 
5
5
  //#region src/runtime/polyfill/routeRuntime/stack.ts
@@ -1,13 +1,14 @@
1
1
  import { slugify } from "../../shared/slugify.mjs";
2
2
  import { setRuntimeWarningOptions } from "../warning.mjs";
3
+ import { configureTabBar, getTabBarPagePaths, syncTabBarRoute } from "../appShell/tabBar/index.mjs";
4
+ import { configureWebSeo, setupWebResourceHints, syncWebDocumentHead } from "../seo/index.mjs";
3
5
  import { setButtonFormConfig } from "../button/index.mjs";
4
6
  import { setRuntimeExecutionMode } from "../execution.mjs";
5
7
  import { defineComponent } from "../component/index.mjs";
6
- import { configureTabBar, getTabBarPagePaths, syncTabBarRoute } from "../appShell/tabBar/index.mjs";
8
+ import { ensureNativeComponentsDefined } from "../nativeComponents/index.mjs";
7
9
  import { ensureNavigationBarDefined, setNavigationBarMetrics } from "../navigationBar/index.mjs";
8
10
  import { setupWebViewport } from "../viewport/index.mjs";
9
11
  import { setupRpx } from "../rpx.mjs";
10
- import { configureWebSeo, setupWebResourceHints, syncWebDocumentHead } from "../seo/index.mjs";
11
12
  import { resolveCurrentPages } from "./appState.mjs";
12
13
  import { normalizeComponentOptions, normalizePageOptions } from "./routeRuntime/options.mjs";
13
14
  import { AppLifecycleRuntime } from "./routeRuntime/appLifecycle.mjs";
@@ -16,7 +17,6 @@ import { augmentPageComponentOptions, dispatchPageLifetimeToComponents } from ".
16
17
  import { resolveRouteAction } from "./routeRuntime/result.mjs";
17
18
  import { PageStackRuntime } from "./routeRuntime/stack.mjs";
18
19
  import { parsePageUrl } from "./routeRuntime/url.mjs";
19
- import { ensureNativeComponentsDefined } from "../nativeComponents/index.mjs";
20
20
 
21
21
  //#region src/runtime/polyfill/routeRuntime.ts
22
22
  const pageRegistry = /* @__PURE__ */ new Map();
@@ -1,9 +1,9 @@
1
1
  import { __exportAll } from "../../_virtual/_rolldown/runtime.mjs";
2
+ import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
3
+ import { downloadFileByFetchBridge, requestByFetchBridge, uploadFileByFetchBridge } from "./network/requestBridge.mjs";
2
4
  import { createSelectorQueryBridge } from "./selectorQuery.mjs";
3
5
  import { createIntersectionObserverBridge } from "./intersectionObserver.mjs";
4
- import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
5
6
  import { createCanvasContextBridge } from "./canvasContext.mjs";
6
- import { downloadFileByFetchBridge, requestByFetchBridge, uploadFileByFetchBridge } from "./network/requestBridge.mjs";
7
7
  import { clearStorageSyncBridge, createFileSystemManagerBridgeApi, createVKSessionBridgeApi, createWorkerBridgeApi, getStorageInfoSyncBridge, getStorageSyncBridge, removeStorageSyncBridge, setStorageSyncBridge } from "./runtimeInfra.mjs";
8
8
  import { hideKeyboardBridge, loadSubPackageBridge, nextTickBridge, pageScrollToBridge, preloadSubpackageBridge, startPullDownRefreshBridge, stopPullDownRefreshBridge } from "./runtimeOps.mjs";
9
9
  import { clearStorageBridge, getStorageBridge, getStorageInfoBridge, removeStorageBridge, setStorageBridge } from "./storageAsync.mjs";
@@ -1,6 +1,6 @@
1
1
  import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess, normalizeDuration, scheduleMicrotask } from "./async.mjs";
2
- import { getPageContainer, recordActiveEntryScrollPosition } from "./routeRuntime/scroll.mjs";
3
2
  import { resolveSubPackageName } from "./platformRuntime.mjs";
3
+ import { getPageContainer, recordActiveEntryScrollPosition } from "./routeRuntime/scroll.mjs";
4
4
 
5
5
  //#region src/runtime/polyfill/runtimeOps.ts
6
6
  function resolveScrollTop(value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/web",
3
3
  "type": "module",
4
- "version": "1.5.2",
4
+ "version": "1.5.4",
5
5
  "description": "Experimental web runtime for weapp-vite templates",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -62,22 +62,22 @@
62
62
  }
63
63
  },
64
64
  "dependencies": {
65
- "@babel/parser": "^8.0.5",
66
- "@babel/traverse": "^8.0.5",
67
- "@babel/types": "^8.0.5",
68
- "@weapp-core/constants": "0.2.3",
69
- "@weapp-core/shared": "3.2.2",
65
+ "@babel/parser": "^8.0.6",
66
+ "@babel/traverse": "^8.0.6",
67
+ "@babel/types": "^8.0.6",
68
+ "@weapp-core/constants": "0.2.5",
69
+ "@weapp-core/shared": "3.2.4",
70
70
  "domhandler": "^6.0.1",
71
71
  "esbuild": "^0.28.2",
72
72
  "htmlparser2": "^12.0.0",
73
73
  "lit": "^3.3.3",
74
- "magic-string": "^1.3.1",
74
+ "magic-string": "^1.4.1",
75
75
  "pathe": "^2.0.3",
76
76
  "postcss": "^8.5.28",
77
77
  "postcss-selector-parser": "^7.1.6",
78
- "rolldown": "1.2.8",
79
- "rolldown-require": "2.0.29",
80
- "wevu": "7.1.2"
78
+ "rolldown": "1.2.9",
79
+ "rolldown-require": "2.0.31",
80
+ "wevu": "7.1.4"
81
81
  },
82
82
  "devDependencies": {
83
83
  "happy-dom": "^20.14.5"