efficient-shell 12.18.0 → 12.20.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-U6V2IAOZ.js → Browser-Z7NIFAGY.js} +14 -14
- package/dist/Calculator-OUPD7SZV.js +29 -0
- package/dist/{CurrencyConverter-34AMD4W7.js → CurrencyConverter-CNGYEKE3.js} +9 -9
- package/dist/Files-KOUPCFRC.js +141 -0
- package/dist/{Notepad-F3Z4ZFVY.js → Notepad-Y37G5PTB.js} +9 -9
- package/dist/{PdfViewer-F2TCC5UD.js → PdfViewer-UY5SRC63.js} +1 -1
- package/dist/{PomodoroTimer-6WR3UOOM.js → PomodoroTimer-I53C5QYM.js} +65 -65
- package/dist/{Preview-HSW3BKA5.js → Preview-GB33WBQY.js} +24 -24
- package/dist/{Sidebar-ADAIERCI.js → Sidebar-BKNCPUOE.js} +37 -37
- package/dist/{Stock-UAGSFAKY.js → Stock-JY3PJI2M.js} +2 -2
- package/dist/{Weather-G2VGEQX2.js → Weather-POQXLYFA.js} +17 -17
- package/dist/{WorldClock-43KK7OTT.js → WorldClock-FUJOPJ5G.js} +6 -6
- package/dist/ai/index.d.ts +117 -3
- package/dist/ai/index.js +95 -75
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/{chunk-MFJHLC5M.js → chunk-34EBBZFK.js} +1 -1
- package/dist/{chunk-T3JSUBIF.js → chunk-34TQBJ7I.js} +1 -1
- package/dist/{chunk-EEAY7FJW.js → chunk-3CKYFCX4.js} +18 -18
- package/dist/{chunk-FQHPGREQ.js → chunk-3E3LR2PM.js} +12 -12
- package/dist/{chunk-KSMEWOCE.js → chunk-3J3FBYIZ.js} +1 -1
- package/dist/{chunk-JAVTQART.js → chunk-3JL4TCA7.js} +1 -1
- package/dist/{chunk-DVYBJOD3.js → chunk-436PJFHC.js} +10 -10
- package/dist/{chunk-DCNSQGHJ.js → chunk-4ZLFAXOC.js} +11 -11
- package/dist/{chunk-24LO6OH4.js → chunk-4ZRGMK7Y.js} +1 -1
- package/dist/{chunk-7ARBBWPQ.js → chunk-6FZ5JTBY.js} +2 -2
- package/dist/{chunk-7X2P6IH3.js → chunk-6GWYFUME.js} +5 -5
- package/dist/{chunk-ZKGUBIBT.js → chunk-6RK6R3RY.js} +1 -1
- package/dist/{chunk-XJW65EIG.js → chunk-7LTU5TJD.js} +1 -1
- package/dist/{chunk-XKJGJNY2.js → chunk-B4GRHE44.js} +3 -3
- package/dist/{chunk-4KXATGI3.js → chunk-BDGYRQQE.js} +5 -5
- package/dist/{chunk-ZE7OVMDM.js → chunk-BM2QIV64.js} +22 -22
- package/dist/{chunk-QPYVCG74.js → chunk-CCK2UWQ5.js} +10 -10
- package/dist/{chunk-WQ4YKWN2.js → chunk-CJHYOHMU.js} +1 -1
- package/dist/chunk-D2WJAF62.js +4 -0
- package/dist/{chunk-6TIJH2M6.js → chunk-DCCYUCBM.js} +1 -1
- package/dist/{chunk-Y6E7IRK2.js → chunk-DK5SXOXJ.js} +1 -1
- package/dist/{chunk-Z62RBVEJ.js → chunk-DTSOYFQE.js} +1 -1
- package/dist/chunk-EEGTFJUQ.js +28 -0
- package/dist/{chunk-4BKJ6A5H.js → chunk-F4XGUOVL.js} +4 -4
- package/dist/{chunk-I76W4ZNU.js → chunk-FBUFB536.js} +4 -4
- package/dist/{chunk-RMDVKQJE.js → chunk-FE5DH5OM.js} +2 -2
- package/dist/{chunk-LQVQX5B2.js → chunk-FQ4IRBMA.js} +1 -1
- package/dist/{chunk-W7DYKTHE.js → chunk-FTMCNC66.js} +1 -1
- package/dist/{chunk-LNZMA4PB.js → chunk-GEZM6ARD.js} +1 -1
- package/dist/{chunk-RAOM3WIQ.js → chunk-GLRRX4AL.js} +1 -1
- package/dist/chunk-HMT3MES3.js +27 -0
- package/dist/{chunk-3A6FYWFQ.js → chunk-HOEHV2J5.js} +1 -1
- package/dist/{chunk-5MH5N76F.js → chunk-I7JU4IU3.js} +4 -4
- package/dist/{chunk-MBCUICY3.js → chunk-ILDPJ26Y.js} +1 -1
- package/dist/{chunk-XG5ER6GJ.js → chunk-JGRDG7CB.js} +5 -5
- package/dist/{chunk-HYPYNVQQ.js → chunk-JN5NUZ6D.js} +1 -1
- package/dist/{chunk-VYRVSTI6.js → chunk-KBI3T6UC.js} +9 -9
- package/dist/{chunk-UULBPDAH.js → chunk-KP2JYXEU.js} +8 -8
- package/dist/{chunk-GJLN4NRB.js → chunk-L2Y6FZTA.js} +6 -6
- package/dist/chunk-L4QGZ26E.js +1 -0
- package/dist/{chunk-H4ABSQS6.js → chunk-L543DFHF.js} +1 -1
- package/dist/chunk-LCEQIFPK.js +3 -0
- package/dist/{chunk-2DQHXJPM.js → chunk-LPPJNZQ6.js} +3 -3
- package/dist/{chunk-NKP5WCEA.js → chunk-MFEPLP7Y.js} +6 -6
- package/dist/{chunk-WYGUHCJ2.js → chunk-N32LNPPP.js} +8 -8
- package/dist/{chunk-YU52WMSH.js → chunk-N3R6N7LG.js} +1 -1
- package/dist/{chunk-ZQT3GNRU.js → chunk-NAN2IW2H.js} +2 -2
- package/dist/{chunk-ZTRKM3B5.js → chunk-OG53D3R5.js} +9 -9
- package/dist/{chunk-OFYNPYY2.js → chunk-OGWQABFP.js} +1 -1
- package/dist/{chunk-EDX55XGV.js → chunk-OLCRYT3N.js} +8 -8
- package/dist/chunk-OQ6TECLX.js +6 -0
- package/dist/{chunk-DQMRPTGY.js → chunk-P54AD2EM.js} +3 -3
- package/dist/{chunk-J2YURAQY.js → chunk-QG37GJP2.js} +6 -6
- package/dist/{chunk-42XSMAIK.js → chunk-QI4235JY.js} +1 -1
- package/dist/{chunk-JTGRLXZN.js → chunk-QMSINDXL.js} +1 -1
- package/dist/{chunk-H32UNWVU.js → chunk-QPSJYSET.js} +5 -5
- package/dist/{chunk-35CKKH2S.js → chunk-QTXXHKAV.js} +1 -1
- package/dist/{chunk-HJF4UZOA.js → chunk-QZCLHKCI.js} +8 -8
- package/dist/{chunk-3ZQT26GZ.js → chunk-R62JKPYY.js} +1 -1
- package/dist/{chunk-5DQE6RQJ.js → chunk-RKXCB5ZJ.js} +1 -1
- package/dist/{chunk-6A26HUVK.js → chunk-RY7JCGLI.js} +1 -1
- package/dist/{chunk-GOEHP2XM.js → chunk-S7MNRAYS.js} +4 -4
- package/dist/{chunk-YVHEKEHJ.js → chunk-SET3R227.js} +1 -1
- package/dist/chunk-SFULX4E3.js +7 -0
- package/dist/{chunk-YK64FFLW.js → chunk-SSNTJ3M4.js} +4 -4
- package/dist/{chunk-3FNBUOZK.js → chunk-SY66VJAI.js} +1 -1
- package/dist/{chunk-4I4WZHMV.js → chunk-T2TZBTSM.js} +1 -1
- package/dist/{chunk-ZICGXJUB.js → chunk-THLXDI76.js} +8 -8
- package/dist/{chunk-MJVFIH3J.js → chunk-TKUJUQK4.js} +9 -9
- package/dist/chunk-TM4CRQ3W.js +19 -0
- package/dist/chunk-UP4HLGMZ.js +9 -0
- package/dist/{chunk-WLUJQLXG.js → chunk-UR2ECNBB.js} +1 -1
- package/dist/{chunk-OVD3ECM7.js → chunk-VLMBXPRM.js} +1 -1
- package/dist/{chunk-MRLXGLNZ.js → chunk-VQ4X3OBR.js} +1 -1
- package/dist/chunk-WLX24TG6.js +14 -0
- package/dist/{chunk-PDA77NNC.js → chunk-X34ZBXIU.js} +3 -3
- package/dist/{chunk-TKPUYQ3Q.js → chunk-XQNZJNEJ.js} +73 -73
- package/dist/{chunk-JOAKKXTL.js → chunk-XZXFUZIK.js} +3 -2
- package/dist/{chunk-56XKHWNL.js → chunk-Y523KUQC.js} +1 -1
- package/dist/{chunk-ILIPEY3D.js → chunk-YI6SYUAK.js} +1 -1
- package/dist/{chunk-B2KQ3T7Q.js → chunk-YIUWX2IU.js} +6 -6
- package/dist/{chunk-PJE75B66.js → chunk-YRY64DQV.js} +1 -1
- package/dist/{chunk-I3TVRNUT.js → chunk-Z3CTYK3U.js} +1 -1
- package/dist/{chunk-YTZFWV2W.js → chunk-ZLKEPDJE.js} +1 -1
- package/dist/chunk-ZQ24H5UO.js +13 -0
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/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/PositionInput.js +1 -1
- package/dist/forms/RenameField.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/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +493 -493
- package/dist/map/index.js +2 -2
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.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/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-4VBPCGRP.js +0 -29
- package/dist/Files-V67UDEO6.js +0 -141
- package/dist/chunk-25QDSYH5.js +0 -13
- package/dist/chunk-3PSLQJWR.js +0 -1
- package/dist/chunk-5QYKF7NK.js +0 -27
- package/dist/chunk-L7MWAC2P.js +0 -6
- package/dist/chunk-PMBCQWJW.js +0 -4
- package/dist/chunk-PZSVISYY.js +0 -28
- package/dist/chunk-QBWMWK2W.js +0 -7
- package/dist/chunk-RMKC5POE.js +0 -3
- package/dist/chunk-S3OCHYGE.js +0 -14
- package/dist/chunk-VJXPT53M.js +0 -19
- package/dist/chunk-YFUY3VDW.js +0 -9
- /package/dist/{chunk-2VFSYSDS.js → chunk-5WK56FA3.js} +0 -0
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-GMHMWDXU.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{DashboardTemplate}from"../chunk-2NZ7CVMW.js";export{DataTablePage}from"../chunk-MFJHLC5M.js";export{EmailTemplate}from"../chunk-3A6FYWFQ.js";export{ErrorBoundary}from"../chunk-VFHKD7TQ.js";export{ErrorPage}from"../chunk-75H4BWNC.js";export{FormLayoutPage}from"../chunk-PJE75B66.js";export{GalleryTemplate}from"../chunk-4PIQG2ZK.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-H4ABSQS6.js";export{ChatTemplate}from"../chunk-5DQE6RQJ.js";export{CheckoutTemplate}from"../chunk-HYPYNVQQ.js";export{TopNav}from"../chunk-MBCUICY3.js";export{Statistic}from"../chunk-Z66QBDNU.js";export{Stepper}from"../chunk-3FNBUOZK.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-I5EVMLPB.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-ZGWXSHVM.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-XG5ER6GJ.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-XKJGJNY2.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-7X2P6IH3.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-DCNSQGHJ.js";export{ResizeHandle}from"../chunk-OOWPLQD5.js";export{SettingReset}from"../chunk-5MH5N76F.js";export{SettingRow}from"../chunk-4BKJ6A5H.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-24LO6OH4.js";export{MetricBar}from"../chunk-7K3FYCRZ.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-YO26RV3H.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BHHFVIAD.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-CMJD5URC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{PageHeader}from"../chunk-6A26HUVK.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-N2445WHJ.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-HGOWQO63.js";export{HelpCenter}from"../chunk-YK64FFLW.js";export{IconRail,IconRailButton}from"../chunk-CBVKGAZH.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-OM6VWUAZ.js";export{EditableGrid}from"../chunk-SE6IQZYW.js";export{Avatar,AvatarGroup}from"../chunk-WESNFWM4.js";export{BudgetBar,budgetState}from"../chunk-4LOHQ4QB.js";export{Card,StatCard}from"../chunk-CEIIQRK5.js";export{ContainerFillChart}from"../chunk-SR4W2SYQ.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-7ZJRBFHA.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-W2663E4S.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-KSMEWOCE.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{WidthsBar}from"../chunk-NKP5WCEA.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-H32UNWVU.js";export{SplitButton_default as SplitButton}from"../chunk-RMKC5POE.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-B2KQ3T7Q.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-L7MWAC2P.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-56XKHWNL.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-VBLCYL4L.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-Z62RBVEJ.js";export{UnitMenu}from"../chunk-YVHEKEHJ.js";export{Slider,SliderGroup}from"../chunk-I76W4ZNU.js";export{LinkPicker,TextLinkField}from"../chunk-S3OCHYGE.js";export{SearchableSelect}from"../chunk-25QDSYH5.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FILE_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary,readMediaFileDrag}from"../chunk-PZSVISYY.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-EDX55XGV.js";import"../chunk-RF3ZFTAU.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-4I4WZHMV.js";export{ImageLightbox,lightboxKind}from"../chunk-DVYBJOD3.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-YFUY3VDW.js";export{Breadcrumbs}from"../chunk-JTGRLXZN.js";export{mediaLibraryMenu}from"../chunk-MRLXGLNZ.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-NOGSS432.js";export{RenameField}from"../chunk-LNZMA4PB.js";export{NativeSelect,Select_default as Select}from"../chunk-VJXPT53M.js";import"../chunk-EO5RLFRX.js";import"../chunk-RAOM3WIQ.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-ZTRKM3B5.js";export{MediaUsedInList}from"../chunk-LQVQX5B2.js";export{NumericKeypad}from"../chunk-TYQ2JL4J.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-GCTJIZTJ.js";export{PositionInput}from"../chunk-42XSMAIK.js";export{FormErrorSummary}from"../chunk-QADNVFV5.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{CornersInput}from"../chunk-GOEHP2XM.js";export{DatePicker_default as DatePicker}from"../chunk-WYGUHCJ2.js";export{DateRangePicker,toISODate}from"../chunk-ZE7OVMDM.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-VEQ45GAH.js";export{DisplayChips}from"../chunk-JAVTQART.js";export{FilePicker_default as FilePicker}from"../chunk-VYRVSTI6.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-3DWVSQIJ.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-ZQT3GNRU.js";export{IconPicker}from"../chunk-PDA77NNC.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-MJVFIH3J.js";export{Popover}from"../chunk-64RHGJXK.js";export{InputNumber_default as InputNumber}from"../chunk-RMDVKQJE.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BrandAssetEditor}from"../chunk-GJLN4NRB.js";export{MediaUploadField}from"../chunk-4KXATGI3.js";export{Segmented}from"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";export{ImageFocusPoint}from"../chunk-232YPI2L.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar}from"../chunk-QPYVCG74.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{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.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{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{Kanban}from"../chunk-JFGJJNT2.js";export{useSort}from"../chunk-E6FDUFPH.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-XKNKRKHH.js";export{Pagination}from"../chunk-WPG3ZHYT.js";export{EntityList}from"../chunk-UULBPDAH.js";import"../chunk-Y7KDCC6E.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{ListFooter}from"../chunk-XHSMDUEW.js";export{ListLoadError}from"../chunk-ILIPEY3D.js";export{ResizableTable}from"../chunk-FQHPGREQ.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{TreemapChart}from"../chunk-A4PFVMQ2.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-DGHSCKOE.js";export{RangeChart}from"../chunk-4IHYWLWE.js";export{RankedBars}from"../chunk-RZ2DWX4N.js";export{SankeyChart}from"../chunk-WNOXHJVT.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-4Y33Y4OX.js";export{StatTile}from"../chunk-GEVNBBM7.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-YX2OOGV7.js";export{FunnelChart}from"../chunk-FI6IJTAJ.js";export{HeatmapChart}from"../chunk-T7D73HT7.js";export{HistogramChart}from"../chunk-VDYF3WPJ.js";export{Meter}from"../chunk-LIWBCIRZ.js";export{PieChart}from"../chunk-VP2GI3UP.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DG2TGWXI.js";export{RadialBarChart}from"../chunk-FVKXDF2Q.js";export{ChordChart}from"../chunk-574SLTKO.js";import"../chunk-HY6CBG4M.js";export{StepChain,StepChainItem}from"../chunk-3ZQT26GZ.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-2DQHXJPM.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Z5TE3MEG.js";export{ContextMenu,useContextMenu}from"../chunk-7ARBBWPQ.js";export{Banner}from"../chunk-YU52WMSH.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-I3TVRNUT.js";export{Input_default as Input}from"../chunk-ZKGUBIBT.js";export{DropdownMenu}from"../chunk-QBWMWK2W.js";import"../chunk-W7DYKTHE.js";export{IconButton_default as IconButton}from"../chunk-SV5RRBVA.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-OVD3ECM7.js";export{TransferProgress}from"../chunk-FJVZ2W55.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-V4XR4MOS.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-EEB5XPWP.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-XQWHKXLS.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-6TIJH2M6.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-TU2L7NW3.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-RBS3AWE7.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-GC4N4UQM.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-WXZZGHET.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-74JMBOQH.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-Y6E7IRK2.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-5QYKF7NK.js";export{Dialog}from"../chunk-PMBCQWJW.js";export{ItemCount}from"../chunk-MWTCGJAI.js";import"../chunk-RIG5FEVS.js";import"../chunk-2VFSYSDS.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-WQ4YKWN2.js";import"../chunk-JZBLOIL7.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-3PSLQJWR.js";export{useFocusTrap,useScrollLock}from"../chunk-DWGYC7OD.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-JMGDGNM7.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-ZICGXJUB.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";export{Icon}from"../chunk-JOAKKXTL.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";export{Tooltip}from"../chunk-SOZCWT6I.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{UNDOABLE_MS,toast_default as toast}from"../chunk-3YBXA72C.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-KAKJ7ENS.js";export{CandlestickChart}from"../chunk-GUHCKMC7.js";export{CartesianPlot}from"../chunk-ENFXDIIZ.js";import"../chunk-2DYVVHZA.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{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-JSHMIMAJ.js";import"../chunk-C3QOHMR6.js";
|
|
2
|
+
import"../chunk-GMHMWDXU.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{DashboardTemplate}from"../chunk-2NZ7CVMW.js";export{DataTablePage}from"../chunk-34EBBZFK.js";export{EmailTemplate}from"../chunk-HOEHV2J5.js";export{ErrorBoundary}from"../chunk-VFHKD7TQ.js";export{ErrorPage}from"../chunk-75H4BWNC.js";export{FormLayoutPage}from"../chunk-YRY64DQV.js";export{GalleryTemplate}from"../chunk-4PIQG2ZK.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-L543DFHF.js";export{ChatTemplate}from"../chunk-RKXCB5ZJ.js";export{CheckoutTemplate}from"../chunk-JN5NUZ6D.js";export{TopNav}from"../chunk-ILDPJ26Y.js";export{Statistic}from"../chunk-Z66QBDNU.js";export{Stepper}from"../chunk-SY66VJAI.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-I5EVMLPB.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-ZGWXSHVM.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-JGRDG7CB.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-B4GRHE44.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-6GWYFUME.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-4ZLFAXOC.js";export{ResizeHandle}from"../chunk-OOWPLQD5.js";export{SettingReset}from"../chunk-I7JU4IU3.js";export{SettingRow}from"../chunk-F4XGUOVL.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-4ZRGMK7Y.js";export{MetricBar}from"../chunk-7K3FYCRZ.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-YO26RV3H.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BHHFVIAD.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-CMJD5URC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-7TC3LJQM.js";export{PageHeader}from"../chunk-RY7JCGLI.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-7KWYVQMX.js";export{GlobalSearch,openGlobalSearch}from"../chunk-N2445WHJ.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-HGOWQO63.js";export{HelpCenter}from"../chunk-SSNTJ3M4.js";export{IconRail,IconRailButton}from"../chunk-CBVKGAZH.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-OM6VWUAZ.js";export{EditableGrid}from"../chunk-SE6IQZYW.js";export{Avatar,AvatarGroup}from"../chunk-WESNFWM4.js";export{BudgetBar,budgetState}from"../chunk-4LOHQ4QB.js";export{Card,StatCard}from"../chunk-CEIIQRK5.js";export{ContainerFillChart}from"../chunk-SR4W2SYQ.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-7ZJRBFHA.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-W2663E4S.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-3J3FBYIZ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-HNBMBC77.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-VBLCYL4L.js";export{WidthsBar}from"../chunk-MFEPLP7Y.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-DTSOYFQE.js";export{UnitMenu}from"../chunk-SET3R227.js";export{Slider,SliderGroup}from"../chunk-FBUFB536.js";export{Snippet}from"../chunk-QPSJYSET.js";export{SplitButton_default as SplitButton}from"../chunk-LCEQIFPK.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-YIUWX2IU.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-OQ6TECLX.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-Y523KUQC.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";export{PictureTiles}from"../chunk-GCTJIZTJ.js";export{PositionInput}from"../chunk-QI4235JY.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{LinkPicker,TextLinkField}from"../chunk-WLX24TG6.js";export{SearchableSelect}from"../chunk-ZQ24H5UO.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-EEGTFJUQ.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-OLCRYT3N.js";import"../chunk-RF3ZFTAU.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-T2TZBTSM.js";export{ImageLightbox,lightboxKind}from"../chunk-436PJFHC.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-UP4HLGMZ.js";export{Breadcrumbs}from"../chunk-QMSINDXL.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{mediaLibraryMenu}from"../chunk-VQ4X3OBR.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-NOGSS432.js";export{RenameField}from"../chunk-GEZM6ARD.js";export{NativeSelect,Select_default as Select}from"../chunk-TM4CRQ3W.js";import"../chunk-EO5RLFRX.js";import"../chunk-GLRRX4AL.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-OG53D3R5.js";export{MediaUsedInList}from"../chunk-FQ4IRBMA.js";export{NumericKeypad}from"../chunk-TYQ2JL4J.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{DisplayChips}from"../chunk-3JL4TCA7.js";export{FilePicker_default as FilePicker}from"../chunk-KBI3T6UC.js";export{FormErrorSummary}from"../chunk-QADNVFV5.js";export{CornersInput}from"../chunk-S7MNRAYS.js";export{DatePicker_default as DatePicker}from"../chunk-N32LNPPP.js";export{DateRangePicker,toISODate}from"../chunk-BM2QIV64.js";export{Calendar}from"../chunk-CCK2UWQ5.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-VEQ45GAH.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{fromDateKey,toDateKey}from"../chunk-2HMNOLKX.js";export{AlignmentGrid}from"../chunk-3DWVSQIJ.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-NAN2IW2H.js";export{IconPicker}from"../chunk-X34ZBXIU.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-TKUJUQK4.js";export{Popover}from"../chunk-64RHGJXK.js";export{InputNumber_default as InputNumber}from"../chunk-FE5DH5OM.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BORDER_LINE_STYLES}from"../chunk-NOMWJTN2.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{BrandAssetEditor}from"../chunk-L2Y6FZTA.js";export{MediaUploadField}from"../chunk-BDGYRQQE.js";export{Segmented}from"../chunk-HNIIDDLJ.js";import"../chunk-EFKJLUYP.js";export{FormField}from"../chunk-6KBDNYRW.js";export{ImageFocusPoint}from"../chunk-232YPI2L.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Kanban}from"../chunk-JFGJJNT2.js";export{useSort}from"../chunk-E6FDUFPH.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-XKNKRKHH.js";export{Pagination}from"../chunk-WPG3ZHYT.js";export{EntityList}from"../chunk-KP2JYXEU.js";import"../chunk-Y7KDCC6E.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{ListFooter}from"../chunk-XHSMDUEW.js";export{ListLoadError}from"../chunk-YI6SYUAK.js";export{ResizableTable}from"../chunk-3E3LR2PM.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{TreemapChart}from"../chunk-A4PFVMQ2.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-DGHSCKOE.js";export{RangeChart}from"../chunk-4IHYWLWE.js";export{RankedBars}from"../chunk-RZ2DWX4N.js";export{SankeyChart}from"../chunk-WNOXHJVT.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-4Y33Y4OX.js";export{StatTile}from"../chunk-GEVNBBM7.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-YX2OOGV7.js";export{FunnelChart}from"../chunk-FI6IJTAJ.js";export{HeatmapChart}from"../chunk-T7D73HT7.js";export{HistogramChart}from"../chunk-VDYF3WPJ.js";export{Meter}from"../chunk-LIWBCIRZ.js";export{PieChart}from"../chunk-VP2GI3UP.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DG2TGWXI.js";export{RadialBarChart}from"../chunk-FVKXDF2Q.js";export{ChordChart}from"../chunk-574SLTKO.js";import"../chunk-HY6CBG4M.js";export{StepChain,StepChainItem}from"../chunk-R62JKPYY.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-LPPJNZQ6.js";export{Divider}from"../chunk-DFOFEBYX.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Z5TE3MEG.js";export{ContextMenu,useContextMenu}from"../chunk-6FZ5JTBY.js";export{Banner}from"../chunk-N3R6N7LG.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-Z3CTYK3U.js";export{Input_default as Input}from"../chunk-6RK6R3RY.js";export{DropdownMenu}from"../chunk-SFULX4E3.js";import"../chunk-FTMCNC66.js";export{IconButton_default as IconButton}from"../chunk-SV5RRBVA.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-VLMBXPRM.js";export{TransferProgress}from"../chunk-FJVZ2W55.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-V4XR4MOS.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-EEB5XPWP.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-XQWHKXLS.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-DCCYUCBM.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-TU2L7NW3.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-RBS3AWE7.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-GC4N4UQM.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-WXZZGHET.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-74JMBOQH.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-DK5SXOXJ.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-HMT3MES3.js";export{Dialog}from"../chunk-D2WJAF62.js";export{ItemCount}from"../chunk-MWTCGJAI.js";import"../chunk-RIG5FEVS.js";import"../chunk-5WK56FA3.js";import"../chunk-VWGWZY7A.js";import"../chunk-7QSDPSXP.js";export{ColoredBadge}from"../chunk-CJHYOHMU.js";import"../chunk-JZBLOIL7.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-L4QGZ26E.js";export{useFocusTrap,useScrollLock}from"../chunk-DWGYC7OD.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-JMGDGNM7.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-THLXDI76.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";export{Icon}from"../chunk-XZXFUZIK.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";export{Tooltip}from"../chunk-SOZCWT6I.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{UNDOABLE_MS,toast_default as toast}from"../chunk-3YBXA72C.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-KAKJ7ENS.js";export{CandlestickChart}from"../chunk-GUHCKMC7.js";export{CartesianPlot}from"../chunk-ENFXDIIZ.js";import"../chunk-2DYVVHZA.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{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-JSHMIMAJ.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-L4QGZ26E.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.20.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-YTZFWV2W.js";import{useWidgetSettings as n}from"./chunk-TKPUYQ3Q.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y6E7IRK2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-WLUJQLXG.js";import"./chunk-5QYKF7NK.js";import"./chunk-PMBCQWJW.js";import"./chunk-MWTCGJAI.js";import"./chunk-RIG5FEVS.js";import"./chunk-2VFSYSDS.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-WQ4YKWN2.js";import"./chunk-JZBLOIL7.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-ZICGXJUB.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as r}from"./chunk-JOAKKXTL.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-JSHMIMAJ.js";import"./chunk-C3QOHMR6.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,x]=c(""),[C,f]=c([]),[v,$]=c(!1),[W,J]=c(()=>e(h)),[T,S]=c(!1),[E,D]=c(W),M=i(null);n(o(()=>{D({...W}),S(!0)},[W]));const Q=o(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),F=o(()=>{k("0"),d(null),g(null),N(!1)},[]),G=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}},[]),K=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=G(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,G]),w=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=G(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,G]),A=o(()=>{k(e=>String(parseFloat(e)/100))},[]),U=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"?Q(e.key):"."===e.key?Q("."):"+"===e.key?K("+"):"-"===e.key?K("-"):"*"===e.key?K("×"):"/"===e.key?(e.preventDefault(),K("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&M.current?.contains(e.target)&&e.preventDefault(),w()):"Escape"===e.key?F():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&A())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[Q,K,w,F,A]);const Y="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",L=`${Y} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,X=`${Y} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,Z=`${Y} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,B=`${Y} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return l(a,{children:[
|
|
3
|
-
/* @__PURE__ */l("div",{ref:M,className:"flex flex-col h-full",style:{opacity:W.activeOpacity/100,backdropFilter:W.activeBlur>0?`blur(${W.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:C.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:F,className:Z,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:U,className:Z,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:A,className:Z,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>K("÷"),className:`${X} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("7"),className:L,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("8"),className:L,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("9"),className:L,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>K("×"),className:`${X} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("4"),className:L,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("5"),className:L,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("6"),className:L,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>K("-"),className:`${X} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("1"),className:L,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("2"),className:L,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("3"),className:L,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>K("+"),className:`${X} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("0"),className:`${L} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>Q("."),className:L,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:w,className:B,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:T,onClose:()=>S(!1),title:"Calculator Settings",appearance:E,onAppearanceChange:D,onSave:()=>{J(E),localStorage.setItem(h,JSON.stringify(E)),S(!1)}})]})}export{m as default};
|
package/dist/Files-V67UDEO6.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-T3JSUBIF.js";import{SidebarLayout as t}from"./chunk-XG5ER6GJ.js";import"./chunk-QWK6DRSN.js";import"./chunk-OOWPLQD5.js";import{SearchableSelect as n}from"./chunk-25QDSYH5.js";import{Breadcrumbs as a}from"./chunk-JTGRLXZN.js";import{Select_default as r}from"./chunk-VJXPT53M.js";import"./chunk-EO5RLFRX.js";import"./chunk-RAOM3WIQ.js";import"./chunk-2NMW66P5.js";import{useContextMenu as i,ContextMenu as s}from"./chunk-7ARBBWPQ.js";import{Input_default as l}from"./chunk-ZKGUBIBT.js";import{DropdownMenu as o}from"./chunk-QBWMWK2W.js";import"./chunk-W7DYKTHE.js";import{IconButton_default as c}from"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{formatBytes as d}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as m,subscribeFilesChoice as h,getFilesChoice as u,holdFilesChoice as f,answerFilesChoice as p,choiceTakes as g}from"./chunk-XJW65EIG.js";import{AboutApp as k}from"./chunk-DQMRPTGY.js";import{getFilesStore as w,peekFilesViewRequest as y,consumeFilesViewRequest as v,FILES_SHOW_TRASH_EVENT as b,FILES_OPEN_DESKTOP_FOLDER_EVENT as x,subscribeDesktopFolders as N,getDesktopFoldersSnapshot as C,hasHostFilesStore as S,FolderGlyph as j,DesktopItemMiniIcon as D,desktopItemTypeLabel as M,FilesQuotaError as T,FILES_OFFICE_EXTENSIONS as $}from"./chunk-J2YURAQY.js";import"./chunk-ESL5TDNA.js";import{useWindowManager as L,WindowTitle as W}from"./chunk-TKPUYQ3Q.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y6E7IRK2.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-WLUJQLXG.js";import{confirm as R,prompt as A}from"./chunk-5QYKF7NK.js";import{Dialog as P}from"./chunk-PMBCQWJW.js";import{ItemCount as E}from"./chunk-MWTCGJAI.js";import"./chunk-RIG5FEVS.js";import"./chunk-2VFSYSDS.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-WQ4YKWN2.js";import"./chunk-JZBLOIL7.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-3PSLQJWR.js";import"./chunk-DWGYC7OD.js";import"./chunk-JMGDGNM7.js";import"./chunk-ZICGXJUB.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import{Button_default as F}from"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as z}from"./chunk-JOAKKXTL.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as K}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as O}from"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import{toast_default as I}from"./chunk-3YBXA72C.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-JSHMIMAJ.js";import"./chunk-C3QOHMR6.js";import{useState as U,useRef as Y,useEffect as J,useCallback as Q,useSyncExternalStore as G,useMemo as B}from"react";import{jsxs as V,jsx as X,Fragment as H}from"react/jsx-runtime";var Z={doc:"document",docx:"document",odt:"document",rtf:"document",txt:"document",md:"document",xls:"spreadsheet",xlsx:"spreadsheet",ods:"spreadsheet",csv:"spreadsheet",sheet:"spreadsheet",ppt:"slides",pptx:"slides",odp:"slides",key:"slides",slides:"slides",pdf:"pdf",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",heic:"image",tif:"image",tiff:"image",mp4:"video",mov:"video",webm:"video",avi:"video",mkv:"video",mp3:"audio",wav:"audio",m4a:"audio",ogg:"audio",flac:"audio",zip:"archive",rar:"archive","7z":"archive",gz:"archive",tar:"archive",dxf:"drawing",dwg:"drawing",stp:"drawing",step:"drawing",stl:"drawing",obj:"drawing",iges:"drawing",igs:"drawing","3mf":"drawing",glb:"drawing",gltf:"drawing"};function q(e){const t=e.lastIndexOf(".");return t>0?e.slice(t+1).toLowerCase():""}function _(e){if("folder"===e.kind)return"folder";if("document"===e.officeKind)return"document";if("spreadsheet"===e.officeKind)return"spreadsheet";if("deck"===e.officeKind)return"slides";const t=e.contentType??"";return"application/pdf"===t?"pdf":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":Z[q(e.name)]??"other"}var ee={folder:"Folder",document:"Document",spreadsheet:"Spreadsheet",slides:"Slides",pdf:"PDF",image:"Image",video:"Video",audio:"Audio",archive:"Archive",drawing:"Drawing",other:"File"},te={folder:{name:"folder",tone:"muted"},document:{name:"document",tone:"accent"},spreadsheet:{name:"table",tone:"success"},slides:{name:"presentation-chart-bar",tone:"warning"},pdf:{name:"document",tone:"danger"},image:{name:"image",tone:"muted"},video:{name:"play",tone:"muted"},audio:{name:"speaker-wave",tone:"muted"},archive:{name:"archive-box",tone:"muted"},drawing:{name:"cube-transparent",tone:"muted"},other:{name:"page",tone:"muted"}};function ne(e){const t=e.officeKind?$[e.officeKind]:"";return t&&e.name.toLowerCase().endsWith(t)&&e.name.length>t.length?e.name.slice(0,-t.length):e.name}function ae(e){return"folder"===e.kind||e.officeKind&&e.size<=2?"—":d(e.size)}function re(e,t=/* @__PURE__ */new Date){if(!e)return"—";const n=new Date(e);return isNaN(n.getTime())?"—":n.toDateString()===t.toDateString()?n.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}):n.getFullYear()===t.getFullYear()?n.toLocaleDateString(void 0,{day:"numeric",month:"short"}):n.toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}function ie(e){return"owner"===(e.role??"owner")?"me":e.owner?.name??"—"}var se=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function le(e,t){const n="asc"===t.dir?1:-1;return[...e].sort((e,a)=>e.kind!==a.kind?"folder"===e.kind?-1:1:n*((e,n)=>{switch(t.key){case"owner":return se.compare(ie(e),ie(n));case"size":return e.size-n.size;case"modified":return(Date.parse(e.modifiedAt)||0)-(Date.parse(n.modifiedAt)||0);default:return se.compare(ne(e),ne(n))}})(e,a)||se.compare(e.name,a.name))}var oe=["folder","document","spreadsheet","slides","pdf","image","video"],ce={today:"Today",week:"Last 7 days",month:"Last 30 days",year:"This year"};function de(e,t,n=/* @__PURE__ */new Date){const a=t.modified?function(e,t){const n=new Date(t);return n.setHours(0,0,0,0),"week"===e&&n.setDate(n.getDate()-6),"month"===e&&n.setDate(n.getDate()-29),"year"===e&&n.setMonth(0,1),n.getTime()}(t.modified,n):null;return e.filter(e=>{if(t.type&&_(e)!==t.type)return!1;if(t.person){const n="owner"===(e.role??"owner");if("me"===t.person?!n:n||e.owner?.id!==t.person)return!1}return null===a||(Date.parse(e.modifiedAt)||0)>=a})}var me=[{value:"viewer",label:"Viewer"},{value:"editor",label:"Editor"}];function he({store:e,entry:t,onClose:a,onChanged:i}){const[s,l]=U(null),[o,d]=U(""),[m,h]=U([]),[u,f]=U(!1),[p,g]=U(""),[k,w]=U("viewer"),[y,v]=U(!1),b=Y(/* @__PURE__ */new Map),x=t?.id??null;if(J(()=>{if(l(null),g(""),d(""),!x||!e.shares)return;let t=!0;return e.shares(x).then(e=>{t&&l(e)}).catch(e=>{t&&(I.error(e.message),l([]))}),()=>{t=!1}},[x,e]),J(()=>{if(!e.searchPeople||!x)return;let t=!0;f(!0);const n=setTimeout(()=>{e.searchPeople(o).then(e=>{if(t){for(const t of e)b.current.set(t.id,t);h(e)}}).catch(()=>{t&&h([])}).finally(()=>{t&&f(!1)})},250);return()=>{t=!1,clearTimeout(n)}},[o,x,e]),!t)return null;const N=new Set((s??[]).map(e=>e.person.id)),C=m.filter(e=>!N.has(e.id)).map(e=>({value:e.id,label:e.name})),S=async n=>{v(!0);try{await n(),l(await e.shares(t.id)),i()}catch(e){I.error(e.message)}finally{v(!1)}};/* @__PURE__ */
|
|
2
|
-
return V(P,{open:!0,onClose:a,size:"md",title:`Share “${t.name}”`,description:"folder"===t.kind?"Everything inside this folder is shared too. Editors’ uploads count toward your quota.":"Viewers can open and download it. Editors can also replace, rename and delete it.",footer:/* @__PURE__ */X(F,{variant:"secondary",onClick:a,children:"Done"}),children:[
|
|
3
|
-
/* @__PURE__ */V("div",{className:"flex items-center gap-2",children:[
|
|
4
|
-
/* @__PURE__ */X("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */X(n,{value:p,onChange:g,onSearchChange:d,loading:u&&0===m.length,options:C,placeholder:"Search colleagues by name","aria-label":"Colleague to share with"})}),
|
|
5
|
-
/* @__PURE__ */X("div",{className:"w-28 shrink-0",children:/* @__PURE__ */X(r,{value:k,onChange:e=>w(e),options:me,"aria-label":"Access"})}),
|
|
6
|
-
/* @__PURE__ */X(F,{variant:"primary",onClick:()=>{if(!p||!e.share)return;const n=b.current.get(p);S(async()=>{await e.share(t.id,p,k),g(""),d(""),n&&I.success(`Shared with ${n.name}`)})},disabled:!p||y,children:"Add"})]}),
|
|
7
|
-
/* @__PURE__ */X("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===s?/* @__PURE__ */X(K,{size:"sm",padding:"p-4",label:"Loading"}):/* @__PURE__ */V("ul",{className:"divide-y divide-line-subtle text-sm",children:[
|
|
8
|
-
/* @__PURE__ */V("li",{className:"flex items-center gap-2 h-10",children:[
|
|
9
|
-
/* @__PURE__ */X("span",{className:"flex-1 truncate",children:"You"}),
|
|
10
|
-
/* @__PURE__ */X("span",{className:"text-xs text-ink-faint",children:"Owner"})]}),s.map(n=>/* @__PURE__ */V("li",{className:"flex items-center gap-2 h-10",children:[
|
|
11
|
-
/* @__PURE__ */X("span",{className:"flex-1 truncate",title:n.person.name,children:n.person.name}),
|
|
12
|
-
/* @__PURE__ */X("div",{className:"w-28 shrink-0",children:/* @__PURE__ */X(r,{value:n.role,onChange:a=>S(()=>e.share(t.id,n.person.id,a)),options:me,"aria-label":`Access for ${n.person.name}`,disabled:y})}),
|
|
13
|
-
/* @__PURE__ */X(c,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:y,onClick:()=>S(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4",strokeWidth:1.8})})]},n.person.id))]})]})}function ue({store:e,items:t,from:n,onClose:a,onMove:r}){const[i,s]=U(n??null),[l,o]=U(null),[d,m]=U(!1);J(()=>{t&&s(n??null)},[t,n]),J(()=>{if(!t)return;let n=!0;return m(!0),e.list(i).then(e=>{n&&o(e)}).catch(()=>{n&&o(null)}).finally(()=>{n&&m(!1)}),()=>{n=!1}},[e,i,t]);const h=new Set((t??[]).map(e=>e.id)),u=(l?.entries??[]).filter(e=>"folder"===e.kind&&!h.has(e.id)),f=(l?.folder.path??[]).filter(e=>null!==e.id),p=f.length>1?f[f.length-2].id:null,g=l?.folder,k="viewer"!==(g?.role??"owner"),w=void 0!==n&&i===n,y=t?.length??0,v=1===y?`"${t[0].name}"`:`${y} items`;/* @__PURE__ */
|
|
14
|
-
return V(P,{open:!!t,onClose:a,title:`Move ${v}`,size:"sm",footer:/* @__PURE__ */V(H,{children:[
|
|
15
|
-
/* @__PURE__ */X(F,{variant:"secondary",onClick:a,children:"Cancel"}),
|
|
16
|
-
/* @__PURE__ */X(F,{variant:"primary",onClick:()=>r(i),disabled:d||!k||w,children:"Move here"})]}),children:[
|
|
17
|
-
/* @__PURE__ */V("div",{className:"flex items-center gap-1 mb-2 min-h-8",children:[null!==i&&/* @__PURE__ */X(c,{"aria-label":"Back",size:"sm",onClick:()=>s(p),children:/* @__PURE__ */X(z,{name:"arrow-left",className:"h-4 w-4"})}),
|
|
18
|
-
/* @__PURE__ */X("span",{className:"text-sm font-medium text-ink-strong truncate",children:null===i?"My files":g?.name??""})]}),
|
|
19
|
-
/* @__PURE__ */X("div",{className:"border border-line rounded-(--radius-control) h-64 overflow-auto",children:d?/* @__PURE__ */X(K,{size:"sm",padding:"p-6",label:"Loading"}):0===u.length?/* @__PURE__ */X("div",{className:"p-6 text-center text-sm text-ink-faintest",children:"No folders here."}):/* @__PURE__ */X("ul",{children:u.map(e=>/* @__PURE__ */X("li",{children:/* @__PURE__ */V("button",{type:"button",onClick:()=>s(e.id),className:"flex w-full items-center gap-2 px-3 h-9 text-left text-sm hover:bg-row-hover",children:[
|
|
20
|
-
/* @__PURE__ */X(z,{name:"folder",look:"solid",tone:"muted",className:"h-4 w-4 shrink-0"}),
|
|
21
|
-
/* @__PURE__ */X("span",{className:"truncate flex-1",children:e.name}),
|
|
22
|
-
/* @__PURE__ */X(z,{name:"chevron-right",tone:"muted",className:"h-4 w-4 shrink-0"})]})},e.id))})}),!k&&/* @__PURE__ */X("p",{className:"mt-2 text-xs text-ink-faint",children:"You can view this folder but not move things into it."})]})}function fe({store:e,entry:t,selectedCount:n,onClose:a}){const[r,i]=U(null),[s,l]=U(null);J(()=>{if(i(null),l(null),!t)return;let n=!0;return e.info?.(t.id).then(e=>{n&&i(e)}).catch(()=>{}),e.shares?.(t.id).then(e=>{n&&l(e)}).catch(()=>{}),()=>{n=!1}},[e,t]);const o=t?_(t):null,d=o?te[o]:null,m=r?.path.slice(0,-1).map(e=>e.name||"My files").join(" / "),h=(e,t)=>t?/* @__PURE__ */V("div",{className:"py-2",children:[
|
|
23
|
-
/* @__PURE__ */X("dt",{className:"text-2xs text-ink-faint",children:e}),
|
|
24
|
-
/* @__PURE__ */X("dd",{className:"text-sm text-ink break-words",children:t})]}):null;/* @__PURE__ */
|
|
25
|
-
return V("aside",{className:"w-72 shrink-0 border-l border-line flex flex-col min-h-0 bg-surface","aria-label":"Details",children:[
|
|
26
|
-
/* @__PURE__ */V("div",{className:"flex items-center gap-2 px-3 h-12 shrink-0",children:[d&&/* @__PURE__ */X(z,{name:d.name,tone:d.tone,className:"h-5 w-5 shrink-0"}),
|
|
27
|
-
/* @__PURE__ */X("span",{className:"flex-1 truncate text-sm font-medium text-ink-strong",children:t?ne(t):n>1?`${n} items selected`:"Details"}),
|
|
28
|
-
/* @__PURE__ */X(c,{"aria-label":"Close details",size:"sm",onClick:a,children:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4"})})]}),
|
|
29
|
-
/* @__PURE__ */X("div",{className:"flex-1 overflow-auto px-4 pb-4",children:t?/* @__PURE__ */V(H,{children:[
|
|
30
|
-
/* @__PURE__ */X("div",{className:"h-32 rounded-(--radius-control) bg-surface-sunken flex items-center justify-center mb-3",children:d&&/* @__PURE__ */X(z,{name:d.name,tone:d.tone,className:"h-12 w-12"})}),s&&/* @__PURE__ */V("div",{className:"mb-3",children:[
|
|
31
|
-
/* @__PURE__ */X("div",{className:"text-xs font-medium text-ink-strong mb-1",children:"Who has access"}),0===s.length?/* @__PURE__ */V("p",{className:"text-sm text-ink-faint",children:["Only ","owner"!==t.role&&t.role?t.owner?.name??"its owner":"you"]}):/* @__PURE__ */X("ul",{className:"text-sm text-ink",children:s.map(e=>/* @__PURE__ */V("li",{className:"flex justify-between py-0.5",children:[
|
|
32
|
-
/* @__PURE__ */X("span",{className:"truncate",children:e.person.name}),
|
|
33
|
-
/* @__PURE__ */X("span",{className:"text-ink-faint text-xs",children:"editor"===e.role?"Editor":"Viewer"})]},e.person.id))})]}),
|
|
34
|
-
/* @__PURE__ */V("dl",{className:"border-t border-line pt-2",children:[h("Type",o?ee[o]:null),"file"===t.kind&&h("Size",ae(t)),h("Location",m),h("Owner","me"===ie(t)?"me":ie(t)),h("Modified",t.modifiedAt?`${re(t.modifiedAt)}${t.modifiedBy?` by ${t.modifiedBy.name}`:""}`:null),h("Created",r?.createdAt?re(r.createdAt):null)]})]}):/* @__PURE__ */X("p",{className:"pt-6 text-center text-sm text-ink-faintest",children:n>1?"Select one item to see its details.":"Select a file or folder to see its details."})})]})}var pe=e=>"recent"===e||"starred"===e||"shared"===e||"search"===e,ge="files.layout",ke={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"},we=[{kind:"document",label:"Document"},{kind:"spreadsheet",label:"Spreadsheet"},{kind:"deck",label:"Slides"}],ye="application/x-efficient-files";function ve(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 be(){try{return"grid"===localStorage.getItem(ge)?"grid":"list"}catch{return"list"}}function xe(e){const t=e??"/",n=t.split("/").filter(Boolean);let a=m()??[];for(const e of n){const t=a.find(t=>"folder"===t.kind&&t.name===e);a=t?.children??[]}return{folder:{id:e,name:n[n.length-1]??"",role:"owner",path:[{id:null,name:""},...n.map((e,t)=>({id:"/"+n.slice(0,t+1).join("/"),name:e}))]},entries:a.map(e=>({id:("/"===t?"":t)+"/"+e.name,name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}}function Ne(e,t){return`Not enough space for “${e}” (${d(t.attempted)}). You've used ${d(t.used)} of ${d(t.limit)}. Empty Trash or ask an administrator for more space.`}var Ce=(e,t)=>e instanceof Error&&e.message||t;function Se(e){const t=[];for(const n of e)("divider"!==n.type||0!==t.length&&"divider"!==t[t.length-1].type)&&t.push(n);for(;t.length&&"divider"===t[t.length-1].type;)t.pop();return t}function je({entry:e,className:t="h-5 w-5"}){const{name:n,tone:a}=te[_(e)];/* @__PURE__ */
|
|
35
|
-
return X(z,{name:n,tone:a,look:"folder"===e.kind?"solid":void 0,className:`${t} shrink-0`})}function De({entry:e,read:t}){const[n,a]=U(null),r="image"===_(e)&&e.size<=5242880;return J(()=>{if(!r||!t||"function"!=typeof URL.createObjectURL)return;let n=!0,i=null;return t(e.id).then(e=>{n&&(i=URL.createObjectURL(e),a(i))}).catch(()=>{}),()=>{n=!1,i&&URL.revokeObjectURL(i)}},[e.id,e.modifiedAt,r,t]),n?/* @__PURE__ */X("img",{src:n,alt:"",className:"h-full w-full object-cover",draggable:!1}):/* @__PURE__ */X(je,{entry:e,className:"h-10 w-10"})}function Me(){const n=w(),r=n.title??"Files",P=null!==m(),Z=!P&&!!n.shares&&!!n.sharedWithMe,[_,me]=U(null),[Me,Te]=U(null),[$e,Le]=U([]),[We,Re]=U(()=>/* @__PURE__ */new Set),Ae=Y(null),[Pe,Ee]=U(!0),[Fe,ze]=U(!1),[Ke,Oe]=U(null),[Ie,Ue]=U(!1),[Ye,Je]=U(null),[Qe,Ge]=U(null),[Be,Ve]=U(null),[Xe,He]=U(be),[Ze,qe]=U(!1),[_e,et]=U(""),[tt,nt]=U(""),[at,rt]=U({}),[it,st]=U({key:"name",dir:"asc"}),[lt,ot]=U(()=>{const e=y();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"}),ct=Y("files"),dt=Y(lt);dt.current=lt,J(()=>{v()},[]);const[mt,ht]=U([]),ut=e=>{He(e);try{localStorage.setItem(ge,e)}catch{}},ft=Q(e=>{ot(e),rt({}),st("recent"===e?{key:"modified",dir:"desc"}:{key:"name",dir:"asc"}),"search"!==e&&(et(""),nt(""))},[]);J(()=>{const e=()=>{v(),ft("trash")},t=e=>{v();const t=e.detail?.folderId;t&&ft({desktopFolderId:t})};return window.addEventListener(b,e),window.addEventListener(x,t),()=>{window.removeEventListener(b,e),window.removeEventListener(x,t)}},[ft]);const pt=G(N,C,C),gt="object"==typeof lt?lt.desktopFolderId:null,kt=gt?pt?.folders.find(e=>e.id===gt)??null:null,wt=gt&&pt?.itemsByFolder[gt]||[];J(()=>{gt&&pt&&!pt.folders.some(e=>e.id===gt)&&ft("files")},[gt,pt,ft]);const yt=Y(0),vt=Y(null),bt=Y(null),{openPage:xt,openEntity:Nt}=L(),Ct=i(),St=i(),jt=i(),Dt=G(h,u,u);J(()=>f(),[]),J(()=>{!Dt||"trash"!==lt&&"object"!=typeof lt||ft("files")},[Dt,lt,ft]);const Mt=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>xt(e)}):"page"===t.entityType?xt(t.entityId):Nt(t.entityType,t.entityId,null,t.label)},Tt=Q(async()=>{if(!P)try{Oe(await n.quota())}catch{}},[n,P]),$t=Q(async(e,t)=>{Ee(!0);try{await e(),ze(!1)}catch(e){e instanceof TypeError?ze(!0):I.error(Ce(e,t))}finally{Ee(!1)}},[]),Lt=Q(async e=>{if(P)return Te(xe(e)),ze(!1),void Ee(!1);await $t(async()=>{Te(await n.list(e))},"Failed to list"),Tt()},[n,Tt,P,$t]),Wt=Q(async(e,t)=>{if("search"===e&&!n.search){const e=t.toLowerCase(),a=P?xe(_):await n.list(_).catch(()=>null);return Le((a?.entries??[]).filter(t=>t.name.toLowerCase().includes(e))),void Ee(!1)}const a={recent:()=>n.recent?.()??Promise.resolve([]),starred:()=>n.starred?.()??Promise.resolve([]),shared:()=>n.sharedWithMe?.()??Promise.resolve([]),search:()=>n.search?.(t)??Promise.resolve([])}[e];await $t(async()=>{Le(await a())},"Failed to list files")},[n,P,_,$t]),Rt=Q(async()=>{if(P)return ht([]),void Ee(!1);await $t(async()=>{ht(await n.trash())},"Failed to list trash"),Tt()},[n,Tt,P,$t]),At=()=>{"files"===lt?Lt(_):pe(lt)?Wt(lt,tt):"trash"===lt&&Rt()};J(()=>{Re(/* @__PURE__ */new Set),Ae.current=null,At()},[_,lt,tt]),J(()=>{const e=_e.trim();if(!e)return;const t=setTimeout(()=>{e===tt&&"search"===dt.current||("search"!==dt.current&&(ct.current=dt.current),ot("search"),rt({}),nt(e))},300);return()=>clearTimeout(t)},[_e]);const Pt=()=>{et(""),"search"===dt.current&&ft(ct.current)},Et=e=>{ft("files"),me(e)},Ft=async(e,t)=>{try{await e()}catch(e){I.error(Ce(e,t))}At()},zt=e=>Ft(async()=>{await n.restore(e.id),I.success(`Restored "${e.name}"`)},"Restore failed"),Kt=async e=>{await R({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&Ft(()=>n.purge(e.id),"Delete failed")},Ot=async e=>{try{const t=await n.read(e.id),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e.name,r.click(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}catch(e){I.error(Ce(e,"Download failed"))}},It="files"===lt?Me?.folder??null:null,Ut=It?.role??"owner",Yt="owner"!==Ut,Jt="files"===lt?_:null,Qt=!P&&("files"!==lt||"viewer"!==Ut),Gt=!P&&"files"===lt&&"viewer"!==Ut,Bt=async(e,{withFolders:t=!1}={})=>{let a=0;for(const r of Array.from(e)){const e=r.webkitRelativePath??"",i=t?e.split("/").slice(0,-1).join("/"):"";try{await n.upload(Jt,r,i?{folderPath:i}:void 0),a++}catch(e){e instanceof T?I.error(Ne(r.name,e)):I.error(`Upload ${r.name}: ${Ce(e,"failed")}`)}}a>1&&I.success(`Uploaded ${a} files`),"files"===lt?Lt(_):Et(null)},Vt=async e=>{const t=ne(e),a=await A({title:`Rename ${e.kind}`,defaultValue:t,confirmLabel:"Rename"});a&&a!==t&&(/[\\/]/.test(a)?I.error("Names cannot contain slashes"):Ft(()=>n.rename(e.id,function(e,t){const n=e.officeKind?$[e.officeKind]:"";return n&&!t.toLowerCase().endsWith(n)?t+n:t}(e,a)),"Rename failed"))},Xt=async e=>{if(0===e.length)return;const t=1===e.length?e[0]:null,a=e.some(e=>"owner"!==(e.role??"owner")),r=t?(t.owner??Me?.folder.owner)?.name??"its owner":"their owners";await R({title:t?`Move ${t.kind} to trash`:`Move ${e.length} items to trash`,message:(t?`"${ne(t)}"${"folder"===t.kind?" and everything inside":""}`:`${e.length} items`)+" will move to "+(a?`${r}'s Trash.`:"Trash. You can restore it from there."),confirmLabel:"Move to trash",variant:"danger"})&&(await Ft(async()=>{for(const t of e)await n.remove(t.id)},"Delete failed"),I.success(t?`"${ne(t)}" moved to trash`:`${e.length} items moved to trash`))},Ht=(e,t)=>Ft(async()=>{for(const a of e)await n.setStarred(a.id,t)},t?"Star failed":"Unstar failed"),Zt=async(e,t)=>{Ve(null);const a=e.filter(e=>e.id!==t);0!==a.length&&(await Ft(async()=>{for(const e of a)await n.move(e.id,t)},"Move failed"),I.success(1===a.length?`Moved "${ne(a[0])}"`:`Moved ${a.length} items`))},qt=()=>{yt.current=0,Ue(!1),Je(null)};J(()=>{const e=()=>qt();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]);const _t="files"===lt?Me?.entries??[]:pe(lt)?$e:[],en=B(()=>le(de(_t,at),it),[_t,at,it]),tn=B(()=>new Map(en.map(e=>[e.id,e])),[en]),nn=[...We].map(e=>tn.get(e)).filter(e=>!!e),an=1===nn.length?nn[0]:null,rn=e=>e.role??("files"===lt?Ut:"owner"),sn=e=>!P&&"viewer"!==rn(e),ln=e=>Z&&"owner"===rn(e),on=e=>!!n.move&&sn(e),cn=(e,t)=>{if(Dt){const t=tn.get(e);if(t&&"file"===t.kind&&!mn(t))return;return void Re(/* @__PURE__ */new Set([e]))}if(t.shiftKey&&Ae.current){const t=en.map(e=>e.id),n=t.indexOf(Ae.current),a=t.indexOf(e);if(n>=0&&a>=0)return void Re(new Set(t.slice(Math.min(n,a),Math.max(n,a)+1)))}Ae.current=e,t.metaKey||t.ctrlKey?Re(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}):Re(/* @__PURE__ */new Set([e]))},dn=()=>{Re(/* @__PURE__ */new Set),Ae.current=null},mn=e=>!!Dt&&"file"===e.kind&&g(Dt.request,e.name),hn=e=>Dt&&"file"===e.kind&&!mn(e)?"text-ink-faintest":"",un=e=>{if(!Dt||!mn(e))return;const t="files"===lt?Me?.folder:null,n=t?["owner"===t.role?"My files":"Shared with me",...t.path.filter(e=>null!==e.id).map(e=>e.name)].join(" › "):"shared"===lt?"Shared with me":"My files";p(Dt.id,{entry:e,folderId:"files"===lt?_:null,location:n})},fn=Dt&&an&&mn(an)?an:null,pn=t=>{"folder"===t.kind?Et(t.id):Dt?un(t):(async t=>{if(P)return;if(n.open?.(t))return;const a=ke[q(t.name)];a?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:a,load:()=>n.read(t.id),onStaged:e=>xt(e)}):Ot(t)})(t)},gn=e=>{if(0===e.length)return[];const t=1===e.length?e[0]:null;if(Dt)return t&&("folder"===t.kind||mn(t))?[{key:"open",label:"Open",icon:/* @__PURE__ */X(z,{name:"external",className:"h-4 w-4"}),onSelect:()=>pn(t)}]:[];const a=t&&"file"===t.kind&&n.openLabel?.(t)||"Open",r=e.every(e=>"file"===e.kind),i=e.every(sn);if(P)return t?[{key:"open",label:"Open",icon:/* @__PURE__ */X(z,{name:"external",className:"h-4 w-4"}),onSelect:()=>pn(t)}]:[];const s=e.some(e=>!e.starred);return Se([...t?[{key:"open",label:a,icon:/* @__PURE__ */X(z,{name:"external",className:"h-4 w-4"}),onSelect:()=>pn(t)}]:[],{type:"divider",key:"d1"},...r?[{key:"download",label:"Download",icon:/* @__PURE__ */X(z,{name:"download",className:"h-4 w-4"}),onSelect:()=>{e.forEach(Ot)}}]:[],...t&&i?[{key:"rename",label:"Rename",icon:/* @__PURE__ */X(z,{name:"edit",className:"h-4 w-4"}),onSelect:()=>Vt(t)}]:[],...r&&n.copy?[{key:"copy",label:"Make a copy",icon:/* @__PURE__ */X(z,{name:"copy",className:"h-4 w-4"}),onSelect:()=>(e=>Ft(async()=>{for(const t of e)await n.copy(t.id);I.success(1===e.length?`Copied "${ne(e[0])}"`:`Copied ${e.length} files`)},"Copy failed"))(e)}]:[],{type:"divider",key:"d2"},...t&&ln(t)?[{key:"share",label:"Share",icon:/* @__PURE__ */X(z,{name:"add-person",className:"h-4 w-4"}),onSelect:()=>Ge(t)}]:[],...e.every(on)?[{key:"move",label:"Move",icon:/* @__PURE__ */X(z,{name:"forward",className:"h-4 w-4"}),onSelect:()=>Ve(e)}]:[],...n.setStarred?[{key:"star",label:s?"Add to starred":"Remove from starred",icon:/* @__PURE__ */X(z,{name:"star",className:"h-4 w-4"}),onSelect:()=>Ht(e,s)}]:[],...t?[{key:"info",label:"File information",icon:/* @__PURE__ */X(z,{name:"info",className:"h-4 w-4"}),onSelect:()=>{Re(/* @__PURE__ */new Set([t.id])),qe(!0)}}]:[],{type:"divider",key:"d3"},...i?[{key:"trash",label:"Move to trash",danger:!0,icon:/* @__PURE__ */X(z,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Xt(e)}]:[]])},kn=(e,t)=>{const n=We.has(t.id)?nn:[t];Ct.open(e,n)&&!We.has(t.id)&&(Re(/* @__PURE__ */new Set([t.id])),Ae.current=t.id)},wn=e=>on(e)?{draggable:!0,onDragStart:t=>{const n=We.has(e.id)?nn:[e];t.dataTransfer.setData(ye,JSON.stringify(n.map(e=>e.id))),t.dataTransfer.effectAllowed="move"}}:{},yn=e=>"folder"===e.kind&&sn(e)&&n.move?{onDragOver:t=>{t.dataTransfer.types.includes(ye)&&(t.preventDefault(),t.stopPropagation(),Ye!==e.id&&Je(e.id))},onDragLeave:()=>{Ye===e.id&&Je(null)},onDrop:t=>{if(!t.dataTransfer.types.includes(ye))return;t.preventDefault(),t.stopPropagation(),Je(null);const n=JSON.parse(t.dataTransfer.getData(ye)||"[]").map(e=>tn.get(e)).filter(t=>!!t&&t.id!==e.id);Zt(n,e.id)}}:{};if(Fe)/* @__PURE__ */
|
|
36
|
-
return V("div",{className:"flex flex-col h-full bg-surface",children:[
|
|
37
|
-
/* @__PURE__ */X(W,{title:`${r} - offline`}),
|
|
38
|
-
/* @__PURE__ */X("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */V("div",{className:"max-w-md",children:[
|
|
39
|
-
/* @__PURE__ */X(z,{name:"close-circle",tone:"muted",className:"h-12 w-12 mx-auto mb-3",strokeWidth:1.4}),S()?/* @__PURE__ */V(H,{children:[
|
|
40
|
-
/* @__PURE__ */X("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach your files"}),
|
|
41
|
-
/* @__PURE__ */X("p",{className:"text-sm text-ink-faint mb-3",children:"Check your connection and try again."})]}):/* @__PURE__ */V(H,{children:[
|
|
42
|
-
/* @__PURE__ */X("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach the file server"}),
|
|
43
|
-
/* @__PURE__ */V("p",{className:"text-sm text-ink-faint mb-3",children:["No response from the file server. Make sure the server is running — see ",
|
|
44
|
-
/* @__PURE__ */X("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]})]}),
|
|
45
|
-
/* @__PURE__ */X(F,{variant:"primary",onClick:At,children:"Retry"})]})})]});const vn=Ke&&Ke.limit>0?Math.min(100,Math.round(Ke.used/Ke.limit*100)):0,bn=vn>90?"bg-danger":vn>75?"bg-warning":"bg-accent-fill",xn=[Yt?{label:"Shared with me",onClick:()=>ft("shared")}:{label:"My files",onClick:()=>Et(null)},...(It?.path??[]).filter(e=>null!==e.id).map(e=>({label:e.name,onClick:()=>Et(e.id)}))],Nn="recent"===lt?"Recent":"starred"===lt?"Starred":"shared"===lt?"Shared with me":"search"===lt?`Results for “${tt}”`:"trash"===lt?"Trash":kt?kt.name:null,Cn=Dt?`${r} - Choosing`:Nn?`${r} - ${"search"===lt?"Search":Nn}`:It&&null!==It.id?`${r} - ${It.name}`:r,Sn=e=>"flex w-full items-center gap-3 rounded-full px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-accent-tint font-medium text-accent-text":"text-ink hover:bg-row-hover"),jn=Se([{key:"folder",label:"New folder",icon:/* @__PURE__ */X(z,{name:"folder-plus",className:"h-4 w-4"}),onSelect:async()=>{const e=await A({title:"New folder",placeholder:"Folder name",defaultValue:"Untitled folder",confirmLabel:"Create"});e&&(/[\\/]/.test(e)?I.error("Folder names cannot contain slashes"):(await Ft(()=>n.createFolder(Jt,e),"Create folder failed"),"files"!==lt&&Et(null)))}},{type:"divider",key:"d1"},{key:"upload",label:"File upload",icon:/* @__PURE__ */X(z,{name:"upload",className:"h-4 w-4"}),onSelect:()=>vt.current?.click()},...n.folderUpload?[{key:"upload-folder",label:"Folder upload",icon:/* @__PURE__ */X(z,{name:"cloud-arrow-up",className:"h-4 w-4"}),onSelect:()=>bt.current?.click()}]:[],{type:"divider",key:"d2"},...n.createOfficeFile?we.filter(e=>!n.officeKinds||n.officeKinds.includes(e.kind)).map(e=>{const t=te["deck"===e.kind?"slides":e.kind];return{key:e.kind,label:e.label,icon:/* @__PURE__ */X(z,{name:t.name,tone:t.tone,className:"h-4 w-4"}),onSelect:()=>{Promise.resolve(n.createOfficeFile(e.kind,Jt)).catch(e=>I.error(Ce(e,"Could not create it")))}}}):[]]),Dn=/* @__PURE__ */V("div",{className:"flex h-full flex-col",children:[
|
|
46
|
-
/* @__PURE__ */X("div",{className:"p-3 pb-2",children:/* @__PURE__ */X(o,{trigger:/* @__PURE__ */V(H,{children:[
|
|
47
|
-
/* @__PURE__ */X(z,{name:"add",className:"h-5 w-5"}),
|
|
48
|
-
/* @__PURE__ */X("span",{children:"New"})]}),items:jn,align:"start","aria-label":"New",disabled:!Qt,triggerClassName:"inline-flex items-center gap-2 h-11 pl-4 pr-5 rounded-2xl bg-surface-raised border border-line shadow-sm text-sm font-medium text-ink-strong hover:bg-row-hover disabled:opacity-50 rosh-focus-ring focus-visible:ring-2"})}),
|
|
49
|
-
/* @__PURE__ */V("nav",{className:"px-2 flex-1 overflow-auto","aria-label":"Locations",children:[
|
|
50
|
-
/* @__PURE__ */V("button",{onClick:()=>Et(null),className:Sn("files"===lt&&!Yt),children:[
|
|
51
|
-
/* @__PURE__ */X(z,{name:"home",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"My files"]}),n.recent&&!P&&/* @__PURE__ */V("button",{onClick:()=>ft("recent"),className:Sn("recent"===lt),children:[
|
|
52
|
-
/* @__PURE__ */X(z,{name:"clock",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Recent"]}),n.starred&&!P&&/* @__PURE__ */V("button",{onClick:()=>ft("starred"),className:Sn("starred"===lt),children:[
|
|
53
|
-
/* @__PURE__ */X(z,{name:"star",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Starred"]}),Z&&/* @__PURE__ */V("button",{onClick:()=>ft("shared"),className:Sn("shared"===lt||"files"===lt&&Yt),children:[
|
|
54
|
-
/* @__PURE__ */X(z,{name:"team",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Shared with me"]}),!P&&/* @__PURE__ */V("button",{onClick:()=>ft("trash"),className:Sn("trash"===lt),children:[
|
|
55
|
-
/* @__PURE__ */X(z,{name:"trash",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Trash"]}),pt&&pt.folders.length>0&&/* @__PURE__ */V(H,{children:[
|
|
56
|
-
/* @__PURE__ */X("div",{className:"px-3 pt-4 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),pt.folders.map(e=>/* @__PURE__ */V("button",{onClick:()=>ft({desktopFolderId:e.id}),className:Sn(gt===e.id),children:[
|
|
57
|
-
/* @__PURE__ */X(j,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
58
|
-
/* @__PURE__ */X("span",{className:"truncate",children:e.name}),
|
|
59
|
-
/* @__PURE__ */X(E,{count:e.itemCount,active:gt===e.id,className:"ml-auto"})]},e.id))]})]}),Ke&&/* @__PURE__ */V("div",{className:"px-5 py-3 shrink-0",title:`${d(Ke.used)} of ${d(Ke.limit)} used`,children:[
|
|
60
|
-
/* @__PURE__ */X("div",{className:"h-1 rounded-full bg-line overflow-hidden",children:/* @__PURE__ */X("div",{className:`h-full ${bn} transition-all`,style:{width:`${vn}%`}})}),
|
|
61
|
-
/* @__PURE__ */V("div",{className:"mt-2 text-2xs text-ink-faint tabular-nums",children:[d(Ke.used)," of ",d(Ke.limit)," used"]})]})]}),Mn=(e,t)=>/* @__PURE__ */V("span",{className:"inline-flex items-center gap-1",children:[e,
|
|
62
|
-
/* @__PURE__ */X(z,{name:"chevron-down",className:"h-3.5 w-3.5"}),t?"":null]}),Tn=e=>"inline-flex items-center h-7 px-3 rounded-(--radius-control) border text-xs whitespace-nowrap rosh-focus-ring focus-visible:ring-2 "+(e?"border-accent-border bg-accent-tint text-accent-text":"border-line-strong text-ink-muted hover:bg-row-hover"),$n=pe(lt)||"files"===lt,Ln=function(e){const t=/* @__PURE__ */new Map;for(const n of e)"owner"!==(n.role??"owner")&&n.owner&&t.set(n.owner.id,n.owner.name);return[...t].map(([e,t])=>({id:e,name:t})).sort((e,t)=>se.compare(e.name,t.name))}(_t),Wn=$n&&_t.length>0?/* @__PURE__ */V("div",{className:"flex items-center gap-2 shrink-0",children:[
|
|
63
|
-
/* @__PURE__ */X(o,{trigger:Mn(at.type?ee[at.type]:"Type",!!at.type),"aria-label":"Type",triggerClassName:Tn(!!at.type),items:[...oe.map(e=>({type:"radio",key:e,label:ee[e],checked:at.type===e,onSelect:()=>rt(t=>({...t,type:t.type===e?null:e}))})),...at.type?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>rt(e=>({...e,type:null}))}]:[]]}),Z&&/* @__PURE__ */X(o,{trigger:Mn(at.person?"me"===at.person?"Owned by me":Ln.find(e=>e.id===at.person)?.name??"People":"People",!!at.person),"aria-label":"People",triggerClassName:Tn(!!at.person),items:[{type:"radio",key:"me",label:"Owned by me",checked:"me"===at.person,onSelect:()=>rt(e=>({...e,person:"me"===e.person?null:"me"}))},...Ln.map(e=>({type:"radio",key:e.id,label:e.name,checked:at.person===e.id,onSelect:()=>rt(t=>({...t,person:t.person===e.id?null:e.id}))})),...at.person?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>rt(e=>({...e,person:null}))}]:[]]}),
|
|
64
|
-
/* @__PURE__ */X(o,{trigger:Mn(at.modified?ce[at.modified]:"Modified",!!at.modified),"aria-label":"Modified",triggerClassName:Tn(!!at.modified),items:[...Object.keys(ce).map(e=>({type:"radio",key:e,label:ce[e],checked:at.modified===e,onSelect:()=>rt(t=>({...t,modified:t.modified===e?null:e}))})),...at.modified?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>rt(e=>({...e,modified:null}))}]:[]]})]}):null,Rn=$n&&nn.length>0&&!Dt?/* @__PURE__ */V("div",{className:"flex items-center gap-0.5 h-10 px-2 rounded-full bg-surface-sunken",role:"toolbar","aria-label":"Selection",children:[
|
|
65
|
-
/* @__PURE__ */X(c,{"aria-label":"Clear selection",size:"sm",onClick:dn,children:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4"})}),
|
|
66
|
-
/* @__PURE__ */V("span",{className:"text-sm text-ink mr-2 whitespace-nowrap",children:[nn.length," selected"]}),an&&ln(an)&&/* @__PURE__ */X(c,{"aria-label":"Share",size:"sm",onClick:()=>Ge(an),children:/* @__PURE__ */X(z,{name:"add-person",className:"h-4 w-4"})}),!P&&nn.every(e=>"file"===e.kind)&&/* @__PURE__ */X(c,{"aria-label":"Download",size:"sm",onClick:()=>nn.forEach(Ot),children:/* @__PURE__ */X(z,{name:"download",className:"h-4 w-4"})}),nn.every(on)&&/* @__PURE__ */X(c,{"aria-label":"Move",size:"sm",onClick:()=>Ve(nn),children:/* @__PURE__ */X(z,{name:"forward",className:"h-4 w-4"})}),!P&&nn.every(sn)&&/* @__PURE__ */X(c,{"aria-label":"Move to trash",size:"sm",onClick:()=>Xt(nn),children:/* @__PURE__ */X(z,{name:"trash",className:"h-4 w-4"})}),
|
|
67
|
-
/* @__PURE__ */X(o,{trigger:/* @__PURE__ */X(z,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(nn)})]}):null,An=/* @__PURE__ */X("div",{className:"flex items-center gap-2 px-4 pb-2 min-h-12 shrink-0",children:Rn??/* @__PURE__ */V(H,{children:[
|
|
68
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1 flex items-center gap-2",children:["files"===lt?/* @__PURE__ */X("div",{className:"min-w-0 text-base [&_*]:text-base",children:/* @__PURE__ */X(a,{items:xn,maxItems:5})}):"trash"===lt?/* @__PURE__ */X("span",{className:"text-base font-medium text-ink-strong",children:"Trash"}):"object"==typeof lt?/* @__PURE__ */V(H,{children:[
|
|
69
|
-
/* @__PURE__ */X(j,{className:"h-4 w-4 text-amber-500 shrink-0"}),
|
|
70
|
-
/* @__PURE__ */X("span",{className:"text-base font-medium text-ink-strong truncate",children:kt?.name??"Desktop folder"}),
|
|
71
|
-
/* @__PURE__ */X("span",{className:"text-2xs text-ink-faintest whitespace-nowrap",children:"Desktop shortcuts"})]}):/* @__PURE__ */X("span",{className:"text-base font-medium text-ink-strong truncate",children:Nn}),"files"===lt&&Yt&&"viewer"===Ut&&/* @__PURE__ */V("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs text-ink-faint whitespace-nowrap",children:[
|
|
72
|
-
/* @__PURE__ */X(z,{name:"eye",className:"h-3 w-3",strokeWidth:1.8}),"View only"]}),"files"===lt&&Yt&&It?.owner&&/* @__PURE__ */V("span",{className:"shrink-0 text-2xs text-ink-faint whitespace-nowrap",children:["Shared by ",It.owner.name]})]}),Wn,"trash"===lt&&/* @__PURE__ */X(F,{variant:"secondary-danger",size:"sm",onClick:async()=>{if(0===mt.length)return;await R({title:"Empty trash",message:`${mt.length} item${1===mt.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"})&&Ft(()=>n.emptyTrash(),"Empty trash failed")},disabled:0===mt.length,children:"Empty trash"})]})}),Pn=(e,t)=>Dt?null:/* @__PURE__ */V("div",{className:"flex items-center justify-end "+(t?"":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),children:[ln(e)&&/* @__PURE__ */X(c,{"aria-label":"Share",size:"sm",onClick:t=>{t.stopPropagation(),Ge(e)},children:/* @__PURE__ */X(z,{name:"add-person",className:"h-4 w-4"})}),!P&&"file"===e.kind&&/* @__PURE__ */X(c,{"aria-label":"Download",size:"sm",onClick:t=>{t.stopPropagation(),Ot(e)},children:/* @__PURE__ */X(z,{name:"download",className:"h-4 w-4"})}),n.setStarred&&!P&&/* @__PURE__ */X(c,{"aria-label":e.starred?"Remove from starred":"Add to starred","aria-pressed":!!e.starred,size:"sm",onClick:t=>{t.stopPropagation(),Ht([e],!e.starred)},children:/* @__PURE__ */X(z,{name:"star",look:e.starred?"solid":void 0,tone:e.starred?"warning":void 0,className:"h-4 w-4"})}),
|
|
73
|
-
/* @__PURE__ */X("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */X(o,{trigger:/* @__PURE__ */X(z,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(We.has(e.id)&&nn.length>1?nn:[e])})})]}),En=e=>/* @__PURE__ */V("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
74
|
-
/* @__PURE__ */X(je,{entry:e}),
|
|
75
|
-
/* @__PURE__ */X("span",{className:"truncate",title:e.name,children:ne(e)}),!!e.shareCount&&/* @__PURE__ */X("span",{className:"shrink-0",role:"img","aria-label":"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),title:"Shared with "+(1===e.shareCount?"1 person":`${e.shareCount} people`),children:/* @__PURE__ */X(z,{name:"team",tone:"muted",className:"h-3.5 w-3.5"})}),e.starred&&/* @__PURE__ */X("span",{className:"shrink-0",role:"img","aria-label":"Starred",title:"Starred",children:/* @__PURE__ */X(z,{name:"star",look:"solid",tone:"warning",className:"h-3.5 w-3.5"})})]}),Fn=(e,t,n)=>{const a=it.key===e;/* @__PURE__ */
|
|
76
|
-
return X("th",{className:`${O} font-medium px-3 h-9 ${n}`,"aria-sort":a?"asc"===it.dir?"ascending":"descending":void 0,children:/* @__PURE__ */V("button",{type:"button",className:"inline-flex items-center gap-1 rounded hover:text-ink "+(a?"text-ink":""),onClick:()=>st(t=>({key:e,dir:t.key===e&&"asc"===t.dir?"desc":"asc"})),children:[t,a&&("asc"===it.dir?/* @__PURE__ */X(z,{name:"arrow-up",className:"h-3 w-3"}):/* @__PURE__ */X(z,{name:"arrow-down",className:"h-3 w-3"}))]})})},zn="recent"===lt?"Files you and your colleagues change show here.":"starred"===lt?"Star the files and folders you want to find quickly.":"shared"===lt?"Nothing has been shared with you yet. Files and folders colleagues share with you show here.":"search"===lt?`Nothing matches “${tt}”.`:null,Kn=0===en.length?Pe?/* @__PURE__ */X(K,{size:"sm",padding:"p-6",label:"Loading"}):/* @__PURE__ */X("div",{className:"p-10 text-center text-sm text-ink-faintest",children:_t.length>0?"Nothing matches these filters.":zn??/* @__PURE__ */V(H,{children:["This folder is empty.",Gt&&/* @__PURE__ */V(H,{children:[" Drop files here or choose ",
|
|
77
|
-
/* @__PURE__ */X("span",{className:"font-medium",children:"New"}),"."]})]})}):"grid"===Xe?/* @__PURE__ */X("div",{className:"px-4 pb-4",children:["folder","file"].map(e=>{const t=en.filter(t=>t.kind===e);return 0===t.length?null:/* @__PURE__ */V("section",{className:"mb-4",children:[
|
|
78
|
-
/* @__PURE__ */X("h3",{className:"text-xs font-medium text-ink-faint mb-2",children:"folder"===e?"Folders":"Files"}),
|
|
79
|
-
/* @__PURE__ */X("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:t.map(t=>{const a=We.has(t.id);/* @__PURE__ */
|
|
80
|
-
return V("div",{role:"button",tabIndex:0,"aria-pressed":a,"aria-label":ne(t),onClick:e=>cn(t.id,e),onDoubleClick:()=>pn(t),onContextMenu:e=>kn(e,t),...wn(t),...yn(t),className:"group rounded-xl border cursor-default select-none outline-none focus-visible:ring-2 focus-visible:ring-accent-border "+(a||Ye===t.id?"border-accent-border bg-accent-tint":"border-line bg-surface-sunken hover:bg-row-hover"),children:[
|
|
81
|
-
/* @__PURE__ */V("div",{className:"flex items-center gap-2 pl-3 pr-1 h-11",children:[
|
|
82
|
-
/* @__PURE__ */X(je,{entry:t,className:"h-4 w-4"}),
|
|
83
|
-
/* @__PURE__ */X("span",{className:"flex-1 truncate text-sm",title:t.name,children:ne(t)}),
|
|
84
|
-
/* @__PURE__ */X("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */X(o,{trigger:/* @__PURE__ */X(z,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(a&&nn.length>1?nn:[t])})})]}),"file"===e&&/* @__PURE__ */V(H,{children:[
|
|
85
|
-
/* @__PURE__ */X("div",{className:"mx-2 h-28 rounded-lg bg-surface flex items-center justify-center overflow-hidden",children:/* @__PURE__ */X(De,{entry:t,read:P?void 0:n.read})}),
|
|
86
|
-
/* @__PURE__ */V("div",{className:"px-3 py-2 text-2xs text-ink-faint truncate",children:["me"===ie(t)?"You":ie(t)," · ",re(t.modifiedAt)]})]})]},t.id)})})]},e)})}):/* @__PURE__ */V("table",{className:"w-full text-sm table-fixed",children:[
|
|
87
|
-
/* @__PURE__ */X("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */V("tr",{children:[Fn("name","Name","text-left"),Z&&Fn("owner","Owner","text-left w-32"),Fn("modified","Modified","text-left w-28"),Fn("size","Size","text-right w-20"),
|
|
88
|
-
/* @__PURE__ */X("th",{className:`${O} w-32`,children:/* @__PURE__ */X("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
89
|
-
/* @__PURE__ */X("tbody",{children:en.map(e=>{const t=We.has(e.id);/* @__PURE__ */
|
|
90
|
-
return V("tr",{"aria-selected":t,onClick:t=>cn(e.id,t),onDoubleClick:()=>pn(e),onContextMenu:t=>kn(t,e),...wn(e),...yn(e),className:`group cursor-default select-none border-b border-line-subtle ${hn(e)} ${t||Ye===e.id?"bg-accent-tint":"hover:bg-row-hover"}`,children:[
|
|
91
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11",children:En(e)}),Z&&/* @__PURE__ */X("td",{className:"px-3 h-11 text-ink-faint truncate",children:ie(e)}),
|
|
92
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:ve(e.modifiedAt),children:re(e.modifiedAt)}),
|
|
93
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint whitespace-nowrap",children:Dt&&"file"===e.kind&&!mn(e)&&Dt.request.otherLabel?Dt.request.otherLabel:ae(e)}),
|
|
94
|
-
/* @__PURE__ */X("td",{className:"px-2 h-11",children:Pn(e,t)})]},e.id)})})]}),On=Pe&&0===mt.length?/* @__PURE__ */X(K,{size:"sm",padding:"p-6",label:"Loading"}):0===mt.length?/* @__PURE__ */X("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Trash is empty. What you delete stays here for 30 days."}):/* @__PURE__ */V("table",{className:"w-full text-sm table-fixed",children:[
|
|
95
|
-
/* @__PURE__ */X("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */V("tr",{children:[
|
|
96
|
-
/* @__PURE__ */X("th",{className:`${O} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
97
|
-
/* @__PURE__ */X("th",{className:`${O} text-left font-medium px-3 h-9 w-48`,children:"Original location"}),
|
|
98
|
-
/* @__PURE__ */X("th",{className:`${O} text-left font-medium px-3 h-9 w-32`,children:"Deleted"}),
|
|
99
|
-
/* @__PURE__ */X("th",{className:`${O} text-right font-medium px-3 h-9 w-24`,children:"Size"}),
|
|
100
|
-
/* @__PURE__ */X("th",{className:`${O} w-28`,children:/* @__PURE__ */X("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
101
|
-
/* @__PURE__ */X("tbody",{children:mt.map(e=>/* @__PURE__ */V("tr",{className:"group border-b border-line-subtle hover:bg-row-hover",onContextMenu:t=>St.open(t,e),children:[
|
|
102
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11",children:/* @__PURE__ */V("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
103
|
-
/* @__PURE__ */X(je,{entry:e}),
|
|
104
|
-
/* @__PURE__ */X("span",{className:"truncate",title:e.name,children:e.name})]})}),
|
|
105
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-ink-faint text-xs truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
106
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:e.deletedAt?ve(e.deletedAt):void 0,children:e.deletedAt?re(e.deletedAt):"—"}),
|
|
107
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint",children:"folder"===e.kind?"—":d(e.size)}),
|
|
108
|
-
/* @__PURE__ */X("td",{className:"px-2 h-11",children:/* @__PURE__ */V("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
109
|
-
/* @__PURE__ */X(c,{"aria-label":"Restore",size:"sm",onClick:()=>zt(e),children:/* @__PURE__ */X(z,{name:"revert",className:"h-4 w-4"})}),
|
|
110
|
-
/* @__PURE__ */X(c,{"aria-label":"Delete forever",size:"sm",variant:"ghost-danger",onClick:()=>Kt(e),children:/* @__PURE__ */X(z,{name:"trash",className:"h-4 w-4"})})]})})]},e.id))})]}),In=0===wt.length?/* @__PURE__ */X("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */V("table",{className:"w-full text-sm table-fixed",children:[
|
|
111
|
-
/* @__PURE__ */X("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */V("tr",{children:[
|
|
112
|
-
/* @__PURE__ */X("th",{className:`${O} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
113
|
-
/* @__PURE__ */X("th",{className:`${O} text-left font-medium px-3 h-9 w-32`,children:"Type"}),
|
|
114
|
-
/* @__PURE__ */X("th",{className:`${O} w-32`,children:/* @__PURE__ */X("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
115
|
-
/* @__PURE__ */X("tbody",{children:wt.map(e=>/* @__PURE__ */V("tr",{onDoubleClick:()=>Mt(e),onContextMenu:t=>jt.open(t,e),className:"group cursor-default border-b border-line-subtle hover:bg-row-hover",children:[
|
|
116
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11",children:/* @__PURE__ */V("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
117
|
-
/* @__PURE__ */X(D,{item:e}),
|
|
118
|
-
/* @__PURE__ */X("span",{className:"truncate",title:e.label,children:e.label})]})}),
|
|
119
|
-
/* @__PURE__ */X("td",{className:"px-3 h-11 text-xs text-ink-faint",children:M(e)}),
|
|
120
|
-
/* @__PURE__ */X("td",{className:"px-2 h-11",children:/* @__PURE__ */V("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
121
|
-
/* @__PURE__ */X(c,{"aria-label":"Open",size:"sm",onClick:()=>Mt(e),children:/* @__PURE__ */X(z,{name:"external",className:"h-4 w-4"})}),
|
|
122
|
-
/* @__PURE__ */X(c,{"aria-label":"Move to desktop",size:"sm",onClick:()=>pt?.moveToDesktop([e]),children:/* @__PURE__ */X(z,{name:"desktop",className:"h-4 w-4"})}),
|
|
123
|
-
/* @__PURE__ */X(c,{"aria-label":"Remove",size:"sm",variant:"ghost-danger",onClick:()=>pt?.removeShortcuts([e]),children:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4"})})]})})]},`${e.entityType}|${e.entityId}`))})]});/* @__PURE__ */
|
|
124
|
-
return V("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Gt&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),yt.current++,Ie||Ue(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{yt.current>0&&yt.current--,0===yt.current&&Ue(!1)},onDrop:e=>{e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),qt(),Gt&&e.dataTransfer.files?.length&&Bt(e.dataTransfer.files))},children:[
|
|
125
|
-
/* @__PURE__ */X(W,{title:Cn}),
|
|
126
|
-
/* @__PURE__ */X(k,{app:"files"}),
|
|
127
|
-
/* @__PURE__ */X("input",{ref:vt,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Bt(e.target.files),vt.current&&(vt.current.value="")}}),
|
|
128
|
-
/* @__PURE__ */X("input",{ref:e=>{bt.current=e,e?.setAttribute("webkitdirectory","")},type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Bt(e.target.files,{withFolders:!0}),bt.current&&(bt.current.value="")}}),
|
|
129
|
-
/* @__PURE__ */X("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */X(t,{sidebar:Dn,storageKey:"files.sidebarWidth",defaultWidth:220,minWidth:170,maxWidth:320,children:/* @__PURE__ */V("div",{className:"flex h-full min-w-0",children:[
|
|
130
|
-
/* @__PURE__ */V("div",{className:"flex flex-1 min-w-0 flex-col",children:[Dt&&/* @__PURE__ */V("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-line bg-accent-tint text-accent-text text-sm shrink-0",role:"status",children:[
|
|
131
|
-
/* @__PURE__ */X(z,{name:"cursor",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),
|
|
132
|
-
/* @__PURE__ */X("span",{className:"flex-1 min-w-0 truncate",children:Dt.request.title}),
|
|
133
|
-
/* @__PURE__ */X(F,{variant:"secondary",size:"sm",onClick:()=>p(Dt.id,null),children:"Cancel"}),
|
|
134
|
-
/* @__PURE__ */X(F,{variant:"primary",size:"sm",disabled:!fn,onClick:()=>{fn&&un(fn)},children:"Open"})]}),
|
|
135
|
-
/* @__PURE__ */V("div",{className:"flex items-center gap-1 px-4 py-2 shrink-0",children:[
|
|
136
|
-
/* @__PURE__ */X("div",{className:"flex-1 min-w-48 max-w-2xl",role:"search",children:/* @__PURE__ */X(l,{type:"text",enterKeyHint:"search",value:_e,onChange:e=>{et(e.target.value),e.target.value.trim()||Pt()},onKeyDown:e=>{"Escape"===e.key&&_e&&(e.stopPropagation(),Pt())},placeholder:`Search in ${r}`,"aria-label":`Search in ${r}`,leftIcon:/* @__PURE__ */X(z,{name:"search",className:"h-4 w-4"}),endAction:_e?{label:"Clear search",icon:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4"}),onClick:Pt}:void 0})}),
|
|
137
|
-
/* @__PURE__ */X("div",{className:"flex-1"}),"object"!=typeof lt&&"trash"!==lt&&/* @__PURE__ */V(H,{children:[
|
|
138
|
-
/* @__PURE__ */X(c,{"aria-label":"List view","aria-pressed":"list"===Xe,onClick:()=>ut("list"),children:/* @__PURE__ */X(z,{name:"list",className:"h-4 w-4"})}),
|
|
139
|
-
/* @__PURE__ */X(c,{"aria-label":"Grid view","aria-pressed":"grid"===Xe,onClick:()=>ut("grid"),children:/* @__PURE__ */X(z,{name:"grid",className:"h-4 w-4"})})]}),
|
|
140
|
-
/* @__PURE__ */X(c,{"aria-label":"Details","aria-pressed":Ze,onClick:()=>qe(e=>!e),children:/* @__PURE__ */X(z,{name:"info",className:"h-4 w-4"})})]}),An,
|
|
141
|
-
/* @__PURE__ */X("div",{className:"flex-1 overflow-auto outline-none",tabIndex:-1,onKeyDown:e=>{e.target instanceof HTMLInputElement||(Dt?"Enter"===e.key&&fn&&(e.preventDefault(),un(fn)):("Delete"===e.key||"Backspace"===e.key)&&nn.length&&nn.every(sn)?(e.preventDefault(),Xt(nn)):"Enter"===e.key&&an?(e.preventDefault(),pn(an)):(e.metaKey||e.ctrlKey)&&"a"===e.key.toLowerCase()&&en.length&&(e.preventDefault(),Re(new Set(en.map(e=>e.id)))))},onClick:e=>{e.target===e.currentTarget&&dn()},children:"object"==typeof lt?In:"trash"===lt?On:Kn})]}),Ze&&$n&&/* @__PURE__ */X(fe,{store:n,entry:an,selectedCount:nn.length,onClose:()=>qe(!1)})]})})}),Ct.state&&/* @__PURE__ */X(s,{...Ct.props,items:gn(Ct.state.data),"aria-label":"File actions"}),St.state&&/* @__PURE__ */X(s,{...St.props,"aria-label":"Trash actions",items:[{key:"restore",label:"Restore",icon:/* @__PURE__ */X(z,{name:"revert",className:"h-4 w-4"}),onSelect:()=>zt(St.state.data)},{type:"divider",key:"d"},{key:"purge",label:"Delete forever",danger:!0,icon:/* @__PURE__ */X(z,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Kt(St.state.data)}]}),jt.state&&/* @__PURE__ */X(s,{...jt.props,"aria-label":"Shortcut actions",items:[{key:"open",label:"Open",icon:/* @__PURE__ */X(z,{name:"external",className:"h-4 w-4"}),onSelect:()=>Mt(jt.state.data)},{key:"desktop",label:"Move to desktop",icon:/* @__PURE__ */X(z,{name:"desktop",className:"h-4 w-4"}),onSelect:()=>pt?.moveToDesktop([jt.state.data])},{type:"divider",key:"d"},{key:"remove",label:"Remove",danger:!0,icon:/* @__PURE__ */X(z,{name:"close",className:"h-4 w-4"}),onSelect:()=>pt?.removeShortcuts([jt.state.data])}]}),Z&&/* @__PURE__ */X(he,{store:n,entry:Qe,onClose:()=>Ge(null),onChanged:At}),n.move&&/* @__PURE__ */X(ue,{store:n,items:Be,from:"files"===lt?_:void 0,onClose:()=>Ve(null),onMove:e=>Be&&Zt(Be,e)}),Ie&&/* @__PURE__ */X("div",{className:"absolute inset-0 bg-accent-tint border-4 border-dashed border-accent-border pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */X("div",{className:"px-4 py-2 rounded-md bg-accent-fill text-on-accent text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{Me as default,Ne as quotaExceededMessage};
|
package/dist/chunk-25QDSYH5.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-RAOM3WIQ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-ZKGUBIBT.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-JOAKKXTL.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-JSHMIMAJ.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as M}from"react-dom";import{jsxs as R,jsx as T}from"react/jsx-runtime";function A(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var E=["right-2","right-8","right-16"],F=[8,32,64];function L(L){const{options:O,placeholder:z,emptyOptionLabel:I,className:U="",disabled:B,id:H,filter:J=!1,allowFreeText:Y=!1,freeTextOption:K,onSearchChange:Z,loading:G=!1,error:Q,onRetry:V,rightAdornment:X,endAction:P,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=L,re=!0===L.multiple,le=L.multiple?L.value:L.value?[L.value]:[],oe=L.multiple?"":L.value,ie=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},ae=le.length>0,se=J&&ae&&!B,ce=re||J,ue=null!=K,de=Y||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=H??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=I??ke.select.none,$e=e=>{xe(e),fe(-1),Z?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Me=C(!1),Re=e=>{We.current&&(We.current=!1,e&&Y&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Te=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Re(!1)}},[Ae,Ee]=N(null);y(()=>{if(!X||he)return void Ee(null);const e=Se.current?.offsetWidth??0;Ee(e?e+F[Be]+6:null)});const Fe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),Le=S(()=>t(O),[O]),Oe=le.join("\0"),ze=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Le)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[Le,Oe,de]),Ie=ze.join(", "),Ue=_&&ae&&!B,Be=(Ue?1:0)+(P?1:0),[He,Je]=N(null),Ye=C(null),Ke=C(""),Ze=C(()=>{});Ze.current=()=>{const e=De.current,t=Ye.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${ze.join("\0")}`;if(o===Ke.current)return;Ke.current=o;let i=null;r>0&&ze.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=A(ze,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Je(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ze.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ze.current());return t.observe(e),()=>t.disconnect()},[re]);const Ge=ze.length,Qe=!re||!He||He.shown>=Ge?Ie:0===He.shown?ke.select.selectedCount(Ge):`${ze.slice(0,He.shown).join(", ")} +${Ge-He.shown}`,Ve=re&&null!==He&&(He.shown<Ge||He.cut),Xe=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||Re(!0)};document.addEventListener("mousedown",e);const t=b(()=>Re(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,Y,ye,Oe,L.onChange]),W(()=>{if(he)return x(e=>!("Escape"!==e.key||!We.current)&&(Re(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Pe=S(()=>{const e=/* @__PURE__ */new Set;return n(O,t=>!e.has(t.value)&&(e.add(t.value),!0))},[O]),qe=S(()=>{if(Z)return Pe;const e=ye.trim().toLowerCase();return e?n(Pe,t=>r(t,e)):Pe},[Pe,ye,Z]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?Le.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,Le,Oe]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return R("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==De.current&&Re(!0)},children:[(rt=/* @__PURE__ */T("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Qe,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{B||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(B)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Te(nt[me],me):1!==_e.length||_e[0].disabled?Y&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Re(!1),De.current?.blur())):Te(_e[0],0)):"Escape"===t.key?(Re(!1),De.current?.blur()):"Tab"===t.key&&Re(!0)},placeholder:Xe?Qe:z||je,className:`${se?u:d} ${U} ${a[Be]}${B?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Xe?" rosh-field-shows-choice":""}`,style:Ae?{paddingRight:Ae}:void 0,disabled:B}),re?/* @__PURE__ */T(f,{content:!he&&Ve?Ie:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */T("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */T("span",{ref:Ye,className:"whitespace-pre"})}),Be>0&&
|
|
4
|
-
/* @__PURE__ */R(s,{children:[Ue&&
|
|
5
|
-
/* @__PURE__ */T("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */T(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */T(p,{name:"close"}),onClick:()=>{ie([]),Re(!1)}}})}),P&&/* @__PURE__ */T("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */T(c,{action:P})})]}),X&&!he&&/* @__PURE__ */T("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${E[Be]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:X}),he&&M(
|
|
6
|
-
/* @__PURE__ */R("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Fe?.left,right:Fe?.right,top:Fe?.top,bottom:Fe?.bottom,minWidth:Fe?.minWidth,width:Fe?.width,...ce&&{maxWidth:Fe?.maxWidth},visibility:Fe?void 0:"hidden",...j()},children:[re&&ae&&_&&!B&&
|
|
7
|
-
/* @__PURE__ */T("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),G?
|
|
8
|
-
/* @__PURE__ */T(m,{size:"sm",padding:"py-2",label:ke.search.searching}):Q?/* @__PURE__ */R("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */T("span",{className:"min-w-0 flex-1",children:Q}),V&&/* @__PURE__ */T(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:V,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */R("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Fe?.maxHeight??w},children:[0===nt.length?G||Q?null:/* @__PURE__ */T("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return R("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Te(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */T(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */T("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */T(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&K&&
|
|
13
|
-
/* @__PURE__ */T("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Te(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */T("span",{className:"min-w-0 flex-1 truncate",children:K(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{L as SearchableSelect,A as fitChoice};
|
package/dist/chunk-3PSLQJWR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="12.18.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-5QYKF7NK.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-PMBCQWJW.js";import{Icon as t}from"./chunk-JOAKKXTL.js";import{buttonClasses as r}from"./chunk-UQYNPYF4.js";import{useShellStrings as n,splitAround as o}from"./chunk-JSHMIMAJ.js";import{createContext as l,useContext as i,useState as s,useRef as a,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var f=l(()=>Promise.resolve(!1)),b=()=>i(f),g=()=>Promise.resolve(!1),p=e=>g(e),v=()=>Promise.resolve(!1),y=e=>v(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:r({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:r({variant:"warning"})},info:{icon:"text-blue-600 bg-accent-tint-strong",button:r({variant:"primary"})}},w=r({variant:"secondary"}),C=r({variant:"primary"}),L="w-full rounded-md border border-line-strong h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
|
-
return m(t,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
|
|
3
|
-
return m(t,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=s(!1),[i,b]=s({message:""}),[p,y]=s(0),N=a(),F=a(null),E=a(0),T=a([]),W=a(null),J=a(null),K=c(e=>{F.current=e.id,N.current=e.resolve,y(e.id),b(e.options),l(!0)},[]),$=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++E.current,options:t,resolve:e};null===F.current?K(r):T.current.push(r)})},[K]),[M,A]=s(!1),[D,Q]=s({message:""}),[Y,B]=s(""),H=a(),I=c(e=>(Q(e),B(""),A(!0),new Promise(e=>{H.current=e})),[]),[O,S]=s(!1),[U,V]=s({}),[X,q]=s(""),z=a(),G=c(e=>{const t="string"==typeof e?{message:e}:e;return V(t),q(t.defaultValue??""),S(!0),new Promise(e=>{z.current=e})},[]);u(()=>{g=$,v=I,x=G},[$,I,G]);const R=(e,t)=>{if(F.current!==e)return;const r=N.current,n=T.current.shift();n?K(n):(F.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{A(!1),B(""),H.current?.(e)},_=e=>{if(e){const e=X.trim();if(!e&&!U.allowEmpty)return S(!1),void z.current?.(null);S(!1),z.current?.(e)}else S(!1),z.current?.(null)},ee=i.variant||(i.confirmLabel?.toLowerCase().includes("delete")||i.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===D.variant?"warning":"danger"],ne=D.confirmWord,oe=null==ne||Y===ne,le=n().dialog,[ie,se]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
-
return d(f.Provider,{value:$,children:[t,
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>R(p,!1),initialFocus:W,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
-
/* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>R(p,!1),className:w,children:i.cancelLabel||le.cancel}),
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>R(p,!0),className:te.button,children:i.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
|
-
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:i.title||le.confirmTitle}),
|
|
11
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:i.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:M,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:J,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
-
/* @__PURE__ */m("button",{ref:J,type:"button",onClick:()=>Z(!1),className:w,children:D.cancelLabel||le.destructiveCancel}),
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??D.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
|
|
16
|
-
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
|
-
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:D.title||le.destructiveTitle}),
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:D.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
|
-
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ie,
|
|
22
|
-
/* @__PURE__ */m("kbd",{className:"rounded border border-line-strong bg-surface-sunken px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),se]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:Y,onChange:e=>B(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Y===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
-
/* @__PURE__ */d(e,{open:O,onClose:()=>_(!1),title:U.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:U.cancelLabel||le.cancel}),
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!U.allowEmpty&&!X.trim(),className:C,children:U.confirmLabel||le.ok})]}),children:[U.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:U.message}),
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:X,onChange:e=>q(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:U.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,p as confirm,y as confirmDestructive,N as prompt,b as useConfirm};
|
package/dist/chunk-L7MWAC2P.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-56XKHWNL.js";import{IconButton_default as a}from"./chunk-SV5RRBVA.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:M,letterCase:D,clear:x,disabled:y=!1,"aria-label":A,windows:S,className:j="",layout:I="grid"}){const K=s().textToolbar,L=w({offered:n,color:k,last:N,alignment:C,list:M,letterCase:D,clear:x});if(!L.words&&!L.paragraph)return null;const R=m(n,k,x,L.cells.paragraph),q=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,B=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:q(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:q(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,T=l(K),$=e.map(e=>[e,T[e],r(e)]),H=C?e.filter(e=>C.allow.includes(e)):[],J=C&&H.includes(C.value)?C.value:H[0],O=[["none",K.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",K.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",K.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],U=x&&R?g(K.clear,/* @__PURE__ */i(a,{className:q(!1),"aria-label":K.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,V=/* @__PURE__ */t(d,{children:[B("bold",K.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),B("italic",K.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),B("underline",K.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),B("strike",K.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(K.color,/* @__PURE__ */i(a,{pressed:k.open,className:q(k.open,"rosh-tb-color"),"aria-label":K.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,B("link",K.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),B("sup",K.sup,/* @__PURE__ */i(o,{name:"superscript"})),B("sub",K.sub,/* @__PURE__ */i(o,{name:"subscript"})),B("code",K.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===R?U:null]}),W=/* @__PURE__ */t(d,{children:[C&&H.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":K.alignment,onKeyDown:e=>p(e,H,e=>C.onChange(e)),children:$.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:q(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===J?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,M&&n.has("bullet")?g(K.bullet,/* @__PURE__ */i(a,{className:q("bullet"===M.pressed),"aria-label":K.bullet,"aria-pressed":"bullet"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,M&&n.has("number")?g(K.number,/* @__PURE__ */i(a,{className:q("number"===M.pressed),"aria-label":K.number,"aria-pressed":"number"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,B("quote",K.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":K.letterCase,onKeyDown:e=>p(e,O.map(([e])=>e),e=>D.onChange(e)),children:O.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:q(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:y||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null,"paragraph"===R?U:null]}),X="row"===I,E=X?" is-row":L.flow?" is-flow":L.oneRow?" is-one-row":L.words&&void 0===N&&"words"!==R?" is-eight":"",Z=b(n,Boolean(k)),z={"--rosh-tb-color-col":String(Z.color),"--rosh-tb-link-col":String(Z.link),...X?{"--rosh-tb-cells":String(L.cells.words+L.cells.paragraph),"--rosh-tb-groupgap":L.words&&L.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let F;return F=X?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:V}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W}):null]}):L.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[V,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),W]}):L.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:V}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W})]}):/* @__PURE__ */t(d,{children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==R?" is-eight":""),children:V}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:W}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${E} ${j}`.trim(),style:z,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":A??K.formatting,children:F}),S]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-PMBCQWJW.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,usePopupLevel as t,usePopupLevelBindings as a,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,popupLayerStyle as s}from"./chunk-RIG5FEVS.js";import{useDiscardGuard as d}from"./chunk-2VFSYSDS.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-7QSDPSXP.js";import{useFocusTrap as u,useScrollLock as p}from"./chunk-DWGYC7OD.js";import{Icon as f}from"./chunk-JOAKKXTL.js";import{useHydrated as h}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-JSHMIMAJ.js";import{useRef as b,useId as y,useState as g,useEffect as k}from"react";import{createPortal as w}from"react-dom";import{jsxs as j,Fragment as N,jsx as $}from"react/jsx-runtime";var S="bg-black/30 backdrop-blur-sm",C={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function D({open:D,onClose:W,title:J,description:T,role:V="dialog",children:A,footer:F,blocking:G=!1,size:I="md",aside:U=!1,dirty:Y=!1,initialFocus:E,"aria-label":H,"aria-labelledby":K,"aria-describedby":L,className:M=""}){const O=b(null),P=y(),Q=y(),X=!G,z=y(),B=x().dialog,R=e(h()),[Z,q]=g(null),_=d({open:D,dirty:Y,onClose:W,title:J,layer:Z}),ee=b(null),re=r(D&&null!==R,ee),ie=i(re,O),te=t(D&&null!==R,ee),ae=a(te,Z),oe=o(te),le=null!==te.host;if(m(D),u(O,D&&null!==R,E,ae),p(D),k(()=>{if(D)return v(()=>!ae.current?.(document.activeElement)&&(G||_(),!0),()=>O.current)},[D,G,_,ae]),!D||!R)return null;/* @__PURE__ */
|
|
2
|
-
return j(N,{children:[/* @__PURE__ */$("span",{ref:ee,hidden:!0,"data-popup-anchor":""}),w(
|
|
3
|
-
/* @__PURE__ */$(l,{value:Z,children:/* @__PURE__ */j("div",{ref:q,className:"fixed inset-0"+(U?" pointer-events-none opacity-0":le?" pointer-events-none":""),style:s(te),role:"presentation","data-overlay-layer":"","data-aside":U?"":void 0,children:[!le&&/* @__PURE__ */$("div",{className:`fixed inset-0 ${S}`,"aria-hidden":"true","data-popup-scrim":"system"}),oe&&/* @__PURE__ */$("div",{className:`fixed ${S}${U?"":" pointer-events-auto"}${n(te)?" rounded-(--radius-window)":""}`,style:oe,onClick:G?void 0:_,"aria-hidden":"true","data-popup-scrim":"window"}),
|
|
4
|
-
/* @__PURE__ */$("div",{className:re?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:G||le?void 0:e=>{e.target===e.currentTarget&&_()},children:/* @__PURE__ */j("div",{ref:O,"data-popup-panel":"",style:re?{left:ie?.left??0,top:ie?.top??0,visibility:ie?void 0:"hidden"}:void 0,...c({role:V,modal:!0,titleId:J?z:void 0,labelledBy:K,label:H}),"aria-describedby":L??(T?Q:A?P:void 0),className:`${re?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${C[I]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl${le&&!U?" pointer-events-auto":""} ${M}`.trim(),children:[J&&/* @__PURE__ */$("h2",{id:z,className:(X?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:J}),T&&/* @__PURE__ */$("p",{id:Q,className:((J?"mt-1":X?"pr-8":"")+" text-sm text-gray-500").trim(),children:T}),A&&/* @__PURE__ */$("div",{id:P,className:"mt-2 text-sm text-gray-600",children:A}),F&&/* @__PURE__ */$("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:F}),X&&/* @__PURE__ */$("button",{type:"button",onClick:_,"aria-label":B.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */$(f,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),R)]})}export{D as Dialog};
|