Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cactuslab/native-navigation-react

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cactuslab/native-navigation-react - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

10

dist/esm/context.d.ts

@@ -14,4 +14,7 @@ import type { AllComponentOptions, ClickEventData, ComponentId, DismissOptions, DismissResult, NativeNavigationPlugin } from '@cactuslab/native-navigation';

interface CapacitorNativeNavigationContext {
componentId: string;
/**
* The component id. Will be undefined if not in a native context.
*/
componentId?: string;
/**
* The id of the stack containing this component, if any.

@@ -39,5 +42,4 @@ */

}
export declare const Context: React.Context<CapacitorNativeNavigationContext | undefined>;
export declare function useNativeNavigationContext(): CapacitorNativeNavigationContext | undefined;
export declare function useNativeNavigationContext(defaultValue: Partial<CapacitorNativeNavigationContext>): Partial<CapacitorNativeNavigationContext>;
export declare const Context: React.Context<CapacitorNativeNavigationContext>;
export declare function useNativeNavigationContext(): CapacitorNativeNavigationContext;
export {};

27

dist/esm/context.js

@@ -37,15 +37,20 @@ import React, { useContext } from 'react';

}
export const Context = React.createContext(undefined);
export function useNativeNavigationContext(defaultValue) {
const context = useContext(Context);
if (context) {
return context;
const DEFAULT_CONTEXT = {
viewWindow: window,
setOptions: async function () {
return;
},
dismiss: async function () {
throw new Error('Not in a native context');
},
addClickListener: function () {
return function () {
/* noop */
};
}
else if (defaultValue) {
return defaultValue;
}
else {
return undefined;
}
};
export const Context = React.createContext(DEFAULT_CONTEXT);
export function useNativeNavigationContext() {
return useContext(Context);
}
//# sourceMappingURL=context.js.map

@@ -49,14 +49,19 @@ 'use strict';

}
const Context = React__default["default"].createContext(undefined);
function useNativeNavigationContext(defaultValue) {
const context = React.useContext(Context);
if (context) {
return context;
const DEFAULT_CONTEXT = {
viewWindow: window,
setOptions: async function () {
return;
},
dismiss: async function () {
throw new Error('Not in a native context');
},
addClickListener: function () {
return function () {
/* noop */
};
}
else if (defaultValue) {
return defaultValue;
}
else {
return undefined;
}
};
const Context = React__default["default"].createContext(DEFAULT_CONTEXT);
function useNativeNavigationContext() {
return React.useContext(Context);
}

@@ -63,0 +68,0 @@

@@ -44,14 +44,19 @@ var CapacitorNativeNavigationReact = (function (exports, nativeNavigation, React, ReactDOM) {

}
const Context = React__default["default"].createContext(undefined);
function useNativeNavigationContext(defaultValue) {
const context = React.useContext(Context);
if (context) {
return context;
const DEFAULT_CONTEXT = {
viewWindow: window,
setOptions: async function () {
return;
},
dismiss: async function () {
throw new Error('Not in a native context');
},
addClickListener: function () {
return function () {
/* noop */
};
}
else if (defaultValue) {
return defaultValue;
}
else {
return undefined;
}
};
const Context = React__default["default"].createContext(DEFAULT_CONTEXT);
function useNativeNavigationContext() {
return React.useContext(Context);
}

@@ -58,0 +63,0 @@

{
"name": "@cactuslab/native-navigation-react",
"version": "0.0.4",
"version": "0.0.5",
"description": "React support for Native navigation for Capacitor apps",

@@ -30,3 +30,3 @@ "main": "dist/plugin.cjs.js",

"devDependencies": {
"@cactuslab/native-navigation": "^0.0.3",
"@cactuslab/native-navigation": "^0.0.4",
"@capacitor/core": "^4.0.0",

@@ -44,3 +44,3 @@ "@ionic/eslint-config": "^0.3.0",

"peerDependencies": {
"@cactuslab/native-navigation": "^0.0.3",
"@cactuslab/native-navigation": "^0.0.4",
"@capacitor/core": "^4.0.0",

@@ -47,0 +47,0 @@ "react": "^18.2.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc