efficient-shell 10.0.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{Browser-RFLTFP7Y.js → Browser-Q34VNUTL.js} +13 -13
- package/dist/{Calculator-DV2R65OS.js → Calculator-63XNC3BA.js} +12 -12
- package/dist/{CurrencyConverter-ELSCNMUT.js → CurrencyConverter-Q4HYAY4N.js} +9 -9
- package/dist/{Documents-HKTTXLSR.js → Documents-KLVVF4KK.js} +24 -24
- package/dist/{Files-ZSYGKZOV.js → Files-AOIBTQTE.js} +40 -40
- package/dist/Notepad-SOUIZDKN.js +24 -0
- package/dist/PdfViewer-WNKGFJD6.js +1 -0
- package/dist/{PomodoroTimer-XHNZGBDR.js → PomodoroTimer-X5Y3LA3V.js} +25 -25
- package/dist/{Preview-PLCASIZA.js → Preview-3FZTC25R.js} +25 -25
- package/dist/Sidebar-4OI4LP6G.js +44 -0
- package/dist/{Spreadsheet-Y7TJIBI5.js → Spreadsheet-RBEVCQIV.js} +13 -13
- package/dist/{Stock-KLYWTMMD.js → Stock-KESFJPYD.js} +4 -4
- package/dist/{Weather-CT2IZHEW.js → Weather-BYGZVNNK.js} +19 -19
- package/dist/{WorldClock-EJCUVIUW.js → WorldClock-P4JVDPGE.js} +6 -6
- package/dist/ai/index.js +38 -38
- 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/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-PUIQFTCO.js → chunk-2OJ3HGFY.js} +5 -5
- package/dist/{chunk-PKIDVVAE.js → chunk-2SLQD57V.js} +5 -5
- package/dist/{chunk-NDEIZUMG.js → chunk-3V6ZERBS.js} +1 -1
- package/dist/{chunk-BXEKX4TB.js → chunk-3V74SUZO.js} +16 -16
- package/dist/{chunk-DL6QIWVR.js → chunk-42XMT5JN.js} +1 -1
- package/dist/{chunk-IQWIYZB5.js → chunk-45XXERGA.js} +2 -2
- package/dist/{chunk-B7KD3DGY.js → chunk-4UEXVRBC.js} +1 -1
- package/dist/{chunk-FRINAJU7.js → chunk-4UX6ET7G.js} +1 -1
- package/dist/{chunk-BFVL2VTS.js → chunk-4VDGVF5T.js} +1 -1
- package/dist/chunk-4X6GIVTI.js +29 -0
- package/dist/{chunk-D2WGDTWN.js → chunk-5EX6XXUX.js} +1 -1
- package/dist/{chunk-PA37I5ZX.js → chunk-5VDT4762.js} +2 -2
- package/dist/{chunk-EGAV5LSX.js → chunk-5VSP3TYU.js} +1 -1
- package/dist/{chunk-66JYKX4T.js → chunk-6FPDOEOX.js} +1 -1
- package/dist/{chunk-3AZBI76O.js → chunk-7ILNRFEV.js} +1 -1
- package/dist/{chunk-GQK3U2IO.js → chunk-7TONF2PM.js} +1 -1
- package/dist/{chunk-LKW3YAZN.js → chunk-A3VJ4PRU.js} +6 -6
- package/dist/chunk-ACVKU6YW.js +7 -0
- package/dist/{chunk-ELUTQZGP.js → chunk-AEQFFD5I.js} +1 -1
- package/dist/{chunk-QRJRGP2K.js → chunk-AGLBDT7X.js} +8 -8
- package/dist/chunk-AXL7VTNM.js +11 -0
- package/dist/{chunk-7BDZZANS.js → chunk-B7HW6XZD.js} +1 -1
- package/dist/{chunk-XILZGSMX.js → chunk-BDFZNLFQ.js} +1 -1
- package/dist/{chunk-C6MV6IAX.js → chunk-BMXMSAQE.js} +8 -8
- package/dist/{chunk-PUCPFBYO.js → chunk-BNQRPLBW.js} +1 -1
- package/dist/{chunk-XS4HFUTW.js → chunk-BZPPDYEE.js} +1 -1
- package/dist/{chunk-DPDRFLBY.js → chunk-CLQFP42I.js} +3 -3
- package/dist/{chunk-HKAQXFUR.js → chunk-CMHLXELO.js} +3 -3
- package/dist/{chunk-UZ43AT4O.js → chunk-CUA6CREW.js} +8 -8
- package/dist/{chunk-RYS3URDC.js → chunk-DY2M6BIG.js} +10 -10
- package/dist/{chunk-EGEWU776.js → chunk-E3RHEEA6.js} +1 -1
- package/dist/{chunk-WFANOFHG.js → chunk-F7A6K3D5.js} +5 -5
- package/dist/{chunk-QTQQKQGQ.js → chunk-FFASZGNZ.js} +3 -3
- package/dist/{chunk-MPALY3CL.js → chunk-FMC2XNSP.js} +6 -6
- package/dist/{chunk-D7X2HMMA.js → chunk-FS2KWQJW.js} +10 -10
- package/dist/{chunk-AJ3R5QPD.js → chunk-GGIFS34Z.js} +5 -5
- package/dist/{chunk-4E4GWE4L.js → chunk-GVY2X4CC.js} +16 -16
- package/dist/{chunk-HJPCHES5.js → chunk-GZYTCHPX.js} +4 -4
- package/dist/chunk-IFANUMK3.js +4 -0
- package/dist/{chunk-ZREDCRTL.js → chunk-J7CIBRDS.js} +1 -1
- package/dist/{chunk-ZOBLEXIU.js → chunk-JJYAYMY7.js} +1 -1
- package/dist/{chunk-ZPCADTM5.js → chunk-JRBQLRAZ.js} +1 -1
- package/dist/{chunk-YFUMK2E7.js → chunk-JZK3UDOT.js} +1 -1
- package/dist/{chunk-O33CUGOI.js → chunk-K64JRGNE.js} +5 -5
- package/dist/{chunk-IU5KBQEQ.js → chunk-K7PCBUDC.js} +6 -6
- package/dist/{chunk-VG5NGCMQ.js → chunk-KFRU53WD.js} +6 -6
- package/dist/{chunk-FSPFV4MI.js → chunk-KKSVRIMP.js} +2 -4
- package/dist/{chunk-T5V2GJ4D.js → chunk-KZQAGXME.js} +4 -4
- package/dist/{chunk-FTWWJHFX.js → chunk-LOYCPZUB.js} +1 -1
- package/dist/{chunk-GBLMVFDW.js → chunk-LPDI5NL6.js} +1 -1
- package/dist/{chunk-FPGRKHUW.js → chunk-MH6DI6YY.js} +11 -11
- package/dist/{chunk-GQMS5657.js → chunk-MLKY5ESV.js} +1 -1
- package/dist/{chunk-TGLHJS3M.js → chunk-MUMQ6PW7.js} +1 -1
- package/dist/chunk-N6TK43YN.js +100 -0
- package/dist/chunk-N6VP75F5.js +3 -0
- package/dist/{chunk-KAVFW5CU.js → chunk-NNOA7AVG.js} +5 -5
- package/dist/{chunk-6YQPLI5M.js → chunk-NQJKANUP.js} +11 -11
- package/dist/{chunk-UTQG344L.js → chunk-NW7Z3G7P.js} +11 -11
- package/dist/{chunk-LR77AS3N.js → chunk-O6ABVKHU.js} +4 -4
- package/dist/{chunk-25STFYV3.js → chunk-OPB3I4JH.js} +4 -4
- package/dist/{chunk-RBD7SB6M.js → chunk-P5YFQ4IQ.js} +1 -1
- package/dist/{chunk-JHZV4TN6.js → chunk-PF5CKD4C.js} +2 -2
- package/dist/{chunk-NDKQDIWN.js → chunk-Q4LBBFLO.js} +5 -5
- package/dist/{chunk-X6TJR6M2.js → chunk-Q5YM65DZ.js} +8 -8
- package/dist/{chunk-XOKANFQD.js → chunk-QASKQDUR.js} +16 -16
- package/dist/{chunk-5F7HMNCX.js → chunk-QODTON7V.js} +1 -1
- package/dist/{chunk-7KDGW6BR.js → chunk-QXRRAADR.js} +1 -1
- package/dist/chunk-QZ3MO3HB.js +1 -0
- package/dist/{chunk-VSAI5TH7.js → chunk-R4Q5653D.js} +20 -20
- package/dist/{chunk-DXHLUB36.js → chunk-RKFEJ5CX.js} +1 -1
- package/dist/{chunk-GKZUAT3K.js → chunk-RSIGTZMU.js} +1 -1
- package/dist/{chunk-GNU3U2TP.js → chunk-RZR3OAKV.js} +1 -1
- package/dist/chunk-SDI2UGAG.js +1 -0
- package/dist/chunk-SKY2NBTQ.js +6 -0
- package/dist/{chunk-MKEYXKZA.js → chunk-TDLU6GF5.js} +4 -4
- package/dist/chunk-UP442DPT.js +9 -0
- package/dist/{chunk-OUKDGO4N.js → chunk-V4RYE6KA.js} +8 -8
- package/dist/{chunk-E7WY4GZ3.js → chunk-VMDBVXDJ.js} +1 -1
- package/dist/{chunk-F24QTMTY.js → chunk-VP63OOO4.js} +3 -3
- package/dist/{chunk-GRBBQ3VF.js → chunk-WKSNTMEJ.js} +1 -1
- package/dist/{chunk-DVOQCAC2.js → chunk-WMQ2URP4.js} +1 -1
- package/dist/{chunk-ED3QFXBC.js → chunk-WP4CIYJ7.js} +1 -1
- package/dist/{chunk-UFXE363L.js → chunk-X6YT3I5F.js} +1 -1
- package/dist/{chunk-SGTZJMZ6.js → chunk-XABYSSXW.js} +1 -1
- package/dist/{chunk-GSBIJLTD.js → chunk-XAROKI7X.js} +1 -1
- package/dist/{chunk-ZMVCN4OA.js → chunk-XHMIJ7S3.js} +7 -7
- package/dist/{chunk-Q7HN6T3H.js → chunk-XNKIDGZW.js} +1 -1
- package/dist/{chunk-6I6VSUKY.js → chunk-Y23TGQFN.js} +4 -4
- package/dist/chunk-ZLHPCPXS.js +19 -0
- package/dist/{chunk-LPUGK2MC.js → chunk-ZN2BFSQR.js} +2 -2
- package/dist/{chunk-TXMAWCR7.js → chunk-ZRZ5LOW3.js} +1 -1
- 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.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -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/hooks/useTheme.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +129 -130
- 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/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.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/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Notepad-63Q3JSCV.js +0 -25
- package/dist/PdfViewer-DFBPEUY5.js +0 -1
- package/dist/Sidebar-QFT5WPK4.js +0 -44
- package/dist/chunk-4AJRHTTB.js +0 -1
- package/dist/chunk-5CH2RGL6.js +0 -29
- package/dist/chunk-7YU27U3Y.js +0 -19
- package/dist/chunk-AEJNFA2K.js +0 -6
- package/dist/chunk-IEAFSVXC.js +0 -1
- package/dist/chunk-POCQ7ZL4.js +0 -3
- package/dist/chunk-PVR4KU7H.js +0 -7
- package/dist/chunk-R2QDO7NY.js +0 -4
- package/dist/chunk-RBXSU25O.js +0 -9
- package/dist/chunk-XSJJPACH.js +0 -11
- package/dist/chunk-ZBTDMQUI.js +0 -100
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-AEQFFD5I.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as o}from"./chunk-KKSVRIMP.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.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(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(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);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
+
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":j,windows:A,className:I="",layout:R="grid"}){const S=s().textToolbar,q=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!q.words&&!q.paragraph)return null;const B=m(n,k,x,q.cells.paragraph),K=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,L=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:K(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:K(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,U=l(S),$=e.map(e=>[e,U[e],r(e)]),T=C?e.filter(e=>C.allow.includes(e)):[],P=C&&T.includes(C.value)?C.value:T[0],E=[["none",S.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",S.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",S.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],F=x&&B?g(S.clear,/* @__PURE__ */i(a,{className:K(!1),"aria-label":S.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,H=/* @__PURE__ */t(d,{children:[L("bold",S.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),L("italic",S.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),L("underline",S.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),L("strike",S.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(S.color,/* @__PURE__ */i(a,{pressed:k.open,className:K(k.open,"rosh-tb-color"),"aria-label":S.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,L("link",S.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),L("sup",S.sup,/* @__PURE__ */i(o,{name:"superscript"})),L("sub",S.sub,/* @__PURE__ */i(o,{name:"subscript"})),L("code",S.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?F:null]}),V=/* @__PURE__ */t(d,{children:[C&&T.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":S.alignment,onKeyDown:e=>p(e,T,e=>C.onChange(e)),children:$.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:K(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===P?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(S.bullet,/* @__PURE__ */i(a,{className:K("bullet"===D.pressed),"aria-label":S.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(S.number,/* @__PURE__ */i(a,{className:K("number"===D.pressed),"aria-label":S.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,L("quote",S.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":S.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>M.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:K(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?F:null]}),X="row"===R,G=X?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===N&&"words"!==B?" is-eight":"",O=b(n,Boolean(k)),Q={"--rosh-tb-color-col":String(O.color),"--rosh-tb-link-col":String(O.link),...X?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Z;return Z=X?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[H,
|
|
3
|
+
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),V]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}),
|
|
5
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:V})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:H}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:V}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${G} ${I}`.trim(),style:Q,children:[
|
|
6
|
+
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":j??S.formatting,children:Z}),A]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return c(y.Provider,{value:a,children:e})}function S({value:n,onChange:l,min:s,max:g,step:S=1,shiftStep:z,precision:F,inputMin:k,inputMax:N,suffix:M,showInput:$=!0,emptyLabel:j,placeholderValue:L,stepFrom:
|
|
3
|
-
/* @__PURE__ */c("input",{id:
|
|
4
|
-
/* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:n,onChange:e=>{null!=e?e<G||e>H||l(e):J&&l(null)},min:G,max:H,step:S,shiftStep:z,stepFrom:Q,precision:
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-5VDT4762.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{createContext as n,useState as r,useMemo as l,useId as a,useRef as o,useContext as d,useEffect as u,useLayoutEffect as s}from"react";import{jsx as c,jsxs as m}from"react/jsx-runtime";var f=(e,t,i)=>Math.min(i,Math.max(t,e));function p(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var h=8,v=40;function x(e){return Math.max(1,...e.map(e=>(e??"").length))}var b="undefined"==typeof window?u:s;function w(e,t,i,n){return Number(f(e,t,i).toFixed(n))}var y=n(null);function g({children:e}){const[t,i]=r({}),n=l(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),a=l(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
|
|
2
|
+
return c(y.Provider,{value:a,children:e})}function S({value:n,onChange:l,min:s,max:g,step:S=1,shiftStep:z,precision:F,inputMin:k,inputMax:N,suffix:M,showInput:$=!0,emptyLabel:j,placeholderValue:L,stepFrom:D,label:K,"aria-labelledby":A,valueText:C,id:P,disabled:E,size:R="md",boxSize:V="sm",className:W="",auto:T}){const X=i(),q=a(),B=t(),I=T??B,O=a(),U=P??q,Z=F??p(S),G=k??s,H=N??g,J=void 0!==j||void 0!==L,Q=D??L,Y=f(n??L??s,s,g),_=o(null),[ee,te]=r(null),ie=Boolean(M);b(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,$]);const ne=e=>C?C(e):"string"==typeof M?`${e.toFixed(Z)} ${M}`:void 0,re=null==n?j??(null!=L?ne(L)??String(L):void 0):ne(n),le=`calc(${x([s.toFixed(Z),g.toFixed(Z),n?.toFixed(Z),j,L?.toFixed(Z)])}ch + ${(ee?.frame??10+(ie?v:h))+2}px)`,ae=d(y),oe=a(),de=ae?.set;return b(()=>{de&&de(oe,$?le:null)},[de,oe,le,$]),u(()=>()=>de?.(oe,null),[de,oe]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-3 ${W}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */c("input",{id:U,type:"range",min:s,max:g,step:S,value:Y,disabled:E,"aria-label":A?void 0:K,"aria-labelledby":A,"aria-valuetext":re,"aria-describedby":I?O:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==n&&null!=Q))return;e.preventDefault();l(w((n??Q??Y)+t*(i?z??S:S),s,g,Z))},onChange:e=>l(w(Number(e.target.value),s,g,Z)),className:"min-w-24 flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===R?"h-1":"h-1.5")}),$&&
|
|
4
|
+
/* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:n,onChange:e=>{null!=e?e<G||e>H||l(e):J&&l(null)},min:G,max:H,step:S,shiftStep:z,stepFrom:Q,precision:Z,snap:!0,allowEmpty:J,suffix:M,disabled:E,placeholder:j??(null!=L?L.toFixed(Z):void 0),size:V,auto:I,"aria-label":K?X.slider.value(K):void 0,"aria-labelledby":K?void 0:A})}),I&&/* @__PURE__ */c("span",{id:O,hidden:!0,children:X.settingView.auto})]})}export{S as Slider,g as SliderGroup,w as settleSliderValue,x as sliderBoxChars,p as stepDecimals};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{ImageFocusPoint as e}from"./chunk-QSW3YHPK.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-B7HW6XZD.js";import{TransferProgress as u}from"./chunk-EQN65XOO.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-P6LB3I3D.js";import{Icon as p}from"./chunk-KKSVRIMP.js";import{useShellStrings as b}from"./chunk-X2PZMXDP.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:P,label:C,hint:F,error:U,required:K,className:O,accept:X="image/*",maxSizeBytes:$,fit:z="cover",height:B=112,placeholder:D,cta:H,acceptHint:I,showFilename:S=!0,allowReplace:W=!0,allowRemove:q=!0,replaceLabel:V,removeLabel:M,busy:Q=!1,busyLabel:Y,choosingLabel:Z,pickFailedLabel:_,progress:A,disabled:E=!1,kind:G,onKindChange:J,focus:T,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=H??ie.cta,oe=G??(/video/.test(X)&&!/image/.test(X)?"video":"image"),re="string"==typeof M&&M?M:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=Q||ne,me=ne&&!Q?Z??ie.choosing:Y??ie.uploading,he=U??(se?_??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=E||ue,ke=!!w&&(t(w,X)||w===ve),je=D??o(X,ie),xe=V??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):P?P(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:X,maxSizeBytes:$,acceptHint:I,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Pe=w?r(w):"",Ce=!ke&&!!ee,Fe=E||!W&&!q?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[W&&/* @__PURE__ */k("button",{id:Ce?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
+
/* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),q&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ce?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ce?void 0:{height:B},children:[Ce?
|
|
4
|
+
/* @__PURE__ */j(e,{value:T??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Pe||void 0,className:"h-full w-full",style:{objectFit:z}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Pe,className:"h-full w-full",style:{objectFit:z,objectPosition:T||void 0}}),S&&w&&/* @__PURE__ */j(n,{children:Pe}),Fe,ue&&/* @__PURE__ */j(l,{label:me,progress:A,rounded:"rounded-md"})]}),Ke=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":K||void 0,"aria-describedby":he?`${be}-error`:F?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:B},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:A}):/* @__PURE__ */k(x,{children:[
|
|
5
|
+
/* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
|
|
6
|
+
/* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
|
|
7
|
+
/* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),I&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:I})]})});/* @__PURE__ */
|
|
8
|
+
return k(a,{label:C,htmlFor:be,hint:F,error:he,required:K,className:O,children:[J&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(i,{value:oe,onChange:e=>J(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof C&&C?C:ie.upload})}),w?Ue:Ke,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
|
|
9
|
+
/* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-OQW42DOR.js";import{Icon as t}from"./chunk-
|
|
2
|
-
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,P]=s(1),[z,D]=s(0),[_,W]=s(1),[S,L]=s(!0),[O,$]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return $(!0),P(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),D(e.numPages),$(!1))}).catch(()=>{t||(e.error(T.current),$(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!S||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,S,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:_}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,_]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,
|
|
1
|
+
import{toast_default as e}from"./chunk-OQW42DOR.js";import{Icon as t}from"./chunk-KKSVRIMP.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{createContext as a,useContext as o,useRef as i,useState as s,useEffect as l}from"react";import*as c from"pdfjs-dist";import{createPortal as d}from"react-dom";import{jsx as u,jsxs as m}from"react/jsx-runtime";function h(e,t,n){return new Error(`The response for ${e} is not a WebAssembly module (got ${function(e){if(0===e.length)return"an empty response";const t=Array.from(e.subarray(0,24)).map(e=>e>=32&&e<127?String.fromCharCode(e):".").join("");return`${e.length} bytes starting "${t}"`}(n)}). The bundler did not emit "${t}" as an asset, and the host answered with a fallback page instead of a 404. Serve pdfjs-dist/wasm/ yourself and point window.__REACT_OS_SHELL_PDF_WASM__ at it.`)}var p=a(null);function f({children:e}){const t=o(p);return t?d(e,t):
|
|
2
|
+
/* @__PURE__ */u("div",{className:"flex shrink-0 flex-wrap items-center gap-1 border-b border-gray-200 bg-gray-50 px-3 py-2 text-xs",children:e})}"undefined"==typeof window||c.GlobalWorkerOptions.workerSrc||(c.GlobalWorkerOptions.workerSrc=`https://unpkg.com/pdfjs-dist@${c.version}/build/pdf.worker.min.mjs`);var g={"jbig2.wasm":new URL("pdfjs-dist/wasm/jbig2.wasm",import.meta.url).href,"openjpeg.wasm":new URL("pdfjs-dist/wasm/openjpeg.wasm",import.meta.url).href},w=class{async fetch({kind:e,filename:t}){if("wasmUrl"!==e)throw new Error(`Ensure that the \`${e}\` API parameter is provided.`);const n=g[t];if(!n)throw new Error(`No bundled pdf.js wasm module for "${t}".`);const r=await fetch(n);if(!r.ok)throw new Error(`Unable to load wasm data at: ${n}`);const a=new Uint8Array(await r.arrayBuffer());if(!function(e){return e.length>=4&&0===e[0]&&97===e[1]&&115===e[2]&&109===e[3]}(a))throw h(n,t,a);return a}};function y(e){const t=e||("undefined"!=typeof window?window.__REACT_OS_SHELL_PDF_WASM__:void 0);return"string"==typeof t&&t?{wasmUrl:t.endsWith("/")?t:`${t}/`}:{BinaryDataFactory:w}}var v=[50,75,100,125,150,200,300,400];function b(e,t,n){const r=(t.width-40)/n.width,a="page"===e?Math.min(r,(t.height-40)/n.height):r;return Math.min(Math.max(a,.3),4)}function x({url:a,filename:o,fit:d="width",onDownload:h,onEmail:p,workerSrc:g,wasmUrl:w}){const x=r().pdf,k=i(null),C=i(null),N=i(null),[M,j]=s(null),[E,P]=s(1),[z,D]=s(0),[_,W]=s(1),[S,L]=s(!0),[O,$]=s(!0),T=i(x.loadFailed);T.current=x.loadFailed,l(()=>{let t=!1;return $(!0),P(1),g&&(c.GlobalWorkerOptions.workerSrc=g),c.getDocument({url:a,...y(w)}).promise.then(e=>{t||(j(e),D(e.numPages),$(!1))}).catch(()=>{t||(e.error(T.current),$(!1))}),()=>{t=!0}},[a,g,w]),l(()=>{if(!M||!S||!N.current)return;const e=()=>{const e=N.current;e&&M.getPage(E).then(t=>{if(!N.current)return;const n=t.getViewport({scale:1}),r=b(d,{width:e.clientWidth,height:e.clientHeight},{width:n.width,height:n.height});W(e=>Math.abs(e-r)<.005?e:r)})};e();const t=new ResizeObserver(e);return t.observe(N.current),()=>t.disconnect()},[M,E,S,d]),l(()=>{if(!M||!k.current)return;let e=!1,t=null,n=null;return M.getPage(E).then(r=>{if(e||!k.current)return;const a=r.getViewport({scale:_}),o=k.current;o.width=a.width,o.height=a.height,o.style.width=`${a.width}px`,o.style.height=`${a.height}px`;const i=o.getContext("2d");t=r.render({canvas:o,canvasContext:i,viewport:a}),t.promise.catch(()=>{});const s=C.current;s&&(s.replaceChildren(),s.style.setProperty("--total-scale-factor",String(a.scale)),n=new c.TextLayer({textContentSource:r.streamTextContent(),container:s,viewport:a}),n.render().then(()=>{if(e)return;const t=document.createElement("div");t.className="endOfContent",s.append(t)}).catch(()=>{}))}),()=>{e=!0,t?.cancel(),n?.cancel()}},[M,E,_]),l(()=>{const e=()=>C.current?.classList.remove("selecting");return window.addEventListener("pointerup",e),()=>window.removeEventListener("pointerup",e)},[]);const A="page"===d?x.fitPage:x.fitWidth,R="px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";/* @__PURE__ */
|
|
3
3
|
return m("div",{className:"flex flex-col h-full",children:[
|
|
4
4
|
/* @__PURE__ */m(f,{children:[
|
|
5
5
|
/* @__PURE__ */u("button",{type:"button","aria-label":x.previousPage,onClick:()=>P(e=>Math.max(1,e-1)),disabled:E<=1,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
6
6
|
/* @__PURE__ */u("span",{className:"text-gray-600 font-medium tabular-nums whitespace-nowrap",children:x.pageOf(E,z)}),
|
|
7
7
|
/* @__PURE__ */u("button",{type:"button","aria-label":x.nextPage,onClick:()=>P(e=>Math.min(z,e+1)),disabled:E>=z,className:"px-1 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",children:/* @__PURE__ */u(t,{name:"chevron-right",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
8
8
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
9
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{L(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:
|
|
9
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomOut,title:x.zoomOut,onClick:()=>{L(!1),W(e=>Math.max(.3,Math.round(100*(e-.25))/100))},className:R,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"−"})}),
|
|
10
10
|
/* @__PURE__ */m("select",{value:S?"fit":v.includes(Math.round(100*_))?Math.round(100*_):"custom",onChange:e=>{const t=e.target.value;"fit"!==t?"custom"!==t&&(L(!1),W(Number(t)/100)):L(!0)},className:"bg-transparent hover:bg-gray-200 rounded px-1 py-1 text-gray-600 tabular-nums cursor-pointer focus:outline-none focus:ring-1 focus:ring-blue-400","aria-label":x.zoom,title:x.zoom,children:[
|
|
11
11
|
/* @__PURE__ */u("option",{value:"fit",children:A}),!S&&!v.includes(Math.round(100*_))&&/* @__PURE__ */m("option",{value:"custom",children:[Math.round(100*_),"%"]}),v.map(e=>/* @__PURE__ */m("option",{value:e,children:[e,"%"]},e))]}),
|
|
12
|
-
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{L(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:
|
|
13
|
-
/* @__PURE__ */u("button",{type:"button",onClick:()=>L(!0),"aria-pressed":S,className:
|
|
12
|
+
/* @__PURE__ */u("button",{type:"button","aria-label":x.zoomIn,title:x.zoomIn,onClick:()=>{L(!1),W(e=>Math.min(4,Math.round(100*(e+.25))/100))},className:R,children:/* @__PURE__ */u("span",{"aria-hidden":"true",children:"+"})}),
|
|
13
|
+
/* @__PURE__ */u("button",{type:"button",onClick:()=>L(!0),"aria-pressed":S,className:R+(S?" bg-gray-200 text-gray-900":""),title:x.fitHint,children:x.fit}),
|
|
14
14
|
/* @__PURE__ */u("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=z;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>{if(!M)return;const t=window.open("","_blank");if(!t)return void e.error(x.allowPopups);const n=[];for(let e=1;e<=z;e++)n.push(M.getPage(e).then(e=>{const t=e.getViewport({scale:2}),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,e.render({canvas:n,canvasContext:n.getContext("2d"),viewport:t}).promise.then(()=>n.toDataURL())}));Promise.all(n).then(e=>{var n;t.document.write(`<html><head><title>${n=o,n.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""}[e]))}</title><style>@media print{body{margin:0}img{width:100%;page-break-after:always}}</style></head><body>`),t.document.write(e.map(e=>`<img src="${e}"/>`).join("")),t.document.write("</body></html>"),t.document.close(),setTimeout(()=>{t.print(),t.close()},300)})},className:R,children:[
|
|
16
16
|
/* @__PURE__ */u(t,{name:"print",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.print]}),
|
|
17
|
-
/* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:
|
|
18
|
-
/* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:
|
|
17
|
+
/* @__PURE__ */m("button",{type:"button",onClick:h??(()=>{const e=document.createElement("a");e.href=a,e.download=o,e.click()}),className:R,children:[
|
|
18
|
+
/* @__PURE__ */u(t,{name:"download",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.download]}),p&&/* @__PURE__ */m("button",{type:"button",onClick:p,className:R,children:[
|
|
19
19
|
/* @__PURE__ */u(t,{name:"email",className:"h-3.5 w-3.5",strokeWidth:1.5}),x.email]})]}),
|
|
20
20
|
/* @__PURE__ */u("div",{ref:N,className:"flex-1 overflow-auto bg-gray-100 outline-none",tabIndex:0,onWheel:e=>{if(!M)return;if(e.ctrlKey||e.metaKey)return;const t=N.current;if(!t)return;const n=t.scrollTop<=0,r=t.scrollTop+t.clientHeight>=t.scrollHeight-1;e.deltaY>0&&r&&E<z?(e.preventDefault(),P(e=>Math.min(z,e+1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=0)})):e.deltaY<0&&n&&E>1&&(e.preventDefault(),P(e=>Math.max(1,e-1)),requestAnimationFrame(()=>{N.current&&(N.current.scrollTop=N.current.scrollHeight)}))},onKeyDown:e=>{if(!M)return;const t=(document.activeElement?.tagName||"").toLowerCase();"input"===t||"textarea"===t||document.activeElement?.isContentEditable||("PageDown"===e.key||"ArrowRight"===e.key?E<z&&(e.preventDefault(),P(e=>Math.min(z,e+1))):"PageUp"===e.key||"ArrowLeft"===e.key?E>1&&(e.preventDefault(),P(e=>Math.max(1,e-1))):"Home"===e.key?(e.preventDefault(),P(1)):"End"===e.key&&(e.preventDefault(),P(z)))},children:O?/* @__PURE__ */u(n,{size:"sm",padding:"",className:"h-full",label:x.loading}):/* @__PURE__ */m("div",{className:"min-h-full flex items-center justify-center p-4",children:[
|
|
21
21
|
/* @__PURE__ */u("style",{children:'\n.preview-pdf-textlayer {\n position: absolute;\n inset: 0;\n overflow: clip;\n line-height: 1;\n text-align: initial;\n text-size-adjust: none;\n forced-color-adjust: none;\n transform-origin: 0 0;\n caret-color: CanvasText;\n --min-font-size: 1;\n --text-scale-factor: calc(var(--total-scale-factor, 1) * var(--min-font-size));\n --min-font-size-inv: calc(1 / var(--min-font-size));\n}\n.preview-pdf-textlayer :is(span, br) {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n}\n.preview-pdf-textlayer > :not(.markedContent),\n.preview-pdf-textlayer .markedContent span:not(.markedContent) {\n z-index: 1;\n --font-height: 0;\n font-size: calc(var(--text-scale-factor) * var(--font-height));\n --scale-x: 1;\n --rotate: 0deg;\n transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));\n}\n.preview-pdf-textlayer .markedContent {\n display: contents;\n}\n.preview-pdf-textlayer span[role="img"] {\n user-select: none;\n cursor: default;\n}\n.preview-pdf-textlayer ::selection {\n background: rgba(0, 80, 255, 0.25);\n}\n.preview-pdf-textlayer br::selection {\n background: transparent;\n}\n.preview-pdf-textlayer .endOfContent {\n display: block;\n position: absolute;\n inset: 100% 0 0;\n z-index: 0;\n cursor: default;\n user-select: none;\n}\n.preview-pdf-textlayer.selecting .endOfContent {\n top: 0;\n}\n'}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-2OJ3HGFY.js";import{Avatar as t}from"./chunk-5VTRKWKO.js";import{Input_default as a}from"./chunk-MAMWQCJ6.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{useState as s}from"react";import{jsx as n,jsxs as l}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 n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("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__ */n(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Icon as l}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Icon as l}from"./chunk-KKSVRIMP.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),I=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(S,()=>C.current,I.current)},[j,d,S]);const
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),I=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(S,()=>C.current,I.current)},[j,d,S]);const K=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
4
|
/* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
5
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
-
return m("button",1===k?{ref:I,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:
|
|
6
|
+
return m("button",1===k?{ref:I,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:K})}:{ref:I,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:K})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-6FPDOEOX.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-N6TK43YN.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-N6TK43YN.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-5VDT4762.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as r}from"./chunk-KKSVRIMP.js";import{Tooltip as i}from"./chunk-BCDG4N6L.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:"md","aria-label":n,"aria-pressed":e,disabled:o,onClick:()=>r(!e),children:l})})}export{p as SidesEachToggle,h as SidesInput,c as sidesStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-CBGKLHPB.js";import{Select_default as a}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-CBGKLHPB.js";import{Select_default as a}from"./chunk-ZLHPCPXS.js";import{Pagination as r}from"./chunk-IWJRSC7M.js";import{Input_default as t}from"./chunk-MAMWQCJ6.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{Icon as c}from"./chunk-KKSVRIMP.js";import{TH_ONE_LINE as m}from"./chunk-OZAAIE4E.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
|
|
2
2
|
return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{navIcons as e}from"./chunk-CY5N5OA3.js";import{Icon as t}from"./chunk-
|
|
1
|
+
import{navIcons as e}from"./chunk-CY5N5OA3.js";import{Icon as t}from"./chunk-KKSVRIMP.js";import{isValidElement as r,cloneElement as n}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var l=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function a(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r);return l[Math.abs(t)%l.length]}var d={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},s={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},c={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},f={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function p({className:e}){/* @__PURE__ */
|
|
2
2
|
return o(t,{name:"folder",look:"solid",className:e})}function u(t,r){return r&&e[r]||(t?e[t]:void 0)}var m=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function h({entityType:e,isSelected:t,entityId:l,label:h,fileKind:w}){const g="preview-file"===e&&w,y=g?f[w]:null,x=g?c[w]:null;if("folder"===e)/* @__PURE__ */
|
|
3
3
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(p,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=u(l,h),i=a(l||h||"page");/* @__PURE__ */
|
|
4
4
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&r(e)?n(e,{className:"h-7 w-7 text-white"}):m})})}/* @__PURE__ */
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-YJSX6JAC.js";import{ItemCount as n}from"./chunk-GMRZX2ET.js";import{GROUP_COLORS as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-
|
|
1
|
+
import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-YJSX6JAC.js";import{ItemCount as n}from"./chunk-GMRZX2ET.js";import{GROUP_COLORS as o}from"./chunk-LNARMEEZ.js";import{Icon as i}from"./chunk-KKSVRIMP.js";import{OneLineLabel as s}from"./chunk-OZAAIE4E.js";import{Tooltip as l}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-X2PZMXDP.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
|
|
2
2
|
return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
|
|
3
3
|
return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
|
|
4
4
|
/* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
|
|
5
5
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:P(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
|
|
6
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:C,dragging:
|
|
7
|
-
return g("div",{...M,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":Z?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":M?.["aria-keyshortcuts"]??(L?e:void 0),"aria-describedby":
|
|
8
|
-
/* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:
|
|
6
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var P=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function D({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:D,drop:C,dragging:K=!1,draggable:E=!1,dragHint:I,onMove:L,rowProps:M,className:S=""}){const Z=void 0!==p,H=m(),R=x??("number"==typeof y?y:void 0),T=[M?.["aria-describedby"],L?H:void 0].filter(Boolean).join(" ")||void 0,X="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,q=d?X?`bg-[var(--status-success-soft)] ${X}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${X??"text-ink-strongest"}`:`${X??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
|
|
7
|
+
return g("div",{...M,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":Z?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":M?.["aria-keyshortcuts"]??(L?e:void 0),"aria-describedby":T,"data-drop":C,"data-draggable":E||void 0,onKeyDown:e=>{if(M?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&L?(e.preventDefault(),L(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&Z&&!p&&f||"ArrowLeft"===e.key&&Z&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{M?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",E?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",q,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",S].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),E&&
|
|
8
|
+
/* @__PURE__ */h(t,{marker:"tree",hint:I,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
|
|
9
9
|
/* @__PURE__ */h("span",Z?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:P(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
|
|
10
10
|
/* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[D??
|
|
11
|
-
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=
|
|
11
|
+
/* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=R&&/* @__PURE__ */h(n,{count:R,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=R?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
|
|
12
12
|
/* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:$,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
|
|
13
13
|
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
|
|
14
14
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
|
|
15
15
|
/* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),L&&/* @__PURE__ */h(r,{id:H})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
|
|
16
16
|
return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
|
|
17
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function
|
|
17
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
|
|
18
18
|
return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
|
|
19
19
|
/* @__PURE__ */h("span",{"aria-hidden":"true",className:"absolute inset-x-0 -bottom-1 -top-1"}),
|
|
20
|
-
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,D as TreeRow,
|
|
20
|
+
/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-seam-line":"",className:`pointer-events-none absolute inset-x-2 top-1/2 h-0.5 -translate-y-1/2 rounded-full bg-blue-500 transition-opacity ${s}`}),e&&/* @__PURE__ */h(l,{content:o,className:"absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2",children:/* @__PURE__ */h("button",{type:"button","aria-label":o,onClick:e,className:"flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 text-white transition rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(r?"scale-75 opacity-0":"scale-75 opacity-0 group-hover/seam:scale-100 group-hover/seam:opacity-100 focus-visible:scale-100 focus-visible:opacity-100"),children:/* @__PURE__ */h(i,{name:"add","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3"})})})]})}export{y as Tree,C as TreeEmptySlot,x as TreeGroup,j as TreeGroupLabel,D as TreeRow,K as TreeSeam};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-KKSVRIMP.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,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return t("div",{id:A,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${
|
|
3
|
-
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */s("div",{ref:
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-5VDT4762.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as a}from"./chunk-KKSVRIMP.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:j,id:A,className:D=""}){const K=n(),M=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[N,R]=l(0),C=o(null);/* @__PURE__ */
|
|
2
|
+
return t("div",{id:A,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${D}`.trim(),children:[v&&
|
|
3
|
+
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:K.corners.radiusMark}),suffix:K.corners.unit,steppers:"compact",disabled:y,"aria-label":b??K.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */s("div",{ref:C,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(C.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:M.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?j:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===N?0:-1,onFocus:()=>R(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-QODTON7V.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-KKSVRIMP.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-X2PZMXDP.js";import{forwardRef as k,useId as N,useState as w,useRef as $,useMemo as D,useCallback as j,useEffect as S,useLayoutEffect as T}from"react";import{createPortal as H}from"react-dom";import{jsxs as I,jsx as O,Fragment as C}from"react/jsx-runtime";var E=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=k(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},k){const w=t,$=x(),D=d(),j=f??D,S=N(),T=/* @__PURE__ */I("select",{ref:k,value:e,multiple:b||void 0,onChange:e=>w(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */O(R,{items:r})]});return j?/* @__PURE__ */I(C,{children:[T,
|
|
3
|
+
/* @__PURE__ */O("span",{id:S,hidden:!0,children:$.settingView.auto})]}):T});function R({items:e}){const t=e=>/* @__PURE__ */O("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return O(C,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */O("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var K=k(function({value:l,onChange:u,options:k,placeholder:z,invalid:K,className:P="",id:V,disabled:A,size:U,touchSize:B,title:M,multiple:W,renderOption:F,renderValue:L,valueText:G,readOnly:X=!1,footer:Y,changed:J=!1,auto:q,"aria-describedby":Q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ne]=w(!1),[ie,ae]=w(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===U,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=w(null),ge=x(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),ke=N(),Ne=`${ke}-listbox`,we=V??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),Se=q??je,Te=`${ke}-auto`,He=[Q,J?De:void 0,Se?Te:void 0].filter(Boolean).join(" ")||void 0,Ie=D(()=>i(k),[k]),Oe=W?l:[],Ce=u,Ee=f(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze="undefined"==typeof window?S:T,Re=`${re}|${Ee?.top}|${Ee?.bottom}|${Ee?.maxHeight}|${k.length}`;ze(()=>{be(null)},[Re]),ze(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&be(Math.floor(i))},[re,fe,Re]);const Ke=W?Ie.findIndex(e=>Oe.includes(e.value)):Ie.findIndex(e=>e.value===l),Pe=W?Ie.filter(e=>Oe.includes(e.value)).map(e=>e.label).join(", ")||void 0:Ke>=0?Ie[Ke].label:void 0,Ve=!W&&Ke>=0?Ie[Ke].lang:void 0,Ae=W?Ie.filter(e=>Oe.includes(e.value)):Ke>=0?[Ie[Ke]]:[],Ue=L&&Ae.length?L(Ae):void 0,Be=void 0!==Ue&&G?G(Ae):void 0,Me=j((e=!0)=>{ne(!1),ae(-1),e&&oe.current?.focus()},[]),We=j(()=>{A||X||(ae(Ke>=0?Ke:e(Ie)),ne(!0))},[A,X,Ie,Ke]),Fe=j(e=>{const t=Ie[e];if(t&&!t.disabled){if(W){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ce(t.value),Me()}},[Ie,W,l,Ce,Me]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Me(),!0),ue)},[re,Me]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Me(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Me(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Me]),S(()=>{!re||ie<0||de.current?.querySelector(`#${CSS.escape($e(ie))}`)?.scrollIntoView({block:"nearest"})},[re,ie]);const Le=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=re?ie:Ke,i=t(Ie,r.buffer,n);i<0||(re?ae(i):W?(ae(i),ne(!0)):Fe(i))},[re,ie,Ke,Ie,Fe,W]),Ge=re?a(k,(e,t)=>{const r=(n=e.value,W?Oe.includes(n):l===n);var n;const i=t===ie;/* @__PURE__ */
|
|
5
|
+
return I("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||F?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Fe(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${W?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[W&&/* @__PURE__ */O(o,{selected:r}),F?/* @__PURE__ */O("span",{className:"block min-w-0 flex-1 truncate",children:F(e,{selected:r,active:i})}):W?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:E(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */I(C,{children:[
|
|
8
|
+
/* @__PURE__ */O("span",{lang:e.lang,className:"block truncate",style:E(e),children:e.label}),e.description&&/* @__PURE__ */O("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Xe=void 0!==Ue?
|
|
9
|
+
/* @__PURE__ */I("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */O("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
|
|
11
|
+
/* @__PURE__ */O("span",{lang:void 0===Be?Ve:void 0,className:"sr-only",children:Be??Pe})]}):/* @__PURE__ */O("span",{lang:Ve,className:`block truncate ${void 0===Pe?c:""}`,children:Pe??z??" "}),Ye={zIndex:h.popup,left:Ee?.left,top:Ee?.top,bottom:Ee?.bottom,width:Ee?.width,maxHeight:Ee?.maxHeight??b,visibility:Ee?void 0:"hidden",...g()},Je=/* @__PURE__ */O("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":W||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ye,maxHeight:fe}:Ye,children:Ge}),qe=pe?/* @__PURE__ */I("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ye,children:[Je,
|
|
12
|
+
/* @__PURE__ */O("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */I("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Me(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,n=t=>{e.preventDefault(),ce.current[t]?.focus()},i=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Me());case"Escape":return e.preventDefault(),e.stopPropagation(),void Me()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */O(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
|
|
14
|
+
return I("div",{ref:le,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */O("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ie>=0?$e(ie):void 0,"aria-invalid":K||void 0,"aria-describedby":He,"aria-label":Z,"aria-labelledby":_,title:M,disabled:A,"aria-readonly":X||void 0,onClick:()=>re?Me():We(),onKeyDown:t=>{if(!A&&!X)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>n(Ie,e,1)):We());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>n(Ie,e,-1)):We());case"Home":return void(re&&(t.preventDefault(),ae(e(Ie))));case"End":return void(re&&(t.preventDefault(),ae(r(Ie))));case"Enter":return void(re&&(t.preventDefault(),Fe(ie)));case" ":return t.preventDefault(),void(re?Fe(ie):We());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Me()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Me(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:K,size:U,readOnly:X,auto:Se,className:`${X?"":"pr-8 "}text-left ${P}`.trim()}),children:J?
|
|
16
|
+
/* @__PURE__ */I("span",{className:"flex min-w-0 items-center gap-1",children:[Xe,
|
|
17
|
+
/* @__PURE__ */O("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Xe}),J&&/* @__PURE__ */O("span",{id:De,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */O("span",{id:Te,hidden:!0,children:ge.settingView.auto}),!X&&/* @__PURE__ */O(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */I("select",{ref:te,value:l,multiple:W||void 0,onChange:e=>Ce(W?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:A,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!W&&/* @__PURE__ */O("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */O(R,{items:k})]}),re&&H(qe,document.body)]})}),P=k(function({touchSize:e,...t},r){const n=u(),i=e??"touch";return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */O(z,{ref:r,...t,size:i}):/* @__PURE__ */O(K,{ref:r,...t}):/* @__PURE__ */O(K,{ref:r,...t,size:i})});export{z as NativeSelect,P as Select_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-
|
|
2
|
-
return l(o,{labels:
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-OPB3I4JH.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-X2PZMXDP.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const L=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),A=x??(t=>m(t,v)),M=g??L.countAxis,N=k??L.distribution,P=h??r(c??[],s),C=a(0,b,f),R=P.map(t=>w(t.from)),T=P.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:R,values:T,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:A,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:L.histogram(N,P.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${w(P[o].from)} – ${w(P[o].to)}`,rows:[{key:"count",label:L.observations,color:C,value:A(P[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:P.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:C,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-RKFEJ5CX.js";import{Button_default as n}from"./chunk-NHH2MXFU.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ListLoadError as default}from"../chunk-
|
|
1
|
+
export{ListLoadError as default}from"../chunk-BNQRPLBW.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/format/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{
|
|
1
|
+
export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{contrastRatio,hexToRgb,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-
|
|
2
|
+
export{BORDER_LINE_STYLES,borderSides,borderStartEach,BorderInput as default}from"../chunk-FFASZGNZ.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-NW7Z3G7P.js";import"../chunk-7JGR7WPD.js";import"../chunk-5VDT4762.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{BrandAssetEditor as default}from"../chunk-
|
|
2
|
+
export{BrandAssetEditor as default}from"../chunk-K7PCBUDC.js";import"../chunk-UP442DPT.js";import"../chunk-QSW3YHPK.js";import"../chunk-6KBDNYRW.js";import"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";import"../chunk-MI67DI3H.js";import"../chunk-25RR3GQW.js";import"../chunk-B7HW6XZD.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/Calendar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{Calendar as default,fromKey,toKey}from"../chunk-
|
|
2
|
+
export{Calendar as default,fromKey,toKey}from"../chunk-FS2KWQJW.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-D65T4H6J.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-
|
|
2
|
+
export{ColorPickerPanel,ColorSwatch,HexInput,NO_COLOR_FILL,clampOpacity,colorFill,colorSwatchClasses,ColorPicker as default,stepHue,stepOpacity,stepSquare}from"../chunk-NW7Z3G7P.js";import"../chunk-7JGR7WPD.js";import"../chunk-5VDT4762.js";import"../chunk-2NMW66P5.js";import"../chunk-S6OB6HJB.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-
|
|
2
|
+
export{AttachButton,AttachmentDropZone,AttachmentList,PaperclipGlyph,ComposerAttachments as default}from"../chunk-GGIFS34Z.js";import"../chunk-B7HW6XZD.js";import"../chunk-EQN65XOO.js";import"../chunk-RUTUVS4H.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-NHH2MXFU.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CornersInput as default}from"../chunk-
|
|
2
|
+
export{CornersInput as default}from"../chunk-Y23TGQFN.js";import"../chunk-5VDT4762.js";import"../chunk-2NMW66P5.js";import"../chunk-AYZY3YNC.js";import"../chunk-RUTUVS4H.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/DatePicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{DatePicker_default as default}from"../chunk-
|
|
2
|
+
export{DatePicker_default as default}from"../chunk-Q5YM65DZ.js";import"../chunk-R4Q5653D.js";import"../chunk-FS2KWQJW.js";import"../chunk-AYZY3YNC.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{DateRangePicker as default,presetRange,toISODate}from"../chunk-
|
|
2
|
+
export{DateRangePicker as default,presetRange,toISODate}from"../chunk-R4Q5653D.js";import"../chunk-FS2KWQJW.js";import"../chunk-AYZY3YNC.js";import"../chunk-5OTS2G3M.js";import"../chunk-36BRD5J3.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{DisplayChips as default}from"../chunk-
|
|
2
|
+
export{DisplayChips as default}from"../chunk-KZQAGXME.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/FilePicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{FilePicker_default as default}from"../chunk-
|
|
2
|
+
export{FilePicker_default as default}from"../chunk-7TONF2PM.js";import"../chunk-6KBDNYRW.js";import"../chunk-B7HW6XZD.js";import"../chunk-EQN65XOO.js";import"../chunk-P6LB3I3D.js";import"../chunk-LNARMEEZ.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/forms/IconPicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{IconPicker as default}from"../chunk-
|
|
2
|
+
export{IconPicker as default}from"../chunk-BDFZNLFQ.js";import"../chunk-7JGR7WPD.js";import"../chunk-RUTUVS4H.js";import"../chunk-CDAJKLGL.js";import"../chunk-UQYNPYF4.js";import"../chunk-KKSVRIMP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";import"../chunk-BCDG4N6L.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|