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

@stackflow/react

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackflow/react - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

2

dist/index.js

@@ -1,2 +0,2 @@

"use strict";var bt=Object.create;var b=Object.defineProperty,Bt=Object.defineProperties,Nt=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertyNames,X=Object.getOwnPropertySymbols,Ut=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable;var Y=(t,e,o)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))Z.call(e,o)&&Y(t,o,e[o]);if(X)for(var o of X(e))Ht.call(e,o)&&Y(t,o,e[o]);return t},k=(t,e)=>Bt(t,Mt(e));var Vt=(t,e)=>{for(var o in e)b(t,o,{get:e[o],enumerable:!0})},tt=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ft(e))!Z.call(t,s)&&s!==o&&b(t,s,{get:()=>e[s],enumerable:!(n=Nt(e,s))||n.enumerable});return t};var d=(t,e,o)=>(o=t!=null?bt(Ut(t)):{},tt(e||!t||!t.__esModule?b(o,"default",{value:t,enumerable:!0}):o,t)),qt=t=>tt(b({},"__esModule",{value:!0}),t);var Xt={};Vt(Xt,{stackflow:()=>Qt,useActions:()=>J,useActivity:()=>Kt,useActivityParams:()=>_t,useInitContext:()=>B,useStack:()=>Gt});module.exports=qt(Xt);var ot=require("react");var et=require("react"),T=(0,et.createContext)(null);var Kt=()=>(0,ot.useContext)(T);var rt=require("react");function _t(){return(0,rt.useContext)(T).params}var nt=d(require("react"));var it=require("react"),M=(0,it.createContext)({});function B(){return nt.default.useContext(M)}var st=require("react");var at=require("react"),F=(0,at.createContext)(null);var Gt=()=>(0,st.useContext)(F);var E=d(require("react"));var A=require("@stackflow/core"),v=d(require("react")),Ct=d(require("react-fast-compare"));var pt=d(require("react"));var U=require("react"),ct=d(require("react-fast-compare"));function H(t){let e=(0,U.useRef)(t),o=e.current,n=(0,ct.default)(o,t);return(0,U.useEffect)(()=>{n||(e.current=t)}),n?o:t}var mt=({children:t,value:e})=>pt.default.createElement(T.Provider,{value:H(e)},t);var ft=require("@stackflow/core");function D(){return(0,ft.id)()}var ut=d(require("react"));var vt=({children:t,value:e})=>ut.default.createElement(M.Provider,{value:e},t);var lt=require("react"),V=(0,lt.createContext)(null);var dt=d(require("react"));var Pt=({children:t,value:e})=>dt.default.createElement(V.Provider,{value:e},t);var xt=require("react");function C(){return(0,xt.useContext)(V)}var yt=require("react"),q=(0,yt.createContext)(null);var kt=require("react"),K=(0,kt.createContext)(null);var Lt=1e3,Wt=Lt/60,At=({transitionDuration:t,initialActivity:e,activities:o,children:n})=>{let s=C(),p=B(),r=(0,v.useMemo)(()=>{let y=new Date().getTime()-t,f=e?(0,A.makeEvent)("Pushed",{activityId:D(),activityName:e({initContext:p}),params:{},eventDate:y,skipEnterActiveState:!1}):null,x=s.reduce((N,W)=>{var z,Q;return(Q=(z=W.overrideInitialPushedEvent)==null?void 0:z.call(W,{pushedEvent:N}))!=null?Q:N},f);!!x&&!!f&&x.id!==f.id&&console.warn(`Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${f.activityName}" in the "stackflow" is ignored.`);let R=x;R||console.warn("Stackflow - There is no initial activity. If you want to set the initial activity, add the `initialActivity` option of the `stackflow()` function or add a plugin that sets the initial activity. (e.g. `@stackflow/plugin-history-sync`)");let Ot=Object.keys(o).map(N=>(0,A.makeEvent)("ActivityRegistered",{activityName:N,eventDate:y})),$=[(0,A.makeEvent)("Initialized",{transitionDuration:t,eventDate:y}),...Ot];return R&&$.push(R),$},[]),c=(0,v.useMemo)(()=>(0,A.aggregate)(r,new Date().getTime()),[]),[a,i]=(0,v.useState)(()=>c),u=(0,v.useRef)(r),l=(0,v.useRef)(c),P=(0,v.useCallback)(()=>l.current,[l]),w=(0,v.useCallback)((y,f)=>{let x=(0,A.makeEvent)(y,f),h=[...u.current,x];u.current=h,i((0,A.aggregate)(h,new Date().getTime()))},[u,i]);return(0,v.useEffect)(()=>{let y=setInterval(()=>{let f=u.current,x=(0,A.aggregate)(f,new Date().getTime());(0,Ct.default)(a,x)||(i(x),l.current=x),x.globalTransitionState==="idle"&&clearInterval(y)},Wt);return()=>{clearInterval(y)}},[u,a,i]),v.default.createElement(K.Provider,{value:a},v.default.createElement(q.Provider,{value:(0,v.useMemo)(()=>({getStack:P,dispatchEvent:w}),[P,w])},n))};var S=d(require("react"));var St=t=>JSON.parse(JSON.stringify(t)),_=()=>{let t=C(),e=B(),{dispatchEvent:o,getStack:n}=S.default.useContext(q),s=(0,S.useCallback)(i=>{let{isPrevented:u,params:l}=a("PUSHED",i);u||o("Pushed",m({},l))},[o]),p=(0,S.useCallback)(i=>{let{isPrevented:u,params:l}=a("REPLACED",i);u||o("Replaced",m({},l))},[o]),r=(0,S.useCallback)(i=>{let u=i!=null?i:{},{isPrevented:l,params:P}=a("POPPED",u);l||o("Popped",m({},P))},[o]),c=(0,S.useMemo)(()=>({dispatchEvent:o,getStack:n,push:s,replace:p,pop:r}),[o,n,s,p,r]),a=(0,S.useCallback)((i,u)=>{let l=!1,P=St(u),w=()=>{l=!0},y=f=>{P=St(f)};return t.forEach(f=>{var x,h,R;switch(i){case"PUSHED":(x=f.onBeforePush)==null||x.call(f,{actionParams:P,actions:k(m({},c),{preventDefault:w,overrideActionParams:y})});break;case"REPLACED":(h=f.onBeforeReplace)==null||h.call(f,{actionParams:P,actions:k(m({},c),{preventDefault:w,overrideActionParams:y})});break;case"POPPED":(R=f.onBeforePop)==null||R.call(f,{actionParams:P,actions:k(m({},c),{preventDefault:w,overrideActionParams:y})});break;default:break}}),{isPrevented:l,params:P}},[t,e]);return c};var Et=d(require("react"));var I=()=>Et.default.useContext(K);var gt=require("@stackflow/core"),g=require("react");var jt=()=>{let t=C(),e=I(),o=_(),n=(0,g.useCallback)(r=>{t.forEach(c=>{var a;(a=c.onInit)==null||a.call(c,r)})},[]),s=(0,g.useCallback)(({actions:r,effect:c})=>{switch(c._TAG){case"PUSHED":{t.forEach(a=>{var i;return(i=a.onPushed)==null?void 0:i.call(a,{actions:r,effect:c})});break}case"POPPED":{t.forEach(a=>{var i;return(i=a.onPopped)==null?void 0:i.call(a,{actions:r,effect:c})});break}case"REPLACED":{t.forEach(a=>{var i;return(i=a.onReplaced)==null?void 0:i.call(a,{actions:r,effect:c})});break}case"%SOMETHING_CHANGED%":{t.forEach(a=>{var i;return(i=a.onChanged)==null?void 0:i.call(a,{actions:r,effect:c})});break}default:break}},[]);(0,g.useEffect)(()=>{n==null||n({actions:o})},[]);let p=(0,g.useRef)(e);return(0,g.useEffect)(()=>{let r=p.current;(r?(0,gt.produceEffects)(r,e):[]).forEach(a=>{s({actions:o,effect:a})}),p.current=m({},e)},[e]),null},wt=jt;var O=d(require("react"));var G=d(require("react"));var ht=d(require("react"));var Rt=({children:t,value:e})=>ht.default.createElement(F.Provider,{value:H(e)},t);var Jt=({activities:t,plugin:e})=>{let o=I(),n=C();return e.render({stack:k(m({},o),{render(s){let p=m(m({},o),s);return{activities:p.activities.map(r=>k(m({},r),{key:r.id,render(c){let a=t[r.name],i=G.default.createElement(a,{params:r.params});return n.forEach(u=>{var l,P;i=(P=(l=u.wrapActivity)==null?void 0:l.call(u,{activity:k(m({},r),{render:()=>i})}))!=null?P:i}),G.default.createElement(Rt,{value:p},G.default.createElement(mt,{key:r.id,value:m(m({},r),c)},i))}}))}}})})},Tt=Jt;var $t=({activities:t})=>{let e=I(),o=C(),n=o.filter(p=>!!p.render);(0,O.useEffect)(()=>{n.length===0&&console.warn(`Stackflow - There is no rendering plugin, so "<Stack />" doesn't render anything. If you want to render some UI, use "@stackflow/plugin-renderer-basic" or add another rendering plugin.`)},[n]);let s=O.default.createElement(O.default.Fragment,null,n.map(p=>O.default.createElement(Tt,{activities:t,key:p.key,plugin:p})));return o.forEach(p=>{var r,c;s=(c=(r=p.wrapStack)==null?void 0:r.call(p,{stack:k(m({},e),{render(){return s}})}))!=null?c:s}),s},Dt=$t;var L=d(require("react"));function j(t){return t?t.animate===void 0||t.animate==null?{skipActiveState:!1}:{skipActiveState:!t.animate}:{skipActiveState:!1}}var It,zt=(It=L.default.useTransition)!=null?It:()=>[!1,t=>t()];function J(){let t=_(),[e,o]=zt();return(0,L.useMemo)(()=>({pending:e,push(n,s,p){let r=D();return o(()=>{t.push({activityId:r,activityName:n,params:s,skipEnterActiveState:j(p).skipActiveState})}),{activityId:r}},replace(n,s,p){let r=D();return o(()=>{t.replace({activityId:D(),activityName:n,params:s,skipEnterActiveState:j(p).skipActiveState})}),{activityId:r}},pop(n){o(()=>{t.pop({skipExitActiveState:j(n).skipActiveState})})}}),[t.push,t.replace,t.pop,e,o])}function Qt(t){let e=Object.entries(t.activities).reduce((o,[n,s])=>k(m({},o),{[n]:E.default.memo(s)}),{});return typeof window!="undefined"&&window.document.documentElement.style.setProperty("--stackflow-transition-duration",`${t.transitionDuration}ms`),{Stack(o){var s;let n=(0,E.useMemo)(()=>{var p;return((p=t.plugins)!=null?p:[]).reduce((r,c)=>[...r,...Array.isArray(c)?c:[c]],[]).map(r=>r({initContext:o.initContext}))},[]);return E.default.createElement(vt,{value:(s=o.initContext)!=null?s:{}},E.default.createElement(Pt,{value:n},E.default.createElement(At,{activities:e,initialActivity:t.initialActivity,transitionDuration:t.transitionDuration},E.default.createElement(Dt,{activities:e}),E.default.createElement(wt,null))))},useFlow:J}}
"use strict";var bt=Object.create;var b=Object.defineProperty,Bt=Object.defineProperties,Nt=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertyNames,X=Object.getOwnPropertySymbols,Ut=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable;var Y=(t,e,o)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,p=(t,e)=>{for(var o in e||(e={}))Z.call(e,o)&&Y(t,o,e[o]);if(X)for(var o of X(e))Ht.call(e,o)&&Y(t,o,e[o]);return t},k=(t,e)=>Bt(t,Mt(e));var Vt=(t,e)=>{for(var o in e)b(t,o,{get:e[o],enumerable:!0})},tt=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of Ft(e))!Z.call(t,m)&&m!==o&&b(t,m,{get:()=>e[m],enumerable:!(n=Nt(e,m))||n.enumerable});return t};var d=(t,e,o)=>(o=t!=null?bt(Ut(t)):{},tt(e||!t||!t.__esModule?b(o,"default",{value:t,enumerable:!0}):o,t)),qt=t=>tt(b({},"__esModule",{value:!0}),t);var Xt={};Vt(Xt,{stackflow:()=>Qt,useActions:()=>J,useActivity:()=>Kt,useActivityParams:()=>_t,useInitContext:()=>B,useStack:()=>Gt});module.exports=qt(Xt);var ot=require("react");var et=require("react"),T=(0,et.createContext)(null);var Kt=()=>(0,ot.useContext)(T);var rt=require("react");function _t(){return(0,rt.useContext)(T).params}var nt=d(require("react"));var it=require("react"),M=(0,it.createContext)({});function B(){return nt.default.useContext(M)}var st=require("react");var at=require("react"),F=(0,at.createContext)(null);var Gt=()=>(0,st.useContext)(F);var g=d(require("react"));var A=require("@stackflow/core"),v=d(require("react")),Ct=d(require("react-fast-compare"));var mt=d(require("react"));var U=require("react"),ct=d(require("react-fast-compare"));function H(t){let e=(0,U.useRef)(t),o=e.current,n=(0,ct.default)(o,t);return(0,U.useEffect)(()=>{n||(e.current=t)}),n?o:t}var pt=({children:t,value:e})=>mt.default.createElement(T.Provider,{value:H(e)},t);var ft=require("@stackflow/core");function D(){return(0,ft.id)()}var ut=d(require("react"));var vt=({children:t,value:e})=>ut.default.createElement(M.Provider,{value:e},t);var lt=require("react"),V=(0,lt.createContext)(null);var dt=d(require("react"));var Pt=({children:t,value:e})=>dt.default.createElement(V.Provider,{value:e},t);var xt=require("react");function C(){return(0,xt.useContext)(V)}var yt=require("react"),q=(0,yt.createContext)(null);var kt=require("react"),K=(0,kt.createContext)(null);var Lt=1e3,Wt=Lt/60,At=({transitionDuration:t,initialActivity:e,activities:o,children:n})=>{let m=C(),c=B(),r=(0,v.useMemo)(()=>{let y=new Date().getTime()-t,f=e?(0,A.makeEvent)("Pushed",{activityId:D(),activityName:e({initContext:c}),activityParams:{},eventDate:y,skipEnterActiveState:!1}):null,x=m.reduce((N,W)=>{var z,Q;return(Q=(z=W.overrideInitialPushedEvent)==null?void 0:z.call(W,{pushedEvent:N}))!=null?Q:N},f);!!x&&!!f&&x.id!==f.id&&console.warn(`Stackflow - Some plugin overrides an "initialActivity" option. The "initialActivity" option you set to "${f.activityName}" in the "stackflow" is ignored.`);let R=x;R||console.warn("Stackflow - There is no initial activity. If you want to set the initial activity, add the `initialActivity` option of the `stackflow()` function or add a plugin that sets the initial activity. (e.g. `@stackflow/plugin-history-sync`)");let Ot=Object.keys(o).map(N=>(0,A.makeEvent)("ActivityRegistered",{activityName:N,eventDate:y})),$=[(0,A.makeEvent)("Initialized",{transitionDuration:t,eventDate:y}),...Ot];return R&&$.push(R),$},[]),a=(0,v.useMemo)(()=>(0,A.aggregate)(r,new Date().getTime()),[]),[s,i]=(0,v.useState)(()=>a),u=(0,v.useRef)(r),l=(0,v.useRef)(a),P=(0,v.useCallback)(()=>l.current,[l]),w=(0,v.useCallback)((y,f)=>{let x=(0,A.makeEvent)(y,f),h=[...u.current,x];u.current=h,i((0,A.aggregate)(h,new Date().getTime()))},[u,i]);return(0,v.useEffect)(()=>{let y=setInterval(()=>{let f=u.current,x=(0,A.aggregate)(f,new Date().getTime());(0,Ct.default)(s,x)||(i(x),l.current=x),x.globalTransitionState==="idle"&&clearInterval(y)},Wt);return()=>{clearInterval(y)}},[u,s,i]),v.default.createElement(K.Provider,{value:s},v.default.createElement(q.Provider,{value:(0,v.useMemo)(()=>({getStack:P,dispatchEvent:w}),[P,w])},n))};var S=d(require("react"));var St=t=>JSON.parse(JSON.stringify(t)),_=()=>{let t=C(),e=B(),{dispatchEvent:o,getStack:n}=S.default.useContext(q),m=(0,S.useCallback)(i=>{let{isPrevented:u,params:l}=s("PUSHED",i);u||o("Pushed",p({},l))},[o]),c=(0,S.useCallback)(i=>{let{isPrevented:u,params:l}=s("REPLACED",i);u||o("Replaced",p({},l))},[o]),r=(0,S.useCallback)(i=>{let u=i!=null?i:{},{isPrevented:l,params:P}=s("POPPED",u);l||o("Popped",p({},P))},[o]),a=(0,S.useMemo)(()=>({dispatchEvent:o,getStack:n,push:m,replace:c,pop:r}),[o,n,m,c,r]),s=(0,S.useCallback)((i,u)=>{let l=!1,P=St(u),w=()=>{l=!0},y=f=>{P=St(f)};return t.forEach(f=>{var x,h,R;switch(i){case"PUSHED":(x=f.onBeforePush)==null||x.call(f,{actionParams:P,actions:k(p({},a),{preventDefault:w,overrideActionParams:y})});break;case"REPLACED":(h=f.onBeforeReplace)==null||h.call(f,{actionParams:P,actions:k(p({},a),{preventDefault:w,overrideActionParams:y})});break;case"POPPED":(R=f.onBeforePop)==null||R.call(f,{actionParams:P,actions:k(p({},a),{preventDefault:w,overrideActionParams:y})});break;default:break}}),{isPrevented:l,params:P}},[t,e]);return a};var gt=d(require("react"));var I=()=>gt.default.useContext(K);var Et=require("@stackflow/core"),E=require("react");var jt=()=>{let t=C(),e=I(),o=_(),n=(0,E.useCallback)(r=>{t.forEach(a=>{var s;(s=a.onInit)==null||s.call(a,r)})},[]),m=(0,E.useCallback)(({actions:r,effect:a})=>{switch(a._TAG){case"PUSHED":{t.forEach(s=>{var i;return(i=s.onPushed)==null?void 0:i.call(s,{actions:r,effect:a})});break}case"POPPED":{t.forEach(s=>{var i;return(i=s.onPopped)==null?void 0:i.call(s,{actions:r,effect:a})});break}case"REPLACED":{t.forEach(s=>{var i;return(i=s.onReplaced)==null?void 0:i.call(s,{actions:r,effect:a})});break}case"%SOMETHING_CHANGED%":{t.forEach(s=>{var i;return(i=s.onChanged)==null?void 0:i.call(s,{actions:r,effect:a})});break}default:break}},[]);(0,E.useEffect)(()=>{n==null||n({actions:o})},[]);let c=(0,E.useRef)(e);return(0,E.useEffect)(()=>{let r=c.current;(r?(0,Et.produceEffects)(r,e):[]).forEach(s=>{m({actions:o,effect:s})}),c.current=p({},e)},[e]),null},wt=jt;var O=d(require("react"));var G=d(require("react"));var ht=d(require("react"));var Rt=({children:t,value:e})=>ht.default.createElement(F.Provider,{value:H(e)},t);var Jt=({activities:t,plugin:e})=>{let o=I(),n=C();return e.render({stack:k(p({},o),{render(m){let c=p(p({},o),m);return{activities:c.activities.map(r=>k(p({},r),{key:r.id,render(a){let s=t[r.name],i=G.default.createElement(s,{params:r.params});return n.forEach(u=>{var l,P;i=(P=(l=u.wrapActivity)==null?void 0:l.call(u,{activity:k(p({},r),{render:()=>i})}))!=null?P:i}),G.default.createElement(Rt,{value:c},G.default.createElement(pt,{key:r.id,value:p(p({},r),a)},i))}}))}}})})},Tt=Jt;var $t=({activities:t})=>{let e=I(),o=C(),n=o.filter(c=>!!c.render);(0,O.useEffect)(()=>{n.length===0&&console.warn(`Stackflow - There is no rendering plugin, so "<Stack />" doesn't render anything. If you want to render some UI, use "@stackflow/plugin-renderer-basic" or add another rendering plugin.`)},[n]);let m=O.default.createElement(O.default.Fragment,null,n.map(c=>O.default.createElement(Tt,{activities:t,key:c.key,plugin:c})));return o.forEach(c=>{var r,a;m=(a=(r=c.wrapStack)==null?void 0:r.call(c,{stack:k(p({},e),{render(){return m}})}))!=null?a:m}),m},Dt=$t;var L=d(require("react"));function j(t){return t?t.animate===void 0||t.animate==null?{skipActiveState:!1}:{skipActiveState:!t.animate}:{skipActiveState:!1}}var It,zt=(It=L.default.useTransition)!=null?It:()=>[!1,t=>t()];function J(){let t=_(),[e,o]=zt();return(0,L.useMemo)(()=>({pending:e,push(n,m,c){let r=D();return o(()=>{t.push({activityId:r,activityName:n,activityParams:m,skipEnterActiveState:j(c).skipActiveState})}),{activityId:r}},replace(n,m,c){let r=D();return o(()=>{var a;t.replace({activityId:(a=c==null?void 0:c.activityId)!=null?a:D(),activityName:n,activityParams:m,skipEnterActiveState:j(c).skipActiveState})}),{activityId:r}},pop(n){o(()=>{t.pop({skipExitActiveState:j(n).skipActiveState})})}}),[t.push,t.replace,t.pop,e,o])}function Qt(t){let e=Object.entries(t.activities).reduce((o,[n,m])=>k(p({},o),{[n]:g.default.memo(m)}),{});return typeof window!="undefined"&&window.document.documentElement.style.setProperty("--stackflow-transition-duration",`${t.transitionDuration}ms`),{Stack(o){var m;let n=(0,g.useMemo)(()=>{var c;return((c=t.plugins)!=null?c:[]).reduce((r,a)=>[...r,...Array.isArray(a)?a:[a]],[]).map(r=>r({initContext:o.initContext}))},[]);return g.default.createElement(vt,{value:(m=o.initContext)!=null?m:{}},g.default.createElement(Pt,{value:n},g.default.createElement(At,{activities:e,initialActivity:t.initialActivity,transitionDuration:t.transitionDuration},g.default.createElement(Dt,{activities:e}),g.default.createElement(wt,null))))},useFlow:J}}
//# sourceMappingURL=index.js.map

