@ngrok/mantle 0.89.0 → 0.90.0

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.
Files changed (64) hide show
  1. package/dist/agent.json +1529 -1
  2. package/dist/alert-DO00UiQe.js +1 -0
  3. package/dist/{alert-CZYYlx9q.js → alert-ZaUBtgno.js} +1 -1
  4. package/dist/alert-center.js +1 -1
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/app-layout.d.ts +68 -13
  8. package/dist/app-layout.js +1 -1
  9. package/dist/card.d.ts +7 -0
  10. package/dist/combobox.d.ts +1 -1
  11. package/dist/command.js +1 -1
  12. package/dist/{dialog-BDzapPLR.js → dialog-CaGJD02w.js} +1 -1
  13. package/dist/dialog.js +1 -1
  14. package/dist/{dropdown-menu-CpRsyt_F.d.ts → dropdown-menu-Cef0Cz2B.d.ts} +1 -1
  15. package/dist/dropdown-menu-DMA8dGxZ.d.ts +1 -0
  16. package/dist/dropdown-menu.d.ts +2 -2
  17. package/dist/empty.d.ts +7 -0
  18. package/dist/flag.d.ts +1 -1
  19. package/dist/flag.js +1 -1
  20. package/dist/hooks.d.ts +251 -1
  21. package/dist/hooks.js +1 -1
  22. package/dist/{icons-BMZnm4hM.js → icons-CAtjMNti.js} +1 -1
  23. package/dist/icons.js +1 -1
  24. package/dist/input.js +1 -1
  25. package/dist/llms.txt +117 -2
  26. package/dist/mantle.css +9 -0
  27. package/dist/migrations/0002-data-table-action-header.yml +526 -0
  28. package/dist/migrations/0003-dialog-footer-dom-order.yml +271 -0
  29. package/dist/migrations/0004-priority-to-intent.yml +1728 -0
  30. package/dist/migrations/0005-field-item-owns-control-id.yml +234 -0
  31. package/dist/migrations/0006-data-table-tanstack-v9.yml +423 -0
  32. package/dist/migrations/0008-tabs-separator.yml +1212 -0
  33. package/dist/migrations/0009-chart-root-mode.yml +871 -0
  34. package/dist/multi-select.d.ts +1 -1
  35. package/dist/multi-select.js +1 -1
  36. package/dist/pagination.d.ts +1 -1
  37. package/dist/{primitive-B-6XILB2.js → primitive-AGoxSJBI.js} +1 -1
  38. package/dist/sandbar.js +1 -1
  39. package/dist/{select-CxXb3aiC.d.ts → select-DlohFa54.d.ts} +1 -1
  40. package/dist/select.d.ts +1 -1
  41. package/dist/{separator-HzGvuD0B.d.ts → separator-BWGjCIl7.d.ts} +7 -0
  42. package/dist/separator.d.ts +1 -1
  43. package/dist/{sheet-DND_KjmS.js → sheet-H8zvhSuA.js} +1 -1
  44. package/dist/sheet.js +1 -1
  45. package/dist/sidebar.d.ts +17 -10
  46. package/dist/sidebar.js +1 -1
  47. package/dist/split-button.d.ts +1 -1
  48. package/dist/strata.d.ts +544 -0
  49. package/dist/strata.js +1 -0
  50. package/dist/tabs.d.ts +1 -1
  51. package/dist/tabs.js +1 -1
  52. package/dist/theme-6Q65C1Rx.js +1 -0
  53. package/dist/theme-switcher.d.ts +2 -2
  54. package/dist/theme-switcher.js +1 -1
  55. package/dist/theme.js +1 -1
  56. package/dist/toast.js +1 -1
  57. package/dist/use-prefers-reduced-motion-DimzRx-M.js +1 -0
  58. package/dist/use-swipe-to-dismiss-Cj-AayFd.js +1 -0
  59. package/dist/well.d.ts +7 -0
  60. package/package.json +4 -3
  61. package/dist/alert-vfeV_hso.js +0 -1
  62. package/dist/dropdown-menu-CWUzGFgf.d.ts +0 -1
  63. package/dist/theme-BlCZHClJ.js +0 -1
  64. package/dist/use-prefers-reduced-motion-Cj9tJ181.js +0 -1
