@ngrok/mantle 0.91.0 → 0.92.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 (142) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/agent.json +5 -2
  3. package/dist/{alert-BV0VWU2o.d.ts → alert-BcSBNR3S.d.ts} +2 -2
  4. package/dist/alert-P9lwn25X.js +1 -0
  5. package/dist/alert-center.d.ts +1 -1
  6. package/dist/alert-center.js +1 -1
  7. package/dist/alert-dialog.d.ts +19 -1
  8. package/dist/alert-dialog.js +1 -1
  9. package/dist/alert.d.ts +1 -1
  10. package/dist/alert.js +1 -1
  11. package/dist/app-layout.d.ts +7 -21
  12. package/dist/app-layout.js +1 -1
  13. package/dist/area-chart.d.ts +10 -3
  14. package/dist/area-chart.js +1 -1
  15. package/dist/bar-chart.d.ts +9 -3
  16. package/dist/bar-chart.js +1 -1
  17. package/dist/breadcrumb.js +1 -1
  18. package/dist/browser-only-BTSrYWLj.js +1 -0
  19. package/dist/browser-only.js +1 -1
  20. package/dist/{button-Cwrv2Mwv.js → button-B8k98Pby.js} +1 -1
  21. package/dist/button-BQZ6eoD3.js +1 -0
  22. package/dist/{button-Dt9LZMT5.d.ts → button-BX-4lYUn.d.ts} +3 -3
  23. package/dist/{button-BOCRKR5v.d.ts → button-CPsKGDK0.d.ts} +52 -1
  24. package/dist/button-Dge0D5bl.js +1 -0
  25. package/dist/{button-BFAvonp1.d.ts → button-Yxyu1XMd.d.ts} +1 -1
  26. package/dist/button.d.ts +3 -3
  27. package/dist/button.js +1 -1
  28. package/dist/calendar.js +1 -1
  29. package/dist/card.d.ts +1 -1
  30. package/dist/chart-BpWfQAwf.js +2 -0
  31. package/dist/{chart-ynMysD16.d.ts → chart-BpfbtOUN.d.ts} +14 -0
  32. package/dist/{checkbox-BpW9TmW6.js → checkbox-DmSQXs26.js} +1 -1
  33. package/dist/checkbox.js +1 -1
  34. package/dist/{choice-U6_8mOOO.js → choice-2Lrv8_nl.js} +1 -1
  35. package/dist/choice.js +1 -1
  36. package/dist/code-block.js +6 -6
  37. package/dist/combobox.d.ts +79 -1
  38. package/dist/combobox.js +1 -1
  39. package/dist/command.d.ts +5 -1
  40. package/dist/command.js +1 -1
  41. package/dist/{copy-to-clipboard-Cza2OT47.js → copy-to-clipboard-DInu78k_.js} +1 -1
  42. package/dist/data-table.d.ts +2 -2
  43. package/dist/data-table.js +1 -1
  44. package/dist/description-list.d.ts +1 -1
  45. package/dist/{dialog-DedsCsnk.d.ts → dialog-2fRO4ca4.d.ts} +19 -1
  46. package/dist/dialog-qordIos1.js +1 -0
  47. package/dist/dialog.d.ts +1 -1
  48. package/dist/dialog.js +1 -1
  49. package/dist/dropdown-menu-CLHkKzhe.js +1 -0
  50. package/dist/{dropdown-menu-ByQQIsQE.d.ts → dropdown-menu-CpjRwMWe.d.ts} +1 -1
  51. package/dist/dropdown-menu.d.ts +1 -1
  52. package/dist/dropdown-menu.js +1 -1
  53. package/dist/field.d.ts +1 -1
  54. package/dist/field.js +1 -1
  55. package/dist/hooks.d.ts +15 -1
  56. package/dist/hooks.js +1 -1
  57. package/dist/hover-card.js +1 -1
  58. package/dist/{icons-DykpsXNX.js → icons-DGL0d2Il.js} +1 -1
  59. package/dist/icons.js +1 -1
  60. package/dist/{index-C6s5cGCr.d.ts → index-BhfgyurF.d.ts} +9 -9
  61. package/dist/input.js +1 -1
  62. package/dist/line-chart.d.ts +10 -3
  63. package/dist/line-chart.js +1 -1
  64. package/dist/list-RFRIQxU2.js +1 -0
  65. package/dist/list.js +1 -1
  66. package/dist/llms.txt +2 -2
  67. package/dist/mantle.css +424 -16
  68. package/dist/migrations/0012-single-stylesheet.yml +1971 -0
  69. package/dist/multi-select.d.ts +1 -1
  70. package/dist/multi-select.js +1 -1
  71. package/dist/pagination.d.ts +2 -2
  72. package/dist/pagination.js +1 -1
  73. package/dist/popover-BCGCpwkK.js +1 -0
  74. package/dist/popover.js +1 -1
  75. package/dist/progress.js +1 -1
  76. package/dist/radio-group.js +1 -1
  77. package/dist/sandbar.d.ts +1 -1
  78. package/dist/sandbar.js +1 -1
  79. package/dist/scatter-plot.d.ts +10 -4
  80. package/dist/scatter-plot.js +1 -1
  81. package/dist/{select-CRp_ndSJ.d.ts → select-BkhBxtOT.d.ts} +1 -1
  82. package/dist/{select-iMsy6TFv.js → select-MjJMGqwP.js} +1 -1
  83. package/dist/select.d.ts +1 -1
  84. package/dist/select.js +1 -1
  85. package/dist/selectable-list.js +1 -1
  86. package/dist/{separator-DNovVsrx.d.ts → separator-D9AWEkcJ.d.ts} +4 -0
  87. package/dist/{separator-BPE-A8tw.js → separator-DfzxVutO.js} +1 -1
  88. package/dist/separator.d.ts +1 -1
  89. package/dist/separator.js +1 -1
  90. package/dist/shake-DL6WhMXM.js +1 -0
  91. package/dist/sheet-C0QytOsE.js +1 -0
  92. package/dist/sheet.d.ts +20 -2
  93. package/dist/sheet.js +1 -1
  94. package/dist/sidebar.d.ts +6 -2
  95. package/dist/sidebar.js +1 -1
  96. package/dist/slider.js +1 -1
  97. package/dist/split-button.d.ts +3 -3
  98. package/dist/split-button.js +1 -1
  99. package/dist/switch.js +1 -1
  100. package/dist/table-CFHiDBW8.js +1 -0
  101. package/dist/table.js +1 -1
  102. package/dist/tabs.d.ts +1 -1
  103. package/dist/tabs.js +1 -1
  104. package/dist/text-area.js +1 -1
  105. package/dist/theme-CwtpudOH.js +1 -0
  106. package/dist/theme-switcher.d.ts +1 -1
  107. package/dist/theme-switcher.js +1 -1
  108. package/dist/theme.d.ts +15 -69
  109. package/dist/theme.js +1 -1
  110. package/dist/toast.js +1 -1
  111. package/dist/tooltip-BwMlCD6k.js +1 -0
  112. package/dist/tooltip.js +1 -1
  113. package/dist/truncated-text.js +1 -1
  114. package/dist/types.d.ts +1 -1
  115. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +1 -0
  116. package/dist/use-is-apple-platform-D4nifHMx.js +1 -0
  117. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +1 -0
  118. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +1 -0
  119. package/dist/use-swipe-to-dismiss-DceYk1Id.js +1 -0
  120. package/dist/utils.js +1 -1
  121. package/dist/well.d.ts +1 -1
  122. package/package.json +1 -5
  123. package/dist/alert-BVQcPzmf.js +0 -1
  124. package/dist/browser-only-Crr3sgA0.js +0 -1
  125. package/dist/button-CZ-q7fYv.js +0 -1
  126. package/dist/button-DTpsT864.js +0 -1
  127. package/dist/chart-D2LtDZtV.js +0 -2
  128. package/dist/dialog-D333NTyf.js +0 -1
  129. package/dist/dropdown-menu-j4RbBbGa.js +0 -1
  130. package/dist/list-DOVZoz9t.js +0 -1
  131. package/dist/mantle-dark.css +0 -385
  132. package/dist/popover-oQDUvcZ2.js +0 -1
  133. package/dist/sheet-gMTepUM_.js +0 -1
  134. package/dist/table-DBbKqOVq.js +0 -1
  135. package/dist/theme-BD0ly6jo.js +0 -1
  136. package/dist/tooltip-NhYXqStK.js +0 -1
  137. package/dist/use-copy-to-clipboard-ByLT8veV.js +0 -1
  138. package/dist/use-is-apple-platform-CMPzIYjz.js +0 -1
  139. package/dist/use-is-hydrated-DDCqXmju.js +0 -1
  140. package/dist/use-isomorphic-layout-effect-DdTRtMY-.js +0 -1
  141. package/dist/use-prefers-reduced-motion-DimzRx-M.js +0 -1
  142. package/dist/use-swipe-to-dismiss-Cj-AayFd.js +0 -1
@@ -1 +1 @@
1
- export{t as DropdownMenu}from"./dropdown-menu-j4RbBbGa.js";
1
+ export{t as DropdownMenu}from"./dropdown-menu-CLHkKzhe.js";
package/dist/field.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
2
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-BFAvonp1.js";
3
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-Yxyu1XMd.js";
4
4
  import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./field-V_gnkcmN.js";
5
5
  import { t as Label } from "./label-Dn5CPJUj.js";
6
6
  import { t as Slot } from "./slot-C0OCJjdJ.js";
