diff --git a/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts b/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts index fdd62391f0ed1743ffbb61c872c49529e2a0b264..11f270623987319ad8d8eeabd7dad0af2de3b37c 100644 --- a/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts +++ b/packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts @@ -1,3 +1,4 @@ export function login(name: string, pwd: string) { + console.log('login') return { name, pwd } } diff --git a/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index b/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index index e0eaad93c21de5731730733a8cb0220a358962f1..65bd60597d9e3b3e367288d5e2f3c93aa1b9dfc6 100644 --- a/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index +++ b/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index @@ -1,5 +1,6 @@ import android.util.Log; fun login(name: String, pwd: String): UtsJSONObject { + console.log("login"); return object : UtsJSONObject() { var name = name var pwd = pwd diff --git a/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt b/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt index 81f9e3f92ffca42eb18414bb35ecdc66d896b636..d148ba96efef6df8c61050afd7e28584a0d5e248 100644 --- a/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt +++ b/packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt @@ -3,6 +3,7 @@ import kotlinx.coroutines.*; import io.dcloud.uts.runtime.*; import android.util.Log; fun login(name: String, pwd: String): UtsJSONObject { + console.log("login", "at app-android/login.uts:2"); return object : UtsJSONObject() { var name = name var pwd = pwd diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 17dcb3fa37b9cf905c33bec6774a70b6e57b6102..09a2d28efd3cdb6ddaa105bca7c7855876af5707 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -10274,6 +10274,7 @@ function updateDocumentTitle(title) { ssrContext[uniShared.UNI_SSR_TITLE] = title; } } + UniServiceJSBridge.emit(uniShared.ON_NAVIGATION_BAR_CHANGE, { titleText: title }); } function useDocumentTitle(pageMeta) { function update() { @@ -10730,6 +10731,7 @@ function useState() { marginWidth: 0, leftWindowWidth: 0, rightWindowWidth: 0, + navigationBarTitleText: "", topWindowStyle: {}, leftWindowStyle: {}, rightWindowStyle: {} @@ -10756,6 +10758,9 @@ function useState() { vue.watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({ "--window-right": value + "px" })); + UniServiceJSBridge.on(uniShared.ON_NAVIGATION_BAR_CHANGE, (navigationBar) => { + layoutState.navigationBarTitleText = navigationBar.titleText; + }); const windowState = vue.computed(() => ({ matchTopWindow: layoutState.topWindowMediaQuery, showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow, @@ -10882,8 +10887,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) { "class": "uni-top-window", "style": layoutState.topWindowStyle }, [vue.createVNode(TopWindow, vue.mergeProps({ - "ref": windowRef - }, windowState), null, 16)], 4), vue.createVNode("div", { + "ref": windowRef, + "navigation-bar-title-text": layoutState.navigationBarTitleText + }, windowState), null, 16, ["navigation-bar-title-text"])], 4), vue.createVNode("div", { "class": "uni-top-window--placeholder", "style": { height: layoutState.topWindowHeight + "px" diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index 05a7f629c1499ebafbf462942ace6e506a6ce8ea..16f2fb09a13fffe9422b18315d4f6769645d55bf 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -1,6 +1,6 @@ import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, h, createTextVNode, onBeforeActivate, onBeforeDeactivate, createBlock, renderList, onDeactivated, createApp, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue"; import { isString, extend, isArray, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared"; -import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle, sortObject, ON_BACK_PRESS, parseUrl, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared"; +import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle, sortObject, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared"; export { onCreateVueApp } from "@dcloudio/uni-shared"; import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n"; import { useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView } from "vue-router"; @@ -14004,10 +14004,13 @@ function updateCurPageCssVar(pageMeta) { tabBar2.shown && (windowBottomValue = parseInt(tabBar2.height)); } updatePageCssVar({ - "--window-top": normalizeWindowBottom(windowTopValue), + "--window-top": normalizeWindowTop(windowTopValue), "--window-bottom": normalizeWindowBottom(windowBottomValue) }); } +function normalizeWindowTop(windowTop) { + return envMethod ? `calc(${windowTop}px + ${envMethod}(safe-area-inset-top))` : `${windowTop}px`; +} function normalizeWindowBottom(windowBottom) { return envMethod ? `calc(${windowBottom}px + ${envMethod}(safe-area-inset-bottom))` : `${windowBottom}px`; } @@ -19607,6 +19610,7 @@ function updateDocumentTitle(title) { { document.title = title; } + UniServiceJSBridge.emit(ON_NAVIGATION_BAR_CHANGE, { titleText: title }); } function useDocumentTitle(pageMeta) { function update() { @@ -20182,6 +20186,7 @@ function useState() { marginWidth: 0, leftWindowWidth: 0, rightWindowWidth: 0, + navigationBarTitleText: "", topWindowStyle: {}, leftWindowStyle: {}, rightWindowStyle: {} @@ -20212,6 +20217,9 @@ function useState() { watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({ "--window-right": value + "px" })); + UniServiceJSBridge.on(ON_NAVIGATION_BAR_CHANGE, (navigationBar) => { + layoutState.navigationBarTitleText = navigationBar.titleText; + }); const windowState = computed(() => ({ matchTopWindow: layoutState.topWindowMediaQuery, showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow, @@ -20344,8 +20352,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) { "class": "uni-top-window", "style": layoutState.topWindowStyle }, [createVNode(TopWindow, mergeProps({ - "ref": windowRef - }, windowState), null, 16)], 4), createVNode("div", { + "ref": windowRef, + "navigation-bar-title-text": layoutState.navigationBarTitleText + }, windowState), null, 16, ["navigation-bar-title-text"])], 4), createVNode("div", { "class": "uni-top-window--placeholder", "style": { height: layoutState.topWindowHeight + "px" diff --git a/packages/uni-mp-weixin/dist/uni.compiler.js b/packages/uni-mp-weixin/dist/uni.compiler.js index 818ac22a66d8a35fe1a9bd0b16986cd104d79658..25c855f7ab9ee407385504c5c85d01a662b663be 100644 --- a/packages/uni-mp-weixin/dist/uni.compiler.js +++ b/packages/uni-mp-weixin/dist/uni.compiler.js @@ -72,7 +72,8 @@ var setting = { es6: true, postcss: false, minified: false, - newFeature: true + newFeature: true, + bigPackageSizeSupport: true }; var compileType = "miniprogram"; var libVersion = ""; diff --git a/packages/uni-uts-vite/src/utils/compiler.ts b/packages/uni-uts-vite/src/utils/compiler.ts index b93d111ab37080f208fa86eca5b9fa76d4f00396..358bf0822000b13e80061a7620266affca07dc2d 100644 --- a/packages/uni-uts-vite/src/utils/compiler.ts +++ b/packages/uni-uts-vite/src/utils/compiler.ts @@ -35,6 +35,7 @@ export async function compile(filename: string) { sourceMap: true, extname: 'kt', imports: ['kotlinx.coroutines.*', 'io.dcloud.uts.runtime.*'], + logFilename: true, }, }) console.log('uts compile time: ' + (Date.now() - time) + 'ms') diff --git a/packages/uts-darwin-arm64/uts.darwin-arm64.node b/packages/uts-darwin-arm64/uts.darwin-arm64.node index ab2b9d1e3ed94bd6b76c7d37c8eee6f8da32be80..68f7f46d3f18f21123e17b59c7ab93772ce24fdb 100755 Binary files a/packages/uts-darwin-arm64/uts.darwin-arm64.node and b/packages/uts-darwin-arm64/uts.darwin-arm64.node differ diff --git a/packages/uts-darwin-x64/uts.darwin-x64.node b/packages/uts-darwin-x64/uts.darwin-x64.node index 77dc0a6e438c73e535c8faeea6aa001d984c873a..91217e824b88c98f8e022f7bfa205144ab499739 100755 Binary files a/packages/uts-darwin-x64/uts.darwin-x64.node and b/packages/uts-darwin-x64/uts.darwin-x64.node differ diff --git a/packages/uts/src/api.ts b/packages/uts/src/api.ts index 99d4f02cc7cfe9a88290e35fbb79ea4cfad63dfb..da82bd3d84760abd57db08c289d4dd6d741a1c7d 100644 --- a/packages/uts/src/api.ts +++ b/packages/uts/src/api.ts @@ -40,6 +40,7 @@ function resolveOptions(options: UtsOptions) { input.filename = normalizePath(input.filename) output.outDir = normalizePath(output.outDir) output.sourceMap = normalizePath(output.sourceMap) + output.logFilename = !!output.logFilename return options } diff --git a/packages/uts/src/types.ts b/packages/uts/src/types.ts index b0e744c0a7ab978cd70b44e1fa697e98008d3b8f..dde83e151c9443a8aecb18b79f3b66e6fad34511 100644 --- a/packages/uts/src/types.ts +++ b/packages/uts/src/types.ts @@ -26,6 +26,7 @@ export type UtsOutputOptions = { sourceMap?: boolean | string inlineSourcesContent?: boolean extname: string + logFilename?: boolean } export interface UtsOptions { input: UtsInputOptions diff --git a/scripts/test.js b/scripts/test.js index 7e249decdca78eb718456b561fd471f282f182a6..348be6b14ec4eee6b14936a93a82914bf4889b4e 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -34,6 +34,7 @@ bundle({ imports: ['kotlinx.coroutines.*', 'io.dcloud.uts.runtime.*'], sourceMap: true, extname: 'kt', + logFilename: true, }, }).then((res) => { console.log('bundle: ' + (Date.now() - start) + 'ms')