efficient-shell 10.0.0 → 10.1.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 +1 -1
- package/dist/{Browser-RFLTFP7Y.js → Browser-2S5V2RRU.js} +14 -14
- package/dist/Calculator-N2NLSDTW.js +29 -0
- package/dist/{CurrencyConverter-ELSCNMUT.js → CurrencyConverter-HW5HW3RH.js} +9 -9
- package/dist/{Documents-HKTTXLSR.js → Documents-JTURYN4D.js} +19 -19
- package/dist/{Files-ZSYGKZOV.js → Files-GP2LAGME.js} +79 -79
- package/dist/Notepad-OV66ANUO.js +24 -0
- package/dist/PdfViewer-WNKGFJD6.js +1 -0
- package/dist/{PomodoroTimer-XHNZGBDR.js → PomodoroTimer-TGUTV47T.js} +25 -25
- package/dist/{Preview-PLCASIZA.js → Preview-76A4GKGI.js} +19 -19
- package/dist/Sidebar-4OI4LP6G.js +44 -0
- package/dist/{Spreadsheet-Y7TJIBI5.js → Spreadsheet-FU5QIZA3.js} +11 -11
- package/dist/{Stock-KLYWTMMD.js → Stock-FEVMKWMS.js} +3 -3
- package/dist/{Weather-CT2IZHEW.js → Weather-2EGADOTH.js} +15 -15
- package/dist/{WorldClock-EJCUVIUW.js → WorldClock-U5DIGLOY.js} +6 -6
- package/dist/ai/index.js +38 -38
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-PUIQFTCO.js → chunk-2OJ3HGFY.js} +5 -5
- package/dist/{chunk-PKIDVVAE.js → chunk-2SLQD57V.js} +5 -5
- package/dist/{chunk-NDEIZUMG.js → chunk-3V6ZERBS.js} +1 -1
- package/dist/{chunk-BXEKX4TB.js → chunk-3V74SUZO.js} +16 -16
- package/dist/{chunk-DL6QIWVR.js → chunk-42XMT5JN.js} +1 -1
- package/dist/{chunk-VG5NGCMQ.js → chunk-44PGFMSX.js} +6 -6
- package/dist/{chunk-IQWIYZB5.js → chunk-45XXERGA.js} +2 -2
- package/dist/{chunk-FRINAJU7.js → chunk-4UX6ET7G.js} +1 -1
- package/dist/{chunk-BFVL2VTS.js → chunk-4VDGVF5T.js} +1 -1
- package/dist/{chunk-D2WGDTWN.js → chunk-5EX6XXUX.js} +1 -1
- package/dist/{chunk-PA37I5ZX.js → chunk-5VDT4762.js} +2 -2
- package/dist/{chunk-EGAV5LSX.js → chunk-5VSP3TYU.js} +1 -1
- package/dist/{chunk-R2QDO7NY.js → chunk-6B4F5DWV.js} +3 -3
- package/dist/{chunk-66JYKX4T.js → chunk-6FPDOEOX.js} +1 -1
- package/dist/{chunk-3AZBI76O.js → chunk-7ILNRFEV.js} +1 -1
- package/dist/{chunk-GQK3U2IO.js → chunk-7TONF2PM.js} +1 -1
- package/dist/{chunk-LKW3YAZN.js → chunk-A3VJ4PRU.js} +6 -6
- package/dist/chunk-ACVKU6YW.js +7 -0
- package/dist/{chunk-ELUTQZGP.js → chunk-AEQFFD5I.js} +1 -1
- package/dist/{chunk-QRJRGP2K.js → chunk-AGLBDT7X.js} +8 -8
- package/dist/chunk-AKVB5TQD.js +29 -0
- package/dist/{chunk-ZBTDMQUI.js → chunk-ANTH2FBS.js} +61 -61
- package/dist/chunk-AXL7VTNM.js +11 -0
- package/dist/{chunk-7BDZZANS.js → chunk-B7HW6XZD.js} +1 -1
- package/dist/{chunk-XILZGSMX.js → chunk-BDFZNLFQ.js} +1 -1
- package/dist/{chunk-C6MV6IAX.js → chunk-BMXMSAQE.js} +8 -8
- package/dist/{chunk-PUCPFBYO.js → chunk-BNQRPLBW.js} +1 -1
- package/dist/{chunk-XS4HFUTW.js → chunk-BZPPDYEE.js} +1 -1
- package/dist/{chunk-DPDRFLBY.js → chunk-CLQFP42I.js} +3 -3
- package/dist/{chunk-UZ43AT4O.js → chunk-CUA6CREW.js} +8 -8
- package/dist/{chunk-RYS3URDC.js → chunk-DY2M6BIG.js} +10 -10
- package/dist/{chunk-EGEWU776.js → chunk-E3RHEEA6.js} +1 -1
- package/dist/{chunk-WFANOFHG.js → chunk-F7A6K3D5.js} +5 -5
- package/dist/{chunk-QTQQKQGQ.js → chunk-FFASZGNZ.js} +3 -3
- package/dist/{chunk-MPALY3CL.js → chunk-FMC2XNSP.js} +6 -6
- package/dist/{chunk-D7X2HMMA.js → chunk-FS2KWQJW.js} +10 -10
- package/dist/{chunk-AJ3R5QPD.js → chunk-GGIFS34Z.js} +5 -5
- package/dist/{chunk-HJPCHES5.js → chunk-GZYTCHPX.js} +4 -4
- package/dist/{chunk-ZREDCRTL.js → chunk-J7CIBRDS.js} +1 -1
- package/dist/{chunk-ZOBLEXIU.js → chunk-JJYAYMY7.js} +1 -1
- package/dist/{chunk-ZPCADTM5.js → chunk-JRBQLRAZ.js} +1 -1
- package/dist/{chunk-YFUMK2E7.js → chunk-JZK3UDOT.js} +1 -1
- package/dist/{chunk-O33CUGOI.js → chunk-K64JRGNE.js} +5 -5
- package/dist/{chunk-IU5KBQEQ.js → chunk-K7PCBUDC.js} +6 -6
- package/dist/{chunk-FSPFV4MI.js → chunk-KKSVRIMP.js} +2 -4
- package/dist/{chunk-T5V2GJ4D.js → chunk-KZQAGXME.js} +4 -4
- package/dist/{chunk-B7KD3DGY.js → chunk-LFVUDFVU.js} +1 -1
- package/dist/{chunk-FTWWJHFX.js → chunk-LOYCPZUB.js} +1 -1
- package/dist/{chunk-GBLMVFDW.js → chunk-LPDI5NL6.js} +1 -1
- package/dist/{chunk-FPGRKHUW.js → chunk-MH6DI6YY.js} +11 -11
- package/dist/{chunk-GQMS5657.js → chunk-MLKY5ESV.js} +1 -1
- package/dist/{chunk-TGLHJS3M.js → chunk-MUMQ6PW7.js} +1 -1
- package/dist/chunk-N6VP75F5.js +3 -0
- package/dist/{chunk-KAVFW5CU.js → chunk-NNOA7AVG.js} +5 -5
- package/dist/{chunk-6YQPLI5M.js → chunk-NQJKANUP.js} +11 -11
- package/dist/{chunk-UTQG344L.js → chunk-NW7Z3G7P.js} +11 -11
- package/dist/{chunk-LR77AS3N.js → chunk-O6ABVKHU.js} +4 -4
- package/dist/{chunk-25STFYV3.js → chunk-OPB3I4JH.js} +4 -4
- package/dist/{chunk-RBD7SB6M.js → chunk-P5YFQ4IQ.js} +1 -1
- package/dist/{chunk-JHZV4TN6.js → chunk-PF5CKD4C.js} +2 -2
- package/dist/chunk-PYQ6DD3F.js +1 -0
- package/dist/{chunk-NDKQDIWN.js → chunk-Q4LBBFLO.js} +5 -5
- package/dist/{chunk-X6TJR6M2.js → chunk-Q5YM65DZ.js} +8 -8
- package/dist/{chunk-XOKANFQD.js → chunk-QASKQDUR.js} +16 -16
- package/dist/{chunk-5F7HMNCX.js → chunk-QODTON7V.js} +1 -1
- package/dist/{chunk-7KDGW6BR.js → chunk-QXRRAADR.js} +1 -1
- package/dist/{chunk-VSAI5TH7.js → chunk-R4Q5653D.js} +20 -20
- package/dist/{chunk-DXHLUB36.js → chunk-RKFEJ5CX.js} +1 -1
- package/dist/{chunk-GKZUAT3K.js → chunk-RSIGTZMU.js} +1 -1
- package/dist/{chunk-GNU3U2TP.js → chunk-RZR3OAKV.js} +1 -1
- package/dist/chunk-SKY2NBTQ.js +6 -0
- package/dist/{chunk-MKEYXKZA.js → chunk-TDLU6GF5.js} +4 -4
- package/dist/{chunk-4E4GWE4L.js → chunk-TYK7VN73.js} +15 -15
- package/dist/{chunk-HKAQXFUR.js → chunk-UDKOJB2B.js} +2 -2
- package/dist/chunk-UP442DPT.js +9 -0
- package/dist/{chunk-OUKDGO4N.js → chunk-V4RYE6KA.js} +8 -8
- package/dist/{chunk-E7WY4GZ3.js → chunk-VMDBVXDJ.js} +1 -1
- package/dist/{chunk-F24QTMTY.js → chunk-VP63OOO4.js} +3 -3
- package/dist/{chunk-GRBBQ3VF.js → chunk-WKSNTMEJ.js} +1 -1
- package/dist/{chunk-UFXE363L.js → chunk-X6YT3I5F.js} +1 -1
- package/dist/{chunk-SGTZJMZ6.js → chunk-XABYSSXW.js} +1 -1
- package/dist/{chunk-GSBIJLTD.js → chunk-XAROKI7X.js} +1 -1
- package/dist/{chunk-ZMVCN4OA.js → chunk-XHMIJ7S3.js} +7 -7
- package/dist/{chunk-Q7HN6T3H.js → chunk-XNKIDGZW.js} +1 -1
- package/dist/{chunk-DVOQCAC2.js → chunk-XQQNA246.js} +1 -1
- package/dist/{chunk-ED3QFXBC.js → chunk-XZBQ3XXD.js} +1 -1
- package/dist/{chunk-6I6VSUKY.js → chunk-Y23TGQFN.js} +4 -4
- package/dist/chunk-ZLHPCPXS.js +19 -0
- package/dist/{chunk-LPUGK2MC.js → chunk-ZN2BFSQR.js} +2 -2
- package/dist/{chunk-TXMAWCR7.js → chunk-ZRZ5LOW3.js} +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +121 -122
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-DV2R65OS.js +0 -29
- package/dist/Notepad-63Q3JSCV.js +0 -25
- package/dist/PdfViewer-DFBPEUY5.js +0 -1
- package/dist/Sidebar-QFT5WPK4.js +0 -44
- package/dist/chunk-5CH2RGL6.js +0 -29
- package/dist/chunk-7YU27U3Y.js +0 -19
- package/dist/chunk-AEJNFA2K.js +0 -6
- package/dist/chunk-IEAFSVXC.js +0 -1
- package/dist/chunk-POCQ7ZL4.js +0 -3
- package/dist/chunk-PVR4KU7H.js +0 -7
- package/dist/chunk-RBXSU25O.js +0 -9
- package/dist/chunk-XSJJPACH.js +0 -11
package/dist/ui/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-DSIDJYH7.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{EmailTemplate}from"../chunk-3AZBI76O.js";export{ErrorBoundary}from"../chunk-2OE5VVBE.js";export{ErrorPage}from"../chunk-ZG2HMC7S.js";export{FormLayoutPage}from"../chunk-FRINAJU7.js";export{GalleryTemplate}from"../chunk-R5EJJ6HC.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{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-WUMHSI4U.js";export{ChatTemplate}from"../chunk-E7WY4GZ3.js";export{CheckoutTemplate}from"../chunk-GQMS5657.js";export{DashboardTemplate}from"../chunk-ZREDCRTL.js";export{DataTablePage}from"../chunk-SGTZJMZ6.js";export{TopNav}from"../chunk-EGAV5LSX.js";export{Statistic}from"../chunk-JB3WKDD7.js";export{Stepper}from"../chunk-Q7HN6T3H.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-A6RB4PIX.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-DKQWFQAV.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-PUIQFTCO.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-F24QTMTY.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-MPALY3CL.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-6YQPLI5M.js";export{ResizeHandle}from"../chunk-RBIGSJ2J.js";export{SettingReset}from"../chunk-GBLMVFDW.js";export{SettingRow}from"../chunk-LR77AS3N.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-D2WGDTWN.js";export{MetricBar}from"../chunk-J53OQCKC.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-JJP54OT4.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-SKETTGCJ.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-YL6LLHJA.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-ZPCADTM5.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-JKZJVQIB.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-QRJRGP2K.js";export{IconRail,IconRailButton}from"../chunk-BDAKGS7O.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-MZ26SYFY.js";export{EditableGrid}from"../chunk-53KQSCMG.js";export{Avatar,AvatarGroup}from"../chunk-5VTRKWKO.js";export{BudgetBar,budgetState}from"../chunk-RPMWF42S.js";export{Card,StatCard}from"../chunk-CBGKLHPB.js";export{ContainerFillChart}from"../chunk-UB5TLWZN.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-MVQMAIZM.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-GY67Y5SN.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-GRBBQ3VF.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-QTV3Y3UT.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{WidthsBar}from"../chunk-O33CUGOI.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-KAVFW5CU.js";export{SplitButton_default as SplitButton}from"../chunk-POCQ7ZL4.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{TagInput}from"../chunk-NDKQDIWN.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-AEJNFA2K.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-ELUTQZGP.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-U5DMF2TX.js";export{PositionInput}from"../chunk-BFVL2VTS.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-UFXE363L.js";export{Slider,SliderGroup}from"../chunk-MKEYXKZA.js";export{LinkPicker,TextLinkField}from"../chunk-UZ43AT4O.js";export{SearchableSelect}from"../chunk-RYS3URDC.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-5CH2RGL6.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-ZMVCN4OA.js";import"../chunk-YJSX6JAC.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-FTWWJHFX.js";export{ImageLightbox,lightboxKind}from"../chunk-XSJJPACH.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-VG5NGCMQ.js";export{Breadcrumbs}from"../chunk-GKZUAT3K.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{mediaLibraryMenu}from"../chunk-YFUMK2E7.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-B7AHMB3U.js";import"../chunk-VC42SDAC.js";export{DropdownMenu}from"../chunk-PVR4KU7H.js";export{NativeSelect,Select_default as Select}from"../chunk-7YU27U3Y.js";import"../chunk-EO5RLFRX.js";import"../chunk-5F7HMNCX.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-C6MV6IAX.js";export{MediaUsedInList}from"../chunk-TXMAWCR7.js";export{NumericKeypad}from"../chunk-SWO4VPOB.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-2YLG32JY.js";export{FilePicker_default as FilePicker}from"../chunk-GQK3U2IO.js";export{FormErrorSummary}from"../chunk-CL7SBEBQ.js";export{IconPicker}from"../chunk-XILZGSMX.js";export{CornersInput}from"../chunk-6I6VSUKY.js";export{DatePicker_default as DatePicker}from"../chunk-X6TJR6M2.js";export{DateRangePicker,toISODate}from"../chunk-VSAI5TH7.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-HI6IE5HI.js";export{DisplayChips}from"../chunk-T5V2GJ4D.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{AlignmentGrid}from"../chunk-M554OMPA.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-QTQQKQGQ.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-UTQG344L.js";export{Popover}from"../chunk-7JGR7WPD.js";export{InputNumber_default as InputNumber}from"../chunk-PA37I5ZX.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{BrandAssetEditor}from"../chunk-IU5KBQEQ.js";export{MediaUploadField}from"../chunk-RBXSU25O.js";export{FormField}from"../chunk-6KBDNYRW.js";export{ImageFocusPoint}from"../chunk-QSW3YHPK.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{Segmented}from"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-D7X2HMMA.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-ZF545DXX.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-Q3MNSM7W.js";export{ListFooter}from"../chunk-43T5JGFB.js";export{ListLoadError}from"../chunk-PUCPFBYO.js";export{Pagination}from"../chunk-IWJRSC7M.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-HJPCHES5.js";export{StatTile}from"../chunk-6L2UAAGT.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-KE5U4KKG.js";export{TreemapChart}from"../chunk-W244OMOU.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-7KDGW6BR.js";export{HistogramChart}from"../chunk-LPUGK2MC.js";export{Meter}from"../chunk-4WZRNPIG.js";export{PieChart}from"../chunk-GKK7DR2H.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-AG2OLB3E.js";export{RadialBarChart}from"../chunk-IGEFUHYE.js";export{RangeChart}from"../chunk-PKIDVVAE.js";export{RankedBars}from"../chunk-ZCV377AG.js";export{SankeyChart}from"../chunk-YVTKTWZX.js";export{ChordChart}from"../chunk-QMUAY24U.js";import"../chunk-TBPHW42V.js";export{FunnelChart}from"../chunk-VO3ZB7C6.js";export{HeatmapChart}from"../chunk-LKW3YAZN.js";export{StepChain,StepChainItem}from"../chunk-RBD7SB6M.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-DPDRFLBY.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-IQWIYZB5.js";export{Banner}from"../chunk-66JYKX4T.js";import"../chunk-XS4HFUTW.js";export{Input_default as Input}from"../chunk-MAMWQCJ6.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-AJ3R5QPD.js";export{IconButton_default as IconButton}from"../chunk-RUTUVS4H.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{mediaFileName}from"../chunk-7BDZZANS.js";export{TransferProgress}from"../chunk-EQN65XOO.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-P6LB3I3D.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-GNU3U2TP.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-XOKANFQD.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-IWEL2ZCV.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-WFANOFHG.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-BMQCUHSD.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-EGEWU776.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-4E4GWE4L.js";export{Dialog}from"../chunk-R2QDO7NY.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{ItemCount}from"../chunk-GMRZX2ET.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-OQW42DOR.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ColoredBadge}from"../chunk-DXHLUB36.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{VERSION}from"../chunk-IEAFSVXC.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-FPGRKHUW.js";import"../chunk-URHGHXDN.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-LNARMEEZ.js";export{Button_default as Button}from"../chunk-NHH2MXFU.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";import"../chunk-HL6JSDN3.js";export{Icon}from"../chunk-FSPFV4MI.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";export{Tooltip}from"../chunk-BCDG4N6L.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{BoxPlotChart}from"../chunk-DL6QIWVR.js";export{CandlestickChart}from"../chunk-ZOBLEXIU.js";export{ChartTooltip}from"../chunk-TLRCTNUF.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-25STFYV3.js";import"../chunk-7VCAMNCH.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{ChartBrush}from"../chunk-RQNZ2PVW.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
|
2
|
+
import"../chunk-DSIDJYH7.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{DataTablePage}from"../chunk-XABYSSXW.js";export{EmailTemplate}from"../chunk-7ILNRFEV.js";export{ErrorBoundary}from"../chunk-2OE5VVBE.js";export{ErrorPage}from"../chunk-ZG2HMC7S.js";export{FormLayoutPage}from"../chunk-4UX6ET7G.js";export{GalleryTemplate}from"../chunk-R5EJJ6HC.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{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-WUMHSI4U.js";export{ChatTemplate}from"../chunk-VMDBVXDJ.js";export{CheckoutTemplate}from"../chunk-MLKY5ESV.js";export{DashboardTemplate}from"../chunk-J7CIBRDS.js";export{TopNav}from"../chunk-5VSP3TYU.js";export{Statistic}from"../chunk-JB3WKDD7.js";export{Stepper}from"../chunk-XNKIDGZW.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-A6RB4PIX.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-DKQWFQAV.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-2OJ3HGFY.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-VP63OOO4.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-FMC2XNSP.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-NQJKANUP.js";export{ResizeHandle}from"../chunk-RBIGSJ2J.js";export{SettingReset}from"../chunk-LPDI5NL6.js";export{SettingRow}from"../chunk-O6ABVKHU.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-5EX6XXUX.js";export{MetricBar}from"../chunk-J53OQCKC.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-JJP54OT4.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-SKETTGCJ.js";import"../chunk-S4Z657L6.js";export{TimelineTrack}from"../chunk-YL6LLHJA.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-JRBQLRAZ.js";export{EmptyValue}from"../chunk-HNQPF5QZ.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-JKZJVQIB.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-AGLBDT7X.js";export{IconRail,IconRailButton}from"../chunk-BDAKGS7O.js";import"../chunk-FQEALPZJ.js";export{CountBadge}from"../chunk-MZ26SYFY.js";export{EditableGrid}from"../chunk-53KQSCMG.js";export{Avatar,AvatarGroup}from"../chunk-5VTRKWKO.js";export{BudgetBar,budgetState}from"../chunk-RPMWF42S.js";export{Card,StatCard}from"../chunk-CBGKLHPB.js";export{ContainerFillChart}from"../chunk-UB5TLWZN.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-MVQMAIZM.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-GY67Y5SN.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-WKSNTMEJ.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-QTV3Y3UT.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TagInput}from"../chunk-Q4LBBFLO.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-SKY2NBTQ.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-AEQFFD5I.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-U5DMF2TX.js";export{WidthsBar}from"../chunk-K64JRGNE.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-X6YT3I5F.js";export{Slider,SliderGroup}from"../chunk-TDLU6GF5.js";export{Snippet}from"../chunk-NNOA7AVG.js";export{SplitButton_default as SplitButton}from"../chunk-N6VP75F5.js";export{Switch_default as Switch}from"../chunk-M3R4C3A6.js";export{NumericKeypad}from"../chunk-SWO4VPOB.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-2YLG32JY.js";export{PositionInput}from"../chunk-4VDGVF5T.js";export{RadioGroup}from"../chunk-32VV2J22.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{IconPicker}from"../chunk-BDFZNLFQ.js";export{LinkPicker,TextLinkField}from"../chunk-CUA6CREW.js";export{SearchableSelect}from"../chunk-DY2M6BIG.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-AKVB5TQD.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-XHMIJ7S3.js";import"../chunk-YJSX6JAC.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-LOYCPZUB.js";export{ImageLightbox,lightboxKind}from"../chunk-AXL7VTNM.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-44PGFMSX.js";export{Breadcrumbs}from"../chunk-RSIGTZMU.js";export{mediaLibraryMenu}from"../chunk-JZK3UDOT.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-B7AHMB3U.js";import"../chunk-VC42SDAC.js";export{DropdownMenu}from"../chunk-ACVKU6YW.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-BMXMSAQE.js";export{MediaUsedInList}from"../chunk-ZRZ5LOW3.js";export{NativeSelect,Select_default as Select}from"../chunk-ZLHPCPXS.js";import"../chunk-EO5RLFRX.js";import"../chunk-QODTON7V.js";export{CornersInput}from"../chunk-Y23TGQFN.js";export{DatePicker_default as DatePicker}from"../chunk-Q5YM65DZ.js";export{DateRangePicker,toISODate}from"../chunk-R4Q5653D.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-HI6IE5HI.js";export{DisplayChips}from"../chunk-KZQAGXME.js";export{FilePicker_default as FilePicker}from"../chunk-7TONF2PM.js";export{FormErrorSummary}from"../chunk-CL7SBEBQ.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-FFASZGNZ.js";export{BrandAssetEditor}from"../chunk-K7PCBUDC.js";export{MediaUploadField}from"../chunk-UP442DPT.js";export{ImageFocusPoint}from"../chunk-QSW3YHPK.js";export{FormField}from"../chunk-6KBDNYRW.js";export{Segmented}from"../chunk-CKPVXDKX.js";import"../chunk-JDQGHQ2C.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-FS2KWQJW.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-NW7Z3G7P.js";export{Popover}from"../chunk-7JGR7WPD.js";export{InputNumber_default as InputNumber}from"../chunk-5VDT4762.js";export{useSettingAuto,useSettingRowName}from"../chunk-2NMW66P5.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{useClickOutside}from"../chunk-SI26KESU.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{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{AlignmentGrid}from"../chunk-M554OMPA.js";export{DataTable}from"../chunk-ZF545DXX.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-Q3MNSM7W.js";export{ListFooter}from"../chunk-43T5JGFB.js";export{ListLoadError}from"../chunk-BNQRPLBW.js";export{Pagination}from"../chunk-IWJRSC7M.js";export{WaterfallChart}from"../chunk-QXRRAADR.js";export{SankeyChart}from"../chunk-YVTKTWZX.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-GZYTCHPX.js";export{StatTile}from"../chunk-6L2UAAGT.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-KE5U4KKG.js";export{TreemapChart}from"../chunk-W244OMOU.js";export{squarify}from"../chunk-46BYGPGD.js";export{HeatmapChart}from"../chunk-A3VJ4PRU.js";export{HistogramChart}from"../chunk-ZN2BFSQR.js";export{Meter}from"../chunk-4WZRNPIG.js";export{PieChart}from"../chunk-GKK7DR2H.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-AG2OLB3E.js";export{RadialBarChart}from"../chunk-IGEFUHYE.js";export{RangeChart}from"../chunk-2SLQD57V.js";export{RankedBars}from"../chunk-ZCV377AG.js";export{ChordChart}from"../chunk-QMUAY24U.js";import"../chunk-TBPHW42V.js";export{FunnelChart}from"../chunk-VO3ZB7C6.js";export{StepChain,StepChainItem}from"../chunk-P5YFQ4IQ.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-CLQFP42I.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Textarea_default as Textarea}from"../chunk-PB7G6CJ7.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-45XXERGA.js";export{Banner}from"../chunk-6FPDOEOX.js";import"../chunk-BZPPDYEE.js";export{Input_default as Input}from"../chunk-MAMWQCJ6.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-AYZY3YNC.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-GGIFS34Z.js";export{mediaFileName}from"../chunk-B7HW6XZD.js";export{TransferProgress}from"../chunk-EQN65XOO.js";export{IconButton_default as IconButton}from"../chunk-RUTUVS4H.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-P6LB3I3D.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-RZR3OAKV.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-QASKQDUR.js";export{ChartBrush}from"../chunk-RQNZ2PVW.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-IWEL2ZCV.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-F7A6K3D5.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-BMQCUHSD.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-E3RHEEA6.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-ZDMZM7HD.js";import"../chunk-5A7MWTXX.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-TYK7VN73.js";export{Dialog}from"../chunk-6B4F5DWV.js";export{ItemCount}from"../chunk-GMRZX2ET.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-OQW42DOR.js";export{ColoredBadge}from"../chunk-RKFEJ5CX.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-PYQ6DD3F.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-MH6DI6YY.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";import"../chunk-URHGHXDN.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-LNARMEEZ.js";export{Button_default as Button}from"../chunk-NHH2MXFU.js";export{buttonClasses,iconButtonClasses}from"../chunk-UQYNPYF4.js";export{Icon}from"../chunk-KKSVRIMP.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";import"../chunk-HL6JSDN3.js";export{LoadingSpinner,SpinnerRing}from"../chunk-R2VKEMZH.js";import"../chunk-MRJKZWWV.js";import"../chunk-OZAAIE4E.js";export{Tooltip}from"../chunk-BCDG4N6L.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-42XMT5JN.js";export{CandlestickChart}from"../chunk-JJYAYMY7.js";export{ChartTooltip}from"../chunk-TLRCTNUF.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-OPB3I4JH.js";import"../chunk-7VCAMNCH.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-X2PZMXDP.js";import"../chunk-C3QOHMR6.js";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APP_VERSION,VERSION}from"./chunk-
|
|
1
|
+
export{APP_VERSION,VERSION}from"./chunk-PYQ6DD3F.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-ED3QFXBC.js";import{useWidgetSettings as n}from"./chunk-ZBTDMQUI.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EGEWU776.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-NDEIZUMG.js";import"./chunk-4E4GWE4L.js";import"./chunk-R2QDO7NY.js";import"./chunk-KC3EX26K.js";import"./chunk-GMRZX2ET.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-DXHLUB36.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-X2PZMXDP.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[N,j]=c(!1),[y,x]=c(""),[f,C]=c([]),[v,$]=c(!1),[E,D]=c(()=>e(h)),[T,W]=c(!1),[M,R]=c(E),U=i(null);n(l(()=>{R({...E}),W(!0)},[E]));const w=l(e=>{x(""),k(t=>N||"0"===t?(j(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),F=l(()=>{k("0"),d(null),g(null),j(!1)},[]),G=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),A=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!N){const e=G(p,t,b);k(String(e)),d(e),C(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),j(!0)},[m,p,b,N,G]),H=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=G(p,e,b),n=`${p} ${b} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),j(!0)},[m,p,b,G]),J=l(()=>{k(e=>String(parseFloat(e)/100))},[]),L=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?w(e.key):"."===e.key?w("."):"+"===e.key?A("+"):"-"===e.key?A("-"):"*"===e.key?A("×"):"/"===e.key?(e.preventDefault(),A("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&U.current?.contains(e.target)&&e.preventDefault(),H()):"Escape"===e.key?F():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&J())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[w,A,H,F,J]);const S="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",X=`${S} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,Z=`${S} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${S} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Q=`${S} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return s(a,{children:[
|
|
3
|
-
/* @__PURE__ */s("div",{ref:U,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */s("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:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${N?"":m}`}),
|
|
6
|
-
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
|
|
9
|
-
/* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:F,className:B,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:L,className:B,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:J,className:B,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>A("÷"),className:`${Z} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>w("7"),className:X,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>w("8"),className:X,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>w("9"),className:X,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>A("×"),className:`${Z} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>w("4"),className:X,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>w("5"),className:X,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>w("6"),className:X,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>A("-"),className:`${Z} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>w("1"),className:X,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>w("2"),className:X,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>w("3"),className:X,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>A("+"),className:`${Z} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>w("0"),className:`${X} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>w("."),className:X,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:H,className:Q,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:T,onClose:()=>W(!1),title:"Calculator Settings",appearance:M,onAppearanceChange:R,onSave:()=>{D(M),localStorage.setItem(h,JSON.stringify(M)),W(!1)}})]})}export{m as default};
|
package/dist/Notepad-63Q3JSCV.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{getNumberingConfigs as e}from"./chunk-DVOQCAC2.js";import{SidebarLayout as t}from"./chunk-PUIQFTCO.js";import"./chunk-QWK6DRSN.js";import"./chunk-RBIGSJ2J.js";import{timeAgo as r}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{AboutApp as n}from"./chunk-HKAQXFUR.js";import{useWindowManager as o,client_default as i}from"./chunk-ZBTDMQUI.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EGEWU776.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-NDEIZUMG.js";import"./chunk-4E4GWE4L.js";import"./chunk-R2QDO7NY.js";import{useShellPrefs as s}from"./chunk-KC3EX26K.js";import"./chunk-GMRZX2ET.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as c}from"./chunk-OQW42DOR.js";import"./chunk-UGTRSRIW.js";import"./chunk-DXHLUB36.js";import"./chunk-CDAJKLGL.js";import"./chunk-IEAFSVXC.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-X2PZMXDP.js";import"./chunk-C3QOHMR6.js";import{useRef as a,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as x,jsx as y}from"react/jsx-runtime";var k=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var g={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:N,save:v}=s(),{data:j}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=a({});p(()=>{if(!j)return;const e={};for(const t of j){const r=g[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[j]);const T=N.notepad_notes||[],[_,C]=d(null),[D,W]=d(""),[R,X]=d(""),[S,U]=d("yellow"),[$,E]=d(!1),[M,G]=d(!1),O=a(null),I=a(),H=T.find(e=>e.id===_);p(()=>{if(!_&&T.length>0){const e=T[0];C(e.id),W(e.title),X(e.content),U(e.color)}},[T.length]);const J=m(e=>{v({notepad_notes:e})},[v]),Q=m(()=>{if(!_||!$)return;const e=T.map(e=>e.id===_?{...e,title:D,content:R,color:S,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);J(e),E(!1)},[_,$,D,R,S,T,J]);p(()=>{if($)return I.current&&clearTimeout(I.current),I.current=setTimeout(Q,800),()=>{I.current&&clearTimeout(I.current)}},[$,Q]),p(()=>()=>{$&&Q()},[]);const Z=e=>{$&&Q(),C(e.id),W(e.title),X(e.content),U(e.color),E(!1),G(!1)},A=e=>{const t=R.slice(0,e),r=R.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=R.slice(e+r[0].length);X(t+n+o),E(!0)},F=async(e,t)=>{const r=w.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):c.error(`${n} not found`)}catch{c.error(`Failed to look up ${n}`)}},P="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",K=/* @__PURE__ */h(x,{children:[
|
|
2
|
-
/* @__PURE__ */y("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{$&&Q();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];J(t),C(e.id),W(""),X(""),U("yellow"),E(!1),G(!0),setTimeout(()=>O.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-accent-fill text-on-accent px-3 min-h-8 py-1 text-sm font-medium hover:bg-accent-fill-hover transition-colors",children:[
|
|
3
|
-
/* @__PURE__ */y(l,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
|
|
4
|
-
/* @__PURE__ */y("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */y("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(n=e.color,k.find(e=>e.key===n)||k[0]);var n;/* @__PURE__ */
|
|
5
|
-
return h("button",{onClick:()=>Z(e),className:"w-full text-left px-3 py-3 border-b border-line-subtle transition-colors "+(_===e.id?"bg-accent-tint":"hover:bg-row-hover"),children:[
|
|
6
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */y("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
|
|
8
|
-
/* @__PURE__ */y("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */y(l,{name:"bookmark",look:"solid",className:"h-3 w-3 text-amber-500 shrink-0"})]}),
|
|
9
|
-
/* @__PURE__ */y("p",{className:"text-xs text-ink-faintest mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
|
|
10
|
-
/* @__PURE__ */y("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
|
|
11
|
-
return h("div",{className:"h-full",children:[
|
|
12
|
-
/* @__PURE__ */y(n,{app:"notepad"}),
|
|
13
|
-
/* @__PURE__ */y(t,{sidebar:K,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
|
|
14
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
|
|
15
|
-
/* @__PURE__ */y("input",{value:D,onChange:e=>{W(e.target.value),E(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
|
|
16
|
-
/* @__PURE__ */y("div",{className:"flex gap-1",children:k.map(e=>/* @__PURE__ */y("button",{onClick:()=>{U(e.key),E(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${S===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
|
|
17
|
-
/* @__PURE__ */y("button",{onClick:()=>(e=>{const t=T.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);J(t);const r=t.find(t=>t.id===e);c.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:H?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(H?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */y(l,{name:"bookmark",className:"h-4 w-4",fill:H?.sticky?"currentColor":"none",strokeWidth:1.5})}),
|
|
18
|
-
/* @__PURE__ */y("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(J(t),_===e){const e=t[0];e?Z(e):(C(null),W(""),X(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */y(l,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),M?/* @__PURE__ */y("textarea",{ref:O,value:R,onChange:e=>{X(e.target.value),E(!0)},onBlur:()=>{G(!1),$&&Q()},placeholder:P,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */y("div",{onClick:()=>{G(!0),setTimeout(()=>O.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:R?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],s=/([A-Z]{2,4})#(\d{4,6})/g;let c;for(;null!==(c=s.exec(e));){const e=c[1],t=c[2];if(w.current[e]){const n=c.index,o=c[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */y("button",{onClick:()=>F(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let a=0;for(let e=0;e<r;e++)a+=t[e].length+1;for(;null!==(c=b.exec(e));){const e="x"===c[1]||"X"===c[1],t=c.index,n=a+t;i.push({idx:t,len:c[0].length,render:()=>/* @__PURE__ */y("button",{onClick:()=>A(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */y(l,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */y("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */y("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */y("span",{children:""},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
|
|
19
|
-
return y("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(R):/* @__PURE__ */y("p",{className:"text-gray-300 whitespace-pre-line",children:P})}),
|
|
20
|
-
/* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-line-subtle flex items-center gap-4 text-2xs text-ink-faintest",children:[
|
|
21
|
-
/* @__PURE__ */y("span",{children:"[] checkbox"}),
|
|
22
|
-
/* @__PURE__ */y("span",{children:"SO#35001 entity link"}),
|
|
23
|
-
/* @__PURE__ */y("span",{className:"ml-auto",children:M?"Editing":"Click to edit"})]})]}):/* @__PURE__ */y("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
|
|
24
|
-
/* @__PURE__ */y(l,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
|
|
25
|
-
/* @__PURE__ */y("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-OUKDGO4N.js";import"./chunk-OQW42DOR.js";import"./chunk-UQYNPYF4.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-X2PZMXDP.js";import"./chunk-C3QOHMR6.js";
|
package/dist/Sidebar-QFT5WPK4.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-ZTV2BA3P.js";import{ResizeHandle as o}from"./chunk-RBIGSJ2J.js";import{openGlobalSearch as s}from"./chunk-JKZJVQIB.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-RUTUVS4H.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as y,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as w,sectionIcons as C}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as z,PopupMenuLabel as W}from"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as $}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as R}from"./chunk-X2PZMXDP.js";import"./chunk-C3QOHMR6.js";import{useMemo as I,useState as A,useRef as H,useEffect as T,isValidElement as M,cloneElement as J}from"react";import{jsx as D,jsxs as K,Fragment as P}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function U(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var Q=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),F="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function G({open:e,children:t}){const r=H(null);return T(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */D("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */D("div",{className:"min-h-0 overflow-hidden",children:t})})}function V({open:e}){/* @__PURE__ */
|
|
2
|
-
return D($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function X({dir:e}){/* @__PURE__ */
|
|
3
|
-
return D($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function Z({className:e}){/* @__PURE__ */
|
|
4
|
-
return D($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var _=e=>.75+1.75*e+"rem";function O({width:O,collapsed:Y,onToggleCollapsed:E,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=w,sectionIcons:me=C,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ye=R().layout,{hasAnyPerm:ke}=e(),ve=I(()=>c(ce,he,ke),[ce,he,ke]),[Ne,je]=A(()=>t(r(n))),we=I(()=>[...ve.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ke]),Ce=(e,t=we)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=A(null),[ze,We]=A(!1),$e=H(null);T(()=>{Y||Le(null)},[Y]);const Re=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ie=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return D("span",{className:F,"aria-hidden":"true",children:r&&M(r)?J(r,{className:"size-[18px]"}):r})},Ae=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),He=(e,t,r=we)=>{const n=d(e,ke),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ke);/* @__PURE__ */
|
|
6
|
-
return K("div",{children:[
|
|
7
|
-
/* @__PURE__ */K("button",{type:"button",onClick:()=>Ce(i,r),"aria-expanded":l,className:Q(o,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&Ie(e.to,de),
|
|
8
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
9
|
-
/* @__PURE__ */D(V,{open:l})]}),
|
|
10
|
-
/* @__PURE__ */D(G,{open:l,children:/* @__PURE__ */D("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>He(e,t+1,Ae(n)))})}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
|
|
11
|
-
return K("div",{children:[
|
|
12
|
-
/* @__PURE__ */K("button",{type:"button",onClick:t=>Re(e,t),onAuxClick:t=>{1===t.button&&Re(e,t)},"aria-current":i?"page":void 0,className:Q(i,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&Ie(e.to,de),
|
|
13
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)},Te=(e,t)=>{const r=t?e.items:h(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */D("span",{className:F,"aria-hidden":"true",children:e.icon}):Ie(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ke),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
|
|
14
|
-
return K("div",{children:[
|
|
15
|
-
/* @__PURE__ */D("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:Q(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
-
return K("div",{children:[
|
|
17
|
-
/* @__PURE__ */K("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:Q(!o&&i,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
19
|
-
/* @__PURE__ */D(V,{open:o})]}),
|
|
20
|
-
/* @__PURE__ */D(G,{open:o,children:/* @__PURE__ */D("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>He(e,1,Ae(r)))})}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Me=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",Je=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),De=ne?.avatar_url?/* @__PURE__ */D("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */D("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Je}),Ke=ze?$e.current?.getBoundingClientRect():void 0,Pe=Y?"":"px-3",Be=Y?{paddingInline:k}:void 0,Ue=`${Y?ye.expandSidebar:ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,Qe=ee?{run:ee,label:ye.goHome,title:ye.goHome}:se?null:{run:E,label:Y?ye.expandSidebar:ye.collapseSidebar,title:Ue},Fe=/* @__PURE__ */K(P,{children:[pe&&/* @__PURE__ */D(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!Y&&/* @__PURE__ */K("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */D("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */D("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Ge=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
-
return K("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:O},children:[
|
|
23
|
-
/* @__PURE__ */K("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:y},children:[Qe?/* @__PURE__ */D("button",{type:"button",onClick:Qe.run,"aria-label":Qe.label,title:Qe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Fe}):/* @__PURE__ */D("span",{className:"flex min-w-0 items-center gap-2",children:Fe}),se?/* @__PURE__ */D(b,{onClick:se,"aria-label":ye.closeMenu,children:/* @__PURE__ */D($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */D("button",{type:"button",onClick:E,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */D(X,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */D("div",{className:`shrink-0 pt-3 ${Pe}`,style:Be,children:Y?/* @__PURE__ */D("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${B?"⌘K":"Ctrl K"})`,className:Q(!1,!0),children:/* @__PURE__ */D(Z,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */K("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
-
/* @__PURE__ */D(Z,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ye.search}),
|
|
27
|
-
/* @__PURE__ */D("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:B?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */K("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Pe} ${Y?"space-y-1":"space-y-0.5"}`,style:Be,children:[Y&&/* @__PURE__ */D("button",{type:"button",onClick:E,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${Q(!1,!0)} mb-3`,children:/* @__PURE__ */D(X,{dir:"right"})}),ve.topItems.map(e=>{if(!Y)return He(e,0);const t=d(e,ke),r=e.to===re||u(t,re,ke),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
-
return K("div",{children:[
|
|
30
|
-
/* @__PURE__ */D("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Re(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:Q(r,!0),children:Ie(e.to,de)}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Ge&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>Te(e,!1)),ve.systemSections.map(e=>Te(e,!1)),ve.virtualSections.map(e=>Te(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Te(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */D("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Pe}`,style:Be,children:/* @__PURE__ */K("button",{ref:$e,type:"button",onClick:()=>We(e=>!e),"aria-haspopup":"menu","aria-expanded":ze,"aria-label":Y?ye.accountMenu(Me):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[De,!Y&&/* @__PURE__ */K("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */D("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Me}),ae?.email&&Me!==ae.email&&/* @__PURE__ */D("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!Y&&!se&&/* @__PURE__ */D(o,{side:"left",width:O,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ye.resizeSidebar}),ze&&Ke&&/* @__PURE__ */K(S,{portal:!0,minWidth:224,onClose:()=>We(!1),style:U(O,Ke,window.innerHeight),children:[Y&&/* @__PURE__ */K("div",{className:"border-b border-line px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */D("p",{className:"truncate text-sm font-semibold text-gray-800",children:Me}),ae?.email&&/* @__PURE__ */D("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
|
|
34
|
-
/* @__PURE__ */K(L,{onClick:()=>{We(!1),te("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */D($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ve.footerItems.map(e=>/* @__PURE__ */K(L,{onClick:()=>{We(!1),Re(e)},children:[
|
|
36
|
-
/* @__PURE__ */D("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */K(L,{onClick:()=>{We(!1),oe()},children:[
|
|
37
|
-
/* @__PURE__ */D($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */D(z,{}),le&&/* @__PURE__ */K(P,{children:[
|
|
39
|
-
/* @__PURE__ */K(L,{onClick:()=>{We(!1),le()},children:[
|
|
40
|
-
/* @__PURE__ */D($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */D(z,{})]}),
|
|
42
|
-
/* @__PURE__ */K(L,{danger:!0,onClick:()=>{We(!1),ie()},children:[
|
|
43
|
-
/* @__PURE__ */D($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),Se&&Y&&/* @__PURE__ */D(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:O+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ke).map((e,t)=>/* @__PURE__ */K("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */D(z,{}),e.heading&&/* @__PURE__ */D(W,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */K(L,{onClick:()=>Re(e),children:[Ie(e.to,de),
|
|
44
|
-
/* @__PURE__ */D("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{U as accountMenuPosition,O as default};
|
package/dist/chunk-5CH2RGL6.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-ZMVCN4OA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-FTWWJHFX.js";import{ImageLightbox as r}from"./chunk-XSJJPACH.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-VG5NGCMQ.js";import{Breadcrumbs as d}from"./chunk-GKZUAT3K.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-YFUMK2E7.js";import{useMediaMoveItems as p}from"./chunk-B7AHMB3U.js";import{copyToClipboard as h}from"./chunk-VC42SDAC.js";import{DropdownMenu as f}from"./chunk-PVR4KU7H.js";import{NativeSelect as g}from"./chunk-7YU27U3Y.js";import{MediaUploadGrid as v}from"./chunk-C6MV6IAX.js";import{MediaUsedInList as k}from"./chunk-TXMAWCR7.js";import{Segmented as y}from"./chunk-CKPVXDKX.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-IQWIYZB5.js";import{Banner as x}from"./chunk-66JYKX4T.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-RUTUVS4H.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-P6LB3I3D.js";import{ColoredBadge as j}from"./chunk-DXHLUB36.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-FSPFV4MI.js";import{Tooltip as O}from"./chunk-BCDG4N6L.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as A}from"./chunk-X2PZMXDP.js";import{useRef as L,useMemo as M,useCallback as U,useState as E,useEffect as K}from"react";import{jsxs as B,Fragment as R,jsx as V}from"react/jsx-runtime";var H="application/x-efficient-media-files",X="application/x-efficient-media-folder",J="application/x-efficient-media-file";function W(e){if(!e||!Array.from(e.types).includes(J))return null;try{const n=JSON.parse(e.getData(J));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var G={type:"all",use:"any",sort:"newest"},Y={lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */V(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */V(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */V(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */V(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */V(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */V(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */V(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */V(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */V(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */V(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */V(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */V(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */V(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */V(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */V(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */V(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */V(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */V(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Z({value:e,label:n,onDone:l}){const[a,i]=E(e),r=L(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
|
|
2
|
-
return V(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Q(T){const{mode:W="manage",layout:Q="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=G,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Fe,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Ae,onDragOut:Le,className:Me=""}=T,Ue=A().mediaLibrary,Ee=A().media,Ke="pick"===W,Be=!Ke,Re=L(null),Ve=P(Re,"phone"===Q?343:1200),He="phone"===Q||"auto"===Q&&Ve<640,Xe=M(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Je=M(()=>new Map(ee.map(e=>[e.id,e])),[ee]),We=M(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Je]),Ge=U(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,ee.length]),Ye=U((e,n)=>Ge(e).some(e=>e.id===n),[Ge]),[$e,Ze]=E(()=>/* @__PURE__ */new Set(["@files"])),Qe=e=>Ze(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=U(e=>{Ze(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;K(()=>{if("files"===q.place)qe(["@files",...Ge(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Xe.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Xe.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ue.readOnly} ${Ue.editedAtHq(e.sharedFrom)}`:Ue.readOnly,dn=M(()=>ie.map(e=>e.id),[ie]),sn=M(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=s(dn),un=M(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=L(!0);K(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[hn]);const fn=L(hn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Ke?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=E(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},Cn=U(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ue.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&Ye(n,e.id)?Ue.notIntoItself:(l?.parentId??null)===n?Ue.folderAlreadyHere:void 0};n.push({key:u,label:Ue.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of We.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[We,Je,an,Ye,rn,Ue]),xn=U(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=E(null),Dn={words:Ue,media:Ee,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Be?e=>{wn(e)}:void 0,rename:Ce&&Be?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Be?xe:void 0,trash:Ne&&Be?Ne:void 0,deleteFolder:Ie&&Be?Ie:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Be?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&h(Ue.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>m(e,Dn),jn=w(),zn=(e,n)=>{Ke||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Fn,Tn]=E(null),[On,Pn]=E(null),[An,Ln]=E(null);K(()=>{if(!On&&!Fn)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Fn]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Un=(e,n)=>!(!xe||fe.move||Ke)&&(!!Mn(e,H)||!(!Mn(e,X)||!An)&&(n!==An&&!(n&&Ye(n,An)))),En=(e,n)=>({onDragEnter:l=>{Un(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{Un(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(Un(e,n))if(e.preventDefault(),Tn(null),Mn(e,H)){let l;try{l=JSON.parse(e.dataTransfer.getData(H))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else An&&(xe({kind:"folder",id:An},n),Ln(null))}}),Kn=e=>{const n=e=>Mn(e,H)||Mn(e,X)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Bn=(e,n,l)=>/* @__PURE__ */V(O,{side:"right",content:On===e?Ue.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Rn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
3
|
-
return B("div",{role:"none",className:"contents",children:[
|
|
4
|
-
/* @__PURE__ */V(n,{label:Bn(r,e.name,t),level:a,icon:d&&o?Y.folderOpen:Y.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Qe(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Kn(r),...Be?Rn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */V(l,{children:Vn(d,a+1,t)})]},e.id)}),Hn=(e,a)=>(We.get(e)??[]).map(e=>{const i=We.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
5
|
-
return B("div",{role:"none",className:"contents",children:[
|
|
6
|
-
/* @__PURE__ */V(n,{label:e.name,level:a,icon:i&&r?Y.folderOpen:Y.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ue.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Qe(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:An===e.id,draggable:Be&&!!xe&&!fe.move,rename:t?/* @__PURE__ */V(Z,{value:e.name,label:Ue.folderName,onDone:bn}):void 0,actions:Be&&o.length?/* @__PURE__ */V(f,{align:"end","aria-label":Ue.folderActions,trigger:Y.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...En(e.id,e.id),...Be?Rn({kind:"folder",id:e.id}):{},...Be&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(X,e.id),Ln(e.id)},onDragEnd:()=>{Ln(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */V(l,{children:Hn(e.id,a+1)})]},e.id)}),Xn=$e.has("@files"),Jn=$e.has("@products"),Wn=/* @__PURE__ */B(e,{"aria-label":Ue.folders,children:[ne&&/* @__PURE__ */B(R,{children:[
|
|
7
|
-
/* @__PURE__ */V(n,{label:Bn("@products",Ue.products),level:1,icon:Y.lock,badge:{label:Ue.readOnlyBadge,tone:"neutral"},expanded:ne.length?Jn:void 0,onToggle:()=>Qe("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Kn("@products")}}),Jn&&ne.length>0&&/* @__PURE__ */V(l,{children:Vn(ne,2)})]}),
|
|
8
|
-
/* @__PURE__ */V(n,{label:Ue.allFiles,level:1,icon:Xn?Y.folderOpen:Y.folder,count:le,countLabel:null!=le?Ue.fileCount(le):void 0,expanded:We.get(null)?.length?Xn:void 0,onToggle:()=>Qe("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...En("@files",null)}}),Xn&&(We.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Hn(null,2)}),Be&&/* @__PURE__ */V(n,{label:Ue.trash,level:1,icon:Y.trash,count:ae,countLabel:null!=ae?Ue.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Gn=(()=>{if(ln)return[{label:Ue.trash}];if(nn){const e=q.nodeId?Xe.get(q.nodeId)?.path??[]:[];return[{label:Ue.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Ge(rn);return[{label:Ue.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Yn=nn?Ue.readOnly:fe.upload,$n=!!be&&!ln&&!Yn,Zn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Qn=nn?Ue.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Be&&we&&!ln&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.folderPlus,onClick:()=>{wn(rn)},...qn(Qn),children:Ue.newFolder}),be&&!ln&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Y.upload,onClick:()=>Zn.open(),...qn(Yn),children:Ue.upload}),Be&&ln&&je&&ie.length>0&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ue.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */V("div",{style:{width:He?void 0:i,flex:He?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */V(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */V("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */V(N,{size:"sm",type:"search",leftIcon:Y.search,placeholder:nn?Ue.searchProducts:Ue.search,"aria-label":nn?Ue.searchProducts:Ue.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ue.mediaType,oe.type,[{value:"all",label:Ue.allTypes},{value:"image",label:Ue.images},{value:"video",label:Ue.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ue.use,oe.use,[{value:"any",label:Ue.anyUse},{value:"email",label:Ue.emailOnly},{value:"website",label:Ue.websiteOnly},{value:"unused",label:Ue.notUsed}],nl("use"),130),de&&Be&&el(Ue.sort,oe.sort,[{value:"newest",label:Ue.newest},{value:"name",label:Ue.byName},{value:"size",label:Ue.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */V(y,{size:"sm",label:Ue.view,value:ce,onChange:ue,options:[{value:"grid",label:Ue.grid,icon:Y.grid},{value:"list",label:Ue.list,icon:Y.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ue.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ue.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Ue.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ue.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */V(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Be&&an&&!!xe&&!fe.move,tl=!!Le&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[J]:ol(e)}}:{}})),sl=He?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=L(null),ul=c({containerRef:cl,enabled:Be&&!He&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ke){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */V(i,{variant:"dashed",title:Ue.noMatches}):nn?/* @__PURE__ */V(i,{variant:"dashed",title:Ue.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */V(i,{variant:"dashed",title:Ue.trashEmpty}):!$n||Ke?/* @__PURE__ */V(i,{variant:"dashed",title:Ue.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":Be||void 0,"aria-label":Ue.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(J,ol(e)),Le("start")}:void 0,onDragEnd:ol(e)?e=>Le("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
9
|
-
/* @__PURE__ */V("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
10
|
-
/* @__PURE__ */V("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
11
|
-
/* @__PURE__ */V("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */V("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */V(v,{items:dl,readOnly:!$n||Ke,onFiles:$n&&!Ke?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?H:tl?J:void 0,onDragOutChange:tl?e=>Le(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Be?zn:void 0,menuOnMedia:Be})),gl=p({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===u?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */V(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Y.folder,Ue.moveTo]}),items:gl,disabled:!!fe.move}),yl=Be&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
12
|
-
/* @__PURE__ */V(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ue.selected(un.length)}),/* @__PURE__ */B(R,ln?{children:[De&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.undo,onClick:()=>De(un),...qn(fe.restore),children:Ue.restore}),Se&&/* @__PURE__ */V(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ue.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,disabled:!0,children:Ue.rename}),Ne&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Ue.moveFilesToTrash(un.length)})]}),
|
|
13
|
-
/* @__PURE__ */V(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ue.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ue.name,a?/* @__PURE__ */V(Z,{value:e.name,label:Ue.fileName,onDone:bn}):e.name),l("type",Ue.type,e.typeLabel),l("size",Ue.size,e.sizeLabel),l("resolution",Ue.resolution,e.resolution),nn?(l("design",Ue.design,e.design),l("finish",Ue.finish,e.finish),l("angle",Ue.angleLug,e.angleLug),l("owner",Ue.owner,e.owner)):(l("added",Ue.addedBy,e.addedBy),l("folder",Ue.folder,e.folderPath)),l("used",Ue.usedIn,null!=e.usedCount?Ue.places(e.usedCount):void 0);const i=m({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
14
|
-
return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
15
|
-
/* @__PURE__ */V("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */V(x,{tone:"neutral",title:Ue.readOnlyBadge,children:on(tn)}),
|
|
16
|
-
/* @__PURE__ */V(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
|
|
17
|
-
/* @__PURE__ */V("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */V(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ue.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
18
|
-
/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.copy,onClick:()=>Dn.copyUrl(e.id),children:Ue.copyUrl})]}),an&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ue.replace}),Fe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.crop,onClick:()=>Fe(e.id),children:Ue.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */V(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Y.folder,Ue.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ue.rename}),Ne&&/* @__PURE__ */V(I,{"aria-label":Ue.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Y.trash})]}),ln&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Y.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ue.restore}),Se&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ue.deleteForever})]}),nn&&Te&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Y.external,onClick:()=>Te({kind:"render",id:e.id}),children:Ue.openInDesign}),he&&/* @__PURE__ */V(k,{items:he})]})},wl=mn?mn.private?Ue.privateNoPick:mn.pickDisabledReason:void 0,Cl=Ke?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
19
|
-
/* @__PURE__ */V("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ue.oneChosen(mn.name):Ue.noneChosen}),
|
|
20
|
-
/* @__PURE__ */B("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",onClick:Pe,children:Ue.cancel}),
|
|
21
|
-
/* @__PURE__ */V(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ue.chooseImage})]})]}):null,xl=Be&&!!mn,Nl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */V(x,{tone:"neutral",children:Ae}),
|
|
22
|
-
/* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
23
|
-
/* @__PURE__ */V(d,{items:Gn}),_n]}),ll,yl,
|
|
24
|
-
/* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Be&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
25
|
-
/* @__PURE__ */V(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */V("input",{...Zn.inputProps}),
|
|
26
|
-
/* @__PURE__ */V(S,{rejections:Zn.rejections})]});/* @__PURE__ */
|
|
27
|
-
return B("div",{ref:Re,"data-media-library":"","data-layout":He?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */B("div",He?{className:"flex flex-col gap-3 p-3",children:[Wn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
28
|
-
/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Wn}),
|
|
29
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,He&&/* @__PURE__ */V(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */V(C,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */V(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{H as MEDIA_FILES_DRAG_TYPE,J as MEDIA_FILE_DRAG_TYPE,X as MEDIA_FOLDER_DRAG_TYPE,Q as MediaLibrary,W as readMediaFileDrag};
|
package/dist/chunk-7YU27U3Y.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-5F7HMNCX.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-X2PZMXDP.js";import{forwardRef as k,useId as N,useState as w,useRef as $,useMemo as D,useCallback as j,useEffect as S,useLayoutEffect as H}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as I,Fragment as E}from"react/jsx-runtime";var O=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=k(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},k){const w=t,$=x(),D=d(),j=f??D,S=N(),H=/* @__PURE__ */C("select",{ref:k,value:e,multiple:b||void 0,onChange:e=>w(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,j?S:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:n}),
|
|
2
|
-
/* @__PURE__ */I(P,{items:r})]});return j?/* @__PURE__ */C(E,{children:[H,
|
|
3
|
-
/* @__PURE__ */I("span",{id:S,hidden:!0,children:$.settingView.auto})]}):H});function P({items:e}){const t=e=>/* @__PURE__ */I("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
-
return I(E,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */I("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var R=k(function({value:l,onChange:u,options:k,placeholder:z,invalid:R,className:A="",id:F,disabled:M,size:U,touchSize:V,title:B,multiple:K,renderOption:W,renderValue:L,valueText:X,readOnly:G=!1,footer:Y,changed:J=!1,auto:q,"aria-describedby":Z,"aria-label":Q,"aria-labelledby":_,...ee},te){const[re,ne]=w(!1),[ie,ae]=w(-1),le=$(null),oe=$(null),de=$(null),se=$(null),ce=$([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===U,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=w(null),ge=x(),ye=$(re);ye.current=re;const xe=$({buffer:"",timer:null}),ke=N(),Ne=`${ke}-listbox`,we=F??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),Se=q??je,He=`${ke}-auto`,Te=[Z,J?De:void 0,Se?He:void 0].filter(Boolean).join(" ")||void 0,Ce=D(()=>i(k),[k]),Ie=K?l:[],Ee=u,Oe=f(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze="undefined"==typeof window?S:H,Pe=`${re}|${Oe?.top}|${Oe?.bottom}|${Oe?.maxHeight}|${k.length}`;ze(()=>{be(null)},[Pe]),ze(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&be(Math.floor(i))},[re,fe,Pe]);const Re=K?Ce.findIndex(e=>Ie.includes(e.value)):Ce.findIndex(e=>e.value===l),Ae=K?Ce.filter(e=>Ie.includes(e.value)).map(e=>e.label).join(", ")||void 0:Re>=0?Ce[Re].label:void 0,Fe=!K&&Re>=0?Ce[Re].lang:void 0,Me=K?Ce.filter(e=>Ie.includes(e.value)):Re>=0?[Ce[Re]]:[],Ue=L&&Me.length?L(Me):void 0,Ve=void 0!==Ue&&X?X(Me):void 0,Be=j((e=!0)=>{ne(!1),ae(-1),e&&oe.current?.focus()},[]),Ke=j(()=>{M||G||(ae(Re>=0?Re:e(Ce)),ne(!0))},[M,G,Ce,Re]),We=j(e=>{const t=Ce[e];if(t&&!t.disabled){if(K){const r=l;return Ee(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Ee(t.value),Be()}},[Ce,K,l,Ee,Be]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Be(),!0),ue)},[re,Be]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Be(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Be(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Be]),S(()=>{!re||ie<0||de.current?.querySelector(`#${CSS.escape($e(ie))}`)?.scrollIntoView({block:"nearest"})},[re,ie]);const Le=j(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=re?ie:Re,i=t(Ce,r.buffer,n);i<0||(re?ae(i):K?(ae(i),ne(!0)):We(i))},[re,ie,Re,Ce,We,K]),Xe=re?a(k,(e,t)=>{const r=(n=e.value,K?Ie.includes(n):l===n);var n;const i=t===ie;/* @__PURE__ */
|
|
5
|
-
return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||W?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>We(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${K?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[K&&/* @__PURE__ */I(o,{selected:r}),W?/* @__PURE__ */I("span",{className:"block min-w-0 flex-1 truncate",children:W(e,{selected:r,active:i})}):K?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
-
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
-
/* @__PURE__ */C(E,{children:[
|
|
8
|
-
/* @__PURE__ */I("span",{lang:e.lang,className:"block truncate",style:O(e),children:e.label}),e.description&&/* @__PURE__ */I("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Ge=void 0!==Ue?
|
|
9
|
-
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
-
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ue}),
|
|
11
|
-
/* @__PURE__ */I("span",{lang:void 0===Ve?Fe:void 0,className:"sr-only",children:Ve??Ae})]}):/* @__PURE__ */I("span",{lang:Fe,className:`block truncate ${void 0===Ae?c:""}`,children:Ae??z??" "}),Ye={zIndex:h.popup,left:Oe?.left,top:Oe?.top,bottom:Oe?.bottom,width:Oe?.width,maxHeight:Oe?.maxHeight??b,visibility:Oe?void 0:"hidden",...g()},Je=/* @__PURE__ */I("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Q?void 0:we),"aria-label":_?void 0:Q,"aria-multiselectable":K||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Ye,maxHeight:fe}:Ye,children:Xe}),qe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Ye,children:[Je,
|
|
12
|
-
/* @__PURE__ */I("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Be(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,n=t=>{e.preventDefault(),ce.current[t]?.focus()},i=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Be());case"Escape":return e.preventDefault(),e.stopPropagation(),void Be()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */I(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
-
/* @__PURE__ */I("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Je;/* @__PURE__ */
|
|
14
|
-
return C("div",{ref:le,className:"relative",children:[
|
|
15
|
-
/* @__PURE__ */I("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ie>=0?$e(ie):void 0,"aria-invalid":R||void 0,"aria-describedby":Te,"aria-label":Q,"aria-labelledby":_,title:B,disabled:M,"aria-readonly":G||void 0,onClick:()=>re?Be():Ke(),onKeyDown:t=>{if(!M&&!G)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>n(Ce,e,1)):Ke());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>n(Ce,e,-1)):Ke());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),We(ie)));case" ":return t.preventDefault(),void(re?We(ie):Ke());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Be()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Be(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Le(t.key))}},className:s({invalid:R,size:U,readOnly:G,auto:Se,className:`${G?"":"pr-8 "}text-left ${A}`.trim()}),children:J?
|
|
16
|
-
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Ge,
|
|
17
|
-
/* @__PURE__ */I("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Ge}),J&&/* @__PURE__ */I("span",{id:De,hidden:!0,children:ge.select.changed}),Se&&/* @__PURE__ */I("span",{id:He,hidden:!0,children:ge.settingView.auto}),!G&&/* @__PURE__ */I(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
-
/* @__PURE__ */C("select",{ref:te,value:l,multiple:K||void 0,onChange:e=>Ee(K?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:M,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!K&&/* @__PURE__ */I("option",{value:"",disabled:!0,children:z}),
|
|
19
|
-
/* @__PURE__ */I(P,{items:k})]}),re&&T(qe,document.body)]})}),A=k(function({touchSize:e,...t},r){const n=u(),i=e??"touch";return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */I(z,{ref:r,...t,size:i}):/* @__PURE__ */I(R,{ref:r,...t}):/* @__PURE__ */I(R,{ref:r,...t,size:i})});export{z as NativeSelect,A as Select_default};
|
package/dist/chunk-AEJNFA2K.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-ELUTQZGP.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":j,windows:L,className:S="",layout:U="grid"}){const q=s().textToolbar,A=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!A.words&&!A.paragraph)return null;const B=m(n,k,x,A.cells.paragraph),I=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,R=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:I(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:I(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,T=l(q),$=e.map(e=>[e,T[e],r(e)]),P=C?e.filter(e=>C.allow.includes(e)):[],K=C&&P.includes(C.value)?C.value:P[0],E=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],F=x&&B?g(q.clear,/* @__PURE__ */i(a,{className:I(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,G=/* @__PURE__ */t(d,{children:[R("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),R("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),R("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),R("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:I(k.open,"rosh-tb-color"),"aria-label":q.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,R("link",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),R("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),R("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),R("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?F:null]}),H=/* @__PURE__ */t(d,{children:[C&&P.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,P,e=>C.onChange(e)),children:$.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:I(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===K?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:I("bullet"===D.pressed),"aria-label":q.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(q.number,/* @__PURE__ */i(a,{className:I("number"===D.pressed),"aria-label":q.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,R("quote",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>M.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:I(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?F:null]}),V="row"===U,X=V?" is-row":A.flow?" is-flow":A.oneRow?" is-one-row":A.words&&void 0===N&&"words"!==B?" is-eight":"",Z=b(n,Boolean(k)),O={"--rosh-tb-color-col":String(Z.color),"--rosh-tb-link-col":String(Z.link),...V?{"--rosh-tb-cells":String(A.cells.words+A.cells.paragraph),"--rosh-tb-groupgap":A.words&&A.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Q;return Q=V?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:G}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:H}):null]}):A.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[G,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),H]}):A.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:G}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:H})]}):/* @__PURE__ */t(d,{children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:G}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:H}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${X} ${S}`.trim(),style:O,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":j??q.formatting,children:Q}),L]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-IEAFSVXC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="10.0.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-POCQ7ZL4.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-PVR4KU7H.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:N=!1,disabledReason:g,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:F,align:z="end",side:L="bottom",menuMinWidth:M,linkAs:R,block:W=!1,className:D=""},H){const I=N&&(null!=g&&""!==g&&!1!==g)&&!v,P=x&&null!=j&&""!==j&&!1!==j,U=o(),$=/* @__PURE__ */t(i,{ref:H,type:b,variant:f,size:p,loading:v,leftIcon:k,block:W,disabled:N&&!I,"aria-disabled":!!I||void 0,disabledReason:I?g:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),A=W?"relative flex min-w-0 flex-1":"relative inline-flex",B=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[W?"flex w-full":"inline-flex","items-stretch",D].filter(Boolean).join(" "),children:[null==w||""===w||I?$:/* @__PURE__ */t(a,{content:w,className:A,children:$}),
|
|
3
|
-
/* @__PURE__ */t(a,{content:P?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":P?U:void 0,items:h,align:z,side:L,minWidth:M,linkAs:R,disabled:x&&!P,"aria-disabled":P,onOpenChange:y,footer:C,footerLabel:F,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:B,strokeWidth:2,"aria-hidden":"true"})})}),P&&/* @__PURE__ */t("span",{id:U,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
package/dist/chunk-PVR4KU7H.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-XS4HFUTW.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-FPGRKHUW.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:W="end",side:j="bottom","aria-label":K,className:S="",triggerClassName:A,menuClassName:C="",minWidth:E=180,linkAs:H,disabled:U,id:$,"aria-describedby":N,"aria-disabled":T=!1,onOpenChange:B,footer:G,footerLabel:I}){const[J,q]=m(!1),[M,P]=m(-1),R=h(null),z=h(null),F=h(null),O=h(null),Q=h(null),V=null!=G&&!1!==G,X=h({text:"",at:0}),Y=g(),Z=g(),_=$??Z,ee=h(B);ee.current=B;const te=h(J);te.current=J;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&z.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>F.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!J)return;const e=e=>{const t=e.target;if(R.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[J,re]);const ie=v(()=>{const e=oe(),t=z.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:W,side:j});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=W},[W,j]);p(()=>{J&&ie()}),b(()=>{if(J)return u(()=>z.current,ie)},[J,ie]),b(()=>{if(!J)return;const t=F.current,r=e(L[M])?t?.querySelector(`[data-dropdown-index="${M}"]`):null;(r??t)?.focus({preventScroll:!0})},[J,M]),b(()=>{if(J)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>O.current)},[J,re]),n(O,J&&V);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{P(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,B?.(!0))};p(()=>{const e=ae.current;if(!J||!e)return;ae.current=null;const t=le(e);t!==M&&P(t)});const de=t(L,Y),ce="function"==typeof G?G({close:()=>re(!0)}):G,ue={...k.test(C)?{}:{zIndex:s.popup},minWidth:E};/* @__PURE__ */
|
|
2
|
-
return y("div",{ref:R,className:`relative inline-flex ${S}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */x("button",{ref:z,id:_,type:"button","aria-haspopup":"menu","aria-expanded":J,"aria-controls":J?Y:void 0,"aria-label":K,"aria-describedby":N,"aria-disabled":T||void 0,disabled:U,onClick:()=>{T||(J?re(!1):se("first"))},onKeyDown:e=>{T||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:A??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(K?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),J&&
|
|
4
|
-
/* @__PURE__ */x(i,{portal:!0,className:C,style:ue,children:/* @__PURE__ */y("div",{ref:O,children:[
|
|
5
|
-
/* @__PURE__ */x("div",{ref:F,id:Y,role:"menu","aria-orientation":"vertical","aria-label":K,"aria-labelledby":K?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),P(ne(M+1,1));else if("ArrowUp"===t.key)t.preventDefault(),P(ne(M-1,-1));else if("Home"===t.key)t.preventDefault(),P(ne(0,1));else if("End"===t.key)t.preventDefault(),P(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&Q.current?o(Q.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-X.current.at<500?X.current.text+n:n;X.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?M+1:Math.max(M,0),s=F.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void P(n)}})(t)},children:r(L,{menuId:Y,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===M?0:-1,onMouseEnter:()=>{t.disabled||Q.current?.contains(document.activeElement)||P(e)}}),linkAs:H})}),V&&/* @__PURE__ */y("div",{ref:Q,role:"group","aria-label":I,"data-dropdown-footer":"",onKeyDown:e=>{const t=Q.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=F.current?.querySelector(`[data-dropdown-index="${M}"]`);return void(t??F.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
-
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
|
|
7
|
-
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
package/dist/chunk-RBXSU25O.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as a}from"./chunk-QSW3YHPK.js";import{Segmented as i}from"./chunk-CKPVXDKX.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-7BDZZANS.js";import{TransferProgress as u}from"./chunk-EQN65XOO.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-P6LB3I3D.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{useShellStrings as b}from"./chunk-X2PZMXDP.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as N,Fragment as j}from"react/jsx-runtime";var x=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:P,onFile:R,label:F,hint:C,error:U,required:O,className:$,accept:z="image/*",maxSizeBytes:B,fit:D="cover",height:K=112,placeholder:S,cta:X,acceptHint:H,showFilename:I=!0,allowReplace:q=!0,allowRemove:V=!0,replaceLabel:W,removeLabel:Z,busy:A=!1,busyLabel:M,choosingLabel:Q,pickFailedLabel:Y,progress:_,disabled:E=!1,kind:G,onKindChange:J,focus:T,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=X??ie.cta,oe=G??(/video/.test(z)&&!/image/.test(z)?"video":"image"),re="string"==typeof Z&&Z?Z:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=A||ne,me=ne&&!A?Q??ie.choosing:M??ie.uploading,he=U??(se?Y??ie.pickFailed:void 0),pe=e=>{if(!P)return;ce(!1);const a=P(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=E||ue,ke=!!w&&(t(w,z)||w===ve),Ne=S??o(z,ie),je=W??(ke||"video"===oe?ie.changeVideo:ie.changeImage),xe=e=>{P?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:z,maxSizeBytes:B,acceptHint:H,multiple:!1,disabled:ye,onAccept:([e])=>xe(e)}),{dragOver:Le}=we,Pe=()=>{ye||(P?pe():we.open())},Re=w?r(w):"",Fe=!ke&&!!ee,Ce=E||!q&&!V?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[q&&/* @__PURE__ */k("button",{id:Fe?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Pe(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${x}`,children:[
|
|
2
|
-
/* @__PURE__ */N(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
-
/* @__PURE__ */N("span",{id:`${be}-change`,className:"truncate",children:je})]}),V&&/* @__PURE__ */N("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${x}`,children:/* @__PURE__ */N(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Ue=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Fe?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Fe?void 0:{height:K},children:[Fe?
|
|
4
|
-
/* @__PURE__ */N(a,{value:T??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */N("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:D}}):/* @__PURE__ */N("img",{src:w??void 0,alt:Re,className:"h-full w-full",style:{objectFit:D,objectPosition:T||void 0}}),I&&w&&/* @__PURE__ */N(n,{children:Re}),Ce,ue&&/* @__PURE__ */N(l,{label:me,progress:_,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */N("button",{type:"button",id:be,onClick:()=>Pe(),disabled:ye,"aria-label":"string"==typeof Ne?Ne:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:K},children:ue?/* @__PURE__ */N(u,{state:"busy",verb:me,pct:_}):/* @__PURE__ */k(j,{children:[
|
|
5
|
-
/* @__PURE__ */N("span",{className:"text-ink-faintest",children:/* @__PURE__ */N(s,{})}),
|
|
6
|
-
/* @__PURE__ */N("span",{className:"px-3 text-xs text-ink-faint",children:Ne}),
|
|
7
|
-
/* @__PURE__ */N("span",{className:"text-sm font-medium text-blue-600",children:te}),H&&/* @__PURE__ */N("span",{className:"text-xs text-ink-faintest",children:H})]})});/* @__PURE__ */
|
|
8
|
-
return k(e,{label:F,htmlFor:be,hint:C,error:he,required:O,className:$,children:[J&&/* @__PURE__ */N("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */N(i,{value:oe,onChange:e=>J(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */N(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */N(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof F&&F?F:ie.upload})}),w?Ue:Oe,!P&&/* @__PURE__ */N("input",{...we.inputProps}),
|
|
9
|
-
/* @__PURE__ */N(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
package/dist/chunk-XSJJPACH.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-7BDZZANS.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-PKXQDCNR.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-NHH2MXFU.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-FSPFV4MI.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as N,Fragment as w}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",D=e=>e.stopPropagation();function F({images:r,startIndex:y=0,onClose:F,onIndexChange:U,onOpenFile:A}){const L=h().lightbox,P=d(),$=p(null),z=p(null),[I,M]=x(y),Z=r.length,J=P&&Z>0,W=b(e=>{if(Z<2)return;const t=((I+e)%Z+Z)%Z;M(t),U?.(t)},[I,Z,U]);if(a(J),l($,J,z),i(J),k(()=>{if(J)return f(()=>(F(),!0),()=>$.current)},[J,F]),k(()=>{if(!J)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),W("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[J,W]),!J)return null;const X=r[Math.min(I,Z-1)],G=j(X),H=X.caption||n(X.url);let Q;return Q="video"===G?/* @__PURE__ */v("video",{src:X.url,controls:!0,playsInline:!0,"aria-label":H,onClick:D,className:`${e} rounded-lg bg-black`}):"file"===G?/* @__PURE__ */N("div",{onClick:D,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
-
/* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
-
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:H}),A?/* @__PURE__ */v(c,{size:"sm",onClick:()=>A(X),children:L.openFile}):/* @__PURE__ */v("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:L.openFile})]}):/* @__PURE__ */v(t,{src:X.url,alt:H,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
-
/* @__PURE__ */N("div",{ref:$,...o({role:"dialog",modal:!0,label:L.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:F,children:[Q,
|
|
5
|
-
/* @__PURE__ */N("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:D,children:[
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:L.counter(I+1,Z)}),
|
|
7
|
-
/* @__PURE__ */v("button",{ref:z,type:"button",onClick:F,"aria-label":L.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),Z>1&&/* @__PURE__ */N(w,{children:[
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),W(-1)},"aria-label":L.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),W(1)},"aria-label":L.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
-
/* @__PURE__ */N("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:D,children:[
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:H}),"file"!==G&&/* @__PURE__ */v("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:L.openOriginal})]})]}),document.body)}export{F as ImageLightbox,j as lightboxKind};
|