@nativescript/core 9.1.0-next.3 → 9.1.0-next.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.
Files changed (79) hide show
  1. package/accessibility/accessibility-common.d.ts +8 -0
  2. package/accessibility/accessibility-common.js +28 -0
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/application/application-common.d.ts +187 -3
  5. package/application/application-common.js +397 -54
  6. package/application/application-common.js.map +1 -1
  7. package/application/application-interfaces.d.ts +59 -1
  8. package/application/application.android.d.ts +21 -0
  9. package/application/application.android.js +189 -7
  10. package/application/application.android.js.map +1 -1
  11. package/application/application.d.ts +121 -66
  12. package/application/application.ios.d.ts +88 -26
  13. package/application/application.ios.js +474 -351
  14. package/application/application.ios.js.map +1 -1
  15. package/application/helpers-common.d.ts +5 -0
  16. package/application/helpers-common.js +23 -1
  17. package/application/helpers-common.js.map +1 -1
  18. package/application/scene-delegate-bridge.d.ts +55 -0
  19. package/application/scene-delegate-bridge.js +122 -0
  20. package/application/scene-delegate-bridge.js.map +1 -0
  21. package/config/config.interface.d.ts +38 -2
  22. package/css/system-classes.d.ts +9 -0
  23. package/css/system-classes.js +23 -0
  24. package/css/system-classes.js.map +1 -1
  25. package/data/observable/index.d.ts +5 -0
  26. package/data/observable/index.js +9 -0
  27. package/data/observable/index.js.map +1 -1
  28. package/global-types.d.ts +39 -33
  29. package/globals/global-utils.d.ts +6 -1
  30. package/globals/global-utils.js +10 -5
  31. package/globals/global-utils.js.map +1 -1
  32. package/index.d.ts +1 -0
  33. package/index.js +1 -0
  34. package/index.js.map +1 -1
  35. package/native-window/index.d.ts +426 -0
  36. package/native-window/index.js +4 -0
  37. package/native-window/index.js.map +1 -0
  38. package/native-window/native-window-common.d.ts +153 -0
  39. package/native-window/native-window-common.js +340 -0
  40. package/native-window/native-window-common.js.map +1 -0
  41. package/native-window/native-window-interfaces.d.ts +186 -0
  42. package/native-window/native-window-interfaces.js +90 -0
  43. package/native-window/native-window-interfaces.js.map +1 -0
  44. package/native-window/native-window.android.d.ts +59 -0
  45. package/native-window/native-window.android.js +175 -0
  46. package/native-window/native-window.android.js.map +1 -0
  47. package/native-window/native-window.ios.d.ts +57 -0
  48. package/native-window/native-window.ios.js +208 -0
  49. package/native-window/native-window.ios.js.map +1 -0
  50. package/native-window/window-base.d.ts +103 -0
  51. package/native-window/window-base.js +78 -0
  52. package/native-window/window-base.js.map +1 -0
  53. package/package.json +1 -1
  54. package/ui/core/view/index.android.js +3 -1
  55. package/ui/core/view/index.android.js.map +1 -1
  56. package/ui/core/view/index.d.ts +25 -0
  57. package/ui/core/view/view-common.d.ts +19 -0
  58. package/ui/core/view/view-common.js +34 -0
  59. package/ui/core/view/view-common.js.map +1 -1
  60. package/ui/core/view-base/index.js +6 -0
  61. package/ui/core/view-base/index.js.map +1 -1
  62. package/ui/frame/frame-common.d.ts +14 -2
  63. package/ui/frame/frame-common.js +17 -5
  64. package/ui/frame/frame-common.js.map +1 -1
  65. package/ui/frame/frame-constants.d.ts +9 -0
  66. package/ui/frame/frame-constants.js +10 -0
  67. package/ui/frame/frame-constants.js.map +1 -0
  68. package/ui/frame/frame-helper-for-android.d.ts +2 -2
  69. package/ui/frame/frame-helper-for-android.js +2 -2
  70. package/ui/frame/frame-helper-for-android.js.map +1 -1
  71. package/ui/frame/frame-interfaces.d.ts +1 -1
  72. package/ui/frame/frame-stack.d.ts +17 -1
  73. package/ui/frame/frame-stack.js +32 -5
  74. package/ui/frame/frame-stack.js.map +1 -1
  75. package/ui/frame/index.android.d.ts +1 -1
  76. package/ui/frame/index.android.js +111 -38
  77. package/ui/frame/index.android.js.map +1 -1
  78. package/ui/frame/index.d.ts +15 -5
  79. package/utils/native-helper.d.ts +2 -2
