efficient-shell 8.35.1 → 8.39.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.
- package/README.md +13 -2
- package/dist/{Browser-F67PEY2U.js → Browser-BIGK2F75.js} +14 -14
- package/dist/Calculator-7O7HXEKH.js +29 -0
- package/dist/{CurrencyConverter-Z6L7QAZU.js → CurrencyConverter-IVJJCYZ7.js} +12 -12
- package/dist/{Documents-MQDSI27F.js → Documents-UHTD6M24.js} +22 -22
- package/dist/Files-PWYUTAQW.js +87 -0
- package/dist/{Notepad-2IRVJ7MB.js → Notepad-54N54RYN.js} +11 -11
- package/dist/PdfViewer-KJCJ6EPG.js +1 -0
- package/dist/{PomodoroTimer-TRGMI4YT.js → PomodoroTimer-ZCJBTFV5.js} +19 -19
- package/dist/{Preview-PXOEKXSR.js → Preview-3LOY6L4G.js} +33 -33
- package/dist/Sidebar-6I4FC5AK.js +43 -0
- package/dist/{Spreadsheet-WROI4P6D.js → Spreadsheet-ANBJSAHB.js} +12 -12
- package/dist/{Stock-SUDCDSUL.js → Stock-PHY6Z26A.js} +1 -1
- package/dist/{Weather-WQE4ZQAL.js → Weather-YQA5CAFQ.js} +19 -19
- package/dist/{WorldClock-2AGEYLZP.js → WorldClock-J6L7FWI2.js} +6 -6
- package/dist/ai/index.d.ts +118 -3
- package/dist/ai/index.js +53 -43
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-ZRHQGFO5.js → chunk-3CST4ZDP.js} +2 -2
- package/dist/chunk-454DAGYG.js +19 -0
- package/dist/{chunk-TRD22FC7.js → chunk-45S6M77O.js} +6 -6
- package/dist/chunk-4IVT244O.js +8 -0
- package/dist/{chunk-G2MJTE6X.js → chunk-4OFD6ICH.js} +10 -10
- package/dist/{chunk-5N5DBTTF.js → chunk-4SZDP3JF.js} +12 -12
- package/dist/{chunk-FMKTVZAO.js → chunk-4Y4PWKMM.js} +1 -1
- package/dist/{chunk-DIN3EFOM.js → chunk-5BZMSSOV.js} +8 -8
- package/dist/chunk-5JYBYMZT.js +29 -0
- package/dist/{chunk-64ZHCEZN.js → chunk-5TFTSYOD.js} +1 -1
- package/dist/{chunk-GK3QH63P.js → chunk-63EK6S3W.js} +1 -1
- package/dist/{chunk-ECCUEG3J.js → chunk-6BCFVOG7.js} +1 -1
- package/dist/{chunk-M2KV4WKR.js → chunk-6GWZ5UPX.js} +1 -1
- package/dist/{chunk-EBC4XFL2.js → chunk-6SMQNPWS.js} +1 -1
- package/dist/{chunk-EW6FRPFJ.js → chunk-6WWAQC5V.js} +1 -1
- package/dist/{chunk-TTY62G5D.js → chunk-7C56GLLI.js} +16 -16
- package/dist/{chunk-MICWRC72.js → chunk-7MSFHQAY.js} +7 -7
- package/dist/{chunk-XZL3HCWH.js → chunk-7OCNF4AI.js} +1 -1
- package/dist/chunk-AAW27HJY.js +3 -0
- package/dist/{chunk-WME5DFB6.js → chunk-BIJ7ADTZ.js} +1 -1
- package/dist/{chunk-SEXLHFMR.js → chunk-BMPBVI7P.js} +1 -1
- package/dist/{chunk-TOVHLONK.js → chunk-BT3XDH3L.js} +4 -4
- package/dist/{chunk-JVIOAZHW.js → chunk-BUGAWNOC.js} +4 -4
- package/dist/{chunk-R4C3GGCS.js → chunk-BVW5U7QQ.js} +3 -3
- package/dist/{chunk-AF7R2MV4.js → chunk-CKZ6ZDU5.js} +1 -1
- package/dist/{chunk-IHEEJO5S.js → chunk-CPK7JTN3.js} +1 -1
- package/dist/{chunk-EVB35JP5.js → chunk-DOCUM3K7.js} +1 -1
- package/dist/{chunk-FKZEGBLK.js → chunk-DXTKNHWG.js} +11 -11
- package/dist/chunk-EEHK4IIK.js +14 -0
- package/dist/chunk-EGDJEY4K.js +27 -0
- package/dist/{chunk-G2V2ADJQ.js → chunk-EIWTOEWV.js} +2 -2
- package/dist/{chunk-2U2GJCSP.js → chunk-EL2RLUT6.js} +7 -7
- package/dist/{chunk-4GVH4ZUH.js → chunk-ET2EF5CI.js} +1 -1
- package/dist/{chunk-MC43PRTL.js → chunk-EXWGPXOS.js} +1 -1
- package/dist/{chunk-2SHYR3RA.js → chunk-FSPFV4MI.js} +9 -4
- package/dist/{chunk-YBB56N6X.js → chunk-G63BCOQ6.js} +1 -1
- package/dist/{chunk-3RPIPYLU.js → chunk-GCGKPDPN.js} +1 -1
- package/dist/chunk-GNPTNAZH.js +4 -0
- package/dist/{chunk-DG2WU3BU.js → chunk-GSBIJLTD.js} +2 -2
- package/dist/{chunk-ZXSMSVLU.js → chunk-I7HDD4IM.js} +1 -1
- package/dist/{chunk-JE6TBZGY.js → chunk-J47HXHSL.js} +7 -7
- package/dist/{chunk-RB2F65YJ.js → chunk-JPRJQ6B7.js} +11 -11
- package/dist/{chunk-PAB2ZU4F.js → chunk-KJY57QPT.js} +49 -49
- package/dist/{chunk-M2LLVSBR.js → chunk-KWX6NAOR.js} +1 -1
- package/dist/{chunk-OFKWTOXK.js → chunk-L7FDYGGF.js} +3 -3
- package/dist/{chunk-6ANFVX4M.js → chunk-L7IKTEOC.js} +11 -11
- package/dist/{chunk-EZY4CO4A.js → chunk-LGAN7DNC.js} +5 -5
- package/dist/{chunk-PCKYNZ5Y.js → chunk-LGLZTJ2W.js} +6 -6
- package/dist/{chunk-7ACSSYEZ.js → chunk-MEJK6PBN.js} +1 -1
- package/dist/{chunk-IUCIYWTT.js → chunk-NDO24PK6.js} +8 -8
- package/dist/{chunk-XDDTFV32.js → chunk-NESJOC3R.js} +1 -1
- package/dist/{chunk-BYCOB6WT.js → chunk-NGBT7AHL.js} +6 -6
- package/dist/chunk-PCQPV6MS.js +6 -0
- package/dist/{chunk-CCPNMYCK.js → chunk-Q23EHOXW.js} +1 -1
- package/dist/{chunk-ACW3J77L.js → chunk-Q7HN6T3H.js} +1 -1
- package/dist/{chunk-XNJMLHGK.js → chunk-QDLGU62M.js} +1 -1
- package/dist/{chunk-NUSSZJF2.js → chunk-REVC6YPT.js} +5 -5
- package/dist/{chunk-EM6BEHAD.js → chunk-RWGSMZGS.js} +1 -1
- package/dist/{chunk-4MO375G3.js → chunk-S2OIRC5H.js} +3 -3
- package/dist/{chunk-FTKKGGOQ.js → chunk-SR4XAYLC.js} +1 -1
- package/dist/{chunk-RPJ2GC3K.js → chunk-SRKSGUGT.js} +20 -20
- package/dist/{chunk-2F7ZOMKK.js → chunk-SZIENHKR.js} +1 -1
- package/dist/{chunk-UZ3CZQA4.js → chunk-TGLHJS3M.js} +1 -1
- package/dist/{chunk-O2YAB6WK.js → chunk-TIQKDAON.js} +6 -6
- package/dist/{chunk-TANR67XF.js → chunk-TVJRENCQ.js} +9 -9
- package/dist/{chunk-RJZYORCR.js → chunk-U4BMS5EV.js} +1 -1
- package/dist/chunk-UJOWORTR.js +1 -0
- package/dist/{chunk-MY755PTJ.js → chunk-UZMZ2EDW.js} +1 -1
- package/dist/{chunk-S4J4B7LY.js → chunk-WCKZHEFC.js} +5 -5
- package/dist/{chunk-AZU7YOES.js → chunk-WRORJNS5.js} +8 -8
- package/dist/{chunk-XB2YPUKR.js → chunk-XLD53X4P.js} +8 -8
- package/dist/{chunk-4HCRZHIX.js → chunk-XSPDPN5O.js} +1 -1
- package/dist/{chunk-TZHWF3P5.js → chunk-Y6IQYQYN.js} +2 -2
- package/dist/chunk-YALPQIBR.js +7 -0
- package/dist/{chunk-HAIMJAI4.js → chunk-ZCHBOAPA.js} +2 -2
- package/dist/{chunk-M2AIC7IK.js → chunk-ZEKM6HAA.js} +2 -2
- package/dist/{chunk-5YELPBUT.js → chunk-ZK2SULCA.js} +1 -1
- package/dist/{chunk-BHMUOWAE.js → chunk-ZSFUNXRD.js} +4 -4
- package/dist/{chunk-JDKRQG7X.js → chunk-ZWAVSUWT.js} +2 -2
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.d.ts +31 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.d.ts +7 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +162 -162
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.d.ts +13 -3
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6ZU5MKTQ.js +0 -29
- package/dist/Files-DEC4KVQM.js +0 -87
- package/dist/PdfViewer-KSLOYXMD.js +0 -1
- package/dist/Sidebar-QQFJJWE2.js +0 -43
- package/dist/chunk-2EOQDYGM.js +0 -29
- package/dist/chunk-2PWZNFFP.js +0 -19
- package/dist/chunk-5FCEBKT2.js +0 -7
- package/dist/chunk-F2AEP37B.js +0 -4
- package/dist/chunk-HMHL27AU.js +0 -6
- package/dist/chunk-JBQWR4SX.js +0 -8
- package/dist/chunk-MOD4PGVF.js +0 -27
- package/dist/chunk-NKZNPYDB.js +0 -3
- package/dist/chunk-WAZTGEMG.js +0 -1
- package/dist/chunk-WKRFD4E4.js +0 -14
package/dist/chunk-JBQWR4SX.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-XZL3HCWH.js";import{inputClasses as n}from"./chunk-PF3ANJFI.js";import{GROUP_COLORS as r}from"./chunk-D323R2FT.js";import{Tooltip as o}from"./chunk-22S6LG6D.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as d}from"./chunk-E6UCGCOC.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-blue-50 px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${r.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:r,onChange:y,options:k=[],placeholder:N,allowFreeText:C=!1,invalid:j,disabled:L,id:D,className:W="",tone:E,tooltip:F,split:$}){const[G,H]=m(!1),[I,J]=m(""),M=d(),S=h(null),T=h(null),B=h(null),R=a(S,G),P=e=>k.find(t=>t.value===e)?.label??e,U=p(()=>{const t=new Set(r),n=[],o=I.trim().toLowerCase();for(const r of k)t.has(r.value)||(t.add(r.value),o&&!e(r,o)||n.push(r));return n},[k,r,I]),z=e=>{const t=[...r];for(const n of e){const e=n.trim();if(!e)continue;const r=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===r)?.value,l=o??(C?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==r.length&&y(t)},A=e=>{e&&!r.includes(e)?(y([...r,e]),J("")):J("")},K=e=>y(r.filter(t=>t!==e)),O=()=>{const e=I.trim();if($&&e)return z(e.split($)),void J("");C&&e?A(e):J("")},X=h(()=>{});X.current=()=>{O(),H(!1)},f(()=>{if(!G)return;const e=e=>{const t=e.target;S.current?.contains(t)||B.current?.contains(t)||(O(),H(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Z=k.length>0;/* @__PURE__ */
|
|
2
|
-
return v("div",{ref:S,className:"relative",children:[
|
|
3
|
-
/* @__PURE__ */v("div",{onMouseDown:e=>{L||e.target.closest("button")||(e.preventDefault(),T.current?.focus())},className:n({invalid:j,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${L?"bg-gray-50 cursor-not-allowed":""} ${W}`}),children:[r.map(e=>{const t=E?.(e),n=w[t??"accent"],r=/* @__PURE__ */v("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:P(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":M.select.removeItem?.(P(e))??`${M.select.remove} ${P(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=F?.(e);return null==l?r:/* @__PURE__ */x(o,{content:l,className:"relative inline-flex max-w-full",children:r},e)}),
|
|
5
|
-
/* @__PURE__ */x("input",{id:D,ref:T,type:"text",autoComplete:"off",role:"combobox","aria-expanded":G&&Z,"aria-invalid":j||void 0,disabled:L,value:I,placeholder:0===r.length?N:void 0,onChange:e=>{(e=>{if($){const t=e.split($);if(t.length>1)return z(t.slice(0,-1)),void J(t[t.length-1])}J(e)})(e.target.value),H(!0)},onFocus:()=>{!L&&Z&&H(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&C){t.preventDefault();const n=I.trim(),r=n?U.filter(t=>e(t,n.toLowerCase())):[];1===r.length?A(r[0].value):O()}else"Backspace"===t.key&&""===I&&r.length>0?K(r[r.length-1]):"Escape"===t.key?(H(!1),J(""),T.current?.blur()):"Tab"===t.key&&(O(),H(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-gray-800 placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),G&&Z&&g(
|
|
6
|
-
/* @__PURE__ */x("div",{ref:B,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:R?.left,right:R?.right,top:R?.top,bottom:R?.bottom,minWidth:R?.minWidth,maxWidth:R?.maxWidth??s,width:"max-content",visibility:R?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:R?.maxHeight??c},children:0===U.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&r.length>=k.length?M.select.allSelected:M.select.noMatches}):U.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),A(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(b,{children:[
|
|
7
|
-
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
-
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
package/dist/chunk-MOD4PGVF.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-F2AEP37B.js";import{buttonClasses as t}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-2SHYR3RA.js";import{useShellStrings as n,splitAround as o}from"./chunk-E6UCGCOC.js";import{createContext as l,useContext as a,useState as i,useRef as s,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var b=l(()=>Promise.resolve(!1)),f=()=>a(b),g=()=>Promise.resolve(!1),p=e=>g(e),y=()=>Promise.resolve(!1),v=e=>y(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-blue-100",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-gray-300 h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
|
-
return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
|
|
3
|
-
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function E({children:t}){const[r,l]=i(!1),[a,f]=i({message:""}),[p,v]=i(0),N=s(),E=s(null),F=s(0),T=s([]),W=s(null),$=s(null),K=c(e=>{E.current=e.id,N.current=e.resolve,v(e.id),f(e.options),l(!0)},[]),R=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++F.current,options:t,resolve:e};null===E.current?K(r):T.current.push(r)})},[K]),[A,D]=i(!1),[U,B]=i({message:""}),[G,H]=i(""),J=s(),O=c(e=>(B(e),H(""),D(!0),new Promise(e=>{J.current=e})),[]),[S,V]=i(!1),[X,Y]=i({}),[q,z]=i(""),I=s(),M=c(e=>{const t="string"==typeof e?{message:e}:e;return Y(t),z(t.defaultValue??""),V(!0),new Promise(e=>{I.current=e})},[]);u(()=>{g=R,y=O,x=M},[R,O,M]);const Q=(e,t)=>{if(E.current!==e)return;const r=N.current,n=T.current.shift();n?K(n):(E.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{D(!1),H(""),J.current?.(e)},_=e=>{if(e){const e=q.trim();if(!e&&!X.allowEmpty)return V(!1),void I.current?.(null);V(!1),I.current?.(e)}else V(!1),I.current?.(null)},ee=a.variant||(a.confirmLabel?.toLowerCase().includes("delete")||a.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===U.variant?"warning":"danger"],ne=U.confirmWord,oe=null==ne||G===ne,le=n().dialog,[ae,ie]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
-
return d(b.Provider,{value:R,children:[t,
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>Q(p,!1),initialFocus:W,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
-
/* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>Q(p,!1),className:w,children:a.cancelLabel||le.cancel}),
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Q(p,!0),className:te.button,children:a.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
|
-
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:a.title||le.confirmTitle}),
|
|
11
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:a.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:A,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:$,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
-
/* @__PURE__ */m("button",{ref:$,type:"button",onClick:()=>Z(!1),className:w,children:U.cancelLabel||le.destructiveCancel}),
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??U.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
|
|
16
|
-
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
|
-
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:U.title||le.destructiveTitle}),
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:U.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
|
-
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ae,
|
|
22
|
-
/* @__PURE__ */m("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),ie]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:G,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key&&G===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
-
/* @__PURE__ */d(e,{open:S,onClose:()=>_(!1),title:X.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:X.cancelLabel||le.cancel}),
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!X.allowEmpty&&!q.trim(),className:C,children:X.confirmLabel||le.ok})]}),children:[X.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:X.message}),
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:q,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:X.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{E as ConfirmProvider,p as confirm,v as confirmDestructive,N as prompt,f as useConfirm};
|
package/dist/chunk-NKZNPYDB.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-5FCEBKT2.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{iconButtonClasses as n}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-2SHYR3RA.js";import{Tooltip as a}from"./chunk-22S6LG6D.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:R,align:W="end",side:z="bottom",menuMinWidth:L,linkAs:A,block:B=!1,className:D=""},F){const I=g&&(null!=N&&""!==N&&!1!==N)&&!v,S=x&&null!=j&&""!==j&&!1!==j,$=o(),E=/* @__PURE__ */t(i,{ref:F,type:b,variant:f,size:p,loading:v,leftIcon:k,block:B,disabled:g&&!I,"aria-disabled":!!I||void 0,disabledReason:I?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),K=B?"relative flex min-w-0 flex-1":"relative inline-flex",M=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[B?"flex w-full":"inline-flex","items-stretch",D].filter(Boolean).join(" "),children:[null==w||""===w||I?E:/* @__PURE__ */t(a,{content:w,className:K,children:E}),
|
|
3
|
-
/* @__PURE__ */t(a,{content:S?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":S?$:void 0,items:h,align:W,side:z,minWidth:L,linkAs:A,disabled:x&&!S,"aria-disabled":S,onOpenChange:y,footer:C,footerLabel:R,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:M,strokeWidth:2,"aria-hidden":"true"})})}),S&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
package/dist/chunk-WAZTGEMG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="8.35.1",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-WKRFD4E4.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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&&
|
|
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
|
-
/* @__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:[
|
|
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:[
|
|
8
|
-
/* @__PURE__ */x("span",{className:"text-gray-400",children:/* @__PURE__ */x(a,{})}),
|
|
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}),
|
|
14
|
-
/* @__PURE__ */x(c,{rejections:fe.rejections})]})}export{k as FULL_BADGE_TILE_PX,w as MediaUploadGrid};
|