efficient-shell 8.35.0 → 8.38.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 (194) hide show
  1. package/README.md +11 -0
  2. package/dist/{Browser-ERZNOFN7.js → Browser-5TOAZTHJ.js} +14 -14
  3. package/dist/Calculator-I4P2BWR7.js +29 -0
  4. package/dist/CurrencyConverter-K2IIOVHM.js +21 -0
  5. package/dist/{Documents-POWS4L44.js → Documents-IYGZXCU2.js} +14 -14
  6. package/dist/Files-EMPEGBMQ.js +87 -0
  7. package/dist/Notepad-VYJZ2XA4.js +25 -0
  8. package/dist/PdfViewer-KJCJ6EPG.js +1 -0
  9. package/dist/{PomodoroTimer-GLYNCO4H.js → PomodoroTimer-BEVXP5KG.js} +28 -28
  10. package/dist/{Preview-WZDFVBNJ.js → Preview-AVQQI32Z.js} +36 -36
  11. package/dist/Sidebar-6I4FC5AK.js +43 -0
  12. package/dist/Spreadsheet-EM6OOJ6I.js +37 -0
  13. package/dist/Stock-YJNQMFSV.js +16 -0
  14. package/dist/{Weather-UKLNJ3VF.js → Weather-XDT4ZEHN.js} +19 -19
  15. package/dist/{WorldClock-OZ3I7D2M.js → WorldClock-7PTVRQ2A.js} +6 -6
  16. package/dist/ai/index.d.ts +118 -3
  17. package/dist/ai/index.js +53 -43
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/{chunk-ZRHQGFO5.js → chunk-3CST4ZDP.js} +2 -2
  23. package/dist/chunk-454DAGYG.js +19 -0
  24. package/dist/{chunk-TRD22FC7.js → chunk-45S6M77O.js} +6 -6
  25. package/dist/chunk-4AJRHTTB.js +1 -0
  26. package/dist/chunk-4IVT244O.js +8 -0
  27. package/dist/{chunk-G2MJTE6X.js → chunk-4OFD6ICH.js} +10 -10
  28. package/dist/{chunk-5N5DBTTF.js → chunk-4SZDP3JF.js} +12 -12
  29. package/dist/{chunk-FMKTVZAO.js → chunk-4Y4PWKMM.js} +1 -1
  30. package/dist/{chunk-DIN3EFOM.js → chunk-5BZMSSOV.js} +8 -8
  31. package/dist/{chunk-64ZHCEZN.js → chunk-5TFTSYOD.js} +1 -1
  32. package/dist/{chunk-GK3QH63P.js → chunk-63EK6S3W.js} +1 -1
  33. package/dist/{chunk-ECCUEG3J.js → chunk-6BCFVOG7.js} +1 -1
  34. package/dist/{chunk-M2KV4WKR.js → chunk-6GWZ5UPX.js} +1 -1
  35. package/dist/{chunk-EBC4XFL2.js → chunk-6SMQNPWS.js} +1 -1
  36. package/dist/{chunk-EW6FRPFJ.js → chunk-6WWAQC5V.js} +1 -1
  37. package/dist/{chunk-TTY62G5D.js → chunk-7C56GLLI.js} +16 -16
  38. package/dist/{chunk-MICWRC72.js → chunk-7MSFHQAY.js} +7 -7
  39. package/dist/{chunk-XZL3HCWH.js → chunk-7OCNF4AI.js} +1 -1
  40. package/dist/chunk-AAW27HJY.js +3 -0
  41. package/dist/{chunk-WME5DFB6.js → chunk-BIJ7ADTZ.js} +1 -1
  42. package/dist/{chunk-SEXLHFMR.js → chunk-BMPBVI7P.js} +1 -1
  43. package/dist/{chunk-TOVHLONK.js → chunk-BT3XDH3L.js} +4 -4
  44. package/dist/{chunk-JVIOAZHW.js → chunk-BUGAWNOC.js} +4 -4
  45. package/dist/{chunk-R4C3GGCS.js → chunk-BVW5U7QQ.js} +3 -3
  46. package/dist/{chunk-AF7R2MV4.js → chunk-CKZ6ZDU5.js} +1 -1
  47. package/dist/{chunk-IHEEJO5S.js → chunk-CPK7JTN3.js} +1 -1
  48. package/dist/{chunk-EVB35JP5.js → chunk-DOCUM3K7.js} +1 -1
  49. package/dist/{chunk-FKZEGBLK.js → chunk-DXTKNHWG.js} +11 -11
  50. package/dist/{chunk-2U2GJCSP.js → chunk-EL2RLUT6.js} +7 -7
  51. package/dist/{chunk-4GVH4ZUH.js → chunk-ET2EF5CI.js} +1 -1
  52. package/dist/{chunk-MC43PRTL.js → chunk-EXWGPXOS.js} +1 -1
  53. package/dist/{chunk-2SHYR3RA.js → chunk-FSPFV4MI.js} +9 -4
  54. package/dist/{chunk-YBB56N6X.js → chunk-G63BCOQ6.js} +1 -1
  55. package/dist/{chunk-DG2WU3BU.js → chunk-GSBIJLTD.js} +2 -2
  56. package/dist/{chunk-ZXSMSVLU.js → chunk-I7HDD4IM.js} +1 -1
  57. package/dist/chunk-J47HXHSL.js +8 -0
  58. package/dist/{chunk-2WL3Q7VW.js → chunk-J7FZAOKT.js} +16 -16
  59. package/dist/{chunk-RB2F65YJ.js → chunk-JPRJQ6B7.js} +11 -11
  60. package/dist/{chunk-S4IW5OL3.js → chunk-K52WWA5G.js} +1 -1
  61. package/dist/{chunk-M2LLVSBR.js → chunk-KWX6NAOR.js} +1 -1
  62. package/dist/{chunk-OFKWTOXK.js → chunk-L7FDYGGF.js} +3 -3
  63. package/dist/{chunk-6ANFVX4M.js → chunk-L7IKTEOC.js} +11 -11
  64. package/dist/{chunk-EZY4CO4A.js → chunk-LGAN7DNC.js} +5 -5
  65. package/dist/{chunk-PCKYNZ5Y.js → chunk-LGLZTJ2W.js} +6 -6
  66. package/dist/{chunk-WKRFD4E4.js → chunk-LSISFKKS.js} +8 -8
  67. package/dist/{chunk-7ACSSYEZ.js → chunk-MEJK6PBN.js} +1 -1
  68. package/dist/{chunk-4RNF6MNW.js → chunk-MGXE75N5.js} +2 -2
  69. package/dist/{chunk-IUCIYWTT.js → chunk-NDO24PK6.js} +8 -8
  70. package/dist/{chunk-XDDTFV32.js → chunk-NESJOC3R.js} +1 -1
  71. package/dist/{chunk-BYCOB6WT.js → chunk-NGBT7AHL.js} +6 -6
  72. package/dist/chunk-NLWS7HMX.js +29 -0
  73. package/dist/chunk-O4Q475GF.js +1 -0
  74. package/dist/chunk-PCQPV6MS.js +6 -0
  75. package/dist/{chunk-CCPNMYCK.js → chunk-Q23EHOXW.js} +1 -1
  76. package/dist/{chunk-ACW3J77L.js → chunk-Q7HN6T3H.js} +1 -1
  77. package/dist/{chunk-NUSSZJF2.js → chunk-REVC6YPT.js} +5 -5
  78. package/dist/{chunk-2AHHM4SK.js → chunk-RJ4KZGAT.js} +56 -56
  79. package/dist/{chunk-EM6BEHAD.js → chunk-RWGSMZGS.js} +1 -1
  80. package/dist/{chunk-4MO375G3.js → chunk-S2OIRC5H.js} +3 -3
  81. package/dist/chunk-SG3ILR7W.js +4 -0
  82. package/dist/{chunk-FTKKGGOQ.js → chunk-SR4XAYLC.js} +1 -1
  83. package/dist/{chunk-RPJ2GC3K.js → chunk-SRKSGUGT.js} +20 -20
  84. package/dist/{chunk-2F7ZOMKK.js → chunk-SZIENHKR.js} +1 -1
  85. package/dist/{chunk-UZ3CZQA4.js → chunk-TGLHJS3M.js} +1 -1
  86. package/dist/{chunk-O2YAB6WK.js → chunk-TIQKDAON.js} +6 -6
  87. package/dist/{chunk-TANR67XF.js → chunk-TVJRENCQ.js} +9 -9
  88. package/dist/{chunk-SWHRP52Y.js → chunk-TZMJEOZA.js} +1 -1
  89. package/dist/{chunk-MY755PTJ.js → chunk-UZMZ2EDW.js} +1 -1
  90. package/dist/{chunk-S4J4B7LY.js → chunk-WCKZHEFC.js} +5 -5
  91. package/dist/{chunk-5OX6KXWY.js → chunk-WIW2547G.js} +1 -1
  92. package/dist/{chunk-AZU7YOES.js → chunk-WRORJNS5.js} +8 -8
  93. package/dist/{chunk-XB2YPUKR.js → chunk-XLD53X4P.js} +8 -8
  94. package/dist/{chunk-4HCRZHIX.js → chunk-XSPDPN5O.js} +1 -1
  95. package/dist/{chunk-TZHWF3P5.js → chunk-Y6IQYQYN.js} +2 -2
  96. package/dist/chunk-YALPQIBR.js +7 -0
  97. package/dist/{chunk-HAIMJAI4.js → chunk-ZCHBOAPA.js} +2 -2
  98. package/dist/{chunk-M2AIC7IK.js → chunk-ZEKM6HAA.js} +2 -2
  99. package/dist/{chunk-5YELPBUT.js → chunk-ZK2SULCA.js} +1 -1
  100. package/dist/{chunk-BHMUOWAE.js → chunk-ZSFUNXRD.js} +4 -4
  101. package/dist/{chunk-JDKRQG7X.js → chunk-ZWAVSUWT.js} +2 -2
  102. package/dist/data/ListLoadError.js +1 -1
  103. package/dist/format/index.js +1 -1
  104. package/dist/forms/BorderInput.js +1 -1
  105. package/dist/forms/BrandAssetEditor.js +1 -1
  106. package/dist/forms/Calendar.js +1 -1
  107. package/dist/forms/ColorPicker.js +1 -1
  108. package/dist/forms/ComposerAttachments.js +1 -1
  109. package/dist/forms/CornersInput.js +1 -1
  110. package/dist/forms/DatePicker.js +1 -1
  111. package/dist/forms/DateRangePicker.js +1 -1
  112. package/dist/forms/DisplayChips.js +1 -1
  113. package/dist/forms/FilePicker.js +1 -1
  114. package/dist/forms/IconPicker.js +1 -1
  115. package/dist/forms/InputNumber.js +1 -1
  116. package/dist/forms/LinkPicker.js +1 -1
  117. package/dist/forms/MediaLibrary.js +1 -1
  118. package/dist/forms/MediaUploadField.js +1 -1
  119. package/dist/forms/MediaUploadGrid.js +1 -1
  120. package/dist/forms/MediaUsedInList.js +1 -1
  121. package/dist/forms/PositionInput.js +1 -1
  122. package/dist/forms/Select.js +1 -1
  123. package/dist/forms/SidesInput.js +1 -1
  124. package/dist/forms/Slider.js +1 -1
  125. package/dist/forms/Snippet.js +1 -1
  126. package/dist/forms/SplitButton.js +1 -1
  127. package/dist/forms/TagInput.js +1 -1
  128. package/dist/forms/TextToolbar.js +1 -1
  129. package/dist/forms/WidthsBar.js +1 -1
  130. package/dist/forms/mediaLibraryMenu.js +1 -1
  131. package/dist/forms/textAlign.js +1 -1
  132. package/dist/icons/index.js +1 -1
  133. package/dist/index.js +169 -169
  134. package/dist/map/index.js +3 -3
  135. package/dist/markdown/index.js +1 -1
  136. package/dist/page-tabs/index.js +5 -5
  137. package/dist/pdf/index.js +1 -1
  138. package/dist/shell/Accordion.js +1 -1
  139. package/dist/shell/AppUpdateBanner.js +1 -1
  140. package/dist/shell/Banner.js +1 -1
  141. package/dist/shell/Breadcrumbs.js +1 -1
  142. package/dist/shell/ColoredBadge.js +1 -1
  143. package/dist/shell/ConfirmDialog.js +1 -1
  144. package/dist/shell/ContextMenu.js +1 -1
  145. package/dist/shell/Dialog.d.ts +2 -2
  146. package/dist/shell/Dialog.js +1 -1
  147. package/dist/shell/Drawer.d.ts +2 -2
  148. package/dist/shell/Drawer.js +1 -1
  149. package/dist/shell/DropdownMenu.js +1 -1
  150. package/dist/shell/EmptyState.js +1 -1
  151. package/dist/shell/HelpCenter.js +1 -1
  152. package/dist/shell/ImageLightbox.js +1 -1
  153. package/dist/shell/LanguageSelect.js +1 -1
  154. package/dist/shell/Markdown.js +1 -1
  155. package/dist/shell/PageHeader.js +1 -1
  156. package/dist/shell/PopupMenu.js +1 -1
  157. package/dist/shell/ProductionTimeline.js +1 -1
  158. package/dist/shell/Result.js +1 -1
  159. package/dist/shell/SearchableSelect.js +1 -1
  160. package/dist/shell/SettingReset.js +1 -1
  161. package/dist/shell/SettingRow.js +1 -1
  162. package/dist/shell/SidebarLayout.js +1 -1
  163. package/dist/shell/SidebarNav.js +1 -1
  164. package/dist/shell/SortableList.js +1 -1
  165. package/dist/shell/StepChain.js +1 -1
  166. package/dist/shell/Stepper.js +1 -1
  167. package/dist/shell/TopNav.js +1 -1
  168. package/dist/shell/Tree.js +1 -1
  169. package/dist/telemetry/index.js +1 -1
  170. package/dist/templates/ChatTemplate.js +1 -1
  171. package/dist/templates/CheckoutTemplate.js +1 -1
  172. package/dist/templates/DataTablePage.js +1 -1
  173. package/dist/templates/EmailTemplate.js +1 -1
  174. package/dist/templates/FormLayoutPage.js +1 -1
  175. package/dist/ui/index.js +1 -1
  176. package/dist/version.js +1 -1
  177. package/package.json +1 -1
  178. package/dist/Calculator-NXIOZMML.js +0 -29
  179. package/dist/CurrencyConverter-57WUTV4H.js +0 -21
  180. package/dist/Files-O44UH6ZF.js +0 -87
  181. package/dist/Notepad-66ZCGUHC.js +0 -25
  182. package/dist/PdfViewer-KSLOYXMD.js +0 -1
  183. package/dist/Sidebar-QQFJJWE2.js +0 -43
  184. package/dist/Spreadsheet-OYAVNRCT.js +0 -37
  185. package/dist/Stock-CIHUZOQS.js +0 -16
  186. package/dist/chunk-2PWZNFFP.js +0 -19
  187. package/dist/chunk-5FCEBKT2.js +0 -7
  188. package/dist/chunk-BZMZTPS6.js +0 -1
  189. package/dist/chunk-CAMLFCGY.js +0 -29
  190. package/dist/chunk-HMHL27AU.js +0 -6
  191. package/dist/chunk-JBQWR4SX.js +0 -8
  192. package/dist/chunk-NKZNPYDB.js +0 -3
  193. package/dist/chunk-QPWD5CCS.js +0 -8
  194. package/dist/chunk-TW6WYYBC.js +0 -3
