@ngrok/mantle 0.89.0 → 0.90.1
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.
- package/dist/agent.json +1529 -1
- package/dist/alert-DO00UiQe.js +1 -0
- package/dist/{alert-CZYYlx9q.js → alert-ZaUBtgno.js} +1 -1
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/app-layout.d.ts +68 -13
- package/dist/app-layout.js +1 -1
- package/dist/card.d.ts +7 -0
- package/dist/combobox.d.ts +1 -1
- package/dist/command.js +1 -1
- package/dist/{dialog-BDzapPLR.js → dialog-CaGJD02w.js} +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpRsyt_F.d.ts → dropdown-menu-Cef0Cz2B.d.ts} +1 -1
- package/dist/dropdown-menu-DMA8dGxZ.d.ts +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/empty.d.ts +7 -0
- package/dist/flag.d.ts +1 -1
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +251 -1
- package/dist/hooks.js +1 -1
- package/dist/{icons-BMZnm4hM.js → icons-CAtjMNti.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/input.js +1 -1
- package/dist/llms.txt +117 -2
- package/dist/mantle.css +9 -0
- package/dist/migrations/0002-data-table-action-header.yml +526 -0
- package/dist/migrations/0003-dialog-footer-dom-order.yml +271 -0
- package/dist/migrations/0004-priority-to-intent.yml +1728 -0
- package/dist/migrations/0005-field-item-owns-control-id.yml +234 -0
- package/dist/migrations/0006-data-table-tanstack-v9.yml +423 -0
- package/dist/migrations/0008-tabs-separator.yml +1212 -0
- package/dist/migrations/0009-chart-root-mode.yml +871 -0
- package/dist/multi-select.d.ts +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/{primitive-B-6XILB2.js → primitive-AGoxSJBI.js} +1 -1
- package/dist/sandbar.js +1 -1
- package/dist/{select-CxXb3aiC.d.ts → select-DlohFa54.d.ts} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/{separator-HzGvuD0B.d.ts → separator-BWGjCIl7.d.ts} +7 -0
- package/dist/separator.d.ts +1 -1
- package/dist/{sheet-DND_KjmS.js → sheet-H8zvhSuA.js} +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +17 -10
- package/dist/sidebar.js +1 -1
- package/dist/split-button.d.ts +1 -1
- package/dist/strata.d.ts +548 -0
- package/dist/strata.js +1 -0
- package/dist/tabs.d.ts +12 -2
- package/dist/tabs.js +1 -1
- package/dist/theme-6Q65C1Rx.js +1 -0
- package/dist/theme-switcher.d.ts +2 -2
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/truncated-text.d.ts +9 -1
- package/dist/truncated-text.js +1 -1
- package/dist/use-prefers-reduced-motion-DimzRx-M.js +1 -0
- package/dist/use-swipe-to-dismiss-Cj-AayFd.js +1 -0
- package/dist/well.d.ts +7 -0
- package/package.json +4 -3
- package/dist/alert-vfeV_hso.js +0 -1
- package/dist/dropdown-menu-CWUzGFgf.d.ts +0 -1
- package/dist/theme-BlCZHClJ.js +0 -1
- package/dist/use-prefers-reduced-motion-Cj9tJ181.js +0 -1
package/dist/theme-switcher.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
2
2
|
import { t as WithStyleProps } from "./with-style-props-Dq5Vntqy.js";
|
|
3
3
|
import { n as IconButtonProps, r as IconButtonAppearance } from "./button-DL7V4bzW.js";
|
|
4
|
-
import { t as DropdownMenu } from "./dropdown-menu-
|
|
5
|
-
import "./dropdown-menu-
|
|
4
|
+
import { t as DropdownMenu } from "./dropdown-menu-Cef0Cz2B.js";
|
|
5
|
+
import "./dropdown-menu-DMA8dGxZ.js";
|
|
6
6
|
import { ComponentProps } from "react";
|
|
7
7
|
//#region src/components/theme-switcher/theme-switcher.d.ts
|
|
8
8
|
/**
|
package/dist/theme-switcher.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./data-slot-EM6s2WEU.js";import{t}from"./icon-kK0c-POG.js";import{t as n}from"./button-BMfUxs_j.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-zfqoDAxT.js";import{t as a}from"./dropdown-menu-CutWQ0bl.js";import{d as o,h as s,l as c,p as l}from"./theme-
|
|
1
|
+
import{t as e}from"./data-slot-EM6s2WEU.js";import{t}from"./icon-kK0c-POG.js";import{t as n}from"./button-BMfUxs_j.js";import{t as r}from"./browser-only-Crr3sgA0.js";import{t as i}from"./skeleton-zfqoDAxT.js";import{t as a}from"./dropdown-menu-CutWQ0bl.js";import{d as o,h as s,l as c,p as l}from"./theme-6Q65C1Rx.js";import{n as u,t as d}from"./icons-CAtjMNti.js";import{c as f}from"react/compiler-runtime";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h={system:`System Preference`,light:`Light Mode`,dark:`Dark Mode`,"light-high-contrast":`Light High Contrast`,"dark-high-contrast":`Dark High Contrast`},g=e=>{let t=f(10),{"aria-label":n,"aria-labelledby":r,className:i,style:o}=e,[u,d]=c(),m=r==null?n??`Theme`:n,h;t[0]===d?h=t[1]:(h=e=>{l(e)&&d(e)},t[0]=d,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=s.map(v),t[2]=g):g=t[2];let _;return t[3]!==r||t[4]!==i||t[5]!==u||t[6]!==o||t[7]!==m||t[8]!==h?(_=/* @__PURE__ */ p(a.RadioGroup,{"aria-label":m,"aria-labelledby":r,"data-slot":`theme-dropdown-menu-radio-group`,className:i,style:o,value:u,onValueChange:h,children:g}),t[3]=r,t[4]=i,t[5]=u,t[6]=o,t[7]=m,t[8]=h,t[9]=_):_=t[9],_},_={Root:e=>{let t=f(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ p(a.Root,{...e}),t[0]=e,t[1]=n),n},Trigger:t=>{let o=f(20),s,c,l,u,d,m;o[0]===t?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],m=o[6]):({appearance:d,"data-slot":s,disabled:c,label:m,ref:u,...l}=t,o[0]=t,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=m);let h=d===void 0?`ghost`:d,g=m===void 0?`Change Theme`:m,_;o[7]===s?_=o[8]:(_=e(s,`theme-switcher-trigger`),o[7]=s,o[8]=_);let v;o[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=/* @__PURE__ */ p(r,{fallback:/* @__PURE__ */ p(i,{asChild:!0,className:`rounded-full size-5`,children:/* @__PURE__ */ p(`span`,{})}),children:y}),o[9]=v):v=o[9];let b;o[10]!==h||o[11]!==c||o[12]!==g||o[13]!==l||o[14]!==u||o[15]!==_?(b=/* @__PURE__ */ p(n,{ref:u,appearance:h,disabled:c,"data-slot":_,intent:`neutral`,icon:v,label:g,...l}),o[10]=h,o[11]=c,o[12]=g,o[13]=l,o[14]=u,o[15]=_,o[16]=b):b=o[16];let x;return o[17]!==c||o[18]!==b?(x=/* @__PURE__ */ p(a.Trigger,{asChild:!0,disabled:c,children:b}),o[17]=c,o[18]=b,o[19]=x):x=o[19],x},Content:t=>{let n=f(12),r,i,o;n[0]===t?(r=n[1],i=n[2],o=n[3]):({children:r,"data-slot":i,...o}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===i?s=n[5]:(s=e(i,`theme-switcher-content`),n[4]=i,n[5]=s);let c;n[6]===r?c=n[7]:(c=r??/* @__PURE__ */ p(g,{}),n[6]=r,n[7]=c);let l;return n[8]!==o||n[9]!==s||n[10]!==c?(l=/* @__PURE__ */ p(a.Content,{"data-slot":s,...o,children:c}),n[8]=o,n[9]=s,n[10]=c,n[11]=l):l=n[11],l}};function v(e){return/* @__PURE__ */ m(a.RadioItem,{value:o(e),children:[/* @__PURE__ */ p(t,{svg:/* @__PURE__ */ p(u,{theme:e})}),h[e]]},e)}function y(){return/* @__PURE__ */ p(d,{className:`size-5`})}export{g as ThemeDropdownMenuRadioGroup,_ as ThemeSwitcher};
|
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-
|
|
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-
|
|
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};
|
package/dist/truncated-text.d.ts
CHANGED
|
@@ -86,6 +86,14 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
|
|
|
86
86
|
* reader announces the whole value, and the tooltip opens. A value that fits is
|
|
87
87
|
* not a tab stop. A `tabIndex` prop wins in both states.
|
|
88
88
|
*
|
|
89
|
+
* Inside a control (a `<button>`, an `<a href>`, a radio, a menu item, a tab)
|
|
90
|
+
* the root takes no tab stop and opens no tooltip, because a control cannot
|
|
91
|
+
* hold a second one. The segments still clip, `data-truncated` still lands,
|
|
92
|
+
* and the hidden copy gives the control's accessible name the whole value.
|
|
93
|
+
* Wrap the control in `Tooltip` when a sighted reader needs the full value.
|
|
94
|
+
* The server render and the first client render assume no control, like they
|
|
95
|
+
* assume no overflow; each commit after that reads the DOM again.
|
|
96
|
+
*
|
|
89
97
|
* **Accessibility.** The two visible segments are `aria-hidden`, because
|
|
90
98
|
* Chromium puts a space between two inline-block boxes in an accessible name.
|
|
91
99
|
* A visually hidden `<span data-slot="truncated-text-value">` holds the whole
|
|
@@ -110,7 +118,7 @@ type TruncatedTextProps = Omit<ComponentProps<"span">, "children" | "translate">
|
|
|
110
118
|
* | `data-slot` | `"truncated-text-tail"` | On the `<span>` that stays visible. Holds the last `tail` graphemes. |
|
|
111
119
|
* | `data-slot` | `"truncated-text-value"` | On the visually hidden `<span>` that holds the whole value for assistive technology. |
|
|
112
120
|
* | `data-truncated` | present while the value overflows | Presence-only. Style with `data-truncated:`. Absent on the server render. |
|
|
113
|
-
* | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state Radix stamps on the root.
|
|
121
|
+
* | `data-state` | `"closed"` \| `"delayed-open"` \| `"instant-open"` | The tooltip state Radix stamps on the root. Absent inside a control. |
|
|
114
122
|
*
|
|
115
123
|
* @see https://mantle.ngrok.com/components/data-display/truncated-text
|
|
116
124
|
*
|
package/dist/truncated-text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./slot-DdYN1L1C.js";import{t as a}from"./css-properties-D85fCNV3.js";import{t as o}from"./tooltip-NhYXqStK.js";import{c as ee}from"react/compiler-runtime";import{Children as s,cloneElement as te,isValidElement as ne,useRef as re,useState as c}from"react";import
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-sFdxsL7k.js";import{t as n}from"./cx-CK7o_rVv.js";import{t as r}from"./data-slot-EM6s2WEU.js";import{t as i}from"./slot-DdYN1L1C.js";import{t as a}from"./css-properties-D85fCNV3.js";import{t as o}from"./tooltip-NhYXqStK.js";import{c as ee}from"react/compiler-runtime";import{Children as s,cloneElement as te,isValidElement as ne,useRef as re,useState as c}from"react";import ie from"tiny-invariant";import{Fragment as ae,jsx as l,jsxs as oe}from"react/jsx-runtime";import{Root as se,Trigger as ce}from"@radix-ui/react-tooltip";let u;function le(e,t){ie(Number.isInteger(t)&&t>=0,`TruncatedText: \`tail\` must be a non-negative integer, received ${String(t)}.`),u??=new Intl.Segmenter(void 0,{granularity:`grapheme`});let n=Array.from(u.segment(e),e=>e.segment);if(n.length<=t)return{head:``,tail:e,tailGraphemes:n.length};let r=n.length-t;return{head:n.slice(0,r).join(``),tail:n.slice(r).join(``),tailGraphemes:t}}function d(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect().width}function f(e){let t=getComputedStyle(e),n=[t.paddingLeft,t.paddingRight,t.borderLeftWidth,t.borderRightWidth].reduce((e,t)=>e+(Number.parseFloat(t)||0),0);return e.getBoundingClientRect().width-n}function ue(e,t,n){let r=d(n);return{tailWidth:r,truncated:d(t)+r>f(e)+.5}}function de(e){return e.parentElement?.closest(`a[href], button, input, select, textarea, summary, [contenteditable=""], [contenteditable="true"], [role="button"], [role="checkbox"], [role="link"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="radio"], [role="switch"], [role="tab"], [role="treeitem"]`)!=null}const fe=String.raw`inline-block overflow-hidden text-ellipsis whitespace-nowrap align-bottom before:content-['\200B'] max-w-[calc(100%_-_var(--_tail-width)_+_0.5px)] [[data-truncated]>&]:max-w-[max(1ch_+_0.5px,calc(round(down,100%_-_var(--_tail-width),1ch)_+_0.5px))]`,pe=e=>{let t=ee(8),n,r,a;if(t[0]!==e){let{"aria-describedby":i,asChild:o,describedBy:ee,...s}=e;a=o,n=ee,r=s,t[0]=e,t[1]=n,t[2]=r,t[3]=a}else n=t[1],r=t[2],a=t[3];let o=a!==void 0&&a?i:`span`,s;return t[4]!==o||t[5]!==n||t[6]!==r?(s=/* @__PURE__ */ l(o,{"aria-describedby":n,...r}),t[4]=o,t[5]=n,t[6]=r,t[7]=s):s=t[7],s},p=i=>{let u=ee(83),d,f,p,m,h,g,_,v,y,b,x,S,C,w;u[0]===i?(d=u[1],f=u[2],p=u[3],m=u[4],h=u[5],g=u[6],_=u[7],v=u[8],y=u[9],b=u[10],x=u[11],S=u[12],C=u[13],w=u[14]):({"aria-describedby":m,asChild:b,children:d,className:f,"data-slot":p,onFocus:h,onPointerMove:g,ref:v,style:y,tabIndex:C,tail:x,translate:S,value:w,..._}=i,u[0]=i,u[1]=d,u[2]=f,u[3]=p,u[4]=m,u[5]=h,u[6]=g,u[7]=_,u[8]=v,u[9]=y,u[10]=b,u[11]=x,u[12]=S,u[13]=C,u[14]=w);let me=b!==void 0&&b,T=x===void 0?8:x,E=S===void 0?`no`:S,D;u[15]!==T||u[16]!==w?(D=le(w,T),u[15]=T,u[16]=w,u[17]=D):D=u[17];let{head:O,tail:k,tailGraphemes:he}=D,[A,ge]=c(null),_e=re(null),ve=re(null),ye=t(v,ge),[be,xe]=c(null),[Se,Ce]=c(!1),[j,we]=c(!1),M=be?.truncated===!0,N;u[18]===A?N=u[19]:(N=()=>{A?.isConnected&&we(de(A))},u[18]=A,u[19]=N),e(N);let P;u[20]===A?P=u[21]:(P=()=>{let e=_e.current,t=ve.current;if(A==null||e==null||t==null)return;let n=()=>{let n=ue(A,e,t);xe(e=>e!=null&&e.tailWidth===n.tailWidth&&e.truncated===n.truncated?e:n),n.truncated||Ce(!1)};n();let r=new ResizeObserver(n);return r.observe(A),r.observe(t),()=>{r.disconnect()}},u[20]=A,u[21]=P);let F;u[22]!==A||u[23]!==T||u[24]!==w?(F=[A,w,T],u[22]=A,u[23]=T,u[24]=w,u[25]=F):F=u[25],e(P,F);let Te=be==null?`${he}ch`:`${be.tailWidth}px`,I;u[26]===w?I=u[27]:(I=/* @__PURE__ */ l(`span`,{"data-slot":`truncated-text-value`,className:`sr-only select-none`,children:w}),u[26]=w,u[27]=I);let L;u[28]===O?L=u[29]:(L=/* @__PURE__ */ l(`span`,{ref:_e,"aria-hidden":!0,"data-slot":`truncated-text-head`,className:fe,children:O}),u[28]=O,u[29]=L);let R;u[30]===k?R=u[31]:(R=/* @__PURE__ */ l(`span`,{ref:ve,"aria-hidden":!0,"data-slot":`truncated-text-tail`,dir:`rtl`,className:`inline-block overflow-hidden whitespace-nowrap text-left align-bottom min-w-(--_tail-width) [[data-truncated]>&]:min-w-0 [[data-truncated]>&]:max-w-[calc(round(down,100%_-_1ch_-_var(--_tail-width),1ch)_+_var(--_tail-width))] [[data-truncated]>:empty+&]:max-w-[calc(round(down,100%_-_var(--_tail-width),1ch)_+_var(--_tail-width)_+_0.5px)] [[data-truncated]>:empty+&]:text-ellipsis`,children:/* @__PURE__ */ l(`span`,{dir:`ltr`,children:k})}),u[30]=k,u[31]=R);let z;u[32]!==R||u[33]!==I||u[34]!==L?(z=/* @__PURE__ */ oe(ae,{children:[I,L,R]}),u[32]=R,u[33]=I,u[34]=L,u[35]=z):z=u[35];let B=z,V;u[36]===p?V=u[37]:(V=r(p,`truncated-text`),u[36]=p,u[37]=V);let Ee=M?``:void 0,H;u[38]===f?H=u[39]:(H=n(`inline-block min-w-0 max-w-full rounded whitespace-nowrap select-all [font-variant-ligatures:none] focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent data-truncated:cursor-help`,f),u[38]=f,u[39]=H);let U;u[40]!==y||u[41]!==Te?(U=a({"--_tail-width":Te,...y}),u[40]=y,u[41]=Te,u[42]=U):U=u[42];let De=M&&!j?C??0:C,W;u[43]!==j||u[44]!==M||u[45]!==g?(W=e=>{g?.(e),!M&&!j&&e.preventDefault()},u[43]=j,u[44]=M,u[45]=g,u[46]=W):W=u[46];let G;u[47]!==j||u[48]!==M||u[49]!==h?(G=e=>{h?.(e),!M&&!j&&e.preventDefault()},u[47]=j,u[48]=M,u[49]=h,u[50]=G):G=u[50];let K;u[51]!==ye||u[52]!==_||u[53]!==V||u[54]!==Ee||u[55]!==H||u[56]!==U||u[57]!==De||u[58]!==W||u[59]!==G||u[60]!==E?(K={ref:ye,"data-slot":V,"data-truncated":Ee,dir:`ltr`,className:H,style:U,tabIndex:De,onPointerMove:W,onFocus:G,translate:E,..._},u[51]=ye,u[52]=_,u[53]=V,u[54]=Ee,u[55]=H,u[56]=U,u[57]=De,u[58]=W,u[59]=G,u[60]=E,u[61]=K):K=u[61];let q=K,J;if(me){let e;if(u[62]!==d||u[63]!==m||u[64]!==q||u[65]!==B){let t=s.only(d);ie(ne(t),"When using `asChild`, TruncatedText must be passed a single child as a JSX tag."),ie(t.props.children==null,"When using `asChild`, the child of TruncatedText must have no children of its own. `value` is the content."),e=/* @__PURE__ */ l(pe,{asChild:!0,describedBy:m,...q,children:te(t,{},B)}),u[62]=d,u[63]=m,u[64]=q,u[65]=B,u[66]=e}else e=u[66];J=e}else{let e;u[67]!==m||u[68]!==q||u[69]!==B?(e=/* @__PURE__ */ l(pe,{describedBy:m,...q,children:B}),u[67]=m,u[68]=q,u[69]=B,u[70]=e):e=u[70],J=e}if(j)return J;let Y=M&&Se,X;u[71]===M?X=u[72]:(X=e=>Ce(M&&e),u[71]=M,u[72]=X);let Z;u[73]===J?Z=u[74]:(Z=/* @__PURE__ */ l(ce,{asChild:!0,children:J}),u[73]=J,u[74]=Z);let Q;u[75]!==E||u[76]!==w?(Q=/* @__PURE__ */ l(o.Content,{className:`break-all`,translate:E,children:w}),u[75]=E,u[76]=w,u[77]=Q):Q=u[77];let $;return u[78]!==Y||u[79]!==X||u[80]!==Z||u[81]!==Q?($=/* @__PURE__ */ oe(se,{open:Y,onOpenChange:X,children:[Z,Q]}),u[78]=Y,u[79]=X,u[80]=Z,u[81]=Q,u[82]=$):$=u[82],$};export{p as TruncatedText};
|
|
@@ -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.
|
|
3
|
+
"version": "0.90.1",
|
|
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.
|
|
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.
|
|
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",
|
package/dist/alert-vfeV_hso.js
DELETED
|
@@ -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";
|
package/dist/theme-BlCZHClJ.js
DELETED
|
@@ -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};
|