package/dist/field.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-Cwrv2Mwv.js";import{i as a,n as o,r as s,t as c}from"./field-CPvjazWN.js";import{n as l,r as u,t as d}from"./field-Bihblt8U.js";import{t as f}from"./label-nHqqYS7e.js";import{t as p}from"./popover-oQDUvcZ2.js";import{c as m}from"react/compiler-runtime";import{Children as h,Fragment as g,cloneElement as _,isValidElement as v,useContext as y,useId as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=/* @__PURE__ */ new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return h.forEach(e,e=>{n||e==null||typeof e==`boolean`||(typeof e==`string`?e.trim().length>0&&(n=!0):n=v(e)?e.type===t?E(e.props.children):e.type!==g||D({children:e.props.children,errorItemType:t}):!0)}),n},O=e=>{let r=m(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`field-set`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ C(`fieldset`,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},k=e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(`text-strong mb-1.5 text-sm font-medium font-sans`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=/* @__PURE__ */ C(`legend`,{ref:a,"data-slot":`field-legend`,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},A=e=>{let t=m(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=y(l)?.controlId,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a=/* @__PURE__ */ C(f,{ref:r,...n,htmlFor:i}),t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],a},j=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`p`,d;i[6]===s?d=i[7]:(d=n(s,`field-label-text`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`text-strong text-sm font-medium font-sans`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},M=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===s?d=i[7]:(d=n(s,`field-label-row`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`flex items-center gap-1`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},N=p.Root,P=/* @__PURE__ */ C(w,{}),F=e=>{let n=m(22),r,a,o,s,c,l,u,d,f;n[0]===e?(r=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9]):({appearance:c,className:r,icon:l,intent:u,label:a,ref:s,size:d,type:f,...o}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l,n[7]=u,n[8]=d,n[9]=f);let h=c===void 0?`ghost`:c,g=l===void 0?P:l,_=u===void 0?`neutral`:u,v=d===void 0?`xs`:d,y=f===void 0?`button`:f,b;n[10]===r?b=n[11]:(b=t(`text-body -my-0.5`,r),n[10]=r,n[11]=b);let x;return n[12]!==h||n[13]!==g||n[14]!==_||n[15]!==a||n[16]!==o||n[17]!==s||n[18]!==v||n[19]!==b||n[20]!==y?(x=/* @__PURE__ */ C(p.Trigger,{asChild:!0,children:/* @__PURE__ */ C(i,{ref:s,appearance:h,className:b,icon:g,intent:_,label:a,size:v,type:y,...o})}),n[12]=h,n[13]=g,n[14]=_,n[15]=a,n[16]=o,n[17]=s,n[18]=v,n[19]=b,n[20]=y,n[21]=x):x=n[21],x},I=e=>{let t=m(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({"data-slot":r,ref:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(r,`field-help-content`),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=/* @__PURE__ */ C(p.Content,{ref:a,"data-slot":o,...i}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s},L=e=>{let i=m(18),a,o,s,c,l,u;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({"data-slot":c,asChild:a,children:o,className:s,ref:u,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=a?r:`span`,f;i[7]===c?f=i[8]:(f=n(c,`field-optional`),i[7]=c,i[8]=f);let p;i[9]===s?p=i[10]:(p=t(`text-muted text-sm font-normal font-sans`,s),i[9]=s,i[10]=p);let h=o??`(Optional)`,g;return i[11]!==d||i[12]!==l||i[13]!==u||i[14]!==f||i[15]!==p||i[16]!==h?(g=/* @__PURE__ */ C(d,{ref:u,"data-slot":f,className:p,...l,children:h}),i[11]=d,i[12]=l,i[13]=u,i[14]=f,i[15]=p,i[16]=h,i[17]=g):g=i[17],g},R=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===s?d=i[7]:(d=n(s,`field-group`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`flex w-full flex-col gap-4`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},z=e=>{let i=m(37),o,s,u,d,f,p,h,g,_;i[0]===e?(o=i[1],s=i[2],u=i[3],d=i[4],f=i[5],p=i[6],h=i[7],g=i[8],_=i[9]):({"data-slot":d,asChild:o,children:s,className:u,id:f,name:p,ref:g,validation:_,...h}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=h,i[8]=g,i[9]=_);let v=o?r:`div`,y=b(),S=f??y,w=b(),T=b(),[E,D]=x(!1),O=_??(E?`error`:void 0),k;i[10]===O?k=i[11]:(k=a(O),i[10]=O,i[11]=k);let A=k,j;i[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>(D(!0),()=>{D(!1)}),i[12]=j):j=i[12];let M=j,N;i[13]!==S||i[14]!==w||i[15]!==T||i[16]!==p||i[17]!==A?(N={controlId:S,descriptionId:w,errorId:T,name:p,registerError:M,validation:A},i[13]=S,i[14]=w,i[15]=T,i[16]=p,i[17]=A,i[18]=N):N=i[18];let P=N,F;i[19]===d?F=i[20]:(F=n(d,`field-item`),i[19]=d,i[20]=F);let I;i[21]===u?I=i[22]:(I=t(`flex w-full flex-col gap-1.5`,u),i[21]=u,i[22]=I);let L;i[23]!==v||i[24]!==s||i[25]!==h||i[26]!==g||i[27]!==F||i[28]!==I||i[29]!==A?(L=/* @__PURE__ */ C(v,{ref:g,"data-slot":F,"data-validation":A,className:I,...h,children:s}),i[23]=v,i[24]=s,i[25]=h,i[26]=g,i[27]=F,i[28]=I,i[29]=A,i[30]=L):L=i[30];let R;i[31]!==L||i[32]!==A?(R=/* @__PURE__ */ C(c,{validation:A,children:L}),i[31]=L,i[32]=A,i[33]=R):R=i[33];let z;return i[34]!==P||i[35]!==R?(z=/* @__PURE__ */ C(l.Provider,{value:P,children:R}),i[34]=P,i[35]=R,i[36]=z):z=i[36],z},B=e=>{let t=m(30),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({children:n,ref:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=y(l),s,f,p,h,g,b,x,w,T;if(t[4]!==n||t[5]!==o||t[6]!==i||t[7]!==a){T=Symbol.for(`react.early_return_sentinel`);bb0:{let e=u({context:o});if(typeof n==`function`){T=/* @__PURE__ */ C(c,{validation:e.validation,children:/* @__PURE__ */ C(d.Provider,{value:o?e.ariaProps:null,children:n(e.ariaProps)})});break bb0}S(v(n),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),p=c,w=e.validation,f=d.Provider,x=o?e.ariaProps:null,s=r,h=a,g=i,b=_(n,e.ariaProps)}t[4]=n,t[5]=o,t[6]=i,t[7]=a,t[8]=s,t[9]=f,t[10]=p,t[11]=h,t[12]=g,t[13]=b,t[14]=x,t[15]=w,t[16]=T}else s=t[8],f=t[9],p=t[10],h=t[11],g=t[12],b=t[13],x=t[14],w=t[15],T=t[16];if(T!==Symbol.for(`react.early_return_sentinel`))return T;let E;t[17]!==s||t[18]!==h||t[19]!==g||t[20]!==b?(E=/* @__PURE__ */ C(s,{ref:h,...g,children:b}),t[17]=s,t[18]=h,t[19]=g,t[20]=b,t[21]=E):E=t[21];let D;t[22]!==f||t[23]!==x||t[24]!==E?(D=/* @__PURE__ */ C(f,{value:x,children:E}),t[22]=f,t[23]=x,t[24]=E,t[25]=D):D=t[25];let O;return t[26]!==p||t[27]!==w||t[28]!==D?(O=/* @__PURE__ */ C(p,{validation:w,children:D}),t[26]=p,t[27]=w,t[28]=D,t[29]=O):O=t[29],O},V=e=>{let i=m(17),a,o,s,c,u;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({"data-slot":s,asChild:a,className:o,ref:u,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?r:`p`,f=y(l),p;i[6]===s?p=i[7]:(p=n(s,`field-description`),i[6]=s,i[7]=p);let h=f?.descriptionId,g;i[8]===o?g=i[9]:(g=t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,o),i[8]=o,i[9]=g);let _;return i[10]!==d||i[11]!==c||i[12]!==u||i[13]!==p||i[14]!==h||i[15]!==g?(_=/* @__PURE__ */ C(d,{ref:u,"data-slot":p,id:h,className:g,...c}),i[10]=d,i[11]=c,i[12]=u,i[13]=p,i[14]=h,i[15]=g,i[16]=_):_=i[16],_},H=e=>{let r=m(16),i,a,o,s,c;if(r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c),!E(i))return null;let l;r[6]===o?l=r[7]:(l=n(o,`field-error`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=t(`text-danger-600 text-sm leading-4`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ C(`li`,{ref:c,"data-slot":l,className:u,...s,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},U=e=>{let t=m(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({messages:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=T(n).map(K),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=/* @__PURE__ */ C(W,{ref:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o},W=i=>{let a=m(25),o,s,c,u,d,f;a[0]===i?(o=a[1],s=a[2],c=a[3],u=a[4],d=a[5],f=a[6]):({"data-slot":u,asChild:o,children:s,className:c,ref:f,...d}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=u,a[5]=d,a[6]=f);let p;a[7]===s?p=a[8]:(p=D({children:s,errorItemType:H}),a[7]=s,a[8]=p);let h=p,g=y(l),_=g?.registerError,v,b;if(a[9]!==h||a[10]!==_?(v=()=>{if(h&&_!=null)return _()},b=[h,_],a[9]=h,a[10]=_,a[11]=v,a[12]=b):(v=a[11],b=a[12]),e(v,b),!h)return null;let x=o?r:`ul`,S;a[13]===u?S=a[14]:(S=n(u,`field-error-list`),a[13]=u,a[14]=S);let w=g?.errorId,T;a[15]===c?T=a[16]:(T=t(`m-0 flex w-full flex-col list-none p-0`,c),a[15]=c,a[16]=T);let E;return a[17]!==x||a[18]!==s||a[19]!==d||a[20]!==f||a[21]!==S||a[22]!==w||a[23]!==T?(E=/* @__PURE__ */ C(x,{ref:f,"data-slot":S,id:w,role:`list`,className:T,...d,children:s}),a[17]=x,a[18]=s,a[19]=d,a[20]=f,a[21]=S,a[22]=w,a[23]=T,a[24]=E):E=a[24],E},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H};function K(e){return/* @__PURE__ */ C(H,{children:e},e)}const q=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,o as isAriaInvalid,s as parseValidation,a as resolveValidation,q as toErrorMessages};
1
+ import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./button-B8k98Pby.js";import{i as a,n as o,r as s,t as c}from"./field-CPvjazWN.js";import{n as l,r as u,t as d}from"./field-Bihblt8U.js";import{t as f}from"./label-nHqqYS7e.js";import{t as p}from"./popover-BCGCpwkK.js";import{c as m}from"react/compiler-runtime";import{Children as h,Fragment as g,cloneElement as _,isValidElement as v,useContext as y,useId as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=/* @__PURE__ */ new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return h.forEach(e,e=>{n||e==null||typeof e==`boolean`||(typeof e==`string`?e.trim().length>0&&(n=!0):n=v(e)?e.type===t?E(e.props.children):e.type!==g||D({children:e.props.children,errorItemType:t}):!0)}),n},O=e=>{let r=m(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`field-set`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ C(`fieldset`,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},k=e=>{let n=m(10),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===r?o=n[5]:(o=t(`text-strong mb-1.5 text-sm font-medium font-sans`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==a||n[8]!==o?(s=/* @__PURE__ */ C(`legend`,{ref:a,"data-slot":`field-legend`,className:o,...i}),n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],s},A=e=>{let t=m(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=y(l)?.controlId,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a=/* @__PURE__ */ C(f,{ref:r,...n,htmlFor:i}),t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],a},j=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`p`,d;i[6]===s?d=i[7]:(d=n(s,`field-label-text`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`text-strong text-sm font-medium font-sans`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},M=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===s?d=i[7]:(d=n(s,`field-label-row`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`flex items-center gap-1`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},N=p.Root,P=/* @__PURE__ */ C(w,{}),F=e=>{let n=m(22),r,a,o,s,c,l,u,d,f;n[0]===e?(r=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],d=n[8],f=n[9]):({appearance:c,className:r,icon:l,intent:u,label:a,ref:s,size:d,type:f,...o}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l,n[7]=u,n[8]=d,n[9]=f);let h=c===void 0?`ghost`:c,g=l===void 0?P:l,_=u===void 0?`neutral`:u,v=d===void 0?`xs`:d,y=f===void 0?`button`:f,b;n[10]===r?b=n[11]:(b=t(`text-body -my-0.5`,r),n[10]=r,n[11]=b);let x;return n[12]!==h||n[13]!==g||n[14]!==_||n[15]!==a||n[16]!==o||n[17]!==s||n[18]!==v||n[19]!==b||n[20]!==y?(x=/* @__PURE__ */ C(p.Trigger,{asChild:!0,children:/* @__PURE__ */ C(i,{ref:s,appearance:h,className:b,icon:g,intent:_,label:a,size:v,type:y,...o})}),n[12]=h,n[13]=g,n[14]=_,n[15]=a,n[16]=o,n[17]=s,n[18]=v,n[19]=b,n[20]=y,n[21]=x):x=n[21],x},I=e=>{let t=m(10),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({"data-slot":r,ref:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o;t[4]===r?o=t[5]:(o=n(r,`field-help-content`),t[4]=r,t[5]=o);let s;return t[6]!==i||t[7]!==a||t[8]!==o?(s=/* @__PURE__ */ C(p.Content,{ref:a,"data-slot":o,...i}),t[6]=i,t[7]=a,t[8]=o,t[9]=s):s=t[9],s},L=e=>{let i=m(18),a,o,s,c,l,u;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6]):({"data-slot":c,asChild:a,children:o,className:s,ref:u,...l}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l,i[6]=u);let d=a?r:`span`,f;i[7]===c?f=i[8]:(f=n(c,`field-optional`),i[7]=c,i[8]=f);let p;i[9]===s?p=i[10]:(p=t(`text-muted text-sm font-normal font-sans`,s),i[9]=s,i[10]=p);let h=o??`(Optional)`,g;return i[11]!==d||i[12]!==l||i[13]!==u||i[14]!==f||i[15]!==p||i[16]!==h?(g=/* @__PURE__ */ C(d,{ref:u,"data-slot":f,className:p,...l,children:h}),i[11]=d,i[12]=l,i[13]=u,i[14]=f,i[15]=p,i[16]=h,i[17]=g):g=i[17],g},R=e=>{let i=m(16),a,o,s,c,l;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({"data-slot":s,asChild:a,className:o,ref:l,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let u=a?r:`div`,d;i[6]===s?d=i[7]:(d=n(s,`field-group`),i[6]=s,i[7]=d);let f;i[8]===o?f=i[9]:(f=t(`flex w-full flex-col gap-4`,o),i[8]=o,i[9]=f);let p;return i[10]!==u||i[11]!==c||i[12]!==l||i[13]!==d||i[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),i[10]=u,i[11]=c,i[12]=l,i[13]=d,i[14]=f,i[15]=p):p=i[15],p},z=e=>{let i=m(37),o,s,u,d,f,p,h,g,_;i[0]===e?(o=i[1],s=i[2],u=i[3],d=i[4],f=i[5],p=i[6],h=i[7],g=i[8],_=i[9]):({"data-slot":d,asChild:o,children:s,className:u,id:f,name:p,ref:g,validation:_,...h}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=h,i[8]=g,i[9]=_);let v=o?r:`div`,y=b(),S=f??y,w=b(),T=b(),[E,D]=x(!1),O=_??(E?`error`:void 0),k;i[10]===O?k=i[11]:(k=a(O),i[10]=O,i[11]=k);let A=k,j;i[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>(D(!0),()=>{D(!1)}),i[12]=j):j=i[12];let M=j,N;i[13]!==S||i[14]!==w||i[15]!==T||i[16]!==p||i[17]!==A?(N={controlId:S,descriptionId:w,errorId:T,name:p,registerError:M,validation:A},i[13]=S,i[14]=w,i[15]=T,i[16]=p,i[17]=A,i[18]=N):N=i[18];let P=N,F;i[19]===d?F=i[20]:(F=n(d,`field-item`),i[19]=d,i[20]=F);let I;i[21]===u?I=i[22]:(I=t(`flex w-full flex-col gap-1.5`,u),i[21]=u,i[22]=I);let L;i[23]!==v||i[24]!==s||i[25]!==h||i[26]!==g||i[27]!==F||i[28]!==I||i[29]!==A?(L=/* @__PURE__ */ C(v,{ref:g,"data-slot":F,"data-validation":A,className:I,...h,children:s}),i[23]=v,i[24]=s,i[25]=h,i[26]=g,i[27]=F,i[28]=I,i[29]=A,i[30]=L):L=i[30];let R;i[31]!==L||i[32]!==A?(R=/* @__PURE__ */ C(c,{validation:A,children:L}),i[31]=L,i[32]=A,i[33]=R):R=i[33];let z;return i[34]!==P||i[35]!==R?(z=/* @__PURE__ */ C(l.Provider,{value:P,children:R}),i[34]=P,i[35]=R,i[36]=z):z=i[36],z},B=e=>{let t=m(30),n,i,a;t[0]===e?(n=t[1],i=t[2],a=t[3]):({children:n,ref:a,...i}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a);let o=y(l),s,f,p,h,g,b,x,w,T;if(t[4]!==n||t[5]!==o||t[6]!==i||t[7]!==a){T=Symbol.for(`react.early_return_sentinel`);bb0:{let e=u({context:o});if(typeof n==`function`){T=/* @__PURE__ */ C(c,{validation:e.validation,children:/* @__PURE__ */ C(d.Provider,{value:o?e.ariaProps:null,children:n(e.ariaProps)})});break bb0}S(v(n),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),p=c,w=e.validation,f=d.Provider,x=o?e.ariaProps:null,s=r,h=a,g=i,b=_(n,e.ariaProps)}t[4]=n,t[5]=o,t[6]=i,t[7]=a,t[8]=s,t[9]=f,t[10]=p,t[11]=h,t[12]=g,t[13]=b,t[14]=x,t[15]=w,t[16]=T}else s=t[8],f=t[9],p=t[10],h=t[11],g=t[12],b=t[13],x=t[14],w=t[15],T=t[16];if(T!==Symbol.for(`react.early_return_sentinel`))return T;let E;t[17]!==s||t[18]!==h||t[19]!==g||t[20]!==b?(E=/* @__PURE__ */ C(s,{ref:h,...g,children:b}),t[17]=s,t[18]=h,t[19]=g,t[20]=b,t[21]=E):E=t[21];let D;t[22]!==f||t[23]!==x||t[24]!==E?(D=/* @__PURE__ */ C(f,{value:x,children:E}),t[22]=f,t[23]=x,t[24]=E,t[25]=D):D=t[25];let O;return t[26]!==p||t[27]!==w||t[28]!==D?(O=/* @__PURE__ */ C(p,{validation:w,children:D}),t[26]=p,t[27]=w,t[28]=D,t[29]=O):O=t[29],O},V=e=>{let i=m(17),a,o,s,c,u;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5]):({"data-slot":s,asChild:a,className:o,ref:u,...c}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u);let d=a?r:`p`,f=y(l),p;i[6]===s?p=i[7]:(p=n(s,`field-description`),i[6]=s,i[7]=p);let h=f?.descriptionId,g;i[8]===o?g=i[9]:(g=t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,o),i[8]=o,i[9]=g);let _;return i[10]!==d||i[11]!==c||i[12]!==u||i[13]!==p||i[14]!==h||i[15]!==g?(_=/* @__PURE__ */ C(d,{ref:u,"data-slot":p,id:h,className:g,...c}),i[10]=d,i[11]=c,i[12]=u,i[13]=p,i[14]=h,i[15]=g,i[16]=_):_=i[16],_},H=e=>{let r=m(16),i,a,o,s,c;if(r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c),!E(i))return null;let l;r[6]===o?l=r[7]:(l=n(o,`field-error`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=t(`text-danger-600 text-sm leading-4`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ C(`li`,{ref:c,"data-slot":l,className:u,...s,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},U=e=>{let t=m(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({messages:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=T(n).map(K),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=/* @__PURE__ */ C(W,{ref:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o},W=i=>{let a=m(25),o,s,c,u,d,f;a[0]===i?(o=a[1],s=a[2],c=a[3],u=a[4],d=a[5],f=a[6]):({"data-slot":u,asChild:o,children:s,className:c,ref:f,...d}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=u,a[5]=d,a[6]=f);let p;a[7]===s?p=a[8]:(p=D({children:s,errorItemType:H}),a[7]=s,a[8]=p);let h=p,g=y(l),_=g?.registerError,v,b;if(a[9]!==h||a[10]!==_?(v=()=>{if(h&&_!=null)return _()},b=[h,_],a[9]=h,a[10]=_,a[11]=v,a[12]=b):(v=a[11],b=a[12]),e(v,b),!h)return null;let x=o?r:`ul`,S;a[13]===u?S=a[14]:(S=n(u,`field-error-list`),a[13]=u,a[14]=S);let w=g?.errorId,T;a[15]===c?T=a[16]:(T=t(`m-0 flex w-full flex-col list-none p-0`,c),a[15]=c,a[16]=T);let E;return a[17]!==x||a[18]!==s||a[19]!==d||a[20]!==f||a[21]!==S||a[22]!==w||a[23]!==T?(E=/* @__PURE__ */ C(x,{ref:f,"data-slot":S,id:w,role:`list`,className:T,...d,children:s}),a[17]=x,a[18]=s,a[19]=d,a[20]=f,a[21]=S,a[22]=w,a[23]=T,a[24]=E):E=a[24],E},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H};function K(e){return/* @__PURE__ */ C(H,{children:e},e)}const q=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,o as isAriaInvalid,s as parseValidation,a as resolveValidation,q as toErrorMessages};
package/dist/hooks.d.ts CHANGED
@@ -40,6 +40,10 @@ type TailwindBreakpoint = (typeof tailwindBreakpoints)[number];
40
40
  * `"default"` represents the base (0px and up) viewport,