@@ -21,2 +21,3 @@ import type { ActivityComponentType } from "./activity";

animate?: boolean;
activityId?: string;
}) => {

@@ -23,0 +24,0 @@ activityId: string;

{
"name": "@stackflow/react",
"version": "0.13.0",
"version": "0.14.0",
"license": "MIT",

@@ -30,4 +30,4 @@ "exports": {

"devDependencies": {
"@stackflow/core": "^0.13.0",
"@stackflow/esbuild-config": "^0.12.0",
"@stackflow/core": "^0.14.0",
"@stackflow/esbuild-config": "^0.14.0",
"@types/react": "^18.0.9",

@@ -53,3 +53,3 @@ "esbuild": "^0.14.51",

},
"gitHead": "d6da618a17da0dab279ad8906ad0c6b48fb72ece"
"gitHead": "4fb28179888fe8b5595ee3543c98cdb116a55429"
}

@@ -49,2 +49,3 @@ import React, { useMemo } from "react";

animate?: boolean;
activityId?: string;
},

@@ -73,3 +74,3 @@ ) => {

pending,
push(activityName, params, options) {
push(activityName, activityParams, options) {
const activityId = makeActivityId();

@@ -81,3 +82,3 @@

activityName,
params,
activityParams,
skipEnterActiveState: parseActionOptions(options).skipActiveState,

@@ -91,3 +92,3 @@ });

},
replace(activityName, params, options) {
replace(activityName, activityParams, options) {
const activityId = makeActivityId();

@@ -97,5 +98,5 @@

coreActions.replace({
activityId: makeActivityId(),
activityId: options?.activityId ?? makeActivityId(),
activityName,
params,
activityParams,
skipEnterActiveState: parseActionOptions(options).skipActiveState,

@@ -102,0 +103,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

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