package/dist/theme.js CHANGED
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-BlCZHClJ.js";import{c as h}from"react/compiler-runtime";import{useEffect as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";const b=`mantle-dark-styles`,x=`mantle-light-high-contrast-styles`,S=`mantle-dark-high-contrast-styles`,C=`(prefers-color-scheme: dark)`,w=`(prefers-contrast: more) and (prefers-color-scheme: light)`,T=`(prefers-contrast: more) and (prefers-color-scheme: dark)`;function E(e,t){let n=t??e,r=n===`light`||n===`dark`,i=n===`light-high-contrast`||n===`dark-high-contrast`;return{dark:r?`all`:C,lightHighContrast:i?`all`:w,darkHighContrast:i?`all`:T}}function D(e){return e}function O(e){let{darkLinkId:t,lightHcLinkId:n,darkHcLinkId:r,mediaDark:i,mediaLightHc:a,mediaDarkHc:o,forceTheme:s}=e,c=document.documentElement.dataset.appliedTheme,l=s??c,u=l===`light`||l===`dark`,d=l===`light-high-contrast`||l===`dark-high-contrast`,f=document.getElementById(t),p=document.getElementById(n),m=document.getElementById(r);f&&(f.media=u?`all`:i),p&&(p.media=d?`all`:a),m&&(m.media=d?`all`:o)}function k(e){let t={darkLinkId:b,lightHcLinkId:x,darkHcLinkId:S,mediaDark:C,mediaLightHc:w,mediaDarkHc:T,forceTheme:e};return`(${O.toString()})(${JSON.stringify(t)})`}function A(e){let t=h(28),{darkCssUrl:n,lightHighContrastCssUrl:i,darkHighContrastCssUrl:o,forceTheme:s,nonce:c,ssrCookie:l}=e,u,d;t[0]===s?(u=t[1],d=t[2]):(u=()=>{let e=function(){let e=document.documentElement.dataset.appliedTheme;return r(e)?e:void 0},t=function(){let{dark:t,lightHighContrast:n,darkHighContrast:r}=E(e(),s),i=document.getElementById(b),a=document.getElementById(x),o=document.getElementById(S);i&&(i.media=t),a&&(a.media=n),o&&(o.media=r)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-applied-theme`]}),()=>{n.disconnect()}},d=[s],t[0]=s,t[1]=u,t[2]=d),g(u,d);let f,p;if(t[3]!==s||t[4]!==l){let e=l==null?void 0:a({cookie:l});f=e===`system`?void 0:e,p=E(f,s),t[3]=s,t[4]=l,t[5]=f,t[6]=p}else f=t[5],p=t[6];let{dark:m,lightHighContrast:C,darkHighContrast:w}=p,T=!s&&f==null,D=!s||s!==`light-high-contrast`&&s!==`dark-high-contrast`,O=!s||s===`light-high-contrast`||s===`dark-high-contrast`,A;t[7]!==n||t[8]!==m||t[9]!==D?(A=D&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:b,href:n,media:m,suppressHydrationWarning:!0}),t[7]=n,t[8]=m,t[9]=D,t[10]=A):A=t[10];let j;t[11]!==i||t[12]!==C||t[13]!==O?(j=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:x,href:i,media:C,suppressHydrationWarning:!0}),t[11]=i,t[12]=C,t[13]=O,t[14]=j):j=t[14];let M;t[15]!==o||t[16]!==w||t[17]!==O?(M=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:S,href:o,media:w,suppressHydrationWarning:!0}),t[15]=o,t[16]=w,t[17]=O,t[18]=M):M=t[18];let N;t[19]!==s||t[20]!==T||t[21]!==c?(N=T&&/* @__PURE__ */ v(`script`,{dangerouslySetInnerHTML:{__html:k(s)},nonce:c,suppressHydrationWarning:!0}),t[19]=s,t[20]=T,t[21]=c,t[22]=N):N=t[22];let P;return t[23]!==A||t[24]!==j||t[25]!==M||t[26]!==N?(P=/* @__PURE__ */ y(_,{children:[A,j,M,N]}),t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P):P=t[27],P}const j=`https://assets.ngrok.com`,M=`${j}/fonts`,N={roobert:`/roobert/roobert-proportional-vf.woff2`,"jetbrains-mono":`/jetbrains/jetbrainsmono-wght.woff2`,"jetbrains-mono-italic":`/jetbrains/jetbrainsmono-italic-wght.woff2`,"family-regular":`/family/family-regular.woff2`,"family-italic":`/family/family-italic.woff2`};function P(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${M}${t}`}function F(e){return`<${P(N[e])}>; rel=preload; as=font; type="font/woff2"; crossorigin`}const I=e=>{let t=h(4),{name:n}=e,r=N[n],i;t[0]===r?i=t[1]:(i=P(r),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=/* @__PURE__ */ v(`link`,{rel:`preload`,href:i,as:`font`,type:`font/woff2`,crossOrigin:`anonymous`}),t[2]=i,t[3]=a),a};export{m as $resolvedTheme,n as $theme,A as MantleStyleSheets,I as PreloadFont,p as PreventWrongThemeFlashScript,c as ThemeProvider,j as assetsCdnOrigin,d as extractThemeCookie,k as fixMediaScriptContent,P as fontHref,a as getStoredTheme,r as isResolvedTheme,u as isTheme,D as mantleStyleSheetUrls,F as preloadFontLink,e as preventWrongThemeFlashScriptContent,l as readThemeFromHtmlElement,s as resolvedThemes,i as themes,f as useAppliedTheme,t as useInitialHtmlThemeProps,o as useTheme};
1
+ import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"./theme-6Q65C1Rx.js";import{c as h}from"react/compiler-runtime";import{useEffect as g}from"react";import{Fragment as _,jsx as v,jsxs as y}from"react/jsx-runtime";const b=`mantle-dark-styles`,x=`mantle-light-high-contrast-styles`,S=`mantle-dark-high-contrast-styles`,C=`(prefers-color-scheme: dark)`,w=`(prefers-contrast: more) and (prefers-color-scheme: light)`,T=`(prefers-contrast: more) and (prefers-color-scheme: dark)`;function E(e,t){let n=t??e,r=n===`light`||n===`dark`,i=n===`light-high-contrast`||n===`dark-high-contrast`;return{dark:r?`all`:C,lightHighContrast:i?`all`:w,darkHighContrast:i?`all`:T}}function D(e){return e}function O(e){let{darkLinkId:t,lightHcLinkId:n,darkHcLinkId:r,mediaDark:i,mediaLightHc:a,mediaDarkHc:o,forceTheme:s}=e,c=document.documentElement.dataset.appliedTheme,l=s??c,u=l===`light`||l===`dark`,d=l===`light-high-contrast`||l===`dark-high-contrast`,f=document.getElementById(t),p=document.getElementById(n),m=document.getElementById(r);f&&(f.media=u?`all`:i),p&&(p.media=d?`all`:a),m&&(m.media=d?`all`:o)}function k(e){let t={darkLinkId:b,lightHcLinkId:x,darkHcLinkId:S,mediaDark:C,mediaLightHc:w,mediaDarkHc:T,forceTheme:e};return`(${O.toString()})(${JSON.stringify(t)})`}function A(e){let t=h(28),{darkCssUrl:n,lightHighContrastCssUrl:i,darkHighContrastCssUrl:o,forceTheme:s,nonce:c,ssrCookie:l}=e,u,d;t[0]===s?(u=t[1],d=t[2]):(u=()=>{let e=function(){let e=document.documentElement.dataset.appliedTheme;return r(e)?e:void 0},t=function(){let{dark:t,lightHighContrast:n,darkHighContrast:r}=E(e(),s),i=document.getElementById(b),a=document.getElementById(x),o=document.getElementById(S);i&&(i.media=t),a&&(a.media=n),o&&(o.media=r)};t();let n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-applied-theme`]}),()=>{n.disconnect()}},d=[s],t[0]=s,t[1]=u,t[2]=d),g(u,d);let f,p;if(t[3]!==s||t[4]!==l){let e=l==null?void 0:a({cookie:l});f=e===`system`?void 0:e,p=E(f,s),t[3]=s,t[4]=l,t[5]=f,t[6]=p}else f=t[5],p=t[6];let{dark:m,lightHighContrast:C,darkHighContrast:w}=p,T=!s&&f==null,D=!s||s!==`light-high-contrast`&&s!==`dark-high-contrast`,O=!s||s===`light-high-contrast`||s===`dark-high-contrast`,A;t[7]!==n||t[8]!==m||t[9]!==D?(A=D&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:b,href:n,media:m,suppressHydrationWarning:!0}),t[7]=n,t[8]=m,t[9]=D,t[10]=A):A=t[10];let j;t[11]!==i||t[12]!==C||t[13]!==O?(j=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:x,href:i,media:C,suppressHydrationWarning:!0}),t[11]=i,t[12]=C,t[13]=O,t[14]=j):j=t[14];let M;t[15]!==o||t[16]!==w||t[17]!==O?(M=O&&/* @__PURE__ */ v(`link`,{rel:`stylesheet`,id:S,href:o,media:w,suppressHydrationWarning:!0}),t[15]=o,t[16]=w,t[17]=O,t[18]=M):M=t[18];let N;t[19]!==s||t[20]!==T||t[21]!==c?(N=T&&/* @__PURE__ */ v(`script`,{dangerouslySetInnerHTML:{__html:k(s)},nonce:c,suppressHydrationWarning:!0}),t[19]=s,t[20]=T,t[21]=c,t[22]=N):N=t[22];let P;return t[23]!==A||t[24]!==j||t[25]!==M||t[26]!==N?(P=/* @__PURE__ */ y(_,{children:[A,j,M,N]}),t[23]=A,t[24]=j,t[25]=M,t[26]=N,t[27]=P):P=t[27],P}const j=`https://assets.ngrok.com`,M=`${j}/fonts`,N={roobert:`/roobert/roobert-proportional-vf.woff2`,"jetbrains-mono":`/jetbrains/jetbrainsmono-wght.woff2`,"jetbrains-mono-italic":`/jetbrains/jetbrainsmono-italic-wght.woff2`,"family-regular":`/family/family-regular.woff2`,"family-italic":`/family/family-italic.woff2`};function P(e){let t=e.startsWith(`/`)?e:`/${e}`;return`${M}${t}`}function F(e){return`<${P(N[e])}>; rel=preload; as=font; type="font/woff2"; crossorigin`}const I=e=>{let t=h(4),{name:n}=e,r=N[n],i;t[0]===r?i=t[1]:(i=P(r),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=/* @__PURE__ */ v(`link`,{rel:`preload`,href:i,as:`font`,type:`font/woff2`,crossOrigin:`anonymous`}),t[2]=i,t[3]=a),a};export{m as $resolvedTheme,n as $theme,A as MantleStyleSheets,I as PreloadFont,p as PreventWrongThemeFlashScript,c as ThemeProvider,j as assetsCdnOrigin,d as extractThemeCookie,k as fixMediaScriptContent,P as fontHref,a as getStoredTheme,r as isResolvedTheme,u as isTheme,D as mantleStyleSheetUrls,F as preloadFontLink,e as preventWrongThemeFlashScriptContent,l as readThemeFromHtmlElement,s as resolvedThemes,i as themes,f as useAppliedTheme,t as useInitialHtmlThemeProps,o as useTheme};
package/dist/toast.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{s as i}from"./theme-BlCZHClJ.js";import{c as a}from"react/compiler-runtime";import{createContext as o,useContext as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{CheckCircleIcon as u}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as d}from"@phosphor-icons/react/Info";import{WarningIcon as f}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as p}from"@phosphor-icons/react/WarningDiamond";import{Toaster as m,toast as h}from"sonner";function g(e){return typeof e==`number`&&e<=0?1/0:e}const _=t=>{let n=a(13),{className:r,containerAriaLabel:o,dir:s,duration_ms:l,position:u,style:d}=t,f=l===void 0?4e3:l,p=u===void 0?`top-center`:u,h=i(),_;n[0]===r?_=n[1]:(_=e(`toaster overlay-prompt pointer-events-auto *:duration-200`,r),n[0]=r,n[1]=_);let v;n[2]===f?v=n[3]:(v=g(f),n[2]=f,n[3]=v);let y=p??`top-center`,b=h,x;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(x={unstyled:!0},n[4]=x):x=n[4];let S;return n[5]!==o||n[6]!==s||n[7]!==d||n[8]!==_||n[9]!==v||n[10]!==y||n[11]!==b?(S=/* @__PURE__ */ c(m,{"data-slot":`toaster`,className:_,containerAriaLabel:o,dir:s,duration:v,gap:12,position:y,style:d,theme:b,toastOptions:x}),n[5]=o,n[6]=s,n[7]=d,n[8]=_,n[9]=v,n[10]=y,n[11]=b,n[12]=S):S=n[12],S},v=o(``);function y(e,t){let n=g(t?.duration_ms);return h.custom(t=>/* @__PURE__ */ c(v.Provider,{value:t,children:e}),{duration:n,...t?.id?{id:t.id}:{},unstyled:!0})}const b=o({intent:`info`}),x={Root:n=>{let r=a(27),i,o,s,u,d,f;r[0]===n?(i=r[1],o=r[2],s=r[3],u=r[4],d=r[5],f=r[6]):({"data-slot":s,children:i,className:o,intent:u,ref:f,...d}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=u,r[5]=d,r[6]=f);let p;r[7]===u?p=r[8]:(p={intent:u},r[7]=u,r[8]=p);let m=p,h;r[9]===s?h=r[10]:(h=t(s,`toast`),r[9]=s,r[10]=h);let g;r[11]===o?g=r[12]:(g=e(`relative flex items-start gap-2 text-sm font-sans`,`p-3 pl-3.75`,`bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg`,o),r[11]=o,r[12]=g);let _;r[13]===u?_=r[14]:(_=/* @__PURE__ */ c(C,{intent:u}),r[13]=u,r[14]=_);let v;r[15]===i?v=r[16]:(v=/* @__PURE__ */ c(`div`,{"data-slot":`toast-label`,className:`contents`,children:i}),r[15]=i,r[16]=v);let y;r[17]!==d||r[18]!==f||r[19]!==h||r[20]!==g||r[21]!==_||r[22]!==v?(y=/* @__PURE__ */ l(`div`,{"data-slot":h,className:g,ref:f,...d,children:[_,v]}),r[17]=d,r[18]=f,r[19]=h,r[20]=g,r[21]=_,r[22]=v,r[23]=y):y=r[23];let x;return r[24]!==m||r[25]!==y?(x=/* @__PURE__ */ c(b.Provider,{value:m,children:y}),r[24]=m,r[25]=y,r[26]=x):x=r[26],x},Action:n=>{let i=a(21),o,l,u,d,f,p;i[0]===n?(o=i[1],l=i[2],u=i[3],d=i[4],f=i[5],p=i[6]):({"data-slot":u,asChild:o,className:l,onClick:d,ref:p,...f}=n,i[0]=n,i[1]=o,i[2]=l,i[3]=u,i[4]=d,i[5]=f,i[6]=p);let m=s(v),g=o?r:`button`,_;i[7]===u?_=i[8]:(_=t(u,`toast-action`),i[7]=u,i[8]=_);let y;i[9]===l?y=i[10]:(y=e(`shrink-0`,`data-icon-button:-mr-0.5 data-icon-button:-mt-0.5 data-icon-button:rounded-xs`,l),i[9]=l,i[10]=y);let b;i[11]!==m||i[12]!==d?(b=e=>{d?.(e),!e.defaultPrevented&&h.dismiss(m)},i[11]=m,i[12]=d,i[13]=b):b=i[13];let x;return i[14]!==g||i[15]!==f||i[16]!==p||i[17]!==_||i[18]!==y||i[19]!==b?(x=/* @__PURE__ */ c(g,{"data-slot":_,className:y,onClick:b,ref:p,...f}),i[14]=g,i[15]=f,i[16]=p,i[17]=_,i[18]=y,i[19]=b,i[20]=x):x=i[20],x},Icon:r=>{let i=a(54),o,l,m,h,g;i[0]===r?(o=i[1],l=i[2],m=i[3],h=i[4],g=i[5]):({"data-slot":l,className:o,svg:g,ref:h,...m}=r,i[0]=r,i[1]=o,i[2]=l,i[3]=m,i[4]=h,i[5]=g);let _=s(b);switch(_.intent){case`danger`:{let r;i[6]===l?r=i[7]:(r=t(l,`toast-icon`),i[6]=l,i[7]=r);let a;i[8]===o?a=i[9]:(a=e(`text-danger-600`,o),i[8]=o,i[9]=a);let s;i[10]===g?s=i[11]:(s=g??/* @__PURE__ */ c(f,{weight:`fill`}),i[10]=g,i[11]=s);let u;return i[12]!==m||i[13]!==h||i[14]!==r||i[15]!==a||i[16]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[12]=m,i[13]=h,i[14]=r,i[15]=a,i[16]=s,i[17]=u):u=i[17],u}case`warning`:{let r;i[18]===l?r=i[19]:(r=t(l,`toast-icon`),i[18]=l,i[19]=r);let a;i[20]===o?a=i[21]:(a=e(`text-warning-600`,o),i[20]=o,i[21]=a);let s;i[22]===g?s=i[23]:(s=g??/* @__PURE__ */ c(p,{weight:`fill`}),i[22]=g,i[23]=s);let u;return i[24]!==m||i[25]!==h||i[26]!==r||i[27]!==a||i[28]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[24]=m,i[25]=h,i[26]=r,i[27]=a,i[28]=s,i[29]=u):u=i[29],u}case`success`:{let r;i[30]===l?r=i[31]:(r=t(l,`toast-icon`),i[30]=l,i[31]=r);let a;i[32]===o?a=i[33]:(a=e(`text-success-600`,o),i[32]=o,i[33]=a);let s;i[34]===g?s=i[35]:(s=g??/* @__PURE__ */ c(u,{weight:`fill`}),i[34]=g,i[35]=s);let d;return i[36]!==m||i[37]!==h||i[38]!==r||i[39]!==a||i[40]!==s?(d=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[36]=m,i[37]=h,i[38]=r,i[39]=a,i[40]=s,i[41]=d):d=i[41],d}case`info`:{let r;i[42]===l?r=i[43]:(r=t(l,`toast-icon`),i[42]=l,i[43]=r);let a;i[44]===o?a=i[45]:(a=e(`text-accent-600`,o),i[44]=o,i[45]=a);let s;i[46]===g?s=i[47]:(s=g??/* @__PURE__ */ c(d,{weight:`fill`}),i[46]=g,i[47]=s);let u;return i[48]!==m||i[49]!==h||i[50]!==r||i[51]!==a||i[52]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[48]=m,i[49]=h,i[50]=r,i[51]=a,i[52]=s,i[53]=u):u=i[53],u}default:throw Error(`Unreachable Case: ${_.intent}`)}},Message:n=>{let i=a(16),o,s,l,u,d;i[0]===n?(o=i[1],s=i[2],l=i[3],u=i[4],d=i[5]):({"data-slot":l,asChild:o,className:s,ref:d,...u}=n,i[0]=n,i[1]=o,i[2]=s,i[3]=l,i[4]=u,i[5]=d);let f=o?r:`p`,p;i[6]===l?p=i[7]:(p=t(l,`toast-message`),i[6]=l,i[7]=p);let m;i[8]===s?m=i[9]:(m=e(`text-strong flex-1 text-sm font-body`,s),i[8]=s,i[9]=m);let h;return i[10]!==f||i[11]!==u||i[12]!==d||i[13]!==p||i[14]!==m?(h=/* @__PURE__ */ c(f,{"data-slot":p,className:m,ref:d,...u}),i[10]=f,i[11]=u,i[12]=d,i[13]=p,i[14]=m,i[15]=h):h=i[15],h}},S={info:`bg-accent-600`,warning:`bg-warning-600`,success:`bg-success-600`,danger:`bg-danger-600`};function C(t){let n=a(10),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({className:r,intent:i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s=S[i],l;n[4]!==r||n[5]!==s?(l=e(`z-1 absolute -inset-px right-auto w-1.5 rounded-l`,s,r),n[4]=r,n[5]=s,n[6]=l):l=n[6];let u;return n[7]!==o||n[8]!==l?(u=/* @__PURE__ */ c(`div`,{"aria-hidden":!0,className:l,...o}),n[7]=o,n[8]=l,n[9]=u):u=n[9],u}export{x as Toast,_ as Toaster,y as makeToast};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./slot-DdYN1L1C.js";import{s as i}from"./theme-6Q65C1Rx.js";import{c as a}from"react/compiler-runtime";import{createContext as o,useContext as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{CheckCircleIcon as u}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as d}from"@phosphor-icons/react/Info";import{WarningIcon as f}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as p}from"@phosphor-icons/react/WarningDiamond";import{Toaster as m,toast as h}from"sonner";function g(e){return typeof e==`number`&&e<=0?1/0:e}const _=t=>{let n=a(13),{className:r,containerAriaLabel:o,dir:s,duration_ms:l,position:u,style:d}=t,f=l===void 0?4e3:l,p=u===void 0?`top-center`:u,h=i(),_;n[0]===r?_=n[1]:(_=e(`toaster overlay-prompt pointer-events-auto *:duration-200`,r),n[0]=r,n[1]=_);let v;n[2]===f?v=n[3]:(v=g(f),n[2]=f,n[3]=v);let y=p??`top-center`,b=h,x;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(x={unstyled:!0},n[4]=x):x=n[4];let S;return n[5]!==o||n[6]!==s||n[7]!==d||n[8]!==_||n[9]!==v||n[10]!==y||n[11]!==b?(S=/* @__PURE__ */ c(m,{"data-slot":`toaster`,className:_,containerAriaLabel:o,dir:s,duration:v,gap:12,position:y,style:d,theme:b,toastOptions:x}),n[5]=o,n[6]=s,n[7]=d,n[8]=_,n[9]=v,n[10]=y,n[11]=b,n[12]=S):S=n[12],S},v=o(``);function y(e,t){let n=g(t?.duration_ms);return h.custom(t=>/* @__PURE__ */ c(v.Provider,{value:t,children:e}),{duration:n,...t?.id?{id:t.id}:{},unstyled:!0})}const b=o({intent:`info`}),x={Root:n=>{let r=a(27),i,o,s,u,d,f;r[0]===n?(i=r[1],o=r[2],s=r[3],u=r[4],d=r[5],f=r[6]):({"data-slot":s,children:i,className:o,intent:u,ref:f,...d}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=u,r[5]=d,r[6]=f);let p;r[7]===u?p=r[8]:(p={intent:u},r[7]=u,r[8]=p);let m=p,h;r[9]===s?h=r[10]:(h=t(s,`toast`),r[9]=s,r[10]=h);let g;r[11]===o?g=r[12]:(g=e(`relative flex items-start gap-2 text-sm font-sans`,`p-3 pl-3.75`,`bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg`,o),r[11]=o,r[12]=g);let _;r[13]===u?_=r[14]:(_=/* @__PURE__ */ c(C,{intent:u}),r[13]=u,r[14]=_);let v;r[15]===i?v=r[16]:(v=/* @__PURE__ */ c(`div`,{"data-slot":`toast-label`,className:`contents`,children:i}),r[15]=i,r[16]=v);let y;r[17]!==d||r[18]!==f||r[19]!==h||r[20]!==g||r[21]!==_||r[22]!==v?(y=/* @__PURE__ */ l(`div`,{"data-slot":h,className:g,ref:f,...d,children:[_,v]}),r[17]=d,r[18]=f,r[19]=h,r[20]=g,r[21]=_,r[22]=v,r[23]=y):y=r[23];let x;return r[24]!==m||r[25]!==y?(x=/* @__PURE__ */ c(b.Provider,{value:m,children:y}),r[24]=m,r[25]=y,r[26]=x):x=r[26],x},Action:n=>{let i=a(21),o,l,u,d,f,p;i[0]===n?(o=i[1],l=i[2],u=i[3],d=i[4],f=i[5],p=i[6]):({"data-slot":u,asChild:o,className:l,onClick:d,ref:p,...f}=n,i[0]=n,i[1]=o,i[2]=l,i[3]=u,i[4]=d,i[5]=f,i[6]=p);let m=s(v),g=o?r:`button`,_;i[7]===u?_=i[8]:(_=t(u,`toast-action`),i[7]=u,i[8]=_);let y;i[9]===l?y=i[10]:(y=e(`shrink-0`,`data-icon-button:-mr-0.5 data-icon-button:-mt-0.5 data-icon-button:rounded-xs`,l),i[9]=l,i[10]=y);let b;i[11]!==m||i[12]!==d?(b=e=>{d?.(e),!e.defaultPrevented&&h.dismiss(m)},i[11]=m,i[12]=d,i[13]=b):b=i[13];let x;return i[14]!==g||i[15]!==f||i[16]!==p||i[17]!==_||i[18]!==y||i[19]!==b?(x=/* @__PURE__ */ c(g,{"data-slot":_,className:y,onClick:b,ref:p,...f}),i[14]=g,i[15]=f,i[16]=p,i[17]=_,i[18]=y,i[19]=b,i[20]=x):x=i[20],x},Icon:r=>{let i=a(54),o,l,m,h,g;i[0]===r?(o=i[1],l=i[2],m=i[3],h=i[4],g=i[5]):({"data-slot":l,className:o,svg:g,ref:h,...m}=r,i[0]=r,i[1]=o,i[2]=l,i[3]=m,i[4]=h,i[5]=g);let _=s(b);switch(_.intent){case`danger`:{let r;i[6]===l?r=i[7]:(r=t(l,`toast-icon`),i[6]=l,i[7]=r);let a;i[8]===o?a=i[9]:(a=e(`text-danger-600`,o),i[8]=o,i[9]=a);let s;i[10]===g?s=i[11]:(s=g??/* @__PURE__ */ c(f,{weight:`fill`}),i[10]=g,i[11]=s);let u;return i[12]!==m||i[13]!==h||i[14]!==r||i[15]!==a||i[16]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[12]=m,i[13]=h,i[14]=r,i[15]=a,i[16]=s,i[17]=u):u=i[17],u}case`warning`:{let r;i[18]===l?r=i[19]:(r=t(l,`toast-icon`),i[18]=l,i[19]=r);let a;i[20]===o?a=i[21]:(a=e(`text-warning-600`,o),i[20]=o,i[21]=a);let s;i[22]===g?s=i[23]:(s=g??/* @__PURE__ */ c(p,{weight:`fill`}),i[22]=g,i[23]=s);let u;return i[24]!==m||i[25]!==h||i[26]!==r||i[27]!==a||i[28]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[24]=m,i[25]=h,i[26]=r,i[27]=a,i[28]=s,i[29]=u):u=i[29],u}case`success`:{let r;i[30]===l?r=i[31]:(r=t(l,`toast-icon`),i[30]=l,i[31]=r);let a;i[32]===o?a=i[33]:(a=e(`text-success-600`,o),i[32]=o,i[33]=a);let s;i[34]===g?s=i[35]:(s=g??/* @__PURE__ */ c(u,{weight:`fill`}),i[34]=g,i[35]=s);let d;return i[36]!==m||i[37]!==h||i[38]!==r||i[39]!==a||i[40]!==s?(d=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[36]=m,i[37]=h,i[38]=r,i[39]=a,i[40]=s,i[41]=d):d=i[41],d}case`info`:{let r;i[42]===l?r=i[43]:(r=t(l,`toast-icon`),i[42]=l,i[43]=r);let a;i[44]===o?a=i[45]:(a=e(`text-accent-600`,o),i[44]=o,i[45]=a);let s;i[46]===g?s=i[47]:(s=g??/* @__PURE__ */ c(d,{weight:`fill`}),i[46]=g,i[47]=s);let u;return i[48]!==m||i[49]!==h||i[50]!==r||i[51]!==a||i[52]!==s?(u=/* @__PURE__ */ c(n,{"data-slot":r,className:a,ref:h,svg:s,...m}),i[48]=m,i[49]=h,i[50]=r,i[51]=a,i[52]=s,i[53]=u):u=i[53],u}default:throw Error(`Unreachable Case: ${_.intent}`)}},Message:n=>{let i=a(16),o,s,l,u,d;i[0]===n?(o=i[1],s=i[2],l=i[3],u=i[4],d=i[5]):({"data-slot":l,asChild:o,className:s,ref:d,...u}=n,i[0]=n,i[1]=o,i[2]=s,i[3]=l,i[4]=u,i[5]=d);let f=o?r:`p`,p;i[6]===l?p=i[7]:(p=t(l,`toast-message`),i[6]=l,i[7]=p);let m;i[8]===s?m=i[9]:(m=e(`text-strong flex-1 text-sm font-body`,s),i[8]=s,i[9]=m);let h;return i[10]!==f||i[11]!==u||i[12]!==d||i[13]!==p||i[14]!==m?(h=/* @__PURE__ */ c(f,{"data-slot":p,className:m,ref:d,...u}),i[10]=f,i[11]=u,i[12]=d,i[13]=p,i[14]=m,i[15]=h):h=i[15],h}},S={info:`bg-accent-600`,warning:`bg-warning-600`,success:`bg-success-600`,danger:`bg-danger-600`};function C(t){let n=a(10),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({className:r,intent:i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s=S[i],l;n[4]!==r||n[5]!==s?(l=e(`z-1 absolute -inset-px right-auto w-1.5 rounded-l`,s,r),n[4]=r,n[5]=s,n[6]=l):l=n[6];let u;return n[7]!==o||n[8]!==l?(u=/* @__PURE__ */ c(`div`,{"aria-hidden":!0,className:l,...o}),n[7]=o,n[8]=l,n[9]=u):u=n[9],u}export{x as Toast,_ as Toaster,y as makeToast};
@@ -0,0 +1 @@
1
+ import{t as e}from"./use-matches-media-query-m860lols.js";import{n as t}from"./browser-only-Crr3sgA0.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!t()||!window.matchMedia(n).matches}function i(){return!e(n)}export{i as n,r as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./alert-DO00UiQe.js";import{c as t}from"react/compiler-runtime";import{useEffect as n,useLayoutEffect as r,useRef as i}from"react";function a(e,t,n){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function o(r,i){let o=t(6),s;o[0]===i?s=o[1]:(s=i===void 0?{}:i,o[0]=i,o[1]=s);let{active:c}=s,l=c===void 0||c,u,d;o[2]!==l||o[3]!==r?(u=()=>{let t=r.current;if(!l||t==null)return;let n=!t.hasAttribute(`tabindex`);n&&(t.tabIndex=-1);let i=0,o=60,s=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--o,!t.contains(document.activeElement)&&o>0&&(i=requestAnimationFrame(s))};s();let c=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let r=e(t);if(r.length===0){n.preventDefault();return}let i=a(r,document.activeElement,n.shiftKey);i!=null&&(n.preventDefault(),i.focus())};return document.addEventListener(`keydown`,c),()=>{cancelAnimationFrame(i),document.removeEventListener(`keydown`,c),n&&t.removeAttribute(`tabindex`)}},d=[l,r],o[2]=l,o[3]=r,o[4]=u,o[5]=d):(u=o[4],d=o[5]),n(u,d)}function s(e,{active:t=!0}={}){r(()=>{let n=e.current,r=n?.parentElement;if(!t||n==null||r==null)return;let i=/* @__PURE__ */ new Set,a=()=>{for(let e of r.children)e!==n&&e instanceof HTMLElement&&!e.inert&&(e.inert=!0,i.add(e))};a();let o=new MutationObserver(a);return o.observe(r,{childList:!0}),()=>{o.disconnect();for(let e of i)e.inert=!1}},[t,e])}function c({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function l(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function u(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function d(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function f(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function p(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=f(t,n)}function m(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function h(e,a){let o=t(6),s=i(a),f;o[0]===a?f=o[1]:(f=()=>{s.current=a},o[0]=a,o[1]=f),r(f);let h;o[2]===e.current?h=o[3]:(h=()=>{let t=e.current;if(t==null)return;let n=null,r=!1,i=()=>{document.removeEventListener(`pointermove`,a),document.removeEventListener(`pointerup`,o),document.removeEventListener(`pointercancel`,o),n=null},a=e=>{let{direction:t}=s.current,r=t===void 0?`right`:t;if(n==null||e.pointerId!==n.pointerId)return;let a=u(e,r),o=a-n.start;if(!n.dragging){let t=Math.abs(d(e,r)-n.crossStart);if(t>=8&&t>Math.abs(o)){i();return}if(Math.abs(o)<8)return;n.dragging=!0,n.target.style.transition=`none`}let c=e.timeStamp-n.lastTime;c>0&&(n.velocity=(a-n.last)/c),n.last=a,n.lastTime=e.timeStamp,n.offset=Math.max(0,o);let f=o>=0?o:-l(-o,n.size);p(n,f,r)},o=e=>{let{onDismiss:t,threshold:a,flickVelocity:o}=s.current,l=a===void 0?.25:a,u=o===void 0?.4:o;if(n==null||e.pointerId!==n.pointerId)return;let d=n;if(i(),!d.dragging||(r=!0,window.setTimeout(()=>{r=!1},0),m(d),e.type===`pointercancel`))return;let f=e.timeStamp-d.lastTime>100?0:d.velocity;c({...d,velocity:f,threshold:l,flickVelocity:u})&&t()},f=e=>{let{active:r,direction:i,property:c,target:l}=s.current,f=r===void 0||r,p=i===void 0?`right`:i,m=c===void 0?`translate`:c;if(!(typeof f==`function`?f():f)||!e.isPrimary||e.button!==0||n!=null)return;let h=l?.current??t,g=h.getBoundingClientRect(),_=u(e,p);n={target:h,property:typeof m==`function`?m():m,pointerId:e.pointerId,start:_,crossStart:d(e,p),size:p===`left`||p===`right`?g.width:g.height,dragging:!1,last:_,lastTime:e.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,a),document.addEventListener(`pointerup`,o),document.addEventListener(`pointercancel`,o)},h=e=>{r&&(r=!1,e.preventDefault(),e.stopPropagation())};return t.addEventListener(`pointerdown`,f),t.addEventListener(`click`,h,!0),()=>{n?.dragging&&m(n),i(),t.removeEventListener(`pointerdown`,f),t.removeEventListener(`click`,h,!0)}},o[2]=e.current,o[3]=h);let g;o[4]===e?g=o[5]:(g=[e],o[4]=e,o[5]=g),n(h,g)}export{s as n,o as r,h as t};
package/dist/well.d.ts CHANGED
@@ -13,6 +13,13 @@ type WellProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
13
13
  * or your own component, forwarding all class names, `data-*` attributes, and
14
14
  * the ref onto that child.
15
15
  *
16
+ * @useWhen De-emphasize a block of content relative to the surface around it.
17
+ *
18
+ * @siblings
19
+ * - `Card`: the content is primary and needs a raised box, a header, or a footer.
20
+ * - `Empty`: the block is a zero-data state; compose `Empty.Root` inside a `Well` to inset it.
21
+ * - `CodeBlock`: the content is code and needs highlighting and a copy button.
22
+ *
16
23
  * @see https://mantle.ngrok.com/components/structure/well
17
24
  *
18
25
  * @example
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.89.0",
3
+ "version": "0.90.0",
4
4
  "description": "mantle is ngrok's UI library and design system.",
5
5
  "homepage": "https://mantle.ngrok.com",
6
6
  "license": "MIT",
@@ -105,6 +105,7 @@
105
105
  "./slider": "./dist/slider.js",
106
106
  "./slot": "./dist/slot.js",
107
107
  "./split-button": "./dist/split-button.js",
108
+ "./strata": "./dist/strata.js",
108
109
  "./switch": "./dist/switch.js",
109
110
  "./table": "./dist/table.js",
110
111
  "./tabs": "./dist/tabs.js",
@@ -120,7 +121,7 @@
120
121
  "./well": "./dist/well.js"
121
122
  },
122
123
  "dependencies": {
123
- "@ariakit/react": "0.4.41",
124
+ "@ariakit/react": "0.4.42",
124
125
  "@headlessui/react": "2.2.10",
125
126
  "@radix-ui/react-dialog": "1.3.1",
126
127
  "@radix-ui/react-dropdown-menu": "2.2.1",
@@ -134,7 +135,7 @@
134
135
  "@radix-ui/react-tabs": "1.2.1",
135
136
  "@radix-ui/react-tooltip": "1.4.1",
136
137
  "@tanstack/react-table": "9.3.1",
137
- "@tanstack/react-virtual": "3.14.18",
138
+ "@tanstack/react-virtual": "3.14.19",
138
139
  "class-variance-authority": "0.7.1",
139
140
  "cmdk": "1.1.1",
140
141
  "d3-scale": "4.0.2",
@@ -1 +0,0 @@
1
- function e(e){if(e.name===``)return!0;let t=Array.from(e.ownerDocument.querySelectorAll(`input`)).filter(t=>t.type===`radio`&&t.name===e.name&&t.form===e.form&&!t.disabled),n=t.find(e=>e.checked);return n==null?t[0]===e:n===e}function t(t){return!(!(t instanceof HTMLElement)||t.tabIndex<0||t.matches(`:disabled`)||t instanceof HTMLInputElement&&(t.type===`hidden`||t.type===`radio`&&!e(t))||t.closest(`[hidden], [inert]`)!=null||typeof t.checkVisibility==`function`&&!t.checkVisibility({visibilityProperty:!0}))}function n(e){let n=[],r=[];for(let i of e.ownerDocument.querySelectorAll(`a[href], area[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable="false"]), [tabindex]`))!e.contains(i)&&t(i)&&((e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)===0?r.push(i):n.push(i));return r.reverse(),[...n,...r]}export{t as n,n as t};
@@ -1 +0,0 @@
1
- import "./dropdown-menu-CpRsyt_F.js";
@@ -1 +0,0 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{n as t,t as n}from"./cookie-ca4g5CKp.js";import{n as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./use-matches-media-query-m860lols.js";import{c as a}from"react/compiler-runtime";import{createContext as o,useContext as s,useEffect as c,useRef as l,useState as u}from"react";import d from"tiny-invariant";import{jsx as f}from"react/jsx-runtime";const p=[`light`,`dark`,`light-high-contrast`,`dark-high-contrast`],m=[`system`,...p],h=e=>e;function g(e){return typeof e==`string`&&m.includes(e)}const _=e=>e;function v(e){return typeof e==`string`&&p.includes(e)}const y=`(prefers-color-scheme: dark)`,b=`(prefers-contrast: more)`,x=`mantle-ui-theme`,S=`system`,C=o(null);function w(e){let t=a(14),{children:n,forceTheme:i,ssrCookie:o}=e,s;t[0]!==i||t[1]!==o?(s=()=>{let e=F({cookie:r()?document.cookie:o});return E(e,{forceTheme:i}),e},t[0]=i,t[1]=o,t[2]=s):s=t[2];let[d,p]=u(s),m=l(null),h,_;t[3]===i?(h=t[4],_=t[5]):(h=()=>{let e=function(e){let t=e??F({cookie:document.cookie});p(t),E(t,{forceTheme:i})};e();try{`BroadcastChannel`in window&&(m.current=new BroadcastChannel(x),m.current.addEventListener(`message`,t=>{let n=t?.data?.theme;g(n)&&e(n)}))}catch{}let t=function(t){t.key===`${x}__ping`&&e()};window.addEventListener(`storage`,t);let n=window.matchMedia(y),r=window.matchMedia(b),a=function(){e()},o=function(){document.visibilityState===`visible`&&e()};return n.addEventListener(`change`,a),r.addEventListener(`change`,a),window.addEventListener(`pageshow`,a),document.addEventListener(`visibilitychange`,o),()=>{window.removeEventListener(`storage`,t),n.removeEventListener(`change`,a),r.removeEventListener(`change`,a),window.removeEventListener(`pageshow`,a),document.removeEventListener(`visibilitychange`,o),B(m.current),m.current=null}},_=[i],t[3]=i,t[4]=h,t[5]=_),c(h,_);let v;t[6]===i?v=t[7]:(v=e=>{z(e),p(e),E(e,{forceTheme:i}),L(e,{broadcastChannel:m.current,pingKey:`${x}__ping`})},t[6]=i,t[7]=v);let S;t[8]!==v||t[9]!==d?(S=[d,v],t[8]=v,t[9]=d,t[10]=S):S=t[10];let w=S,T;return t[11]!==n||t[12]!==w?(T=/* @__PURE__ */ f(C.Provider,{value:w,children:n}),t[11]=n,t[12]=w,t[13]=T):T=t[13],T}function T(){let e=s(C);return d(e,`useTheme must be used within a ThemeProvider`),e}function E(e,{forceTheme:t}={}){if(!r())return;let n=window.document.documentElement,i=window.matchMedia(y).matches,a=window.matchMedia(b).matches,o=t??O(e,{prefersDarkMode:i,prefersHighContrast:a}),s=n.dataset.theme,c=n.dataset.appliedTheme,l=g(s)?s:void 0,u=v(c)?c:void 0;(l!==e||u!==o)&&(n.classList.remove(...p),n.classList.add(o),n.dataset.theme=e,n.dataset.appliedTheme=o)}function D(){if(!r())return{appliedTheme:void 0,theme:void 0};let e=window.document.documentElement,t=g(e.dataset.theme)?e.dataset.theme:void 0;return{appliedTheme:v(e.dataset.appliedTheme)?e.dataset.appliedTheme:void 0,theme:t}}function O(e,{prefersDarkMode:t,prefersHighContrast:n}){return e===`system`?A({prefersDarkMode:t,prefersHighContrast:n}):e}function k(){let e=a(4),t=s(C),n=t==null?`system`:t[0],r=i(y),o=i(b),c;return e[0]!==r||e[1]!==o||e[2]!==n?(c=O(n,{prefersDarkMode:r,prefersHighContrast:o}),e[0]=r,e[1]=o,e[2]=n,e[3]=c):c=e[3],c}function A({prefersDarkMode:e,prefersHighContrast:t}){return t?e?`dark-high-contrast`:`light-high-contrast`:e?`dark`:`light`}function j(e){let{storageKey:t,defaultTheme:n,themes:r,resolvedThemes:i,prefersDarkModeMediaQuery:a,prefersHighContrastMediaQuery:o,forceTheme:s}=e;function c(e){return typeof e==`string`&&r.includes(e)}function l(e){let t=document.cookie;if(!t)return null;try{let n=t.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.trim().slice(e.length+1);return n?decodeURIComponent(n):null}catch{return null}}function u(e,t){let n=/* @__PURE__ */ new Date;n.setFullYear(n.getFullYear()+1);let r=window.location.hostname,i=window.location.protocol,a=r===`ngrok.com`||r.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,o=i===`https:`?`; Secure`:``;return`${e}=${encodeURIComponent(t)}; expires=${n.toUTCString()}; path=/${a}; SameSite=Lax${o}`}function d(e,t){try{document.cookie=u(e,t)}catch{}}function f(e,t,n){return e===`system`?n?t?`dark-high-contrast`:`light-high-contrast`:t?`dark`:`light`:e}let p=null,m=null,h=null;try{p=l(t)}catch{}if(c(p))h=p;else{try{m=window.localStorage?.getItem(t)??null}catch{}c(m)&&(h=m)}let g=c(h)?h:n,_=matchMedia(a).matches,v=matchMedia(o).matches,y=s??f(g,_,v),b=document.documentElement;if(b.dataset.appliedTheme!==y||b.dataset.theme!==g){for(let e of i)b.classList.remove(e);b.classList.add(y),b.dataset.theme=g,b.dataset.appliedTheme=y}let x=c(p);try{if(c(m)&&!x){d(t,m);try{window.localStorage.removeItem(t)}catch{}}else x||d(t,g)}catch{}}function M(e){let t={storageKey:x,defaultTheme:S,themes:m,resolvedThemes:p,prefersDarkModeMediaQuery:y,prefersHighContrastMediaQuery:b,forceTheme:e};return`(${j.toString()})(${JSON.stringify(t)})`}const N=e=>{let t=a(7),{forceTheme:n,nonce:r}=e,i;t[0]===n?i=t[1]:(i=M(n),t[0]=n,t[1]=i);let o;t[2]===i?o=t[3]:(o={__html:i},t[2]=i,t[3]=o);let s;return t[4]!==r||t[5]!==o?(s=/* @__PURE__ */ f(`script`,{dangerouslySetInnerHTML:o,nonce:r,suppressHydrationWarning:!0}),t[4]=r,t[5]=o,t[6]=s):s=t[6],s};function P(t){let n=a(16),i;n[0]===t?i=n[1]:(i=t===void 0?{}:t,n[0]=t,n[1]=i);let o=i,s;n[2]===o?s=n[3]:(s=o??{},n[2]=o,n[3]=s);let{className:c,forceTheme:l,ssrCookie:u}=s,d=c===void 0?``:c,f,p;if(r()){let e;if(n[7]===Symbol.for(`react.memo_cache_sentinel`)){let t=window.matchMedia(y).matches,r=window.matchMedia(b).matches;f=F({cookie:document.cookie}),e=O(f,{prefersDarkMode:t,prefersHighContrast:r}),n[7]=e,n[8]=f}else e=n[7],f=n[8];p=e}else{let e;n[4]===u?(e=n[5],f=n[6]):(f=F({cookie:u}),e=O(f,{prefersDarkMode:!1,prefersHighContrast:!1}),n[4]=u,n[5]=e,n[6]=f),p=e}let m=l??p,h;n[9]!==m||n[10]!==d?(h=e(d,m),n[9]=m,n[10]=d,n[11]=h):h=n[11];let g;return n[12]!==m||n[13]!==f||n[14]!==h?(g={className:h,"data-applied-theme":m,"data-theme":f},n[12]=m,n[13]=f,n[14]=h,n[15]=g):g=n[15],g}function F({cookie:e}){if(!e)return S;let n=t(e,x);return g(n)?n:S}function I(e){return n(e,x)}function L(e,t){let{broadcastChannel:n,pingKey:r}=t;try{if(n){n.postMessage({theme:e,timestamp:Date.now()});return}}catch{}try{localStorage.setItem(r,JSON.stringify({theme:e,timestamp:Date.now()}))}catch{}}function R(e){let t=/* @__PURE__ */ new Date;t.setFullYear(t.getFullYear()+1);let{hostname:n,protocol:r}=window.location,i=n===`ngrok.com`||n.endsWith(`.ngrok.com`)?`; domain=.ngrok.com`:``,a=r===`https:`?`; Secure`:``;return`${x}=${encodeURIComponent(e)}; expires=${t.toUTCString()}; path=/${i}; SameSite=Lax${a}`}function z(e){if(r())try{document.cookie=R(e)}catch{}}function B(e){if(e!=null)try{e.close()}catch{}}export{M as a,P as c,h as d,v as f,m as h,F as i,T as l,p as m,w as n,D as o,g as p,I as r,k as s,N as t,_ as u};
@@ -1 +0,0 @@
1
- import{n as e}from"./browser-only-Crr3sgA0.js";import{t}from"./use-matches-media-query-m860lols.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!e()||!window.matchMedia(n).matches}function i(){return!t(n)}export{i as n,r as t};