mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -12,7 +12,7 @@ import * as subtleCryptoImpl from '../wgc/crypto/SubtleCrypto';
|
||||
|
||||
console.log('here in globals/index!');
|
||||
console.log(`typeof __dirname:`, typeof __dirname);
|
||||
// commonjs builds will have __dirname defined, but es6 modules will not
|
||||
// commonjs builds will have __dirname defined, but esm builds will not
|
||||
global.__dirname = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname;
|
||||
console.log('global.__dirname', global.__dirname);
|
||||
|
||||
@@ -196,16 +196,7 @@ global.System = {
|
||||
import(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (__COMMONJS__ && global.require) {
|
||||
resolve(global.require(path));
|
||||
} else {
|
||||
// Use dynamic import for ESM
|
||||
import(path)
|
||||
.then((module) => {
|
||||
resolve(module.default || module);
|
||||
})
|
||||
.catch(reject);
|
||||
}
|
||||
resolve(global.require(path));
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { SharedTransition } from '../transition/shared-transition';
|
||||
import { NavigationData } from '.';
|
||||
|
||||
export { NavigationType } from './frame-interfaces';
|
||||
export type { AndroidActivityCallbacks, AndroidFragmentCallbacks, AndroidFrame, BackstackEntry, NavigationContext, NavigationEntry, NavigationTransition, TransitionState, ViewEntry, iOSFrame } from './frame-interfaces';
|
||||
export type { AndroidActivityCallbacks, AndroidFragmentCallbacks, AndroidFrame, BackstackEntry, NavigationContext, NavigationEntry, NavigationTransition, TransitionState, ViewEntry, iOSFrame, NavigationData } from './frame-interfaces';
|
||||
|
||||
function buildEntryFromArgs(arg: any): NavigationEntry {
|
||||
let entry: NavigationEntry;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { View } from '../core/view';
|
||||
import type { Page } from '../page';
|
||||
import type { Transition } from '../transition';
|
||||
import type { Observable } from '../../data/observable';
|
||||
import type { Observable, EventData } from '../../data/observable';
|
||||
|
||||
export enum NavigationType {
|
||||
back,
|
||||
@@ -50,15 +50,45 @@ export interface NavigationTransition {
|
||||
curve?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an entry in the back stack of a Frame object.
|
||||
*/
|
||||
export interface BackstackEntry {
|
||||
entry: NavigationEntry;
|
||||
resolvedPage: Page;
|
||||
|
||||
//@private
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
navDepth: number;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
fragmentTag: string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
fragment?: any;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
viewSavedState?: any;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
frameId?: number;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
recreated?: boolean;
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
export interface NavigationData extends EventData {
|
||||
entry?: BackstackEntry;
|
||||
fromEntry?: BackstackEntry;
|
||||
isBack?: boolean;
|
||||
}
|
||||
|
||||
export interface AndroidFrame extends Observable {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { AndroidActivityCallbacks, AndroidFrame as AndroidFrameDefinition, BackstackEntry, NavigationTransition, AndroidFragmentCallbacks } from '.';
|
||||
import type { AndroidActivityCallbacks, AndroidFrame as AndroidFrameDefinition, NavigationTransition, AndroidFragmentCallbacks } from '.';
|
||||
import type { BackstackEntry } from './frame-interfaces';
|
||||
import type { Page } from '../page';
|
||||
import { TransitionState } from './frame-common';
|
||||
import { Observable } from '../../data/observable';
|
||||
|
||||
42
packages/core/ui/frame/index.d.ts
vendored
42
packages/core/ui/frame/index.d.ts
vendored
@@ -3,15 +3,10 @@ import type { NavigatedData, Page } from '../page';
|
||||
import type { Observable, EventData } from '../../data/observable';
|
||||
import type { Property, View } from '../core/view';
|
||||
import type { Transition } from '../transition';
|
||||
import type { BackstackEntry } from './frame-interfaces';
|
||||
|
||||
export * from './frame-interfaces';
|
||||
|
||||
export interface NavigationData extends EventData {
|
||||
entry?: BackstackEntry;
|
||||
fromEntry?: BackstackEntry;
|
||||
isBack?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the logical View unit that is responsible for navigation within an application.
|
||||
* Nested frames are supported, enabling hierarchical navigation scenarios.
|
||||
@@ -455,41 +450,6 @@ export interface NavigationTransition {
|
||||
curve?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an entry in the back stack of a Frame object.
|
||||
*/
|
||||
export interface BackstackEntry {
|
||||
entry: NavigationEntry;
|
||||
resolvedPage: Page;
|
||||
|
||||
//@private
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
navDepth: number;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
fragmentTag: string;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
fragment?: any;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
viewSavedState?: any;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
frameId?: number;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
recreated?: boolean;
|
||||
//@endprivate
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the Android-specific Frame object, aggregated within the common Frame one.
|
||||
* In Android there are two types of navigation - using new Activity instances or using Fragments within the main Activity.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//Types
|
||||
import { iOSFrame as iOSFrameDefinition, BackstackEntry, NavigationTransition } from '.';
|
||||
import { iOSFrame as iOSFrameDefinition, NavigationTransition } from '.';
|
||||
import { FrameBase, NavigationType } from './frame-common';
|
||||
import type { BackstackEntry } from './frame-interfaces';
|
||||
import type { Page } from '../page';
|
||||
import { View } from '../core/view';
|
||||
import { IOSHelper } from '../core/view/view-helper';
|
||||
|
||||
Reference in New Issue
Block a user