@stridge/kit 0.1.0-alpha.19 → 0.1.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../shared/i18n/useLingui.js";import"../../../../../i18n/index.js";import{useKitConfig as t}from"../../../../../scope/context.js";import{Collapsible as n}from"../../../../../shared/ui/Collapsible/Collapsible.js";import"../../../../../shared/ui/Collapsible/index.js";import{DEPOSIT_STATUS_BANNER_SLOTS as r}from"./DepositStatusBanner.slots.js";import{styles as i}from"./DepositStatusBanner.styles.js";import{DepositStatusBannerBody as a}from"./components/Body.js";import{DepositStatusBannerContext as o}from"./context.js";import{DepositStatusBannerClose as s}from"./components/Close.js";import{DepositStatusBannerDetail as c}from"./components/Detail.js";import{DepositStatusBannerDetails as l}from"./components/Details.js";import{DepositStatusBannerFooter as u}from"./components/Footer.js";import{DepositStatusBannerHero as d}from"./components/Hero.js";import{DepositStatusBannerPrimaryAction as f}from"./components/PrimaryAction.js";import{DepositStatusBannerCompletionTxRow as p,DepositStatusBannerDepositTxRow as m,DepositStatusBannerFilledAtRow as h,DepositStatusBannerSubmittedAtRow as g}from"./components/Rows.js";import{DepositStatusBannerToggle as _}from"./components/Toggle.js";import{useEffect as v,useLayoutEffect as y,useMemo as b,useRef as x}from"react";import{jsx as S}from"react/jsx-runtime";import*as C from"@stylexjs/stylex";import{motion as w}from"motion/react";const T=[.16,1,.3,1],E=[.4,0,1,1];function D({kind:a,asset:s,headline:c,subline:l,expanded:u,onToggleExpanded:d,onDismiss:f,depositTx:p,completionTx:m,submittedAt:h,filledAt:g,onPrimaryAction:_,inline:D,children:O}){let{_:k}=e(),{direction:A}=t(),j=c??k(a===`succeeded`?{id:`3kg1gB`,message:`Deposit completed`}:a===`failed`?{id:`Rxjdjn`,message:`Deposit didn't complete`}:{id:`junZX6`,message:`Deposit received and processing…`}),M=l??k(a===`succeeded`?{id:`9JHY2T`,message:`Your deposit has been credited to your account.`}:a===`failed`?{id:`Z1WbO6`,message:`Funds are safe on the source chain — contact support to recover.`}:{id:`Offl0a`,message:`Your deposit will be credited to your account.`}),N=b(()=>({kind:a,asset:s,headline:j,subline:M,expanded:u,onToggleExpanded:d,onDismiss:f,depositTx:p,completionTx:m,submittedAt:h,filledAt:g,onPrimaryAction:_}),[a,s,j,M,u,d,f,p,m,h,g,_]),P=x(null),F=x(null),I=x(a),L=x(null),R=x(null);y(()=>{let e=P.current;if(!e)return;let t=e.getBoundingClientRect().height;if(I.current===a){F.current=t;return}let n=F.current;if(I.current=a,F.current=t,n===null||n===t)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,R.current!==null&&window.cancelAnimationFrame(R.current),R.current=window.requestAnimationFrame(()=>{R.current=null,P.current&&(P.current.style.height=`${t}px`)}),L.current!==null&&window.clearTimeout(L.current),L.current=window.setTimeout(()=>{L.current=null;let e=P.current;e&&(e.style.height=``)},320)}),v(()=>()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null),R.current!==null&&(window.cancelAnimationFrame(R.current),R.current=null)},[]);let z=D?`0%`:`-50%`;return S(o.Provider,{value:N,children:S(n,{open:u,onOpenChange:e=>{e!==u&&d()},children:S(w.div,{"data-stridge-slot":r.root,dir:A,...C.props(i.root,D&&i.rootInline),initial:{x:z,y:`100%`,opacity:0},animate:{x:z,y:`0%`,opacity:1,transition:{duration:.3,ease:T}},exit:{x:z,y:`100%`,opacity:0,transition:{duration:.22,ease:E}},children:S(`div`,{ref:P,style:{display:`flex`,flexDirection:`column`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`},children:O})})})})}(function(e){e.Body=a,e.Hero=d,e.Close=s,e.Details=l,e.Detail=c,e.Footer=u,e.Toggle=_,e.PrimaryAction=f,e.DepositTxRow=m,e.CompletionTxRow=p,e.SubmittedAtRow=g,e.FilledAtRow=h})(D||={});export{D as DepositStatusBanner};
1
+ "use client";import{useLingui as e}from"../../../../../shared/i18n/useLingui.js";import"../../../../../i18n/index.js";import{useKitConfig as t}from"../../../../../scope/context.js";import{Collapsible as n}from"../../../../../shared/ui/Collapsible/Collapsible.js";import"../../../../../shared/ui/Collapsible/index.js";import{DEPOSIT_STATUS_BANNER_SLOTS as r}from"./DepositStatusBanner.slots.js";import{styles as i}from"./DepositStatusBanner.styles.js";import{DepositStatusBannerBody as a}from"./components/Body.js";import{DepositStatusBannerContext as o}from"./context.js";import{DepositStatusBannerClose as s}from"./components/Close.js";import{DepositStatusBannerDetail as c}from"./components/Detail.js";import{DepositStatusBannerDetails as l}from"./components/Details.js";import{DepositStatusBannerFooter as u}from"./components/Footer.js";import{DepositStatusBannerHero as d}from"./components/Hero.js";import{DepositStatusBannerPrimaryAction as f}from"./components/PrimaryAction.js";import{DepositStatusBannerCompletionTxRow as p,DepositStatusBannerDepositTxRow as m,DepositStatusBannerFilledAtRow as h,DepositStatusBannerSubmittedAtRow as g}from"./components/Rows.js";import{DepositStatusBannerToggle as _}from"./components/Toggle.js";import{useEffect as v,useLayoutEffect as y,useMemo as b,useRef as x}from"react";import{jsx as S}from"react/jsx-runtime";import*as C from"@stylexjs/stylex";import{motion as w}from"motion/react";const T=[.16,1,.3,1],E=[.4,0,1,1];function D({kind:a,asset:s,headline:c,subline:l,expanded:u,onToggleExpanded:d,onDismiss:f,depositTx:p,completionTx:m,submittedAt:h,filledAt:g,onPrimaryAction:_,inline:D,children:O}){let{_:k}=e(),{direction:A}=t(),j=c??k(a===`succeeded`?{id:`3kg1gB`,message:`Deposit completed`}:a===`failed`?{id:`Rxjdjn`,message:`Deposit didn't complete`}:{id:`junZX6`,message:`Deposit received and processing…`}),M=l??k(a===`succeeded`?{id:`9JHY2T`,message:`Your deposit has been credited to your account.`}:a===`failed`?{id:`Z1WbO6`,message:`Funds are safe on the source chain — contact support to recover.`}:{id:`Offl0a`,message:`Your deposit will be credited to your account.`}),N=b(()=>({kind:a,asset:s,headline:j,subline:M,expanded:u,onToggleExpanded:d,onDismiss:f,depositTx:p,completionTx:m,submittedAt:h,filledAt:g,onPrimaryAction:_}),[a,s,j,M,u,d,f,p,m,h,g,_]),P=x(null),F=x(null),I=x(a),L=x(null),R=x(null);y(()=>{let e=P.current;if(!e)return;let t=e.getBoundingClientRect().height;if(I.current===a){F.current=t;return}let n=F.current;if(I.current=a,F.current=t,n===null||n===t||document.visibilityState===`hidden`)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,R.current!==null&&window.cancelAnimationFrame(R.current),R.current=window.requestAnimationFrame(()=>{R.current=null,P.current&&(P.current.style.height=`${t}px`)}),L.current!==null&&window.clearTimeout(L.current),L.current=window.setTimeout(()=>{L.current=null;let e=P.current;e&&(e.style.height=``)},320)}),v(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;R.current!==null&&(window.cancelAnimationFrame(R.current),R.current=null),L.current!==null&&(window.clearTimeout(L.current),L.current=null);let e=P.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),L.current!==null&&(window.clearTimeout(L.current),L.current=null),R.current!==null&&(window.cancelAnimationFrame(R.current),R.current=null)}},[]);let z=D?`0%`:`-50%`;return S(o.Provider,{value:N,children:S(n,{open:u,onOpenChange:e=>{e!==u&&d()},children:S(w.div,{"data-stridge-slot":r.root,dir:A,...C.props(i.root,D&&i.rootInline),initial:{x:z,y:`100%`,opacity:0},animate:{x:z,y:`0%`,opacity:1,transition:{duration:.3,ease:T}},exit:{x:z,y:`100%`,opacity:0,transition:{duration:.22,ease:E}},children:S(`div`,{ref:P,style:{display:`flex`,flexDirection:`column`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`},children:O})})})})}(function(e){e.Body=a,e.Hero=d,e.Close=s,e.Details=l,e.Detail=c,e.Footer=u,e.Toggle=_,e.PrimaryAction=f,e.DepositTxRow=m,e.CompletionTxRow=p,e.SubmittedAtRow=g,e.FilledAtRow=h})(D||={});export{D as DepositStatusBanner};
package/dist/package.js CHANGED
@@ -1 +1 @@
1
- var e=`0.1.0-alpha.19`;export{e as version};
1
+ var e=`0.1.0-alpha.20`;export{e as version};
@@ -1 +1 @@
1
- "use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,motion as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
1
+ "use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import{AnimatePresence as i,motion as a}from"motion/react";const o=[.3,0,.06,1],s={enter:e=>({opacity:0,x:e>=0?16:-16,filter:`blur(6px)`}),center:{opacity:1,x:0,filter:`blur(0px)`,transition:{duration:.22,delay:.12,ease:o}},exit:e=>({opacity:0,x:e>=0?-16:16,filter:`blur(6px)`,transition:{duration:.14,ease:o}})};function c({stateKey:o,children:c}){let l=n([]),u=n(null),d=l.current,f=d[d.length-1],p=0;o!==f&&(p=d.indexOf(o)>=0?-1:1);let m=n(null),h=n(o),g=n(null),_=n(null);return e(()=>{let e=l.current;if(e[e.length-1]===o)return;let t=e.indexOf(o);l.current=t>=0?e.slice(0,t+1):[...e,o]},[o]),t(()=>{let e=u.current;if(!e)return;let t=e.getBoundingClientRect().height;if(h.current===o){m.current=t;return}let n=m.current;if(h.current=o,m.current=t,n===null||n===t||document.visibilityState===`hidden`)return;let r=e.style.transition;e.style.transition=`none`,e.style.height=`${n}px`,e.offsetHeight,e.style.transition=r,_.current!==null&&window.cancelAnimationFrame(_.current),_.current=window.requestAnimationFrame(()=>{_.current=null,u.current&&(u.current.style.height=`${t}px`)}),g.current!==null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null;let e=u.current;e&&(e.style.height=``)},320)}),e(()=>{let e=()=>{if(document.visibilityState!==`hidden`)return;_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null),g.current!==null&&(window.clearTimeout(g.current),g.current=null);let e=u.current;e&&(e.style.height=``)};return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e),g.current!==null&&(window.clearTimeout(g.current),g.current=null),_.current!==null&&(window.cancelAnimationFrame(_.current),_.current=null)}},[]),r(`div`,{ref:u,style:{position:`relative`,overflow:`hidden`,transition:`height 260ms cubic-bezier(0.3, 0, 0.06, 1)`,flex:`0 1 auto`,minHeight:0,display:`flex`,flexDirection:`column`},children:r(i,{mode:`popLayout`,custom:p,initial:!1,children:r(a.div,{custom:p,variants:s,initial:`enter`,animate:`center`,exit:`exit`,tabIndex:-1,style:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minHeight:0,outline:`none`},children:c},o)})})}export{c as StepTransition};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/kit",
3
- "version": "0.1.0-alpha.19",
3
+ "version": "0.1.0-alpha.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [