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

next-tour

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-tour - npm Package Compare versions

Comparing version 0.2.6 to 0.3.0

2

dist/index.d.ts

@@ -63,2 +63,4 @@ import React$1 from 'react';

target: string;
/** The title to display for this step. */
title?: string;
/** The content to display for this step. */

@@ -65,0 +67,0 @@ content: React.ReactNode;

6

dist/index.js

@@ -1,3 +0,3 @@

"use strict";var Q=Object.create;var P=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,G=Object.prototype.hasOwnProperty;var J=(t,e)=>{for(var r in e)P(t,r,{get:e[r],enumerable:!0})},H=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Y(e))!G.call(t,s)&&s!==r&&P(t,s,{get:()=>e[s],enumerable:!(o=R(e,s))||o.enumerable});return t};var T=(t,e,r)=>(r=t!=null?Q($(t)):{},H(e||!t||!t.__esModule?P(r,"default",{value:t,enumerable:!0}):r,t)),X=t=>H(P({},"__esModule",{value:!0}),t);var at={};J(at,{Tour:()=>M,TourProvider:()=>E,useTourControls:()=>x,useTourState:()=>g});module.exports=X(at);var m=T(require("react")),b=m.default.createContext(null),Z=({children:t})=>{var I;let[e,r]=m.default.useState(!1),[o,s]=m.default.useState(null),[n,i]=m.default.useState(0),u=m.default.useRef([]),a=(I=o==null?void 0:o.steps.length)!=null?I:0,h=c=>{u.current.push(c)},p=c=>{let L=u.current.find(q=>q.id===c);L&&(s(L),r(!0),i(0))},l=()=>{r(!1),s(null),i(0)},f=m.default.useCallback(()=>{i(c=>Math.min(a-1,c+1))},[a]),w=()=>{i(c=>Math.max(0,c-1))},j=m.default.useCallback(c=>{c<1||c>=a||i(c-1)},[a]);return m.default.createElement(b.Provider,{value:{isTourOpen:e,activeTour:o,activeStepIndex:n,totalSteps:a,tours:u.current,addTour:h,startTour:p,endTour:l,goToStep:j,nextStep:f,prevStep:w}},t)},E=Z;function y(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}y(`:root{--nt-background-color: #ffffff;--nt-foreground-color: #2d3748;--nt-secondary-color: #4a5568;--nt-border-color: #cbd5e0;--nt-accent-color: #3182ce;--nt-shadow-color: rgba(0, 0, 0, .1);--nt-on-accent-color: #ffffff;--nt-radius: .6rem;--nt-spacing: 1rem;--nt-transition-timing-function-step: cubic-bezier(.2, 0, .2, 1);--nt-transition-duration: .4s;--nt-animation-duration: .2s}.dark{--nt-background-color: #1a202c;--nt-foreground-color: #e2e8f0;--nt-secondary-color: #a0aec0;--nt-border-color: #4a5568;--nt-accent-color: #63b3ed;--nt-shadow-color: rgba(0, 0, 0, .2);--nt-on-accent-color: #2d3748}[data-nt-popover]{position:fixed;z-index:10000;top:50%;left:50%}[data-nt-popover-container]{position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;animation:NtFadeIn var(--nt-animation-duration) ease-out}@keyframes NtFadeIn{0%{opacity:0}to{opacity:1}}:where([data-tour-step]){background-color:var(--nt-background-color);color:var(--nt-foreground-color);border:1px solid var(--nt-border-color);box-shadow:0 2px 4px var(--nt-shadow-color);padding:var(--nt-spacing);border-radius:var(--nt-radius);animation:NtScaleUp var(--nt-animation-duration) ease-out}@keyframes NtScaleUp{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}
`);var F=T(require("react"));var N=T(require("react"));var tt=()=>{let t=N.default.useContext(b);if(!t)throw new Error("useTourControls must be used within a <TourProvider> component");let{startTour:e,endTour:r,goToStep:o,nextStep:s,prevStep:n,addTour:i}=t;return{startTour:e,endTour:r,goToStep:o,nextStep:s,prevStep:n,addTour:i}},x=tt;var O=T(require("react"));var et=()=>{let t=O.default.useContext(b);if(!t)throw new Error("useTourState must be used within a <TourProvider> component");let{tours:e,activeStepIndex:r,activeTour:o,isTourOpen:s,totalSteps:n}=t;return{tours:e,activeStepIndex:r,activeTour:o,isTourOpen:s,totalSteps:n}},g=et;var _=T(require("react"));var A=`
"use strict";var rt=Object.create;var w=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty;var dt=(t,e)=>{for(var r in e)w(t,r,{get:e[r],enumerable:!0})},U=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of it(e))!st.call(t,i)&&i!==r&&w(t,i,{get:()=>e[i],enumerable:!(o=nt(e,i))||o.enumerable});return t};var f=(t,e,r)=>(r=t!=null?rt(at(t)):{},U(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t)),lt=t=>U(w({},"__esModule",{value:!0}),t);var Pt={};dt(Pt,{Tour:()=>H,TourProvider:()=>E,useTourControls:()=>g,useTourState:()=>v});module.exports=lt(Pt);var h=f(require("react")),x=h.default.createContext(null),ut=({children:t})=>{var N;let[e,r]=h.default.useState(!1),[o,i]=h.default.useState(null),[n,a]=h.default.useState(0),d=h.default.useRef([]),s=(N=o==null?void 0:o.steps.length)!=null?N:0,m=c=>{d.current.push(c)},y=c=>{let O=d.current.find(ot=>ot.id===c);O&&(i(O),r(!0),a(0))},l=()=>{r(!1),i(null),a(0)},p=h.default.useCallback(()=>{a(c=>Math.min(s-1,c+1))},[s]),P=()=>{a(c=>Math.max(0,c-1))},et=h.default.useCallback(c=>{c<1||c>=s||a(c-1)},[s]);return h.default.createElement(x.Provider,{value:{isTourOpen:e,activeTour:o,activeStepIndex:n,totalSteps:s,tours:d.current,addTour:m,startTour:y,endTour:l,goToStep:et,nextStep:p,prevStep:P}},t)},E=ut;function k(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}k(`:root{--gray1: #fcfcfc;--gray2: #f9f9f9;--gray3: #f0f0f0;--gray4: #e8e8e8;--gray5: #e0e0e0;--gray6: #d9d9d9;--gray7: #cecece;--gray8: #bbbbbb;--gray9: #8d8d8d;--gray10: #838383;--gray11: #646464;--gray12: #202020;--color-bg: #fff;--color-fg: var(--gray12);--color-secondary: var(--gray6);--color-secondary-fg: var(--gray9);--color-muted: var(--gray3);--color-muted-fg: var(--gray8);--color-border: var(--gray7);--color-border-hover: var(--gray6);--color-border-muted: var(--gray4);--color-border-muted-hover: var(--gray5);--shadow-border: 0 0 0 1px rgba(0, 0, 0, .08);--transition: cubic-bezier(.645, .045, .355, 1);--duration: .2s;--duration-long: .4s;--sc-1: .25rem;--sc-2: .5rem;--sc-3: .75rem;--sc-4: 1rem;--sc-5: 1.25rem;--sc-6: 1.5rem;--rd-1: .25rem;--rd-2: .5rem;--rd-3: .75rem;--rd-4: 1rem}[data-nt-popover]{position:fixed;z-index:10000;top:50%;left:50%}[data-nt-popover-container]{position:fixed;z-index:9999;top:0;left:0;width:100%;height:100%;animation:NtFadeIn var(--duration) var(--transition)}@keyframes NtFadeIn{0%{opacity:0}to{opacity:1}}:where([data-nt-step-container]){min-width:350px;background-color:var(--color-bg);color:var(--color-fg);box-shadow:var(--shadow-border),0 1px 1px #00000005,0 4px 8px -4px #0000000a,0 16px 24px -8px #0000000f;border-radius:var(--rd-3);animation:ntScaleUp var(--duration) var(--transition);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:where([data-nt-step-container][data-target-highlight=true]){box-shadow:none}:where([data-nt-step-container]) [data-nt-button]{border:none;padding:var(--sc-3) var(--sc-5);width:auto;overflow:visible;outline:none;background:var(--gray12);cursor:pointer;color:var(--gray1);font:inherit;font-weight:500;text-align:center;font-size:.875rem;border-radius:var(--rd-2);opacity:1;line-height:normal;transition:all .15s var(--transition)}:where([data-nt-step-container]) [data-nt-button]:hover{opacity:.8}:where([data-nt-step-container]) [data-nt-button][data-variant=outline]{background-color:transparent;color:var(--color-fg);border:1px solid var(--color-border)}:where([data-nt-step-container]) [data-nt-button][data-variant=outline]:hover{background-color:var(--color-muted);border:1px solid var(--color-border-hover);opacity:1}:where([data-nt-step-container]) [data-nt-tour-step-footer]{width:100%;padding:var(--sc-3) var(--sc-4);display:flex;flex-direction:column;justify-content:center;align-items:center;border-top:1px solid var(--color-border-muted);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}:where([data-nt-step-container]) [data-nt-tour-step-footer-actions]{width:100%;display:flex;justify-content:space-between;align-items:center;gap:var(--sc-1)}:where([data-nt-step-container]) [data-nt-step-content]{padding:var(--sc-4);display:flex;flex-direction:column;justify-content:center;align-items:start;text-align:start;gap:var(--sc-2);max-width:300px;text-wrap:pretty}:where([data-nt-step-container]) [data-nt-step-content]>[data-nt-step-title]{font-size:1.25rem;font-weight:600;letter-spacing:-.02em}@keyframes ntScaleUp{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}
`);var B=f(require("react"));var V=f(require("react"));var ct=()=>{let t=V.default.useContext(x);if(!t)throw new Error("useTourControls must be used within a <TourProvider> component");let{startTour:e,endTour:r,goToStep:o,nextStep:i,prevStep:n,addTour:a}=t;return{startTour:e,endTour:r,goToStep:o,nextStep:i,prevStep:n,addTour:a}},g=ct;var _=f(require("react"));var pt=()=>{let t=_.default.useContext(x);if(!t)throw new Error("useTourState must be used within a <TourProvider> component");let{tours:e,activeStepIndex:r,activeTour:o,isTourOpen:i,totalSteps:n}=t;return{tours:e,activeStepIndex:r,activeTour:o,isTourOpen:i,totalSteps:n}},v=pt;var z=f(require("react"));var D=`
a[href]:not([tabindex^="-"]),

@@ -17,2 +17,2 @@ area[href]:not([tabindex^="-"]),

object[usemap]:not([tabindex^="-"])
`,U="bottom-center";var ot=t=>{_.default.useEffect(()=>{let e=t.current;if(!e)return;let r=()=>Array.from(e.querySelectorAll(A)).filter(n=>!n.hasAttribute("disabled")),o=r();o[0]&&o[0].focus();let s=n=>{if(n.key!=="Tab"||(o=r(),o.length===0))return;let{firstElement:i,lastElement:u}={firstElement:o[0],lastElement:o[o.length-1]};(n.shiftKey&&document.activeElement===i||!n.shiftKey&&document.activeElement===u)&&((n.shiftKey?u:i).focus(),n.preventDefault())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t])},S=ot;var rt=t=>{var n,i,u,a;let e=(n=t==null?void 0:t.highlightTarget)!=null?n:!0,r=(i=t==null?void 0:t.preventCloseOnClickOutside)!=null?i:!1,o=(u=t==null?void 0:t.showNavigation)!=null?u:!0,s=(a=t==null?void 0:t.showProgress)!=null?a:!0;return{highlightTarget:e,preventCloseOnClickOutside:r,showNavigation:o,showProgress:s}},k=rt;var v=T(require("react"));var B=(t,e,r)=>{let n=0,i=0;switch(r){case"top-center":n=t.top-e.height-10,i=t.left+t.width/2-e.width/2;break;case"bottom-center":n=t.top+t.height+10,i=t.left+t.width/2-e.width/2;break;case"left-center":n=t.top+t.height/2-e.height/2,i=t.left-e.width-10;break;case"right-center":n=t.top+t.height/2-e.height/2,i=t.left+t.width+10;break;case"window-center":n=window.innerHeight/2-e.height/2,i=window.innerWidth/2-e.width/2;break}return n=Math.max(10,Math.min(n,window.innerHeight-e.height-10)),i=Math.max(10,Math.min(i,window.innerWidth-e.width-10)),{top:n,left:i}},D=t=>{let e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)};var d=T(require("react")),V=T(require("react-dom"));var z=d.default.createContext(null),nt=()=>{let t=d.default.useContext(z);if(!t)throw new Error("usePopover must be used within a Popover component");return t},K=({children:t,open:e,preferredPosition:r=U,target:o,onClickOutside:s,shouldHighlightTarget:n=!0})=>!o||!e?null:d.default.createElement(z.Provider,{value:{open:e,preferredPosition:r,target:o,onClickOutside:s,shouldHighlightTarget:n}},t),it=({children:t,...e})=>{let{open:r,target:o,preferredPosition:s,onClickOutside:n,shouldHighlightTarget:i}=nt(),u=d.default.useRef(null),a=d.default.useRef(null),[h,p]=d.default.useState(null);return d.default.useEffect(()=>{if(o){let l=o.getBoundingClientRect();p(l)}},[o]),d.default.useEffect(()=>{if(!r||!h||!u.current)return;let l=B(h,u.current.getBoundingClientRect(),s),{current:f}=u;f.style.top=`${l.top}px`,f.style.left=`${l.left}px`;let w=setTimeout(()=>{f.style.transition="top var(--nt-transition-duration), left var(--nt-transition-duration)"},50);return()=>{clearTimeout(w)}},[r,h,s]),d.default.useEffect(()=>{if(i&&o&&a.current){o.style.zIndex="10001",a.current.style.backgroundColor="rgba(0, 0, 0, 0.5)";let l=a.current;return()=>{l&&(l.style.backgroundColor=""),o&&(o.style.zIndex="")}}},[i,o]),S(u),d.default.useEffect(()=>{let l=f=>{a.current===f.target&&(n==null||n())};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[n]),V.default.createPortal(d.default.createElement("div",{ref:a,"data-nt-popover-container":!0},d.default.createElement("div",{...e,ref:u,"data-nt-popover":!0},t)),document.body)};K.Content=it;var C=K;var st=({activeStep:t,tourOptions:e})=>{let{endTour:r,nextStep:o,prevStep:s}=x(),{isTourOpen:n}=g(),[i,u]=v.default.useState(null),{highlightTarget:a,preventCloseOnClickOutside:h}=k(e);return v.default.useEffect(()=>{if(!t)return;let p=document.querySelector(t.target);if(!p)return;if(D(p))i!==p&&u(p);else{u(null),p.scrollIntoView({behavior:"smooth",block:"center"});let f=setTimeout(()=>{u(p)},600);return()=>{clearTimeout(f),i!==null&&u(null)}}},[t,i]),t?v.default.createElement(C,{open:n,target:i,preferredPosition:t.position,shouldHighlightTarget:a,onClickOutside:()=>h?void 0:r()},v.default.createElement(C.Content,{"data-tour-step":!0},t.content,v.default.createElement("button",{onClick:s},"Prev"),v.default.createElement("button",{onClick:o},"Next"))):null},W=st;var ut=t=>{let{addTour:e}=x(),{activeTour:r,activeStepIndex:o}=g();F.default.useEffect(()=>{e(t)},[e,t]);let s=(r==null?void 0:r.id)===t.id,n=s?r.steps[o]:null;return s?F.default.createElement(W,{activeStep:n,tourOptions:r.options}):null},M=ut;0&&(module.exports={Tour,TourProvider,useTourControls,useTourState});
`,j="bottom-center";var ft=t=>{z.default.useEffect(()=>{var n;let e=t.current;if(!e)return;let r=()=>Array.from(e.querySelectorAll(D)).filter(a=>!a.hasAttribute("disabled")),o=r();(n=o[0])==null||n.focus();let i=a=>{if(a.key!=="Tab"||o.length===0)return;let d=o[0],s=o[o.length-1],m=document.activeElement,y=!a.shiftKey&&m===s,l=a.shiftKey&&m===d;(y||l)&&((a.shiftKey?d:s).focus(),a.preventDefault()),o=r()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t])},F=ft;var mt=t=>{var n,a,d,s;let e=(n=t==null?void 0:t.highlightTarget)!=null?n:!0,r=(a=t==null?void 0:t.preventCloseOnClickOutside)!=null?a:!1,o=(d=t==null?void 0:t.showNavigation)!=null?d:!0,i=(s=t==null?void 0:t.showProgress)!=null?s:!0;return{highlightTarget:e,preventCloseOnClickOutside:r,showNavigation:o,showProgress:i}},M=mt;var S=require("react");var W=t=>{if(!t||!window.visualViewport)return!1;let e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=window.visualViewport.height-40&&e.right<=window.visualViewport.width},q=(t,e,r)=>{let o=t.style[e];return t.style[e]=r,()=>{t.style[e]=o}},K=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Y=typeof window!="undefined";var ht=Y?S.useLayoutEffect:S.useEffect,gt=t=>{ht(()=>{if(!t)return;let e=K?bt():vt();return()=>{e()}},[t])},vt=()=>{let t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},bt=()=>{let t={overflow:document.body.style.overflow,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,right:document.body.style.right},e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.overflow="hidden",()=>{document.body.style.overflow=t.overflow,document.body.style.position=t.position,document.body.style.top=t.top,document.body.style.left=t.left,document.body.style.right=t.right,window.scrollTo(0,e)}},I=gt;var T=f(require("react"));var $=(t,e,r)=>{let n=0,a=0;switch(r){case"top-center":n=t.top-e.height-10,a=t.left+t.width/2-e.width/2;break;case"bottom-center":n=t.top+t.height+10,a=t.left+t.width/2-e.width/2;break;case"left-center":n=t.top+t.height/2-e.height/2,a=t.left-e.width-10;break;case"right-center":n=t.top+t.height/2-e.height/2,a=t.left+t.width+10;break;case"window-center":n=window.innerHeight/2-e.height/2,a=window.innerWidth/2-e.width/2;break}return n=Math.max(10,Math.min(n,window.innerHeight-e.height-10)),a=Math.max(10,Math.min(a,window.innerWidth-e.width-10)),{top:n,left:a}},J=(t,e)=>{if(!t){e();return}t.scrollIntoView({behavior:"smooth",block:"center"});let r=null,o=0,i=()=>{if(o%3===0){let n=t.getBoundingClientRect().top;if(n===r){if(++o>6){e();return}}else r=n,o=0}else o++;window.requestAnimationFrame(i)};window.requestAnimationFrame(i)};var u=f(require("react")),Q=f(require("react-dom"));var Z=u.default.createContext(null),Tt=()=>{let t=u.default.useContext(Z);if(!t)throw new Error("usePopover must be used within a Popover component");return t},G=({children:t,open:e,preferredPosition:r=j,target:o,onClickOutside:i,shouldHighlightTarget:n=!0})=>!o||!e?null:u.default.createElement(Z.Provider,{value:{open:e,preferredPosition:r,target:o,onClickOutside:i,shouldHighlightTarget:n}},t),yt=({children:t,...e})=>{let{open:r,target:o,preferredPosition:i,onClickOutside:n,shouldHighlightTarget:a}=Tt(),d=u.default.useRef(null),s=u.default.useRef(null),[m,y]=u.default.useState(null);return u.default.useEffect(()=>{if(o){let l=o.getBoundingClientRect();y(l)}},[o]),u.default.useEffect(()=>{if(!r||!m||!d.current)return;let l=$(m,d.current.getBoundingClientRect(),i),{current:p}=d;p.style.top=`${l.top}px`,p.style.left=`${l.left}px`;let P=setTimeout(()=>{p.style.transition="top var(--duration-long), left var(--duration-long)"},50);return()=>{clearTimeout(P)}},[r,m,i]),u.default.useEffect(()=>{if(a&&o&&s.current){let l=q(o,"zIndex","10001");s.current.style.backgroundColor="rgba(0, 0, 0, 0.5)";let p=s.current;return()=>{p.style.backgroundColor="",l()}}},[a,o]),F(d),I(r),u.default.useEffect(()=>{let l=p=>{s.current===p.target&&(n==null||n())};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[n]),Q.default.createPortal(u.default.createElement("div",{ref:s,"data-nt-popover-container":!0},u.default.createElement("div",{...e,ref:d,"data-nt-popover":!0},t)),document.body)};G.Content=yt;var C=G;var L=f(require("react")),X=({children:t})=>L.default.createElement("div",{"data-nt-step-content":!0},t),xt=({children:t})=>L.default.createElement("h3",{"data-nt-step-title":!0},t);X.Title=xt;var A=X;var b=f(require("react"));var wt=()=>{let{nextStep:t,prevStep:e,endTour:r}=g(),{totalSteps:o,activeStepIndex:i}=v(),n=o>1&&i>0,a=i<o-1,d=i===o-1;return b.default.createElement("footer",{"data-nt-tour-step-footer":!0},b.default.createElement("div",{"data-nt-tour-step-footer-actions":!0},n&&b.default.createElement("button",{onClick:()=>e(),"data-nt-button":!0,"data-variant":"outline"},"Back"),b.default.createElement("button",{onClick:()=>r(),"data-nt-button":!0,"data-variant":"outline"},"Skip"),b.default.createElement("div",{style:{flex:1}}),a&&b.default.createElement("button",{onClick:()=>t(),"data-nt-button":!0,"data-variant":"primary"},"Next"),d&&b.default.createElement("button",{onClick:()=>r(),"data-nt-button":!0,"data-variant":"primary"},"Finish")))},R=wt;var St=({activeStep:t,tourOptions:e})=>{let{endTour:r}=g(),{isTourOpen:o}=v(),[i,n]=T.default.useState(null),{highlightTarget:a,preventCloseOnClickOutside:d}=M(e);return T.default.useEffect(()=>{if(!t)return;let s=document.querySelector(t.target);if(!s)return;if(W(s))i!==s&&n(s);else return n(null),J(s,()=>{n(s)}),()=>{i!==null&&n(null)}},[t,i]),t?T.default.createElement(C,{open:o,target:i,preferredPosition:t.position,shouldHighlightTarget:a,onClickOutside:()=>d?void 0:r()},T.default.createElement(C.Content,{"data-nt-step-container":!0,"data-target-highlight":a},T.default.createElement(A,null,T.default.createElement(A.Title,null,t.title),t.content),T.default.createElement(R,null))):null},tt=St;var Ct=t=>{let{addTour:e}=g(),{activeTour:r,activeStepIndex:o}=v();B.default.useEffect(()=>{e(t)},[e,t]);let i=(r==null?void 0:r.id)===t.id,n=i?r.steps[o]:null;return i?B.default.createElement(tt,{activeStep:n,tourOptions:r.options}):null},H=Ct;0&&(module.exports={Tour,TourProvider,useTourControls,useTourState});
{
"name": "next-tour",
"version": "0.2.6",
"version": "0.3.0",
"description": "Guided tours and walkthroughs for Next.js",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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