@akylas/nativescript 9.0.25 → 9.1.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/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/accessibility-types.js.map +1 -1
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.android.js.map +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.d.ts +199 -3
- package/application/application-common.js +425 -55
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +67 -1
- package/application/application-interfaces.js.map +1 -1
- package/application/application-shims.js.map +1 -1
- package/application/application.android.d.ts +39 -0
- package/application/application.android.js +242 -17
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +161 -54
- package/application/application.ios.d.ts +189 -28
- package/application/application.ios.js +885 -379
- package/application/application.ios.js.map +1 -1
- package/application/helpers-common.d.ts +5 -0
- package/application/helpers-common.js +23 -1
- package/application/helpers-common.js.map +1 -1
- package/application/helpers.android.js.map +1 -1
- package/application/helpers.ios.js.map +1 -1
- package/application/index.android.js.map +1 -1
- package/application/index.ios.js.map +1 -1
- package/application/scene-delegate-bridge.d.ts +60 -0
- package/application/scene-delegate-bridge.js +138 -0
- package/application/scene-delegate-bridge.js.map +1 -0
- package/application-settings/application-settings-common.js.map +1 -1
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/cli-hooks/before-checkForChanges.mjs +0 -11
- package/color/color-common.js +16 -5
- package/color/color-common.js.map +1 -1
- package/color/color-types.js.map +1 -1
- package/color/color-utils.d.ts +4 -1
- package/color/color-utils.js +14 -9
- package/color/color-utils.js.map +1 -1
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js.map +1 -1
- package/config/config.interface.d.ts +44 -2
- package/config/config.interface.js.map +1 -1
- package/config/index.js.map +1 -1
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js.map +1 -1
- package/core-types/animation-types.js.map +1 -1
- package/core-types/index.d.ts +25 -2
- package/core-types/index.js +23 -0
- package/core-types/index.js.map +1 -1
- package/core-types/validators.js.map +1 -1
- package/css/CSS3Parser.js +3 -2
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js +5 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/lib/parse/index.js +5 -1
- package/css/lib/parse/index.js.map +1 -1
- package/css/parser.js +20 -3
- package/css/parser.js.map +1 -1
- package/css/reworkcss.js.map +1 -1
- package/css/system-classes.d.ts +9 -0
- package/css/system-classes.js +23 -0
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +4 -4
- package/css-mediaquery/index.js.map +1 -1
- package/css-value/reworkcss-value.js.map +1 -1
- package/data/observable/index.d.ts +23 -0
- package/data/observable/index.js +50 -9
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements-interfaces.js.map +1 -1
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-types.js +31 -1
- package/debugger/dom-types.js.map +1 -1
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +21 -13
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +3 -3
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js.map +1 -1
- package/global-types.d.ts +39 -33
- package/globals/global-utils.d.ts +6 -1
- package/globals/global-utils.js +10 -5
- package/globals/global-utils.js.map +1 -1
- package/globals/index.js +18 -5
- package/globals/index.js.map +1 -1
- package/globals/polyfills/polyfill-xhr.js.map +1 -1
- package/globals/polyfills/utils.js +2 -0
- package/globals/polyfills/utils.js.map +1 -1
- package/http/http-interfaces.js.map +1 -1
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-request-internal/http-request-internal-common.d.ts +5 -1
- package/http/http-request-internal/http-request-internal-common.js +10 -0
- package/http/http-request-internal/http-request-internal-common.js.map +1 -1
- package/http/http-request-internal/index.android.d.ts +7 -1
- package/http/http-request-internal/index.android.js +2 -2
- package/http/http-request-internal/index.android.js.map +1 -1
- package/http/http-request-internal/index.ios.d.ts +7 -1
- package/http/http-request-internal/index.ios.js +2 -2
- package/http/http-request-internal/index.ios.js.map +1 -1
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/inspector_modules.js +1 -1
- package/inspector_modules.js.map +1 -1
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/helpers.js.map +1 -1
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/native-window/index.d.ts +426 -0
- package/native-window/index.js +4 -0
- package/native-window/index.js.map +1 -0
- package/native-window/native-window-common.d.ts +153 -0
- package/native-window/native-window-common.js +340 -0
- package/native-window/native-window-common.js.map +1 -0
- package/native-window/native-window-interfaces.d.ts +186 -0
- package/native-window/native-window-interfaces.js +90 -0
- package/native-window/native-window-interfaces.js.map +1 -0
- package/native-window/native-window.android.d.ts +59 -0
- package/native-window/native-window.android.js +175 -0
- package/native-window/native-window.android.js.map +1 -0
- package/native-window/native-window.ios.d.ts +61 -0
- package/native-window/native-window.ios.js +220 -0
- package/native-window/native-window.ios.js.map +1 -0
- package/native-window/window-base.d.ts +111 -0
- package/native-window/window-base.js +91 -0
- package/native-window/window-base.js.map +1 -0
- package/package.json +3 -2
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js.map +1 -1
- package/platform/index.js.map +1 -1
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.d.ts +1 -0
- package/platform/screen/index.ios.js +6 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +5 -6
- package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +0 -6
- package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +56 -0
- package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +20 -4
- package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +26 -9
- package/platforms/android/java/org/nativescript/widgets/FlexLine.java +3 -3
- package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +194 -731
- package/platforms/android/java/org/nativescript/widgets/ImageView.java +2 -2
- package/platforms/android/java/org/nativescript/widgets/Utils.java +37 -9
- package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +78 -0
- package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +1 -4
- package/platforms/android/java/org/nativescript/widgets/image/Worker.java +99 -76
- package/platforms/android/native-api-usage.json +11 -0
- package/platforms/ios/src/NativeScriptMainWindow.swift +72 -39
- package/profiling/index.js.map +1 -1
- package/references.d.ts +5 -2
- package/text/formatted-string.js.map +1 -1
- package/text/index.android.js.map +1 -1
- package/text/index.ios.js.map +1 -1
- package/text/span.js.map +1 -1
- package/text/text-common.js +1 -1
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js.map +1 -1
- package/trace/index.d.ts +2 -2
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +2 -7
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.d.ts +13 -1
- package/ui/action-bar/index.ios.js +26 -0
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/animation-shared.js.map +1 -1
- package/ui/animation/animation-types.js.map +1 -1
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +3 -1
- package/ui/animation/keyframe-animation.js +72 -3
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +9 -1
- package/ui/builder/index.js.map +1 -1
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js.map +1 -1
- package/ui/core/bindable/bindable-types.js.map +1 -1
- package/ui/core/bindable/index.js +2 -1
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +37 -2
- package/ui/core/properties/index.js +205 -29
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.js +11 -2
- package/ui/core/properties/property-shared.js.map +1 -1
- package/ui/core/view/index.android.d.ts +5 -0
- package/ui/core/view/index.android.js +78 -6
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +58 -1
- package/ui/core/view/index.ios.d.ts +1 -0
- package/ui/core/view/index.ios.js +48 -11
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +37 -0
- package/ui/core/view/view-common.js +81 -0
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.d.ts +1 -0
- package/ui/core/view/view-helper/index.android.js +8 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +46 -0
- package/ui/core/view/view-helper/index.ios.d.ts +42 -0
- package/ui/core/view/view-helper/index.ios.js +170 -5
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +21 -3
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-shared.js.map +1 -1
- package/ui/core/view/view-interfaces.js.map +1 -1
- package/ui/core/view-base/index.js +75 -36
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/view-base/utils.js.map +1 -1
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +5 -5
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +2 -1
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/embedding/index.ios.js.map +1 -1
- package/ui/enums/enums.js.map +1 -1
- package/ui/enums/index.js.map +1 -1
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +4 -4
- package/ui/frame/fragment.transitions.android.js +95 -78
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.types.js.map +1 -1
- package/ui/frame/frame-common.d.ts +14 -2
- package/ui/frame/frame-common.js +51 -24
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-constants.d.ts +9 -0
- package/ui/frame/frame-constants.js +10 -0
- package/ui/frame/frame-constants.js.map +1 -0
- package/ui/frame/frame-helper-for-android.d.ts +2 -2
- package/ui/frame/frame-helper-for-android.js +14 -5
- package/ui/frame/frame-helper-for-android.js.map +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-interfaces.d.ts +1 -1
- package/ui/frame/frame-interfaces.js.map +1 -1
- package/ui/frame/frame-stack.d.ts +22 -1
- package/ui/frame/frame-stack.js +43 -5
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +1 -2
- package/ui/frame/index.android.js +152 -53
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +15 -5
- package/ui/frame/index.ios.d.ts +1 -1
- package/ui/frame/index.ios.js +86 -26
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/gestures-types.d.ts +2 -0
- package/ui/gestures/gestures-types.js.map +1 -1
- package/ui/gestures/index.android.d.ts +1 -1
- package/ui/gestures/index.android.js +159 -124
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js +30 -1
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -2
- package/ui/gestures/touch-manager.js +79 -50
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +1 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +13 -1
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +1 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +3 -0
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +3 -0
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +7 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +18 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +5 -0
- package/ui/layouts/flexbox-layout/index.android.js +15 -0
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.d.ts +19 -1
- package/ui/layouts/flexbox-layout/index.ios.d.ts +2 -0
- package/ui/layouts/flexbox-layout/index.ios.js +246 -195
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +3 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/layout-base-common.d.ts +1 -0
- package/ui/layouts/layout-base-common.js +23 -1
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/index.android.js.map +1 -1
- package/ui/layouts/liquid-glass/index.ios.d.ts +0 -1
- package/ui/layouts/liquid-glass/index.ios.js +2 -43
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -1
- package/ui/layouts/liquid-glass-container/index.android.js.map +1 -1
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -1
- package/ui/layouts/liquid-glass-container/index.ios.js +2 -43
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -1
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-stack.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +3 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +3 -0
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +2 -2
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +47 -3
- package/ui/list-view/index.ios.d.ts +13 -3
- package/ui/list-view/index.ios.js +132 -41
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +19 -0
- package/ui/list-view/list-view-common.js +30 -0
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/events.js.map +1 -1
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -1
- package/ui/page/index.ios.d.ts +3 -1
- package/ui/page/index.ios.js +26 -17
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +5 -1
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.js.map +1 -1
- package/ui/placeholder/placeholder-common.js.map +1 -1
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +2 -1
- package/ui/scroll-view/index.android.js +4 -1
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +53 -0
- package/ui/scroll-view/index.ios.d.ts +13 -1
- package/ui/scroll-view/index.ios.js +100 -20
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +13 -0
- package/ui/scroll-view/scroll-view-common.js +27 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
- package/ui/segmented-bar/segmented-bar-common.js +6 -1
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/split-view/index.android.js.map +1 -1
- package/ui/split-view/index.ios.js.map +1 -1
- package/ui/split-view/split-view-common.js.map +1 -1
- package/ui/styling/background-common.d.ts +2 -0
- package/ui/styling/background-common.js +8 -0
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.d.ts +4 -1
- package/ui/styling/background.android.js +5 -2
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +1 -1
- package/ui/styling/background.ios.js +9 -2
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/clip-path-function.js.map +1 -1
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.d.ts +60 -13
- package/ui/styling/css-selector.js +311 -50
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-transform.js.map +1 -1
- package/ui/styling/css-utils.d.ts +16 -0
- package/ui/styling/css-utils.js +121 -7
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font-interfaces.js.map +1 -1
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/length-shared.d.ts +2 -0
- package/ui/styling/length-shared.js +29 -2
- package/ui/styling/length-shared.js.map +1 -1
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.d.ts +16 -0
- package/ui/styling/style/index.js +1 -0
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +5 -0
- package/ui/styling/style-properties.js +172 -101
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +24 -3
- package/ui/styling/style-scope.js +455 -63
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/styling/styling-profile.js.map +1 -1
- package/ui/styling/styling-shared.js.map +1 -1
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +5 -1
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +4 -1
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +5 -3
- package/ui/tab-view/index.ios.d.ts +2 -1
- package/ui/tab-view/index.ios.js +81 -18
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +6 -1
- package/ui/tab-view/tab-view-common.js +17 -1
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +5 -8
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.ios.d.ts +3 -0
- package/ui/text-base/index.ios.js +25 -3
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js +13 -5
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +2 -1
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +33 -5
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +4 -0
- package/ui/transition/page-transition.android.js +174 -45
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.d.ts +5 -0
- package/ui/transition/page-transition.ios.js +298 -36
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.d.ts +3 -0
- package/ui/transition/shared-transition-helper.android.js +9 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.d.ts +7 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +48 -0
- package/ui/transition/shared-transition-helper.ios.js +977 -95
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.d.ts +134 -0
- package/ui/transition/shared-transition.js +90 -2
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.android.js.map +1 -1
- package/ui/utils.d.ts +2 -0
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js.map +1 -1
- package/ui/web-view/web-view-interfaces.js.map +1 -1
- package/utils/animation-helpers.js.map +1 -1
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug-source.js.map +1 -1
- package/utils/debug.js.map +1 -1
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.js.map +1 -1
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +11 -3
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/layout-helper/layout-helper-shared.js.map +1 -1
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper-for-android.js +6 -2
- package/utils/native-helper-for-android.js.map +1 -1
- package/utils/native-helper.android.d.ts +66 -2
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +2 -2
- package/utils/native-helper.ios.d.ts +52 -2
- package/utils/native-helper.ios.js +35 -5
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/native-helper.types.d.ts +2 -0
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.d.ts +1 -1
- package/utils/platform-check.js.map +1 -1
- package/utils/shared.js.map +1 -1
- package/utils/types.js.map +1 -1
- package/utils/utils-shared.js.map +1 -1
- package/wgc/atob.js.map +1 -1
- package/wgc/btoa.js.map +1 -1
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +12 -8
- package/wgc/crypto/index.js.map +1 -1
- package/wgc/index.js.map +1 -1
- package/xhr/index.js.map +1 -1
- package/xml/index.js.map +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events emitted by a NativeWindow instance.
|
|
3
|
+
*/
|
|
4
|
+
export const NativeWindowEvents = {
|
|
5
|
+
/** Fired when the window becomes the active/focused window. */
|
|
6
|
+
activate: 'activate',
|
|
7
|
+
/** Fired when the window loses focus. */
|
|
8
|
+
deactivate: 'deactivate',
|
|
9
|
+
/** Fired when the window enters the background. */
|
|
10
|
+
background: 'background',
|
|
11
|
+
/** Fired when the window enters the foreground. */
|
|
12
|
+
foreground: 'foreground',
|
|
13
|
+
/**
|
|
14
|
+
* Fired when the window session ends for good. Fires at most once per window;
|
|
15
|
+
* every listener on the window is dropped right after it is dispatched.
|
|
16
|
+
*/
|
|
17
|
+
close: 'close',
|
|
18
|
+
/** Fired when a native surface is bound to the window, both on first connect and on every re-attach. */
|
|
19
|
+
attached: 'attached',
|
|
20
|
+
/**
|
|
21
|
+
* Fired when the native surface goes away while the window session stays alive
|
|
22
|
+
* (iOS scene disconnect, Android activity recreation). The window stays registered
|
|
23
|
+
* and keeps its listeners, so the same instance is reused when `attached` fires again.
|
|
24
|
+
*/
|
|
25
|
+
detached: 'detached',
|
|
26
|
+
/** Fired after the window content has been displayed for the first time. */
|
|
27
|
+
displayed: 'displayed',
|
|
28
|
+
/** Fired when the root view content is set or changed. */
|
|
29
|
+
contentLoaded: 'contentLoaded',
|
|
30
|
+
/** Fired when the orientation of this window changes. */
|
|
31
|
+
orientationChanged: 'orientationChanged',
|
|
32
|
+
/** Fired when the system appearance of this window changes between light and dark. */
|
|
33
|
+
systemAppearanceChanged: 'systemAppearanceChanged',
|
|
34
|
+
/** Fired when the layout direction of this window changes between ltr and rtl. */
|
|
35
|
+
layoutDirectionChanged: 'layoutDirectionChanged',
|
|
36
|
+
// iOS scene lifecycle events
|
|
37
|
+
/** Fired when the scene is about to connect (iOS only). */
|
|
38
|
+
sceneWillConnect: 'sceneWillConnect',
|
|
39
|
+
/** Fired when the scene becomes active (iOS only). */
|
|
40
|
+
sceneDidActivate: 'sceneDidActivate',
|
|
41
|
+
/** Fired when the scene is about to resign active state (iOS only). */
|
|
42
|
+
sceneWillResignActive: 'sceneWillResignActive',
|
|
43
|
+
/** Fired when the scene is about to enter the foreground (iOS only). */
|
|
44
|
+
sceneWillEnterForeground: 'sceneWillEnterForeground',
|
|
45
|
+
/** Fired when the scene has entered the background (iOS only). */
|
|
46
|
+
sceneDidEnterBackground: 'sceneDidEnterBackground',
|
|
47
|
+
/** Fired when the scene has disconnected (iOS only). */
|
|
48
|
+
sceneDidDisconnect: 'sceneDidDisconnect',
|
|
49
|
+
/** Fired when the scene is asked to open one or more URLs (iOS only). */
|
|
50
|
+
sceneOpenURLContexts: 'sceneOpenURLContexts',
|
|
51
|
+
/** Fired when the scene is asked to continue a handoff/universal link activity (iOS only). */
|
|
52
|
+
sceneContinueUserActivity: 'sceneContinueUserActivity',
|
|
53
|
+
/** Fired when a home screen quick action is directed at the scene (iOS only). */
|
|
54
|
+
scenePerformActionForShortcutItem: 'scenePerformActionForShortcutItem',
|
|
55
|
+
// Android activity lifecycle events
|
|
56
|
+
/** Fired when the activity is created (Android only). */
|
|
57
|
+
activityCreated: 'activityCreated',
|
|
58
|
+
/** Fired when the activity is destroyed (Android only). */
|
|
59
|
+
activityDestroyed: 'activityDestroyed',
|
|
60
|
+
/** Fired when the activity is started (Android only). */
|
|
61
|
+
activityStarted: 'activityStarted',
|
|
62
|
+
/** Fired when the activity is paused (Android only). */
|
|
63
|
+
activityPaused: 'activityPaused',
|
|
64
|
+
/** Fired when the activity is resumed (Android only). */
|
|
65
|
+
activityResumed: 'activityResumed',
|
|
66
|
+
/** Fired when the activity is stopped (Android only). */
|
|
67
|
+
activityStopped: 'activityStopped',
|
|
68
|
+
/** Fired when the activity state is being saved (Android only). */
|
|
69
|
+
saveActivityState: 'saveActivityState',
|
|
70
|
+
/** Fired when the activity receives a result (Android only). */
|
|
71
|
+
activityResult: 'activityResult',
|
|
72
|
+
/** Fired when the back button is pressed (Android only). */
|
|
73
|
+
activityBackPressed: 'activityBackPressed',
|
|
74
|
+
/** Fired when the activity receives a new intent (Android only). */
|
|
75
|
+
activityNewIntent: 'activityNewIntent',
|
|
76
|
+
/** Fired when permission results are received (Android only). */
|
|
77
|
+
activityRequestPermissions: 'activityRequestPermissions',
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Application-level events related to window management.
|
|
81
|
+
*/
|
|
82
|
+
export const WindowEvents = {
|
|
83
|
+
/** Fired on Application when a new NativeWindow is created. */
|
|
84
|
+
windowOpen: 'windowOpen',
|
|
85
|
+
/** Fired on Application when a NativeWindow is closed/destroyed. */
|
|
86
|
+
windowClose: 'windowClose',
|
|
87
|
+
/** Fired on Application when another window takes over the primary role. */
|
|
88
|
+
primaryWindowChanged: 'primaryWindowChanged',
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=native-window-interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-window-interfaces.js","sourceRoot":"","sources":["../../../../packages/core/native-window/native-window-interfaces.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,+DAA+D;IAC/D,QAAQ,EAAE,UAAU;IACpB,yCAAyC;IACzC,UAAU,EAAE,YAAY;IACxB,mDAAmD;IACnD,UAAU,EAAE,YAAY;IACxB,mDAAmD;IACnD,UAAU,EAAE,YAAY;IACxB;;;OAGG;IACH,KAAK,EAAE,OAAO;IACd,wGAAwG;IACxG,QAAQ,EAAE,UAAU;IACpB;;;;OAIG;IACH,QAAQ,EAAE,UAAU;IACpB,4EAA4E;IAC5E,SAAS,EAAE,WAAW;IACtB,0DAA0D;IAC1D,aAAa,EAAE,eAAe;IAC9B,yDAAyD;IACzD,kBAAkB,EAAE,oBAAoB;IACxC,sFAAsF;IACtF,uBAAuB,EAAE,yBAAyB;IAClD,kFAAkF;IAClF,sBAAsB,EAAE,wBAAwB;IAEhD,6BAA6B;IAC7B,2DAA2D;IAC3D,gBAAgB,EAAE,kBAAkB;IACpC,sDAAsD;IACtD,gBAAgB,EAAE,kBAAkB;IACpC,uEAAuE;IACvE,qBAAqB,EAAE,uBAAuB;IAC9C,wEAAwE;IACxE,wBAAwB,EAAE,0BAA0B;IACpD,kEAAkE;IAClE,uBAAuB,EAAE,yBAAyB;IAClD,wDAAwD;IACxD,kBAAkB,EAAE,oBAAoB;IACxC,yEAAyE;IACzE,oBAAoB,EAAE,sBAAsB;IAC5C,8FAA8F;IAC9F,yBAAyB,EAAE,2BAA2B;IACtD,iFAAiF;IACjF,iCAAiC,EAAE,mCAAmC;IAEtE,oCAAoC;IACpC,yDAAyD;IACzD,eAAe,EAAE,iBAAiB;IAClC,2DAA2D;IAC3D,iBAAiB,EAAE,mBAAmB;IACtC,yDAAyD;IACzD,eAAe,EAAE,iBAAiB;IAClC,wDAAwD;IACxD,cAAc,EAAE,gBAAgB;IAChC,yDAAyD;IACzD,eAAe,EAAE,iBAAiB;IAClC,yDAAyD;IACzD,eAAe,EAAE,iBAAiB;IAClC,mEAAmE;IACnE,iBAAiB,EAAE,mBAAmB;IACtC,gEAAgE;IAChE,cAAc,EAAE,gBAAgB;IAChC,4DAA4D;IAC5D,mBAAmB,EAAE,qBAAqB;IAC1C,oEAAoE;IACpE,iBAAiB,EAAE,mBAAmB;IACtC,iEAAiE;IACjE,0BAA0B,EAAE,4BAA4B;CAC/C,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,+DAA+D;IAC/D,UAAU,EAAE,YAAY;IACxB,oEAAoE;IACpE,WAAW,EAAE,aAAa;IAC1B,4EAA4E;IAC5E,oBAAoB,EAAE,sBAAsB;CACnC,CAAC","sourcesContent":["import type { CoreTypes } from '../core-types';\nimport type { EventData } from '../data/observable';\nimport type { View } from '../ui/core/view';\nimport type { NavigationEntry } from '../ui/frame/frame-interfaces';\nimport type { NativeWindow, WindowBase } from '.';\n\n/**\n * Events emitted by a NativeWindow instance.\n */\nexport const NativeWindowEvents = {\n\t/** Fired when the window becomes the active/focused window. */\n\tactivate: 'activate',\n\t/** Fired when the window loses focus. */\n\tdeactivate: 'deactivate',\n\t/** Fired when the window enters the background. */\n\tbackground: 'background',\n\t/** Fired when the window enters the foreground. */\n\tforeground: 'foreground',\n\t/**\n\t * Fired when the window session ends for good. Fires at most once per window;\n\t * every listener on the window is dropped right after it is dispatched.\n\t */\n\tclose: 'close',\n\t/** Fired when a native surface is bound to the window, both on first connect and on every re-attach. */\n\tattached: 'attached',\n\t/**\n\t * Fired when the native surface goes away while the window session stays alive\n\t * (iOS scene disconnect, Android activity recreation). The window stays registered\n\t * and keeps its listeners, so the same instance is reused when `attached` fires again.\n\t */\n\tdetached: 'detached',\n\t/** Fired after the window content has been displayed for the first time. */\n\tdisplayed: 'displayed',\n\t/** Fired when the root view content is set or changed. */\n\tcontentLoaded: 'contentLoaded',\n\t/** Fired when the orientation of this window changes. */\n\torientationChanged: 'orientationChanged',\n\t/** Fired when the system appearance of this window changes between light and dark. */\n\tsystemAppearanceChanged: 'systemAppearanceChanged',\n\t/** Fired when the layout direction of this window changes between ltr and rtl. */\n\tlayoutDirectionChanged: 'layoutDirectionChanged',\n\n\t// iOS scene lifecycle events\n\t/** Fired when the scene is about to connect (iOS only). */\n\tsceneWillConnect: 'sceneWillConnect',\n\t/** Fired when the scene becomes active (iOS only). */\n\tsceneDidActivate: 'sceneDidActivate',\n\t/** Fired when the scene is about to resign active state (iOS only). */\n\tsceneWillResignActive: 'sceneWillResignActive',\n\t/** Fired when the scene is about to enter the foreground (iOS only). */\n\tsceneWillEnterForeground: 'sceneWillEnterForeground',\n\t/** Fired when the scene has entered the background (iOS only). */\n\tsceneDidEnterBackground: 'sceneDidEnterBackground',\n\t/** Fired when the scene has disconnected (iOS only). */\n\tsceneDidDisconnect: 'sceneDidDisconnect',\n\t/** Fired when the scene is asked to open one or more URLs (iOS only). */\n\tsceneOpenURLContexts: 'sceneOpenURLContexts',\n\t/** Fired when the scene is asked to continue a handoff/universal link activity (iOS only). */\n\tsceneContinueUserActivity: 'sceneContinueUserActivity',\n\t/** Fired when a home screen quick action is directed at the scene (iOS only). */\n\tscenePerformActionForShortcutItem: 'scenePerformActionForShortcutItem',\n\n\t// Android activity lifecycle events\n\t/** Fired when the activity is created (Android only). */\n\tactivityCreated: 'activityCreated',\n\t/** Fired when the activity is destroyed (Android only). */\n\tactivityDestroyed: 'activityDestroyed',\n\t/** Fired when the activity is started (Android only). */\n\tactivityStarted: 'activityStarted',\n\t/** Fired when the activity is paused (Android only). */\n\tactivityPaused: 'activityPaused',\n\t/** Fired when the activity is resumed (Android only). */\n\tactivityResumed: 'activityResumed',\n\t/** Fired when the activity is stopped (Android only). */\n\tactivityStopped: 'activityStopped',\n\t/** Fired when the activity state is being saved (Android only). */\n\tsaveActivityState: 'saveActivityState',\n\t/** Fired when the activity receives a result (Android only). */\n\tactivityResult: 'activityResult',\n\t/** Fired when the back button is pressed (Android only). */\n\tactivityBackPressed: 'activityBackPressed',\n\t/** Fired when the activity receives a new intent (Android only). */\n\tactivityNewIntent: 'activityNewIntent',\n\t/** Fired when permission results are received (Android only). */\n\tactivityRequestPermissions: 'activityRequestPermissions',\n} as const;\n\nexport type NativeWindowEventName = (typeof NativeWindowEvents)[keyof typeof NativeWindowEvents];\n\n/**\n * Application-level events related to window management.\n */\nexport const WindowEvents = {\n\t/** Fired on Application when a new NativeWindow is created. */\n\twindowOpen: 'windowOpen',\n\t/** Fired on Application when a NativeWindow is closed/destroyed. */\n\twindowClose: 'windowClose',\n\t/** Fired on Application when another window takes over the primary role. */\n\tprimaryWindowChanged: 'primaryWindowChanged',\n} as const;\n\n/**\n * Base event data for window surface events.\n */\nexport interface WindowBaseEventData extends EventData {\n\t/** The window that emitted the event. */\n\twindow: WindowBase;\n}\n\n/**\n * Base event data for NativeWindow events.\n */\nexport interface NativeWindowEventData extends WindowBaseEventData {\n\t/** The NativeWindow that emitted the event. */\n\twindow: NativeWindow;\n}\n\n/**\n * Event data for the `orientationChanged` event of a NativeWindow.\n */\nexport interface WindowOrientationChangedEventData extends NativeWindowEventData {\n\t/** The orientation the window is now in. */\n\tnewValue: 'portrait' | 'landscape' | 'unknown';\n}\n\n/**\n * Event data for the `systemAppearanceChanged` event of a NativeWindow.\n */\nexport interface WindowSystemAppearanceChangedEventData extends NativeWindowEventData {\n\t/** The system appearance the window is now showing. */\n\tnewValue: 'light' | 'dark';\n}\n\n/**\n * Event data for the `layoutDirectionChanged` event of a NativeWindow.\n */\nexport interface WindowLayoutDirectionChangedEventData extends NativeWindowEventData {\n\t/** The layout direction the window is now using. */\n\tnewValue: CoreTypes.LayoutDirectionType;\n}\n\n/**\n * Event data fired on Application when a window opens.\n */\nexport interface WindowOpenEventData extends EventData {\n\t/** The NativeWindow that was opened. */\n\twindow: NativeWindow;\n}\n\n/**\n * Event data fired on Application when a window closes.\n */\nexport interface WindowCloseEventData extends EventData {\n\t/** The NativeWindow that was closed. */\n\twindow: NativeWindow;\n}\n\n/**\n * Event data fired on Application when the primary window changes.\n */\nexport interface PrimaryWindowChangedEventData extends EventData {\n\t/** The NativeWindow that is now primary. */\n\twindow: NativeWindow;\n}\n\n/**\n * Options for opening a new window.\n */\nexport interface WindowOpenOptions {\n\t/**\n\t * Data to pass to the new window.\n\t * On iOS: serialized into NSUserActivity.userInfo.\n\t * On Android: added as intent extras.\n\t */\n\tdata?: Record<string, any>;\n}\n\n/**\n * Supplies the UI for a window that needs content. Called once per window that needs it.\n *\n * Return a `View`, a `NavigationEntry` or a module name to set the window content,\n * `null` to take ownership and set the content asynchronously later, or `undefined`\n * to fall back to the application main entry.\n */\nexport type WindowContentResolver = (request: WindowContentRequest) => View | NavigationEntry | string | null | undefined;\n\n/**\n * Describes the window asking for content.\n */\nexport interface WindowContentRequest {\n\t/** The window that needs content. */\n\twindow: NativeWindow;\n\t/** Whether the window is the application's primary window. */\n\tisPrimary: boolean;\n\t/** NSUserActivity.userInfo on iOS, intent extras on Android. */\n\tdata?: Record<string, any>;\n\tios?: {\n\t\tconnectionOptions?: UISceneConnectionOptions;\n\t};\n\tandroid?: {\n\t\tintent?: android.content.Intent;\n\t\tsavedInstanceState?: android.os.Bundle;\n\t};\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { View } from '../ui/core/view';
|
|
2
|
+
import { CoreTypes } from '../core-types';
|
|
3
|
+
import { NativeWindow } from './native-window-common';
|
|
4
|
+
import type { WindowRole } from './window-base';
|
|
5
|
+
/**
|
|
6
|
+
* Android implementation of NativeWindow.
|
|
7
|
+
* Wraps an AppCompatActivity.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AndroidNativeWindow extends NativeWindow {
|
|
10
|
+
private _activity;
|
|
11
|
+
private _componentCallbacks;
|
|
12
|
+
private _componentCallbacksActivity;
|
|
13
|
+
constructor(activity: androidx.appcompat.app.AppCompatActivity, id?: string, isPrimary?: boolean, role?: WindowRole);
|
|
14
|
+
/**
|
|
15
|
+
* @internal – bind a recreated activity to this window session after a detach.
|
|
16
|
+
*/
|
|
17
|
+
_reattach(activity: androidx.appcompat.app.AppCompatActivity): void;
|
|
18
|
+
/**
|
|
19
|
+
* @internal – observe the activity's own configuration.
|
|
20
|
+
*
|
|
21
|
+
* Registered on the activity rather than the application context: in multi-window
|
|
22
|
+
* and multi-display setups each activity gets its own configuration, and only these
|
|
23
|
+
* callbacks report the one this window actually renders with.
|
|
24
|
+
*/
|
|
25
|
+
_registerConfigurationCallbacks(): void;
|
|
26
|
+
/**
|
|
27
|
+
* @internal – drop the configuration callbacks, so a recreated activity does not
|
|
28
|
+
* leave the previous one registered.
|
|
29
|
+
*/
|
|
30
|
+
_unregisterConfigurationCallbacks(): void;
|
|
31
|
+
_detach(): void;
|
|
32
|
+
/**
|
|
33
|
+
* The wrapped Android Activity (may be GC'd).
|
|
34
|
+
*/
|
|
35
|
+
get activity(): androidx.appcompat.app.AppCompatActivity | undefined;
|
|
36
|
+
get android(): {
|
|
37
|
+
activity: androidx.appcompat.app.AppCompatActivity;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Platform-specific: apply the view as root content of this Activity.
|
|
41
|
+
*/
|
|
42
|
+
protected _setNativeContent(view: View): void;
|
|
43
|
+
/**
|
|
44
|
+
* Close this window by finishing the activity.
|
|
45
|
+
*/
|
|
46
|
+
close(): void;
|
|
47
|
+
protected _getOrientation(): 'portrait' | 'landscape' | 'unknown';
|
|
48
|
+
protected _getSystemAppearance(): 'light' | 'dark' | null;
|
|
49
|
+
protected _getLayoutDirection(): CoreTypes.LayoutDirectionType | null;
|
|
50
|
+
_getOrientationValue(configuration: android.content.res.Configuration): 'portrait' | 'landscape' | 'unknown';
|
|
51
|
+
_getSystemAppearanceValue(configuration: android.content.res.Configuration): 'dark' | 'light';
|
|
52
|
+
_getLayoutDirectionValue(configuration: android.content.res.Configuration): CoreTypes.LayoutDirectionType;
|
|
53
|
+
protected _onDestroy(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Mints a window identity. Android has no stable activity id, so the value is kept
|
|
56
|
+
* in the activity saved state to survive recreation (rotation, theme change).
|
|
57
|
+
*/
|
|
58
|
+
static newWindowId(): string;
|
|
59
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CoreTypes } from '../core-types';
|
|
2
|
+
import { CALLBACKS } from '../ui/frame/frame-constants';
|
|
3
|
+
import { NativeWindow } from './native-window-common';
|
|
4
|
+
/**
|
|
5
|
+
* Android implementation of NativeWindow.
|
|
6
|
+
* Wraps an AppCompatActivity.
|
|
7
|
+
*/
|
|
8
|
+
export class AndroidNativeWindow extends NativeWindow {
|
|
9
|
+
constructor(activity, id, isPrimary = false, role = 'application') {
|
|
10
|
+
super(id, isPrimary, role);
|
|
11
|
+
this._activity = new WeakRef(activity);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal – bind a recreated activity to this window session after a detach.
|
|
15
|
+
*/
|
|
16
|
+
_reattach(activity) {
|
|
17
|
+
this._activity = new WeakRef(activity);
|
|
18
|
+
this._setState('attached');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @internal – observe the activity's own configuration.
|
|
22
|
+
*
|
|
23
|
+
* Registered on the activity rather than the application context: in multi-window
|
|
24
|
+
* and multi-display setups each activity gets its own configuration, and only these
|
|
25
|
+
* callbacks report the one this window actually renders with.
|
|
26
|
+
*/
|
|
27
|
+
_registerConfigurationCallbacks() {
|
|
28
|
+
const activity = this.activity;
|
|
29
|
+
if (!activity || this._componentCallbacks) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const callbacks = new android.content.ComponentCallbacks2({
|
|
33
|
+
onLowMemory() {
|
|
34
|
+
// Handled application-wide.
|
|
35
|
+
},
|
|
36
|
+
onTrimMemory(level) {
|
|
37
|
+
// Handled application-wide.
|
|
38
|
+
},
|
|
39
|
+
onConfigurationChanged: (newConfiguration) => {
|
|
40
|
+
this._setOrientation(this._getOrientationValue(newConfiguration));
|
|
41
|
+
this._setSystemAppearance(this._getSystemAppearanceValue(newConfiguration));
|
|
42
|
+
this._setLayoutDirection(this._getLayoutDirectionValue(newConfiguration));
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
activity.registerComponentCallbacks(callbacks);
|
|
46
|
+
this._componentCallbacks = callbacks;
|
|
47
|
+
this._componentCallbacksActivity = new WeakRef(activity);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @internal – drop the configuration callbacks, so a recreated activity does not
|
|
51
|
+
* leave the previous one registered.
|
|
52
|
+
*/
|
|
53
|
+
_unregisterConfigurationCallbacks() {
|
|
54
|
+
const callbacks = this._componentCallbacks;
|
|
55
|
+
if (!callbacks) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this._componentCallbacks = null;
|
|
59
|
+
this._componentCallbacksActivity?.deref()?.unregisterComponentCallbacks(callbacks);
|
|
60
|
+
this._componentCallbacksActivity = null;
|
|
61
|
+
}
|
|
62
|
+
_detach() {
|
|
63
|
+
this._unregisterConfigurationCallbacks();
|
|
64
|
+
super._detach();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The wrapped Android Activity (may be GC'd).
|
|
68
|
+
*/
|
|
69
|
+
get activity() {
|
|
70
|
+
return this._activity?.deref();
|
|
71
|
+
}
|
|
72
|
+
get android() {
|
|
73
|
+
const activity = this.activity;
|
|
74
|
+
if (!activity) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
return { activity };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Platform-specific: apply the view as root content of this Activity.
|
|
81
|
+
*/
|
|
82
|
+
_setNativeContent(view) {
|
|
83
|
+
const activity = this.activity;
|
|
84
|
+
if (!activity) {
|
|
85
|
+
throw new Error('NativeWindow: Activity is no longer available.');
|
|
86
|
+
}
|
|
87
|
+
const callbacks = activity[CALLBACKS];
|
|
88
|
+
if (!callbacks) {
|
|
89
|
+
throw new Error('NativeWindow: Cannot find activity callbacks.');
|
|
90
|
+
}
|
|
91
|
+
callbacks.resetActivityContent(activity, view);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Close this window by finishing the activity.
|
|
95
|
+
*/
|
|
96
|
+
close() {
|
|
97
|
+
if (this.isPrimary) {
|
|
98
|
+
console.log('NativeWindow: Cannot close the primary window.');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const activity = this.activity;
|
|
102
|
+
if (activity) {
|
|
103
|
+
activity.finish();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// --- Platform getters ---
|
|
107
|
+
_getOrientation() {
|
|
108
|
+
const activity = this.activity;
|
|
109
|
+
if (!activity) {
|
|
110
|
+
return 'unknown';
|
|
111
|
+
}
|
|
112
|
+
const configuration = activity.getResources().getConfiguration();
|
|
113
|
+
return this._getOrientationValue(configuration);
|
|
114
|
+
}
|
|
115
|
+
_getSystemAppearance() {
|
|
116
|
+
const activity = this.activity;
|
|
117
|
+
if (!activity) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
const configuration = activity.getResources().getConfiguration();
|
|
121
|
+
return this._getSystemAppearanceValue(configuration);
|
|
122
|
+
}
|
|
123
|
+
_getLayoutDirection() {
|
|
124
|
+
const activity = this.activity;
|
|
125
|
+
if (!activity) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const configuration = activity.getResources().getConfiguration();
|
|
129
|
+
return this._getLayoutDirectionValue(configuration);
|
|
130
|
+
}
|
|
131
|
+
// --- Value converters ---
|
|
132
|
+
_getOrientationValue(configuration) {
|
|
133
|
+
switch (configuration.orientation) {
|
|
134
|
+
case android.content.res.Configuration.ORIENTATION_LANDSCAPE:
|
|
135
|
+
return 'landscape';
|
|
136
|
+
case android.content.res.Configuration.ORIENTATION_PORTRAIT:
|
|
137
|
+
return 'portrait';
|
|
138
|
+
default:
|
|
139
|
+
return 'unknown';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
_getSystemAppearanceValue(configuration) {
|
|
143
|
+
const mode = configuration.uiMode & android.content.res.Configuration.UI_MODE_NIGHT_MASK;
|
|
144
|
+
switch (mode) {
|
|
145
|
+
case android.content.res.Configuration.UI_MODE_NIGHT_YES:
|
|
146
|
+
return 'dark';
|
|
147
|
+
case android.content.res.Configuration.UI_MODE_NIGHT_NO:
|
|
148
|
+
case android.content.res.Configuration.UI_MODE_NIGHT_UNDEFINED:
|
|
149
|
+
default:
|
|
150
|
+
return 'light';
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
_getLayoutDirectionValue(configuration) {
|
|
154
|
+
switch (configuration.getLayoutDirection()) {
|
|
155
|
+
case android.view.View.LAYOUT_DIRECTION_RTL:
|
|
156
|
+
return CoreTypes.LayoutDirection.rtl;
|
|
157
|
+
case android.view.View.LAYOUT_DIRECTION_LTR:
|
|
158
|
+
default:
|
|
159
|
+
return CoreTypes.LayoutDirection.ltr;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
_onDestroy() {
|
|
163
|
+
this._unregisterConfigurationCallbacks();
|
|
164
|
+
super._onDestroy();
|
|
165
|
+
this._activity = null;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Mints a window identity. Android has no stable activity id, so the value is kept
|
|
169
|
+
* in the activity saved state to survive recreation (rotation, theme change).
|
|
170
|
+
*/
|
|
171
|
+
static newWindowId() {
|
|
172
|
+
return `window-${java.util.UUID.randomUUID().toString()}`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=native-window.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-window.android.js","sourceRoot":"","sources":["../../../../packages/core/native-window/native-window.android.ts"],"names":[],"mappings":"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","sourcesContent":["import type { View } from '../ui/core/view';\nimport { CoreTypes } from '../core-types';\nimport { SDK_VERSION } from '../utils/constants';\nimport type { AndroidActivityCallbacks } from '../ui/frame/frame-common';\nimport { CALLBACKS } from '../ui/frame/frame-constants';\nimport { NativeWindow } from './native-window-common';\nimport type { WindowRole } from './window-base';\n\n/**\n * Android implementation of NativeWindow.\n * Wraps an AppCompatActivity.\n */\nexport class AndroidNativeWindow extends NativeWindow {\n\tprivate _activity: WeakRef<androidx.appcompat.app.AppCompatActivity>;\n\tprivate _componentCallbacks: android.content.ComponentCallbacks2;\n\tprivate _componentCallbacksActivity: WeakRef<androidx.appcompat.app.AppCompatActivity>;\n\n\tconstructor(activity: androidx.appcompat.app.AppCompatActivity, id?: string, isPrimary = false, role: WindowRole = 'application') {\n\t\tsuper(id, isPrimary, role);\n\t\tthis._activity = new WeakRef(activity);\n\t}\n\n\t/**\n\t * @internal – bind a recreated activity to this window session after a detach.\n\t */\n\t_reattach(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\tthis._activity = new WeakRef(activity);\n\t\tthis._setState('attached');\n\t}\n\n\t/**\n\t * @internal – observe the activity's own configuration.\n\t *\n\t * Registered on the activity rather than the application context: in multi-window\n\t * and multi-display setups each activity gets its own configuration, and only these\n\t * callbacks report the one this window actually renders with.\n\t */\n\t_registerConfigurationCallbacks(): void {\n\t\tconst activity = this.activity;\n\t\tif (!activity || this._componentCallbacks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst callbacks = new android.content.ComponentCallbacks2({\n\t\t\tonLowMemory(): void {\n\t\t\t\t// Handled application-wide.\n\t\t\t},\n\t\t\tonTrimMemory(level: number): void {\n\t\t\t\t// Handled application-wide.\n\t\t\t},\n\t\t\tonConfigurationChanged: (newConfiguration: android.content.res.Configuration): void => {\n\t\t\t\tthis._setOrientation(this._getOrientationValue(newConfiguration));\n\t\t\t\tthis._setSystemAppearance(this._getSystemAppearanceValue(newConfiguration));\n\t\t\t\tthis._setLayoutDirection(this._getLayoutDirectionValue(newConfiguration));\n\t\t\t},\n\t\t});\n\n\t\tactivity.registerComponentCallbacks(callbacks);\n\t\tthis._componentCallbacks = callbacks;\n\t\tthis._componentCallbacksActivity = new WeakRef(activity);\n\t}\n\n\t/**\n\t * @internal – drop the configuration callbacks, so a recreated activity does not\n\t * leave the previous one registered.\n\t */\n\t_unregisterConfigurationCallbacks(): void {\n\t\tconst callbacks = this._componentCallbacks;\n\t\tif (!callbacks) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._componentCallbacks = null;\n\t\tthis._componentCallbacksActivity?.deref()?.unregisterComponentCallbacks(callbacks);\n\t\tthis._componentCallbacksActivity = null;\n\t}\n\n\t_detach(): void {\n\t\tthis._unregisterConfigurationCallbacks();\n\t\tsuper._detach();\n\t}\n\n\t/**\n\t * The wrapped Android Activity (may be GC'd).\n\t */\n\tget activity(): androidx.appcompat.app.AppCompatActivity | undefined {\n\t\treturn this._activity?.deref();\n\t}\n\n\tget android() {\n\t\tconst activity = this.activity;\n\t\tif (!activity) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn { activity };\n\t}\n\n\t/**\n\t * Platform-specific: apply the view as root content of this Activity.\n\t */\n\tprotected _setNativeContent(view: View): void {\n\t\tconst activity = this.activity;\n\t\tif (!activity) {\n\t\t\tthrow new Error('NativeWindow: Activity is no longer available.');\n\t\t}\n\n\t\tconst callbacks: AndroidActivityCallbacks = (activity as any)[CALLBACKS];\n\t\tif (!callbacks) {\n\t\t\tthrow new Error('NativeWindow: Cannot find activity callbacks.');\n\t\t}\n\t\tcallbacks.resetActivityContent(activity, view);\n\t}\n\n\t/**\n\t * Close this window by finishing the activity.\n\t */\n\tclose(): void {\n\t\tif (this.isPrimary) {\n\t\t\tconsole.log('NativeWindow: Cannot close the primary window.');\n\t\t\treturn;\n\t\t}\n\n\t\tconst activity = this.activity;\n\t\tif (activity) {\n\t\t\tactivity.finish();\n\t\t}\n\t}\n\n\t// --- Platform getters ---\n\n\tprotected _getOrientation(): 'portrait' | 'landscape' | 'unknown' {\n\t\tconst activity = this.activity;\n\t\tif (!activity) {\n\t\t\treturn 'unknown';\n\t\t}\n\t\tconst configuration = activity.getResources().getConfiguration();\n\t\treturn this._getOrientationValue(configuration);\n\t}\n\n\tprotected _getSystemAppearance(): 'light' | 'dark' | null {\n\t\tconst activity = this.activity;\n\t\tif (!activity) {\n\t\t\treturn null;\n\t\t}\n\t\tconst configuration = activity.getResources().getConfiguration();\n\t\treturn this._getSystemAppearanceValue(configuration);\n\t}\n\n\tprotected _getLayoutDirection(): CoreTypes.LayoutDirectionType | null {\n\t\tconst activity = this.activity;\n\t\tif (!activity) {\n\t\t\treturn null;\n\t\t}\n\t\tconst configuration = activity.getResources().getConfiguration();\n\t\treturn this._getLayoutDirectionValue(configuration);\n\t}\n\n\t// --- Value converters ---\n\n\t_getOrientationValue(configuration: android.content.res.Configuration): 'portrait' | 'landscape' | 'unknown' {\n\t\tswitch (configuration.orientation) {\n\t\t\tcase android.content.res.Configuration.ORIENTATION_LANDSCAPE:\n\t\t\t\treturn 'landscape';\n\t\t\tcase android.content.res.Configuration.ORIENTATION_PORTRAIT:\n\t\t\t\treturn 'portrait';\n\t\t\tdefault:\n\t\t\t\treturn 'unknown';\n\t\t}\n\t}\n\n\t_getSystemAppearanceValue(configuration: android.content.res.Configuration): 'dark' | 'light' {\n\t\tconst mode = configuration.uiMode & android.content.res.Configuration.UI_MODE_NIGHT_MASK;\n\t\tswitch (mode) {\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_YES:\n\t\t\t\treturn 'dark';\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_NO:\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_UNDEFINED:\n\t\t\tdefault:\n\t\t\t\treturn 'light';\n\t\t}\n\t}\n\n\t_getLayoutDirectionValue(configuration: android.content.res.Configuration): CoreTypes.LayoutDirectionType {\n\t\tswitch (configuration.getLayoutDirection()) {\n\t\t\tcase android.view.View.LAYOUT_DIRECTION_RTL:\n\t\t\t\treturn CoreTypes.LayoutDirection.rtl;\n\t\t\tcase android.view.View.LAYOUT_DIRECTION_LTR:\n\t\t\tdefault:\n\t\t\t\treturn CoreTypes.LayoutDirection.ltr;\n\t\t}\n\t}\n\n\tprotected _onDestroy(): void {\n\t\tthis._unregisterConfigurationCallbacks();\n\t\tsuper._onDestroy();\n\t\tthis._activity = null;\n\t}\n\n\t/**\n\t * Mints a window identity. Android has no stable activity id, so the value is kept\n\t * in the activity saved state to survive recreation (rotation, theme change).\n\t */\n\tstatic newWindowId(): string {\n\t\treturn `window-${java.util.UUID.randomUUID().toString()}`;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { View } from '../ui/core/view';
|
|
2
|
+
import { CoreTypes } from '../core-types';
|
|
3
|
+
import { NativeWindow } from './native-window-common';
|
|
4
|
+
import type { WindowRole } from './window-base';
|
|
5
|
+
/**
|
|
6
|
+
* iOS implementation of NativeWindow.
|
|
7
|
+
* Wraps a UIWindow and, when the app is scene-based, the UIWindowScene hosting it.
|
|
8
|
+
*/
|
|
9
|
+
export declare class IOSNativeWindow extends NativeWindow {
|
|
10
|
+
private _scene;
|
|
11
|
+
private _window;
|
|
12
|
+
/**
|
|
13
|
+
* @internal – set while a scene session destruction request is in flight, so the
|
|
14
|
+
* following scene disconnect is read as a close rather than a detach.
|
|
15
|
+
*/
|
|
16
|
+
_closeRequested: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @internal – whether the id comes from a scene session identity. Without one the
|
|
19
|
+
* window cannot be matched to a reconnecting session or to a discarded one.
|
|
20
|
+
*/
|
|
21
|
+
_hasSessionIdentity: boolean;
|
|
22
|
+
constructor(scene: UIWindowScene | undefined, window: UIWindow, id?: string, isPrimary?: boolean, role?: WindowRole);
|
|
23
|
+
/**
|
|
24
|
+
* @internal – bind a new scene/window pair to this window session after a detach.
|
|
25
|
+
*/
|
|
26
|
+
_reattach(scene: UIWindowScene, uiWindow: UIWindow): void;
|
|
27
|
+
get ios(): {
|
|
28
|
+
scene: UIWindowScene;
|
|
29
|
+
uiWindow: UIWindow;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Platform-specific: set the view as root content of this UIWindow.
|
|
33
|
+
*/
|
|
34
|
+
protected _setNativeContent(view: View): void;
|
|
35
|
+
/**
|
|
36
|
+
* Close this window/scene.
|
|
37
|
+
*/
|
|
38
|
+
close(): void;
|
|
39
|
+
protected _getOrientation(): 'portrait' | 'landscape' | 'unknown';
|
|
40
|
+
/**
|
|
41
|
+
* @internal – re-reads the native orientation and raises `orientationChanged` if it moved.
|
|
42
|
+
*/
|
|
43
|
+
_syncOrientation(): void;
|
|
44
|
+
protected _getSystemAppearance(): 'light' | 'dark' | null;
|
|
45
|
+
protected _getLayoutDirection(): CoreTypes.LayoutDirectionType | null;
|
|
46
|
+
private _getOrientationValue;
|
|
47
|
+
_getSystemAppearanceValue(userInterfaceStyle: number): 'dark' | 'light';
|
|
48
|
+
_getLayoutDirectionValue(layoutDirection: number): CoreTypes.LayoutDirectionType;
|
|
49
|
+
private _getViewController;
|
|
50
|
+
private _setViewControllerView;
|
|
51
|
+
protected _onReleaseRootView(rootView: View): void;
|
|
52
|
+
protected _onDestroy(): void;
|
|
53
|
+
/**
|
|
54
|
+
* The window identity of a scene: the session persistent identifier, which iOS keeps
|
|
55
|
+
* across a disconnect and hands back when it reconnects the same session.
|
|
56
|
+
*
|
|
57
|
+
* Returns `undefined` when the scene carries no session identity — such a window gets
|
|
58
|
+
* a minted id and will not be recognised on reconnect.
|
|
59
|
+
*/
|
|
60
|
+
static getSceneId(scene: UIWindowScene): string | undefined;
|
|
61
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { IOSHelper } from '../ui/core/view/view-helper';
|
|
2
|
+
import { SDK_VERSION } from '../utils/constants';
|
|
3
|
+
import { CoreTypes } from '../core-types';
|
|
4
|
+
import { Trace } from '../trace';
|
|
5
|
+
import { NativeWindow } from './native-window-common';
|
|
6
|
+
/**
|
|
7
|
+
* iOS implementation of NativeWindow.
|
|
8
|
+
* Wraps a UIWindow and, when the app is scene-based, the UIWindowScene hosting it.
|
|
9
|
+
*/
|
|
10
|
+
export class IOSNativeWindow extends NativeWindow {
|
|
11
|
+
constructor(scene, window, id, isPrimary = false, role = 'application') {
|
|
12
|
+
super(id, isPrimary, role);
|
|
13
|
+
/**
|
|
14
|
+
* @internal – set while a scene session destruction request is in flight, so the
|
|
15
|
+
* following scene disconnect is read as a close rather than a detach.
|
|
16
|
+
*/
|
|
17
|
+
this._closeRequested = false;
|
|
18
|
+
// Only an id taken from the scene's session can be matched back to that session.
|
|
19
|
+
// Hand-minted ids ('main', 'embedded-main') are ids all the same, so their mere
|
|
20
|
+
// presence says nothing.
|
|
21
|
+
const sessionId = scene?.session?.persistentIdentifier;
|
|
22
|
+
this._hasSessionIdentity = !!sessionId && id === `${sessionId}`;
|
|
23
|
+
this._scene = scene;
|
|
24
|
+
this._window = window;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @internal – bind a new scene/window pair to this window session after a detach.
|
|
28
|
+
*/
|
|
29
|
+
_reattach(scene, uiWindow) {
|
|
30
|
+
this._scene = scene;
|
|
31
|
+
this._window = uiWindow;
|
|
32
|
+
this._setState('attached');
|
|
33
|
+
}
|
|
34
|
+
get ios() {
|
|
35
|
+
return {
|
|
36
|
+
scene: this._scene,
|
|
37
|
+
uiWindow: this._window,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Platform-specific: set the view as root content of this UIWindow.
|
|
42
|
+
*/
|
|
43
|
+
_setNativeContent(view) {
|
|
44
|
+
const controller = this._getViewController(view);
|
|
45
|
+
this._setViewControllerView(view);
|
|
46
|
+
if (this.role === 'embedded') {
|
|
47
|
+
// The host app owns this UIWindow: its rootViewController and key/visible state
|
|
48
|
+
// are not ours to change, so the content is handed over as a view controller.
|
|
49
|
+
NativeScriptEmbedder.sharedInstance().delegate?.presentNativeScriptApp(controller);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const haveController = this._window.rootViewController !== null;
|
|
53
|
+
this._window.rootViewController = controller;
|
|
54
|
+
if (!haveController) {
|
|
55
|
+
this._window.makeKeyAndVisible();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Listen for trait collection changes per-window
|
|
59
|
+
view.on(IOSHelper.traitCollectionColorAppearanceChangedEvent, () => {
|
|
60
|
+
const userInterfaceStyle = controller.traitCollection.userInterfaceStyle;
|
|
61
|
+
this._setSystemAppearance(this._getSystemAppearanceValue(userInterfaceStyle));
|
|
62
|
+
});
|
|
63
|
+
view.on(IOSHelper.traitCollectionLayoutDirectionChangedEvent, () => {
|
|
64
|
+
const layoutDirection = controller.traitCollection.layoutDirection;
|
|
65
|
+
this._setLayoutDirection(this._getLayoutDirectionValue(layoutDirection));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Close this window/scene.
|
|
70
|
+
*/
|
|
71
|
+
close() {
|
|
72
|
+
if (this.isPrimary) {
|
|
73
|
+
console.log('NativeWindow: Cannot close the primary window.');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const session = this._scene?.session;
|
|
77
|
+
if (!session) {
|
|
78
|
+
console.log('NativeWindow: Scene has no session to destroy.');
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const app = UIApplication.sharedApplication;
|
|
82
|
+
if (app.requestSceneSessionDestructionOptionsErrorHandler) {
|
|
83
|
+
this._closeRequested = true;
|
|
84
|
+
app.requestSceneSessionDestructionOptionsErrorHandler(session, null, (error) => {
|
|
85
|
+
if (error) {
|
|
86
|
+
this._closeRequested = false;
|
|
87
|
+
console.log('NativeWindow: Error destroying scene session:', error.localizedDescription);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log('NativeWindow: Scene destruction API not available on this iOS version.');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// --- Platform getters ---
|
|
96
|
+
_getOrientation() {
|
|
97
|
+
if (__VISIONOS__) {
|
|
98
|
+
return this._getOrientationValue(NativeScriptEmbedder.sharedInstance().windowScene?.interfaceOrientation);
|
|
99
|
+
}
|
|
100
|
+
if (this._scene) {
|
|
101
|
+
return this._getOrientationValue(this._scene.effectiveGeometry?.interfaceOrientation ?? this._scene.interfaceOrientation);
|
|
102
|
+
}
|
|
103
|
+
return this._getOrientationValue(UIApplication.sharedApplication.statusBarOrientation);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @internal – re-reads the native orientation and raises `orientationChanged` if it moved.
|
|
107
|
+
*/
|
|
108
|
+
_syncOrientation() {
|
|
109
|
+
if (this.state === 'attached') {
|
|
110
|
+
this._setOrientation(this._getOrientation());
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
_getSystemAppearance() {
|
|
114
|
+
if (!__VISIONOS__ && SDK_VERSION <= 11) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
const rootVC = this._window?.rootViewController;
|
|
118
|
+
if (!rootVC) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
return this._getSystemAppearanceValue(rootVC.traitCollection.userInterfaceStyle);
|
|
122
|
+
}
|
|
123
|
+
_getLayoutDirection() {
|
|
124
|
+
const rootVC = this._window?.rootViewController;
|
|
125
|
+
if (!rootVC) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
return this._getLayoutDirectionValue(rootVC.traitCollection.layoutDirection);
|
|
129
|
+
}
|
|
130
|
+
// --- Value converters ---
|
|
131
|
+
_getOrientationValue(orientation) {
|
|
132
|
+
switch (orientation) {
|
|
133
|
+
case 3 /* UIInterfaceOrientation.LandscapeRight */:
|
|
134
|
+
case 4 /* UIInterfaceOrientation.LandscapeLeft */:
|
|
135
|
+
return 'landscape';
|
|
136
|
+
case 2 /* UIInterfaceOrientation.PortraitUpsideDown */:
|
|
137
|
+
case 1 /* UIInterfaceOrientation.Portrait */:
|
|
138
|
+
return 'portrait';
|
|
139
|
+
case 0 /* UIInterfaceOrientation.Unknown */:
|
|
140
|
+
default:
|
|
141
|
+
return 'unknown';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
_getSystemAppearanceValue(userInterfaceStyle) {
|
|
145
|
+
switch (userInterfaceStyle) {
|
|
146
|
+
case 2 /* UIUserInterfaceStyle.Dark */:
|
|
147
|
+
return 'dark';
|
|
148
|
+
case 1 /* UIUserInterfaceStyle.Light */:
|
|
149
|
+
case 0 /* UIUserInterfaceStyle.Unspecified */:
|
|
150
|
+
default:
|
|
151
|
+
return 'light';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
_getLayoutDirectionValue(layoutDirection) {
|
|
155
|
+
switch (layoutDirection) {
|
|
156
|
+
case 1 /* UITraitEnvironmentLayoutDirection.RightToLeft */:
|
|
157
|
+
return CoreTypes.LayoutDirection.rtl;
|
|
158
|
+
case 0 /* UITraitEnvironmentLayoutDirection.LeftToRight */:
|
|
159
|
+
default:
|
|
160
|
+
return CoreTypes.LayoutDirection.ltr;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// --- ViewController helpers ---
|
|
164
|
+
_getViewController(rootView) {
|
|
165
|
+
let viewController = rootView.viewController || rootView.ios;
|
|
166
|
+
if (!(viewController instanceof UIViewController)) {
|
|
167
|
+
viewController = IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(rootView));
|
|
168
|
+
rootView.viewController = viewController;
|
|
169
|
+
}
|
|
170
|
+
return viewController;
|
|
171
|
+
}
|
|
172
|
+
_setViewControllerView(view) {
|
|
173
|
+
const viewController = view.viewController || view.ios;
|
|
174
|
+
const nativeView = view.ios || view.nativeViewProtected;
|
|
175
|
+
if (!nativeView || !viewController) {
|
|
176
|
+
throw new Error('Root should be either UIViewController or UIView');
|
|
177
|
+
}
|
|
178
|
+
if (viewController instanceof IOSHelper.UILayoutViewController) {
|
|
179
|
+
viewController.view.addSubview(nativeView);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
_onReleaseRootView(rootView) {
|
|
183
|
+
rootView.off(IOSHelper.traitCollectionColorAppearanceChangedEvent);
|
|
184
|
+
rootView.off(IOSHelper.traitCollectionLayoutDirectionChangedEvent);
|
|
185
|
+
// An embedded window belongs to the host app, so its rootViewController is not ours
|
|
186
|
+
// to clear — `_setNativeContent` never set it in the first place.
|
|
187
|
+
if (this.role !== 'embedded' && this._window?.rootViewController) {
|
|
188
|
+
// The controller's view is moving into another window's hierarchy; leaving it
|
|
189
|
+
// installed here has UIKit holding a controller it no longer hosts.
|
|
190
|
+
this._window.rootViewController = null;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
_onDestroy() {
|
|
194
|
+
// The trait collection listeners live on the root view, so they have to go
|
|
195
|
+
// before the base drops the reference to it.
|
|
196
|
+
if (this._rootView) {
|
|
197
|
+
this._rootView.off(IOSHelper.traitCollectionColorAppearanceChangedEvent);
|
|
198
|
+
this._rootView.off(IOSHelper.traitCollectionLayoutDirectionChangedEvent);
|
|
199
|
+
}
|
|
200
|
+
super._onDestroy();
|
|
201
|
+
this._scene = null;
|
|
202
|
+
this._window = null;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The window identity of a scene: the session persistent identifier, which iOS keeps
|
|
206
|
+
* across a disconnect and hands back when it reconnects the same session.
|
|
207
|
+
*
|
|
208
|
+
* Returns `undefined` when the scene carries no session identity — such a window gets
|
|
209
|
+
* a minted id and will not be recognised on reconnect.
|
|
210
|
+
*/
|
|
211
|
+
static getSceneId(scene) {
|
|
212
|
+
const persistentIdentifier = scene?.session?.persistentIdentifier;
|
|
213
|
+
if (persistentIdentifier) {
|
|
214
|
+
return `${persistentIdentifier}`;
|
|
215
|
+
}
|
|
216
|
+
Trace.write('NativeWindow: scene has no session persistentIdentifier; window identity will not survive a reconnect.', Trace.categories.NativeLifecycle, Trace.messageType.error);
|
|
217
|
+
return undefined;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=native-window.ios.js.map
|