@@ -1,9 +1,9 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-KZHPX4FM.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-2SHYR3RA.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-E6UCGCOC.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:j="bg-white"}){const z="right"===m,O=i().sidebar,P=a(),R=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[W,D]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),E=null!=l||null!=n,I=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:W},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${E?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),E?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:W,onResize:D,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:O.resize})]}),K=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${j}`,children:u});/* @__PURE__ */
4
- return f("div",P?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:R,top:l,fallback:O.sections}),K,
6
- /* @__PURE__ */p(v,{phone:R,bottom:n,label:O.sections,closeLabel:O.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[z?null:I,K,z?I:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
1
+ import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-KZHPX4FM.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-E6UCGCOC.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:C=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:P="bg-white"}){const j="right"===m,z=i().sidebar,O=a(),W=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[D,E]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),I=null!=l||null!=n,M=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:D},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${I?"overflow-hidden":"overflow-y-auto"} ${C}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),I?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(t,{side:m,width:D,onResize:E,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:z.resize})]}),K=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${P}`,children:u});/* @__PURE__ */
4
+ return f("div",O?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
+ /* @__PURE__ */p(g,{phone:W,top:l,fallback:z.sections}),K,
6
+ /* @__PURE__ */p(v,{phone:W,bottom:n,label:z.sections,closeLabel:z.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[j?null:M,K,j?M:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
8
  /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-FMKTVZAO.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-YDYDR72S.js";import{ColoredBadge as m}from"./chunk-4GVH4ZUH.js";import{MENU_ON_MEDIA_ATTR as u}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-2SHYR3RA.js";import{Tooltip as h}from"./chunk-22S6LG6D.js";import{useShellStrings as f}from"./chunk-E6UCGCOC.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function w({items:p,onPick:k,onFiles:w,onRemove:N,onReorder:j,dragType:C,dropType:K,onDropData:T,label:A,hint:S,error:F,required:P,className:I,accept:L="image/*",maxSizeBytes:O,maxFiles:z,fit:H="cover",thumbSize:M=96,placeholder:$,cta:E,acceptHint:R,showCover:V=!1,coverLabel:B,busy:G=!1,busyLabel:Q,progress:U,disabled:W=!1,readOnly:Y=!1,selected:q,onItemClick:Z,onItemDoubleClick:J,onItemContextMenu:X,menuOnMedia:_=!1}){const ee=f().media,re=E??ee.cta,te=B??ee.cover,ae=Q??ee.uploading,ne=g(),[le,ie]=b(null),oe=W||G,se=!(!k&&!w||oe||Y),de=!!N&&!oe&&!Y,ce=!!j&&!oe&&!Y,me=!!C&&!W&&!ce,ue=!(!K||!T||oe||Y),pe=r(oe),he=$??t(L,ee),fe=d({accept:L,maxSizeBytes:O,maxFiles:z,acceptHint:R,multiple:!0,disabled:!se,currentCount:p.length,onAccept:e=>{if(w)w(e);else for(const r of e)k(r)}}),[ge,be]=b(!1),ye=y(0),ve=e=>ue&&Array.from(e.dataTransfer?.types??[]).includes(K),xe=fe.zoneProps,ke={onDragEnter:e=>{if(!ve(e))return xe.onDragEnter?.(e);e.preventDefault(),ye.current+=1,be(!0)},onDragOver:e=>{if(!ve(e))return xe.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",ge||be(!0)},onDragLeave:e=>{if(!ve(e))return xe.onDragLeave?.(e);ye.current=Math.max(0,ye.current-1),0===ye.current&&be(!1)},onDrop:e=>{if(!ve(e))return xe.onDrop?.(e);e.preventDefault(),ye.current=0,be(!1);const r=e.dataTransfer.getData(K);r&&T(r)}},De=fe.dragOver||ge,we=()=>{se&&(k?k():fe.open())},Ne={width:M,height:M},je=null==q?null:new Set(q),Ce=!!Z,Ke=M<112,Te=(e,r)=>{const t=e.kind?"video"===e.kind:i(e.url,L),a=e.name??o(e.url),n=V&&(e.cover??0===r);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},..._?{[u]:""}:{},"aria-selected":je?je.has(e.id):void 0,onClick:Ce?r=>{r.target.closest?.("button")||Z(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})}:void 0,onDoubleClick:J?()=>J(e.id):void 0,onContextMenu:X?r=>X(e.id,r):void 0,draggable:ce||me&&!!e.dragData||void 0,onDragStart:ce?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),ie(r)}:me&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(C,e.dragData)}:void 0,onDragEnd:ce?()=>ie(null):void 0,onDragOver:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation(),le!==r&&j(le,r),ie(null))}:void 0,tabIndex:ce||Ce?0:void 0,"aria-label":ce?ee.reorder(a,r+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ce?r=>{r.target!==r.currentTarget||"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),Z(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey}))}:ce?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),j(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<p.length-1&&(e.preventDefault(),j(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",pe,le===r?"opacity-50":"",je?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...Ne,cursor:ce?"move":void 0},children:[t?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:H}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:H}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:te}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
1
+ import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-4Y4PWKMM.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-YDYDR72S.js";import{ColoredBadge as m}from"./chunk-ET2EF5CI.js";import{MENU_ON_MEDIA_ATTR as u}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as h}from"./chunk-22S6LG6D.js";import{useShellStrings as f}from"./chunk-E6UCGCOC.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function w({items:p,onPick:k,onFiles:w,onRemove:N,onReorder:j,dragType:C,dropType:K,onDropData:T,label:F,hint:P,error:I,required:S,className:M,accept:A="image/*",maxSizeBytes:E,maxFiles:L,fit:z="cover",thumbSize:O=96,placeholder:$,cta:H,acceptHint:R,showCover:W=!1,coverLabel:B,busy:Q=!1,busyLabel:V,progress:Y,disabled:q=!1,readOnly:G=!1,selected:U,onItemClick:J,onItemDoubleClick:X,onItemContextMenu:Z,menuOnMedia:_=!1}){const ee=f().media,re=H??ee.cta,te=B??ee.cover,ae=V??ee.uploading,ne=g(),[le,ie]=b(null),oe=q||Q,se=!(!k&&!w||oe||G),de=!!N&&!oe&&!G,ce=!!j&&!oe&&!G,me=!!C&&!q&&!ce,ue=!(!K||!T||oe||G),pe=r(oe),he=$??t(A,ee),fe=d({accept:A,maxSizeBytes:E,maxFiles:L,acceptHint:R,multiple:!0,disabled:!se,currentCount:p.length,onAccept:e=>{if(w)w(e);else for(const r of e)k(r)}}),[ge,be]=b(!1),ye=y(0),ve=e=>ue&&Array.from(e.dataTransfer?.types??[]).includes(K),xe=fe.zoneProps,ke={onDragEnter:e=>{if(!ve(e))return xe.onDragEnter?.(e);e.preventDefault(),ye.current+=1,be(!0)},onDragOver:e=>{if(!ve(e))return xe.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",ge||be(!0)},onDragLeave:e=>{if(!ve(e))return xe.onDragLeave?.(e);ye.current=Math.max(0,ye.current-1),0===ye.current&&be(!1)},onDrop:e=>{if(!ve(e))return xe.onDrop?.(e);e.preventDefault(),ye.current=0,be(!1);const r=e.dataTransfer.getData(K);r&&T(r)}},De=fe.dragOver||ge,we=()=>{se&&(k?k():fe.open())},Ne={width:O,height:O},je=null==U?null:new Set(U),Ce=!!J,Ke=O<112,Te=(e,r)=>{const t=e.kind?"video"===e.kind:i(e.url,A),a=e.name??o(e.url),n=W&&(e.cover??0===r);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},..._?{[u]:""}:{},"aria-selected":je?je.has(e.id):void 0,onClick:Ce?r=>{r.target.closest?.("button")||J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey})}:void 0,onDoubleClick:X?()=>X(e.id):void 0,onContextMenu:Z?r=>Z(e.id,r):void 0,draggable:ce||me&&!!e.dragData||void 0,onDragStart:ce?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),ie(r)}:me&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(C,e.dragData)}:void 0,onDragEnd:ce?()=>ie(null):void 0,onDragOver:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ce?e=>{null!=le&&(e.preventDefault(),e.stopPropagation(),le!==r&&j(le,r),ie(null))}:void 0,tabIndex:ce||Ce?0:void 0,"aria-label":ce?ee.reorder(a,r+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ce?r=>{r.target!==r.currentTarget||"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),J(e.id,{ctrlKey:r.ctrlKey,metaKey:r.metaKey,shiftKey:r.shiftKey}))}:ce?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),j(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<p.length-1&&(e.preventDefault(),j(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",pe,le===r?"opacity-50":"",je?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...Ne,cursor:ce?"move":void 0},children:[t?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:z}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:z}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:te}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
3
  /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-white p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Ke?
4
4
  /* @__PURE__ */x(h,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${pe}`,children:/* @__PURE__ */x(m,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
- /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(m,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),de&&/* @__PURE__ */x("button",{type:"button",onClick:()=>N(e.id),"aria-label":e.removeLabel??ee.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${pe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Ae=se&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":ee.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${pe}`,style:Ne,children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(m,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),de&&/* @__PURE__ */x("button",{type:"button",onClick:()=>N(e.id),"aria-label":e.removeLabel??ee.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${pe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Fe=se&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":ee.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${pe}`,style:Ne,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:ee.add})]}),Se=se?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:ee.upload,className:n(De,!1,pe),style:{minHeight:M+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:ee.add})]}),Pe=se?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:ee.upload,className:n(De,!1,pe),style:{minHeight:O+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-gray-400",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-gray-500",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),R&&/* @__PURE__ */x("span",{className:"text-xs text-gray-400",children:R})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:M+32},children:/* @__PURE__ */x("span",{className:G?"invisible":void 0,children:ee.empty})});/* @__PURE__ */
11
- return v(e,{label:A,labelId:A?`${ne}-label`:void 0,htmlFor:ne,hint:S,error:F,required:P,className:I,children:[
12
- /* @__PURE__ */v("div",{id:ne,role:"group","aria-labelledby":A?`${ne}-label`:void 0,"aria-describedby":F?`${ne}-error`:S?`${ne}-hint`:void 0,"aria-busy":G||void 0,...fe.zoneProps,...ue?ke:{},className:"relative rounded-lg transition-colors",style:{...oe?{opacity:.6}:{},...De?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Se:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!je||void 0,"aria-label":"string"==typeof A?A:ee.files,className:"contents",children:p.map(Te)}):p.map(Te),Ae]}),G&&/* @__PURE__ */x(l,{label:ae,progress:U})]}),!k&&w&&/* @__PURE__ */x("input",{...fe.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),R&&/* @__PURE__ */x("span",{className:"text-xs text-gray-400",children:R})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:O+32},children:/* @__PURE__ */x("span",{className:Q?"invisible":void 0,children:ee.empty})});/* @__PURE__ */
11
+ return v(e,{label:F,labelId:F?`${ne}-label`:void 0,htmlFor:ne,hint:P,error:I,required:S,className:M,children:[
12
+ /* @__PURE__ */v("div",{id:ne,role:"group","aria-labelledby":F?`${ne}-label`:void 0,"aria-describedby":I?`${ne}-error`:P?`${ne}-hint`:void 0,"aria-busy":Q||void 0,...fe.zoneProps,...ue?ke:{},className:"relative rounded-lg transition-colors",style:{...oe?{opacity:.6}:{},...De?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Pe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!je||void 0,"aria-label":"string"==typeof F?F:ee.files,className:"contents",children:p.map(Te)}):p.map(Te),Fe]}),Q&&/* @__PURE__ */x(l,{label:ae,progress:Y})]}),!k&&w&&/* @__PURE__ */x("input",{...fe.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:fe.rejections})]})}export{k as FULL_BADGE_TILE_PX,w as MediaUploadGrid};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-VU6VPKM3.js";import{Select_default as l}from"./chunk-2PWZNFFP.js";import{FormField as a}from"./chunk-MVQBVPWP.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-MY755PTJ.js";import{Input_default as c}from"./chunk-GX2GSDJP.js";import{Button_default as d}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-VU6VPKM3.js";import{Select_default as l}from"./chunk-454DAGYG.js";import{FormField as a}from"./chunk-MVQBVPWP.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-UZMZ2EDW.js";import{Input_default as c}from"./chunk-GX2GSDJP.js";import{Button_default as d}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=s(!0),[p,u]=s("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-2AHHM4SK.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-BZMZTPS6.js";import{Icon as o}from"./chunk-2SHYR3RA.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-E6UCGCOC.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,A]=a(g.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-RJ4KZGAT.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-O4Q475GF.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-E6UCGCOC.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,C]=a(g.partOf);/* @__PURE__ */
2
2
  return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
@@ -6,4 +6,4 @@ return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:g[o]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
9
- /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),C]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-ECCUEG3J.js";import{PLACEHOLDER_INK as t}from"./chunk-PF3ANJFI.js";import{Icon as r}from"./chunk-2SHYR3RA.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,N]=s(""),[w,k]=s(null),[C,j]=s({}),E=v.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),_=e=>!E||e.title.toLowerCase().includes(E)||e.body.toLowerCase().includes(E)||e.category_label.toLowerCase().includes(E),A=n(()=>M.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[M,E]),L=n(()=>A.flatMap(e=>e.docs),[A]),R=(w?L.find(e=>e.slug===w):void 0)??L[0]??null,z=e=>!!E||(C[e]??e===R?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-6BCFVOG7.js";import{PLACEHOLDER_INK as t}from"./chunk-PF3ANJFI.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,N]=s(""),[w,k]=s(null),[C,j]=s({}),M=v.trim().toLowerCase(),F=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),L=n(()=>F.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[F,M]),A=n(()=>L.flatMap(e=>e.docs),[L]),B=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,E=e=>!!M||(C[e]??e===B?.category);/* @__PURE__ */
2
2
  return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */o("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */i("div",{className:"px-3 py-2 border-b border-gray-100 shrink-0",children:/* @__PURE__ */o("div",{className:"relative",children:[
7
7
  /* @__PURE__ */i(r,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */i("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:b.help.searchPlaceholder,className:"w-full rounded-md border border-gray-300 bg-white h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===A.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:E?b.help.noResults:f??b.help.empty}):A.map(e=>{const t=z(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===L.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?b.help.noResults:f??b.help.empty}):L.map(e=>{const t=E(e.key);/* @__PURE__ */
10
10
  return o("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!z(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
11
+ /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!E(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
12
12
  /* @__PURE__ */i(d,{open:t}),
13
- /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=R?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=B?.slug===e.slug;/* @__PURE__ */
14
14
  return o("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */i("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */i("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:b.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:R?/* @__PURE__ */o(c,{children:[
16
+ /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:B?/* @__PURE__ */o(c,{children:[
17
17
  /* @__PURE__ */o("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */o("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:R.title}),
20
- /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[R.category_label,!1===R.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(R),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
- /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(R):R.body?/* @__PURE__ */i(e,{children:R.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:B.title}),
20
+ /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[B.category_label,!1===B.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(B),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(B):B.body?/* @__PURE__ */i(e,{children:B.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1,4 +1,4 @@
1
- import{InputNumber_default as e}from"./chunk-HAIMJAI4.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Icon as r}from"./chunk-2SHYR3RA.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
1
+ import{InputNumber_default as e}from"./chunk-ZCHBOAPA.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{Tooltip as i}from"./chunk-22S6LG6D.js";import{jsx as t,jsxs as n,Fragment as o}from"react/jsx-runtime";var d="h-3.5 w-3.5",s={padding:{top:/* @__PURE__ */t(r,{name:"padding-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"padding-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"padding-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"padding-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"padding-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"padding-left-right","aria-hidden":"true",className:d})},crop:{top:/* @__PURE__ */t(r,{name:"crop-top","aria-hidden":"true",className:d}),right:/* @__PURE__ */t(r,{name:"crop-right","aria-hidden":"true",className:d}),bottom:/* @__PURE__ */t(r,{name:"crop-bottom","aria-hidden":"true",className:d}),left:/* @__PURE__ */t(r,{name:"crop-left","aria-hidden":"true",className:d}),vertical:/* @__PURE__ */t(r,{name:"crop-y","aria-hidden":"true",className:d}),horizontal:/* @__PURE__ */t(r,{name:"crop-left-right","aria-hidden":"true",className:d})}},l=/* @__PURE__ */t(r,{name:"sides-each","aria-hidden":"true",className:"h-4 w-4"});var m=(e,a,r)=>null===e[r]?a[r]:String(e[r]);function c(e,a){const r=r=>m(e,a,r);return r("left")!==r("right")||r("top")!==r("bottom")}function h({label:a,value:r,onChange:i,each:d,placeholder:l,words:c,min:h=0,max:p=200,step:u=4,readOnly:g,glyphs:f="padding"}){const b=s[f],N=(a,n,o)=>{const d=function(e,a){const r=a.map(a=>e[a]);return r.every(e=>e===r[0])?r[0]:"mixed"}(r,a),s=a.map(e=>m(r,l,e)),f="mixed"!==d&&s.every(e=>e===s[0])?s[0]:"–";/* @__PURE__ */
2
2
  return t("div",{"data-side":a.join("-"),className:"min-w-0",children:/* @__PURE__ */t(e,{value:"mixed"===d?null:d,onChange:e=>((e,a)=>{const t={...r};for(const r of e)t[r]=a;i(t)})(a,e),min:h,max:p,step:u,snap:!0,precision:0,steppers:"compact",readOnly:g,placeholder:f,prefix:o,suffix:c.unit,"aria-label":n})})};/* @__PURE__ */
3
3
  return t("div",{role:"group","aria-label":a,"data-sides":d?"each":"pairs",className:"grid min-w-0 grid-cols-2 gap-2",children:/* @__PURE__ */n(o,d?{children:[N(["left"],c.sides.left,b.left),N(["top"],c.sides.top,b.top),N(["right"],c.sides.right,b.right),N(["bottom"],c.sides.bottom,b.bottom)]}:{children:[N(["left","right"],c.horizontal,b.horizontal),N(["top","bottom"],c.vertical,b.vertical)]})})}function p({each:e,onChange:r,label:n,disabled:o}){/* @__PURE__ */
4
4
  return t(i,{content:n,children:/* @__PURE__ */t(a,{size:"sm","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
@@ -1,13 +1,13 @@
1
- import{CloseGlyph as e}from"./chunk-FMKTVZAO.js";import{humanSize as t,useFileIntake as n,FileIntakeAlert as r}from"./chunk-YDYDR72S.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Button_default as s}from"./chunk-4IU5BSVE.js";import{Icon as i}from"./chunk-2SHYR3RA.js";import{useShellStrings as c}from"./chunk-E6UCGCOC.js";import{useRef as o,useEffect as l}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
1
+ import{IconButton_default as e}from"./chunk-4CANQ3B3.js";import{CloseGlyph as t}from"./chunk-4Y4PWKMM.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-YDYDR72S.js";import{Button_default as s}from"./chunk-4IU5BSVE.js";import{Icon as i}from"./chunk-FSPFV4MI.js";import{useShellStrings as c}from"./chunk-E6UCGCOC.js";import{useRef as o,useEffect as l}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
2
2
  return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
3
3
  return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
4
4
  return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
5
- /* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function b({files:n,onRemove:r,disabled:a=!1,className:s=""}){const i=c().files,m=o(/* @__PURE__ */new Map);l(()=>{const e=new Set(n);for(const[t,n]of m.current)e.has(t)||(URL.revokeObjectURL(n),m.current.delete(t))},[n]),l(()=>()=>{for(const e of m.current.values())URL.revokeObjectURL(e);m.current.clear()},[]);const h=e=>{if(!e.type.startsWith("image/")||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return null;let t=m.current.get(e);return t||(t=URL.createObjectURL(e),m.current.set(e,t)),t};return 0===n.length?null:/* @__PURE__ */d("ul",{className:`flex flex-wrap gap-2 ${s}`,children:n.map((n,s)=>{const c=h(n);/* @__PURE__ */
5
+ /* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function b({files:e,onRemove:r,disabled:a=!1,className:s=""}){const i=c().files,m=o(/* @__PURE__ */new Map);l(()=>{const t=new Set(e);for(const[e,n]of m.current)t.has(e)||(URL.revokeObjectURL(n),m.current.delete(e))},[e]),l(()=>()=>{for(const e of m.current.values())URL.revokeObjectURL(e);m.current.clear()},[]);const h=e=>{if(!e.type.startsWith("image/")||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return null;let t=m.current.get(e);return t||(t=URL.createObjectURL(e),m.current.set(e,t)),t};return 0===e.length?null:/* @__PURE__ */d("ul",{className:`flex flex-wrap gap-2 ${s}`,children:e.map((e,s)=>{const c=h(e);/* @__PURE__ */
6
6
  return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-gray-200 bg-gray-50 py-1 pl-2 pr-1 text-xs text-gray-700",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
7
- /* @__PURE__ */d("span",{className:"min-w-0 truncate",title:n.name,children:n.name}),
8
- /* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:t(n.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(n.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(e,{className:"h-3.5 w-3.5"})})]},`${n.name}-${n.size}-${s}`)})})}function f({onClick:e,count:t=0,variant:n="button",label:r,disabled:i=!1}){const o=c().files,l=r??o.attach,p=t>0?`${l} (${t})`:l;return"icon"===n?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
9
- /* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const y=n({accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),L=o([]);return l(()=>{k&&y.rejections.length>0&&y.rejections!==L.current&&(L.current=y.rejections,k(y.rejections))},[y.rejections,k]),/* @__PURE__ */u(h,{intake:y,dropLabel:p,className:N,children:[v,
7
+ /* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e.name,children:e.name}),
8
+ /* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(e.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(e.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(t,{className:"h-3.5 w-3.5"})})]},`${e.name}-${e.size}-${s}`)})})}function f({onClick:t,count:n=0,variant:r="button",label:a,disabled:i=!1}){const o=c().files,l=a??o.attach,p=n>0?`${l} (${n})`:l;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
9
+ /* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const y=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),L=o([]);return l(()=>{k&&y.rejections.length>0&&y.rejections!==L.current&&(L.current=y.rejections,k(y.rejections))},[y.rejections,k]),/* @__PURE__ */u(h,{intake:y,dropLabel:p,className:N,children:[v,
10
10
  /* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{y.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
11
11
  /* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
12
12
  /* @__PURE__ */d(f,{onClick:y.open,count:e.length,variant:x,label:g,disabled:m}),j]}),
13
- /* @__PURE__ */d(r,{rejections:y.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
13
+ /* @__PURE__ */d(a,{rejections:y.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
@@ -0,0 +1,29 @@
1
+ import{Tree as e,TreeRow as l,TreeGroup as n}from"./chunk-EL2RLUT6.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as r}from"./chunk-6GWZ5UPX.js";import{ImageLightbox as i}from"./chunk-TIQKDAON.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-J47HXHSL.js";import{Breadcrumbs as d}from"./chunk-6SMQNPWS.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as m,mediaLibraryMenu as u}from"./chunk-SZIENHKR.js";import{useMediaMoveItems as h}from"./chunk-DFDDRKIJ.js";import{copyToClipboard as p}from"./chunk-5PY4H4ZJ.js";import{DropdownMenu as f}from"./chunk-YALPQIBR.js";import{NativeSelect as g}from"./chunk-454DAGYG.js";import{MediaUploadGrid as v}from"./chunk-LSISFKKS.js";import{MediaUsedInList as y}from"./chunk-63EK6S3W.js";import{Segmented as k}from"./chunk-N6DTTOB6.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-ZWAVSUWT.js";import{Banner as N}from"./chunk-UZMZ2EDW.js";import{Input_default as C}from"./chunk-GX2GSDJP.js";import{IconButton_default as I}from"./chunk-4CANQ3B3.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-YDYDR72S.js";import{ColoredBadge as j}from"./chunk-ET2EF5CI.js";import{Button_default as z}from"./chunk-4IU5BSVE.js";import{buttonClasses as F}from"./chunk-K7U4RWXJ.js";import{Icon as T}from"./chunk-FSPFV4MI.js";import{Tooltip as O}from"./chunk-22S6LG6D.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as E}from"./chunk-E6UCGCOC.js";import{useRef as L,useMemo as A,useCallback as M,useState as U,useEffect as K}from"react";import{jsxs as R,Fragment as B,jsx as G}from"react/jsx-runtime";var W="application/x-efficient-media-files",H="application/x-efficient-media-folder",V={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */G(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */G(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */G(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */G(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */G(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */G(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */G(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */G(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */G(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */G(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */G(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */G(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */G(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */G(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */G(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */G(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},J={link:/* @__PURE__ */G(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */G(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */G(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */G(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function $({value:e,label:l,onDone:n}){const[a,r]=U(e),i=L(!1),t=e=>{i.current||(i.current=!0,n(e))};/* @__PURE__ */
2
+ return G(C,{size:"sm",autoFocus:!0,"aria-label":l,value:a,onChange:e=>r(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:l=>{l.stopPropagation(),"Enter"===l.key?(l.preventDefault(),t(a.trim()||e)):"Escape"===l.key&&(l.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Y(T){const{mode:Y="manage",layout:Q="auto",location:X,onLocationChange:q,folders:_,products:ee,allFilesCount:le,trashCount:ne,files:ae,query:re,onQueryChange:ie,filters:te=V,onFiltersChange:oe,extraFilters:de,view:se="grid",onViewChange:ce,selectedIds:me,onSelectionChange:ue,usedIn:he,denied:pe={},accept:fe="image/*,video/*",maxSizeBytes:ge,busy:ve,progress:ye,onUpload:ke,onNewFolder:be,onRename:we,onMove:xe,onTrash:Ne,onDeleteFolder:Ce,onRestore:Ie,onDeleteForever:De,onEmptyTrash:Se,onReplace:je,onCropEdit:ze,onOpenInDesign:Fe,onChoose:Te,onCancel:Oe,pickNote:Pe,className:Ee=""}=T,Le=E().mediaLibrary,Ae=E().media,Me="pick"===Y,Ue=!Me,Ke=L(null),Re=P(Ke,"phone"===Q?343:1200),Be="phone"===Q||"auto"===Q&&Re<640,Ge=A(()=>function(e=[]){const l=/* @__PURE__ */new Map,n=(e,a)=>{for(const r of e){const e=[...a,r];l.set(r.id,{node:r,path:e}),r.children&&n(r.children,e)}};return n(e,[]),l}(ee),[ee]),We=A(()=>new Map(_.map(e=>[e.id,e])),[_]),He=A(()=>{const e=/* @__PURE__ */new Map;for(const l of _){const n=l.parentId&&We.has(l.parentId)?l.parentId:null;e.set(n,[...e.get(n)??[],l])}return e},[_,We]),Ve=M(e=>{const l=[];for(let n=e?We.get(e):void 0;n&&(l.unshift(n),!(l.length>_.length));n=n.parentId?We.get(n.parentId):void 0);return l},[We,_.length]),Ze=M((e,l)=>Ve(e).some(e=>e.id===l),[Ve]),[Je,$e]=U(()=>/* @__PURE__ */new Set(["@files"])),Ye=e=>$e(l=>{const n=new Set(l);return n.has(e)?n.delete(e):n.add(e),n}),Qe=M(e=>{$e(l=>e.every(e=>l.has(e))?l:/* @__PURE__ */new Set([...l,...e]))},[]),Xe="files"===(qe=X).place?`files:${qe.folderId??""}`:"products"===qe.place?`products:${qe.nodeId??""}`:"trash";var qe;K(()=>{if("files"===X.place)Qe(["@files",...Ve(X.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===X.place){const e=X.nodeId?Ge.get(X.nodeId)?.path??[]:[];Qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[Xe]);const _e="products"===X.place,el="trash"===X.place,ll="files"===X.place,nl=ll?X.folderId:null,al=_e&&X.nodeId?Ge.get(X.nodeId)?.path[0]:void 0,rl=e=>e?.sharedFrom?`${Le.readOnly} ${Le.editedAtHq(e.sharedFrom)}`:Le.readOnly,il=A(()=>ae.map(e=>e.id),[ae]),tl=A(()=>new Map(ae.map(e=>[e.id,e])),[ae]),ol=s(il),dl=A(()=>il.filter(e=>ol.selected.has(e)),[il,ol.selected]),sl=1===dl.length?tl.get(dl[0]):void 0,cl=L(!0);K(()=>{cl.current?cl.current=!1:ol.clear()},[Xe]);const ml=me?.join("\0");K(()=>{me&&ol.setSelection(me)},[ml]);const ul=L(ml??""),hl=dl.join("\0");K(()=>{ul.current!==hl&&(ul.current=hl,ue?.(dl))},[hl]);const pl=(e,l={})=>{Me?ol.select(e):ol.select(e,{ctrl:!(!l.ctrlKey&&!l.metaKey),shift:!!l.shiftKey})},[fl,gl]=U(null),vl=e=>{const l=fl;if(gl(null),!l||null==e)return;e!==("folder"===l.kind?We.get(l.id)?.name:tl.get(l.id)?.name)&&we?.(l,e)},yl=async e=>{if(!be)return;const l=await be(e);Qe(["@files",...e?[e]:[]]),"string"==typeof l&&gl({kind:"folder",id:l})},kl=M(e=>{const l=[],n=l=>{if("files"===e.kind)return l===nl&&ll?Le.alreadyHere:void 0;const n=We.get(e.id);return l===e.id||l&&Ze(l,e.id)?Le.notIntoItself:(n?.parentId??null)===l?Le.folderAlreadyHere:void 0};l.push({key:m,label:Le.allFiles,disabledReason:n(null)});const a=(e,r)=>{for(const i of He.get(e)??[])l.push({key:i.id,label:i.name,depth:r,disabledReason:n(i.id)}),a(i.id,r+1)};return a(null,1),l},[He,We,ll,Ze,nl,Le]),bl=M(e=>{const l=new Set(e.map(e=>tl.get(e)?.kind??"image"));return 1===l.size?[...l][0]:"file"},[tl]),[wl,xl]=U(null),Nl={words:Le,media:Ae,denied:pe,moveTargets:kl,kindOf:bl,urlOf:e=>tl.get(e)?.url,newSubfolder:be&&Ue?e=>{yl(e)}:void 0,rename:we&&Ue?e=>{"file"!==e.kind||ol.isSelected(e.id)||ol.select(e.id),gl(e)}:void 0,move:xe&&Ue?xe:void 0,trash:Ne&&Ue?Ne:void 0,deleteFolder:Ce&&Ue?Ce:void 0,folderNotEmpty:e=>!!We.get(e)?.notEmpty,replace:je&&Ue?je:void 0,copyUrl:e=>{const l=tl.get(e)?.url;l&&p(Le.urlLabel,l)},openInDesign:Fe,restore:Ie,deleteForever:De},Cl=e=>u(e,Nl),Il=w(),Dl=(e,l)=>{Me||(ol.isSelected(e)||ol.select(e),Il.open(l,(e=>{const l=ol.isSelected(e)?dl:[e];return _e?{kind:"render",id:e}:el?{kind:"trashed",ids:l}:{kind:"files",ids:l}})(e)))},[Sl,jl]=U(null),[zl,Fl]=U(null),[Tl,Ol]=U(null);K(()=>{if(!zl&&!Sl)return;const e=()=>{Fl(null),jl(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[zl,Sl]);const Pl=(e,l)=>Array.from(e.dataTransfer?.types??[]).includes(l),El=(e,l)=>!(!xe||pe.move||Me)&&(!!Pl(e,W)||!(!Pl(e,H)||!Tl)&&(l!==Tl&&!(l&&Ze(l,Tl)))),Ll=(e,l)=>({onDragEnter:n=>{El(n,l)&&(n.preventDefault(),jl(e))},onDragOver:n=>{El(n,l)&&(n.preventDefault(),n.dataTransfer.dropEffect="move",Sl!==e&&jl(e))},onDragLeave:l=>{const n=l.relatedTarget;n&&l.currentTarget.contains(n)||jl(l=>l===e?null:l)},onDrop:e=>{if(El(e,l))if(e.preventDefault(),jl(null),Pl(e,W)){let n;try{n=JSON.parse(e.dataTransfer.getData(W))}catch{n=null}Array.isArray(n)&&n.length&&xe({kind:"files",ids:n.map(String)},l)}else Tl&&(xe({kind:"folder",id:Tl},l),Ol(null))}}),Al=e=>{const l=e=>Pl(e,W)||Pl(e,H)||Pl(e,"Files");return{onDragEnter:n=>{l(n)&&Fl(e)},onDragOver:n=>{l(n)&&zl!==e&&Fl(e)},onDragLeave:l=>{const n=l.relatedTarget;n&&l.currentTarget.contains(n)||Fl(l=>l===e?null:l)}}},Ml=(e,l,n)=>/* @__PURE__ */G(O,{side:"right",content:zl===e?Le.noDropProducts:rl(n),open:zl===e||!zl&&void 0,children:/* @__PURE__ */G("span",{children:l})}),Ul=e=>({onContextMenu:l=>{Il.open(l,e)}}),Kl=(e,a,r)=>e.map(e=>{const i=`p:${e.id}`,t=r??e,o=Je.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
3
+ return R("div",{role:"none",className:"contents",children:[
4
+ /* @__PURE__ */G(l,{label:Ml(i,e.name,t),level:a,icon:d&&o?Z.folderOpen:Z.folder,badge:null!=e.count?e.count:void 0,selected:_e&&X.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ye(i):void 0,onSelect:()=>q({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Al(i),...Ue?Ul({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */G(n,{children:Kl(d,a+1,t)})]},e.id)}),Rl=(e,a)=>(He.get(e)??[]).map(e=>{const r=He.get(e.id),i=Je.has(e.id),t="folder"===fl?.kind&&fl.id===e.id,o=Cl({kind:"folder",id:e.id});/* @__PURE__ */
5
+ return R("div",{role:"none",className:"contents",children:[
6
+ /* @__PURE__ */G(l,{label:e.name,level:a,icon:r&&i?Z.folderOpen:Z.folder,badge:null!=e.count?e.count:void 0,selected:t||ll&&X.folderId===e.id,expanded:r?i:void 0,onToggle:r?()=>Ye(e.id):void 0,onSelect:()=>q({place:"files",folderId:e.id}),drop:Sl===e.id?"into":void 0,dragging:Tl===e.id,draggable:Ue&&!!xe&&!pe.move,rename:t?/* @__PURE__ */G($,{value:e.name,label:Le.folderName,onDone:vl}):void 0,actions:Ue&&o.length?/* @__PURE__ */G(f,{align:"end","aria-label":Le.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Ll(e.id,e.id),...Ue?Ul({kind:"folder",id:e.id}):{},...Ue&&xe&&!pe.move?{draggable:!0,onDragStart:l=>{l.dataTransfer.effectAllowed="move",l.dataTransfer.setData(H,e.id),Ol(e.id)},onDragEnd:()=>{Ol(null),jl(null)}}:{}}}),r&&i&&/* @__PURE__ */G(n,{children:Rl(e.id,a+1)})]},e.id)}),Bl=Je.has("@files"),Gl=Je.has("@products"),Wl=/* @__PURE__ */R(e,{"aria-label":Le.folders,children:[ee&&/* @__PURE__ */R(B,{children:[
7
+ /* @__PURE__ */G(l,{label:Ml("@products",Le.products),level:1,icon:Z.lock,badge:{label:Le.readOnlyBadge,tone:"neutral"},expanded:ee.length?Gl:void 0,onToggle:()=>Ye("@products"),selected:_e&&null==X.nodeId,onSelect:()=>q({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Al("@products")}}),Gl&&ee.length>0&&/* @__PURE__ */G(n,{children:Kl(ee,2)})]}),
8
+ /* @__PURE__ */G(l,{label:Le.allFiles,level:1,icon:Bl?Z.folderOpen:Z.folder,badge:null!=le?le:void 0,expanded:He.get(null)?.length?Bl:void 0,onToggle:()=>Ye("@files"),selected:ll&&null==X.folderId,onSelect:()=>q({place:"files",folderId:null}),drop:"@files"===Sl?"into":void 0,rowProps:{"data-media-row":"@files",...Ll("@files",null)}}),Bl&&(He.get(null)?.length??0)>0&&/* @__PURE__ */G(n,{children:Rl(null,2)}),Ue&&/* @__PURE__ */G(l,{label:Le.trash,level:1,icon:Z.trash,badge:null!=ne?ne:void 0,selected:el,onSelect:()=>q({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Hl=(()=>{if(el)return[{label:Le.trash}];if(_e){const e=X.nodeId?Ge.get(X.nodeId)?.path??[]:[];return[{label:Le.products,onClick:e.length?()=>q({place:"products",nodeId:null}):void 0},...e.map((l,n)=>({label:l.name,onClick:n<e.length-1?()=>q({place:"products",nodeId:l.id}):void 0}))]}const e=Ve(nl);return[{label:Le.allFiles,onClick:e.length?()=>q({place:"files",folderId:null}):void 0},...e.map((l,n)=>({label:l.name,onClick:n<e.length-1?()=>q({place:"files",folderId:l.id}):void 0}))]})(),Vl=_e?Le.readOnly:pe.upload,Zl=!!ke&&!el&&!Vl,Jl=D({accept:fe,maxSizeBytes:ge,multiple:!0,disabled:!Zl,onAccept:e=>ke?.(e,nl)}),$l=_e?Le.noProductFolder:pe.newFolder,Yl=e=>e?{"aria-disabled":!0,disabledReason:e}:{},Ql=/* @__PURE__ */R("div",{className:"flex flex-wrap items-center gap-2",children:[Ue&&be&&!el&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{yl(nl)},...Yl($l),children:Le.newFolder}),ke&&!el&&/* @__PURE__ */G(z,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>Jl.open(),...Yl(Vl),children:Le.upload}),Ue&&el&&Se&&ae.length>0&&/* @__PURE__ */G(z,{variant:"danger",size:"sm",onClick:Se,...Yl(pe.deleteForever),children:Le.emptyTrash})]}),Xl=(e,l,n,a,r)=>/* @__PURE__ */G("div",{style:{width:Be?void 0:r,flex:Be?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */G(g,{size:"sm","aria-label":e,value:l,onChange:a,options:n})},e),ql=e=>l=>oe?.({...te,[e]:l}),_l=/* @__PURE__ */R("div",{className:"flex flex-wrap items-center gap-2",children:[ie&&/* @__PURE__ */G("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */G(C,{size:"sm",type:"search",leftIcon:Z.search,placeholder:_e?Le.searchProducts:Le.search,"aria-label":_e?Le.searchProducts:Le.search,value:re??"",onChange:e=>ie(e.target.value)})}),oe&&Xl(Le.mediaType,te.type,[{value:"all",label:Le.allTypes},{value:"image",label:Le.images},{value:"video",label:Le.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],ql("type"),130),oe&&!_e&&!el&&Xl(Le.use,te.use,[{value:"any",label:Le.anyUse},{value:"email",label:Le.emailOnly},{value:"website",label:Le.websiteOnly},{value:"unused",label:Le.notUsed}],ql("use"),130),oe&&Ue&&Xl(Le.sort,te.sort,[{value:"newest",label:Le.newest},{value:"name",label:Le.byName},{value:"size",label:Le.bySize}],ql("sort"),110),de?.map(e=>Xl(e.label,e.value,e.options,e.onChange,120)),ce&&/* @__PURE__ */G(k,{size:"sm",label:Le.view,value:se,onChange:ce,options:[{value:"grid",label:Le.grid,icon:Z.grid},{value:"list",label:Le.list,icon:Z.list}]})]}),en=e=>{const l=[];return null!=e.trashedDaysAgo&&l.push({key:"t",label:Le.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:J.clock,tone:"neutral"}),e.usedCount&&l.push({key:"u",label:Le.used(e.usedCount),count:e.usedCount,icon:J.link,tone:"active"}),e.email&&l.push({key:"e",label:Le.email,icon:J.email,tone:"queued"}),e.private&&l.push({key:"p",label:Le.private,icon:J.lock,tone:"neutral"}),l},ln=e=>en(e).map(e=>/* @__PURE__ */G(j,{tone:e.tone,size:"xs",children:e.label},e.key)),nn=Ue&&ll&&!!xe&&!pe.move,an=ae.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:en(e),dragData:nn?JSON.stringify(ol.isSelected(e.id)?dl:[e.id]):void 0})),rn=Be?Math.max(72,Math.floor((Re-24-16-1)/3)):112,tn=L(null),on=c({containerRef:tn,enabled:Ue&&!Be&&ae.length>0,selected:ol.selected,setSelection:e=>ol.setSelection(e),clearSelection:ol.clear}),dn=e=>{if(Me){const l=tl.get(e);return void(!l||l.private||l.pickDisabledReason||Te?.(l))}const l=il.indexOf(e);l>=0&&xl(l)},sn=ae.length?null:re?/* @__PURE__ */G(r,{variant:"dashed",title:Le.noMatches}):_e?/* @__PURE__ */G(r,{variant:"dashed",title:Le.emptyProducts,description:rl(al)}):el?/* @__PURE__ */G(r,{variant:"dashed",title:Le.trashEmpty}):!Zl||Me?/* @__PURE__ */G(r,{variant:"dashed",title:Le.emptyFolder}):null,cn="list"===se&&ae.length>0,mn=sn??(cn?/* @__PURE__ */G("ul",{role:"listbox","aria-multiselectable":Ue||void 0,"aria-label":Le.folders,className:"flex flex-col gap-1",children:ae.map(e=>/* @__PURE__ */R("li",{role:"option","aria-selected":ol.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:l=>pl(e.id,l),onDoubleClick:()=>dn(e.id),onContextMenu:l=>Dl(e.id,l),onKeyDown:l=>{"Enter"!==l.key&&" "!==l.key||(l.preventDefault(),pl(e.id,l))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(ol.isSelected(e.id)?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
9
+ /* @__PURE__ */G("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
10
+ /* @__PURE__ */G("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
11
+ /* @__PURE__ */G("span",{className:"flex shrink-0 items-center gap-1",children:ln(e)}),e.sizeLabel&&/* @__PURE__ */G("span",{className:"w-16 shrink-0 text-right text-xs text-gray-500",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */G(v,{items:an,readOnly:!Zl||Me,onFiles:Zl&&!Me?e=>ke(e,nl):void 0,accept:fe,maxSizeBytes:ge,busy:ve,progress:ye,fit:"contain",thumbSize:rn,dragType:nn?W:void 0,selected:ol.selected,onItemClick:pl,onItemDoubleClick:dn,onItemContextMenu:Ue?Dl:void 0,menuOnMedia:Ue})),un=h({count:dl.length,kind:bl(dl),targets:kl({kind:"files",ids:dl}),onPick:e=>xe?.({kind:"files",ids:dl},e.key===m?null:e.key)}),hn=F({variant:"secondary",size:"sm"}),pn=/* @__PURE__ */G(f,{align:"start",triggerClassName:hn,trigger:/* @__PURE__ */R(B,{children:[Z.folder,Le.moveTo]}),items:un,disabled:!!pe.move}),fn=Ue&&dl.length>1&&!_e?/* @__PURE__ */R("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-gray-200 px-3 py-2",children:[
12
+ /* @__PURE__ */G(b,{checked:dl.length===ae.length,indeterminate:dl.length<ae.length,onChange:e=>e?ol.selectAll():ol.clear(),label:Le.selected(dl.length)}),/* @__PURE__ */R(B,el?{children:[Ie&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>Ie(dl),...Yl(pe.restore),children:Le.restore}),De&&/* @__PURE__ */G(z,{variant:"secondary-danger",size:"sm",onClick:()=>De(dl),...Yl(pe.deleteForever),children:Le.deleteForever})]}:{children:[xe&&pn,we&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Le.rename}),Ne&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>Ne({kind:"files",ids:dl}),...Yl(pe.trash),children:Le.moveFilesToTrash(dl.length)})]}),
13
+ /* @__PURE__ */G(z,{variant:"ghost",size:"sm",onClick:ol.clear,children:Le.clearSelection})]}):null,gn=e=>{const l=[],n=(e,n,a)=>{null!=a&&""!==a&&l.push({key:e,label:n,value:a})},a="file"===fl?.kind&&fl.id===e.id;n("name",Le.name,a?/* @__PURE__ */G($,{value:e.name,label:Le.fileName,onDone:vl}):e.name),n("type",Le.type,e.typeLabel),n("size",Le.size,e.sizeLabel),n("resolution",Le.resolution,e.resolution),_e?(n("design",Le.design,e.design),n("finish",Le.finish,e.finish),n("angle",Le.angleLug,e.angleLug),n("owner",Le.owner,e.owner)):(n("added",Le.addedBy,e.addedBy),n("folder",Le.folder,e.folderPath)),n("used",Le.usedIn,null!=e.usedCount?Le.places(e.usedCount):void 0);const r=u({kind:"files",ids:[e.id]},Nl).find(e=>"submenu"===e.type);/* @__PURE__ */
14
+ return R("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
15
+ /* @__PURE__ */G("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),_e&&/* @__PURE__ */G(N,{tone:"neutral",title:Le.readOnlyBadge,children:rl(al)}),
16
+ /* @__PURE__ */G(t,{size:"sm",columns:1,items:l}),!el&&/* @__PURE__ */R("div",{className:"flex gap-2",children:[
17
+ /* @__PURE__ */G("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */G(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Le.fileUrl,onFocus:e=>e.currentTarget.select()})}),
18
+ /* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Nl.copyUrl(e.id),children:Le.copyUrl})]}),ll&&Ue&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>je(e.id),...Yl(pe.replace),children:Le.replace}),ze&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>ze(e.id),children:Le.cropEdit}),xe&&"submenu"===r?.type&&/* @__PURE__ */G(f,{align:"start",triggerClassName:hn,trigger:/* @__PURE__ */R(B,{children:[Z.folder,Le.moveTo]}),items:r.items,disabled:!!pe.move}),we&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>gl({kind:"file",id:e.id}),...Yl(pe.rename),children:Le.rename}),Ne&&/* @__PURE__ */G(I,{"aria-label":Le.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:pe.trash,"aria-disabled":!!pe.trash||void 0,children:Z.trash})]}),el&&Ue&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[Ie&&/* @__PURE__ */G(z,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>Ie([e.id]),...Yl(pe.restore),children:Le.restore}),De&&/* @__PURE__ */G(z,{variant:"danger",size:"sm",onClick:()=>De([e.id]),...Yl(pe.deleteForever),children:Le.deleteForever})]}),_e&&Fe&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Le.openInDesign}),he&&/* @__PURE__ */G(y,{items:he})]})},vn=sl?sl.private?Le.privateNoPick:sl.pickDisabledReason:void 0,yn=Me?/* @__PURE__ */R("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-gray-200 px-3 py-2",children:[
19
+ /* @__PURE__ */G("span",{className:"min-w-0 truncate text-sm text-gray-500",children:sl?Le.oneChosen(sl.name):Le.noneChosen}),
20
+ /* @__PURE__ */R("div",{className:"flex gap-2",children:[Oe&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",onClick:Oe,children:Le.cancel}),
21
+ /* @__PURE__ */G(z,{variant:"primary",size:"sm",disabled:!sl,...Yl(vn),onClick:()=>{sl&&!vn&&Te?.(sl)},children:Le.chooseImage})]})]}):null,kn=Ue&&!!sl,bn=/* @__PURE__ */R("div",{className:"flex min-w-0 flex-col gap-3",children:[Pe&&/* @__PURE__ */G(N,{tone:"neutral",children:Pe}),
22
+ /* @__PURE__ */R("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
23
+ /* @__PURE__ */G(d,{items:Hl}),Ql]}),_l,fn,
24
+ /* @__PURE__ */R("div",{ref:tn,className:"relative",onPointerDown:on.onPointerDown,onKeyDown:e=>{Ue&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),ol.selectAll()):"Escape"===e.key&&ol.size&&ol.clear()},children:[mn,
25
+ /* @__PURE__ */G(a,{rect:on.rect})]}),Zl&&/* @__PURE__ */G("input",{...Jl.inputProps}),
26
+ /* @__PURE__ */G(S,{rejections:Jl.rejections})]});/* @__PURE__ */
27
+ return R("div",{ref:Ke,"data-media-library":"","data-layout":Be?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ee}`.trim(),children:[/* @__PURE__ */R("div",Be?{className:"flex flex-col gap-3 p-3",children:[Wl,bn]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
28
+ /* @__PURE__ */G("div",{className:"shrink-0 overflow-y-auto border-r border-gray-200 p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Wl}),
29
+ /* @__PURE__ */G("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:bn}),kn&&/* @__PURE__ */G("div",{className:"shrink-0 overflow-y-auto border-l border-gray-200 p-3",style:{width:300},children:gn(sl)})]}),yn,Be&&/* @__PURE__ */G(o,{open:kn,onClose:ol.clear,side:"bottom",title:sl?.name,children:sl&&gn(sl)}),Il.state&&/* @__PURE__ */G(x,{...Il.props,items:Cl(Il.state.data)}),null!=wl&&ae.length>0&&/* @__PURE__ */G(i,{images:ae.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(wl,ae.length-1),onClose:()=>xl(null)})]})}export{W as MEDIA_FILES_DRAG_TYPE,H as MEDIA_FOLDER_DRAG_TYPE,Y as MediaLibrary};
@@ -0,0 +1 @@
1
+ var r="8.38.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -0,0 +1,6 @@
1
+ import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-5TFTSYOD.js";import{IconButton_default as a}from"./chunk-4CANQ3B3.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useShellStrings as s}from"./chunk-E6UCGCOC.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s}){const i=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),t=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);return{words:i>0,paragraph:t>0,oneRow:i>0&&t>0&&i+1+t<=9,flow:i>0&&t>0&&i+1+t>9&&i<=7,cells:{words:i,paragraph:t}}}function w(e,l){/* @__PURE__ */
2
+ return i(n,{content:e,children:l},l.key??void 0)}function g({offered:n,pressed:h,onMark:g,color:f,linkOpen:k=!1,last:v,alignment:N,list:C,letterCase:D,disabled:M=!1,"aria-label":x,windows:y,className:S="",layout:j="grid"}){const A=s().textToolbar,q=m({offered:n,color:f,last:v,alignment:N,list:C,letterCase:D});if(!q.words&&!q.paragraph)return null;const B=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,I=(e,l,r,o)=>n.has(e)?w(l,/* @__PURE__ */i(a,"link"===e?{pressed:k,className:B(k),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":k,"aria-keyshortcuts":o,disabled:M,onMouseDown:c,onClick:()=>g(e),children:r}:{className:B(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:M,onMouseDown:c,onClick:()=>g(e),children:r},e)):null,L=l(A),T=e.map(e=>[e,L[e],r(e)]),$=N?e.filter(e=>N.allow.includes(e)):[],R=N&&$.includes(N.value)?N.value:$[0],U=[["none",A.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",A.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",A.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],F=/* @__PURE__ */t(d,{children:[I("bold",A.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),I("italic",A.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),I("underline",A.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),I("strike",A.strike,/* @__PURE__ */i(o,{name:"strike"})),f?w(A.color,/* @__PURE__ */i(a,{pressed:f.open,className:B(f.open,"rosh-tb-color"),"aria-label":A.color,"aria-haspopup":"dialog","aria-expanded":f.open,disabled:M,style:f.run?{"--rosh-tb-run":f.run}:void 0,onMouseDown:c,onClick:f.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,I("link",A.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),I("sup",A.sup,/* @__PURE__ */i(o,{name:"superscript"})),I("sub",A.sub,/* @__PURE__ */i(o,{name:"subscript"})),I("code",A.code,/* @__PURE__ */i(o,{name:"code"})),u(v)?v:null]}),K=/* @__PURE__ */t(d,{children:[N&&$.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":A.alignment,onKeyDown:e=>p(e,$,e=>N.onChange(e)),children:T.map(([e,l,r])=>N.allow.includes(e)?w(l,/* @__PURE__ */i(a,{role:"radio",pressed:N.value===e,className:B(N.value===e),"aria-checked":N.value===e,"aria-label":l,tabIndex:e===R?0:-1,disabled:M||N.disabled,onMouseDown:c,onClick:()=>N.onChange(e),children:r},e)):null)}):null,C&&n.has("bullet")?w(A.bullet,/* @__PURE__ */i(a,{className:B("bullet"===C.pressed),"aria-label":A.bullet,"aria-pressed":"bullet"===C.pressed,disabled:M,onMouseDown:c,onClick:()=>C.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,C&&n.has("number")?w(A.number,/* @__PURE__ */i(a,{className:B("number"===C.pressed),"aria-label":A.number,"aria-pressed":"number"===C.pressed,disabled:M,onMouseDown:c,onClick:()=>C.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,I("quote",A.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":A.letterCase,onKeyDown:e=>p(e,U.map(([e])=>e),e=>D.onChange(e)),children:U.map(([e,l,r])=>w(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:B(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:M||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null]}),O="row"===j,E=O?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===v?" is-eight":"",G=b(n,Boolean(f)),H={"--rosh-tb-color-col":String(G.color),"--rosh-tb-link-col":String(G.link),...O?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let P;return P=O?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:K}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[F,
3
+ /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),K]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
+ /* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}),
5
+ /* @__PURE__ */i("div",{className:"rosh-tb-para",children:K})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===v?" is-eight":""),children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:K}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${E} ${S}`.trim(),style:H,children:[
6
+ /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":x??A.formatting,children:P}),y]})}export{g as TextToolbar,m as textToolbarRows,b as textToolbarWindowColumns};
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-PCKYNZ5Y.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Input_default as a}from"./chunk-GX2GSDJP.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-LGLZTJ2W.js";import{Avatar as t}from"./chunk-MMFJBWJC.js";import{Input_default as a}from"./chunk-GX2GSDJP.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{useState as s}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */l("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */n("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
3
3
  /* @__PURE__ */l(t,{name:e.name,status:e.status}),
4
4
  /* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-2SHYR3RA.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var a=()=>/* @__PURE__ */t(e,{name:"check",className:"h-3.5 w-3.5","aria-hidden":"true"});function i({items:e,value:i,onChange:n,"aria-label":l,className:s=""}){const c=Math.max(0,e.findIndex(e=>e.id===i));/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-FSPFV4MI.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var a=()=>/* @__PURE__ */t(e,{name:"check",className:"h-3.5 w-3.5","aria-hidden":"true"});function i({items:e,value:i,onChange:n,"aria-label":l,className:s=""}){const c=Math.max(0,e.findIndex(e=>e.id===i));/* @__PURE__ */
2
2
  return t("ol",{"aria-label":l,className:`grid items-start ${s}`.trim(),style:{gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`},children:e.map((i,l)=>{const s=l<c?"complete":l===c?"current":"upcoming",o="complete"===s&&!!n,m=/* @__PURE__ */t("span",{"aria-hidden":"true",className:["flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-colors","complete"===s?"bg-blue-600 text-white":"","current"===s?"border-2 border-blue-600 bg-white text-blue-600":"","upcoming"===s?"border-2 border-gray-300 bg-white text-gray-400":""].filter(Boolean).join(" "),children:"complete"===s?/* @__PURE__ */t(a,{}):l+1}),d=/* @__PURE__ */r("span",{className:"min-w-0 text-center",children:[
3
3
  /* @__PURE__ */t("span",{className:"block text-sm font-medium "+("upcoming"===s?"text-gray-400":"text-gray-900"),children:i.label}),i.description&&/* @__PURE__ */t("span",{className:"block text-xs text-gray-500",children:i.description})]});/* @__PURE__ */
4
4
  return r("li",{"aria-current":"current"===s?"step":void 0,className:"relative flex min-w-0 justify-center",children:[l<e.length-1&&/* @__PURE__ */t("span",{"aria-hidden":"true",className:"absolute top-3.5 h-0.5 rounded "+(l<c?"bg-blue-600":"bg-gray-200"),style:{left:"calc(50% + 0.875rem)",right:"calc(-50% + 0.875rem)"}}),o?/* @__PURE__ */r("button",{type:"button",onClick:()=>n?.(i.id),className:"relative z-10 flex min-w-0 flex-col items-center gap-2 rounded px-2 text-center rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[m,d]}):/* @__PURE__ */r("span",{className:"relative z-10 flex min-w-0 flex-col items-center gap-2 px-2 text-center",children:[m,d]})]},i.id)})})}export{i as Stepper};
@@ -1,7 +1,7 @@
1
- import{writeClipboard as e}from"./chunk-5PY4H4ZJ.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{toast_default as t}from"./chunk-4NXMMWL6.js";import{Icon as n}from"./chunk-2SHYR3RA.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
1
+ import{writeClipboard as e}from"./chunk-5PY4H4ZJ.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{toast_default as t}from"./chunk-4NXMMWL6.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-E6UCGCOC.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
2
  return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
- return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:N="bordered",hideCopyButton:k=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":C,className:B=""}){const[T,A]=i(!1),H=o(null),L=a().copy;c(()=>()=>{H.current&&clearTimeout(H.current)},[]);const M=l(async()=>{await e(n)?(A(!0),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{A(!1),H.current=null},2e3),v?.(n)):t.error(L.failed)},[n,v,L]),{box:R,button:Y}=p[g],z=!k;/* @__PURE__ */
4
- return m("div",{id:z?void 0:j,"aria-describedby":z?void 0:C,className:["inline-flex max-w-full items-center rounded-md",u[N],R,B].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
3
+ return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:N="bordered",hideCopyButton:k=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":C,className:B=""}){const[M,T]=i(!1),F=o(null),L=a().copy;c(()=>()=>{F.current&&clearTimeout(F.current)},[]);const P=l(async()=>{await e(n)?(T(!0),F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{T(!1),F.current=null},2e3),v?.(n)):t.error(L.failed)},[n,v,L]),{box:z,button:A}=p[g],E=!k;/* @__PURE__ */
4
+ return m("div",{id:E?void 0:j,"aria-describedby":E?void 0:C,className:["inline-flex max-w-full items-center rounded-md",u[N],z,B].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
5
  /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:n,children:y??n}),!k&&/* @__PURE__ */m(d,{children:[
6
- /* @__PURE__ */s(r,{id:j,"aria-label":x?L.copyLabel(x):L.copy,"aria-describedby":C,onClick:M,className:`${Y} text-gray-400`,children:/* @__PURE__ */s(T?h:b,{})}),
7
- /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:T?L.copied:""})]})]})}export{y as Snippet};
6
+ /* @__PURE__ */s(r,{id:j,"aria-label":x?L.copyLabel(x):L.copy,"aria-describedby":C,onClick:P,className:`${A} text-gray-400`,children:/* @__PURE__ */s(M?h:b,{})}),
7
+ /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:M?L.copied:""})]})]})}export{y as Snippet};