41
41
  * useful for defining fallbacks or mobile-first styles.
42
42
  *
43
+ * `xs` (480px) is wider than most phones, so a class with only an `xs:` value
44
+ * applies nothing on a phone. Give an unprefixed base value first, as in
45
+ * `flex-col xs:flex-row`.
46
+ *
43
47
  * @example
44
48
  * "default" // ≥0rem (0px)
45
49
  * "2xs" // ≥22.5rem (360px)
@@ -56,6 +60,10 @@ declare const breakpoints: readonly ["default", "2xl", "xl", "lg", "md", "sm", "
56
60
  *
57
61
  * Includes Tailwind’s standard breakpoints plus `"default"` for 0px+.
58
62
  *
63
+ * `xs` (480px) is wider than most phones, so a class with only an `xs:` value
64
+ * applies nothing on a phone. Give an unprefixed base value first, as in
65
+ * `flex-col xs:flex-row`.
66
+ *
59
67
  * @example
60
68
  * const bp: Breakpoint = "default"; // ≥0px
61
69
  *
@@ -806,11 +814,17 @@ type UseInViewOptions = {
806
814
  * If `true`, stop observing once the element enters the viewport for the
807
815
  * first time. Useful for one-shot entrance animations.
808
816
  * Defaults to `false`.
817
+ *
818
+ * Do not combine with `initial: true`: with both set, the hook reports in
819
+ * view on mount and never observes the element.
809
820
  */
810
821
  once?: boolean;
811
822
  /**
812
823
  * The initial visibility state returned before the observer has attached.
813
824
  * Defaults to `false`.
825
+ *
826
+ * Do not combine `true` with `once: true`: with both set, the hook reports
827
+ * in view on mount and never observes the element.
814
828
  */
815
829
  initial?: boolean;
816
830
  };
@@ -928,5 +942,5 @@ type UseUndoRedoReturn<T> = {
928
942
  * </div>
929
943
  * );
930
944
  */
931
- declare function useUndoRedo<T extends NonNullable<unknown>>(): UseUndoRedoReturn<T>;
945
+ declare function useUndoRedo<T extends {}>(): UseUndoRedoReturn<T>;
932
946
  export { type Breakpoint, type SwipeDirection, type SwipeProperty, type TailwindBreakpoint, type UseFocusTrapOptions, type UseInViewOptions, type UseInertSiblingsOptions, type UseSwipeToDismissOptions, type UseUndoRedoReturn, breakpoints, useBreakpoint, useCallbackRef, useComposedRefs, useCopyToClipboard, useDebounce, useDebouncedCallback, useFocusTrap, useInView, useInertSiblings, useIsBelowBreakpoint, useIsHydrated, useIsHydratedAfterPaint, useLocalStorage, useSessionStorage, useSwipeToDismiss, useUndoRedo };
package/dist/hooks.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{n,r,t as i}from"./use-swipe-to-dismiss-Cj-AayFd.js";import{t as a}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as o}from"./use-matches-media-query-m860lols.js";import{t as s}from"./use-is-hydrated-DDCqXmju.js";import{t as c}from"./use-copy-to-clipboard-ByLT8veV.js";import{t as l}from"./use-callback-ref-BvVyI5K1.js";import{n as u,t as d}from"./use-prefers-reduced-motion-DimzRx-M.js";import{n as f,r as p,t as m}from"./use-breakpoint--mo7kr9d.js";import{t as h}from"./in-view-Dxv_GrUU.js";import{c as g}from"react/compiler-runtime";import{useEffect as _,useRef as v,useState as y,useSyncExternalStore as b}from"react";function x(e,t){let n=g(4),[r,i]=y(e),a,o;return n[0]!==t.waitMs||n[1]!==e?(a=()=>{let n=window.setTimeout(()=>{i(e)},t.waitMs);return()=>{window.clearTimeout(n)}},o=[e,t.waitMs],n[0]=t.waitMs,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),_(a,o),r}function S(e,t){let n=g(5),r=l(e),i=v(0),a,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>()=>window.clearTimeout(i.current),o=[],n[0]=a,n[1]=o):(a=n[0],o=n[1]),_(a,o);let s;return n[2]!==t.waitMs||n[3]!==r?(s=(...e)=>{let n=e;window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(...n),t.waitMs)},n[2]=t.waitMs,n[3]=r,n[4]=s):s=n[4],s}const C=/* @__PURE__ */ new Map;function w(e){e.key==null?C.clear():C.has(e.key)&&(e.newValue==null?C.delete(e.key):C.set(e.key,e.newValue))}function T(){try{return window.localStorage}catch{return null}}function E(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===T(),i=n.key==null||n.key===e;r&&i&&(w(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function D(){return null}function O(e){let t=C.get(e);if(t!=null)return t;try{return window.localStorage.getItem(e)}catch{return null}}function k(e,t){try{window.localStorage.setItem(e,t),C.delete(e)}catch{C.set(e,t)}}function A(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function j(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=E(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>O(e),n[2]=e,n[3]=a);let o=b(i,a,D),s;n[4]!==t||n[5]!==o?(s=o==null?t:A(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);k(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:T()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}const M=/* @__PURE__ */ new Map;function N(e){e.key==null?M.clear():M.has(e.key)&&(e.newValue==null?M.delete(e.key):M.set(e.key,e.newValue))}function P(){try{return window.sessionStorage}catch{return null}}function F(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===P(),i=n.key==null||n.key===e;r&&i&&(N(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function I(){return null}function L(e){let t=M.get(e);if(t!=null)return t;try{return window.sessionStorage.getItem(e)}catch{return null}}function R(e,t){try{window.sessionStorage.setItem(e,t),M.delete(e)}catch{M.set(e,t)}}function z(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function B(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=F(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>L(e),n[2]=e,n[3]=a);let o=b(i,a,I),s;n[4]!==t||n[5]!==o?(s=o==null?t:z(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);R(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:P()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}function V(){return u()?`auto`:`smooth`}function H(e,t){let n=g(14),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{root:i,margin:a,amount:o,once:s,initial:c}=r,l=s!==void 0&&s,u=c!==void 0&&c,[d,f]=y(u),p=v(u),m;n[2]!==o||n[3]!==a||n[4]!==l||n[5]!==e||n[6]!==i?.current?(m=()=>{let t=e.current;if(t==null||l&&p.current)return;let n=function(){if(p.current=!0,f(!0),!l)return()=>{p.current=!1,f(!1)}},r={root:i?.current??void 0,margin:a,amount:o};return h(t,n,r)},n[2]=o,n[3]=a,n[4]=l,n[5]=e,n[6]=i?.current,n[7]=m):m=n[7];let b;return n[8]!==o||n[9]!==a||n[10]!==l||n[11]!==e||n[12]!==i?(b=[i,e,a,l,o],n[8]=o,n[9]=a,n[10]=l,n[11]=e,n[12]=i,n[13]=b):b=n[13],_(m,b),d}function U(){let e=g(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let n=v(t),r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[1]=r):r=e[1];let i=v(r),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={undo:0,redo:0},e[2]=a):a=e[2];let[o,s]=y(a),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{n.current.push(e),i.current=[],s({undo:n.current.length,redo:0})},e[3]=c):c=e[3];let l=c,u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{let t=n.current[n.current.length-1];if(t!==void 0)return n.current.pop(),i.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[4]=u):u=e[4];let d=u,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{let t=i.current[i.current.length-1];if(t!==void 0)return i.current.pop(),n.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[5]=f):f=e[5];let p=f,m=o.undo>0,h=o.redo>0,_;return e[6]!==h||e[7]!==m?(_={canUndo:m,canRedo:h,push:l,undo:d,redo:p},e[6]=h,e[7]=m,e[8]=_):_=e[8],_}export{m as breakpoints,d as getPrefersReducedMotion,f as useBreakpoint,l as useCallbackRef,t as useComposedRefs,c as useCopyToClipboard,x as useDebounce,S as useDebouncedCallback,r as useFocusTrap,H as useInView,n as useInertSiblings,p as useIsBelowBreakpoint,s as useIsHydrated,a as useIsHydratedAfterPaint,e as useIsomorphicLayoutEffect,j as useLocalStorage,o as useMatchesMediaQuery,u as usePrefersReducedMotion,V as useScrollBehavior,B as useSessionStorage,i as useSwipeToDismiss,U as useUndoRedo};
1
+ import{r as e}from"./browser-only-BTSrYWLj.js";import{t}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{n}from"./compose-refs-sFdxsL7k.js";import{n as r,r as i,t as a}from"./use-swipe-to-dismiss-DceYk1Id.js";import{t as o}from"./use-is-hydrated-after-paint-r9Cl2mGp.js";import{t as s}from"./use-matches-media-query-m860lols.js";import{t as c}from"./use-copy-to-clipboard-Dy_0Qzb7.js";import{t as l}from"./use-callback-ref-BvVyI5K1.js";import{n as u,t as d}from"./use-prefers-reduced-motion-CU6mWmOe.js";import{n as f,r as p,t as m}from"./use-breakpoint--mo7kr9d.js";import{t as h}from"./in-view-Dxv_GrUU.js";import{c as g}from"react/compiler-runtime";import{useEffect as _,useRef as v,useState as y,useSyncExternalStore as b}from"react";function x(e,t){let n=g(4),[r,i]=y(e),a,o;return n[0]!==t.waitMs||n[1]!==e?(a=()=>{let n=window.setTimeout(()=>{i(e)},t.waitMs);return()=>{window.clearTimeout(n)}},o=[e,t.waitMs],n[0]=t.waitMs,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),_(a,o),r}function S(e,t){let n=g(5),r=l(e),i=v(0),a,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>()=>window.clearTimeout(i.current),o=[],n[0]=a,n[1]=o):(a=n[0],o=n[1]),_(a,o);let s;return n[2]!==t.waitMs||n[3]!==r?(s=(...e)=>{let n=e;window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(...n),t.waitMs)},n[2]=t.waitMs,n[3]=r,n[4]=s):s=n[4],s}const C=/* @__PURE__ */ new Map;function w(e){e.key==null?C.clear():C.has(e.key)&&(e.newValue==null?C.delete(e.key):C.set(e.key,e.newValue))}function T(){try{return window.localStorage}catch{return null}}function E(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===T(),i=n.key==null||n.key===e;r&&i&&(w(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function D(){return null}function O(e){let t=C.get(e);if(t!=null)return t;try{return window.localStorage.getItem(e)}catch{return null}}function k(e,t){try{window.localStorage.setItem(e,t),C.delete(e)}catch{C.set(e,t)}}function A(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function j(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=E(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>O(e),n[2]=e,n[3]=a);let o=b(i,a,D),s;n[4]!==t||n[5]!==o?(s=o==null?t:A(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);k(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:T()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}const M=/* @__PURE__ */ new Map;function N(e){e.key==null?M.clear():M.has(e.key)&&(e.newValue==null?M.delete(e.key):M.set(e.key,e.newValue))}function P(){try{return window.sessionStorage}catch{return null}}function F(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===P(),i=n.key==null||n.key===e;r&&i&&(N(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function I(){return null}function L(e){let t=M.get(e);if(t!=null)return t;try{return window.sessionStorage.getItem(e)}catch{return null}}function R(e,t){try{window.sessionStorage.setItem(e,t),M.delete(e)}catch{M.set(e,t)}}function z(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function B(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=F(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>L(e),n[2]=e,n[3]=a);let o=b(i,a,I),s;n[4]!==t||n[5]!==o?(s=o==null?t:z(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);R(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:P()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}function V(){return u()?`auto`:`smooth`}function H(e,t){let n=g(14),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{root:i,margin:a,amount:o,once:s,initial:c}=r,l=s!==void 0&&s,u=c!==void 0&&c,[d,f]=y(u),p=v(u),m;n[2]!==o||n[3]!==a||n[4]!==l||n[5]!==e||n[6]!==i?.current?(m=()=>{let t=e.current;if(t==null||l&&p.current)return;let n=function(){if(p.current=!0,f(!0),!l)return()=>{p.current=!1,f(!1)}},r={root:i?.current??void 0,margin:a,amount:o};return h(t,n,r)},n[2]=o,n[3]=a,n[4]=l,n[5]=e,n[6]=i?.current,n[7]=m):m=n[7];let b;return n[8]!==o||n[9]!==a||n[10]!==l||n[11]!==e||n[12]!==i?(b=[i,e,a,l,o],n[8]=o,n[9]=a,n[10]=l,n[11]=e,n[12]=i,n[13]=b):b=n[13],_(m,b),d}function U(){let e=g(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let n=v(t),r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[1]=r):r=e[1];let i=v(r),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={undo:0,redo:0},e[2]=a):a=e[2];let[o,s]=y(a),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{n.current.push(e),i.current=[],s({undo:n.current.length,redo:0})},e[3]=c):c=e[3];let l=c,u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{let t=n.current[n.current.length-1];if(t!==void 0)return n.current.pop(),i.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[4]=u):u=e[4];let d=u,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{let t=i.current[i.current.length-1];if(t!==void 0)return i.current.pop(),n.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[5]=f):f=e[5];let p=f,m=o.undo>0,h=o.redo>0,_;return e[6]!==h||e[7]!==m?(_={canUndo:m,canRedo:h,push:l,undo:d,redo:p},e[6]=h,e[7]=m,e[8]=_):_=e[8],_}export{m as breakpoints,d as getPrefersReducedMotion,f as useBreakpoint,l as useCallbackRef,n as useComposedRefs,c as useCopyToClipboard,x as useDebounce,S as useDebouncedCallback,i as useFocusTrap,H as useInView,r as useInertSiblings,p as useIsBelowBreakpoint,e as useIsHydrated,o as useIsHydratedAfterPaint,t as useIsomorphicLayoutEffect,j as useLocalStorage,s as useMatchesMediaQuery,u as usePrefersReducedMotion,V as useScrollBehavior,B as useSessionStorage,a as useSwipeToDismiss,U as useUndoRedo};
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,r}from"./layer-container-DLf-6eBz.js";import{c as i}from"react/compiler-runtime";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Arrow as s,Content as c,Portal as l,Root as u,Trigger as d}from"@radix-ui/react-hover-card";const f=e=>{let t=i(8),n,r,o;t[0]===e?(n=t[1],r=t[2],o=t[3]):({closeDelay:r,openDelay:o,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o);let s=r===void 0?300:r,c=o===void 0?100:o,l;return t[4]!==s||t[5]!==c||t[6]!==n?(l=/* @__PURE__ */ a(u,{closeDelay:s,openDelay:c,...n}),t[4]=s,t[5]=c,t[6]=n,t[7]=l):l=t[7],l},p=e=>{let n=i(8),r,o;n[0]===e?(r=n[1],o=n[2]):({"data-slot":r,...o}=e,n[0]=e,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=t(r,`hover-card-trigger`),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=/* @__PURE__ */ a(d,{"data-slot":s,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c},m=e=>{let t=i(9),o,s;t[0]===e?(o=t[1],s=t[2]):({container:o,...s}=e,t[0]=e,t[1]=o,t[2]=s);let c=r(),u=o??c,d;t[3]!==s||t[4]!==u?(d=/* @__PURE__ */ a(l,{container:u,...s}),t[3]=s,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==u||t[7]!==d?(f=/* @__PURE__ */ a(n.Provider,{value:u,children:d}),t[6]=u,t[7]=d,t[8]=f):f=t[8],f},h={Root:f,Arrow:n=>{let r=i(20),c,l,u,d,f;r[0]===n?(c=r[1],l=r[2],u=r[3],d=r[4],f=r[5]):({"data-slot":l,className:c,height:d,width:f,...u}=n,r[0]=n,r[1]=c,r[2]=l,r[3]=u,r[4]=d,r[5]=f);let p=d===void 0?7:d,m=f===void 0?14:f,h;r[6]===l?h=r[7]:(h=t(l,`hover-card-arrow`),r[6]=l,r[7]=h);let g;r[8]===c?g=r[9]:(g=e(`fill-[var(--background-color-popover)]`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`[filter:drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,c),r[8]=c,r[9]=g);let _,v;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ a(`polygon`,{points:`0,0 30,0 15,10`}),v=/* @__PURE__ */ a(`polyline`,{className:`stroke-[color:var(--border-color-popover)]`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`}),r[10]=_,r[11]=v):(_=r[10],v=r[11]);let y;r[12]===g?y=r[13]:(y=/* @__PURE__ */ o(`svg`,{className:g,children:[_,v]}),r[12]=g,r[13]=y);let b;return r[14]!==p||r[15]!==u||r[16]!==h||r[17]!==y||r[18]!==m?(b=/* @__PURE__ */ a(s,{"aria-hidden":`true`,asChild:!0,"data-slot":h,height:p,width:m,...u,children:y}),r[14]=p,r[15]=u,r[16]=h,r[17]=y,r[18]=m,r[19]=b):b=r[19],b},Content:n=>{let r=i(20),o,s,l,u,d,f;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],d=r[5],f=r[6]):({"data-slot":s,className:o,onClick:l,align:d,sideOffset:f,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=d,r[6]=f);let p=d===void 0?`center`:d,h=f===void 0?4:f,g;r[7]===s?g=r[8]:(g=t(s,`hover-card-content`),r[7]=s,r[8]=g);let _;r[9]===o?_=r[10]:(_=e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,o),r[9]=o,r[10]=_);let v;r[11]===l?v=r[12]:(v=e=>{e.stopPropagation(),l?.(e)},r[11]=l,r[12]=v);let y;return r[13]!==p||r[14]!==u||r[15]!==h||r[16]!==g||r[17]!==_||r[18]!==v?(y=/* @__PURE__ */ a(m,{children:/* @__PURE__ */ a(c,{"data-slot":g,align:p,sideOffset:h,className:_,onClick:v,...u})}),r[13]=p,r[14]=u,r[15]=h,r[16]=g,r[17]=_,r[18]=v,r[19]=y):y=r[19],y},Portal:m,Trigger:p};export{h as HoverCard};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,r}from"./layer-container-DLf-6eBz.js";import{c as i}from"react/compiler-runtime";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{Arrow as s,Content as c,Portal as l,Root as u,Trigger as d}from"@radix-ui/react-hover-card";const f=e=>{let t=i(8),n,r,o;t[0]===e?(n=t[1],r=t[2],o=t[3]):({closeDelay:r,openDelay:o,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o);let s=r===void 0?300:r,c=o===void 0?100:o,l;return t[4]!==s||t[5]!==c||t[6]!==n?(l=/* @__PURE__ */ a(u,{closeDelay:s,openDelay:c,...n}),t[4]=s,t[5]=c,t[6]=n,t[7]=l):l=t[7],l},p=e=>{let n=i(8),r,o;n[0]===e?(r=n[1],o=n[2]):({"data-slot":r,...o}=e,n[0]=e,n[1]=r,n[2]=o);let s;n[3]===r?s=n[4]:(s=t(r,`hover-card-trigger`),n[3]=r,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=/* @__PURE__ */ a(d,{"data-slot":s,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c},m=e=>{let t=i(9),o,s;t[0]===e?(o=t[1],s=t[2]):({container:o,...s}=e,t[0]=e,t[1]=o,t[2]=s);let c=r(),u=o??c,d;t[3]!==s||t[4]!==u?(d=/* @__PURE__ */ a(l,{container:u,...s}),t[3]=s,t[4]=u,t[5]=d):d=t[5];let f;return t[6]!==u||t[7]!==d?(f=/* @__PURE__ */ a(n.Provider,{value:u,children:d}),t[6]=u,t[7]=d,t[8]=f):f=t[8],f},h={Root:f,Arrow:n=>{let r=i(20),c,l,u,d,f;r[0]===n?(c=r[1],l=r[2],u=r[3],d=r[4],f=r[5]):({"data-slot":l,className:c,height:d,width:f,...u}=n,r[0]=n,r[1]=c,r[2]=l,r[3]=u,r[4]=d,r[5]=f);let p=d===void 0?7:d,m=f===void 0?14:f,h;r[6]===l?h=r[7]:(h=t(l,`hover-card-arrow`),r[6]=l,r[7]=h);let g;r[8]===c?g=r[9]:(g=e(`fill-(--background-color-popover)`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`filter-[drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,c),r[8]=c,r[9]=g);let _,v;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ a(`polygon`,{points:`0,0 30,0 15,10`}),v=/* @__PURE__ */ a(`polyline`,{className:`stroke-(--border-color-popover)`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`}),r[10]=_,r[11]=v):(_=r[10],v=r[11]);let y;r[12]===g?y=r[13]:(y=/* @__PURE__ */ o(`svg`,{className:g,children:[_,v]}),r[12]=g,r[13]=y);let b;return r[14]!==p||r[15]!==u||r[16]!==h||r[17]!==y||r[18]!==m?(b=/* @__PURE__ */ a(s,{"aria-hidden":`true`,asChild:!0,"data-slot":h,height:p,width:m,...u,children:y}),r[14]=p,r[15]=u,r[16]=h,r[17]=y,r[18]=m,r[19]=b):b=r[19],b},Content:n=>{let r=i(20),o,s,l,u,d,f;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],d=r[5],f=r[6]):({"data-slot":s,className:o,onClick:l,align:d,sideOffset:f,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=d,r[6]=f);let p=d===void 0?`center`:d,h=f===void 0?4:f,g;r[7]===s?g=r[8]:(g=t(s,`hover-card-content`),r[7]=s,r[8]=g);let _;r[9]===o?_=r[10]:(_=e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,o),r[9]=o,r[10]=_);let v;r[11]===l?v=r[12]:(v=e=>{e.stopPropagation(),l?.(e)},r[11]=l,r[12]=v);let y;return r[13]!==p||r[14]!==u||r[15]!==h||r[16]!==g||r[17]!==_||r[18]!==v?(y=/* @__PURE__ */ a(m,{children:/* @__PURE__ */ a(c,{"data-slot":g,align:p,sideOffset:h,className:_,onClick:v,...u})}),r[13]=p,r[14]=u,r[15]=h,r[16]=g,r[17]=_,r[18]=v,r[19]=y):y=r[19],y},Portal:m,Trigger:p};export{h as HoverCard};
@@ -1 +1 @@
1
- import{s as e}from"./theme-BD0ly6jo.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{DesktopIcon as r}from"@phosphor-icons/react/Desktop";import{MoonIcon as i}from"@phosphor-icons/react/Moon";import{SunIcon as a}from"@phosphor-icons/react/Sun";function o(r){let i=t(3),a=e(),o;return i[0]!==a||i[1]!==r?(o=/* @__PURE__ */ n(s,{theme:a,...r}),i[0]=a,i[1]=r,i[2]=o):o=i[2],o}function s(e){let o=t(9),s,c;switch(o[0]===e?(s=o[1],c=o[2]):({theme:c,...s}=e,o[0]=e,o[1]=s,o[2]=c),c){case`system`:{let e;return o[3]===s?e=o[4]:(e=/* @__PURE__ */ n(r,{...s}),o[3]=s,o[4]=e),e}case`light`:{let e;return o[5]===s?e=o[6]:(e=/* @__PURE__ */ n(a,{...s}),o[5]=s,o[6]=e),e}case`dark`:{let e;return o[7]===s?e=o[8]:(e=/* @__PURE__ */ n(i,{...s}),o[7]=s,o[8]=e),e}}}export{s as n,o as t};
1
+ import{s as e}from"./theme-CwtpudOH.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{DesktopIcon as r}from"@phosphor-icons/react/Desktop";import{MoonIcon as i}from"@phosphor-icons/react/Moon";import{SunIcon as a}from"@phosphor-icons/react/Sun";function o(r){let i=t(3),a=e(),o;return i[0]!==a||i[1]!==r?(o=/* @__PURE__ */ n(s,{theme:a,...r}),i[0]=a,i[1]=r,i[2]=o):o=i[2],o}function s(e){let o=t(9),s,c;switch(o[0]===e?(s=o[1],c=o[2]):({theme:c,...s}=e,o[0]=e,o[1]=s,o[2]=c),c){case`system`:{let e;return o[3]===s?e=o[4]:(e=/* @__PURE__ */ n(r,{...s}),o[3]=s,o[4]=e),e}case`light`:{let e;return o[5]===s?e=o[6]:(e=/* @__PURE__ */ n(a,{...s}),o[5]=s,o[6]=e),e}case`dark`:{let e;return o[7]===s?e=o[8]:(e=/* @__PURE__ */ n(i,{...s}),o[7]=s,o[8]=e),e}}}export{s as n,o as t};
package/dist/icons.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./icons-CSwTVV2m.js";import{t}from"./icons-CDLz5lpI.js";import{n,t as r}from"./icons-DykpsXNX.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";function o(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:n}),t[1]=e,t[2]=r),r}function s(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:n}),t[1]=e,t[2]=r),r}export{r as AutoThemeIcon,s as NgrokLettermarkIcon,o as NgrokWordmarkIcon,t as SortIcon,n as ThemeIcon,e as TrafficPolicyFileIcon};
1
+ import{t as e}from"./icons-CSwTVV2m.js";import{t}from"./icons-CDLz5lpI.js";import{n,t as r}from"./icons-DGL0d2Il.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";function o(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:n}),t[1]=e,t[2]=r),r}function s(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:n}),t[1]=e,t[2]=r),r}export{r as AutoThemeIcon,s as NgrokLettermarkIcon,o as NgrokWordmarkIcon,t as SortIcon,n as ThemeIcon,e as TrafficPolicyFileIcon};
@@ -38,17 +38,17 @@ type CssVariableName = `--${string}`;
38
38
  */
39
39
  type CssProperties = CSSProperties & Record<CssVariableName, string | number>;
40
40
  /**
41
- * Helper to type-check a style object while preserving its exact inferred type.
41
+ * Type-checks a style object that can hold CSS variables, and returns it as
42
+ * React's `CSSProperties`, the type the `style` prop expects.
42
43
  *
43
- * Why not just annotate with `CssProperties`?
44
- * - Annotating forces the value to be treated as the *wider* `CssProperties` type,
45
- * which can lose useful inference (literal values, narrow unions, etc.).
46
- *
47
- * This function validates that `input` conforms to `CssProperties` (including
48
- * CSS variables like `--foo`) and returns it unchanged, keeping inference intact.
44
+ * Use it when you pass a CSS variable such as `--gap` to `style`. React's
45
+ * `CSSProperties` rejects any key that starts with `--`. This function accepts
46
+ * every key that starts with `--`, checks the other keys against React's
47
+ * `CSSProperties`, and erases the CSS variable keys from the return type. An
48
+ * unknown key that does not start with `--`, such as `displya`, does not compile.
49
49
  *
50
50
  * @example
51
- * style={$cssProperties({ display: "block", "--gap": 8 })}
51
+ * style={$cssProperties({ display: "block", "--gap": 8, ...style })}
52
52
  */
53
- declare const $cssProperties: <T extends CssProperties = CssProperties>(input: T) => CSSProperties;
53
+ declare const $cssProperties: (input: CssProperties) => CSSProperties;
54
54
  export { Booleanish as a, DeepNonNullable as i, CssProperties as n, parseBooleanish as o, VariantProps$1 as r, $cssProperties as t };
package/dist/input.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./use-prefers-reduced-motion-DimzRx-M.js";import{n as i,t as a}from"./input-CpQ6jlpI.js";import{t as o}from"./input-DQyN6gN0.js";import{c as s}from"react/compiler-runtime";import{useId as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{EyeIcon as p}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as m}from"@phosphor-icons/react/EyeClosed";const h=o=>{let h=s(34),g,_,v,y,b,x,S;h[0]===o?(g=h[1],_=h[2],v=h[3],y=h[4],b=h[5],x=h[6],S=h[7]):({"data-slot":g,disabled:_,id:v,onValueVisibilityChange:y,ref:x,showValue:S,...b}=o,h[0]=o,h[1]=g,h[2]=_,h[3]=v,h[4]=y,h[5]=b,h[6]=x,h[7]=S);let C=c(),w=v??C,T=S!=null,[E,D]=u(!1),O=T?S:E,k=O?`text`:`password`,A=O?p:m,j=l(null),M=l(O),N,P;h[8]===O?(N=h[9],P=h[10]):(N=()=>{if(M.current===O)return;M.current=O;let e=j.current;e==null||r()||e.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`})},P=[O],h[8]=O,h[9]=N,h[10]=P),e(N,P);let F;h[11]===g?F=h[12]:(F=t(g,`password-input`),h[11]=g,h[12]=F);let I;h[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=/* @__PURE__ */ d(i,{}),h[13]=I):I=h[13];let L;h[14]!==T||h[15]!==y||h[16]!==O?(L=()=>{let e=!O;T||D(e),y?.(e)},h[14]=T,h[15]=y,h[16]=O,h[17]=L):L=h[17];let R;h[18]===A?R=h[19]:(R=/* @__PURE__ */ d(n,{ref:j,svg:/* @__PURE__ */ d(A,{"aria-hidden":!0})}),h[18]=A,h[19]=R);let z;h[20]!==_||h[21]!==w||h[22]!==O||h[23]!==L||h[24]!==R?(z=/* @__PURE__ */ d(`button`,{type:`button`,disabled:_,"data-slot":`password-input-toggle`,"aria-label":`Show value`,"aria-pressed":O,"aria-controls":w,className:`text-body hover:text-strong focus-visible:ring-focus-accent ml-1 cursor-pointer rounded-xs bg-inherit p-0 focus-visible:ring-2 focus-visible:outline-hidden`,onClick:L,children:R}),h[20]=_,h[21]=w,h[22]=O,h[23]=L,h[24]=R,h[25]=z):z=h[25];let B;return h[26]!==_||h[27]!==w||h[28]!==b||h[29]!==x||h[30]!==F||h[31]!==z||h[32]!==k?(B=/* @__PURE__ */ f(a,{"data-slot":F,disabled:_,id:w,type:k,ref:x,...b,children:[I,z]}),h[26]=_,h[27]=w,h[28]=b,h[29]=x,h[30]=F,h[31]=z,h[32]=k,h[33]=B):B=h[33],B};export{a as Input,i as InputCapture,h as PasswordInput,o as isInput};
1
+ import{t as e}from"./use-isomorphic-layout-effect-CLSmHzo4.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./use-prefers-reduced-motion-CU6mWmOe.js";import{n as i,t as a}from"./input-CpQ6jlpI.js";import{t as o}from"./input-DQyN6gN0.js";import{c as s}from"react/compiler-runtime";import{useId as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{EyeIcon as p}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as m}from"@phosphor-icons/react/EyeClosed";const h=o=>{let h=s(34),g,_,v,y,b,x,S;h[0]===o?(g=h[1],_=h[2],v=h[3],y=h[4],b=h[5],x=h[6],S=h[7]):({"data-slot":g,disabled:_,id:v,onValueVisibilityChange:y,ref:x,showValue:S,...b}=o,h[0]=o,h[1]=g,h[2]=_,h[3]=v,h[4]=y,h[5]=b,h[6]=x,h[7]=S);let C=c(),w=v??C,T=S!=null,[E,D]=u(!1),O=T?S:E,k=O?`text`:`password`,A=O?p:m,j=l(null),M=l(O),N,P;h[8]===O?(N=h[9],P=h[10]):(N=()=>{if(M.current===O)return;M.current=O;let e=j.current;e==null||r()||e.animate([{scale:`1 0.5`},{scale:`1`}],{duration:200,easing:`cubic-bezier(0.23, 1, 0.32, 1)`})},P=[O],h[8]=O,h[9]=N,h[10]=P),e(N,P);let F;h[11]===g?F=h[12]:(F=t(g,`password-input`),h[11]=g,h[12]=F);let I;h[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=/* @__PURE__ */ d(i,{}),h[13]=I):I=h[13];let L;h[14]!==T||h[15]!==y||h[16]!==O?(L=()=>{let e=!O;T||D(e),y?.(e)},h[14]=T,h[15]=y,h[16]=O,h[17]=L):L=h[17];let R;h[18]===A?R=h[19]:(R=/* @__PURE__ */ d(n,{ref:j,svg:/* @__PURE__ */ d(A,{"aria-hidden":!0})}),h[18]=A,h[19]=R);let z;h[20]!==_||h[21]!==w||h[22]!==O||h[23]!==L||h[24]!==R?(z=/* @__PURE__ */ d(`button`,{type:`button`,disabled:_,"data-slot":`password-input-toggle`,"aria-label":`Show value`,"aria-pressed":O,"aria-controls":w,className:`text-body hover:text-strong focus-visible:ring-focus-accent ml-1 cursor-pointer rounded-xs bg-inherit p-0 focus-visible:ring-2 focus-visible:outline-hidden`,onClick:L,children:R}),h[20]=_,h[21]=w,h[22]=O,h[23]=L,h[24]=R,h[25]=z):z=h[25];let B;return h[26]!==_||h[27]!==w||h[28]!==b||h[29]!==x||h[30]!==F||h[31]!==z||h[32]!==k?(B=/* @__PURE__ */ f(a,{"data-slot":F,disabled:_,id:w,type:k,ref:x,...b,children:[I,z]}),h[26]=_,h[27]=w,h[28]=b,h[29]=x,h[30]=F,h[31]=z,h[32]=k,h[33]=B):B=h[33],B};export{a as Input,i as InputCapture,h as PasswordInput,o as isInput};
@@ -1,4 +1,4 @@
1
- import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-ynMysD16.js";
1
+ import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-BpfbtOUN.js";
2
2
  /**
3
3
  * Props for {@link LineChart.Root}. Lines encode value by vertical position,
4
4
  * not length from a baseline, so the full y domain stays overridable via
@@ -7,7 +7,9 @@ import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g
7
7
  type LineChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps<TMode> & {
8
8
  /** Rows of data; each `LineChart.Line` reads one numeric key per row. */
9
9
  data: readonly TDatum[];
10
- /** The key of each row's x value. */
10
+ /**
11
+ * The key of each row's x value. If no row has the key, the Root throws.
12
+ */
11
13
  xKey: Extract<keyof TDatum, string>;
12
14
  /**
13
15
  * Override the auto-detected x scale (`Date` values → `"time"`, numbers →
@@ -19,7 +21,12 @@ type LineChartRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends Ch
19
21
  * Props for {@link LineChart.Line}.
20
22
  */
21
23
  type LineChartLineProps = {
22
- /** The row key this series reads its numeric values from. */
24
+ /**
25
+ * The row key this series reads its numeric values from.
26
+ * If no row has the key, the chart throws, so put the key in every row, with
27
+ * `null` for no value. A row with no value renders a gap, unless `connectNulls`
28
+ * joins across it.
29
+ */
23
30
  dataKey: string;
24
31
  /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
25
32
  label?: string;
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-D2LtDZtV.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as LineChart};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BpWfQAwf.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as LineChart};
@@ -0,0 +1 @@
1
+ import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./slot-DdYN1L1C.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{c as a}from"react/compiler-runtime";import{Children as o,createContext as s,isValidElement as c,useContext as l,useEffect as u,useId as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=s(null);function v(e){let t=l(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=s(null),b=s(null);function x(e){return c(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D(e){let t=a(37),{count:n,enabled:r,isItemDisabled:o,onActivate:s,itemId:c,scrollToIndex:l}=e,[u,d]=p(-1),m=f(!1),h=u>=n?n-1:u;if(u>=n&&d(n-1),!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={activeIndex:-1,collectionProps:{}},t[0]=e):e=t[0],e}let g;t[1]===o?g=t[2]:(g=e=>o?.(e)??!1,t[1]=o,t[2]=g);let _=g,v;t[3]!==n||t[4]!==_?(v=(e,t)=>S({start:e,step:t,count:n,isItemDisabled:_}),t[3]=n,t[4]=_,t[5]=v):v=t[5];let y=v,b;t[6]===l?b=t[7]:(b=e=>{e<0||(d(e),l(e))},t[6]=l,t[7]=b);let x=b,C;t[8]!==h||t[9]!==c?(C=h>=0?c(h):void 0,t[8]=h,t[9]=c,t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=e=>{let t=T(e.target);t!=null&&!_(t.index)?(d(t.index),m.current=!1):m.current=!0},t[11]=_,t[12]=w);let E;t[13]!==_||t[14]!==s?(E=e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||_(t.index)||i(e.target,t.item)||(d(t.index),s?.(t.index))},t[13]=_,t[14]=s,t[15]=E):E=t[15];let D;t[16]!==n||t[17]!==y||t[18]!==_?(D=e=>{if(e.target!==e.currentTarget){let t=T(e.target);t!=null&&!_(t.index)&&d(t.index),e.target instanceof HTMLElement&&e.target.tabIndex>=0||e.currentTarget.focus({preventScroll:!0}),m.current=!1;return}let t=m.current;m.current=!1,n>0&&!t&&d(e=>e<0?y(0,1):e)},t[16]=n,t[17]=y,t[18]=_,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e.currentTarget.contains(e.relatedTarget)||(d(-1),m.current=!1)},t[20]=O):O=t[20];let k;t[21]!==x||t[22]!==h||t[23]!==n||t[24]!==y||t[25]!==_||t[26]!==s?(k=e=>{if(e.target===e.currentTarget&&!(e.altKey||e.ctrlKey||e.metaKey)){m.current=!1;bb103:switch(e.key){case`ArrowDown`:e.preventDefault(),x(y(h<0?0:h+1,1));break bb103;case`ArrowUp`:e.preventDefault(),x(h<0?y(0,1):y(h-1,-1));break bb103;case`Home`:e.preventDefault(),x(y(0,1));break bb103;case`End`:e.preventDefault(),x(y(n-1,-1));break bb103;case` `:case`Enter`:!e.repeat&&h>=0&&!_(h)&&(e.preventDefault(),s?.(h));break bb103}}},t[21]=x,t[22]=h,t[23]=n,t[24]=y,t[25]=_,t[26]=s,t[27]=k):k=t[27];let A;t[28]!==C||t[29]!==w||t[30]!==E||t[31]!==D||t[32]!==k?(A={tabIndex:0,"aria-activedescendant":C,onMouseDown:w,onClick:E,onFocus:D,onBlur:O,onKeyDown:k},t[28]=C,t[29]=w,t[30]=E,t[31]=D,t[32]=k,t[33]=A):A=t[33];let j;return t[34]!==h||t[35]!==A?(j={activeIndex:h,collectionProps:A},t[34]=h,t[35]=A,t[36]=j):j=t[36],j}function O(e){let t=a(25),{count:n,focusItemAt:r,isItemDisabled:i,onActivate:o,itemId:s,scrollToIndex:c,semantics:l}=e,u=d(),f;t[0]===l?f=t[1]:(f={semantics:l},t[0]=l,t[1]=f);let p=f,m;t[2]!==u||t[3]!==s?(m=s??(e=>`${u}-item-${e}`),t[2]=u,t[3]=s,t[4]=m):m=t[4];let h=m,g=l===`grid`,_;t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==h||t[9]!==c||t[10]!==g?(_={count:n,enabled:g,isItemDisabled:i,onActivate:o,itemId:h,scrollToIndex:c},t[5]=n,t[6]=i,t[7]=o,t[8]=h,t[9]=c,t[10]=g,t[11]=_):_=t[11];let{activeIndex:v,collectionProps:y}=D(_),b=s==null?h:null,x;t[12]!==v||t[13]!==b?(x={activeIndex:v,stampItemId:b},t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]!==n||t[16]!==r||t[17]!==y||t[18]!==i||t[19]!==l?(C=l===`list`?E({count:n,isItemDisabled:i,focusItemAt:r}):y,t[15]=n,t[16]=r,t[17]=y,t[18]=i,t[19]=l,t[20]=C):C=t[20];let w=C,T;return t[21]!==w||t[22]!==S||t[23]!==p?(T={collectionProps:w,gridNav:S,listContext:p},t[21]=w,t[22]=S,t[23]=p,t[24]=T):T=t[24],T}function k(e){let r=a(26),{"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,children:c,className:l,collectionProps:u,gridNav:d,listContext:f,viewportProps:p,ref:m}=e,g,v;r[0]===p?(g=r[1],v=r[2]):({"data-slot":g,...v}=p,r[0]=p,r[1]=g,r[2]=v);let y;r[3]===g?y=r[4]:(y=n(g,`list`),r[3]=g,r[4]=y);let x;r[5]===l?x=r[6]:(x=t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,l),r[5]=l,r[6]=x);let S=f.semantics===`grid`?`grid`:`list`,C;r[7]!==i||r[8]!==o||r[9]!==s||r[10]!==c||r[11]!==u||r[12]!==S?(C=/* @__PURE__ */ h(`div`,{"data-slot":`list-collection`,role:S,"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,className:`relative flex w-full flex-col gap-px outline-hidden`,...u,children:c}),r[7]=i,r[8]=o,r[9]=s,r[10]=c,r[11]=u,r[12]=S,r[13]=C):C=r[13];let w;r[14]!==m||r[15]!==y||r[16]!==x||r[17]!==C||r[18]!==v?(w=/* @__PURE__ */ h(`div`,{ref:m,"data-slot":y,className:x,...v,children:C}),r[14]=m,r[15]=y,r[16]=x,r[17]=C,r[18]=v,r[19]=w):w=r[19];let T;r[20]!==d||r[21]!==w?(T=/* @__PURE__ */ h(b.Provider,{value:d,children:w}),r[20]=d,r[21]=w,r[22]=T):T=r[22];let E;return r[23]!==f||r[24]!==T?(E=/* @__PURE__ */ h(_.Provider,{value:f,children:T}),r[23]=f,r[24]=T,r[25]=E):E=r[25],E}const A=i=>{let o=a(43),s,c,u,d,f,p,m,g,_;o[0]===i?(s=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],g=o[8],_=o[9]):({"data-slot":d,asChild:s,children:c,className:u,disabled:g,ref:p,selected:_,style:m,...f}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=u,o[4]=d,o[5]=f,o[6]=p,o[7]=m,o[8]=g,o[9]=_);let x=g!==void 0&&g,S=_!==void 0&&_,{semantics:C}=v(`Item`),w=l(y),T=l(b),E=C===`grid`,D=s?r:`div`,O=w?.placement??null,k=w?.index,A=E&&T!=null&&k!=null&&T.activeIndex===k,j=O?.measureRef??null,M=e(p,j),N;o[10]===d?N=o[11]:(N=n(d,`list-item`),o[10]=d,o[11]=N);let P;o[12]!==T||o[13]!==k||o[14]!==E||o[15]!==f?(P=E&&k!=null&&T?.stampItemId!=null?T.stampItemId(k):f.id,o[12]=T,o[13]=k,o[14]=E,o[15]=f,o[16]=P):P=o[16];let F=S?`selected`:`unselected`,I=x||void 0,L=A||void 0,R=E?`row`:`listitem`,z=E?S:void 0,B=E&&x?!0:f[`aria-disabled`],V=E?O?.posInSet:void 0,H=E?void 0:O?.posInSet,U=E?void 0:O?.setSize,W=!x&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,G=!E&&!x&&`has-focus-visible:bg-active-menu-item has-focus-visible:data-[state=selected]:bg-active-selected-menu-item`,K;o[17]!==u||o[18]!==W||o[19]!==G?(K=t(`rounded-md data-[state=selected]:bg-selected-menu-item data-active:bg-active-menu-item data-active:data-[state=selected]:bg-active-selected-menu-item`,W,G,u),o[17]=u,o[18]=W,o[19]=G,o[20]=K):K=o[20];let q;o[21]!==O||o[22]!==m?(q=O?{...m,...O.style}:m,o[21]=O,o[22]=m,o[23]=q):q=o[23];let J;return o[24]!==D||o[25]!==c||o[26]!==M||o[27]!==k||o[28]!==f||o[29]!==B||o[30]!==V||o[31]!==H||o[32]!==U||o[33]!==K||o[34]!==q||o[35]!==N||o[36]!==P||o[37]!==F||o[38]!==I||o[39]!==L||o[40]!==R||o[41]!==z?(J=/* @__PURE__ */ h(D,{ref:M,"data-slot":N,...f,id:P,"data-index":k,"data-state":F,"data-disabled":I,"data-active":L,role:R,"aria-selected":z,"aria-disabled":B,"aria-rowindex":V,"aria-posinset":H,"aria-setsize":U,className:K,style:q,children:c}),o[24]=D,o[25]=c,o[26]=M,o[27]=k,o[28]=f,o[29]=B,o[30]=V,o[31]=H,o[32]=U,o[33]=K,o[34]=q,o[35]=N,o[36]=P,o[37]=F,o[38]=I,o[39]=L,o[40]=R,o[41]=z,o[42]=J):J=o[42],J};function j(e){let t=a(5),{children:n,index:r}=e,i;t[0]===r?i=t[1]:(i={index:r,placement:null},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=/* @__PURE__ */ h(y.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}const M=t=>{let n=a(40),r,i,s,l,u,d,p,m,g,_,v;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],u=n[5],d=n[6],p=n[7],m=n[8],g=n[9],_=n[10],v=n[11]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:u,isItemDisabled:d,onActivate:m,itemId:p,ref:_,semantics:v,...g}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=u,n[6]=d,n[7]=p,n[8]=m,n[9]=g,n[10]=_,n[11]=v);let y=v===void 0?`list`:v,b=f(null),S=e(b,_),C;n[12]===l?C=n[13]:(C=o.toArray(l).filter(c),n[12]=l,n[13]=C);let T=C,E;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{b.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},n[14]=E):E=n[14];let D=E,A;n[15]===T.length?A=n[16]:(A=(e,t)=>{let n=b.current;if(n!=null)for(let r=e;r>=0&&r<T.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},n[15]=T.length,n[16]=A);let j=A,M;n[17]!==d||n[18]!==T?(M=d??(e=>x(T[e])),n[17]=d,n[18]=T,n[19]=M):M=n[19];let P;n[20]!==j||n[21]!==T.length||n[22]!==p||n[23]!==m||n[24]!==y||n[25]!==M?(P={count:T.length,focusItemAt:j,isItemDisabled:M,onActivate:m,itemId:p,scrollToIndex:D,semantics:y},n[20]=j,n[21]=T.length,n[22]=p,n[23]=m,n[24]=y,n[25]=M,n[26]=P):P=n[26];let{collectionProps:F,gridNav:I,listContext:L}=O(P),R;n[27]===T?R=n[28]:(R=T.map(N),n[27]=T,n[28]=R);let z;return n[29]!==r||n[30]!==i||n[31]!==s||n[32]!==u||n[33]!==F||n[34]!==S||n[35]!==I||n[36]!==L||n[37]!==g||n[38]!==R?(z=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:u,collectionProps:F,gridNav:I,listContext:L,viewportProps:g,ref:S,children:R}),n[29]=r,n[30]=i,n[31]=s,n[32]=u,n[33]=F,n[34]=S,n[35]=I,n[36]=L,n[37]=g,n[38]=R,n[39]=z):z=n[39],z};function N(e,t){return/* @__PURE__ */ h(j,{index:t,children:e},e.key??t)}function P({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function F(e){let t=a(10),{children:n,count:r,measureRef:i,virtualItem:o}=e,s=o.index,c;t[0]!==r||t[1]!==i||t[2]!==o?(c=P({virtualItem:o,count:r,measureRef:i}),t[0]=r,t[1]=i,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==c||t[5]!==o.index?(l={index:s,placement:c},t[4]=c,t[5]=o.index,t[6]=l):l=t[6];let u=l,d;return t[7]!==n||t[8]!==u?(d=/* @__PURE__ */ h(y.Provider,{value:u,children:n}),t[7]=n,t[8]=u,t[9]=d):d=t[9],d}function I({count:e,estimateItemHeight:t,getItemKey:n,overscan:r,scrollRef:i}){"use no memo";let a=g({count:e,getScrollElement:()=>i.current,estimateSize:()=>t,getItemKey:n,overscan:r,gap:1,initialRect:{width:0,height:t*(r+1)}});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),measureElement:a.measureElement,scrollToIndex:a.scrollToIndex}}const L=t=>{let n=a(68),r,i,s,l,d,p,m,g,_,v,y,b,S;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],d=n[5],p=n[6],m=n[7],g=n[8],_=n[9],v=n[10],y=n[11],b=n[12],S=n[13]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:d,estimateItemHeight:y,isItemDisabled:p,onActivate:g,overscan:b,itemId:m,ref:v,semantics:S,..._}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=d,n[6]=p,n[7]=m,n[8]=g,n[9]=_,n[10]=v,n[11]=y,n[12]=b,n[13]=S);let C=y===void 0?44:y,T=b===void 0?8:b,E=S===void 0?`list`:S,D=f(null),A=e(D,v),j;n[14]===l?j=n[15]:(j=o.toArray(l).filter(c),n[14]=l,n[15]=j);let M=j,N=M.length,P;n[16]===M?P=n[17]:(P=e=>M[e]?.key??e,n[16]=M,n[17]=P);let L=P,R;n[18]!==N||n[19]!==C||n[20]!==L||n[21]!==T?(R={count:N,estimateItemHeight:C,getItemKey:L,overscan:T,scrollRef:D},n[18]=N,n[19]=C,n[20]=L,n[21]=T,n[22]=R):R=n[22];let{virtualItems:z,totalSize:B,measureElement:V,scrollToIndex:H}=I(R),U;n[23]===H?U=n[24]:(U=e=>H(e,{align:`auto`}),n[23]=H,n[24]=U);let W=U,G=f(null),K,q;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>()=>{G.current!=null&&cancelAnimationFrame(G.current)},q=[],n[25]=K,n[26]=q):(K=n[25],q=n[26]),u(K,q);let J;n[27]!==N||n[28]!==W?(J=(e,t)=>{G.current!=null&&(cancelAnimationFrame(G.current),G.current=null);let n=e,r=0,i=()=>{G.current=null;let e=D.current;if(e==null||n<0||n>=N)return;W(n);let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(G.current=requestAnimationFrame(i))};i()},n[27]=N,n[28]=W,n[29]=J):J=n[29];let ee=J,Y;n[30]!==p||n[31]!==M?(Y=p??(e=>x(M[e])),n[30]=p,n[31]=M,n[32]=Y):Y=n[32];let X;n[33]!==N||n[34]!==ee||n[35]!==m||n[36]!==g||n[37]!==W||n[38]!==E||n[39]!==Y?(X={count:N,focusItemAt:ee,isItemDisabled:Y,onActivate:g,itemId:m,scrollToIndex:W,semantics:E},n[33]=N,n[34]=ee,n[35]=m,n[36]=g,n[37]=W,n[38]=E,n[39]=Y,n[40]=X):X=n[40];let{collectionProps:te,gridNav:ne,listContext:re}=O(X),ie=z.some(e=>e.index===ne.activeIndex)?te[`aria-activedescendant`]:void 0,ae=E===`grid`?N:void 0,oe=`${B}px`,Z;n[41]===oe?Z=n[42]:(Z={height:oe},n[41]=oe,n[42]=Z);let Q;n[43]!==te||n[44]!==ie||n[45]!==ae||n[46]!==Z?(Q={...te,"aria-activedescendant":ie,"aria-rowcount":ae,style:Z},n[43]=te,n[44]=ie,n[45]=ae,n[46]=Z,n[47]=Q):Q=n[47];let $;if(n[48]!==N||n[49]!==M||n[50]!==V||n[51]!==z){let e;n[53]!==N||n[54]!==M||n[55]!==V?(e=e=>{let t=M[e.index];return t==null?null:/* @__PURE__ */ h(F,{virtualItem:e,count:N,measureRef:V,children:t},e.key)},n[53]=N,n[54]=M,n[55]=V,n[56]=e):e=n[56],$=z.map(e),n[48]=N,n[49]=M,n[50]=V,n[51]=z,n[52]=$}else $=n[52];let se;return n[57]!==r||n[58]!==i||n[59]!==s||n[60]!==d||n[61]!==A||n[62]!==ne||n[63]!==re||n[64]!==_||n[65]!==Q||n[66]!==$?(se=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:d,collectionProps:Q,gridNav:ne,listContext:re,viewportProps:_,ref:A,children:$}),n[57]=r,n[58]=i,n[59]=s,n[60]=d,n[61]=A,n[62]=ne,n[63]=re,n[64]=_,n[65]=Q,n[66]=$,n[67]=se):se=n[67],se};export{A as n,M as r,L as t};
package/dist/list.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"./slot-DdYN1L1C.js";import{n as r,r as i,t as a}from"./list-DOVZoz9t.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";const c={Root:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(i,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},VirtualRoot:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(a,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:t=>{let i=o(34),a,c,u,d,f,p,m;i[0]===t?(a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({asChild:a,className:c,current:u,disabled:d,onClick:f,ref:m,...p}=t,i[0]=t,i[1]=a,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let h=a?n:`button`,g=u||void 0,_;i[8]!==a||i[9]!==d?(_=a?{"aria-disabled":d||void 0,tabIndex:d?-1:void 0}:{type:`button`,disabled:d},i[8]=a,i[9]=d,i[10]=_):_=i[10];let v;i[11]!==a||i[12]!==d||i[13]!==f?(v=e=>{a&&d?(e.preventDefault(),e.stopPropagation()):f?.(e)},i[11]=a,i[12]=d,i[13]=f,i[14]=v):v=i[14];let y;i[15]===c?y=i[16]:(y=e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,c),i[15]=c,i[16]=y);let b;i[17]!==a||i[18]!==d||i[19]!==p?(b=a&&d?l:p.onClickCapture,i[17]=a,i[18]=d,i[19]=p,i[20]=b):b=i[20];let x;i[21]!==h||i[22]!==p||i[23]!==m||i[24]!==g||i[25]!==_||i[26]!==v||i[27]!==y||i[28]!==b?(x=/* @__PURE__ */ s(h,{ref:m,"data-slot":`list-item-control`,"aria-current":g,..._,onClick:v,className:y,...p,onClickCapture:b}),i[21]=h,i[22]=p,i[23]=m,i[24]=g,i[25]=_,i[26]=v,i[27]=y,i[28]=b,i[29]=x):x=i[29];let S;return i[30]!==u||i[31]!==d||i[32]!==x?(S=/* @__PURE__ */ s(r,{selected:u,disabled:d,children:x}),i[30]=u,i[31]=d,i[32]=x,i[33]=S):S=i[33],S},ItemTitle:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-title`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-strong font-medium`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},ItemDescription:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-description`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-body leading-4`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f}};function l(e){e.preventDefault(),e.stopPropagation()}export{c as List};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{n as r,r as i,t as a}from"./list-RFRIQxU2.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";const c={Root:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(i,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},VirtualRoot:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(a,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:t=>{let i=o(34),a,c,u,d,f,p,m;i[0]===t?(a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({asChild:a,className:c,current:u,disabled:d,onClick:f,ref:m,...p}=t,i[0]=t,i[1]=a,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let h=a?n:`button`,g=u||void 0,_;i[8]!==a||i[9]!==d?(_=a?{"aria-disabled":d||void 0,tabIndex:d?-1:void 0}:{type:`button`,disabled:d},i[8]=a,i[9]=d,i[10]=_):_=i[10];let v;i[11]!==a||i[12]!==d||i[13]!==f?(v=e=>{a&&d?(e.preventDefault(),e.stopPropagation()):f?.(e)},i[11]=a,i[12]=d,i[13]=f,i[14]=v):v=i[14];let y;i[15]===c?y=i[16]:(y=e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,c),i[15]=c,i[16]=y);let b;i[17]!==a||i[18]!==d||i[19]!==p?(b=a&&d?l:p.onClickCapture,i[17]=a,i[18]=d,i[19]=p,i[20]=b):b=i[20];let x;i[21]!==h||i[22]!==p||i[23]!==m||i[24]!==g||i[25]!==_||i[26]!==v||i[27]!==y||i[28]!==b?(x=/* @__PURE__ */ s(h,{ref:m,"data-slot":`list-item-control`,"aria-current":g,..._,onClick:v,className:y,...p,onClickCapture:b}),i[21]=h,i[22]=p,i[23]=m,i[24]=g,i[25]=_,i[26]=v,i[27]=y,i[28]=b,i[29]=x):x=i[29];let S;return i[30]!==u||i[31]!==d||i[32]!==x?(S=/* @__PURE__ */ s(r,{selected:u,disabled:d,children:x}),i[30]=u,i[31]=d,i[32]=x,i[33]=S):S=i[33],S},ItemTitle:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-title`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-strong font-medium`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},ItemDescription:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-description`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-body leading-4`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f}};function l(e){e.preventDefault(),e.stopPropagation()}export{c as List};
package/dist/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @ngrok/mantle (0.91.0)
1
+ # @ngrok/mantle (0.92.0)
2
2
 
3
3
  > Offline index shipped inside the @ngrok/mantle npm package. The full records, with examples and sibling boundaries, are in agent.json beside this file. Neither file lists props: read the bundled type declarations (`<subpath>.d.ts` beside this file) for every prop and its JSDoc. Live docs: https://mantle.ngrok.com/for-ai-agents.
4
4
 
@@ -85,7 +85,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
85
85
  - **Table** (`@ngrok/mantle/table`): A structured way to display data in rows and columns.
86
86
  - **Tabs** (`@ngrok/mantle/tabs`): Layered sections of content, called tab panels, that show one at a time.
87
87
  - **Text Area** (`@ngrok/mantle/text-area`): A multi-line plain-text editing control.
88
- - **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider, MantleStyleSheets, and FOUC prevention) for light and dark modes that follow the OS by default.
88
+ - **Theme** (`@ngrok/mantle/theme`): Theme primitives (ThemeProvider and FOUC prevention) for light and dark modes that follow the OS by default.
89
89
  - **Theme Switcher** (`@ngrok/mantle/theme-switcher`): The canonical light/dark toggle for headers and toolbars, plus the same toggle as one item for account menus.
90
90
  - **Toast** (`@ngrok/mantle/toast`): A succinct message that appears temporarily. Also called: notification, snackbar.
91
91
  - **Tooltip** (`@ngrok/mantle/tooltip`): A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.