@@ -0,0 +1,340 @@
1
+ import { CSSUtils } from '../css/system-classes';
2
+ import { Device } from '../platform';
3
+ import { Trace } from '../trace';
4
+ import { Builder } from '../ui/builder';
5
+ import { applyAccessibilityCssToRoot, readyInitAccessibilityCssHelper, readyInitFontScale } from '../accessibility/accessibility-common';
6
+ import { SDK_VERSION } from '../utils/constants';
7
+ import { NativeWindowEvents } from './native-window-interfaces';
8
+ import { getAutoSystemAppearanceChanged } from '../application/helpers-common';
9
+ import { WindowBase } from './window-base';
10
+ const ORIENTATION_CSS_CLASSES = CSSUtils.ORIENTATION_CSS_CLASSES;
11
+ const SYSTEM_APPEARANCE_CSS_CLASSES = CSSUtils.SYSTEM_APPEARANCE_CSS_CLASSES;
12
+ const LAYOUT_DIRECTION_CSS_CLASSES = CSSUtils.LAYOUT_DIRECTION_CSS_CLASSES;
13
+ /**
14
+ * Cross-platform NativeWindow base class.
15
+ *
16
+ * Wraps a platform window surface (iOS UIWindowScene+UIWindow, Android Activity)
17
+ * and manages per-window root view lifecycle, CSS classes, and events.
18
+ *
19
+ * Platform-specific subclasses implement the abstract methods.
20
+ */
21
+ export class NativeWindow extends WindowBase {
22
+ constructor(id, isPrimary = false, role = 'application') {
23
+ super(id, isPrimary, role);
24
+ }
25
+ get rootView() {
26
+ return this._rootView;
27
+ }
28
+ /**
29
+ * Set the content of this window.
30
+ * Accepts a View, a NavigationEntry, or a module name string.
31
+ */
32
+ setContent(content) {
33
+ let view;
34
+ if (typeof content === 'string') {
35
+ view = Builder.createViewFromEntry({ moduleName: content });
36
+ }
37
+ else if (content && typeof content === 'object') {
38
+ if (content.moduleName || content.create) {
39
+ view = Builder.createViewFromEntry(content);
40
+ }
41
+ else {
42
+ view = content;
43
+ }
44
+ }
45
+ if (!view) {
46
+ throw new Error('NativeWindow.setContent: Invalid content provided.');
47
+ }
48
+ const previousRootView = this._rootView;
49
+ if (previousRootView) {
50
+ previousRootView._onRootViewReset();
51
+ }
52
+ this._takeRootView(view);
53
+ this._applyRootViewSettings(view);
54
+ this._setNativeContent(view);
55
+ this._notifyEvent(NativeWindowEvents.contentLoaded);
56
+ }
57
+ /**
58
+ * @internal – take ownership of a root view the platform pipeline built and attached itself.
59
+ *
60
+ * The pipeline already ran `_setupAsRootView` and `Application.initRootView` on this view and
61
+ * installed it on the native surface, so neither `_applyRootViewSettings` nor `_setNativeContent`
62
+ * may run here — both would redo that work.
63
+ */
64
+ _adoptRootView(view) {
65
+ if (!view || this._rootView === view) {
66
+ return;
67
+ }
68
+ this._takeRootView(view);
69
+ this._notifyEvent(NativeWindowEvents.contentLoaded);
70
+ }
71
+ /**
72
+ * @internal – give up the root view without tearing it down.
73
+ *
74
+ * Called when another window takes the view over: the view is being moved, not
75
+ * destroyed, so — unlike {@link _onDestroy} — nothing here unloads, resets or tears
76
+ * down the view. It stays loaded and usable in its new window.
77
+ */
78
+ _releaseRootView() {
79
+ const rootView = this._rootView;
80
+ if (!rootView) {
81
+ return;
82
+ }
83
+ this._onReleaseRootView(rootView);
84
+ rootView._nativeWindow = null;
85
+ this._rootView = null;
86
+ }
87
+ /**
88
+ * Platform hook: unhook the released view from the native surface. The view itself
89
+ * must survive — it is on its way into another window.
90
+ */
91
+ _onReleaseRootView(rootView) {
92
+ // noop
93
+ }
94
+ /**
95
+ * Becomes the owner of `view`, releasing it from whichever window held it before.
96
+ */
97
+ _takeRootView(view) {
98
+ const currentOwner = view._nativeWindow;
99
+ if (currentOwner && currentOwner !== this) {
100
+ currentOwner._releaseRootView();
101
+ }
102
+ if (this._rootView && this._rootView !== view) {
103
+ this._rootView._nativeWindow = null;
104
+ }
105
+ this._rootView = view;
106
+ view._nativeWindow = this;
107
+ }
108
+ /**
109
+ * Get the current orientation of this window.
110
+ *
111
+ * Read from the native surface while the window is attached; a detached window
112
+ * reports the last value it saw.
113
+ *
114
+ * A read that catches a change the platform has not reported yet goes through
115
+ * {@link _setOrientation}, so the change is never swallowed by the reading.
116
+ */
117
+ orientation() {
118
+ if (this.state === 'attached') {
119
+ const value = this._getOrientation();
120
+ if (this._orientation === undefined) {
121
+ this._orientation = value;
122
+ }
123
+ else if (this._orientation !== value) {
124
+ this._setOrientation(value);
125
+ }
126
+ }
127
+ return this._orientation;
128
+ }
129
+ /**
130
+ * Get the current system appearance of this window.
131
+ *
132
+ * Read from the native surface while the window is attached; a detached window
133
+ * reports the last value it saw.
134
+ *
135
+ * A read that catches a change the platform has not reported yet goes through
136
+ * {@link _setSystemAppearance}, so the change is never swallowed by the reading.
137
+ */
138
+ systemAppearance() {
139
+ if (this.state === 'attached') {
140
+ const value = this._getSystemAppearance();
141
+ if (this._systemAppearance === undefined) {
142
+ this._systemAppearance = value;
143
+ }
144
+ else if (this._systemAppearance !== value && value !== null) {
145
+ this._setSystemAppearance(value);
146
+ }
147
+ }
148
+ return this._systemAppearance;
149
+ }
150
+ /**
151
+ * Get the current layout direction of this window.
152
+ *
153
+ * Read from the native surface while the window is attached; a detached window
154
+ * reports the last value it saw.
155
+ *
156
+ * A read that catches a change the platform has not reported yet goes through
157
+ * {@link _setLayoutDirection}, so the change is never swallowed by the reading.
158
+ */
159
+ layoutDirection() {
160
+ if (this.state === 'attached') {
161
+ const value = this._getLayoutDirection();
162
+ if (this._layoutDirection === undefined) {
163
+ this._layoutDirection = value;
164
+ }
165
+ else if (this._layoutDirection !== value && value !== null) {
166
+ this._setLayoutDirection(value);
167
+ }
168
+ }
169
+ return this._layoutDirection;
170
+ }
171
+ on(eventName, callback, thisArg) {
172
+ super.on(eventName, callback, thisArg);
173
+ }
174
+ // --- Root view CSS class management ---
175
+ /**
176
+ * Applies platform, orientation, appearance, and layout direction CSS classes
177
+ * to the root view.
178
+ */
179
+ _applyRootViewSettings(rootView) {
180
+ rootView._setupAsRootView({});
181
+ this._setRootViewCSSClasses(rootView);
182
+ readyInitAccessibilityCssHelper();
183
+ readyInitFontScale();
184
+ applyAccessibilityCssToRoot(rootView);
185
+ }
186
+ _setRootViewCSSClasses(rootView) {
187
+ const platform = Device.os.toLowerCase();
188
+ const deviceType = Device.deviceType.toLowerCase();
189
+ if (platform) {
190
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}`);
191
+ // SDK Version CSS classes
192
+ // Add exact version class (e.g., .ns-ios-26 or .ns-android-36)
193
+ // this acts like 'gte' for that major version range
194
+ // e.g., if user wants iOS 27, they can add .ns-ios-27 specifiers
195
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${platform}-${Math.floor(SDK_VERSION)}`);
196
+ }
197
+ if (deviceType) {
198
+ CSSUtils.pushToSystemCssClasses(`${CSSUtils.CLASS_PREFIX}${deviceType}`);
199
+ }
200
+ rootView.cssClasses.add(CSSUtils.ROOT_VIEW_CSS_CLASS);
201
+ const rootViewCssClasses = CSSUtils.getSystemCssClasses();
202
+ rootViewCssClasses.forEach((c) => rootView.cssClasses.add(c));
203
+ // Two windows can disagree on these, so they never reach the process-wide
204
+ // system class list — see CSSUtils.WINDOW_SCOPED_CSS_CLASSES.
205
+ const orientationValue = this.orientation();
206
+ const appearanceValue = this.systemAppearance();
207
+ const directionValue = this.layoutDirection();
208
+ if (orientationValue) {
209
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${orientationValue}`);
210
+ }
211
+ if (appearanceValue) {
212
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${appearanceValue}`);
213
+ }
214
+ if (directionValue) {
215
+ rootView.cssClasses.add(`${CSSUtils.CLASS_PREFIX}${directionValue}`);
216
+ }
217
+ this._increaseStyleScopeVersion(rootView);
218
+ rootView._onCssStateChange();
219
+ if (Trace.isEnabled()) {
220
+ const rootCssClasses = Array.from(rootView.cssClasses);
221
+ Trace.write(`NativeWindow [${this.id}] Setting root css classes: ${rootCssClasses.join(' ')}`, Trace.categories.Style);
222
+ }
223
+ }
224
+ // --- Orientation / Appearance / Direction change handling ---
225
+ /**
226
+ * @internal – called by platform when orientation changes for this window.
227
+ */
228
+ _setOrientation(value) {
229
+ if (this._orientation === value) {
230
+ return;
231
+ }
232
+ this._orientation = value;
233
+ if (this._rootView) {
234
+ const cssClass = `${CSSUtils.CLASS_PREFIX}${value}`;
235
+ this._applyCssClass(this._rootView, ORIENTATION_CSS_CLASSES, cssClass);
236
+ }
237
+ this._notifyValueChanged(NativeWindowEvents.orientationChanged, value);
238
+ }
239
+ /**
240
+ * @internal – called by platform when system appearance changes for this window.
241
+ */
242
+ _setSystemAppearance(value) {
243
+ if (this._systemAppearance === value) {
244
+ return;
245
+ }
246
+ this._systemAppearance = value;
247
+ // `Application.autoSystemAppearanceChanged` opts out of the CSS classes only —
248
+ // the event still fires so apps driving their own theming can react to it.
249
+ if (this._rootView && getAutoSystemAppearanceChanged()) {
250
+ const cssClass = `${CSSUtils.CLASS_PREFIX}${value}`;
251
+ this._applyCssClass(this._rootView, SYSTEM_APPEARANCE_CSS_CLASSES, cssClass);
252
+ }
253
+ this._notifyValueChanged(NativeWindowEvents.systemAppearanceChanged, value);
254
+ }
255
+ /**
256
+ * @internal – called by platform when layout direction changes for this window.
257
+ */
258
+ _setLayoutDirection(value) {
259
+ if (this._layoutDirection === value) {
260
+ return;
261
+ }
262
+ this._layoutDirection = value;
263
+ if (this._rootView) {
264
+ const cssClass = `${CSSUtils.CLASS_PREFIX}${value}`;
265
+ this._applyCssClass(this._rootView, LAYOUT_DIRECTION_CSS_CLASSES, cssClass);
266
+ }
267
+ this._notifyValueChanged(NativeWindowEvents.layoutDirectionChanged, value);
268
+ }
269
+ // --- Internal helpers ---
270
+ _notifyValueChanged(eventName, newValue) {
271
+ this.notify({
272
+ eventName,
273
+ object: this,
274
+ window: this,
275
+ newValue,
276
+ });
277
+ }
278
+ _applyCssClass(rootView, cssClasses, newCssClass) {
279
+ if (!rootView.cssClasses.has(newCssClass)) {
280
+ cssClasses.forEach((cssClass) => rootView.cssClasses.delete(cssClass));
281
+ rootView.cssClasses.add(newCssClass);
282
+ this._increaseStyleScopeVersion(rootView);
283
+ rootView._onCssStateChange();
284
+ }
285
+ // The modal registry is process-wide, so only the modals presented over this
286
+ // window's root view may follow it.
287
+ const rootModalViews = rootView._getRootModalViews();
288
+ rootModalViews.forEach((modalView) => {
289
+ if (modalView._getRootModalHost() !== rootView) {
290
+ return;
291
+ }
292
+ if (!modalView.cssClasses.has(newCssClass)) {
293
+ cssClasses.forEach((cssClass) => modalView.cssClasses.delete(cssClass));
294
+ modalView.cssClasses.add(newCssClass);
295
+ modalView._onCssStateChange();
296
+ }
297
+ });
298
+ }
299
+ _increaseStyleScopeVersion(rootView) {
300
+ const styleScope = rootView._styleScope ?? rootView?.currentPage?._styleScope;
301
+ if (styleScope) {
302
+ styleScope._increaseApplicationCssSelectorVersion();
303
+ }
304
+ }
305
+ /**
306
+ * @internal – the native surface went away but the window session lives on.
307
+ *
308
+ * The window stays registered and keeps its listeners, so app code that subscribed
309
+ * to it keeps working once a surface re-attaches. The root view keeps pointing back at
310
+ * this window for the same reason — it is still this window's content.
311
+ */
312
+ _detach() {
313
+ // Take a final reading while the surface can still answer and the root view is
314
+ // still up: from here on these are what the window reports.
315
+ this.orientation();
316
+ this.systemAppearance();
317
+ this.layoutDirection();
318
+ if (this._rootView) {
319
+ if (this._rootView.isLoaded) {
320
+ this._rootView.callUnloaded();
321
+ }
322
+ this._rootView._tearDownUI(true);
323
+ this._rootView._onRootViewReset();
324
+ }
325
+ this._setState('detached');
326
+ this._notifyEvent(NativeWindowEvents.detached);
327
+ }
328
+ _onDestroy() {
329
+ super._onDestroy();
330
+ if (this._rootView) {
331
+ if (this._rootView.isLoaded) {
332
+ this._rootView.callUnloaded();
333
+ }
334
+ this._rootView._onRootViewReset();
335
+ this._rootView._nativeWindow = null;
336
+ this._rootView = null;
337
+ }
338
+ }
339
+ }
340
+ //# sourceMappingURL=native-window-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-window-common.js","sourceRoot":"","sources":["../../../../packages/core/native-window/native-window-common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAA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AAE,CAAC;QACnB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;gBAC7B,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YAC/B,CAAC;YACD,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YAClC,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC;YACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,186 @@
1
+ import type { CoreTypes } from '../core-types';
2
+ import type { EventData } from '../data/observable';
3
+ import type { View } from '../ui/core/view';
4
+ import type { NavigationEntry } from '../ui/frame/frame-interfaces';
5
+ import type { NativeWindow, WindowBase } from '.';
6
+ /**
7
+ * Events emitted by a NativeWindow instance.
8
+ */
9
+ export declare const NativeWindowEvents: {
10
+ /** Fired when the window becomes the active/focused window. */
11
+ readonly activate: "activate";
12
+ /** Fired when the window loses focus. */
13
+ readonly deactivate: "deactivate";
14
+ /** Fired when the window enters the background. */
15
+ readonly background: "background";
16
+ /** Fired when the window enters the foreground. */
17
+ readonly foreground: "foreground";
18
+ /**
19
+ * Fired when the window session ends for good. Fires at most once per window;
20
+ * every listener on the window is dropped right after it is dispatched.
21
+ */
22
+ readonly close: "close";
23
+ /** Fired when a native surface is bound to the window, both on first connect and on every re-attach. */
24
+ readonly attached: "attached";
25
+ /**
26
+ * Fired when the native surface goes away while the window session stays alive
27
+ * (iOS scene disconnect, Android activity recreation). The window stays registered
28
+ * and keeps its listeners, so the same instance is reused when `attached` fires again.
29
+ */
30
+ readonly detached: "detached";
31
+ /** Fired after the window content has been displayed for the first time. */
32
+ readonly displayed: "displayed";
33
+ /** Fired when the root view content is set or changed. */
34
+ readonly contentLoaded: "contentLoaded";
35
+ /** Fired when the orientation of this window changes. */
36
+ readonly orientationChanged: "orientationChanged";
37
+ /** Fired when the system appearance of this window changes between light and dark. */
38
+ readonly systemAppearanceChanged: "systemAppearanceChanged";
39
+ /** Fired when the layout direction of this window changes between ltr and rtl. */
40
+ readonly layoutDirectionChanged: "layoutDirectionChanged";
41
+ /** Fired when the scene is about to connect (iOS only). */
42
+ readonly sceneWillConnect: "sceneWillConnect";
43
+ /** Fired when the scene becomes active (iOS only). */
44
+ readonly sceneDidActivate: "sceneDidActivate";
45
+ /** Fired when the scene is about to resign active state (iOS only). */
46
+ readonly sceneWillResignActive: "sceneWillResignActive";
47
+ /** Fired when the scene is about to enter the foreground (iOS only). */
48
+ readonly sceneWillEnterForeground: "sceneWillEnterForeground";
49
+ /** Fired when the scene has entered the background (iOS only). */
50
+ readonly sceneDidEnterBackground: "sceneDidEnterBackground";
51
+ /** Fired when the scene has disconnected (iOS only). */
52
+ readonly sceneDidDisconnect: "sceneDidDisconnect";
53
+ /** Fired when the scene is asked to open one or more URLs (iOS only). */
54
+ readonly sceneOpenURLContexts: "sceneOpenURLContexts";
55
+ /** Fired when the scene is asked to continue a handoff/universal link activity (iOS only). */
56
+ readonly sceneContinueUserActivity: "sceneContinueUserActivity";
57
+ /** Fired when a home screen quick action is directed at the scene (iOS only). */
58
+ readonly scenePerformActionForShortcutItem: "scenePerformActionForShortcutItem";
59
+ /** Fired when the activity is created (Android only). */
60
+ readonly activityCreated: "activityCreated";
61
+ /** Fired when the activity is destroyed (Android only). */
62
+ readonly activityDestroyed: "activityDestroyed";
63
+ /** Fired when the activity is started (Android only). */
64
+ readonly activityStarted: "activityStarted";
65
+ /** Fired when the activity is paused (Android only). */
66
+ readonly activityPaused: "activityPaused";
67
+ /** Fired when the activity is resumed (Android only). */
68
+ readonly activityResumed: "activityResumed";
69
+ /** Fired when the activity is stopped (Android only). */
70
+ readonly activityStopped: "activityStopped";
71
+ /** Fired when the activity state is being saved (Android only). */
72
+ readonly saveActivityState: "saveActivityState";
73
+ /** Fired when the activity receives a result (Android only). */
74
+ readonly activityResult: "activityResult";
75
+ /** Fired when the back button is pressed (Android only). */
76
+ readonly activityBackPressed: "activityBackPressed";
77
+ /** Fired when the activity receives a new intent (Android only). */
78
+ readonly activityNewIntent: "activityNewIntent";
79
+ /** Fired when permission results are received (Android only). */
80
+ readonly activityRequestPermissions: "activityRequestPermissions";
81
+ };
82
+ export type NativeWindowEventName = (typeof NativeWindowEvents)[keyof typeof NativeWindowEvents];
83
+ /**
84
+ * Application-level events related to window management.
85
+ */
86
+ export declare const WindowEvents: {
87
+ /** Fired on Application when a new NativeWindow is created. */
88
+ readonly windowOpen: "windowOpen";
89
+ /** Fired on Application when a NativeWindow is closed/destroyed. */
90
+ readonly windowClose: "windowClose";
91
+ /** Fired on Application when another window takes over the primary role. */
92
+ readonly primaryWindowChanged: "primaryWindowChanged";
93
+ };
94
+ /**
95
+ * Base event data for window surface events.
96
+ */
97
+ export interface WindowBaseEventData extends EventData {
98
+ /** The window that emitted the event. */
99
+ window: WindowBase;
100
+ }
101
+ /**
102
+ * Base event data for NativeWindow events.
103
+ */
104
+ export interface NativeWindowEventData extends WindowBaseEventData {
105
+ /** The NativeWindow that emitted the event. */
106
+ window: NativeWindow;
107
+ }
108
+ /**
109
+ * Event data for the `orientationChanged` event of a NativeWindow.
110
+ */
111
+ export interface WindowOrientationChangedEventData extends NativeWindowEventData {
112
+ /** The orientation the window is now in. */
113
+ newValue: 'portrait' | 'landscape' | 'unknown';
114
+ }
115
+ /**
116
+ * Event data for the `systemAppearanceChanged` event of a NativeWindow.
117
+ */
118
+ export interface WindowSystemAppearanceChangedEventData extends NativeWindowEventData {
119
+ /** The system appearance the window is now showing. */
120
+ newValue: 'light' | 'dark';
121
+ }
122
+ /**
123
+ * Event data for the `layoutDirectionChanged` event of a NativeWindow.
124
+ */
125
+ export interface WindowLayoutDirectionChangedEventData extends NativeWindowEventData {
126
+ /** The layout direction the window is now using. */
127
+ newValue: CoreTypes.LayoutDirectionType;
128
+ }
129
+ /**
130
+ * Event data fired on Application when a window opens.
131
+ */
132
+ export interface WindowOpenEventData extends EventData {
133
+ /** The NativeWindow that was opened. */
134
+ window: NativeWindow;
135
+ }
136
+ /**
137
+ * Event data fired on Application when a window closes.
138
+ */
139
+ export interface WindowCloseEventData extends EventData {
140
+ /** The NativeWindow that was closed. */
141
+ window: NativeWindow;
142
+ }
143
+ /**
144
+ * Event data fired on Application when the primary window changes.
145
+ */
146
+ export interface PrimaryWindowChangedEventData extends EventData {
147
+ /** The NativeWindow that is now primary. */
148
+ window: NativeWindow;
149
+ }
150
+ /**
151
+ * Options for opening a new window.
152
+ */
153
+ export interface WindowOpenOptions {
154
+ /**
155
+ * Data to pass to the new window.
156
+ * On iOS: serialized into NSUserActivity.userInfo.
157
+ * On Android: added as intent extras.
158
+ */
159
+ data?: Record<string, any>;
160
+ }
161
+ /**
162
+ * Supplies the UI for a window that needs content. Called once per window that needs it.
163
+ *
164
+ * Return a `View`, a `NavigationEntry` or a module name to set the window content,
165
+ * `null` to take ownership and set the content asynchronously later, or `undefined`
166
+ * to fall back to the application main entry.
167
+ */
168
+ export type WindowContentResolver = (request: WindowContentRequest) => View | NavigationEntry | string | null | undefined;
169
+ /**
170
+ * Describes the window asking for content.
171
+ */
172
+ export interface WindowContentRequest {
173
+ /** The window that needs content. */
174
+ window: NativeWindow;
175
+ /** Whether the window is the application's primary window. */
176
+ isPrimary: boolean;
177
+ /** NSUserActivity.userInfo on iOS, intent extras on Android. */
178
+ data?: Record<string, any>;
179
+ ios?: {
180
+ connectionOptions?: UISceneConnectionOptions;
181
+ };
182
+ android?: {
183
+ intent?: android.content.Intent;
184
+ savedInstanceState?: android.os.Bundle;
185
+ };
186
+ }
@@ -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;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