efficient-shell 14.1.0 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/{Browser-L2NP7DLM.js → Browser-PL2P7EIZ.js} +16 -16
- package/dist/Calculator-WMYHPFPA.js +29 -0
- package/dist/{CurrencyConverter-FXWM3DBQ.js → CurrencyConverter-3B7YXRLL.js} +5 -5
- package/dist/Files-F3H7Z75F.js +141 -0
- package/dist/Notepad-EEULMM65.js +24 -0
- package/dist/{PomodoroTimer-RPGWT26T.js → PomodoroTimer-RZSYRTLV.js} +8 -8
- package/dist/{Preview-L6FJXBAE.js → Preview-DUJIVUKT.js} +10 -10
- package/dist/{Stock-TUPZORQN.js → Stock-FHC5TFGK.js} +3 -3
- package/dist/{Weather-URCO6JML.js → Weather-LYX5G6CZ.js} +20 -20
- package/dist/WorldClock-MULNQEIS.js +32 -0
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-XLPUIGMO.js → chunk-3QRCPC7V.js} +1 -1
- package/dist/chunk-4K32E3AO.js +1 -0
- package/dist/{chunk-GTBOJ5Q5.js → chunk-6GRTHDQC.js} +1 -1
- package/dist/chunk-H56OE6Q5.js +92 -0
- package/dist/chunk-JBZ4WNI3.js +1 -0
- package/dist/{chunk-PI2W6MML.js → chunk-NGFBYHDM.js} +1 -1
- package/dist/chunk-QYRBRJDN.js +1 -0
- package/dist/chunk-RRVQT6RE.js +1 -0
- package/dist/{chunk-GTZML3V3.js → chunk-SFP5RZNY.js} +1 -1
- package/dist/{chunk-P2HZ2V3U.js → chunk-UYZJT3AS.js} +3 -3
- package/dist/chunk-YPXONNBV.js +1 -0
- package/dist/chunk-YYGA4Y6E.js +1 -0
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.js +1 -1
- package/dist/icons/brands.node.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +662 -662
- package/dist/motion/entrance.js +1 -1
- package/dist/routine-index.json +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/tokens/colour.d.ts +2 -2
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/utils/parseOption.d.ts +23 -0
- package/dist/utils/parseOption.js +1 -0
- package/dist/value-index.json +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-7CY2CRGB.js +0 -29
- package/dist/Files-5S6UFGST.js +0 -141
- package/dist/Notepad-HC46LWV5.js +0 -24
- package/dist/WorldClock-EBBUWG5L.js +0 -32
- package/dist/chunk-5F3HPOBH.js +0 -1
- package/dist/chunk-6IP4Q3AT.js +0 -92
- package/dist/chunk-M3HBGN5K.js +0 -1
- package/dist/chunk-N4FUMDAI.js +0 -1
- package/dist/chunk-S4RFJTGR.js +0 -1
- package/dist/chunk-ZSEB7XW4.js +0 -1
- /package/dist/{chunk-7UCZAUAU.js → chunk-PF6RXLWQ.js} +0 -0
package/dist/telemetry/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{startClientTelemetry}from"../chunk-
|
|
1
|
+
export{startClientTelemetry}from"../chunk-6GRTHDQC.js";import"../chunk-KNUR2UEG.js";import"../chunk-QYRBRJDN.js";
|
package/dist/tokens/colour.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare const FLAT_STATUS_ROLES: readonly ["danger", "warning", "success", "dang
|
|
|
27
27
|
/** The status groups of the soft/solid tier (ui.css "status"). */
|
|
28
28
|
declare const STATUS_GROUPS: readonly ["success", "active", "queued", "info", "pending", "warning", "danger", "draft", "neutral"];
|
|
29
29
|
/** Each group's wash, the ink on that wash, its solid fill, and its border. */
|
|
30
|
-
declare const STATUS_ROLES: readonly [...("status-
|
|
30
|
+
declare const STATUS_ROLES: readonly [...("status-danger-soft" | "status-warning-soft" | "status-active-soft" | "status-info-soft" | "status-success-soft" | "status-draft-soft" | "status-queued-soft" | "status-pending-soft" | "status-neutral-soft" | "status-danger-soft-ink" | "status-warning-soft-ink" | "status-active-soft-ink" | "status-info-soft-ink" | "status-success-soft-ink" | "status-draft-soft-ink" | "status-queued-soft-ink" | "status-pending-soft-ink" | "status-neutral-soft-ink" | "status-danger-solid" | "status-warning-solid" | "status-active-solid" | "status-info-solid" | "status-success-solid" | "status-draft-solid" | "status-queued-solid" | "status-pending-solid" | "status-neutral-solid" | "status-danger-line" | "status-warning-line" | "status-active-line" | "status-info-line" | "status-success-line" | "status-draft-line" | "status-queued-line" | "status-pending-line" | "status-neutral-line")[], "status-on-solid"];
|
|
31
31
|
/** A dark veil over media, in three strengths. */
|
|
32
32
|
declare const SCRIM_ROLES: readonly ["scrim-soft", "scrim-mid", "scrim-strong"];
|
|
33
33
|
/**
|
|
@@ -36,7 +36,7 @@ declare const SCRIM_ROLES: readonly ["scrim-soft", "scrim-mid", "scrim-strong"];
|
|
|
36
36
|
* can share one colour.
|
|
37
37
|
*/
|
|
38
38
|
declare const IDENTITY_ROLES: readonly ["identity-1", "identity-2", "identity-3", "identity-4", "identity-5", "identity-6", "identity-7", "identity-8"];
|
|
39
|
-
declare const COLOUR_ROLES: readonly ["surface", "surface-sunken", "surface-raised", "surface-inverse", "line-subtle", "line", "line-strong", "ink-faintest", "ink-faint", "ink-muted", "ink", "ink-strong", "ink-strongest", "ink-placeholder", "ink-disabled", "ink-on-inverse", "row-hover", "accent-fill", "accent-fill-hover", "accent-tint", "accent-tint-strong", "accent-border", "accent-text", "on-accent", "danger", "warning", "success", "danger-text", "warning-text", "success-text", ...("status-
|
|
39
|
+
declare const COLOUR_ROLES: readonly ["surface", "surface-sunken", "surface-raised", "surface-inverse", "line-subtle", "line", "line-strong", "ink-faintest", "ink-faint", "ink-muted", "ink", "ink-strong", "ink-strongest", "ink-placeholder", "ink-disabled", "ink-on-inverse", "row-hover", "accent-fill", "accent-fill-hover", "accent-tint", "accent-tint-strong", "accent-border", "accent-text", "on-accent", "danger", "warning", "success", "danger-text", "warning-text", "success-text", ...("status-danger-soft" | "status-warning-soft" | "status-active-soft" | "status-info-soft" | "status-success-soft" | "status-draft-soft" | "status-queued-soft" | "status-pending-soft" | "status-neutral-soft" | "status-danger-soft-ink" | "status-warning-soft-ink" | "status-active-soft-ink" | "status-info-soft-ink" | "status-success-soft-ink" | "status-draft-soft-ink" | "status-queued-soft-ink" | "status-pending-soft-ink" | "status-neutral-soft-ink" | "status-danger-solid" | "status-warning-solid" | "status-active-solid" | "status-info-solid" | "status-success-solid" | "status-draft-solid" | "status-queued-solid" | "status-pending-solid" | "status-neutral-solid" | "status-danger-line" | "status-warning-line" | "status-active-line" | "status-info-line" | "status-success-line" | "status-draft-line" | "status-queued-line" | "status-pending-line" | "status-neutral-line")[], "status-on-solid", "scrim-soft", "scrim-mid", "scrim-strong", "identity-1", "identity-2", "identity-3", "identity-4", "identity-5", "identity-6", "identity-7", "identity-8"];
|
|
40
40
|
type ColourRole = (typeof COLOUR_ROLES)[number];
|
|
41
41
|
|
|
42
42
|
export { ACCENT_ROLES, COLOUR_ROLES, type ColourRole, FLAT_STATUS_ROLES, IDENTITY_ROLES, NEUTRAL_ROLES, SCRIM_ROLES, STATUS_GROUPS, STATUS_ROLES };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ export { CurrencyFormat, EMPTY_VALUE, FormatMoneyOptions, TimeAgoOptions, curren
|
|
|
185
185
|
export { slugify } from '../utils/slugify.js';
|
|
186
186
|
export { escapeHtml } from '../utils/escapeHtml.js';
|
|
187
187
|
export { gridColumnCount } from '../utils/gridColumns.js';
|
|
188
|
+
export { parseOption } from '../utils/parseOption.js';
|
|
188
189
|
export { default as EmptyValue, EmptyValueProps } from '../shell/EmptyValue.js';
|
|
189
190
|
export { default as TimeAgo, TimeAgoProps } from '../shell/TimeAgo.js';
|
|
190
191
|
export { default as useDebouncedValue } from '../hooks/useDebouncedValue.js';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-7UCZAUAU.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{CheckoutTemplate}from"../chunk-GY7MJTIZ.js";export{DashboardTemplate}from"../chunk-DO6P6LYU.js";export{DataTablePage}from"../chunk-UGA5NGW4.js";export{EmailTemplate}from"../chunk-LPL7BWGG.js";export{ErrorBoundary}from"../chunk-XJK6VNXV.js";export{ErrorPage}from"../chunk-6NXPOZ6X.js";export{FormLayoutPage}from"../chunk-6RU2PGQK.js";export{GalleryTemplate}from"../chunk-7D2QZ6JA.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-47BGAQWD.js";export{ChatTemplate}from"../chunk-ISWTJBOA.js";export{TopNav}from"../chunk-DBBOD5QW.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-R3BSWWGB.js";export{Stepper}from"../chunk-KTO427N3.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-NHALP3MW.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-DV6TUXCZ.js";export{SettingRow}from"../chunk-LRMDLZMM.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-MEDOESQD.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-QCLKRFL4.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-JPVD3VS7.js";export{PageHeader}from"../chunk-3EYJ4G7L.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-KE7P74XM.js";export{ResizeHandle}from"../chunk-5SQHRDFC.js";export{SettingReset}from"../chunk-HAEZUUDT.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-EOYKUV2U.js";export{MetricBar}from"../chunk-PLESHI3E.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-VTCMO3K7.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-E57C7NBA.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-Q7FPGOUY.js";export{fmtSliderDate,toDayMs}from"../chunk-5CFERCYW.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-HX5QSQ2C.js";export{GlobalSearch,openGlobalSearch}from"../chunk-EHNW3UNC.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-HGOWQO63.js";export{HelpCenter}from"../chunk-EHSK43WG.js";export{IconRail,IconRailButton}from"../chunk-XIX72C7K.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-PFOTEDSQ.js";export{EditableGrid}from"../chunk-PEA5Y6DD.js";export{BudgetBar,budgetState}from"../chunk-7B6JPNOD.js";export{Card,StatCard}from"../chunk-RKSCB5BJ.js";export{ContainerFillChart}from"../chunk-BL347U3N.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-GKYGPCGL.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-3BQMICGG.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-4BRVZAIW.js";export{ICON_NAMES,isIconName}from"../chunk-3C7JKJGL.js";export{BRAND_ICON_NAMES,isBrandIconName}from"../chunk-RQGLDRRF.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-DOJSWVBX.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-72UHB4JU.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-ZRWZHWKI.js";export{WidthsBar}from"../chunk-ZA6ANC2D.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-P3XXFQG5.js";export{Slider,SliderGroup}from"../chunk-R36VZ35L.js";export{Snippet}from"../chunk-6AYAB5FN.js";export{SplitButton_default as SplitButton}from"../chunk-FFPIT2LB.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-CHDGSJLV.js";export{NumericKeypad}from"../chunk-T46I4YOI.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PICTURE_TILES_COLUMNS_VAR,PictureTiles}from"../chunk-3L7BEEBW.js";export{PositionInput}from"../chunk-EN3GYSCE.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"../chunk-YTLUSBDY.js";export{SearchableSelect}from"../chunk-Y7D2CZ4H.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-Y2M5PP2C.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-CXEELIRW.js";import"../chunk-P5J7G7OV.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-W3454ZES.js";export{ImageLightbox,lightboxKind}from"../chunk-NDCS4COQ.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-DTFX624I.js";export{Breadcrumbs}from"../chunk-WREUA43Q.js";export{mediaLibraryMenu}from"../chunk-UFJR63AO.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-GRAFJD3L.js";export{MediaUsedInList}from"../chunk-U75MSD4F.js";export{RenameField}from"../chunk-WYAKASF3.js";export{NativeSelect,Select_default as Select}from"../chunk-EBODRYXS.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-Y5RTVKMB.js";export{DateRangePicker,toISODate}from"../chunk-W4IH3BE3.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-ROYHU3E5.js";export{DisplayChips}from"../chunk-NC5FIFAY.js";export{FilePicker_default as FilePicker}from"../chunk-YX3JD6PA.js";export{FormErrorSummary}from"../chunk-UDJPSHVI.js";export{CornersInput}from"../chunk-2SOGTOUQ.js";export{DatePicker_default as DatePicker}from"../chunk-A3VLZZHJ.js";export{Calendar}from"../chunk-PPHGBEJA.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-S4RFJTGR.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-MKHOXO5O.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-REFPTKRD.js";export{IconPicker}from"../chunk-3ZJAQSFS.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-AZZ4NO2D.js";export{Popover}from"../chunk-VUBDHFG5.js";export{InputNumber_default as InputNumber}from"../chunk-I7WAOKU2.js";export{UnitMenu}from"../chunk-GVAVIYE6.js";export{WidestLabel}from"../chunk-X3LMTOMA.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BrandAssetEditor}from"../chunk-PTLVNC3V.js";export{MediaUploadField}from"../chunk-Y6FULJWJ.js";export{ImageFocusPoint}from"../chunk-CUJ537IY.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{useSort}from"../chunk-22SVN2ZM.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-ZSEB7XW4.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{gridColumnCount}from"../chunk-VNNVG4NR.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{EntityList}from"../chunk-PWERFHOU.js";import"../chunk-XYVFJLAU.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{Gantt}from"../chunk-SP4S4HUJ.js";export{Segmented}from"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";export{Kanban}from"../chunk-MXRF5YVN.js";export{ListFooter}from"../chunk-U73K3ICC.js";export{ListLoadError}from"../chunk-7OVMWXFM.js";export{ResizableTable}from"../chunk-WNFZYTWW.js";export{useColumnConfig}from"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{statusColumn}from"../chunk-WBUAO7T7.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";import"../chunk-UVCMV2TL.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-2RLWGWOU.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Pagination}from"../chunk-Q2RNFBYS.js";export{TreemapChart}from"../chunk-4DNPUG3T.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-WCAABJEV.js";export{RangeChart}from"../chunk-Q7CM4UDG.js";export{RankedBars}from"../chunk-53HHYEN4.js";export{SankeyChart}from"../chunk-PWON7O3N.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-PPI4WJ3V.js";export{StatTile}from"../chunk-XX34ZFYB.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-ZEGCKIAL.js";export{FunnelChart}from"../chunk-QZ2XRFDP.js";export{HeatmapChart}from"../chunk-FBI3XJWH.js";export{HistogramChart}from"../chunk-N64YAF5N.js";export{Meter}from"../chunk-MMA3WTF2.js";export{PieChart}from"../chunk-6EGZ4PV4.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-MNZAAQLH.js";export{RadialBarChart}from"../chunk-OOND66P2.js";export{ChordChart}from"../chunk-HTBACICQ.js";import"../chunk-24BF22NF.js";export{StepChain,StepChainItem}from"../chunk-Z2Z653OO.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-IZ6D4KGR.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Avatar,AvatarGroup}from"../chunk-SCNQK5NF.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Z5TE3MEG.js";export{ContextMenu,useContextMenu}from"../chunk-5O4HMXPQ.js";export{Banner}from"../chunk-OSMRYND3.js";export{Input_default as Input}from"../chunk-W6REY3SV.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-RXCBSQA2.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-MPC3CHAO.js";export{TransferProgress}from"../chunk-ION3XGLN.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-TNGIXSTM.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-DNPAYNNU.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-OJI4ROSD.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"../chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{DAY_MS,fromDateKey,toDateKey}from"../chunk-JRQMX4PK.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-P5TSGXL4.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-OYQWBJ37.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-SAMPXZF3.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-A6TOHNJY.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-AQVPWUJ3.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-MEFB2KGF.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-TDUOBP55.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";import"../chunk-YI4T5I5D.js";export{Result}from"../chunk-PSVGB7KT.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-TTD2M6RF.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-2XDO7FZC.js";export{Dialog}from"../chunk-ZSVU44OB.js";import"../chunk-EIFNESXS.js";export{ItemCount}from"../chunk-7WF6LFOJ.js";import"../chunk-CJ4OEY3T.js";import"../chunk-AH5MLH54.js";import"../chunk-5YTZBYG4.js";import"../chunk-VWGWZY7A.js";import"../chunk-DBQNYJZ6.js";export{ColoredBadge}from"../chunk-6X32SWQI.js";import"../chunk-4PJFL26P.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-POBVGDZP.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";export{VERSION}from"../chunk-5F3HPOBH.js";export{DropdownMenu}from"../chunk-M5IZ7QLQ.js";import"../chunk-XNKNX5L3.js";export{useFocusTrap,useScrollLock}from"../chunk-DWGYC7OD.js";export{IconButton_default as IconButton}from"../chunk-MYH5H43C.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,statusLabel,useStatusLabel}from"../chunk-EDRELF6L.js";export{Button_default as Button}from"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-BWJZTHZ6.js";import"../chunk-G3TC2GIA.js";export{Tooltip}from"../chunk-AJPQJ7TC.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-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{FitFrame,fitBoxScale,fitFrameStyle,fitScale}from"../chunk-M6UKCZHT.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-I2NVBDKH.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-P234FPKJ.js";export{CandlestickChart}from"../chunk-BEXFMSNK.js";export{CartesianPlot}from"../chunk-S4RD6UJU.js";import"../chunk-LLSGIMLG.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{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
2
|
+
import"../chunk-PF6RXLWQ.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{CheckoutTemplate}from"../chunk-GY7MJTIZ.js";export{DashboardTemplate}from"../chunk-DO6P6LYU.js";export{DataTablePage}from"../chunk-UGA5NGW4.js";export{EmailTemplate}from"../chunk-LPL7BWGG.js";export{ErrorBoundary}from"../chunk-XJK6VNXV.js";export{ErrorPage}from"../chunk-6NXPOZ6X.js";export{FormLayoutPage}from"../chunk-6RU2PGQK.js";export{GalleryTemplate}from"../chunk-7D2QZ6JA.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-47BGAQWD.js";export{ChatTemplate}from"../chunk-ISWTJBOA.js";export{TopNav}from"../chunk-DBBOD5QW.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-R3BSWWGB.js";export{Stepper}from"../chunk-KTO427N3.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-NHALP3MW.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-DV6TUXCZ.js";export{SettingRow}from"../chunk-LRMDLZMM.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-MEDOESQD.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-QCLKRFL4.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-JPVD3VS7.js";export{PageHeader}from"../chunk-3EYJ4G7L.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-KE7P74XM.js";export{ResizeHandle}from"../chunk-5SQHRDFC.js";export{SettingReset}from"../chunk-HAEZUUDT.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-EOYKUV2U.js";export{MetricBar}from"../chunk-PLESHI3E.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-VTCMO3K7.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-E57C7NBA.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-Q7FPGOUY.js";export{fmtSliderDate,toDayMs}from"../chunk-5CFERCYW.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-HX5QSQ2C.js";export{GlobalSearch,openGlobalSearch}from"../chunk-EHNW3UNC.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-HGOWQO63.js";export{HelpCenter}from"../chunk-EHSK43WG.js";export{IconRail,IconRailButton}from"../chunk-XIX72C7K.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-PFOTEDSQ.js";export{EditableGrid}from"../chunk-PEA5Y6DD.js";export{BudgetBar,budgetState}from"../chunk-7B6JPNOD.js";export{Card,StatCard}from"../chunk-RKSCB5BJ.js";export{ContainerFillChart}from"../chunk-BL347U3N.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-GKYGPCGL.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-3BQMICGG.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-4BRVZAIW.js";export{ICON_NAMES,isIconName}from"../chunk-3C7JKJGL.js";export{BRAND_ICON_NAMES,isBrandIconName}from"../chunk-RQGLDRRF.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-DOJSWVBX.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-72UHB4JU.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-ZRWZHWKI.js";export{WidthsBar}from"../chunk-ZA6ANC2D.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-P3XXFQG5.js";export{Slider,SliderGroup}from"../chunk-R36VZ35L.js";export{Snippet}from"../chunk-6AYAB5FN.js";export{SplitButton_default as SplitButton}from"../chunk-FFPIT2LB.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-CHDGSJLV.js";export{NumericKeypad}from"../chunk-T46I4YOI.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PICTURE_TILES_COLUMNS_VAR,PictureTiles}from"../chunk-3L7BEEBW.js";export{PositionInput}from"../chunk-EN3GYSCE.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{LinkPicker,TextLinkField}from"../chunk-YTLUSBDY.js";export{SearchableSelect}from"../chunk-Y7D2CZ4H.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-Y2M5PP2C.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-CXEELIRW.js";import"../chunk-P5J7G7OV.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-W3454ZES.js";export{ImageLightbox,lightboxKind}from"../chunk-NDCS4COQ.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-DTFX624I.js";export{Breadcrumbs}from"../chunk-WREUA43Q.js";export{mediaLibraryMenu}from"../chunk-UFJR63AO.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-GRAFJD3L.js";export{MediaUsedInList}from"../chunk-U75MSD4F.js";export{RenameField}from"../chunk-WYAKASF3.js";export{NativeSelect,Select_default as Select}from"../chunk-EBODRYXS.js";import"../chunk-EO5RLFRX.js";import"../chunk-K5YT5PMJ.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-Y5RTVKMB.js";export{DateRangePicker,toISODate}from"../chunk-W4IH3BE3.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-ROYHU3E5.js";export{DisplayChips}from"../chunk-NC5FIFAY.js";export{FilePicker_default as FilePicker}from"../chunk-YX3JD6PA.js";export{FormErrorSummary}from"../chunk-UDJPSHVI.js";export{CornersInput}from"../chunk-2SOGTOUQ.js";export{DatePicker_default as DatePicker}from"../chunk-A3VLZZHJ.js";export{Calendar}from"../chunk-PPHGBEJA.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{useRootIsDark}from"../chunk-UPXDDO3U.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-4K32E3AO.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{AlignmentGrid}from"../chunk-MKHOXO5O.js";export{BorderInput,borderSides,borderStartEach}from"../chunk-REFPTKRD.js";export{IconPicker}from"../chunk-3ZJAQSFS.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-AZZ4NO2D.js";export{Popover}from"../chunk-VUBDHFG5.js";export{InputNumber_default as InputNumber}from"../chunk-I7WAOKU2.js";export{UnitMenu}from"../chunk-GVAVIYE6.js";export{WidestLabel}from"../chunk-X3LMTOMA.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{BrandAssetEditor}from"../chunk-PTLVNC3V.js";export{MediaUploadField}from"../chunk-Y6FULJWJ.js";export{ImageFocusPoint}from"../chunk-CUJ537IY.js";export{FormField}from"../chunk-6KBDNYRW.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{useSort}from"../chunk-22SVN2ZM.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-YYGA4Y6E.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{gridColumnCount}from"../chunk-VNNVG4NR.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{EntityList}from"../chunk-PWERFHOU.js";import"../chunk-XYVFJLAU.js";export{useTableNav}from"../chunk-ATMJ5ZPK.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{Gantt}from"../chunk-SP4S4HUJ.js";export{Segmented}from"../chunk-ALZHFQRX.js";import"../chunk-EFKJLUYP.js";export{Kanban}from"../chunk-MXRF5YVN.js";export{ListFooter}from"../chunk-U73K3ICC.js";export{ListLoadError}from"../chunk-7OVMWXFM.js";export{ResizableTable}from"../chunk-WNFZYTWW.js";export{useColumnConfig}from"../chunk-XGEN76DG.js";import"../chunk-ULJQYXHB.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{statusColumn}from"../chunk-WBUAO7T7.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";import"../chunk-UVCMV2TL.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-2RLWGWOU.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Pagination}from"../chunk-Q2RNFBYS.js";export{TreemapChart}from"../chunk-4DNPUG3T.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-WCAABJEV.js";export{RangeChart}from"../chunk-Q7CM4UDG.js";export{RankedBars}from"../chunk-53HHYEN4.js";export{SankeyChart}from"../chunk-PWON7O3N.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-PPI4WJ3V.js";export{StatTile}from"../chunk-XX34ZFYB.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-ZEGCKIAL.js";export{FunnelChart}from"../chunk-QZ2XRFDP.js";export{HeatmapChart}from"../chunk-FBI3XJWH.js";export{HistogramChart}from"../chunk-N64YAF5N.js";export{Meter}from"../chunk-MMA3WTF2.js";export{PieChart}from"../chunk-6EGZ4PV4.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-MNZAAQLH.js";export{RadialBarChart}from"../chunk-OOND66P2.js";export{ChordChart}from"../chunk-HTBACICQ.js";import"../chunk-24BF22NF.js";export{StepChain,StepChainItem}from"../chunk-Z2Z653OO.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-IZ6D4KGR.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Avatar,AvatarGroup}from"../chunk-SCNQK5NF.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-Z5TE3MEG.js";export{ContextMenu,useContextMenu}from"../chunk-5O4HMXPQ.js";export{Banner}from"../chunk-OSMRYND3.js";export{Input_default as Input}from"../chunk-W6REY3SV.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-RXCBSQA2.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-MPC3CHAO.js";export{TransferProgress}from"../chunk-ION3XGLN.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-TNGIXSTM.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-DNPAYNNU.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-OJI4ROSD.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,dayKeyInZone,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,instantOnDayKey,knownZone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,userToday,userZone}from"../chunk-NHKT5IH6.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{DAY_MS,fromDateKey,toDateKey}from"../chunk-JRQMX4PK.js";import"../chunk-LF27WIN2.js";export{TimeSeriesChart}from"../chunk-P5TSGXL4.js";export{DEFAULT_FLOW_CHART_LABELS,FlowChart}from"../chunk-OYQWBJ37.js";export{FLOW_LAYOUT,FLOW_SPEC_LIMITS,layoutFlow,parseFlowSpec}from"../chunk-FAERBT6Y.js";export{ChartBrush}from"../chunk-SAMPXZF3.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-A6TOHNJY.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-AQVPWUJ3.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-MEFB2KGF.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{ImageAnnotator_default as ImageAnnotator}from"../chunk-TDUOBP55.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";import"../chunk-YI4T5I5D.js";export{Result}from"../chunk-PSVGB7KT.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-TTD2M6RF.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-2XDO7FZC.js";export{Dialog}from"../chunk-ZSVU44OB.js";import"../chunk-EIFNESXS.js";export{ItemCount}from"../chunk-7WF6LFOJ.js";import"../chunk-CJ4OEY3T.js";import"../chunk-AH5MLH54.js";import"../chunk-5YTZBYG4.js";import"../chunk-VWGWZY7A.js";import"../chunk-DBQNYJZ6.js";export{ColoredBadge}from"../chunk-6X32SWQI.js";export{parseOption}from"../chunk-YPXONNBV.js";import"../chunk-4PJFL26P.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-POBVGDZP.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";export{VERSION}from"../chunk-QYRBRJDN.js";export{DropdownMenu}from"../chunk-M5IZ7QLQ.js";import"../chunk-XNKNX5L3.js";export{useFocusTrap,useScrollLock}from"../chunk-DWGYC7OD.js";export{IconButton_default as IconButton}from"../chunk-MYH5H43C.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-RTK77DMP.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,statusLabel,useStatusLabel}from"../chunk-EDRELF6L.js";export{Button_default as Button}from"../chunk-MEP6CZJ3.js";import"../chunk-IVEM2BPC.js";export{Icon}from"../chunk-ISVODSRP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-BWJZTHZ6.js";import"../chunk-G3TC2GIA.js";export{Tooltip}from"../chunk-AJPQJ7TC.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-TAHHZGRH.js";import"../chunk-KEFNQEXZ.js";import"../chunk-PU2GJVMG.js";export{setShellApiClient}from"../chunk-STKJA4PV.js";export{FitFrame,fitBoxScale,fitFrameStyle,fitScale}from"../chunk-M6UKCZHT.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-I2NVBDKH.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";export{BoxPlotChart}from"../chunk-P234FPKJ.js";export{CandlestickChart}from"../chunk-BEXFMSNK.js";export{CartesianPlot}from"../chunk-S4RD6UJU.js";import"../chunk-LLSGIMLG.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{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-NRHG4R2Q.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* parseOption — the ONE routine that narrows an untrusted value (a stored
|
|
3
|
+
* document's field, a URL param, an authored default) to a known set of
|
|
4
|
+
* option values, and answers the fallback when it matches none.
|
|
5
|
+
*
|
|
6
|
+
* A stored document is JSON and may hold anything: a hand edit, a value from a
|
|
7
|
+
* later version, or nothing on a page saved before the setting existed.
|
|
8
|
+
* "Anything unknown means the default" is the total function behind every
|
|
9
|
+
* stored-option reader, so it is written once, here, in the lowest package:
|
|
10
|
+
* the shell, easel, the web builder, the storefront blocks and the admin
|
|
11
|
+
* import it from `efficient-shell/format`. The ui-check kind `option-read`
|
|
12
|
+
* counts a conditional typed by hand to do the same job.
|
|
13
|
+
*
|
|
14
|
+
* The option list may be a plain value array (`['a', 'b']`) or an inspector
|
|
15
|
+
* option array (`[{ label, value }]`), the two spellings callers already keep,
|
|
16
|
+
* so no call site has to reshape its data. The fallback need not be in the
|
|
17
|
+
* list: "none" (`''`) may be its own answer.
|
|
18
|
+
*/
|
|
19
|
+
declare function parseOption<T extends string>(options: readonly (T | {
|
|
20
|
+
value: T;
|
|
21
|
+
})[], fallback: T, value: unknown): T;
|
|
22
|
+
|
|
23
|
+
export { parseOption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{parseOption}from"../chunk-YPXONNBV.js";
|
package/dist/value-index.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schema":1,"package":"efficient-shell","version":"14.
|
|
1
|
+
{"schema":1,"package":"efficient-shell","version":"14.2.0","entries":[{"entry":"efficient-shell","name":"ACCENT_ROLES","hash":"bd7fd9e5b26249a998b2"},{"entry":"efficient-shell","name":"BORDER_WIDTHS","hash":"78a506e44a654d5b22dd"},{"entry":"efficient-shell","name":"BRAND_ICON_NAMES","hash":"9f47dc20f8029a420b70"},{"entry":"efficient-shell","name":"CHART_INK","hash":"3f4d30da8161976c516b"},{"entry":"efficient-shell","name":"CHART_SPEC_LIMITS","hash":"301b29dfb507675e845d"},{"entry":"efficient-shell","name":"COLUMN_COUNT_WIDTHS","hash":"287a95f277695d0635fe"},{"entry":"efficient-shell","name":"COLUMN_SHARES_EQUAL","hash":"79cad7d332efce44435c"},{"entry":"efficient-shell","name":"CONTROL_HEIGHTS","hash":"26fdd7e9bd83bfe00f5e"},{"entry":"efficient-shell","name":"DATE_FORMAT_OPTIONS","hash":"25598ad7ed2742e39f98"},{"entry":"efficient-shell","name":"DEFAULT_FLOW_CHART_LABELS","hash":"56e77e95b8c1a6839984"},{"entry":"efficient-shell","name":"DEV_BANNER_TEXT","hash":"6f7e89424a7f413a139f"},{"entry":"efficient-shell","name":"ENGLISH","hash":"121b17f8146326744275"},{"entry":"efficient-shell","name":"ENTRANCE_ATTR","hash":"fc79fde5667e4be907a6"},{"entry":"efficient-shell","name":"ENTRANCE_FROM_ATTR","hash":"e5753ff44b8f14537d40"},{"entry":"efficient-shell","name":"ENTRANCE_STATE_ATTR","hash":"6feecdb8e8c4d673cd25"},{"entry":"efficient-shell","name":"FLAT_STATUS_ROLES","hash":"38f538e0036062cc3f1b"},{"entry":"efficient-shell","name":"FLOW_LAYOUT","hash":"6355c496cbbe32189091"},{"entry":"efficient-shell","name":"FLOW_SPEC_LIMITS","hash":"31add05b65bd74b7d006"},{"entry":"efficient-shell","name":"FONT_WEIGHTS","hash":"52b4a2a4070f79ac24c3"},{"entry":"efficient-shell","name":"GLASS_DIVIDER","hash":"4abe484f8492531e6e01"},{"entry":"efficient-shell","name":"GLASS_INPUT_BG","hash":"2cc213cc21bdcbe5ee79"},{"entry":"efficient-shell","name":"GROUP_COLORS","hash":"7aabea256a050c690c98"},{"entry":"efficient-shell","name":"GROUP_COLORS_SOLID","hash":"a620712d032b782085db"},{"entry":"efficient-shell","name":"HOVER_MOTION","hash":"af0a80b3c85e3fbf85d8"},{"entry":"efficient-shell","name":"ICON_NAMES","hash":"cfa9f4558fa1a147302b"},{"entry":"efficient-shell","name":"ICON_SET_FOR_THEME","hash":"8103453b2b0aa00255a3"},{"entry":"efficient-shell","name":"IDENTITY_ROLES","hash":"21f80df1c4baff623350"},{"entry":"efficient-shell","name":"INPUT_SIZES","hash":"c5d43314d24fd6735f5c"},{"entry":"efficient-shell","name":"LIGHTBOX_PICTURE_FIT","hash":"a93a7592a4af090e56b8"},{"entry":"efficient-shell","name":"MARQUEE_IGNORE","hash":"f8ed1942eb85570db2f0"},{"entry":"efficient-shell","name":"MEDIA_FILES_DRAG_TYPE","hash":"724ea23a8bdd3e839308"},{"entry":"efficient-shell","name":"MEDIA_FILE_DRAG_TYPE","hash":"4c811c3891dfb852805d"},{"entry":"efficient-shell","name":"MEDIA_FOLDER_DRAG_TYPE","hash":"3bb01ff9a70c4d5f7393"},{"entry":"efficient-shell","name":"MENU_ON_MEDIA_ATTR","hash":"8920dd2122ac10c310af"},{"entry":"efficient-shell","name":"MODAL_SUBMIT_SELECTOR","hash":"d84bdbfd01a8805d95b7"},{"entry":"efficient-shell","name":"MOTION","hash":"afb7e9a03604f388b85d"},{"entry":"efficient-shell","name":"MOTION_EASING","hash":"4789d99f72a99fc71931"},{"entry":"efficient-shell","name":"MOTION_GROUPS","hash":"72eccd969d7845e62f7c"},{"entry":"efficient-shell","name":"NATIVE_MENU_ATTR","hash":"005131ab6b8f236a967e"},{"entry":"efficient-shell","name":"NEUTRAL_ROLES","hash":"e0ffa42a68fdebbc6f4a"},{"entry":"efficient-shell","name":"NEXT_CHUNK_PATH_PREFIX","hash":"09c4a7664b671338c222"},{"entry":"efficient-shell","name":"OVERLAY_OPEN_EVENT","hash":"5029df721a453803dc12"},{"entry":"efficient-shell","name":"PICTURE_TILES_COLUMNS_VAR","hash":"8ff0bf10875ffde65e40"},{"entry":"efficient-shell","name":"PLACEHOLDER_INK","hash":"2df66d0d39e28d3b53e7"},{"entry":"efficient-shell","name":"SCRIM_ROLES","hash":"eb89174bfef99154962d"},{"entry":"efficient-shell","name":"SERIES_VARS","hash":"6fb1755e5ee724888d5b"},{"entry":"efficient-shell","name":"SHELL_LANGUAGE_STORAGE_KEY","hash":"6e4367376ca83b903d75"},{"entry":"efficient-shell","name":"SPACING_ROLES","hash":"6a56d2441721d205e749"},{"entry":"efficient-shell","name":"STAGES","hash":"9632e5aae395880146f2"},{"entry":"efficient-shell","name":"STALE_CHUNK_RELOAD_KEY","hash":"68a7205bd9736805ac7f"},{"entry":"efficient-shell","name":"STATUS_VARS","hash":"4f9dd4373172ce6a7d64"},{"entry":"efficient-shell","name":"TEXT_ALIGN_ICONS","hash":"c1a50003c898d5dc6cc7"},{"entry":"efficient-shell","name":"THEME_ICON_SETS","hash":"c04ed577f1f8de5ea01e"},{"entry":"efficient-shell","name":"VITE_PRELOAD_ERROR_EVENT","hash":"dfad33b292b16949faf1"},{"entry":"efficient-shell","name":"Z_LAYERS","hash":"0b590a52752106009d6a"},{"entry":"efficient-shell/ai","name":"DEFAULT_ASSISTANT_CHAT_LABELS","hash":"e021be115baf6c56c0ca"},{"entry":"efficient-shell/ai","name":"ROW_EXTRA_LABELS","hash":"3c2a34facf25ae548f39"},{"entry":"efficient-shell/apps","name":"FILES_OFFICE_EXTENSIONS","hash":"ec322d0793d079446bd9"},{"entry":"efficient-shell/apps","name":"FILES_ROLE_LABELS","hash":"2de2334df77090846b67"},{"entry":"efficient-shell/apps","name":"SPREADSHEET_PREVIEW_UPDATE_EVENT","hash":"834ba753658d2c8d0a31"},{"entry":"efficient-shell/format","name":"ENTRANCE_DELAY_VAR","hash":"8a2f4a1e751ec138bbbf"},{"entry":"efficient-shell/format","name":"ENTRANCE_DURATION_VAR","hash":"ed9dff0a293be26a023e"},{"entry":"efficient-shell/format","name":"HOVER_KINDS","hash":"e2c76e5db09742cb68d9"},{"entry":"efficient-shell/format","name":"PIN_ABOVE_ATTR","hash":"1cd4918b109d8fb8a75a"},{"entry":"efficient-shell/format","name":"PIN_ABOVE_Z_VAR","hash":"da1d8d7520816a38349f"},{"entry":"efficient-shell/format","name":"PIN_ATTR","hash":"90fa72a3274aefa2672f"},{"entry":"efficient-shell/format","name":"PIN_FRAME_ATTR","hash":"7762b6fd5c2094673b82"},{"entry":"efficient-shell/format","name":"PIN_LENGTH_VAR","hash":"0fcd5a46096644382ba1"},{"entry":"efficient-shell/format","name":"PIN_ON_VAR","hash":"727387fbc36cde299ff1"},{"entry":"efficient-shell/format","name":"PIN_POSITION_VAR","hash":"6c45b2190b5524b1b15f"},{"entry":"efficient-shell/format","name":"PIN_STICK_VAR","hash":"b3d4702280b41f24617f"},{"entry":"efficient-shell/format","name":"PIN_TOP_VAR","hash":"093101ff1937dabe4daa"},{"entry":"efficient-shell/format","name":"PIN_TRACK_POSITION_VAR","hash":"1f9df4b27f9f5421fbea"},{"entry":"efficient-shell/format","name":"SCROLL_ATTR","hash":"6f55192d6271f711b399"},{"entry":"efficient-shell/format","name":"SCROLL_EFFECTS","hash":"158d40bf267a46b5a92b"},{"entry":"efficient-shell/format","name":"SCROLL_END_VAR","hash":"c0c679414eb0277fbf63"},{"entry":"efficient-shell/format","name":"SCROLL_ORIGIN_VAR","hash":"0098429747fe503a2242"},{"entry":"efficient-shell/format","name":"SCROLL_PROGRESS_VAR","hash":"72041dc916102bdcc9d8"},{"entry":"efficient-shell/format","name":"SCROLL_START_VAR","hash":"7b65b18fff5c610b4bab"},{"entry":"efficient-shell/format","name":"SCROLL_ZOOM_VAR","hash":"0d8ae643ee6e1790db87"},{"entry":"efficient-shell/icons/efficient","name":"efficientIconMeanings","hash":"8a08f4c0030f8f952668"},{"entry":"efficient-shell/icons/sets","name":"efficientLookNames","hash":"eb8a3af463df1f310f4c"},{"entry":"efficient-shell/map","name":"COMPACT_SHOW","hash":"8e104672613835524e35"},{"entry":"efficient-shell/map","name":"MAPLIBRE_WORKER_FILE","hash":"ea4884f1e1bd66e2cc4e"},{"entry":"efficient-shell/map","name":"MAP_CATEGORIES","hash":"9c7650509b67d02224e3"},{"entry":"efficient-shell/map","name":"MAP_TILE_ORIGIN","hash":"2becdbb36cdfe9f5ef24"},{"entry":"efficient-shell/markup","name":"COLOR_SLOTS","hash":"546d8695bfd3a4168b36"},{"entry":"efficient-shell/markup","name":"MARKUP_TOOLS","hash":"c00656098e6c6de33881"},{"entry":"efficient-shell/markup","name":"MARK_NAMES","hash":"d44aa3e35fd85db3d037"},{"entry":"efficient-shell/markup","name":"STANDARD_MARKUP","hash":"dfb86d96534febeba3e0"},{"entry":"efficient-shell/model-viewer","name":"MODEL_VIEWER_DECODER_ORIGIN","hash":"dee20e1d75b05718f79c"}]}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APP_VERSION,VERSION}from"./chunk-
|
|
1
|
+
export{APP_VERSION,VERSION}from"./chunk-QYRBRJDN.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.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 t,WidgetSettingsModal as e}from"./chunk-XLPUIGMO.js";import{useWidgetSettings as n}from"./chunk-6IP4Q3AT.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import"./chunk-2XDO7FZC.js";import"./chunk-ZSVU44OB.js";import"./chunk-EIFNESXS.js";import"./chunk-7WF6LFOJ.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AH5MLH54.js";import"./chunk-5YTZBYG4.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-6X32SWQI.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-POBVGDZP.js";import"./chunk-AW7TOB6N.js";import"./chunk-M5IZ7QLQ.js";import"./chunk-XNKNX5L3.js";import"./chunk-DWGYC7OD.js";import"./chunk-MYH5H43C.js";import"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EDRELF6L.js";import"./chunk-MEP6CZJ3.js";import"./chunk-IVEM2BPC.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G3TC2GIA.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.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),[j,b]=c(null),[g,N]=c(!1),[C,y]=c(""),[x,f]=c([]),[v,T]=c(!1),[$,E]=c(()=>t(h)),[M,F]=c(!1),[P,Z]=c($),D=i(null);n(o(()=>{Z({...$}),F(!0)},[$]));const J=o(t=>{y(""),k(e=>g||"0"===e?(N(!1),"."===t?"0.":t):"."===t&&e.includes(".")?e:e+t)},[g]),W=o(()=>{k("0"),d(null),b(null),N(!1)},[]),G=o((t,e,n)=>{switch(n){case"+":return t+e;case"-":return t-e;case"×":return t*e;case"÷":return 0===e?0:t/e;default:return e}},[]),S=o(t=>{const e=parseFloat(m);if(null!==p&&j&&!g){const t=G(p,e,j);k(String(t)),d(t),f(n=>[`${p} ${j} ${e} = ${t}`,...n].slice(0,20))}else d(e);b(t),N(!0)},[m,p,j,g,G]),H=o(()=>{if(null===p||!j)return;const t=parseFloat(m),e=G(p,t,j),n=`${p} ${j} ${t} =`;f(t=>[`${n} ${e}`,...t].slice(0,20)),y(n),k(String(e)),d(null),b(null),N(!0)},[m,p,j,G]),Q=o(()=>{k(t=>String(parseFloat(t)/100))},[]),R=o(()=>{k(t=>t.startsWith("-")?t.slice(1):"0"===t?t:"-"+t)},[]);s(()=>{const t=t=>{const e=t.target.tagName;"INPUT"!==e&&"TEXTAREA"!==e&&"SELECT"!==e&&(t.key>="0"&&t.key<="9"?J(t.key):"."===t.key?J("."):"+"===t.key?S("+"):"-"===t.key?S("-"):"*"===t.key?S("×"):"/"===t.key?(t.preventDefault(),S("÷")):"Enter"===t.key||"="===t.key?("Enter"===t.key&&t.target instanceof Node&&D.current?.contains(t.target)&&t.preventDefault(),H()):"Escape"===t.key?W():"Backspace"===t.key?k(t=>t.length>1?t.slice(0,-1):"0"):"%"===t.key&&Q())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[J,S,H,W,Q]);const A="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",B=`${A} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,L=`${A} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,X=`${A} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,w=`${A} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return l(a,{children:[
|
|
3
|
-
/* @__PURE__ */l("div",{ref:D,className:"flex flex-col h-full",style:{opacity:$.activeOpacity/100,backdropFilter:$.activeBlur>0?`blur(${$.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:x.slice(0,3).reverse().map((t,e)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:t},e))}),(C||j&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:C||`${p} ${j} ${g?"":m}`}),
|
|
6
|
-
/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),T(!0),setTimeout(()=>T(!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:(t=>{const e=parseFloat(t);return isNaN(e)||t.endsWith(".")||t.endsWith(".0")||Math.abs(e)<1e15&&t.length<16?t:e.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:W,className:X,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:R,className:X,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:Q,className:X,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>S("÷"),className:`${L} ${"÷"===j?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>J("7"),className:B,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>J("8"),className:B,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>J("9"),className:B,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>S("×"),className:`${L} ${"×"===j?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>J("4"),className:B,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>J("5"),className:B,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>J("6"),className:B,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>S("-"),className:`${L} ${"-"===j?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>J("1"),className:B,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>J("2"),className:B,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>J("3"),className:B,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>S("+"),className:`${L} ${"+"===j?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>J("0"),className:`${B} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>J("."),className:B,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:H,className:w,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(e,{open:M,onClose:()=>F(!1),title:"Calculator Settings",appearance:P,onAppearanceChange:Z,onSave:()=>{E(P),localStorage.setItem(h,JSON.stringify(P)),F(!1)}})]})}export{m as default};
|
package/dist/Files-5S6UFGST.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-UMIRPFQJ.js";import{SidebarLayout as t}from"./chunk-MEDOESQD.js";import"./chunk-QWK6DRSN.js";import"./chunk-5SQHRDFC.js";import{SearchableSelect as n}from"./chunk-Y7D2CZ4H.js";import{Breadcrumbs as a}from"./chunk-WREUA43Q.js";import{Select_default as r}from"./chunk-EBODRYXS.js";import"./chunk-EO5RLFRX.js";import"./chunk-K5YT5PMJ.js";import"./chunk-2NMW66P5.js";import{useContextMenu as i,ContextMenu as s}from"./chunk-5O4HMXPQ.js";import{Input_default as l}from"./chunk-W6REY3SV.js";import"./chunk-AYZY3YNC.js";import{formatBytes as o}from"./chunk-OJI4ROSD.js";import{dayKeyInZone as c,formatTime as d,formatDateTime as m,userToday as h,instantOnDayKey as u}from"./chunk-NHKT5IH6.js";import{EMPTY_VALUE as f}from"./chunk-36BRD5J3.js";import{fromDateKey as p,toDateKey as k}from"./chunk-JRQMX4PK.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as g,subscribeFilesChoice as w,getFilesChoice as y,holdFilesChoice as b,answerFilesChoice as v,choiceTakes as x}from"./chunk-CUNYWXUT.js";import{AboutApp as N}from"./chunk-P2HZ2V3U.js";import{getFilesStore as C,peekFilesViewRequest as j,consumeFilesViewRequest as S,FILES_SHOW_TRASH_EVENT as D,FILES_OPEN_DESKTOP_FOLDER_EVENT as T,subscribeDesktopFolders as M,getDesktopFoldersSnapshot as $,filesRoleWrites as L,hasHostFilesStore as P,FolderGlyph as R,DesktopItemMiniIcon as E,desktopItemTypeLabel as F,FilesQuotaError as A,FILES_OFFICE_EXTENSIONS as O,FILES_ROLE_LABELS as I}from"./chunk-KGRJSTPM.js";import"./chunk-I4RJAMLJ.js";import{useWindowManager as z,WindowTitle as W}from"./chunk-6IP4Q3AT.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-YI4T5I5D.js";import"./chunk-PSVGB7KT.js";import"./chunk-TTD2M6RF.js";import"./chunk-5A7MWTXX.js";import"./chunk-TJ5YMXVB.js";import{confirm as K,prompt as U}from"./chunk-2XDO7FZC.js";import{Dialog as Y}from"./chunk-ZSVU44OB.js";import"./chunk-EIFNESXS.js";import{ItemCount as H}from"./chunk-7WF6LFOJ.js";import"./chunk-CJ4OEY3T.js";import"./chunk-AH5MLH54.js";import"./chunk-5YTZBYG4.js";import"./chunk-VWGWZY7A.js";import"./chunk-DBQNYJZ6.js";import"./chunk-6X32SWQI.js";import"./chunk-4PJFL26P.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-POBVGDZP.js";import"./chunk-AW7TOB6N.js";import"./chunk-5F3HPOBH.js";import{DropdownMenu as J}from"./chunk-M5IZ7QLQ.js";import"./chunk-XNKNX5L3.js";import"./chunk-DWGYC7OD.js";import{IconButton_default as V}from"./chunk-MYH5H43C.js";import"./chunk-RTK77DMP.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EDRELF6L.js";import{Button_default as Q}from"./chunk-MEP6CZJ3.js";import"./chunk-IVEM2BPC.js";import{Icon as B}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as Z}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import{TH_ONE_LINE as G}from"./chunk-G3TC2GIA.js";import"./chunk-AJPQJ7TC.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-TAHHZGRH.js";import"./chunk-KEFNQEXZ.js";import"./chunk-PU2GJVMG.js";import"./chunk-STKJA4PV.js";import"./chunk-M6UKCZHT.js";import{toast_default as X}from"./chunk-I2NVBDKH.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-MAFUXCPZ.js";import"./chunk-NRHG4R2Q.js";import"./chunk-C3QOHMR6.js";import{useState as q,useRef as _,useEffect as ee,useCallback as te,useSyncExternalStore as ne,useMemo as ae}from"react";import{jsxs as re,jsx as ie,Fragment as se}from"react/jsx-runtime";var le={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 oe(e){const t=e.lastIndexOf(".");return t>0?e.slice(t+1).toLowerCase():""}function ce(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":le[oe(e.name)]??"other"}var de={folder:"Folder",document:"Document",spreadsheet:"Spreadsheet",slides:"Slides",pdf:"PDF",image:"Image",video:"Video",audio:"Audio",archive:"Archive",drawing:"Drawing",other:"File"},me={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 he(e){const t=e.officeKind?O[e.officeKind]:"";return t&&e.name.toLowerCase().endsWith(t)&&e.name.length>t.length?e.name.slice(0,-t.length):e.name}function ue(e){return"folder"===e.kind||e.officeKind&&e.size<=2?"—":o(e.size)}function fe(e,t=/* @__PURE__ */new Date){const n=c(e),a=c(t.toISOString());return n&&a?n===a?d(e,{clock:{hour:"numeric",minute:"2-digit"}}):n.slice(0,4)===a.slice(0,4)?m(e,{clock:{day:"numeric",month:"short"}}):m(e,{clock:{day:"numeric",month:"short",year:"numeric"}}):f}function pe(e){return d(e,{clock:{dateStyle:"short",timeStyle:"short"}})}function ke(e){return"owner"===(e.role??"owner")?"me":e.owner?.name??"—"}var ge=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function we(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 ge.compare(ke(e),ke(n));case"size":return e.size-n.size;case"modified":return(Date.parse(e.modifiedAt)||0)-(Date.parse(n.modifiedAt)||0);default:return ge.compare(he(e),he(n))}})(e,a)||ge.compare(e.name,a.name))}var ye=["folder","document","spreadsheet","slides","pdf","image","video"],be={today:"Today",week:"Last 7 days",month:"Last 30 days",year:"This year"};function ve(e,t,n=/* @__PURE__ */new Date){const a=t.modified?function(e,t){const n=h(t),a=p(n);if(!n||!a)return Number.NEGATIVE_INFINITY;"week"===e&&a.setDate(a.getDate()-6),"month"===e&&a.setDate(a.getDate()-29),"year"===e&&a.setMonth(0,1);const r=u(k(a),{hour:0,minute:0});return r?Date.parse(r):Number.NEGATIVE_INFINITY}(t.modified,n):null;return e.filter(e=>{if(t.type&&ce(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 xe=[{value:"viewer",label:"Viewer"},{value:"commenter",label:"Commenter"},{value:"editor",label:"Editor"}];function Ne({store:e,entry:t,onClose:a,onChanged:i}){const[s,l]=q(null),[o,c]=q(""),[d,m]=q([]),[h,u]=q(!1),[f,p]=q(""),[k,g]=q("viewer"),[w,y]=q(!1),b=_(/* @__PURE__ */new Map),v=t?.id??null;if(ee(()=>{if(l(null),p(""),c(""),!v||!e.shares)return;let t=!0;return e.shares(v).then(e=>{t&&l(e)}).catch(e=>{t&&(X.error(e.message),l([]))}),()=>{t=!1}},[v,e]),ee(()=>{if(!e.searchPeople||!v)return;let t=!0;u(!0);const n=setTimeout(()=>{e.searchPeople(o).then(e=>{if(t){for(const t of e)b.current.set(t.id,t);m(e)}}).catch(()=>{t&&m([])}).finally(()=>{t&&u(!1)})},250);return()=>{t=!1,clearTimeout(n)}},[o,v,e]),!t)return null;const x=new Set((s??[]).map(e=>e.person.id)),N=d.filter(e=>!x.has(e.id)).map(e=>({value:e.id,label:e.name})),C=async n=>{y(!0);try{await n(),l(await e.shares(t.id)),i()}catch(e){X.error(e.message)}finally{y(!1)}};/* @__PURE__ */
|
|
2
|
-
return re(Y,{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__ */ie(Q,{variant:"secondary",onClick:a,children:"Done"}),children:[
|
|
3
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-2",children:[
|
|
4
|
-
/* @__PURE__ */ie("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */ie(n,{value:f,onChange:p,onSearchChange:c,loading:h&&0===d.length,options:N,placeholder:"Search colleagues by name","aria-label":"Colleague to share with"})}),
|
|
5
|
-
/* @__PURE__ */ie("div",{className:"w-28 shrink-0",children:/* @__PURE__ */ie(r,{value:k,onChange:e=>g(e),options:xe,"aria-label":"Access"})}),
|
|
6
|
-
/* @__PURE__ */ie(Q,{variant:"primary",onClick:()=>{if(!f||!e.share)return;const n=b.current.get(f);C(async()=>{await e.share(t.id,f,k),p(""),c(""),n&&X.success(`Shared with ${n.name}`)})},disabled:!f||w,children:"Add"})]}),
|
|
7
|
-
/* @__PURE__ */ie("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===s?/* @__PURE__ */ie(Z,{size:"sm",padding:"p-4",label:"Loading"}):/* @__PURE__ */re("ul",{className:"divide-y divide-line-subtle text-sm",children:[
|
|
8
|
-
/* @__PURE__ */re("li",{className:"flex items-center gap-2 h-10",children:[
|
|
9
|
-
/* @__PURE__ */ie("span",{className:"flex-1 truncate",children:"You"}),
|
|
10
|
-
/* @__PURE__ */ie("span",{className:"text-xs text-ink-faint",children:"Owner"})]}),s.map(n=>/* @__PURE__ */re("li",{className:"flex items-center gap-2 h-10",children:[
|
|
11
|
-
/* @__PURE__ */ie("span",{className:"flex-1 truncate",title:n.person.name,children:n.person.name}),
|
|
12
|
-
/* @__PURE__ */ie("div",{className:"w-28 shrink-0",children:/* @__PURE__ */ie(r,{value:n.role,onChange:a=>C(()=>e.share(t.id,n.person.id,a)),options:xe,"aria-label":`Access for ${n.person.name}`,disabled:w})}),
|
|
13
|
-
/* @__PURE__ */ie(V,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:w,onClick:()=>C(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4",strokeWidth:1.8})})]},n.person.id))]})]})}function Ce({store:e,items:t,from:n,onClose:a,onMove:r}){const[i,s]=q(n??null),[l,o]=q(null),[c,d]=q(!1);ee(()=>{t&&s(n??null)},[t,n]),ee(()=>{if(!t)return;let n=!0;return d(!0),e.list(i).then(e=>{n&&o(e)}).catch(()=>{n&&o(null)}).finally(()=>{n&&d(!1)}),()=>{n=!1}},[e,i,t]);const m=new Set((t??[]).map(e=>e.id)),h=(l?.entries??[]).filter(e=>"folder"===e.kind&&!m.has(e.id)),u=(l?.folder.path??[]).filter(e=>null!==e.id),f=u.length>1?u[u.length-2].id:null,p=l?.folder,k=L(p?.role??"owner"),g=void 0!==n&&i===n,w=t?.length??0,y=1===w?`"${t[0].name}"`:`${w} items`;/* @__PURE__ */
|
|
14
|
-
return re(Y,{open:!!t,onClose:a,title:`Move ${y}`,size:"sm",footer:/* @__PURE__ */re(se,{children:[
|
|
15
|
-
/* @__PURE__ */ie(Q,{variant:"secondary",onClick:a,children:"Cancel"}),
|
|
16
|
-
/* @__PURE__ */ie(Q,{variant:"primary",onClick:()=>r(i),disabled:c||!k||g,children:"Move here"})]}),children:[
|
|
17
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-1 mb-2 min-h-8",children:[null!==i&&/* @__PURE__ */ie(V,{"aria-label":"Back",size:"sm",onClick:()=>s(f),children:/* @__PURE__ */ie(B,{name:"arrow-left",className:"h-4 w-4"})}),
|
|
18
|
-
/* @__PURE__ */ie("span",{className:"text-sm font-medium text-ink-strong truncate",children:null===i?"My files":p?.name??""})]}),
|
|
19
|
-
/* @__PURE__ */ie("div",{className:"border border-line rounded-(--radius-control) h-64 overflow-auto",children:c?/* @__PURE__ */ie(Z,{size:"sm",padding:"p-6",label:"Loading"}):0===h.length?/* @__PURE__ */ie("div",{className:"p-6 text-center text-sm text-ink-faintest",children:"No folders here."}):/* @__PURE__ */ie("ul",{children:h.map(e=>/* @__PURE__ */ie("li",{children:/* @__PURE__ */re("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__ */ie(B,{name:"folder",look:"solid",tone:"muted",className:"h-4 w-4 shrink-0"}),
|
|
21
|
-
/* @__PURE__ */ie("span",{className:"truncate flex-1",children:e.name}),
|
|
22
|
-
/* @__PURE__ */ie(B,{name:"chevron-right",tone:"muted",className:"h-4 w-4 shrink-0"})]})},e.id))})}),!k&&/* @__PURE__ */ie("p",{className:"mt-2 text-xs text-ink-faint",children:"You can view this folder but not move things into it."})]})}function je({store:e,entry:t,selectedCount:n,onClose:a}){const[r,i]=q(null),[s,l]=q(null);ee(()=>{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?ce(t):null,c=o?me[o]:null,d=r?.path.slice(0,-1).map(e=>e.name||"My files").join(" / "),m=(e,t)=>t?/* @__PURE__ */re("div",{className:"py-2",children:[
|
|
23
|
-
/* @__PURE__ */ie("dt",{className:"text-2xs text-ink-faint",children:e}),
|
|
24
|
-
/* @__PURE__ */ie("dd",{className:"text-sm text-ink break-words",children:t})]}):null;/* @__PURE__ */
|
|
25
|
-
return re("aside",{className:"w-72 shrink-0 border-l border-line flex flex-col min-h-0 bg-surface","aria-label":"Details",children:[
|
|
26
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-2 px-3 h-12 shrink-0",children:[c&&/* @__PURE__ */ie(B,{name:c.name,tone:c.tone,className:"h-5 w-5 shrink-0"}),
|
|
27
|
-
/* @__PURE__ */ie("span",{className:"flex-1 truncate text-sm font-medium text-ink-strong",children:t?he(t):n>1?`${n} items selected`:"Details"}),
|
|
28
|
-
/* @__PURE__ */ie(V,{"aria-label":"Close details",size:"sm",onClick:a,children:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4"})})]}),
|
|
29
|
-
/* @__PURE__ */ie("div",{className:"flex-1 overflow-auto px-4 pb-4",children:t?/* @__PURE__ */re(se,{children:[
|
|
30
|
-
/* @__PURE__ */ie("div",{className:"h-32 rounded-(--radius-control) bg-surface-sunken flex items-center justify-center mb-3",children:c&&/* @__PURE__ */ie(B,{name:c.name,tone:c.tone,className:"h-12 w-12"})}),s&&/* @__PURE__ */re("div",{className:"mb-3",children:[
|
|
31
|
-
/* @__PURE__ */ie("div",{className:"text-xs font-medium text-ink-strong mb-1",children:"Who has access"}),0===s.length?/* @__PURE__ */re("p",{className:"text-sm text-ink-faint",children:["Only ","owner"!==t.role&&t.role?t.owner?.name??"its owner":"you"]}):/* @__PURE__ */ie("ul",{className:"text-sm text-ink",children:s.map(e=>/* @__PURE__ */re("li",{className:"flex justify-between py-0.5",children:[
|
|
32
|
-
/* @__PURE__ */ie("span",{className:"truncate",children:e.person.name}),
|
|
33
|
-
/* @__PURE__ */ie("span",{className:"text-ink-faint text-xs",children:I[e.role]})]},e.person.id))})]}),
|
|
34
|
-
/* @__PURE__ */re("dl",{className:"border-t border-line pt-2",children:[m("Type",o?de[o]:null),"file"===t.kind&&m("Size",ue(t)),m("Location",d),m("Owner","me"===ke(t)?"me":ke(t)),m("Modified",t.modifiedAt?`${fe(t.modifiedAt)}${t.modifiedBy?` by ${t.modifiedBy.name}`:""}`:null),m("Created",r?.createdAt?fe(r.createdAt):null)]})]}):/* @__PURE__ */ie("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 Se=e=>"recent"===e||"starred"===e||"shared"===e||"search"===e,De="files.layout",Te={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"},Me=[{kind:"document",label:"Document"},{kind:"spreadsheet",label:"Spreadsheet"},{kind:"deck",label:"Slides"}],$e="application/x-efficient-files";function Le(){try{return"grid"===localStorage.getItem(De)?"grid":"list"}catch{return"list"}}function Pe(e){const t=e??"/",n=t.split("/").filter(Boolean);let a=g()??[];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 Re(e,t){return`Not enough space for “${e}” (${o(t.attempted)}). You've used ${o(t.used)} of ${o(t.limit)}. Empty Trash or ask an administrator for more space.`}var Ee=(e,t)=>e instanceof Error&&e.message||t;function Fe(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 Ae({entry:e,className:t="h-5 w-5"}){const{name:n,tone:a}=me[ce(e)];/* @__PURE__ */
|
|
35
|
-
return ie(B,{name:n,tone:a,look:"folder"===e.kind?"solid":void 0,className:`${t} shrink-0`})}function Oe({entry:e,read:t}){const[n,a]=q(null),r="image"===ce(e)&&e.size<=5242880;return ee(()=>{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__ */ie("img",{src:n,alt:"",className:"h-full w-full object-cover",draggable:!1}):/* @__PURE__ */ie(Ae,{entry:e,className:"h-10 w-10"})}function Ie(){const n=C(),r=n.title??"Files",c=null!==g(),d=!c&&!!n.shares&&!!n.sharedWithMe,[m,h]=q(null),[u,f]=q(null),[p,k]=q([]),[I,Y]=q(()=>/* @__PURE__ */new Set),le=_(null),[ce,xe]=q(!0),[Ie,ze]=q(!1),[We,Ke]=q(null),[Ue,Ye]=q(!1),[He,Je]=q(null),[Ve,Qe]=q(null),[Be,Ze]=q(null),[Ge,Xe]=q(Le),[qe,_e]=q(!1),[et,tt]=q(""),[nt,at]=q(""),[rt,it]=q({}),[st,lt]=q({key:"name",dir:"asc"}),[ot,ct]=q(()=>{const e=j();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"}),dt=_("files"),mt=_(ot);mt.current=ot,ee(()=>{S()},[]);const[ht,ut]=q([]),ft=e=>{Xe(e);try{localStorage.setItem(De,e)}catch{}},pt=te(e=>{ct(e),it({}),lt("recent"===e?{key:"modified",dir:"desc"}:{key:"name",dir:"asc"}),"search"!==e&&(tt(""),at(""))},[]);ee(()=>{const e=()=>{S(),pt("trash")},t=e=>{S();const t=e.detail?.folderId;t&&pt({desktopFolderId:t})};return window.addEventListener(D,e),window.addEventListener(T,t),()=>{window.removeEventListener(D,e),window.removeEventListener(T,t)}},[pt]);const kt=ne(M,$,$),gt="object"==typeof ot?ot.desktopFolderId:null,wt=gt?kt?.folders.find(e=>e.id===gt)??null:null,yt=gt&&kt?.itemsByFolder[gt]||[];ee(()=>{gt&&kt&&!kt.folders.some(e=>e.id===gt)&&pt("files")},[gt,kt,pt]);const bt=_(0),vt=_(null),xt=_(null),{openPage:Nt,openEntity:Ct}=z(),jt=i(),St=i(),Dt=i(),Tt=ne(w,y,y);ee(()=>b(),[]),ee(()=>{!Tt||"trash"!==ot&&"object"!=typeof ot||pt("files")},[Tt,ot,pt]);const Mt=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>Nt(e)}):"page"===t.entityType?Nt(t.entityId):Ct(t.entityType,t.entityId,null,t.label)},$t=te(async()=>{if(!c)try{Ke(await n.quota())}catch{}},[n,c]),Lt=te(async(e,t)=>{xe(!0);try{await e(),ze(!1)}catch(e){e instanceof TypeError?ze(!0):X.error(Ee(e,t))}finally{xe(!1)}},[]),Pt=te(async e=>{if(c)return f(Pe(e)),ze(!1),void xe(!1);await Lt(async()=>{f(await n.list(e))},"Failed to list"),$t()},[n,$t,c,Lt]),Rt=te(async(e,t)=>{if("search"===e&&!n.search){const e=t.toLowerCase(),a=c?Pe(m):await n.list(m).catch(()=>null);return k((a?.entries??[]).filter(t=>t.name.toLowerCase().includes(e))),void xe(!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 Lt(async()=>{k(await a())},"Failed to list files")},[n,c,m,Lt]),Et=te(async()=>{if(c)return ut([]),void xe(!1);await Lt(async()=>{ut(await n.trash())},"Failed to list trash"),$t()},[n,$t,c,Lt]),Ft=()=>{"files"===ot?Pt(m):Se(ot)?Rt(ot,nt):"trash"===ot&&Et()};ee(()=>{Y(/* @__PURE__ */new Set),le.current=null,Ft()},[m,ot,nt]),ee(()=>{const e=et.trim();if(!e)return;const t=setTimeout(()=>{e===nt&&"search"===mt.current||("search"!==mt.current&&(dt.current=mt.current),ct("search"),it({}),at(e))},300);return()=>clearTimeout(t)},[et]);const At=()=>{tt(""),"search"===mt.current&&pt(dt.current)},Ot=e=>{pt("files"),h(e)},It=async(e,t)=>{try{await e()}catch(e){X.error(Ee(e,t))}Ft()},zt=e=>It(async()=>{await n.restore(e.id),X.success(`Restored "${e.name}"`)},"Restore failed"),Wt=async e=>{await K({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&It(()=>n.purge(e.id),"Delete failed")},Kt=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){X.error(Ee(e,"Download failed"))}},Ut="files"===ot?u?.folder??null:null,Yt=Ut?.role??"owner",Ht="owner"!==Yt,Jt="files"===ot?m:null,Vt=!c&&("files"!==ot||L(Yt)),Qt=!c&&"files"===ot&&L(Yt),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 A?X.error(Re(r.name,e)):X.error(`Upload ${r.name}: ${Ee(e,"failed")}`)}}a>1&&X.success(`Uploaded ${a} files`),"files"===ot?Pt(m):Ot(null)},Zt=async e=>{const t=he(e),a=await U({title:`Rename ${e.kind}`,defaultValue:t,confirmLabel:"Rename"});a&&a!==t&&(/[\\/]/.test(a)?X.error("Names cannot contain slashes"):It(()=>n.rename(e.id,function(e,t){const n=e.officeKind?O[e.officeKind]:"";return n&&!t.toLowerCase().endsWith(n)?t+n:t}(e,a)),"Rename failed"))},Gt=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??u?.folder.owner)?.name??"its owner":"their owners";await K({title:t?`Move ${t.kind} to trash`:`Move ${e.length} items to trash`,message:(t?`"${he(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 It(async()=>{for(const t of e)await n.remove(t.id)},"Delete failed"),X.success(t?`"${he(t)}" moved to trash`:`${e.length} items moved to trash`))},Xt=(e,t)=>It(async()=>{for(const a of e)await n.setStarred(a.id,t)},t?"Star failed":"Unstar failed"),qt=async(e,t)=>{Ze(null);const a=e.filter(e=>e.id!==t);0!==a.length&&(await It(async()=>{for(const e of a)await n.move(e.id,t)},"Move failed"),X.success(1===a.length?`Moved "${he(a[0])}"`:`Moved ${a.length} items`))},_t=()=>{bt.current=0,Ye(!1),Je(null)};ee(()=>{const e=()=>_t();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]);const en="files"===ot?u?.entries??[]:Se(ot)?p:[],tn=ae(()=>we(ve(en,rt),st),[en,rt,st]),nn=ae(()=>new Map(tn.map(e=>[e.id,e])),[tn]),an=[...I].map(e=>nn.get(e)).filter(e=>!!e),rn=1===an.length?an[0]:null,sn=e=>e.role??("files"===ot?Yt:"owner"),ln=e=>!c&&L(sn(e)),on=e=>d&&"owner"===sn(e),cn=e=>!!n.move&&ln(e),dn=(e,t)=>{if(Tt){const t=nn.get(e);if(t&&"file"===t.kind&&!hn(t))return;return void Y(/* @__PURE__ */new Set([e]))}if(t.shiftKey&&le.current){const t=tn.map(e=>e.id),n=t.indexOf(le.current),a=t.indexOf(e);if(n>=0&&a>=0)return void Y(new Set(t.slice(Math.min(n,a),Math.max(n,a)+1)))}le.current=e,t.metaKey||t.ctrlKey?Y(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}):Y(/* @__PURE__ */new Set([e]))},mn=()=>{Y(/* @__PURE__ */new Set),le.current=null},hn=e=>!!Tt&&"file"===e.kind&&x(Tt.request,e.name),un=e=>Tt&&"file"===e.kind&&!hn(e)?"text-ink-faintest":"",fn=e=>{if(!Tt||!hn(e))return;const t="files"===ot?u?.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"===ot?"Shared with me":"My files";v(Tt.id,{entry:e,folderId:"files"===ot?m:null,location:n})},pn=Tt&&rn&&hn(rn)?rn:null,kn=t=>{"folder"===t.kind?Ot(t.id):Tt?fn(t):(async t=>{if(c)return;if(n.open?.(t))return;const a=Te[oe(t.name)];a?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:a,load:()=>n.read(t.id),onStaged:e=>Nt(e)}):Kt(t)})(t)},gn=e=>{if(0===e.length)return[];const t=1===e.length?e[0]:null;if(Tt)return t&&("folder"===t.kind||hn(t))?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const a=t&&"file"===t.kind&&n.openLabel?.(t)||"Open",r=e.every(e=>"file"===e.kind),i=e.every(ln);if(c)return t?[{key:"open",label:"Open",icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[];const s=e.some(e=>!e.starred);return Fe([...t?[{key:"open",label:a,icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>kn(t)}]:[],{type:"divider",key:"d1"},...r?[{key:"download",label:"Download",icon:/* @__PURE__ */ie(B,{name:"download",className:"h-4 w-4"}),onSelect:()=>{e.forEach(Kt)}}]:[],...t&&i?[{key:"rename",label:"Rename",icon:/* @__PURE__ */ie(B,{name:"edit",className:"h-4 w-4"}),onSelect:()=>Zt(t)}]:[],...r&&n.copy?[{key:"copy",label:"Make a copy",icon:/* @__PURE__ */ie(B,{name:"copy",className:"h-4 w-4"}),onSelect:()=>(e=>It(async()=>{for(const t of e)await n.copy(t.id);X.success(1===e.length?`Copied "${he(e[0])}"`:`Copied ${e.length} files`)},"Copy failed"))(e)}]:[],{type:"divider",key:"d2"},...t&&on(t)?[{key:"share",label:"Share",icon:/* @__PURE__ */ie(B,{name:"add-person",className:"h-4 w-4"}),onSelect:()=>Qe(t)}]:[],...e.every(cn)?[{key:"move",label:"Move",icon:/* @__PURE__ */ie(B,{name:"forward",className:"h-4 w-4"}),onSelect:()=>Ze(e)}]:[],...n.setStarred?[{key:"star",label:s?"Add to starred":"Remove from starred",icon:/* @__PURE__ */ie(B,{name:"star",className:"h-4 w-4"}),onSelect:()=>Xt(e,s)}]:[],...t?[{key:"info",label:"File information",icon:/* @__PURE__ */ie(B,{name:"info",className:"h-4 w-4"}),onSelect:()=>{Y(/* @__PURE__ */new Set([t.id])),_e(!0)}}]:[],{type:"divider",key:"d3"},...i?[{key:"trash",label:"Move to trash",danger:!0,icon:/* @__PURE__ */ie(B,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Gt(e)}]:[]])},wn=(e,t)=>{const n=I.has(t.id)?an:[t];jt.open(e,n)&&!I.has(t.id)&&(Y(/* @__PURE__ */new Set([t.id])),le.current=t.id)},yn=e=>cn(e)?{draggable:!0,onDragStart:t=>{const n=I.has(e.id)?an:[e];t.dataTransfer.setData($e,JSON.stringify(n.map(e=>e.id))),t.dataTransfer.effectAllowed="move"}}:{},bn=e=>"folder"===e.kind&&ln(e)&&n.move?{onDragOver:t=>{t.dataTransfer.types.includes($e)&&(t.preventDefault(),t.stopPropagation(),He!==e.id&&Je(e.id))},onDragLeave:()=>{He===e.id&&Je(null)},onDrop:t=>{if(!t.dataTransfer.types.includes($e))return;t.preventDefault(),t.stopPropagation(),Je(null);const n=JSON.parse(t.dataTransfer.getData($e)||"[]").map(e=>nn.get(e)).filter(t=>!!t&&t.id!==e.id);qt(n,e.id)}}:{};if(Ie)/* @__PURE__ */
|
|
36
|
-
return re("div",{className:"flex flex-col h-full bg-surface",children:[
|
|
37
|
-
/* @__PURE__ */ie(W,{title:`${r} - offline`}),
|
|
38
|
-
/* @__PURE__ */ie("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */re("div",{className:"max-w-md",children:[
|
|
39
|
-
/* @__PURE__ */ie(B,{name:"close-circle",tone:"muted",className:"h-12 w-12 mx-auto mb-3",strokeWidth:1.4}),P()?/* @__PURE__ */re(se,{children:[
|
|
40
|
-
/* @__PURE__ */ie("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach your files"}),
|
|
41
|
-
/* @__PURE__ */ie("p",{className:"text-sm text-ink-faint mb-3",children:"Check your connection and try again."})]}):/* @__PURE__ */re(se,{children:[
|
|
42
|
-
/* @__PURE__ */ie("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach the file server"}),
|
|
43
|
-
/* @__PURE__ */re("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__ */ie("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]})]}),
|
|
45
|
-
/* @__PURE__ */ie(Q,{variant:"primary",onClick:Ft,children:"Retry"})]})})]});const vn=We&&We.limit>0?Math.min(100,Math.round(We.used/We.limit*100)):0,xn=vn>90?"bg-danger":vn>75?"bg-warning":"bg-accent-fill",Nn=[Ht?{label:"Shared with me",onClick:()=>pt("shared")}:{label:"My files",onClick:()=>Ot(null)},...(Ut?.path??[]).filter(e=>null!==e.id).map(e=>({label:e.name,onClick:()=>Ot(e.id)}))],Cn="recent"===ot?"Recent":"starred"===ot?"Starred":"shared"===ot?"Shared with me":"search"===ot?`Results for “${nt}”`:"trash"===ot?"Trash":wt?wt.name:null,jn=Tt?`${r} - Choosing`:Cn?`${r} - ${"search"===ot?"Search":Cn}`:Ut&&null!==Ut.id?`${r} - ${Ut.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"),Dn=Fe([{key:"folder",label:"New folder",icon:/* @__PURE__ */ie(B,{name:"folder-plus",className:"h-4 w-4"}),onSelect:async()=>{const e=await U({title:"New folder",placeholder:"Folder name",defaultValue:"Untitled folder",confirmLabel:"Create"});e&&(/[\\/]/.test(e)?X.error("Folder names cannot contain slashes"):(await It(()=>n.createFolder(Jt,e),"Create folder failed"),"files"!==ot&&Ot(null)))}},{type:"divider",key:"d1"},{key:"upload",label:"File upload",icon:/* @__PURE__ */ie(B,{name:"upload",className:"h-4 w-4"}),onSelect:()=>vt.current?.click()},...n.folderUpload?[{key:"upload-folder",label:"Folder upload",icon:/* @__PURE__ */ie(B,{name:"cloud-arrow-up",className:"h-4 w-4"}),onSelect:()=>xt.current?.click()}]:[],{type:"divider",key:"d2"},...n.createOfficeFile?Me.filter(e=>!n.officeKinds||n.officeKinds.includes(e.kind)).map(e=>{const t=me["deck"===e.kind?"slides":e.kind];return{key:e.kind,label:e.label,icon:/* @__PURE__ */ie(B,{name:t.name,tone:t.tone,className:"h-4 w-4"}),onSelect:()=>{Promise.resolve(n.createOfficeFile(e.kind,Jt)).catch(e=>X.error(Ee(e,"Could not create it")))}}}):[]]),Tn=/* @__PURE__ */re("div",{className:"flex h-full flex-col",children:[
|
|
46
|
-
/* @__PURE__ */ie("div",{className:"p-3 pb-2",children:/* @__PURE__ */ie(J,{trigger:/* @__PURE__ */re(se,{children:[
|
|
47
|
-
/* @__PURE__ */ie(B,{name:"add",className:"h-5 w-5"}),
|
|
48
|
-
/* @__PURE__ */ie("span",{children:"New"})]}),items:Dn,align:"start","aria-label":"New",disabled:!Vt,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__ */re("nav",{className:"px-2 flex-1 overflow-auto","aria-label":"Locations",children:[
|
|
50
|
-
/* @__PURE__ */re("button",{onClick:()=>Ot(null),className:Sn("files"===ot&&!Ht),children:[
|
|
51
|
-
/* @__PURE__ */ie(B,{name:"home",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"My files"]}),n.recent&&!c&&/* @__PURE__ */re("button",{onClick:()=>pt("recent"),className:Sn("recent"===ot),children:[
|
|
52
|
-
/* @__PURE__ */ie(B,{name:"clock",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Recent"]}),n.starred&&!c&&/* @__PURE__ */re("button",{onClick:()=>pt("starred"),className:Sn("starred"===ot),children:[
|
|
53
|
-
/* @__PURE__ */ie(B,{name:"star",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Starred"]}),d&&/* @__PURE__ */re("button",{onClick:()=>pt("shared"),className:Sn("shared"===ot||"files"===ot&&Ht),children:[
|
|
54
|
-
/* @__PURE__ */ie(B,{name:"team",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Shared with me"]}),!c&&/* @__PURE__ */re("button",{onClick:()=>pt("trash"),className:Sn("trash"===ot),children:[
|
|
55
|
-
/* @__PURE__ */ie(B,{name:"trash",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Trash"]}),kt&&kt.folders.length>0&&/* @__PURE__ */re(se,{children:[
|
|
56
|
-
/* @__PURE__ */ie("div",{className:"px-3 pt-4 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),kt.folders.map(e=>/* @__PURE__ */re("button",{onClick:()=>pt({desktopFolderId:e.id}),className:Sn(gt===e.id),children:[
|
|
57
|
-
/* @__PURE__ */ie(R,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
58
|
-
/* @__PURE__ */ie("span",{className:"truncate",children:e.name}),
|
|
59
|
-
/* @__PURE__ */ie(H,{count:e.itemCount,active:gt===e.id,className:"ml-auto"})]},e.id))]})]}),We&&/* @__PURE__ */re("div",{className:"px-5 py-3 shrink-0",title:`${o(We.used)} of ${o(We.limit)} used`,children:[
|
|
60
|
-
/* @__PURE__ */ie("div",{className:"h-1 rounded-full bg-line overflow-hidden",children:/* @__PURE__ */ie("div",{className:`h-full ${xn} transition-all`,style:{width:`${vn}%`}})}),
|
|
61
|
-
/* @__PURE__ */re("div",{className:"mt-2 text-2xs text-ink-faint tabular-nums",children:[o(We.used)," of ",o(We.limit)," used"]})]})]}),Mn=(e,t)=>/* @__PURE__ */re("span",{className:"inline-flex items-center gap-1",children:[e,
|
|
62
|
-
/* @__PURE__ */ie(B,{name:"chevron-down",className:"h-3.5 w-3.5"}),t?"":null]}),$n=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"),Ln=Se(ot)||"files"===ot,Pn=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)=>ge.compare(e.name,t.name))}(en),Rn=Ln&&en.length>0?/* @__PURE__ */re("div",{className:"flex items-center gap-2 shrink-0",children:[
|
|
63
|
-
/* @__PURE__ */ie(J,{trigger:Mn(rt.type?de[rt.type]:"Type",!!rt.type),"aria-label":"Type",triggerClassName:$n(!!rt.type),items:[...ye.map(e=>({type:"radio",key:e,label:de[e],checked:rt.type===e,onSelect:()=>it(t=>({...t,type:t.type===e?null:e}))})),...rt.type?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,type:null}))}]:[]]}),d&&/* @__PURE__ */ie(J,{trigger:Mn(rt.person?"me"===rt.person?"Owned by me":Pn.find(e=>e.id===rt.person)?.name??"People":"People",!!rt.person),"aria-label":"People",triggerClassName:$n(!!rt.person),items:[{type:"radio",key:"me",label:"Owned by me",checked:"me"===rt.person,onSelect:()=>it(e=>({...e,person:"me"===e.person?null:"me"}))},...Pn.map(e=>({type:"radio",key:e.id,label:e.name,checked:rt.person===e.id,onSelect:()=>it(t=>({...t,person:t.person===e.id?null:e.id}))})),...rt.person?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,person:null}))}]:[]]}),
|
|
64
|
-
/* @__PURE__ */ie(J,{trigger:Mn(rt.modified?be[rt.modified]:"Modified",!!rt.modified),"aria-label":"Modified",triggerClassName:$n(!!rt.modified),items:[...Object.keys(be).map(e=>({type:"radio",key:e,label:be[e],checked:rt.modified===e,onSelect:()=>it(t=>({...t,modified:t.modified===e?null:e}))})),...rt.modified?[{type:"divider",key:"d"},{key:"clear",label:"Clear",onSelect:()=>it(e=>({...e,modified:null}))}]:[]]})]}):null,En=Ln&&an.length>0&&!Tt?/* @__PURE__ */re("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__ */ie(V,{"aria-label":"Clear selection",size:"sm",onClick:mn,children:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4"})}),
|
|
66
|
-
/* @__PURE__ */re("span",{className:"text-sm text-ink mr-2 whitespace-nowrap",children:[an.length," selected"]}),rn&&on(rn)&&/* @__PURE__ */ie(V,{"aria-label":"Share",size:"sm",onClick:()=>Qe(rn),children:/* @__PURE__ */ie(B,{name:"add-person",className:"h-4 w-4"})}),!c&&an.every(e=>"file"===e.kind)&&/* @__PURE__ */ie(V,{"aria-label":"Download",size:"sm",onClick:()=>an.forEach(Kt),children:/* @__PURE__ */ie(B,{name:"download",className:"h-4 w-4"})}),an.every(cn)&&/* @__PURE__ */ie(V,{"aria-label":"Move",size:"sm",onClick:()=>Ze(an),children:/* @__PURE__ */ie(B,{name:"forward",className:"h-4 w-4"})}),!c&&an.every(ln)&&/* @__PURE__ */ie(V,{"aria-label":"Move to trash",size:"sm",onClick:()=>Gt(an),children:/* @__PURE__ */ie(B,{name:"trash",className:"h-4 w-4"})}),
|
|
67
|
-
/* @__PURE__ */ie(J,{trigger:/* @__PURE__ */ie(B,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(an)})]}):null,Fn=/* @__PURE__ */ie("div",{className:"flex items-center gap-2 px-4 pb-2 min-h-12 shrink-0",children:En??/* @__PURE__ */re(se,{children:[
|
|
68
|
-
/* @__PURE__ */re("div",{className:"min-w-0 flex-1 flex items-center gap-2",children:["files"===ot?/* @__PURE__ */ie("div",{className:"min-w-0 text-base [&_*]:text-base",children:/* @__PURE__ */ie(a,{items:Nn,maxItems:5})}):"trash"===ot?/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong",children:"Trash"}):"object"==typeof ot?/* @__PURE__ */re(se,{children:[
|
|
69
|
-
/* @__PURE__ */ie(R,{className:"h-4 w-4 text-amber-500 shrink-0"}),
|
|
70
|
-
/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong truncate",children:wt?.name??"Desktop folder"}),
|
|
71
|
-
/* @__PURE__ */ie("span",{className:"text-2xs text-ink-faintest whitespace-nowrap",children:"Desktop shortcuts"})]}):/* @__PURE__ */ie("span",{className:"text-base font-medium text-ink-strong truncate",children:Cn}),"files"===ot&&Ht&&!L(Yt)&&/* @__PURE__ */re("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__ */ie(B,{name:"eye",className:"h-3 w-3",strokeWidth:1.8}),"View only"]}),"files"===ot&&Ht&&Ut?.owner&&/* @__PURE__ */re("span",{className:"shrink-0 text-2xs text-ink-faint whitespace-nowrap",children:["Shared by ",Ut.owner.name]})]}),Rn,"trash"===ot&&/* @__PURE__ */ie(Q,{variant:"secondary-danger",size:"sm",onClick:async()=>{if(0===ht.length)return;await K({title:"Empty trash",message:`${ht.length} item${1===ht.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"})&&It(()=>n.emptyTrash(),"Empty trash failed")},disabled:0===ht.length,children:"Empty trash"})]})}),An=(e,t)=>Tt?null:/* @__PURE__ */re("div",{className:"flex items-center justify-end "+(t?"":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),children:[on(e)&&/* @__PURE__ */ie(V,{"aria-label":"Share",size:"sm",onClick:t=>{t.stopPropagation(),Qe(e)},children:/* @__PURE__ */ie(B,{name:"add-person",className:"h-4 w-4"})}),!c&&"file"===e.kind&&/* @__PURE__ */ie(V,{"aria-label":"Download",size:"sm",onClick:t=>{t.stopPropagation(),Kt(e)},children:/* @__PURE__ */ie(B,{name:"download",className:"h-4 w-4"})}),n.setStarred&&!c&&/* @__PURE__ */ie(V,{"aria-label":e.starred?"Remove from starred":"Add to starred","aria-pressed":!!e.starred,size:"sm",onClick:t=>{t.stopPropagation(),Xt([e],!e.starred)},children:/* @__PURE__ */ie(B,{name:"star",look:e.starred?"solid":void 0,tone:e.starred?"warning":void 0,className:"h-4 w-4"})}),
|
|
73
|
-
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(J,{trigger:/* @__PURE__ */ie(B,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(I.has(e.id)&&an.length>1?an:[e])})})]}),On=e=>/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
74
|
-
/* @__PURE__ */ie(Ae,{entry:e}),
|
|
75
|
-
/* @__PURE__ */ie("span",{className:"truncate",title:e.name,children:he(e)}),!!e.shareCount&&/* @__PURE__ */ie("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__ */ie(B,{name:"team",tone:"muted",className:"h-3.5 w-3.5"})}),e.starred&&/* @__PURE__ */ie("span",{className:"shrink-0",role:"img","aria-label":"Starred",title:"Starred",children:/* @__PURE__ */ie(B,{name:"star",look:"solid",tone:"warning",className:"h-3.5 w-3.5"})})]}),In=(e,t,n)=>{const a=st.key===e;/* @__PURE__ */
|
|
76
|
-
return ie("th",{className:`${G} font-medium px-3 h-9 ${n}`,"aria-sort":a?"asc"===st.dir?"ascending":"descending":void 0,children:/* @__PURE__ */re("button",{type:"button",className:"inline-flex items-center gap-1 rounded hover:text-ink "+(a?"text-ink":""),onClick:()=>lt(t=>({key:e,dir:t.key===e&&"asc"===t.dir?"desc":"asc"})),children:[t,a&&("asc"===st.dir?/* @__PURE__ */ie(B,{name:"arrow-up",className:"h-3 w-3"}):/* @__PURE__ */ie(B,{name:"arrow-down",className:"h-3 w-3"}))]})})},zn="recent"===ot?"Files you and your colleagues change show here.":"starred"===ot?"Star the files and folders you want to find quickly.":"shared"===ot?"Nothing has been shared with you yet. Files and folders colleagues share with you show here.":"search"===ot?`Nothing matches “${nt}”.`:null,Wn=0===tn.length?ce?/* @__PURE__ */ie(Z,{size:"sm",padding:"p-6",label:"Loading"}):/* @__PURE__ */ie("div",{className:"p-10 text-center text-sm text-ink-faintest",children:en.length>0?"Nothing matches these filters.":zn??/* @__PURE__ */re(se,{children:["This folder is empty.",Qt&&/* @__PURE__ */re(se,{children:[" Drop files here or choose ",
|
|
77
|
-
/* @__PURE__ */ie("span",{className:"font-medium",children:"New"}),"."]})]})}):"grid"===Ge?/* @__PURE__ */ie("div",{className:"px-4 pb-4",children:["folder","file"].map(e=>{const t=tn.filter(t=>t.kind===e);return 0===t.length?null:/* @__PURE__ */re("section",{className:"mb-4",children:[
|
|
78
|
-
/* @__PURE__ */ie("h3",{className:"text-xs font-medium text-ink-faint mb-2",children:"folder"===e?"Folders":"Files"}),
|
|
79
|
-
/* @__PURE__ */ie("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:t.map(t=>{const a=I.has(t.id);/* @__PURE__ */
|
|
80
|
-
return re("div",{role:"button",tabIndex:0,"aria-pressed":a,"aria-label":he(t),onClick:e=>dn(t.id,e),onDoubleClick:()=>kn(t),onContextMenu:e=>wn(e,t),...yn(t),...bn(t),className:"group rounded-xl border cursor-default select-none outline-none focus-visible:ring-2 focus-visible:ring-accent-border "+(a||He===t.id?"border-accent-border bg-accent-tint":"border-line bg-surface-sunken hover:bg-row-hover"),children:[
|
|
81
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-2 pl-3 pr-1 h-11",children:[
|
|
82
|
-
/* @__PURE__ */ie(Ae,{entry:t,className:"h-4 w-4"}),
|
|
83
|
-
/* @__PURE__ */ie("span",{className:"flex-1 truncate text-sm",title:t.name,children:he(t)}),
|
|
84
|
-
/* @__PURE__ */ie("span",{onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),children:/* @__PURE__ */ie(J,{trigger:/* @__PURE__ */ie(B,{name:"more-vertical",className:"h-4 w-4"}),"aria-label":"More actions",items:gn(a&&an.length>1?an:[t])})})]}),"file"===e&&/* @__PURE__ */re(se,{children:[
|
|
85
|
-
/* @__PURE__ */ie("div",{className:"mx-2 h-28 rounded-lg bg-surface flex items-center justify-center overflow-hidden",children:/* @__PURE__ */ie(Oe,{entry:t,read:c?void 0:n.read})}),
|
|
86
|
-
/* @__PURE__ */re("div",{className:"px-3 py-2 text-2xs text-ink-faint truncate",children:["me"===ke(t)?"You":ke(t)," · ",fe(t.modifiedAt)]})]})]},t.id)})})]},e)})}):/* @__PURE__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
87
|
-
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[In("name","Name","text-left"),d&&In("owner","Owner","text-left w-32"),In("modified","Modified","text-left w-28"),In("size","Size","text-right w-20"),
|
|
88
|
-
/* @__PURE__ */ie("th",{className:`${G} w-32`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
89
|
-
/* @__PURE__ */ie("tbody",{children:tn.map(e=>{const t=I.has(e.id);/* @__PURE__ */
|
|
90
|
-
return re("tr",{"aria-selected":t,onClick:t=>dn(e.id,t),onDoubleClick:()=>kn(e),onContextMenu:t=>wn(t,e),...yn(e),...bn(e),className:`group cursor-default select-none border-b border-line-subtle ${un(e)} ${t||He===e.id?"bg-accent-tint":"hover:bg-row-hover"}`,children:[
|
|
91
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:On(e)}),d&&/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint truncate",children:ke(e)}),
|
|
92
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:pe(e.modifiedAt),children:fe(e.modifiedAt)}),
|
|
93
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint whitespace-nowrap",children:Tt&&"file"===e.kind&&!hn(e)&&Tt.request.otherLabel?Tt.request.otherLabel:ue(e)}),
|
|
94
|
-
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:An(e,t)})]},e.id)})})]}),Kn=ce&&0===ht.length?/* @__PURE__ */ie(Z,{size:"sm",padding:"p-6",label:"Loading"}):0===ht.length?/* @__PURE__ */ie("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Trash is empty. What you delete stays here for 30 days."}):/* @__PURE__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
95
|
-
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[
|
|
96
|
-
/* @__PURE__ */ie("th",{className:`${G} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
97
|
-
/* @__PURE__ */ie("th",{className:`${G} text-left font-medium px-3 h-9 w-48`,children:"Original location"}),
|
|
98
|
-
/* @__PURE__ */ie("th",{className:`${G} text-left font-medium px-3 h-9 w-32`,children:"Deleted"}),
|
|
99
|
-
/* @__PURE__ */ie("th",{className:`${G} text-right font-medium px-3 h-9 w-24`,children:"Size"}),
|
|
100
|
-
/* @__PURE__ */ie("th",{className:`${G} w-28`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
101
|
-
/* @__PURE__ */ie("tbody",{children:ht.map(e=>/* @__PURE__ */re("tr",{className:"group border-b border-line-subtle hover:bg-row-hover",onContextMenu:t=>St.open(t,e),children:[
|
|
102
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
103
|
-
/* @__PURE__ */ie(Ae,{entry:e}),
|
|
104
|
-
/* @__PURE__ */ie("span",{className:"truncate",title:e.name,children:e.name})]})}),
|
|
105
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint text-xs truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
106
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-ink-faint whitespace-nowrap",title:e.deletedAt?pe(e.deletedAt):void 0,children:e.deletedAt?fe(e.deletedAt):"—"}),
|
|
107
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-right tabular-nums text-ink-faint",children:"folder"===e.kind?"—":o(e.size)}),
|
|
108
|
-
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:/* @__PURE__ */re("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
109
|
-
/* @__PURE__ */ie(V,{"aria-label":"Restore",size:"sm",onClick:()=>zt(e),children:/* @__PURE__ */ie(B,{name:"revert",className:"h-4 w-4"})}),
|
|
110
|
-
/* @__PURE__ */ie(V,{"aria-label":"Delete forever",size:"sm",variant:"ghost-danger",onClick:()=>Wt(e),children:/* @__PURE__ */ie(B,{name:"trash",className:"h-4 w-4"})})]})})]},e.id))})]}),Un=0===yt.length?/* @__PURE__ */ie("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__ */re("table",{className:"w-full text-sm table-fixed",children:[
|
|
111
|
-
/* @__PURE__ */ie("thead",{className:"text-xs text-ink-faint border-b border-line",children:/* @__PURE__ */re("tr",{children:[
|
|
112
|
-
/* @__PURE__ */ie("th",{className:`${G} text-left font-medium px-3 h-9`,children:"Name"}),
|
|
113
|
-
/* @__PURE__ */ie("th",{className:`${G} text-left font-medium px-3 h-9 w-32`,children:"Type"}),
|
|
114
|
-
/* @__PURE__ */ie("th",{className:`${G} w-32`,children:/* @__PURE__ */ie("span",{className:"sr-only",children:"Actions"})})]})}),
|
|
115
|
-
/* @__PURE__ */ie("tbody",{children:yt.map(e=>/* @__PURE__ */re("tr",{onDoubleClick:()=>Mt(e),onContextMenu:t=>Dt.open(t,e),className:"group cursor-default border-b border-line-subtle hover:bg-row-hover",children:[
|
|
116
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11",children:/* @__PURE__ */re("span",{className:"flex items-center gap-3 min-w-0",children:[
|
|
117
|
-
/* @__PURE__ */ie(E,{item:e}),
|
|
118
|
-
/* @__PURE__ */ie("span",{className:"truncate",title:e.label,children:e.label})]})}),
|
|
119
|
-
/* @__PURE__ */ie("td",{className:"px-3 h-11 text-xs text-ink-faint",children:F(e)}),
|
|
120
|
-
/* @__PURE__ */ie("td",{className:"px-2 h-11",children:/* @__PURE__ */re("div",{className:"flex justify-end opacity-0 group-hover:opacity-100 group-focus-within:opacity-100",children:[
|
|
121
|
-
/* @__PURE__ */ie(V,{"aria-label":"Open",size:"sm",onClick:()=>Mt(e),children:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"})}),
|
|
122
|
-
/* @__PURE__ */ie(V,{"aria-label":"Move to desktop",size:"sm",onClick:()=>kt?.moveToDesktop([e]),children:/* @__PURE__ */ie(B,{name:"desktop",className:"h-4 w-4"})}),
|
|
123
|
-
/* @__PURE__ */ie(V,{"aria-label":"Remove",size:"sm",variant:"ghost-danger",onClick:()=>kt?.removeShortcuts([e]),children:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4"})})]})})]},`${e.entityType}|${e.entityId}`))})]});/* @__PURE__ */
|
|
124
|
-
return re("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Qt&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),bt.current++,Ue||Ye(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{bt.current>0&&bt.current--,0===bt.current&&Ye(!1)},onDrop:e=>{e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),_t(),Qt&&e.dataTransfer.files?.length&&Bt(e.dataTransfer.files))},children:[
|
|
125
|
-
/* @__PURE__ */ie(W,{title:jn}),
|
|
126
|
-
/* @__PURE__ */ie(N,{app:"files"}),
|
|
127
|
-
/* @__PURE__ */ie("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__ */ie("input",{ref:e=>{xt.current=e,e?.setAttribute("webkitdirectory","")},type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&Bt(e.target.files,{withFolders:!0}),xt.current&&(xt.current.value="")}}),
|
|
129
|
-
/* @__PURE__ */ie("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */ie(t,{sidebar:Tn,storageKey:"files.sidebarWidth",defaultWidth:220,minWidth:170,maxWidth:320,children:/* @__PURE__ */re("div",{className:"flex h-full min-w-0",children:[
|
|
130
|
-
/* @__PURE__ */re("div",{className:"flex flex-1 min-w-0 flex-col",children:[Tt&&/* @__PURE__ */re("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__ */ie(B,{name:"cursor",className:"h-4 w-4 shrink-0",strokeWidth:1.6}),
|
|
132
|
-
/* @__PURE__ */ie("span",{className:"flex-1 min-w-0 truncate",children:Tt.request.title}),
|
|
133
|
-
/* @__PURE__ */ie(Q,{variant:"secondary",size:"sm",onClick:()=>v(Tt.id,null),children:"Cancel"}),
|
|
134
|
-
/* @__PURE__ */ie(Q,{variant:"primary",size:"sm",disabled:!pn,onClick:()=>{pn&&fn(pn)},children:"Open"})]}),
|
|
135
|
-
/* @__PURE__ */re("div",{className:"flex items-center gap-1 px-4 py-2 shrink-0",children:[
|
|
136
|
-
/* @__PURE__ */ie("div",{className:"flex-1 min-w-48 max-w-2xl",role:"search",children:/* @__PURE__ */ie(l,{type:"text",enterKeyHint:"search",value:et,onChange:e=>{tt(e.target.value),e.target.value.trim()||At()},onKeyDown:e=>{"Escape"===e.key&&et&&(e.stopPropagation(),At())},placeholder:`Search in ${r}`,"aria-label":`Search in ${r}`,leftIcon:/* @__PURE__ */ie(B,{name:"search",className:"h-4 w-4"}),endAction:et?{label:"Clear search",icon:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4"}),onClick:At}:void 0})}),
|
|
137
|
-
/* @__PURE__ */ie("div",{className:"flex-1"}),"object"!=typeof ot&&"trash"!==ot&&/* @__PURE__ */re(se,{children:[
|
|
138
|
-
/* @__PURE__ */ie(V,{"aria-label":"List view","aria-pressed":"list"===Ge,onClick:()=>ft("list"),children:/* @__PURE__ */ie(B,{name:"list",className:"h-4 w-4"})}),
|
|
139
|
-
/* @__PURE__ */ie(V,{"aria-label":"Grid view","aria-pressed":"grid"===Ge,onClick:()=>ft("grid"),children:/* @__PURE__ */ie(B,{name:"grid",className:"h-4 w-4"})})]}),
|
|
140
|
-
/* @__PURE__ */ie(V,{"aria-label":"Details","aria-pressed":qe,onClick:()=>_e(e=>!e),children:/* @__PURE__ */ie(B,{name:"info",className:"h-4 w-4"})})]}),Fn,
|
|
141
|
-
/* @__PURE__ */ie("div",{className:"flex-1 overflow-auto outline-none",tabIndex:-1,onKeyDown:e=>{e.target instanceof HTMLInputElement||(Tt?"Enter"===e.key&&pn&&(e.preventDefault(),fn(pn)):("Delete"===e.key||"Backspace"===e.key)&&an.length&&an.every(ln)?(e.preventDefault(),Gt(an)):"Enter"===e.key&&rn?(e.preventDefault(),kn(rn)):(e.metaKey||e.ctrlKey)&&"a"===e.key.toLowerCase()&&tn.length&&(e.preventDefault(),Y(new Set(tn.map(e=>e.id)))))},onClick:e=>{e.target===e.currentTarget&&mn()},children:"object"==typeof ot?Un:"trash"===ot?Kn:Wn})]}),qe&&Ln&&/* @__PURE__ */ie(je,{store:n,entry:rn,selectedCount:an.length,onClose:()=>_e(!1)})]})})}),jt.state&&/* @__PURE__ */ie(s,{...jt.props,items:gn(jt.state.data),"aria-label":"File actions"}),St.state&&/* @__PURE__ */ie(s,{...St.props,"aria-label":"Trash actions",items:[{key:"restore",label:"Restore",icon:/* @__PURE__ */ie(B,{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__ */ie(B,{name:"trash",className:"h-4 w-4"}),onSelect:()=>Wt(St.state.data)}]}),Dt.state&&/* @__PURE__ */ie(s,{...Dt.props,"aria-label":"Shortcut actions",items:[{key:"open",label:"Open",icon:/* @__PURE__ */ie(B,{name:"external",className:"h-4 w-4"}),onSelect:()=>Mt(Dt.state.data)},{key:"desktop",label:"Move to desktop",icon:/* @__PURE__ */ie(B,{name:"desktop",className:"h-4 w-4"}),onSelect:()=>kt?.moveToDesktop([Dt.state.data])},{type:"divider",key:"d"},{key:"remove",label:"Remove",danger:!0,icon:/* @__PURE__ */ie(B,{name:"close",className:"h-4 w-4"}),onSelect:()=>kt?.removeShortcuts([Dt.state.data])}]}),d&&/* @__PURE__ */ie(Ne,{store:n,entry:Ve,onClose:()=>Qe(null),onChanged:Ft}),n.move&&/* @__PURE__ */ie(Ce,{store:n,items:Be,from:"files"===ot?m:void 0,onClose:()=>Ze(null),onMove:e=>Be&&qt(Be,e)}),Ue&&/* @__PURE__ */ie("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__ */ie("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{Ie as default,Re as quotaExceededMessage};
|