efficient-shell 11.11.0 → 11.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-NRGJ53ST.js → Browser-LPGSKKLU.js} +14 -14
- package/dist/Calculator-XUV5JV3O.js +29 -0
- package/dist/{CurrencyConverter-CJQMDBQW.js → CurrencyConverter-N2HQT7IR.js} +9 -9
- package/dist/{Documents-FIGKS36O.js → Documents-IRPS3N5T.js} +23 -23
- package/dist/Files-VN2IOPHX.js +88 -0
- package/dist/{Notepad-2XW63REV.js → Notepad-JCWNOQET.js} +9 -9
- package/dist/{PomodoroTimer-Y5GQX37J.js → PomodoroTimer-356JUEM3.js} +21 -21
- package/dist/{Preview-K7KDM4XK.js → Preview-X7XNDI6X.js} +23 -23
- package/dist/Sidebar-OZMJNAXN.js +44 -0
- package/dist/{Spreadsheet-RQE4OCEK.js → Spreadsheet-YQOVGIU7.js} +33 -33
- package/dist/{Stock-IHAG62QV.js → Stock-2XOOZNRR.js} +3 -3
- package/dist/{Weather-EQDFEBIH.js → Weather-ZDU2722T.js} +16 -16
- package/dist/{WorldClock-VQG7G2Z2.js → WorldClock-PQGERFCH.js} +5 -5
- package/dist/ai/index.js +91 -91
- package/dist/apps/index.d.ts +21 -2
- 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/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.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-QOJ2UNS5.js → chunk-34AHNPW7.js} +1 -1
- package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
- package/dist/{chunk-PDXOGPWH.js → chunk-3N2MNOV5.js} +1 -1
- package/dist/{chunk-3JCOD5L2.js → chunk-4APQHXLI.js} +2 -2
- package/dist/{chunk-IEOCUEJK.js → chunk-4EVYK6DR.js} +7 -7
- package/dist/{chunk-7IVTGOGM.js → chunk-4JJ5WT4D.js} +1 -1
- package/dist/{chunk-3ZRYKZGI.js → chunk-4TB4CSLB.js} +4 -4
- package/dist/{chunk-KZEIQO3V.js → chunk-5IESW4PM.js} +5 -5
- package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
- package/dist/chunk-5W3U3EVG.js +7 -0
- package/dist/chunk-64KZ74CS.js +8 -0
- package/dist/{chunk-QAIMZN7M.js → chunk-6ETRVCMH.js} +13 -13
- package/dist/{chunk-SGBR443F.js → chunk-6S6FJJKP.js} +6 -6
- package/dist/{chunk-M57KX3OM.js → chunk-6UJYRGWY.js} +1 -1
- package/dist/{chunk-K6D7OSKZ.js → chunk-6WPKLF6G.js} +14 -14
- package/dist/{chunk-UWJNQH2X.js → chunk-7A2Y3W55.js} +1 -1
- package/dist/{chunk-ZOQXFS3R.js → chunk-7FCIFHO7.js} +1 -1
- package/dist/chunk-7TVGP2SX.js +8 -0
- package/dist/{chunk-2HAJ33HM.js → chunk-AD27M3ZH.js} +2 -2
- package/dist/{chunk-AQGIK2CV.js → chunk-AO7XAAGG.js} +1 -1
- package/dist/chunk-AQ7CNPEE.js +15 -0
- package/dist/chunk-BOJEZKYS.js +14 -0
- package/dist/{chunk-3X2W7R5B.js → chunk-BPJ3CQH7.js} +9 -9
- package/dist/chunk-CGA6RTVI.js +9 -0
- package/dist/{chunk-CT7AU2TA.js → chunk-CR3YDABU.js} +1 -1
- package/dist/{chunk-TXKTITMF.js → chunk-CR42APAY.js} +5 -5
- package/dist/{chunk-MQE2FBJU.js → chunk-CXZ7PHHF.js} +5 -5
- package/dist/{chunk-V64CJHMY.js → chunk-D5MN3LXC.js} +19 -19
- package/dist/{chunk-6LK2BBCC.js → chunk-DMBA6KYQ.js} +5 -5
- package/dist/{chunk-ALJS3SYS.js → chunk-DXKXETTT.js} +1 -1
- package/dist/chunk-EBGOENC3.js +3 -0
- package/dist/{chunk-6DQANKTL.js → chunk-ELIWGIR7.js} +7 -7
- package/dist/chunk-EOVXFXVV.js +2 -0
- package/dist/{chunk-CSLMWGFS.js → chunk-EQ72AP5E.js} +1 -1
- package/dist/chunk-ES2LUEPN.js +22 -0
- package/dist/{chunk-62BDGAML.js → chunk-F33L4J3P.js} +6 -6
- package/dist/{chunk-QEDVXD3L.js → chunk-FD6XZRWA.js} +1 -1
- package/dist/{chunk-X2DUOIJP.js → chunk-FEUTN4GK.js} +1 -1
- package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
- package/dist/chunk-FZWSP7KJ.js +28 -0
- package/dist/chunk-G3FHFWC2.js +4 -0
- package/dist/{chunk-42TLGG33.js → chunk-GJFTO7D4.js} +1 -1
- package/dist/{chunk-VEGZVUHE.js → chunk-GJVGGYQ2.js} +1 -1
- package/dist/{chunk-LGTYPLJM.js → chunk-GS74BABV.js} +3 -3
- package/dist/{chunk-LXOX5FGH.js → chunk-HGMQOHMK.js} +2 -2
- package/dist/{chunk-CG5X5ZLV.js → chunk-HJM4LSMM.js} +1 -1
- package/dist/{chunk-E3EHHR73.js → chunk-HOEEFFE3.js} +9 -9
- package/dist/{chunk-32EKHIAZ.js → chunk-HT7SOOMD.js} +12 -12
- package/dist/{chunk-R72ZKZDP.js → chunk-I5GDAQYL.js} +2 -2
- package/dist/{chunk-TA4JGC5C.js → chunk-IFWXC323.js} +1 -1
- package/dist/{chunk-5B4GRLAA.js → chunk-IJ6HZXZY.js} +1 -1
- package/dist/{chunk-UG42KUCT.js → chunk-IKKR2TYY.js} +4 -4
- package/dist/{chunk-OXCFRH33.js → chunk-JFCCI5L2.js} +1 -1
- package/dist/{chunk-CLAKVFOB.js → chunk-JGWUSJDD.js} +31 -31
- package/dist/{chunk-I5XNADZ3.js → chunk-JJLAI6GL.js} +8 -8
- package/dist/{chunk-F636NDAU.js → chunk-K3IUUZO5.js} +7 -7
- package/dist/{chunk-ZOQVYSTB.js → chunk-KV4QPU6U.js} +18 -18
- package/dist/{chunk-RNBC6V2D.js → chunk-L2IPWMLI.js} +3 -3
- package/dist/chunk-L74WV4RJ.js +6 -0
- package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
- package/dist/chunk-LJJ7FDAQ.js +6 -0
- package/dist/{chunk-3OHADZYV.js → chunk-LLSLY6BT.js} +1 -1
- package/dist/{chunk-CDQUOCXO.js → chunk-LP45EML2.js} +1 -1
- package/dist/{chunk-HRG4FYVU.js → chunk-LWFH5QTJ.js} +1 -1
- package/dist/{chunk-Q7DVGUML.js → chunk-LXBBJNBQ.js} +1 -1
- package/dist/{chunk-SWJXWDKX.js → chunk-M4AOQYSP.js} +1 -1
- package/dist/{chunk-RQBQETXQ.js → chunk-MD6EPKOR.js} +8 -8
- package/dist/{chunk-S43DAIIB.js → chunk-MFP5KOQW.js} +5 -5
- package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
- package/dist/{chunk-IUMFOSFJ.js → chunk-N75MPMLD.js} +3 -3
- package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
- package/dist/{chunk-C3UY34DC.js → chunk-NPT6EXHK.js} +4 -4
- package/dist/{chunk-57WQVUBX.js → chunk-OCWWEHNR.js} +2 -2
- package/dist/{chunk-PVOTOUJG.js → chunk-OMROEVOP.js} +1 -1
- package/dist/{chunk-VPEH3THH.js → chunk-P75N466Z.js} +3 -3
- package/dist/{chunk-AHITTM6W.js → chunk-PTVTNCD6.js} +1 -1
- package/dist/chunk-Q7UTGO73.js +11 -0
- package/dist/{chunk-3VR5BOD4.js → chunk-QDL2FNP7.js} +2 -2
- package/dist/{chunk-ATKFIHDP.js → chunk-RBAC26J7.js} +4 -4
- package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
- package/dist/{chunk-63545Z3N.js → chunk-RXVFAFEB.js} +1 -1
- package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
- package/dist/chunk-SI33IE7G.js +2 -0
- package/dist/{chunk-ESWR7YNY.js → chunk-SPMD7UZO.js} +3 -3
- package/dist/{chunk-A4YTWDKD.js → chunk-SSM6P43S.js} +1 -1
- package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
- package/dist/{chunk-EV7VAXMO.js → chunk-TTQJQKCE.js} +9 -9
- package/dist/chunk-UBQUXUD2.js +7 -0
- package/dist/{chunk-YUAF3FDE.js → chunk-UCAMOW53.js} +4 -4
- package/dist/{chunk-JG26ICX6.js → chunk-UEWB6IOD.js} +2 -2
- package/dist/{chunk-KKJ55GUZ.js → chunk-UHGAT5MH.js} +1 -1
- package/dist/{chunk-PZHO4FEN.js → chunk-UOGF37Z4.js} +1 -1
- package/dist/chunk-UZTKBA7Z.js +13 -0
- package/dist/{chunk-6LITLCVV.js → chunk-VEATEVMV.js} +3 -3
- package/dist/{chunk-K6LW2QLI.js → chunk-VIDT4JLR.js} +1 -1
- package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
- package/dist/chunk-WZJPASST.js +6 -0
- package/dist/{chunk-B2SLXCMY.js → chunk-XOH6QERF.js} +8 -8
- package/dist/chunk-YXSGMPNW.js +1 -0
- package/dist/{chunk-7R23EKON.js → chunk-ZA2RBNRA.js} +1 -1
- package/dist/{chunk-BDUXF7BT.js → chunk-ZHS2VQU7.js} +3 -3
- package/dist/{chunk-7HLBVMMQ.js → chunk-ZMC25LRC.js} +1 -1
- package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.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/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Segmented.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/index.js +378 -378
- package/dist/map/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.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/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.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.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-YZEGVEQ7.js +0 -29
- package/dist/Files-FPNJ46XY.js +0 -88
- package/dist/Sidebar-QP5Y7RBV.js +0 -44
- package/dist/chunk-2EPAXWZZ.js +0 -14
- package/dist/chunk-6FIYG7IH.js +0 -28
- package/dist/chunk-6R32KKIS.js +0 -22
- package/dist/chunk-7DI3VQCF.js +0 -2
- package/dist/chunk-B2MD232O.js +0 -6
- package/dist/chunk-EC22ACQZ.js +0 -11
- package/dist/chunk-FJBJUFD7.js +0 -4
- package/dist/chunk-GO6HU2O3.js +0 -7
- package/dist/chunk-H56TNUV4.js +0 -1
- package/dist/chunk-IGQZANYE.js +0 -15
- package/dist/chunk-MQ445O4X.js +0 -6
- package/dist/chunk-NMTS2L2B.js +0 -8
- package/dist/chunk-ODQYWMDF.js +0 -3
- package/dist/chunk-OPZXVXX5.js +0 -7
- package/dist/chunk-OZM6DE7A.js +0 -8
- package/dist/chunk-PMA6DZ4Q.js +0 -6
- package/dist/chunk-SCZUDGRZ.js +0 -2
- package/dist/chunk-SUYQ7QYB.js +0 -13
- package/dist/chunk-VEZHFONL.js +0 -9
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-MXK7A6ZM.js";export{FormLayoutPage}from"../chunk-X2DUOIJP.js";export{GalleryTemplate}from"../chunk-UWJNQH2X.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"../chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-4MVRSCQE.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{AuthScreen}from"../chunk-42TLGG33.js";export{ChatTemplate}from"../chunk-7HLBVMMQ.js";export{CheckoutTemplate}from"../chunk-TA4JGC5C.js";export{DashboardTemplate}from"../chunk-K6LW2QLI.js";export{DataTablePage}from"../chunk-PVOTOUJG.js";export{EmailTemplate}from"../chunk-7IVTGOGM.js";export{ErrorBoundary}from"../chunk-AQGIK2CV.js";export{ErrorPage}from"../chunk-O6VIHWYU.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-RQDVAUXD.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-FRH2AHPI.js";export{TopNav}from"../chunk-ZOQXFS3R.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-6LK2BBCC.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-6C6M3QXL.js";export{Stepper}from"../chunk-TZXAW32T.js";export{SettingReset}from"../chunk-C3UY34DC.js";export{SettingRow}from"../chunk-FFNPAJLS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-SGBR443F.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-KZEIQO3V.js";import"../chunk-QWK6DRSN.js";export{MetricBar}from"../chunk-GRC46C4V.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-PL4HKGYP.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-KU4IWX6F.js";export{PageHeader}from"../chunk-WOOKUEED.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-VU5P4ZM5.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-HDABS36W.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{ResizeHandle}from"../chunk-JG26ICX6.js";export{HelpCenter}from"../chunk-I5XNADZ3.js";export{IconRail,IconRailButton}from"../chunk-M57KX3OM.js";import"../chunk-FQEALPZJ.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-OXCFRH33.js";export{EditableGrid}from"../chunk-EV7VAXMO.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-RNBC6V2D.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{Card,StatCard}from"../chunk-WEEQDPU3.js";export{ContainerFillChart}from"../chunk-T74FGTLW.js";export{CountBadge}from"../chunk-VVDK7XPH.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-UVMM7AYO.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-AWQ5SOC5.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-Q7DVGUML.js";export{Avatar,AvatarGroup}from"../chunk-SEP35R2E.js";export{BudgetBar,budgetState}from"../chunk-5UCRYSQJ.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-T23TIJ4P.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TagInput}from"../chunk-TXKTITMF.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-PMA6DZ4Q.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-2XORVHF2.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2ZAFRGRF.js";export{WidthsBar}from"../chunk-MQ445O4X.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-LXOX5FGH.js";export{Slider,SliderGroup}from"../chunk-YUAF3FDE.js";export{Snippet}from"../chunk-MQE2FBJU.js";export{SplitButton_default as SplitButton}from"../chunk-ODQYWMDF.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{NumericKeypad}from"../chunk-7R23EKON.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-DANLBFBD.js";export{PositionInput}from"../chunk-CG5X5ZLV.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"../chunk-IEOCUEJK.js";export{SearchableSelect}from"../chunk-SUYQ7QYB.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"../chunk-6FIYG7IH.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-3X2W7R5B.js";import"../chunk-CDQUOCXO.js";export{ImageLightbox,lightboxKind}from"../chunk-RQBQETXQ.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{Drawer}from"../chunk-2NRNKF46.js";export{EmptyState}from"../chunk-YQLKZ5UQ.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Breadcrumbs}from"../chunk-IUG4Z2ND.js";export{mediaLibraryMenu}from"../chunk-R6TDZ7T5.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-UTITWGVW.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-6DQANKTL.js";export{MediaUsedInList}from"../chunk-CSLMWGFS.js";export{RenameField}from"../chunk-ALJS3SYS.js";export{NativeSelect,Select_default as Select}from"../chunk-ESWR7YNY.js";import"../chunk-EO5RLFRX.js";import"../chunk-HJBR73GS.js";export{DatePicker_default as DatePicker}from"../chunk-B2AYI45X.js";export{DateRangePicker,toISODate}from"../chunk-ZOQVYSTB.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-PVVHWLNX.js";export{DisplayChips}from"../chunk-SWJXWDKX.js";export{FilePicker_default as FilePicker}from"../chunk-A4YTWDKD.js";export{FormErrorSummary}from"../chunk-NMQGAP3H.js";export{BrandAssetEditor}from"../chunk-62BDGAML.js";export{MediaUploadField}from"../chunk-S43DAIIB.js";export{ImageFocusPoint}from"../chunk-VZ52KKNA.js";export{Segmented}from"../chunk-JQBVSPF5.js";import"../chunk-JDQGHQ2C.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar}from"../chunk-SKRFI6WB.js";export{CornersInput}from"../chunk-ATKFIHDP.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-SYZLS2JA.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-3JCOD5L2.js";export{IconPicker}from"../chunk-BDUXF7BT.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-32EKHIAZ.js";export{Popover}from"../chunk-7JGR7WPD.js";export{InputNumber_default as InputNumber}from"../chunk-R72ZKZDP.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{useSort}from"../chunk-E6FDUFPH.js";export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.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{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{DataTable}from"../chunk-K6D7OSKZ.js";export{Pagination}from"../chunk-225LCPO7.js";export{EntityList}from"../chunk-E3EHHR73.js";import"../chunk-JJZAYAVL.js";export{ResizableTable}from"../chunk-QAIMZN7M.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-KYHDDVTR.js";export{ListFooter}from"../chunk-D4RVWSUT.js";export{ListLoadError}from"../chunk-PZHO4FEN.js";export{TreemapChart}from"../chunk-OPZXVXX5.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-IUMFOSFJ.js";export{RankedBars}from"../chunk-PDFV3YQB.js";export{SankeyChart}from"../chunk-VEZHFONL.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-NMTS2L2B.js";export{StatTile}from"../chunk-RMSF4UCJ.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-FJBJUFD7.js";export{FunnelChart}from"../chunk-2EPAXWZZ.js";export{HeatmapChart}from"../chunk-EC22ACQZ.js";export{HistogramChart}from"../chunk-SCZUDGRZ.js";export{Meter}from"../chunk-LXQHTY3A.js";export{PieChart}from"../chunk-B2SLXCMY.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-IGQZANYE.js";export{RadialBarChart}from"../chunk-F636NDAU.js";export{RangeChart}from"../chunk-B2MD232O.js";export{ChordChart}from"../chunk-OZM6DE7A.js";import"../chunk-EYPKBJYG.js";export{StepChain,StepChainItem}from"../chunk-SAASFWKB.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-63545Z3N.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Q5Z3KHT2.js";export{ContextMenu,useContextMenu}from"../chunk-57WQVUBX.js";export{Banner}from"../chunk-IIKPM3F4.js";export{Input_default as Input}from"../chunk-LGTYPLJM.js";export{DropdownMenu}from"../chunk-GO6HU2O3.js";import"../chunk-QOJ2UNS5.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-KKJ55GUZ.js";export{mediaFileName}from"../chunk-VEGZVUHE.js";export{TransferProgress}from"../chunk-AHITTM6W.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{IconButton_default as IconButton}from"../chunk-VCMHBUKI.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-ZKBGUDNB.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-HRG4FYVU.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-6R32KKIS.js";export{ChartBrush}from"../chunk-JRCFOZEU.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-NTUZT37J.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-UG42KUCT.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-5KKJAYKT.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-PMKBWDXO.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-2XOH3NJZ.js";export{Dialog}from"../chunk-R7KRBKFH.js";export{ItemCount}from"../chunk-PDXOGPWH.js";import"../chunk-3DVNXNTF.js";import"../chunk-YOXR3VKO.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-CT7AU2TA.js";import"../chunk-3PZI2C4R.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-KVVZLEUG.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";import"../chunk-F3ZOO23R.js";export{VERSION}from"../chunk-H56TNUV4.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-JPNAEN53.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-3ZRYKZGI.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-7DI3VQCF.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-XWFLIGDQ.js";export{Icon}from"../chunk-7V32O5NF.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-CJH2BGXY.js";export{Tooltip}from"../chunk-QQ2LDC6C.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-6LITLCVV.js";export{CandlestickChart}from"../chunk-VPEH3THH.js";export{CartesianPlot}from"../chunk-3VR5BOD4.js";import"../chunk-Y4RHGLXB.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{ChartTooltip}from"../chunk-WDQI3FV6.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-5YP7MFPK.js";import"../chunk-C3QOHMR6.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
|
|
2
|
+
import"../chunk-MXK7A6ZM.js";export{FormLayoutPage}from"../chunk-FEUTN4GK.js";export{GalleryTemplate}from"../chunk-7A2Y3W55.js";export{ACCENT_ROLES,COLOUR_ROLES,FLAT_STATUS_ROLES,IDENTITY_ROLES,NEUTRAL_ROLES,SCRIM_ROLES,STATUS_GROUPS,STATUS_ROLES}from"../chunk-VVJIKS47.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-4MVRSCQE.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{AuthScreen}from"../chunk-GJFTO7D4.js";export{ChatTemplate}from"../chunk-ZMC25LRC.js";export{CheckoutTemplate}from"../chunk-IFWXC323.js";export{DashboardTemplate}from"../chunk-VIDT4JLR.js";export{DataTablePage}from"../chunk-OMROEVOP.js";export{EmailTemplate}from"../chunk-4JJ5WT4D.js";export{ErrorBoundary}from"../chunk-AO7XAAGG.js";export{ErrorPage}from"../chunk-O6VIHWYU.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-N5KO2IHG.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-FRH2AHPI.js";export{TopNav}from"../chunk-7FCIFHO7.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-DMBA6KYQ.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-6C6M3QXL.js";export{Stepper}from"../chunk-TZXAW32T.js";export{SettingReset}from"../chunk-NPT6EXHK.js";export{SettingRow}from"../chunk-FFNPAJLS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-6S6FJJKP.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-5IESW4PM.js";import"../chunk-QWK6DRSN.js";export{MetricBar}from"../chunk-GRC46C4V.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-PL4HKGYP.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-KU4IWX6F.js";export{PageHeader}from"../chunk-WOOKUEED.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-VU5P4ZM5.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-HDABS36W.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{ResizeHandle}from"../chunk-UEWB6IOD.js";export{HelpCenter}from"../chunk-JJLAI6GL.js";export{IconRail,IconRailButton}from"../chunk-6UJYRGWY.js";import"../chunk-FQEALPZJ.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-JFCCI5L2.js";export{EditableGrid}from"../chunk-TTQJQKCE.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-L2IPWMLI.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{Card,StatCard}from"../chunk-WEEQDPU3.js";export{ContainerFillChart}from"../chunk-T74FGTLW.js";export{CountBadge}from"../chunk-VVDK7XPH.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-UVMM7AYO.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-AWQ5SOC5.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-LXBBJNBQ.js";export{Avatar,AvatarGroup}from"../chunk-SEP35R2E.js";export{BudgetBar,budgetState}from"../chunk-5UCRYSQJ.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-T23TIJ4P.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TagInput}from"../chunk-CR42APAY.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-L74WV4RJ.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-2XORVHF2.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2ZAFRGRF.js";export{WidthsBar}from"../chunk-WZJPASST.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-HGMQOHMK.js";export{Slider,SliderGroup}from"../chunk-UCAMOW53.js";export{Snippet}from"../chunk-CXZ7PHHF.js";export{SplitButton_default as SplitButton}from"../chunk-EBGOENC3.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{NumericKeypad}from"../chunk-ZA2RBNRA.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-ZRLWE3JM.js";export{PositionInput}from"../chunk-HJM4LSMM.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"../chunk-4EVYK6DR.js";export{SearchableSelect}from"../chunk-UZTKBA7Z.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"../chunk-FZWSP7KJ.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-BPJ3CQH7.js";import"../chunk-LP45EML2.js";export{ImageLightbox,lightboxKind}from"../chunk-MD6EPKOR.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{Drawer}from"../chunk-2NRNKF46.js";export{EmptyState}from"../chunk-YQLKZ5UQ.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Breadcrumbs}from"../chunk-IUG4Z2ND.js";export{mediaLibraryMenu}from"../chunk-R6TDZ7T5.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-UTITWGVW.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-ELIWGIR7.js";export{MediaUsedInList}from"../chunk-EQ72AP5E.js";export{RenameField}from"../chunk-DXKXETTT.js";export{NativeSelect,Select_default as Select}from"../chunk-SPMD7UZO.js";import"../chunk-EO5RLFRX.js";import"../chunk-HJBR73GS.js";export{DatePicker_default as DatePicker}from"../chunk-B2AYI45X.js";export{DateRangePicker,toISODate}from"../chunk-KV4QPU6U.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-PVVHWLNX.js";export{DisplayChips}from"../chunk-M4AOQYSP.js";export{FilePicker_default as FilePicker}from"../chunk-SSM6P43S.js";export{FormErrorSummary}from"../chunk-NMQGAP3H.js";export{BrandAssetEditor}from"../chunk-F33L4J3P.js";export{MediaUploadField}from"../chunk-MFP5KOQW.js";export{ImageFocusPoint}from"../chunk-VZ52KKNA.js";export{Segmented}from"../chunk-S4FPYCUU.js";import"../chunk-JDQGHQ2C.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar}from"../chunk-SKRFI6WB.js";export{CornersInput}from"../chunk-RBAC26J7.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-RDKIYORS.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-4APQHXLI.js";export{IconPicker}from"../chunk-ZHS2VQU7.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-HT7SOOMD.js";export{Popover}from"../chunk-7JGR7WPD.js";export{InputNumber_default as InputNumber}from"../chunk-I5GDAQYL.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{useSort}from"../chunk-E6FDUFPH.js";export{slugify}from"../chunk-24AL3CDS.js";export{ENTRANCE_ATTR,ENTRANCE_FROM,ENTRANCE_FROM_ATTR,ENTRANCE_FROM_DEFAULT,ENTRANCE_KINDS,ENTRANCE_KINDS_WITH_FROM,ENTRANCE_STATE_ATTR,armEntrance,entranceAttrs,playEntrance,readEntrance}from"../chunk-Q2SCJQ5H.js";export{HOVER_MOTION,MOTION_EASING,MOTION_GROUPS,MOTION_TIMING,motionSeconds,rotateDegrees}from"../chunk-AIJ3G6BD.js";export{hexWithAlpha,mixHex,rgbToHex}from"../chunk-CJSZW3OS.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{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-6WPKLF6G.js";export{Pagination}from"../chunk-225LCPO7.js";export{EntityList}from"../chunk-HOEEFFE3.js";import"../chunk-JJZAYAVL.js";export{ResizableTable}from"../chunk-6ETRVCMH.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-KYHDDVTR.js";export{ListFooter}from"../chunk-D4RVWSUT.js";export{ListLoadError}from"../chunk-UOGF37Z4.js";export{WaterfallChart}from"../chunk-N75MPMLD.js";export{SankeyChart}from"../chunk-CGA6RTVI.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-64KZ74CS.js";export{StatTile}from"../chunk-RMSF4UCJ.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-G3FHFWC2.js";export{TreemapChart}from"../chunk-5W3U3EVG.js";export{squarify}from"../chunk-46BYGPGD.js";export{HeatmapChart}from"../chunk-Q7UTGO73.js";export{HistogramChart}from"../chunk-SI33IE7G.js";export{Meter}from"../chunk-LXQHTY3A.js";export{PieChart}from"../chunk-XOH6QERF.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-AQ7CNPEE.js";export{RadialBarChart}from"../chunk-K3IUUZO5.js";export{RangeChart}from"../chunk-LJJ7FDAQ.js";export{RankedBars}from"../chunk-PDFV3YQB.js";export{ChordChart}from"../chunk-7TVGP2SX.js";import"../chunk-5PP435FL.js";export{FunnelChart}from"../chunk-BOJEZKYS.js";export{StepChain,StepChainItem}from"../chunk-SAASFWKB.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-RXVFAFEB.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Q5Z3KHT2.js";export{ContextMenu,useContextMenu}from"../chunk-OCWWEHNR.js";export{Banner}from"../chunk-IIKPM3F4.js";export{Input_default as Input}from"../chunk-GS74BABV.js";export{DropdownMenu}from"../chunk-UBQUXUD2.js";import"../chunk-34AHNPW7.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-UHGAT5MH.js";export{mediaFileName}from"../chunk-GJVGGYQ2.js";export{TransferProgress}from"../chunk-PTVTNCD6.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{IconButton_default as IconButton}from"../chunk-LE5LWALR.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-ZKBGUDNB.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-LWFH5QTJ.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-GEYM4WN3.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-Y3JW2GW5.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-ES2LUEPN.js";export{ChartBrush}from"../chunk-JRCFOZEU.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-NTUZT37J.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-IKKR2TYY.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-5KKJAYKT.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-PMKBWDXO.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-2XOH3NJZ.js";export{Dialog}from"../chunk-R7KRBKFH.js";export{ItemCount}from"../chunk-3N2MNOV5.js";import"../chunk-3DVNXNTF.js";import"../chunk-YOXR3VKO.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-CR3YDABU.js";import"../chunk-3PZI2C4R.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-KVVZLEUG.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";import"../chunk-F3ZOO23R.js";export{VERSION}from"../chunk-YXSGMPNW.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-FZM3ZPW3.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-4TB4CSLB.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-EOVXFXVV.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-TE6R53YD.js";export{Icon}from"../chunk-7V32O5NF.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-WGLHB6WE.js";export{Tooltip}from"../chunk-NJN5IKWO.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{BoxPlotChart}from"../chunk-VEATEVMV.js";export{CandlestickChart}from"../chunk-P75N466Z.js";export{ChartTooltip}from"../chunk-36VIGB6J.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";export{CartesianPlot}from"../chunk-QDL2FNP7.js";import"../chunk-Y4RHGLXB.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-5YP7MFPK.js";import"../chunk-C3QOHMR6.js";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APP_VERSION,VERSION}from"./chunk-
|
|
1
|
+
export{APP_VERSION,VERSION}from"./chunk-YXSGMPNW.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.12.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-QEDVXD3L.js";import{useWidgetSettings as n}from"./chunk-CLAKVFOB.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-PDXOGPWH.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CT7AU2TA.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-JPNAEN53.js";import"./chunk-CDAJKLGL.js";import"./chunk-3ZRYKZGI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7DI3VQCF.js";import"./chunk-UQYNPYF4.js";import"./chunk-XWFLIGDQ.js";import{Icon as r}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[y,C]=c(""),[x,f]=c([]),[v,$]=c(!1),[D,T]=c(()=>e(h)),[F,W]=c(!1),[E,X]=c(D),J=i(null);n(o(()=>{X({...D}),W(!0)},[D]));const K=o(e=>{C(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),L=o(()=>{k("0"),d(null),g(null),N(!1)},[]),P=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),w=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=P(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,P]),A=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=P(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,P]),O=o(()=>{k(e=>String(parseFloat(e)/100))},[]),Q=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?K(e.key):"."===e.key?K("."):"+"===e.key?w("+"):"-"===e.key?w("-"):"*"===e.key?w("×"):"/"===e.key?(e.preventDefault(),w("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&J.current?.contains(e.target)&&e.preventDefault(),A()):"Escape"===e.key?L():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&O())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[K,w,A,L,O]);const R="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",B=`${R} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,S=`${R} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,G=`${R} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,H=`${R} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return l(a,{children:[
|
|
3
|
-
/* @__PURE__ */l("div",{ref:J,className:"flex flex-col h-full",style:{opacity:D.activeOpacity/100,backdropFilter:D.activeBlur>0?`blur(${D.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:x.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${j?"":m}`}),
|
|
6
|
-
/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
|
|
9
|
-
/* @__PURE__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:L,className:G,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:Q,className:G,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:O,className:G,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>w("÷"),className:`${S} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>K("7"),className:B,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>K("8"),className:B,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>K("9"),className:B,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>w("×"),className:`${S} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>K("4"),className:B,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>K("5"),className:B,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>K("6"),className:B,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>w("-"),className:`${S} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>K("1"),className:B,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>K("2"),className:B,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>K("3"),className:B,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>w("+"),className:`${S} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>K("0"),className:`${B} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>K("."),className:B,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:A,className:H,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:F,onClose:()=>W(!1),title:"Calculator Settings",appearance:E,onAppearanceChange:X,onSave:()=>{T(E),localStorage.setItem(h,JSON.stringify(E)),W(!1)}})]})}export{m as default};
|
package/dist/Files-FPNJ46XY.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-DHMOJX2Z.js";import{SidebarLayout as t}from"./chunk-SGBR443F.js";import"./chunk-QWK6DRSN.js";import"./chunk-JG26ICX6.js";import{Breadcrumbs as n}from"./chunk-IUG4Z2ND.js";import{formatBytes as a}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as r}from"./chunk-FUHURDBL.js";import{AboutApp as i}from"./chunk-2HAJ33HM.js";import{peekFilesViewRequest as s,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-2E3K4FSQ.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-CLAKVFOB.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import{confirm as k,prompt as g}from"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import{ItemCount as b}from"./chunk-PDXOGPWH.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CT7AU2TA.js";import"./chunk-3PZI2C4R.js";import{toast_default as y}from"./chunk-KVVZLEUG.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-H56TNUV4.js";import"./chunk-JPNAEN53.js";import"./chunk-CDAJKLGL.js";import"./chunk-3ZRYKZGI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7DI3VQCF.js";import"./chunk-UQYNPYF4.js";import"./chunk-XWFLIGDQ.js";import{Icon as N}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as w}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import{TH_ONE_LINE as v}from"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useState as j,useEffect as $,useSyncExternalStore as C,useRef as D,useCallback as L}from"react";import{jsxs as T,jsx as R,Fragment as E}from"react/jsx-runtime";var F="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",P={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function W(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function U(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function M(){const M=F.replace(/\/$/,""),O=null!==r(),[S,A]=j("/"),[I,J]=j([]),[V,H]=j([]),[K,B]=j(null),[G,X]=j(!0),[Q,Z]=j(!1),[Y,z]=j(null),[_,q]=j(!1),[ee,te]=j(()=>{const e=s();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});$(()=>{o()},[]);const[ne,ae]=j([]);$(()=>{const e=()=>{o(),te("trash")},t=e=>{o();const t=e.detail?.folderId;t&&te({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const re=C(d,m,m),ie="object"==typeof ee?ee.desktopFolderId:null,se=ie?re?.folders.find(e=>e.id===ie)??null:null,oe=ie&&re?.itemsByFolder[ie]||[];$(()=>{ie&&re&&!re.folders.some(e=>e.id===ie)&&te("files")},[ie,re]);const le=D(0),ce=D(null),{openPage:de,openEntity:me}=f(),he=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>de(e)}):"page"===t.entityType?de(t.entityId):me(t.entityType,t.entityId,null,t.label)},pe=L((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),ue=L(async()=>{try{const e=await pe(`${M}/api/quota`);if(e.ok){const t=await e.json();z({used:t.used,limit:t.limit})}}catch{}},[pe,M]),fe=L(async e=>{if(B(null),O){const t=function(e){const t=r();if(!t)return[];let n=t;for(const t of e.split("/").filter(Boolean)){const e=n.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];n=e.children}return n.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return J(t),A(e),Z(!1),X(!1),void("/"===e&&H(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}X(!0);try{const t=await pe(`${M}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Failed to list (${t.status})`)}const n=await t.json(),a=n.entries||[];J(a),A(n.path||e),Z(!1),"/"===(n.path||e)&&H(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){Z(!0)}finally{X(!1)}ue()},[pe,M,ue,O]),xe=L(async()=>{if(O)return ae([]),void X(!1);X(!0),B(null);try{const e=await pe(`${M}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void y.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ae(t.entries||[]),Z(!1)}catch{Z(!0)}finally{X(!1)}ue()},[pe,M,ue,O]);$(()=>{"files"===ee?fe(S):"trash"===ee&&xe()},[S,ee]);const ke=async e=>{const t=W(S,e.name);try{const n=await pe(`${M}/api/file?path=${encodeURIComponent(t)}`);if(!n.ok)return void y.error(`Download failed (${n.status})`);const a=await n.blob(),r=URL.createObjectURL(a),i=document.createElement("a");i.href=r,i.download=e.name,i.click(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(e){y.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const n=await pe(`${M}/api/upload?path=${encodeURIComponent(S)}`,{method:"POST",body:t});if(!n.ok){const t=await n.json().catch(()=>({}));if(413===n.status){const n=Math.max(0,(t.limit||0)-(t.used||0));y.error(`Quota exceeded — ${a(n)} free, ${e.name} is ${a(t.attempted||e.size)}`)}else y.error(`Upload ${e.name}: ${t.error||n.status}`)}}catch(t){y.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}fe(S)},be=()=>{le.current=0,q(!1)};if($(()=>{const e=()=>be();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),Q)/* @__PURE__ */
|
|
2
|
-
return T("div",{className:"flex flex-col h-full bg-white",children:[
|
|
3
|
-
/* @__PURE__ */R(x,{title:"Files - offline"}),
|
|
4
|
-
/* @__PURE__ */R("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */T("div",{className:"max-w-md",children:[
|
|
5
|
-
/* @__PURE__ */R(N,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
|
|
6
|
-
/* @__PURE__ */R("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
|
|
7
|
-
/* @__PURE__ */T("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
|
|
8
|
-
/* @__PURE__ */R("span",{className:"font-mono",children:M}),". Make sure the server is running — see ",
|
|
9
|
-
/* @__PURE__ */R("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
|
|
10
|
-
/* @__PURE__ */R("button",{onClick:()=>fe(S),className:"px-3 h-8 text-sm bg-blue-500 text-on-accent rounded hover:bg-blue-600",children:"Retry"})]})})]});const ye="/"===S?[]:S.split("/").filter(Boolean),Ne=Y&&Y.limit>0?Math.min(100,Math.round(Y.used/Y.limit*100)):0,we=Ne>90?"bg-red-500":Ne>75?"bg-amber-500":"bg-blue-500",ve=[{label:"My files",onClick:()=>A("/")},...ye.map((e,t)=>({label:e,onClick:()=>A("/"+ye.slice(0,t+1).join("/"))}))],je=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),$e=e=>/* @__PURE__ */R("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),Ce=/* @__PURE__ */T("nav",{className:"p-2",children:[
|
|
11
|
-
/* @__PURE__ */R("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Locations"}),
|
|
12
|
-
/* @__PURE__ */T("button",{onClick:()=>{te("files"),A("/")},className:je("files"===ee&&"/"===S),children:[$e("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),V.map(e=>/* @__PURE__ */T("button",{onClick:()=>{te("files"),A("/"+e)},className:je("files"===ee&&S==="/"+e),children:[$e("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
|
|
13
|
-
/* @__PURE__ */R("span",{className:"truncate",children:e})]},e)),!O&&/* @__PURE__ */T("button",{onClick:()=>te("trash"),className:je("trash"===ee),children:[$e("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),re&&re.folders.length>0&&/* @__PURE__ */T(E,{children:[
|
|
14
|
-
/* @__PURE__ */R("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),re.folders.map(e=>/* @__PURE__ */T("button",{onClick:()=>te({desktopFolderId:e.id}),className:je(ie===e.id),children:[
|
|
15
|
-
/* @__PURE__ */R(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
16
|
-
/* @__PURE__ */R("span",{className:"truncate",children:e.name}),
|
|
17
|
-
/* @__PURE__ */R(b,{count:e.itemCount,active:ie===e.id,className:"ml-auto"})]},e.id))]})]});/* @__PURE__ */
|
|
18
|
-
return T("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{O||"object"==typeof ee||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),le.current++,_||q(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{le.current>0&&le.current--,0===le.current&&q(!1)},onDrop:e=>{e.preventDefault(),be(),O||"object"==typeof ee||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
|
|
19
|
-
/* @__PURE__ */R(x,{title:se?`Files - ${se.name}`:"Files"+("/"===S?"":" - "+S)}),
|
|
20
|
-
/* @__PURE__ */R(i,{app:"files"}),
|
|
21
|
-
/* @__PURE__ */R("input",{ref:ce,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),ce.current&&(ce.current.value="")}}),
|
|
22
|
-
/* @__PURE__ */R("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */R(t,{sidebar:Ce,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */T("div",{className:"flex h-full min-w-0 flex-col",children:[
|
|
23
|
-
/* @__PURE__ */T("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0 text-xs",children:[/* @__PURE__ */T(E,"files"===ee?{children:[
|
|
24
|
-
/* @__PURE__ */R("button",{onClick:()=>A(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),n=t.lastIndexOf("/");return n<=0?"/":t.slice(0,n)}(S)),disabled:"/"===S,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
25
|
-
/* @__PURE__ */R("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */R(n,{items:ve,maxItems:5})}),
|
|
26
|
-
/* @__PURE__ */R("button",{onClick:()=>fe(S),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */R(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!O&&/* @__PURE__ */T(E,{children:[
|
|
27
|
-
/* @__PURE__ */T("button",{onClick:()=>te("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
|
|
28
|
-
/* @__PURE__ */R(N,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
|
|
29
|
-
/* @__PURE__ */T("button",{onClick:async()=>{const e=await g({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void y.error("Folder names cannot contain slashes");const t=W(S,e),n=await pe(`${M}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!n.ok){const e=await n.json().catch(()=>({}));return void y.error(e.error||`Create folder failed (${n.status})`)}fe(S)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
|
|
30
|
-
/* @__PURE__ */R(N,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
|
|
31
|
-
/* @__PURE__ */T("button",{onClick:()=>ce.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
|
|
32
|
-
/* @__PURE__ */R(N,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===ee?{children:[
|
|
33
|
-
/* @__PURE__ */R("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
34
|
-
/* @__PURE__ */R("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
|
|
35
|
-
/* @__PURE__ */R("button",{onClick:xe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */R(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
|
|
36
|
-
/* @__PURE__ */R("button",{onClick:async()=>{if(0===ne.length)return;if(!await k({title:"Empty trash",message:`${ne.length} item${1===ne.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await pe(`${M}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void y.error(t.error||`Empty trash failed (${e.status})`)}xe()},disabled:0===ne.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
|
|
37
|
-
/* @__PURE__ */R("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
38
|
-
/* @__PURE__ */R(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
|
|
39
|
-
/* @__PURE__ */R("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
|
|
40
|
-
/* @__PURE__ */R("span",{className:"text-2xs text-ink-faintest px-2",children:"Desktop shortcuts"})]}),Y&&/* @__PURE__ */T(E,{children:[
|
|
41
|
-
/* @__PURE__ */R("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
42
|
-
/* @__PURE__ */T("div",{className:"flex items-center gap-2",title:`${a(Y.used)} of ${a(Y.limit)} used`,children:[
|
|
43
|
-
/* @__PURE__ */R("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */R("div",{className:`h-full ${we} transition-all`,style:{width:`${Ne}%`}})}),
|
|
44
|
-
/* @__PURE__ */T("span",{className:"text-2xs text-ink-faint tabular-nums whitespace-nowrap",children:[a(Y.used)," / ",a(Y.limit)]})]})]})]}),
|
|
45
|
-
/* @__PURE__ */R("div",{className:"flex-1 overflow-auto",children:"object"==typeof ee?0===oe.length?/* @__PURE__ */R("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
46
|
-
/* @__PURE__ */R("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
47
|
-
/* @__PURE__ */R("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
48
|
-
/* @__PURE__ */R("th",{className:`${v} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
|
|
49
|
-
/* @__PURE__ */R("th",{className:`${v} w-56`})]})}),
|
|
50
|
-
/* @__PURE__ */R("tbody",{children:oe.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
|
|
51
|
-
return T("tr",{onClick:()=>B(t),onDoubleClick:()=>he(e),className:"cursor-default border-b border-gray-100 "+(K===t?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
52
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:[
|
|
53
|
-
/* @__PURE__ */R(p,{item:e}),
|
|
54
|
-
/* @__PURE__ */R("span",{className:"truncate",title:e.label,children:e.label})]}),
|
|
55
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-xs text-ink-faint",children:u(e)}),
|
|
56
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
57
|
-
/* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),he(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
|
|
58
|
-
/* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),re?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Move to desktop"}),
|
|
59
|
-
/* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),re?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===ee?G&&0===ne.length?/* @__PURE__ */R(w,{size:"sm",padding:"p-6",label:"Loading"}):0===ne.length?/* @__PURE__ */R("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
60
|
-
/* @__PURE__ */R("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
61
|
-
/* @__PURE__ */R("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
62
|
-
/* @__PURE__ */R("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Original location"}),
|
|
63
|
-
/* @__PURE__ */R("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
64
|
-
/* @__PURE__ */R("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
|
|
65
|
-
/* @__PURE__ */R("th",{className:`${v} w-44`})]})}),
|
|
66
|
-
/* @__PURE__ */R("tbody",{children:ne.map(e=>/* @__PURE__ */T("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
|
|
67
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */R(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */R(N,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
|
|
68
|
-
/* @__PURE__ */R("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
69
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-ink-faint text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
70
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:a(e.size)}),
|
|
71
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:e.deletedAt?U(e.deletedAt):"—"}),
|
|
72
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
73
|
-
/* @__PURE__ */R("button",{onClick:()=>(async e=>{const t=await pe(`${M}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Restore failed (${t.status})`)}y.success(`Restored "${e.name}"`),xe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
|
|
74
|
-
/* @__PURE__ */R("button",{onClick:()=>(async e=>{if(!await k({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await pe(`${M}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Delete failed (${t.status})`)}xe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):G&&0===I.length?/* @__PURE__ */R(w,{size:"sm",padding:"p-6",label:"Loading"}):0===I.length?/* @__PURE__ */T("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!O&&/* @__PURE__ */T(E,{children:[" Drop files here or click ",
|
|
75
|
-
/* @__PURE__ */R("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
76
|
-
/* @__PURE__ */R("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
77
|
-
/* @__PURE__ */R("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
78
|
-
/* @__PURE__ */R("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
79
|
-
/* @__PURE__ */R("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
|
|
80
|
-
/* @__PURE__ */R("th",{className:`${v} w-32`})]})}),
|
|
81
|
-
/* @__PURE__ */R("tbody",{children:I.map(t=>/* @__PURE__ */T("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?A(W(S,t.name)):(async t=>{if(O)return;const n=W(S,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),r=P[a];r?await e({filePath:n,filename:t.name,kind:r,onStaged:e=>de(e)}):ke(t)})(t)},className:"cursor-default border-b border-gray-100 "+(K===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
82
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */R(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */R(N,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
|
|
83
|
-
/* @__PURE__ */R("span",{className:"truncate",title:t.name,children:t.name})]}),
|
|
84
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:"folder"===t.kind?"—":a(t.size)}),
|
|
85
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:U(t.modifiedAt)}),
|
|
86
|
-
/* @__PURE__ */R("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!O&&/* @__PURE__ */T(E,{children:["file"===t.kind&&/* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),ke(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs",children:"Download"}),
|
|
87
|
-
/* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await g({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void y.error("Names cannot contain slashes");const n=W(S,e.name),a=W(S,t),r=await pe(`${M}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:n,to:a})});if(!r.ok){const e=await r.json().catch(()=>({}));return void y.error(e.error||`Rename failed (${r.status})`)}fe(S)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Rename"}),
|
|
88
|
-
/* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await k({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=W(S,e.name),n=await pe(`${M}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const e=await n.json().catch(()=>({}));return void y.error(e.error||`Delete failed (${n.status})`)}fe(S)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),_&&/* @__PURE__ */R("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */R("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{M as default};
|
package/dist/Sidebar-QP5Y7RBV.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-U6LKNGC6.js";import{ResizeHandle as o}from"./chunk-JG26ICX6.js";import{openGlobalSearch as s}from"./chunk-RNBC6V2D.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-VCMHBUKI.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as y,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as j,sectionIcons as w}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import"./chunk-7QSDPSXP.js";import"./chunk-2QY5BJLA.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as z,PopupMenuLabel as $}from"./chunk-3ZRYKZGI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-XWFLIGDQ.js";import{Icon as W}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as I}from"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useMemo as A,useState as H,useRef as M,useEffect as R,isValidElement as K,cloneElement as D}from"react";import{jsx as Q,jsxs as T,Fragment as B}from"react/jsx-runtime";var P="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function J(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var U=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),G="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e,children:t}){const r=M(null);return R(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */Q("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */Q("div",{className:"min-h-0 overflow-hidden",children:t})})}function Y({open:e}){/* @__PURE__ */
|
|
2
|
-
return Q(W,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function F({dir:e}){/* @__PURE__ */
|
|
3
|
-
return Q(W,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function V({className:e}){/* @__PURE__ */
|
|
4
|
-
return Q(W,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var Z=e=>.75+1.75*e+"rem";function _({width:_,collapsed:O,onToggleCollapsed:E,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=j,sectionIcons:me=w,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ke=I().layout,{hasAnyPerm:ye}=e(),ve=A(()=>c(ce,he,ye),[ce,he,ye]),[Ne,Ce]=H(()=>t(r(n))),je=A(()=>[...ve.topItems.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ye]),we=(e,t=je)=>Ce(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=H(null),[ze,$e]=H(!1),We=M(null);R(()=>{O||Le(null)},[O]);const Ie=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ae=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return Q("span",{className:G,"aria-hidden":"true",children:r&&K(r)?D(r,{className:"size-[18px]"}):r})},He=e=>e.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),Me=(e,t,r=je)=>{const n=d(e,ye),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ye);/* @__PURE__ */
|
|
6
|
-
return T("div",{children:[
|
|
7
|
-
/* @__PURE__ */T("button",{type:"button",onClick:()=>we(i,r),"aria-expanded":l,className:U(o,!1),style:t>0?{paddingLeft:Z(t)}:void 0,children:[0===t&&Ae(e.to,de),
|
|
8
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
9
|
-
/* @__PURE__ */Q(Y,{open:l})]}),
|
|
10
|
-
/* @__PURE__ */Q(X,{open:l,children:/* @__PURE__ */Q("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Me(e,t+1,He(n)))})}),e.dividerAfter&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Z(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
|
|
11
|
-
return T("div",{children:[
|
|
12
|
-
/* @__PURE__ */T("button",{type:"button",onClick:t=>Ie(e,t),onAuxClick:t=>{1===t.button&&Ie(e,t)},"aria-current":i?"page":void 0,className:U(i,!1),style:t>0?{paddingLeft:Z(t)}:void 0,children:[0===t&&Ae(e.to,de),
|
|
13
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Z(t)},"aria-hidden":"true"})]},e.to)},Re=(e,t)=>{const r=t?e.items:h(e,ye);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */Q("span",{className:G,"aria-hidden":"true",children:e.icon}):Ae(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ye),l="dividerAfter"in e&&e.dividerAfter;if(O)/* @__PURE__ */
|
|
14
|
-
return T("div",{children:[
|
|
15
|
-
/* @__PURE__ */Q("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:U(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
-
return T("div",{children:[
|
|
17
|
-
/* @__PURE__ */T("button",{type:"button",onClick:()=>we(e.label),"aria-expanded":o,"aria-controls":s,className:U(!o&&i,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
19
|
-
/* @__PURE__ */Q(Y,{open:o})]}),
|
|
20
|
-
/* @__PURE__ */Q(X,{open:o,children:/* @__PURE__ */Q("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>Me(e,1,He(r)))})}),l&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Ke=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",De=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Qe=ne?.avatar_url?/* @__PURE__ */Q("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */Q("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:De}),Te=ze?We.current?.getBoundingClientRect():void 0,Be=O?"":"px-3",Pe=O?{paddingInline:y}:void 0,Je=`${O?ke.expandSidebar:ke.collapseSidebar} (${P?"⌘":"Ctrl"} .)`,Ue=ee?{run:ee,label:ke.goHome,title:ke.goHome}:se?null:{run:E,label:O?ke.expandSidebar:ke.collapseSidebar,title:Je},Ge=/* @__PURE__ */T(B,{children:[pe&&/* @__PURE__ */Q(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!O&&/* @__PURE__ */T("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */Q("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */Q("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Xe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
-
return T("aside",{"aria-label":ke.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:_},children:[
|
|
23
|
-
/* @__PURE__ */T("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(O?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[Ue?/* @__PURE__ */Q("button",{type:"button",onClick:Ue.run,"aria-label":Ue.label,title:Ue.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(O?"justify-center p-0.5":"-ml-1 p-1"),children:Ge}):/* @__PURE__ */Q("span",{className:"flex min-w-0 items-center gap-2",children:Ge}),se?/* @__PURE__ */Q(b,{onClick:se,"aria-label":ke.closeMenu,children:/* @__PURE__ */Q(W,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!O&&/* @__PURE__ */Q("button",{type:"button",onClick:E,"aria-label":ke.collapseSidebar,title:`${ke.collapseSidebar} (${P?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */Q(F,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */Q("div",{className:`shrink-0 pt-3 ${Be}`,style:Pe,children:O?/* @__PURE__ */Q("button",{type:"button",onClick:s,"aria-label":ke.search,title:`${ke.search} (${P?"⌘K":"Ctrl K"})`,className:U(!1,!0),children:/* @__PURE__ */Q(V,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */T("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
-
/* @__PURE__ */Q(V,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ke.search}),
|
|
27
|
-
/* @__PURE__ */Q("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:P?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */T("nav",{"aria-label":ke.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Be} ${O?"space-y-1":"space-y-0.5"}`,style:Pe,children:[O&&/* @__PURE__ */Q("button",{type:"button",onClick:E,"aria-label":ke.expandSidebar,title:`${ke.expandSidebar} (${P?"⌘":"Ctrl"} .)`,className:`${U(!1,!0)} mb-3`,children:/* @__PURE__ */Q(F,{dir:"right"})}),ve.topItems.map(e=>{if(!O)return Me(e,0);const t=d(e,ye),r=e.to===re||u(t,re,ye),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
-
return T("div",{children:[
|
|
30
|
-
/* @__PURE__ */Q("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ie(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:U(r,!0),children:Ae(e.to,de)}),e.dividerAfter&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Xe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>Re(e,!1)),ve.systemSections.map(e=>Re(e,!1)),ve.virtualSections.map(e=>Re(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */Q("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Re(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */Q("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Be}`,style:Pe,children:/* @__PURE__ */T("button",{ref:We,type:"button",onClick:()=>$e(e=>!e),"aria-haspopup":"menu","aria-expanded":ze,"aria-label":O?ke.accountMenu(Ke):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(O?"justify-center py-2":"px-2 py-2"),children:[Qe,!O&&/* @__PURE__ */T("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */Q("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Ke}),ae?.email&&Ke!==ae.email&&/* @__PURE__ */Q("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!O&&!se&&/* @__PURE__ */Q(o,{side:"left",width:_,onResize:q,min:C,max:N,defaultWidth:v,storageKey:a,label:ke.resizeSidebar}),ze&&Te&&/* @__PURE__ */T(S,{portal:!0,minWidth:224,onClose:()=>$e(!1),style:J(_,Te,window.innerHeight),children:[O&&/* @__PURE__ */T("div",{className:"border-b border-line px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */Q("p",{className:"truncate text-sm font-semibold text-gray-800",children:Ke}),ae?.email&&/* @__PURE__ */Q("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
|
|
34
|
-
/* @__PURE__ */T(L,{onClick:()=>{$e(!1),te("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */Q(W,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.profile]}),ve.footerItems.map(e=>/* @__PURE__ */T(L,{onClick:()=>{$e(!1),Ie(e)},children:[
|
|
36
|
-
/* @__PURE__ */Q("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */T(L,{onClick:()=>{$e(!1),oe()},children:[
|
|
37
|
-
/* @__PURE__ */Q(W,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */Q(z,{}),le&&/* @__PURE__ */T(B,{children:[
|
|
39
|
-
/* @__PURE__ */T(L,{onClick:()=>{$e(!1),le()},children:[
|
|
40
|
-
/* @__PURE__ */Q(W,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */Q(z,{})]}),
|
|
42
|
-
/* @__PURE__ */T(L,{danger:!0,onClick:()=>{$e(!1),ie()},children:[
|
|
43
|
-
/* @__PURE__ */Q(W,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.signOut]})]}),Se&&O&&/* @__PURE__ */Q(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:_+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ye).map((e,t)=>/* @__PURE__ */T("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */Q(z,{}),e.heading&&/* @__PURE__ */Q($,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */T(L,{onClick:()=>Ie(e),children:[Ae(e.to,de),
|
|
44
|
-
/* @__PURE__ */Q("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{J as accountMenuPosition,_ as default};
|
package/dist/chunk-2EPAXWZZ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-5YP7MFPK.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[F,V]=m(null),{highlighted:W}=e(),w=s(null),C=t(w,560),Z=$??C;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const E=b??a(0),H=p??54*x.length,P=Math.max(...x.map(e=>e.value),1),Y="bars"===v,B=Y?Math.round(Math.min(132,Math.max(80,.24*Z))):Math.round(Math.min(168,Math.max(104,.38*Z))),Q=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},R=e=>{const t=Q(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},U=Y?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=R(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,D=Z-B-U,I=Math.max(Y?2:0,Math.min(M,D)),K=e=>Math.max(I,D*Math.max(0,e/P)),O=e=>K(e)/2,T=B+D/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${E} ${X(e).toFixed(0)}%, ${n.surface})`,G=e=>X(e)>=55?n.surface:n.label,J=(e,t)=>null!==F?F!==e:null!==W&&W!==t,_=null!==F?x[F]:void 0;/* @__PURE__ */
|
|
2
|
-
return f("div",{className:`relative ${k??""}`,ref:w,children:[
|
|
3
|
-
/* @__PURE__ */f("svg",{width:"100%",height:H,viewBox:`0 0 ${Z} ${H}`,role:"img","aria-labelledby":z,onMouseLeave:()=>V(null),children:[
|
|
4
|
-
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*H/x.length+g/2,a=(t+1)*H/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(Y){const u=B,h=u+K(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:J(t,e.key)?.45:1,onMouseEnter:()=>V(t),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:B-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:G(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
|
-
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
|
-
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=Q(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
-
return f("g",{opacity:J(t,e.key)?.45:1,onMouseEnter:()=>V(t),children:[
|
|
11
|
-
/* @__PURE__ */d("path",{d:`M${T-h},${l} L${T+h},${l} L${T+c},${a} L${T-c},${a} Z`,fill:q(t)}),
|
|
12
|
-
/* @__PURE__ */d("text",{x:B-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
-
/* @__PURE__ */f("text",{x:B-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
-
/* @__PURE__ */d("text",{x:s?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?G(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==F&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:q(F),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...F>0&&x[F-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[F-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
package/dist/chunk-6FIYG7IH.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-3X2W7R5B.js";import{ImageLightbox as a}from"./chunk-RQBQETXQ.js";import{MarqueeBox as i}from"./chunk-IC72MGON.js";import{Drawer as r}from"./chunk-2NRNKF46.js";import{EmptyState as t}from"./chunk-YQLKZ5UQ.js";import{DescriptionList as o}from"./chunk-SACUSHVN.js";import{Breadcrumbs as d}from"./chunk-IUG4Z2ND.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-R6TDZ7T5.js";import{useMediaMoveItems as u}from"./chunk-UTITWGVW.js";import{MediaUploadGrid as m}from"./chunk-6DQANKTL.js";import{MediaUsedInList as h}from"./chunk-CSLMWGFS.js";import{RenameField as p}from"./chunk-ALJS3SYS.js";import{NativeSelect as f}from"./chunk-ESWR7YNY.js";import{Segmented as g}from"./chunk-JQBVSPF5.js";import{useGridSelection as v}from"./chunk-VLKDWKVR.js";import{useMarquee as k}from"./chunk-OLFYNMTD.js";import{copyToClipboard as y}from"./chunk-JJZAYAVL.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-57WQVUBX.js";import{Banner as N}from"./chunk-IIKPM3F4.js";import{Input_default as C}from"./chunk-LGTYPLJM.js";import{DropdownMenu as I}from"./chunk-GO6HU2O3.js";import{IconButton_default as D}from"./chunk-VCMHBUKI.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-ZKBGUDNB.js";import{ColoredBadge as T}from"./chunk-CT7AU2TA.js";import{Button_default as z}from"./chunk-7DI3VQCF.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as L}from"./chunk-7V32O5NF.js";import{Tooltip as O}from"./chunk-QQ2LDC6C.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-5YP7MFPK.js";import{useRef as M,useMemo as E,useCallback as U,useState as R,useEffect as K}from"react";import{jsxs as B,Fragment as Q,jsx as V}from"react/jsx-runtime";var G="application/x-efficient-media-files",W="application/x-efficient-media-folder",Y="application/x-efficient-media-file";function J(e){if(!e||!Array.from(e.types).includes(Y))return null;try{const n=JSON.parse(e.getData(Y));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var Z={type:"all",use:"any",sort:"newest"},$={lock:/* @__PURE__ */V(L,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */V(L,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */V(L,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */V(L,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */V(L,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */V(L,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */V(L,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */V(L,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */V(L,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */V(L,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */V(L,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */V(L,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */V(L,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */V(L,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */V(L,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */V(L,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},H={link:/* @__PURE__ */V(L,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */V(L,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */V(L,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */V(L,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function q(L){const{mode:J="manage",layout:q="auto",location:X,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=Z,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:he,usedIn:pe,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ne,onTrash:Ce,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:Te,onCropEdit:ze,onOpenInDesign:Fe,onChoose:Le,onCancel:Oe,pickNote:Ae,onDragOut:Pe,className:Me=""}=L,Ee=P().mediaLibrary,Ue=P().media,Re="pick"===J,Ke=!Re,Be=M(null),Qe=A(Be,"phone"===q?343:1200),Ve="phone"===q||"auto"===q&&Qe<640,Ge=E(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),We=E(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ye=E(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&We.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,We]),Je=U(e=>{const n=[];for(let l=e?We.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?We.get(l.parentId):void 0);return n},[We,ee.length]),Ze=U((e,n)=>Je(e).some(e=>e.id===n),[Je]),[$e,He]=R(()=>/* @__PURE__ */new Set(["@files"])),qe=e=>He(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),Xe=U(e=>{He(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=X).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;K(()=>{if("files"===X.place)Xe(["@files",...Je(X.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===X.place){const e=X.nodeId?Ge.get(X.nodeId)?.path??[]:[];Xe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===X.place,ln="trash"===X.place,an="files"===X.place,rn=an?X.folderId:null,tn=nn&&X.nodeId?Ge.get(X.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=E(()=>ie.map(e=>e.id),[ie]),sn=E(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=v(dn),un=E(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,hn=M(!0);K(()=>{hn.current?hn.current=!1:cn.clear()},[_e]);const pn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[pn]);const fn=M(pn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,he?.(un))},[gn]);const vn=(e,n={})=>{Re?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=R(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?We.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);Xe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=U(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=We.get(e.id);return n===e.id||n&&Ze(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:s,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Ye.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Ye,We,an,Ze,rn,Ee]),Nn=U(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Cn,In]=R(null),Dn={words:Ee,media:Ue,denied:fe,moveTargets:xn,kindOf:Nn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Ke?e=>{wn(e)}:void 0,rename:xe&&Ke?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ne&&Ke?Ne:void 0,trash:Ce&&Ke?Ce:void 0,deleteFolder:Ie&&Ke?Ie:void 0,folderNotEmpty:e=>!!We.get(e)?.notEmpty,replace:Te&&Ke?Te:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&y(Ee.urlLabel,n)},openInDesign:Fe,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),Tn=(e,n)=>{Re||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[zn,Fn]=R(null),[Ln,On]=R(null),[An,Pn]=R(null);K(()=>{if(!Ln&&!zn)return;const e=()=>{On(null),Fn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[Ln,zn]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!Ne||fe.move||Re)&&(!!Mn(e,G)||!(!Mn(e,W)||!An)&&(n!==An&&!(n&&Ze(n,An)))),Un=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Fn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",zn!==e&&Fn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Fn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Fn(null),Mn(e,G)){let l;try{l=JSON.parse(e.dataTransfer.getData(G))}catch{l=null}Array.isArray(l)&&l.length&&Ne({kind:"files",ids:l.map(String)},n)}else An&&(Ne({kind:"folder",id:An},n),Pn(null))}}),Rn=e=>{const n=e=>Mn(e,G)||Mn(e,W)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&On(e)},onDragOver:l=>{n(l)&&Ln!==e&&On(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||On(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */V(O,{side:"right",content:Ln===e?Ee.noDropProducts:on(l),open:Ln===e||!Ln&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Bn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Qn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return B("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */V(n,{label:Kn(r,e.name,t),level:a,icon:d&&o?$.folderOpen:$.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&X.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>qe(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Rn(r),...Ke?Bn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */V(l,{children:Qn(d,a+1,t)})]},e.id)}),Vn=(e,a)=>(Ye.get(e)??[]).map(e=>{const i=Ye.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return B("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */V(n,{label:e.name,level:a,icon:i&&r?$.folderOpen:$.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&X.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>qe(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:zn===e.id?"into":void 0,dragging:An===e.id,draggable:Ke&&!!Ne&&!fe.move,rename:t?/* @__PURE__ */V(p,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Ke&&o.length?/* @__PURE__ */V(I,{align:"end","aria-label":Ee.folderActions,trigger:$.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Ke?Bn({kind:"folder",id:e.id}):{},...Ke&&Ne&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(W,e.id),Pn(e.id)},onDragEnd:()=>{Pn(null),Fn(null)}}:{}}}),i&&r&&/* @__PURE__ */V(l,{children:Vn(e.id,a+1)})]},e.id)}),Gn=$e.has("@files"),Wn=$e.has("@products"),Yn=/* @__PURE__ */B(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */B(Q,{children:[
|
|
6
|
-
/* @__PURE__ */V(n,{label:Kn("@products",Ee.products),level:1,icon:$.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Wn:void 0,onToggle:()=>qe("@products"),selected:nn&&null==X.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Rn("@products")}}),Wn&&ne.length>0&&/* @__PURE__ */V(l,{children:Qn(ne,2)})]}),
|
|
7
|
-
/* @__PURE__ */V(n,{label:Ee.allFiles,level:1,icon:Gn?$.folderOpen:$.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Ye.get(null)?.length?Gn:void 0,onToggle:()=>qe("@files"),selected:an&&null==X.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===zn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Gn&&(Ye.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Vn(null,2)}),Ke&&/* @__PURE__ */V(n,{label:Ee.trash,level:1,icon:$.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Jn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=X.nodeId?Ge.get(X.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Je(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Zn=nn?Ee.readOnly:fe.upload,$n=!!be&&!ln&&!Zn,Hn=S({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),qn=nn?Ee.noProductFolder:fe.newFolder,Xn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&we&&!ln&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.folderPlus,onClick:()=>{wn(rn)},...Xn(qn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:$.upload,onClick:()=>Hn.open(),...Xn(Zn),children:Ee.upload}),Ke&&ln&&je&&ie.length>0&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:je,...Xn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */V("div",{style:{width:Ve?void 0:i,flex:Ve?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */V(f,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */V("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */V(C,{size:"sm",type:"search",leftIcon:$.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Ke&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */V(g,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:$.grid},{value:"list",label:Ee.list,icon:$.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:H.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:H.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:H.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:H.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */V(T,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Ke&&an&&!!Ne&&!fe.move,tl=!!Pe&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[Y]:ol(e)}}:{}})),sl=Ve?Math.max(72,Math.floor((Qe-24-16-1)/3)):112,cl=M(null),ul=k({containerRef:cl,enabled:Ke&&!Ve&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Re){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Le?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},hl=ie.length?null:re?/* @__PURE__ */V(t,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */V(t,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */V(t,{variant:"dashed",title:Ee.trashEmpty}):!$n||Re?/* @__PURE__ */V(t,{variant:"dashed",title:Ee.emptyFolder}):null,pl="list"===ce&&ie.length>0,fl=hl??(pl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>Tn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Y,ol(e)),Pe("start")}:void 0,onDragEnd:ol(e)?e=>Pe("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
-
/* @__PURE__ */V("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
-
/* @__PURE__ */V("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
-
/* @__PURE__ */V("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */V("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */V(m,{items:dl,readOnly:!$n||Re,onFiles:$n&&!Re?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?G:tl?Y:void 0,onDragOutChange:tl?e=>Pe(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Ke?Tn:void 0,menuOnMedia:Ke})),gl=u({count:un.length,kind:Nn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ne?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */V(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(Q,{children:[$.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Ke&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
-
/* @__PURE__ */V(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */B(Q,ln?{children:[De&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.undo,onClick:()=>De(un),...Xn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...Xn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[Ne&&kl,xe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.edit,disabled:!0,children:Ee.rename}),Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.trash,onClick:()=>Ce({kind:"files",ids:un}),...Xn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
|
|
12
|
-
/* @__PURE__ */V(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */V(p,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
-
/* @__PURE__ */V("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */V(N,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
|
|
15
|
-
/* @__PURE__ */V(o,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
|
|
16
|
-
/* @__PURE__ */V("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */V(C,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Ke&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[Te&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.swap,onClick:()=>Te(e.id),...Xn(fe.replace),children:Ee.replace}),ze&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.crop,onClick:()=>ze(e.id),children:Ee.cropEdit}),Ne&&"submenu"===i?.type&&/* @__PURE__ */V(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(Q,{children:[$.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.edit,onClick:()=>yn({kind:"file",id:e.id}),...Xn(fe.rename),children:Ee.rename}),Ce&&/* @__PURE__ */V(D,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ce({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:$.trash})]}),ln&&Ke&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:$.undo,onClick:()=>De([e.id]),...Xn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...Xn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Fe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:$.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Ee.openInDesign}),pe&&/* @__PURE__ */V(h,{items:pe})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,xl=Re?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
18
|
-
/* @__PURE__ */V("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
|
|
19
|
-
/* @__PURE__ */B("div",{className:"flex gap-2",children:[Oe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",onClick:Oe,children:Ee.cancel}),
|
|
20
|
-
/* @__PURE__ */V(z,{variant:"primary",size:"sm",disabled:!mn,...Xn(wl),onClick:()=>{mn&&!wl&&Le?.(mn)},children:Ee.chooseImage})]})]}):null,Nl=Ke&&!!mn,Cl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */V(N,{tone:"neutral",children:Ae}),
|
|
21
|
-
/* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */V(d,{items:Jn}),_n]}),ll,yl,
|
|
23
|
-
/* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
24
|
-
/* @__PURE__ */V(i,{rect:ul.rect})]}),$n&&/* @__PURE__ */V("input",{...Hn.inputProps}),
|
|
25
|
-
/* @__PURE__ */V(j,{rejections:Hn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return B("div",{ref:Be,"data-media-library":"","data-layout":Ve?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */B("div",Ve?{className:"flex flex-col gap-3 p-3",children:[Yn,Cl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
-
/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Yn}),
|
|
28
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Cl}),Nl&&/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,Ve&&/* @__PURE__ */V(r,{open:Nl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */V(x,{...jn.props,items:Sn(jn.state.data)}),null!=Cn&&ie.length>0&&/* @__PURE__ */V(a,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Cn,ie.length-1),onClose:()=>In(null)})]})}export{G as MEDIA_FILES_DRAG_TYPE,Y as MEDIA_FILE_DRAG_TYPE,W as MEDIA_FOLDER_DRAG_TYPE,q as MediaLibrary,J as readMediaFileDrag};
|
package/dist/chunk-6R32KKIS.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{ChartBrush as t}from"./chunk-JRCFOZEU.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-5KKJAYKT.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-Y4RHGLXB.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as A,STATUS_VARS as R}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as L}from"./chunk-TWVUQUUD.js";import{useShellStrings as W,useShellLocale as C}from"./chunk-5YP7MFPK.js";import{formatPercent as E,formatPlain as S}from"./chunk-C3QOHMR6.js";import{useRef as D,useState as T,useId as U,useEffect as P}from"react";import{jsx as F,jsxs as I}from"react/jsx-runtime";var Y=12,K=16,O=26,B=52,Q=t=>"number"==typeof t&&Number.isFinite(t);function H({series:H,labels:J,height:Z=200,stacked:G=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=W().charts,Vt=C(),zt=rt??(t=>S(t,Vt)),At=ot??zt,Rt=jt??$t.noData,Lt=D(null),Wt=x(Lt),Ct=Nt??Wt,[Et,St]=T(null),[Dt,Tt]=T(null),{highlighted:Ut}=u(),Pt=U(),Ft=ut??Dt,It=p(ht&&Ft?Ft[1]-Ft[0]+1:J.length,pt);if(P(()=>{if(null!==Et)return L(t=>"Escape"===t.key&&(St(null),!0))},[Et]),kt)/* @__PURE__ */
|
|
2
|
-
return F("div",{className:wt,ref:Lt,children:/* @__PURE__ */F(h,{height:Z,width:Nt??Wt})});const Yt=J,Kt=ut??Dt??[0,Math.max(0,Yt.length-1)],[Ot,Bt]=Kt,Qt=t=>It.slice(ht?t.slice(Ot,Bt+1):t),Ht=lt?Qt(lt):void 0,Jt=H.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Q)).map(t=>({...t,data:Qt(t.data),pointTones:t.pointTones?Qt(t.pointTones):void 0})),Zt=t=>(ht?Ot:0)+(It.view?.[0]??0)+t;if(J=Qt(Yt),0===Jt.length||0===J.length)/* @__PURE__ */
|
|
3
|
-
return F("div",{className:wt,ref:Lt,children:/* @__PURE__ */F("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:Z},children:Rt})});const Gt=J.map((t,e)=>Jt.reduce((t,a)=>t+(Q(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Gt[e]>0?t/Gt[e]:null,qt=[];if(G){let t=J.map(()=>0);for(const e of Jt)t=t.map((t,a)=>t+(Q(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!G&&!_t&&void 0===et&&Jt.some(te)&&Jt.some(t=>!te(t)),ae=gt&&!G?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Jt.filter(t=>!te(t)):Jt).filter(t=>!re(t)),le=ee?Jt.filter(te).flatMap(t=>t.data.filter(Q)):[],ne=G?(qt.at(-1)??[]).filter(Q):oe.flatMap(t=>t.data.filter(Q)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:G&&"percent"===X||_t||void 0!==et?null:b(G?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=G&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=G&&"percent"===X?t=>E(Math.round(100*t),0,Vt):zt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),B),fe=ie?w(ie.right.ticks.map(zt),K):K,pe={left:ue,right:Math.max(ue+1,Ct-fe),top:Y,bottom:Z-O},ge=j(J.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Jt.filter(re),Me=Math.max(0,...J.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),St(e=>{const a=(e??0)+t;return Math.min(J.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(J.length/Math.max(1,Math.floor(Ct/96))));/* @__PURE__ */
|
|
4
|
-
return I("div",{className:`relative ${wt??""}`,ref:Lt,children:[
|
|
5
|
-
/* @__PURE__ */I("svg",{width:"100%",height:Z,viewBox:`0 0 ${Ct} ${Z}`,role:"img","aria-label":$t.overIntervals(Jt.map(t=>t.label),J.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>St(null),onBlur:()=>St(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Zt(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
-
/* @__PURE__ */F("defs",{children:/* @__PURE__ */F("clipPath",{id:Pt,children:/* @__PURE__ */F("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
-
/* @__PURE__ */F(n,{id:Pt,fills:Jt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:G?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */F("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:A.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
-
/* @__PURE__ */F("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:A.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */F("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */F("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */F("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:A.label,children:nt}),
|
|
9
|
-
/* @__PURE__ */F("g",{clipPath:`url(#${Pt})`,mask:xt&&vt?`url(#${m(Pt)})`:void 0,children:Jt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(G?"area":"line"),h=f(t.key,Ut);if("step"===m){const e=J.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Q(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
-
return F("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=J.map((a,r)=>{const o=G?qt[e]?.[r]:t.data[r];return Q(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((o,l)=>{const i=t.data[l];if(!Q(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Jt[t]?.key)).reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return F("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?R[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:J.map((l,c)=>{const d=G?qt[e]?.[c]:t.data[c];if(!Q(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
-
return F("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=G&&e>0?J.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
|
|
13
|
-
return I("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||G)&&
|
|
14
|
-
/* @__PURE__ */F("path",{d:y,fill:c(Pt,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */F("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??R[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
-
return I("g",{children:[
|
|
17
|
-
/* @__PURE__ */F("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */F("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Jt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(Q).lastIndexOf(!0),n="all"===r?J.map((t,e)=>e).filter(e=>Q(G?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
-
return I("g",{children:[n.map(r=>{const n=G?qt[a]?.[r]:t.data[r];return Q(n)?/* @__PURE__ */F(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${J[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&Q(G?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */F("text",{x:ge.center(l)-10,y:je(t)(G?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(G?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),J.map((t,e)=>e%ze===0?/* @__PURE__ */F("text",{x:ge.center(e),y:Z-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */F("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:A.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
-
/* @__PURE__ */I("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
-
/* @__PURE__ */F("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:A.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */F("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),It.drag&&/* @__PURE__ */F(g,{x0:ge(It.drag[0]),x1:ge(It.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),J.map((t,e)=>/* @__PURE__ */F("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>St(e),onPointerDown:()=>It.press(e),onPointerEnter:()=>It.over(e),onPointerUp:It.release,onClick:yt?()=>yt(Zt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),It.view&&/* @__PURE__ */F(y,{from:Ht?.[0]??J[0],to:Ht?.at(-1)??J[J.length-1],count:J.length,total:G&&"percent"!==X?At(Gt.reduce((t,e)=>t+e,0)):ae?At(be.reduce((t,e)=>t+e.data.filter(Q).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Jt).filter(t=>t.data.some(Q)).map(t=>{const e=t.data.filter(Q),a=z(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=G||"column"===t.mode?At(r):$t.zoomLevel(At(r/e.length),At(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:It.clear}),ht&&Yt.length>2&&/* @__PURE__ */F(t,{className:"mt-1",labels:Yt,width:Ct,data:H[0]?.data??[],range:Kt,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==Et&&
|
|
22
|
-
/* @__PURE__ */F("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Et),ge.bandwidth,Ct),children:/* @__PURE__ */F(V,{title:Ht?.[Et]??J[Et],rows:Jt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:Q(t.data[Et])?G&&"percent"===X?`${E(100*(Xt(t.data[Et],Et)??0),1,Vt)} · ${At(t.data[Et])}`:At(t.data[Et]):void 0})),footnote:G&&"percent"===X?$t.inBucket(At(Gt[Et])):void 0})})]})}export{H as TimeSeriesChart};
|
package/dist/chunk-7DI3VQCF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{buttonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-XWFLIGDQ.js";import{SpinnerRing as l}from"./chunk-R2VKEMZH.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:N,onClick:y,pressed:v,"aria-disabled":g,"aria-describedby":j,...I},w){const z=n(),C=u||m,F=null!=N&&""!==N,Q=C&&F,R=!C&&a(g),Y=R&&F,D=Q||Y?z:void 0,E=/* @__PURE__ */t("button",{ref:w,type:h,disabled:C,"aria-busy":m||void 0,"aria-disabled":!!R||g,"aria-describedby":i(j,D),onClick:R?r:y,className:e({variant:d,size:o,block:f,pressed:v??(!0===I["aria-pressed"]||"true"===I["aria-pressed"]),className:x}),...I,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return Y?/* @__PURE__ */c(s,{reason:N,id:z,block:f,children:E}):Q?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[E,
|
|
2
|
-
/* @__PURE__ */c("span",{id:D,className:"text-xs text-red-600",children:N})]}):E});export{o as Button_default};
|
package/dist/chunk-B2MD232O.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-3VR5BOD4.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-5YP7MFPK.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:M,emptyLabel:F,radius:O=3}){const V=o().charts,N=n(),W=w??(e=>h(e,N)),A=L??V.range,C=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),P=r(0,j,v);/* @__PURE__ */
|
|
2
|
-
return s(l,{labels:d,values:C,height:k,width:g,max:b,min:x,formatValue:W,yAxisLabel:y,className:M,emptyLabel:F,bandPadding:"bar"===p?.34:0,ariaLabel:V.rangeLabel(A,d.length),tooltip:e=>/* @__PURE__ */s(t,{title:d[e],rows:[{key:"high",label:V.high,color:P,value:null==u[e]?void 0:W(u[e].high)},{key:"low",label:V.low,color:P,value:null==u[e]?void 0:W(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:O,fill:P,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
|
-
return m(c,{children:[
|
|
4
|
-
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:P,fillOpacity:.2,stroke:"none"}),
|
|
5
|
-
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
-
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:P,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
package/dist/chunk-EC22ACQZ.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-5YP7MFPK.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,F=a(),U=$??(e=>o(e,F)),z=b??j.intensity,C=w??j.noActivity,D=h(null),R=e(D),S=g??R,V=c(),[L,P]=s(null);if(m(()=>{if(null!==L)return n(e=>"Escape"===e.key&&(P(null),!0))},[L]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
-
return f("div",{className:k,ref:D,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:C})});const Q=y??l(0),B=v??Math.max(1,...p.flat().filter(Number.isFinite)),E=96,G=26*x.length,I=M??G+26+26,K=Math.max(2,(Math.max(97,S)-E)/d.length),T=e=>{const t=B>0?Math.max(0,Math.min(1,e/B)):0;return`color-mix(in oklab, ${Q} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${k??""}`,ref:D,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:I,viewBox:`0 0 ${S} ${I}`,role:"img","aria-label":j.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>P(null),onBlur:()=>P(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),P(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
-
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:V,x1:"0",x2:"1",children:[
|
|
6
|
-
/* @__PURE__ */f("stop",{offset:"0",stopColor:T(0)}),
|
|
7
|
-
/* @__PURE__ */f("stop",{offset:"1",stopColor:T(B)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=L&&(L.r!==t||L.c!==r);/* @__PURE__ */
|
|
8
|
-
return f("rect",{x:E+r*K+A/2,y:26*t+A/2,width:Math.max(1,K-A),height:26-A,rx:N,fill:T(n),opacity:i?.55:1,onMouseEnter:()=>P({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${U(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((S-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*K+K/2,y:G+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
-
/* @__PURE__ */f("rect",{x:E,y:G+26,width:Math.min(180,Math.max(40,S-E)),height:8,rx:4,fill:`url(#${V})`}),
|
|
10
|
-
/* @__PURE__ */f("text",{x:E,y:G+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
-
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,S-E)),y:G+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:U(B)})]}),L&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(t,{title:`${x[L.r]} · ${d[L.c]}`,rows:[{key:"v",label:z,color:Q,value:null==p[L.r]?.[L.c]?void 0:U(p[L.r][L.c])}]})})]})}export{x as HeatmapChart};
|
package/dist/chunk-FJBJUFD7.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-EYPKBJYG.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-5YP7MFPK.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,E]=u(null),{highlighted:F}=r(),P=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",P),0===P.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const Y=Math.max(...P.map(e=>e.depth))+1,C=f/2,I=f/2,K=(f/2-8-b)/Y,L=P.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,A=e=>null!==w?e.id===w:null===F||e.branchKey===F,B=w?P.find(e=>e.id===w):void 0,Q=e=>c(e.value/L*100,1,$);/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(L),Y),onMouseLeave:()=>E(null),children:[P.map(e=>/* @__PURE__ */s("path",{d:t(C,I,b+e.depth*K+v/2,b+(e.depth+1)*K-v/2,e.start,e.end),fill:z(e),fillOpacity:A(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>E(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:C,y:I+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),B&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:B.label,rows:[{key:"value",label:M.value,color:z(B),value:j(B.value)},{key:"share",label:M.share,color:a.muted,value:Q(B)}]})}),
|
|
4
|
-
/* @__PURE__ */s(e,{caption:M.sunburst(j(L),Y),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:P.map(e=>[e.depth+1,e.label,j(e.value),Q(e)])})]})}export{f as SunburstChart};
|