@dark-engine/native-navigation
Advanced tools
Comparing version 0.25.1 to 1.0.0
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.TransitionName = exports.SLASH = exports.VERSION = void 0; | ||
exports.VERSION = '0.25.1'; | ||
exports.SLASH = '/'; | ||
exports.TransitionName = exports.SLASH_MARK = exports.VERSION = void 0; | ||
exports.VERSION = '1.0.0'; | ||
exports.SLASH_MARK = '/'; | ||
var TransitionName; | ||
@@ -10,3 +10,3 @@ (function (TransitionName) { | ||
TransitionName['fade'] = 'fade'; | ||
})((TransitionName = exports.TransitionName || (exports.TransitionName = {}))); | ||
})(TransitionName || (exports.TransitionName = TransitionName = {})); | ||
//# sourceMappingURL=constants.js.map |
@@ -21,3 +21,3 @@ 'use strict'; | ||
const handleBack = () => this.back(false); | ||
core_1.AndroidApplication.on(core_1.AndroidApplication.activityBackPressedEvent, handleBack); | ||
core_1.Application.android.on(core_1.Application.android.activityBackPressedEvent, handleBack); | ||
this.dispose = () => { | ||
@@ -27,3 +27,3 @@ this.subscribers.clear(); | ||
this.cursor = -1; | ||
core_1.AndroidApplication.off(core_1.AndroidApplication.activityBackPressedEvent, handleBack); | ||
core_1.Application.android.off(core_1.Application.android.activityBackPressedEvent, handleBack); | ||
}; | ||
@@ -115,5 +115,5 @@ } else { | ||
HistoryAction['BACK'] = 'BACK'; | ||
})((HistoryAction = exports.HistoryAction || (exports.HistoryAction = {}))); | ||
})(HistoryAction || (exports.HistoryAction = HistoryAction = {})); | ||
const createNavigationHistory = (root, frame, page) => new NavigationHistory(root, frame, page); | ||
exports.createNavigationHistory = createNavigationHistory; | ||
//# sourceMappingURL=history.js.map |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -29,3 +29,10 @@ 'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.NavigationContainer = exports.VERSION = exports.TransitionName = void 0; | ||
exports.VERSION = exports.TransitionName = exports.NavigationContainer = void 0; | ||
var navigation_container_1 = require('./navigation-container'); | ||
Object.defineProperty(exports, 'NavigationContainer', { | ||
enumerable: true, | ||
get: function () { | ||
return navigation_container_1.NavigationContainer; | ||
}, | ||
}); | ||
var constants_1 = require('./constants'); | ||
@@ -44,12 +51,5 @@ Object.defineProperty(exports, 'TransitionName', { | ||
}); | ||
var navigation_container_1 = require('./navigation-container'); | ||
Object.defineProperty(exports, 'NavigationContainer', { | ||
enumerable: true, | ||
get: function () { | ||
return navigation_container_1.NavigationContainer; | ||
}, | ||
}); | ||
__exportStar(require('./stack-navigator'), exports); | ||
__exportStar(require('./use-navigation'), exports); | ||
__exportStar(require('./tab-navigator'), exports); | ||
__exportStar(require('./use-navigation'), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const core_2 = require('@dark-engine/core'); | ||
const platform_native_1 = require('@dark-engine/platform-native'); | ||
const history_1 = require('../history'); | ||
@@ -12,7 +13,7 @@ const constants_1 = require('../constants'); | ||
(0, core_2.component)( | ||
({ slot, defaultPathname = constants_1.SLASH, renderActionBar, onNavigate }, ref) => { | ||
({ slot, defaultPathname = constants_1.SLASH_MARK, renderActionBar, onNavigate }, ref) => { | ||
const frameRef = (0, core_2.useRef)(null); | ||
const pageRef = (0, core_2.useRef)(null); | ||
const [pathname, setPathname] = (0, core_2.useState)((0, utils_1.normalizePathname)(defaultPathname)); | ||
const [transition, setTransition] = (0, core_2.useState)(null, { priority: core_2.TaskPriority.ANIMATION }); | ||
const [transition, setTransition] = (0, core_2.useState)(null); | ||
const scope = (0, core_2.useMemo)( | ||
@@ -94,6 +95,6 @@ () => ({ history: null, inTransition: false, transitions: { forward: [], backward: [] } }), | ||
(0, core_2.h)( | ||
'frame', | ||
platform_native_1.Frame, | ||
null, | ||
(0, core_2.h)( | ||
'page', | ||
platform_native_1.Page, | ||
{ actionBarHidden: !hasActionBar }, | ||
@@ -105,5 +106,5 @@ hasActionBar && renderActionBar({ pathname, goBack: back }), | ||
(0, core_2.h)( | ||
'frame', | ||
platform_native_1.Frame, | ||
{ ref: frameRef, hidden: true }, | ||
(0, core_2.h)('page', { ref: pageRef, actionBarHidden: true }), | ||
(0, core_2.h)(platform_native_1.Page, { ref: pageRef, actionBarHidden: true }), | ||
), | ||
@@ -110,0 +111,0 @@ ); |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const core_2 = require('@dark-engine/core'); | ||
const platform_native_1 = require('@dark-engine/platform-native'); | ||
const constants_1 = require('../constants'); | ||
@@ -58,3 +59,3 @@ const utils_1 = require('../utils'); | ||
return (0, core_2.h)( | ||
'absolute-layout', | ||
platform_native_1.AbsoluteLayout, | ||
{ ref: rootRef, width: FULL, height: FULL }, | ||
@@ -69,3 +70,3 @@ slot.map(x => { | ||
return (0, core_2.h)( | ||
'stack-layout', | ||
platform_native_1.StackLayout, | ||
{ ref: setRef, key: key, width: FULL, height: FULL, hidden: isHidden }, | ||
@@ -102,3 +103,3 @@ x, | ||
const ScreenNavigatorContext = (0, core_2.createContext)({ | ||
prefix: constants_1.SLASH, | ||
prefix: constants_1.SLASH_MARK, | ||
parentPrefix: '', | ||
@@ -105,0 +106,0 @@ initialParams: {}, |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const core_2 = require('@dark-engine/core'); | ||
const platform_native_1 = require('@dark-engine/platform-native'); | ||
const stack_navigator_1 = require('../stack-navigator'); | ||
@@ -26,22 +27,22 @@ const navigation_container_1 = require('../navigation-container'); | ||
tabColor = '#fff', | ||
animated = false, | ||
} = bottomNavigationOptions || {}; | ||
const contextValue = (0, core_2.useMemo)( | ||
() => ({ descriptorsMap: {}, count: slot.length, activeTabColor, tabColor }), | ||
() => ({ descriptorsMap: {}, count: slot.length, activeTabColor, tabColor, animated }), | ||
[], | ||
); | ||
const { descriptorsMap } = contextValue; | ||
const descriptorKeys = Object.keys(descriptorsMap); | ||
(0, core_2.useLayoutEffect)(() => update(), []); | ||
const handleLayoutChange = (0, core_2.useEvent)(() => { | ||
const bottomNavigation = bottomRef.current; | ||
const nav = bottomRef.current; | ||
const size = layoutRef.current.getActualSize(); | ||
setTimeout(() => { | ||
bottomNavigation.top = size.height - height - (shift + compensate); | ||
bottomNavigation.left = shift; | ||
bottomNavigation.width = size.width - 2 * shift; | ||
bottomNavigation.height = height; | ||
bottomNavigation.borderRadius = borderRadius; | ||
requestAnimationFrame(() => { | ||
nav.top = size.height - height - (shift + compensate); | ||
nav.left = shift; | ||
nav.width = size.width - 2 * shift; | ||
nav.height = height; | ||
nav.borderRadius = borderRadius; | ||
}); | ||
}); | ||
const handleTap = (0, core_2.useEvent)(() => {}); | ||
const descriptorKeys = Object.keys(descriptorsMap); | ||
return (0, core_2.h)( | ||
@@ -51,6 +52,6 @@ TabNavigatorContext.Provider, | ||
(0, core_2.h)( | ||
'absolute-layout', | ||
platform_native_1.AbsoluteLayout, | ||
{ ref: layoutRef, onLayoutChanged: handleLayoutChange }, | ||
(0, core_2.h)( | ||
'stack-layout', | ||
platform_native_1.StackLayout, | ||
{ width: '100%', height: '100%' }, | ||
@@ -72,3 +73,3 @@ descriptorKeys.length > 0 && | ||
(0, core_2.h)( | ||
'flexbox-layout', | ||
platform_native_1.FlexboxLayout, | ||
{ | ||
@@ -82,3 +83,2 @@ ref: bottomRef, | ||
paddingRight: padding, | ||
onTap: handleTap, | ||
}, | ||
@@ -95,3 +95,3 @@ slot, | ||
const { push, pathname: currentPathname } = (0, navigation_container_1.useNavigationContext)(); | ||
const { descriptorsMap, count, activeTabColor, tabColor } = useTabNavigatorContext(); | ||
const { descriptorsMap, count, activeTabColor, tabColor, animated } = useTabNavigatorContext(); | ||
const { prefix } = (0, stack_navigator_1.useScreenNavigatorContext)(); | ||
@@ -101,9 +101,9 @@ const pathname = (0, utils_1.createPathname)(name, prefix); | ||
const width = 100 / count; | ||
const handleTap = (0, core_2.useEvent)(() => push(pathname, { animated: true })); | ||
const handleTap = (0, core_2.useEvent)(() => push(pathname, { animated })); | ||
descriptorsMap[name] = { name, component, slot }; | ||
return (0, core_2.h)( | ||
'stack-layout', | ||
platform_native_1.StackLayout, | ||
{ accessibilityRole: core_1.AccessibilityRole.Button, width: `${width}%`, onTap: handleTap }, | ||
(0, core_2.h)( | ||
'flexbox-layout', | ||
platform_native_1.FlexboxLayout, | ||
{ | ||
@@ -110,0 +110,0 @@ flexDirection: 'column', |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
const normal = prependSlash( | ||
pathname.split(constants_1.SLASH).filter(Boolean).join(constants_1.SLASH) + constants_1.SLASH, | ||
pathname.split(constants_1.SLASH_MARK).filter(Boolean).join(constants_1.SLASH_MARK) + constants_1.SLASH_MARK, | ||
); | ||
@@ -24,7 +24,7 @@ return normal; | ||
function prependSlash(pathname) { | ||
return pathname.startsWith(constants_1.SLASH) ? pathname : constants_1.SLASH + pathname; | ||
return pathname.startsWith(constants_1.SLASH_MARK) ? pathname : constants_1.SLASH_MARK + pathname; | ||
} | ||
exports.prependSlash = prependSlash; | ||
function getSegments(pathname, prefix) { | ||
const segments = pathname.replace(prefix, '').split(constants_1.SLASH).filter(Boolean); | ||
const segments = pathname.replace(prefix, '').split(constants_1.SLASH_MARK).filter(Boolean); | ||
return segments; | ||
@@ -31,0 +31,0 @@ } |
@@ -1,3 +0,3 @@ | ||
export const VERSION = '0.25.1'; | ||
export const SLASH = '/'; | ||
export const VERSION = '1.0.0'; | ||
export const SLASH_MARK = '/'; | ||
export var TransitionName; | ||
@@ -4,0 +4,0 @@ (function (TransitionName) { |
@@ -1,2 +0,2 @@ | ||
import { isAndroid, AndroidApplication } from '@nativescript/core'; | ||
import { isAndroid, Application } from '@nativescript/core'; | ||
import { normalizePathname } from '../utils'; | ||
@@ -18,3 +18,3 @@ class NavigationHistory { | ||
const handleBack = () => this.back(false); | ||
AndroidApplication.on(AndroidApplication.activityBackPressedEvent, handleBack); | ||
Application.android.on(Application.android.activityBackPressedEvent, handleBack); | ||
this.dispose = () => { | ||
@@ -24,3 +24,3 @@ this.subscribers.clear(); | ||
this.cursor = -1; | ||
AndroidApplication.off(AndroidApplication.activityBackPressedEvent, handleBack); | ||
Application.android.off(Application.android.activityBackPressedEvent, handleBack); | ||
}; | ||
@@ -27,0 +27,0 @@ } else { |
export * from './history'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,6 +1,6 @@ | ||
export { NavigationContainer } from './navigation-container'; | ||
export { TransitionName, VERSION } from './constants'; | ||
export { NavigationContainer } from './navigation-container'; | ||
export * from './stack-navigator'; | ||
export * from './use-navigation'; | ||
export * from './tab-navigator'; | ||
export * from './use-navigation'; | ||
//# sourceMappingURL=index.js.map |
export * from './navigation-container'; | ||
//# sourceMappingURL=index.js.map |
@@ -16,14 +16,14 @@ import { CoreTypes } from '@nativescript/core'; | ||
detectIsFunction, | ||
TaskPriority, | ||
} from '@dark-engine/core'; | ||
import { Frame, Page } from '@dark-engine/platform-native'; | ||
import { createNavigationHistory, HistoryAction } from '../history'; | ||
import { SLASH, TransitionName } from '../constants'; | ||
import { SLASH_MARK, TransitionName } from '../constants'; | ||
import { normalizePathname } from '../utils'; | ||
const NavigationContainer = forwardRef( | ||
component( | ||
({ slot, defaultPathname = SLASH, renderActionBar, onNavigate }, ref) => { | ||
({ slot, defaultPathname = SLASH_MARK, renderActionBar, onNavigate }, ref) => { | ||
const frameRef = useRef(null); | ||
const pageRef = useRef(null); | ||
const [pathname, setPathname] = useState(normalizePathname(defaultPathname)); | ||
const [transition, setTransition] = useState(null, { priority: TaskPriority.ANIMATION }); | ||
const [transition, setTransition] = useState(null); | ||
const scope = useMemo( | ||
@@ -105,6 +105,6 @@ () => ({ history: null, inTransition: false, transitions: { forward: [], backward: [] } }), | ||
h( | ||
'frame', | ||
Frame, | ||
null, | ||
h( | ||
'page', | ||
Page, | ||
{ actionBarHidden: !hasActionBar }, | ||
@@ -115,3 +115,3 @@ hasActionBar && renderActionBar({ pathname, goBack: back }), | ||
), | ||
h('frame', { ref: frameRef, hidden: true }, h('page', { ref: pageRef, actionBarHidden: true })), | ||
h(Frame, { ref: frameRef, hidden: true }, h(Page, { ref: pageRef, actionBarHidden: true })), | ||
); | ||
@@ -118,0 +118,0 @@ }, |
export * from './stack-navigator'; | ||
//# sourceMappingURL=index.js.map |
@@ -16,3 +16,4 @@ import { Animation, CoreTypes } from '@nativescript/core'; | ||
} from '@dark-engine/core'; | ||
import { SLASH, TransitionName } from '../constants'; | ||
import { AbsoluteLayout, StackLayout } from '@dark-engine/platform-native'; | ||
import { SLASH_MARK, TransitionName } from '../constants'; | ||
import { createPathname, getSegments, detectIsVisited } from '../utils'; | ||
@@ -65,3 +66,3 @@ import { useNavigationContext } from '../navigation-container'; | ||
return h( | ||
'absolute-layout', | ||
AbsoluteLayout, | ||
{ ref: rootRef, width: FULL, height: FULL }, | ||
@@ -75,3 +76,3 @@ slot.map(x => { | ||
}; | ||
return h('stack-layout', { ref: setRef, key: key, width: FULL, height: FULL, hidden: isHidden }, x); | ||
return h(StackLayout, { ref: setRef, key: key, width: FULL, height: FULL, hidden: isHidden }, x); | ||
}), | ||
@@ -104,3 +105,3 @@ ); | ||
const ScreenNavigatorContext = createContext({ | ||
prefix: SLASH, | ||
prefix: SLASH_MARK, | ||
parentPrefix: '', | ||
@@ -107,0 +108,0 @@ initialParams: {}, |
export * from './tab-navigator'; | ||
//# sourceMappingURL=index.js.map |
@@ -14,2 +14,3 @@ import { AccessibilityRole } from '@nativescript/core'; | ||
} from '@dark-engine/core'; | ||
import { AbsoluteLayout, StackLayout, FlexboxLayout } from '@dark-engine/platform-native'; | ||
import { StackNavigator, useScreenNavigatorContext } from '../stack-navigator'; | ||
@@ -34,19 +35,22 @@ import { useNavigationContext } from '../navigation-container'; | ||
tabColor = '#fff', | ||
animated = false, | ||
} = bottomNavigationOptions || {}; | ||
const contextValue = useMemo(() => ({ descriptorsMap: {}, count: slot.length, activeTabColor, tabColor }), []); | ||
const contextValue = useMemo( | ||
() => ({ descriptorsMap: {}, count: slot.length, activeTabColor, tabColor, animated }), | ||
[], | ||
); | ||
const { descriptorsMap } = contextValue; | ||
const descriptorKeys = Object.keys(descriptorsMap); | ||
useLayoutEffect(() => update(), []); | ||
const handleLayoutChange = useEvent(() => { | ||
const bottomNavigation = bottomRef.current; | ||
const nav = bottomRef.current; | ||
const size = layoutRef.current.getActualSize(); | ||
setTimeout(() => { | ||
bottomNavigation.top = size.height - height - (shift + compensate); | ||
bottomNavigation.left = shift; | ||
bottomNavigation.width = size.width - 2 * shift; | ||
bottomNavigation.height = height; | ||
bottomNavigation.borderRadius = borderRadius; | ||
requestAnimationFrame(() => { | ||
nav.top = size.height - height - (shift + compensate); | ||
nav.left = shift; | ||
nav.width = size.width - 2 * shift; | ||
nav.height = height; | ||
nav.borderRadius = borderRadius; | ||
}); | ||
}); | ||
const handleTap = useEvent(() => {}); | ||
const descriptorKeys = Object.keys(descriptorsMap); | ||
return h( | ||
@@ -56,6 +60,6 @@ TabNavigatorContext.Provider, | ||
h( | ||
'absolute-layout', | ||
AbsoluteLayout, | ||
{ ref: layoutRef, onLayoutChanged: handleLayoutChange }, | ||
h( | ||
'stack-layout', | ||
StackLayout, | ||
{ width: '100%', height: '100%' }, | ||
@@ -73,3 +77,3 @@ descriptorKeys.length > 0 && | ||
h( | ||
'flexbox-layout', | ||
FlexboxLayout, | ||
{ | ||
@@ -83,3 +87,2 @@ ref: bottomRef, | ||
paddingRight: padding, | ||
onTap: handleTap, | ||
}, | ||
@@ -96,3 +99,3 @@ slot, | ||
const { push, pathname: currentPathname } = useNavigationContext(); | ||
const { descriptorsMap, count, activeTabColor, tabColor } = useTabNavigatorContext(); | ||
const { descriptorsMap, count, activeTabColor, tabColor, animated } = useTabNavigatorContext(); | ||
const { prefix } = useScreenNavigatorContext(); | ||
@@ -102,9 +105,9 @@ const pathname = createPathname(name, prefix); | ||
const width = 100 / count; | ||
const handleTap = useEvent(() => push(pathname, { animated: true })); | ||
const handleTap = useEvent(() => push(pathname, { animated })); | ||
descriptorsMap[name] = { name, component, slot }; | ||
return h( | ||
'stack-layout', | ||
StackLayout, | ||
{ accessibilityRole: AccessibilityRole.Button, width: `${width}%`, onTap: handleTap }, | ||
h( | ||
'flexbox-layout', | ||
FlexboxLayout, | ||
{ | ||
@@ -111,0 +114,0 @@ flexDirection: 'column', |
export * from './use-navigation'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,0 +0,0 @@ import { useMemo } from '@dark-engine/core'; |
export * from './utils'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { SLASH } from '../constants'; | ||
import { SLASH_MARK } from '../constants'; | ||
const createPathname = (name, prefix) => { | ||
@@ -6,10 +6,10 @@ return normalizePathname(`${prefix}${name}`); | ||
function normalizePathname(pathname) { | ||
const normal = prependSlash(pathname.split(SLASH).filter(Boolean).join(SLASH) + SLASH); | ||
const normal = prependSlash(pathname.split(SLASH_MARK).filter(Boolean).join(SLASH_MARK) + SLASH_MARK); | ||
return normal; | ||
} | ||
function prependSlash(pathname) { | ||
return pathname.startsWith(SLASH) ? pathname : SLASH + pathname; | ||
return pathname.startsWith(SLASH_MARK) ? pathname : SLASH_MARK + pathname; | ||
} | ||
function getSegments(pathname, prefix) { | ||
const segments = pathname.replace(prefix, '').split(SLASH).filter(Boolean); | ||
const segments = pathname.replace(prefix, '').split(SLASH_MARK).filter(Boolean); | ||
return segments; | ||
@@ -16,0 +16,0 @@ } |
@@ -1,3 +0,3 @@ | ||
export declare const VERSION = '0.25.1'; | ||
export declare const SLASH = '/'; | ||
export declare const VERSION = '1.0.0'; | ||
export declare const SLASH_MARK = '/'; | ||
export declare enum TransitionName { | ||
@@ -4,0 +4,0 @@ slide = 'slide', |
@@ -1,2 +0,2 @@ | ||
import { Frame, Page } from '@nativescript/core'; | ||
import { type Frame, type Page } from '@nativescript/core'; | ||
import { type NavigationOptions } from '../navigation-container'; | ||
@@ -3,0 +3,0 @@ declare class NavigationHistory { |
export * from './history'; |
@@ -0,5 +1,5 @@ | ||
export { type NavigationOptions, type RenderActionBarOptions, NavigationContainer } from './navigation-container'; | ||
export { TransitionName, VERSION } from './constants'; | ||
export { type NavigationOptions, type RenderActionBarOptions, NavigationContainer } from './navigation-container'; | ||
export * from './stack-navigator'; | ||
export * from './use-navigation'; | ||
export * from './tab-navigator'; | ||
export * from './use-navigation'; |
export * from './navigation-container'; |
@@ -19,3 +19,6 @@ import { type DarkElement } from '@dark-engine/core'; | ||
declare const NavigationContainer: import('@dark-engine/core').ComponentFactory< | ||
NavigationContainerProps & import('@dark-engine/core').RefProps<NavigationContainerRef>, | ||
NavigationContainerProps & | ||
import('@dark-engine/core').RefProps<NavigationContainerRef> & | ||
import('@dark-engine/core').KeyProps & | ||
Partial<Record<'__skipScanOpt' | '__memoSlotOpt' | '__staticSlotOpt', boolean>>, | ||
NavigationContainerRef | ||
@@ -22,0 +25,0 @@ >; |
export * from './stack-navigator'; |
@@ -21,3 +21,7 @@ import { | ||
Root: ComponentFactory< | ||
StackNavigatorProps & import('@dark-engine/core').RefProps<StackNavigatorRef> & Omit<StandardComponentProps, 'ref'>, | ||
StackNavigatorProps & | ||
import('@dark-engine/core').RefProps<StackNavigatorRef> & | ||
import('@dark-engine/core').KeyProps & | ||
Partial<Record<'__skipScanOpt' | '__memoSlotOpt' | '__staticSlotOpt', boolean>> & | ||
Omit<StandardComponentProps, 'ref'>, | ||
StackNavigatorRef | ||
@@ -28,4 +32,4 @@ >; | ||
import('@dark-engine/core').KeyProps & | ||
import('@dark-engine/core').RefProps<unknown> & | ||
import('@dark-engine/core').FlagProps, | ||
import('@dark-engine/core').RefProps & | ||
Partial<Record<'__skipScanOpt' | '__memoSlotOpt' | '__staticSlotOpt', boolean>>, | ||
unknown | ||
@@ -32,0 +36,0 @@ >; |
export * from './tab-navigator'; |
@@ -20,2 +20,3 @@ import { type DarkElement, type Component, type StandardComponentProps } from '@dark-engine/core'; | ||
tabColor: string; | ||
animated: boolean; | ||
}; | ||
@@ -26,5 +27,6 @@ declare const TabNavigator: { | ||
import('@dark-engine/core').KeyProps & | ||
import('@dark-engine/core').RefProps<unknown> & | ||
import('@dark-engine/core').FlagProps & | ||
Omit<StandardComponentProps, 'ref'>, | ||
import('@dark-engine/core').RefProps & | ||
Partial<Record<'__skipScanOpt' | '__memoSlotOpt' | '__staticSlotOpt', boolean>> & | ||
Omit<StandardComponentProps, 'ref'> & | ||
import('@dark-engine/core').RefProps<unknown>, | ||
unknown | ||
@@ -37,4 +39,4 @@ >; | ||
import('@dark-engine/core').KeyProps & | ||
import('@dark-engine/core').RefProps<unknown> & | ||
import('@dark-engine/core').FlagProps, | ||
import('@dark-engine/core').RefProps & | ||
Partial<Record<'__skipScanOpt' | '__memoSlotOpt' | '__staticSlotOpt', boolean>>, | ||
unknown | ||
@@ -41,0 +43,0 @@ >; |
export * from './use-navigation'; |
@@ -0,0 +0,0 @@ import { type ParamsMap } from '../history'; |
export * from './utils'; |
@@ -0,0 +0,0 @@ declare const createPathname: (name: string, prefix: string) => string; |
{ | ||
"name": "@dark-engine/native-navigation", | ||
"version": "0.25.1", | ||
"version": "1.0.0", | ||
"description": "Dark navigation for NativeScript platform", | ||
@@ -25,7 +25,9 @@ "author": "AlexPlex", | ||
"dark", | ||
"rendering", | ||
"app", | ||
"react", | ||
"reactjs", | ||
"angular", | ||
"rendering", | ||
"app", | ||
"vue", | ||
"nativescript", | ||
"android", | ||
@@ -36,6 +38,3 @@ "ios", | ||
"devDependencies": { | ||
"@nativescript/core": "~8.4.5", | ||
"shelljs": "^0.8.5", | ||
"ts-loader": "9.4.2", | ||
"typescript": "4.9.4" | ||
"@nativescript/core": "8.6.2" | ||
}, | ||
@@ -42,0 +41,0 @@ "peerDependencies": { |
# @dark-engine/native-navigation 🌖 | ||
Dark navigation for NativeScript platform. | ||
Dark router for `NativeScript` platform. | ||
[More about Dark](https://github.com/atellmer/dark) | ||
<br> | ||
[More about NativeScript](https://nativescript.org/) | ||
## Features | ||
- 📚 Stack navigation | ||
- 📂 Tab navigation | ||
- 🪟 Modal navigation | ||
- 🌳 Nested screens | ||
- 🔢 Parameters | ||
- 💃 Animated transitions | ||
- 📈 Hooks | ||
- 🚫 No deps | ||
## Installation | ||
@@ -28,2 +36,3 @@ npm: | ||
useNavigation, | ||
VERSION, | ||
} from '@dark-engine/native-navigation'; | ||
@@ -30,0 +39,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
278513
1
213
4473
1
184