efficient-shell 10.16.0 → 10.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-RI5X7GMK.js → Browser-Q5BYSSW3.js} +14 -14
- package/dist/Calculator-6NJNSIRN.js +29 -0
- package/dist/{CurrencyConverter-2GUEE7ZR.js → CurrencyConverter-42IHLJVV.js} +8 -8
- package/dist/{Documents-GI346UL5.js → Documents-GGEPMWB5.js} +21 -21
- package/dist/Files-OVNXUYOV.js +88 -0
- package/dist/{Notepad-HRZKLHO3.js → Notepad-L2LOWTSE.js} +10 -10
- package/dist/{PdfViewer-LU5JKHSG.js → PdfViewer-Y3SAVADX.js} +1 -1
- package/dist/{PomodoroTimer-QYCTTTPZ.js → PomodoroTimer-PD7POYX5.js} +68 -68
- package/dist/{Preview-LSGN5GN7.js → Preview-HM2Z3EJO.js} +25 -25
- package/dist/Sidebar-2HHICMZZ.js +44 -0
- package/dist/{Spreadsheet-7JBZY6KJ.js → Spreadsheet-2E4TQ64O.js} +13 -13
- package/dist/{Stock-ZVQT25IE.js → Stock-IABQRSXZ.js} +3 -3
- package/dist/{Weather-RAUDLLVU.js → Weather-4QPYOENN.js} +22 -22
- package/dist/{WorldClock-2XBWZ6SZ.js → WorldClock-3ZVRBLEW.js} +6 -6
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +80 -80
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.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/StatTile.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-W6URVLQF.js → chunk-22RQC4EW.js} +14 -14
- package/dist/chunk-26RTJKHD.js +2 -0
- package/dist/{chunk-F2R3UFNQ.js → chunk-2E2SUEEE.js} +1 -1
- package/dist/chunk-2H6YNMBE.js +14 -0
- package/dist/{chunk-7HTRLRVO.js → chunk-2YSGXZOL.js} +50 -50
- package/dist/{chunk-M22B3Y5Y.js → chunk-3IUPYCW3.js} +1 -1
- package/dist/{chunk-JGTGQGHY.js → chunk-3PR5YMWZ.js} +1 -1
- package/dist/{chunk-MNSKGMVZ.js → chunk-3UXXA2CS.js} +8 -8
- package/dist/{chunk-XDBG4HPV.js → chunk-4EZIWLJJ.js} +1 -1
- package/dist/{chunk-E3753CWP.js → chunk-4HBSQGRI.js} +1 -1
- package/dist/{chunk-EZEYKCI6.js → chunk-4ULRP4Y4.js} +1 -1
- package/dist/{chunk-LDE5IV2M.js → chunk-54NMFQMW.js} +4 -4
- package/dist/{chunk-DRDYZ633.js → chunk-5QGBVTGS.js} +2 -2
- package/dist/{chunk-57HN6MPC.js → chunk-5SIOCKCK.js} +2 -2
- package/dist/{chunk-ISJPW2FZ.js → chunk-5TDQPZDB.js} +10 -10
- package/dist/chunk-5TQLUPZD.js +6 -0
- package/dist/{chunk-D7F442OZ.js → chunk-5WYRAJ5F.js} +1 -1
- package/dist/chunk-67MQ5S32.js +8 -0
- package/dist/chunk-6JSXIEH2.js +4 -0
- package/dist/{chunk-ULXCDM7Y.js → chunk-6V4INP7J.js} +10 -10
- package/dist/{chunk-7NBSBGLX.js → chunk-77AQNJE2.js} +8 -8
- package/dist/{chunk-Y3R267FV.js → chunk-77MOYIQW.js} +10 -10
- package/dist/{chunk-AKM6JBMD.js → chunk-7ELJQL7J.js} +1 -1
- package/dist/chunk-7INZ7O3A.js +5 -0
- package/dist/{chunk-UPQW4GCT.js → chunk-7TZV6G2F.js} +1 -1
- package/dist/{chunk-X6BFVDB4.js → chunk-7VBXIIEC.js} +2 -2
- package/dist/{chunk-UWIZX3RK.js → chunk-A42MKJA3.js} +1 -1
- package/dist/{chunk-DKGZPVLL.js → chunk-AFYLVV74.js} +1 -1
- package/dist/{chunk-H4HB5OET.js → chunk-AWKJZSTO.js} +1 -1
- package/dist/{chunk-H32EQG5Z.js → chunk-AYDW63LV.js} +9 -9
- package/dist/chunk-B23RG53S.js +14 -0
- package/dist/chunk-B3CN55UI.js +2 -0
- package/dist/{chunk-CPZ42W2B.js → chunk-C6Y7B73Q.js} +1 -1
- package/dist/{chunk-QP4UPCXQ.js → chunk-C764JODK.js} +1 -1
- package/dist/{chunk-LEDUD23S.js → chunk-CLTRQ7AQ.js} +1 -1
- package/dist/chunk-CUHUZBFH.js +29 -0
- package/dist/chunk-CXYHFGUY.js +9 -0
- package/dist/{chunk-TM33D3CE.js → chunk-DCRLJMQ6.js} +1 -1
- package/dist/{chunk-AOK3BHRT.js → chunk-DGZAQXTW.js} +4 -4
- package/dist/{chunk-UYRITNQW.js → chunk-DHIQ46C5.js} +1 -1
- package/dist/{chunk-IOJNSX4N.js → chunk-DQQKG46I.js} +7 -7
- package/dist/chunk-DYNJ2H6R.js +8 -0
- package/dist/{chunk-INNIWRVU.js → chunk-E6GDAV5R.js} +2 -2
- package/dist/{chunk-N3TOHWFF.js → chunk-ECJKIPWU.js} +1 -1
- package/dist/chunk-EJUNGVK2.js +22 -0
- package/dist/{chunk-3EJ64VKE.js → chunk-EN5NXWT6.js} +1 -1
- package/dist/{chunk-MCDM2G4W.js → chunk-EOWUUOVE.js} +1 -1
- package/dist/{chunk-7TNAOZZ2.js → chunk-EPY34L26.js} +1 -1
- package/dist/{chunk-PVZGSCCB.js → chunk-FACWYKL6.js} +6 -6
- package/dist/{chunk-6AS5PHHK.js → chunk-FKRPQDFX.js} +17 -17
- package/dist/{chunk-QHOBK35Y.js → chunk-FOFZI62F.js} +1 -1
- package/dist/{chunk-7ZP64SC7.js → chunk-FS6EOU4G.js} +1 -1
- package/dist/chunk-GDQJBQ5B.js +1 -0
- package/dist/{chunk-YOSUCCHG.js → chunk-GEP4FROW.js} +3 -3
- package/dist/chunk-HJCUDXLV.js +1 -0
- package/dist/{chunk-S6FBMSFU.js → chunk-HJW67KA7.js} +2 -2
- package/dist/{chunk-7X5FABQS.js → chunk-HV47GP2C.js} +1 -1
- package/dist/{chunk-74OUAR6L.js → chunk-I33SVQ7P.js} +6 -6
- package/dist/{chunk-KJ4CBZEQ.js → chunk-IMDGMUE3.js} +1 -1
- package/dist/{chunk-HNBGLF4B.js → chunk-JFV5CQN4.js} +1 -1
- package/dist/{chunk-7MSC3Z5H.js → chunk-JH4ZCPHW.js} +8 -8
- package/dist/chunk-JIGFR7Z3.js +11 -0
- package/dist/chunk-JNQKBN5M.js +7 -0
- package/dist/{chunk-OOLPDASG.js → chunk-JSG2AKCG.js} +1 -1
- package/dist/{chunk-6RX4PVBU.js → chunk-JTMEFXRL.js} +1 -1
- package/dist/{chunk-4QJOEHM6.js → chunk-JYIH2EBG.js} +1 -1
- package/dist/chunk-K4JQ3FQI.js +2 -0
- package/dist/{chunk-ULAGXDOL.js → chunk-LXL2UCUR.js} +1 -1
- package/dist/{chunk-I2XGPTCN.js → chunk-LYHJHUQH.js} +1 -1
- package/dist/{chunk-JSGQWVYH.js → chunk-MJGK6QTO.js} +7 -7
- package/dist/{chunk-PYAJCN2Q.js → chunk-MNNZGO2E.js} +1 -1
- package/dist/{chunk-XTCXX5LJ.js → chunk-MS5APD3V.js} +1 -1
- package/dist/chunk-MUXGWDEH.js +2 -0
- package/dist/{chunk-PCFBDXLN.js → chunk-N6CS2FO2.js} +1 -1
- package/dist/{chunk-2SY76NFO.js → chunk-NFB7PARJ.js} +4 -4
- package/dist/{chunk-K4ANB6AF.js → chunk-NNZFC4O7.js} +1 -1
- package/dist/{chunk-MHB52H2Y.js → chunk-NU5HN3FZ.js} +12 -12
- package/dist/{chunk-QYSEYYV7.js → chunk-NVD4AI5Y.js} +1 -1
- package/dist/{chunk-AJO72CPB.js → chunk-O47HKK6E.js} +2 -2
- package/dist/{chunk-BJXDOM2N.js → chunk-OBJGUJIE.js} +1 -1
- package/dist/{chunk-AUWTGM65.js → chunk-OH5L6HYW.js} +3 -3
- package/dist/{chunk-WINNA7LS.js → chunk-OORL6BIG.js} +1 -1
- package/dist/{chunk-KTA77U3P.js → chunk-OP5DOO3K.js} +4 -4
- package/dist/{chunk-ZURB2DCM.js → chunk-OPN4I565.js} +1 -1
- package/dist/{chunk-7SMV6G4Z.js → chunk-ORIXCEKO.js} +1 -1
- package/dist/{chunk-TOVKWNI2.js → chunk-P3RXXWXN.js} +6 -6
- package/dist/{chunk-ON67HF5K.js → chunk-PCTOL2FX.js} +8 -8
- package/dist/{chunk-XZGGJHJC.js → chunk-PLK2WHZG.js} +17 -17
- package/dist/{chunk-QDQ347RL.js → chunk-PW52RXPI.js} +1 -1
- package/dist/chunk-QDKAA3HR.js +2 -0
- package/dist/chunk-QHPVAXHR.js +6 -0
- package/dist/chunk-QO5E33DH.js +8 -0
- package/dist/{chunk-7HLC352T.js → chunk-QRYSL6QU.js} +16 -16
- package/dist/{chunk-LPXMHYTM.js → chunk-QVZKRROQ.js} +1 -1
- package/dist/{chunk-EXJXOKUU.js → chunk-QYL26AB4.js} +1 -1
- package/dist/{chunk-SDQIXE5M.js → chunk-RBBIAIPH.js} +8 -8
- package/dist/{chunk-TVH7IZQ4.js → chunk-REWKL7MX.js} +2 -2
- package/dist/{chunk-L4IW77TD.js → chunk-RT4WOEVS.js} +4 -4
- package/dist/{chunk-SG4LO2AN.js → chunk-RUGQO7YF.js} +11 -11
- package/dist/{chunk-MTEFYFUO.js → chunk-RVRDDTEG.js} +1 -1
- package/dist/{chunk-D4I3U7UE.js → chunk-RXCGE2AY.js} +1 -1
- package/dist/{chunk-UDRMZ22J.js → chunk-S74LKSUB.js} +1 -1
- package/dist/{chunk-QYRMFGES.js → chunk-SAP4YI2Y.js} +1 -1
- package/dist/{chunk-CKKUFDZ3.js → chunk-SDDV3UCN.js} +18 -18
- package/dist/{chunk-KEPJWZJZ.js → chunk-SL77N7VT.js} +3 -3
- package/dist/chunk-SLU45G5J.js +19 -0
- package/dist/{chunk-5RE6R3XC.js → chunk-SXNQHIBY.js} +1 -1
- package/dist/{chunk-GGK27H67.js → chunk-TGGUYAWA.js} +1 -1
- package/dist/chunk-TGXO3CDO.js +2 -0
- package/dist/chunk-TLMFVEMC.js +9 -0
- package/dist/{chunk-MQU3PZUS.js → chunk-TMMNCXQT.js} +1 -1
- package/dist/{chunk-CQV3VSI2.js → chunk-UDKTAG57.js} +1 -1
- package/dist/{chunk-UTWJKSET.js → chunk-UEISJFZH.js} +5 -5
- package/dist/{chunk-CBEKJTXU.js → chunk-UYRMW5MO.js} +5 -5
- package/dist/{chunk-RLJHRDDW.js → chunk-V6Y4OC6K.js} +8 -8
- package/dist/{chunk-W5CJD54C.js → chunk-VAK5FQXH.js} +1 -1
- package/dist/{chunk-WB4P4QE2.js → chunk-VDUXPMOQ.js} +1 -1
- package/dist/{chunk-O7DW2BKY.js → chunk-VHF3CJVO.js} +28 -28
- package/dist/{chunk-KTVXPGGB.js → chunk-VIQ6OME2.js} +8 -8
- package/dist/{chunk-7UTPXU6K.js → chunk-VN4KSRZ5.js} +1 -1
- package/dist/{chunk-RPYFOQM2.js → chunk-VQCSHJEF.js} +2 -2
- package/dist/chunk-VWIYC2NB.js +13 -0
- package/dist/chunk-WRQ4A5QY.js +1 -0
- package/dist/{chunk-3LDXURVU.js → chunk-WTYQF7XJ.js} +2 -2
- package/dist/{chunk-GPJO34QP.js → chunk-WYFMSL4Q.js} +8 -8
- package/dist/{chunk-FEQDZTZ7.js → chunk-XCHAU2UN.js} +6 -6
- package/dist/chunk-XGJQVIEG.js +2 -0
- package/dist/{chunk-VTFZ6W2D.js → chunk-XLWMM53L.js} +1 -1
- package/dist/{chunk-VKKK4WLS.js → chunk-XQZL6JDD.js} +6 -6
- package/dist/{chunk-JEH5EVIG.js → chunk-XSJHN2GD.js} +1 -1
- package/dist/{chunk-BNJWZAQE.js → chunk-XYBI57KO.js} +12 -12
- package/dist/{chunk-3AH524CN.js → chunk-XYECIBVX.js} +1 -1
- package/dist/{chunk-LO5T2K4B.js → chunk-Y62TTKSY.js} +3 -3
- package/dist/{chunk-6C6TRDNI.js → chunk-YG2TWBDH.js} +1 -1
- package/dist/{chunk-SHKBDFSE.js → chunk-YILGAEW3.js} +1 -1
- package/dist/chunk-YJ5IHIAI.js +2 -0
- package/dist/{chunk-FWVC4A2O.js → chunk-YJXS7BR5.js} +1 -1
- package/dist/{chunk-NBVHJZVS.js → chunk-YQFGRYEF.js} +12 -12
- package/dist/{chunk-4G2C6J4I.js → chunk-YSDPFDAG.js} +1 -1
- package/dist/{chunk-B7UCXROE.js → chunk-Z5A4EY2R.js} +1 -1
- package/dist/{chunk-ZW3IDCP2.js → chunk-ZGOHRLXG.js} +1 -1
- package/dist/{chunk-5UYZ75F3.js → chunk-ZHAWOZA7.js} +11 -11
- package/dist/{chunk-IKNG7EFQ.js → chunk-ZQKA2XKH.js} +8 -8
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/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/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.d.ts +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/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +2 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +4 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +2 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/SeparatorSlashIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorSlashIcon.js +1 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/SeparatorSlashMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +172 -172
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +7 -7
- package/dist/{names-Bmx_9y41.d.ts → names-CkQuQ47O.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.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/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-Y566OMJZ.js +0 -29
- package/dist/Files-UA23KXN7.js +0 -88
- package/dist/Sidebar-2P26444H.js +0 -44
- package/dist/chunk-2JG5JU4M.js +0 -8
- package/dist/chunk-4PAWQEXM.js +0 -1
- package/dist/chunk-7XYTJPWW.js +0 -29
- package/dist/chunk-COJYPNKF.js +0 -2
- package/dist/chunk-DWR7MYQU.js +0 -7
- package/dist/chunk-EU3JZGV2.js +0 -14
- package/dist/chunk-JJW43QPS.js +0 -9
- package/dist/chunk-LCJRTJXT.js +0 -13
- package/dist/chunk-LU6NA4RU.js +0 -5
- package/dist/chunk-M4K6FLIY.js +0 -1
- package/dist/chunk-PJQGYKN6.js +0 -11
- package/dist/chunk-PN65IIYN.js +0 -8
- package/dist/chunk-Q6YNMNUH.js +0 -6
- package/dist/chunk-RCPFUDPS.js +0 -4
- package/dist/chunk-RRUHQLUY.js +0 -14
- package/dist/chunk-TMNAHOJ7.js +0 -9
- package/dist/chunk-UBMY23AG.js +0 -6
- package/dist/chunk-VNACNNCJ.js +0 -19
- package/dist/chunk-W35N7SL3.js +0 -8
- package/dist/chunk-W4OBVKN4.js +0 -1
- package/dist/chunk-WMEYNKXZ.js +0 -22
- package/dist/chunk-ZZVE64OI.js +0 -2
- /package/dist/{chunk-6V6ANLHW.js → chunk-Y2AGVGOP.js} +0 -0
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-
|
|
1
|
+
import{toast_default as e}from"./chunk-7ELJQL7J.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{forwardRef as n,useRef as r,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var u=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],h=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),x=n(function({src:n,filename:x,onApply:m,onCancel:g},N){const L=r(null),z=r(null),D=r(null),E=r(null),P=t().annotator,$=r(P);$.current=P;const[I,S]=o("select"),[W,B]=o(u[0]),[R,j]=o(4),[H,F]=o(24),[T,U]=o(h[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,G]=o(!1),[J,Q]=o(null),[X,q]=o(null),[Y,_]=o(6),[ee,te]=o(12),[ne,re]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,ue]=o(1),[he,pe]=o(null),[xe,ye]=o(null),[me,ge]=o(null),fe=r(null),[we,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>ne.find(e=>e.id===oe)??null,[ne,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(F(Me.size),U(Me.font),O(Me.bold),V(Me.italic),G(Me.underline),Q(Me.borderColor),q(Me.background),_(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{E.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),re([]),ie(null)},t.onerror=()=>e.error($.current.loadFailed),t.src=n},[n]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),n=Math.max(0,t.width-32),r=Math.max(0,t.height-32);if(0===n||0===r)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>n&&(i=n,a=i/o),a>r&&(a=r,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>ne.filter(e=>"mosaic"===e.type),[ne]);a(()=>{const e=E.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const n=t.getContext("2d");n.drawImage(e,0,0);for(const e of Ne)C(n,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;const r=t.getScreenCTM();if(!r)return{x:0,y:0};const o=n.matrixTransform(r.inverse());return{x:o.x,y:o.y}},Le=e=>{fe.current=e,be(!0)};a(()=>{if(!we)return;const e=e=>{const t=fe.current;if(!t)return;const n=Ce(e);if("draw"===t.kind)pe(b(I,t.start,n,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(n.x-e.x)>1||Math.abs(n.y-e.y)>1)&&(t.points.push(n),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,n));else if("move"===t.kind){const e=n.x-t.start.x,r=n.y-t.start.y;re(n=>n.map(n=>n.id===t.id?v(t.original,e,r):n))}else"resize"===t.kind&&re(e=>e.map(e=>e.id===t.id?function(e,t,n){if("arrow"===e.type)return"start"===t?{...e,x1:n.x,y1:n.y}:"end"===t?{...e,x2:n.x,y2:n.y}:e;if("text"===e.type||"draw"===e.type)return e;const r=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=r,c=i,s=o,d=a;"nw"===t&&(l=n.x,c=n.y);"ne"===t&&(s=n.x,c=n.y);"se"===t&&(s=n.x,d=n.y);"sw"===t&&(l=n.x,d=n.y);const u=M({x:l,y:c},{x:s,y:d});return{...e,x:u.x,y:u.y,w:u.w,h:u.h}}(t.original,t.corner,n):e))},t=()=>{const e=fe.current;if(fe.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const n={...e,id:p()};return re(e=>[...e,n]),ie(n.id),S("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};re(e=>[...e,t]),ie(t.id),S("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[we,I,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),re(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),re(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&G(t),oe&&re(n=>n.map(n=>n.id===oe&&"text"===n.type?{...n,[e]:t}:n))},De=e=>{Q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Ee=e=>{q(e),oe&&re(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},Pe=e=>{if(!xe)return;const t=e??xe.value;if(!t.trim())return xe.editingId&&re(e=>e.filter(e=>e.id!==xe.editingId)),void ye(null);if(xe.editingId)re(e=>e.map(e=>e.id===xe.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:xe.x,y:xe.y,text:t,color:W,size:H,font:T,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y};re(t=>[...t,e]),ie(e.id),S("select")}ye(null)},$e=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const r=n.getContext("2d");r.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),r.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),n};l(N,()=>({save:async()=>{const t=await $e();t&&t.toBlob(t=>{if(!t)return void e.error($.current.exportFailed);const n=URL.createObjectURL(t),r=document.createElement("a");r.href=n;const o=x.replace(/\.[^.]+$/,"");r.download=`${o}-annotated.png`,r.click(),URL.revokeObjectURL(n)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error($.current.clipboardUnsupported);const t=await $e();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success($.current.copied)}catch{e.error($.current.copyRefused)}else e.error($.current.copyFailed)},"image/png")}}),[ae,x]);const Ie=i(()=>[{id:"select",label:P.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:P.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:P.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:P.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:P.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:P.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:P.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:P.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[P]),Se=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),We=Me?.type??("select"===I?null:I),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
|
|
2
2
|
return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
3
|
-
/* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{
|
|
3
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{S(e.id),ie(null)},title:e.label,className:Se(I===e.id),children:e.icon},e.id)),
|
|
4
4
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
5
|
-
/* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(
|
|
5
|
+
/* @__PURE__ */c("div",{className:"flex items-center gap-1",children:u.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&re(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(W===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
|
|
6
6
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
7
7
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
8
|
-
/* @__PURE__ */c("span",{children:
|
|
8
|
+
/* @__PURE__ */c("span",{children:P.weight}),
|
|
9
9
|
/* @__PURE__ */c("input",{type:"range",min:1,max:20,step:1,value:R,onChange:e=>{return t=Number(e.target.value),j(t),void(oe&&re(e=>e.map(e=>e.id!==oe?e:"rect"===e.type||"circle"===e.type||"arrow"===e.type||"draw"===e.type?{...e,stroke:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
10
10
|
/* @__PURE__ */c("span",{className:"tabular-nums w-5 text-right",children:R})]})]}),Re&&/* @__PURE__ */s(d,{children:[
|
|
11
11
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
12
12
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
13
|
-
/* @__PURE__ */c("span",{children:
|
|
13
|
+
/* @__PURE__ */c("span",{children:P.radius}),
|
|
14
14
|
/* @__PURE__ */c("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
15
15
|
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */s(d,{children:[
|
|
16
16
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
17
|
-
/* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,
|
|
18
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:
|
|
19
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:
|
|
20
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:
|
|
17
|
+
/* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,U(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:h.map(e=>/* @__PURE__ */c("option",{value:e.id,children:P[e.name]},e.id))}),
|
|
18
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:Se(A),title:P.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:P.boldLetter})}),
|
|
19
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:Se(K),title:P.italic,children:/* @__PURE__ */c("span",{className:"italic",children:P.italicLetter})}),
|
|
20
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:Se(Z),title:P.underline,children:/* @__PURE__ */c("span",{className:"underline",children:P.underlineLetter})}),
|
|
21
21
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
22
|
-
/* @__PURE__ */c("span",{children:
|
|
22
|
+
/* @__PURE__ */c("span",{children:P.size}),
|
|
23
23
|
/* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:H,onChange:e=>{return t=Number(e.target.value),F(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
24
24
|
/* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:H})]}),
|
|
25
25
|
/* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
26
|
-
/* @__PURE__ */c("span",{children:
|
|
27
|
-
/* @__PURE__ */c("input",{type:"color",value:
|
|
28
|
-
/* @__PURE__ */c("button",{onClick:()=>De(null),title:
|
|
26
|
+
/* @__PURE__ */c("span",{children:P.border}),J?/* @__PURE__ */s(d,{children:[
|
|
27
|
+
/* @__PURE__ */c("input",{type:"color",value:J,onChange:e=>De(e.target.value),title:P.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
|
|
28
|
+
/* @__PURE__ */c("button",{onClick:()=>De(null),title:P.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(W),title:P.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
|
|
29
29
|
/* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
30
|
-
/* @__PURE__ */c("span",{children:
|
|
31
|
-
/* @__PURE__ */c("input",{type:"color",value:
|
|
32
|
-
/* @__PURE__ */c("button",{onClick:()=>
|
|
30
|
+
/* @__PURE__ */c("span",{children:P.fill}),X?/* @__PURE__ */s(d,{children:[
|
|
31
|
+
/* @__PURE__ */c("input",{type:"color",value:X,onChange:e=>Ee(e.target.value),title:P.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
|
|
32
|
+
/* @__PURE__ */c("button",{onClick:()=>Ee(null),title:P.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Ee("#ffffff"),title:P.addFill,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:P.add})]}),
|
|
33
33
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
34
|
-
/* @__PURE__ */c("span",{children:
|
|
35
|
-
/* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:
|
|
36
|
-
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:
|
|
34
|
+
/* @__PURE__ */c("span",{children:P.padding}),
|
|
35
|
+
/* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:Y,onChange:e=>{return t=Number(e.target.value),_(t),void(oe&&re(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
|
|
36
|
+
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:Y})]})]}),
|
|
37
37
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
38
|
-
/* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:
|
|
38
|
+
/* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomOut,children:"−"}),
|
|
39
39
|
/* @__PURE__ */s("span",{className:"text-gray-600 tabular-nums w-10 text-center",children:[Math.round(100*de),"%"]}),
|
|
40
|
-
/* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:
|
|
41
|
-
/* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:
|
|
40
|
+
/* @__PURE__ */c("button",{onClick:()=>ue(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomIn,children:"+"}),
|
|
41
|
+
/* @__PURE__ */c("button",{onClick:()=>ue(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.fitHint,children:P.fit}),
|
|
42
42
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
43
|
-
/* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:
|
|
43
|
+
/* @__PURE__ */c("button",{onClick:()=>{re(e=>e.slice(0,-1)),ie(null)},disabled:0===ne.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:P.undo}),
|
|
44
44
|
/* @__PURE__ */s("div",{className:"ml-auto flex items-center gap-2",children:[me&&/* @__PURE__ */s(d,{children:[
|
|
45
|
-
/* @__PURE__ */c("button",{onClick:()=>{if(!me||!
|
|
46
|
-
/* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:
|
|
47
|
-
/* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:
|
|
45
|
+
/* @__PURE__ */c("button",{onClick:()=>{if(!me||!E.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const n=t.getContext("2d"),r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const o=r.getContext("2d");o.drawImage(E.current,0,0);for(const e of Ne)C(o,e);n.drawImage(r,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{E.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),re(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,n){const r=k(e);return r.x+r.w>0&&r.y+r.h>0&&r.x<t&&r.y<n}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:P.applyCrop}),
|
|
46
|
+
/* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:P.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:P.cancel}),
|
|
47
|
+
/* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:P.apply})]})]})]}),
|
|
48
48
|
/* @__PURE__ */c("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:ve&&ae&&/* @__PURE__ */s("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:ve.w,height:ve.h},children:[
|
|
49
49
|
/* @__PURE__ */c("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
|
|
50
|
-
/* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void
|
|
51
|
-
/* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?
|
|
50
|
+
/* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(xe)return void Pe();const t=Ce(e);return void ye({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(b(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[ne.map(e=>/* @__PURE__ */c(y,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&ye({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,n)=>((e,t,n)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:n,start:Ce(e),original:t})})(t,e,n)},e.id)),he&&/* @__PURE__ */c(y,{anno:{...he,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(f,{rect:me,imageSize:ae})]}),xe&&/* @__PURE__ */c(w,{pendingText:xe,color:W,size:H,font:h.find(e=>e.id===T)?.css??h[0].css,bold:A,italic:K,underline:Z,borderColor:J,background:X,padding:Y,scale:ke,onChange:e=>ye({...xe,value:e}),onCommit:Pe,onCancel:()=>ye(null)})]})}),
|
|
51
|
+
/* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?P.hintSelected:P.hintSelect:"text"===I?P.hintText:"crop"===I?P.hintCrop:"draw"===I?P.hintDraw:P.hintShape})]})});function y({anno:e,selected:t,preview:n,zoom:r=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),u=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let x;if("rect"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("circle"===e.type)x=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...u});else if("arrow"===e.type)x=/* @__PURE__ */c(g,{anno:e,interactive:u});else if("draw"===e.type)x=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...u});else if("mosaic"===e.type)x=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...u});else{const t=h.find(t=>t.id===e.font)?.css??h[0].css,n=e.padding??0,r=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;x=/* @__PURE__ */s("g",{...u,...p,children:[r&&/* @__PURE__ */c("rect",{x:o.x-n,y:o.y-n,width:Math.max(0,o.w)+2*n,height:Math.max(0,o.h)+2*n,rx:Math.min(8,n),ry:Math.min(8,n),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
|
|
52
52
|
/* @__PURE__ */c("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,n)=>/* @__PURE__ */c("tspan",{x:e.x,dy:0===n?0:1.2*e.size,children:t},n))})]})}/* @__PURE__ */
|
|
53
53
|
return s("g",{children:[x,t&&!n&&/* @__PURE__ */s(d,{children:[
|
|
54
54
|
/* @__PURE__ */c("rect",{"data-chrome":"selection",x:l.x-4,y:l.y-4,width:l.w+8,height:l.h+8,fill:"none",stroke:"#3b82f6",strokeWidth:2/r,strokeDasharray:`${6/r},${4/r}`,pointerEvents:"none"}),a&&/* @__PURE__ */c(m,{anno:e,zoom:r,onHandlePointerDown:a})]})]})}function m({anno:e,zoom:t,onHandlePointerDown:n}){const r=6/t,o=1.5/t,i=e=>({fill:"#fff",stroke:"#3b82f6",strokeWidth:o,pointerEvents:"all",style:{cursor:e},"data-chrome":"handle"});if("arrow"===e.type)/* @__PURE__ */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-Z5A4EY2R.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-I4VIEGCX.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.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-GDQJBQ5B.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 w,Fragment as N}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)]",U=e=>e.stopPropagation();function A({images:r,startIndex:y=0,onClose:A,onIndexChange:D,onOpenFile:I}){const L=h().lightbox,$=d(),z=p(null),G=p(null),[J,Q]=x(y),B=r.length,E=$&&B>0,F=b(e=>{if(B<2)return;const t=((J+e)%B+B)%B;Q(t),D?.(t)},[J,B,D]);if(a(E),l(z,E,G),i(E),k(()=>{if(E)return f(()=>(A(),!0),()=>z.current)},[E,A]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),F("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,F]),!E)return null;const P=r[Math.min(J,B-1)],W=j(P),Y=P.caption||n(P.url);let O;return O="video"===W?/* @__PURE__ */v("video",{src:P.url,controls:!0,playsInline:!0,"aria-label":Y,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===W?/* @__PURE__ */w("div",{onClick:U,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
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:
|
|
4
|
-
/* @__PURE__ */w("div",{ref:
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Y}),I?/* @__PURE__ */v(c,{size:"sm",onClick:()=>I(P),children:L.openFile}):/* @__PURE__ */v("a",{href:P.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:L.openFile})]}):/* @__PURE__ */v(t,{src:P.url,alt:Y,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:z,...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:A,children:[O,
|
|
5
5
|
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children
|
|
7
|
-
/* @__PURE__ */v("button",{ref:
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:L.counter(J+1,B)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:G,type:"button",onClick:A,"aria-label":L.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),B>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),F(-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=>{U(e),F(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
10
|
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:Y}),"file"!==W&&/* @__PURE__ */v("a",{href:P.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{A as ImageLightbox,j as lightboxKind};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-34URULVW.js";import{Icon as a}from"./chunk-2UO47XB4.js";import{OneLineLabel as o}from"./chunk-MVZRZTQP.js";import{Tooltip as s}from"./chunk-6XBWM453.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{swallowPress as e,describedByWith as i,OffWithReason as r}from"./chunk-34URULVW.js";import{Icon as a}from"./chunk-2UO47XB4.js";import{OneLineLabel as o}from"./chunk-MVZRZTQP.js";import{Tooltip as s}from"./chunk-6XBWM453.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useId as l,Fragment as d}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";function b({items:b,onChange:h,label:m,className:u="","aria-labelledby":f,"aria-describedby":p}){const w=n().displayChips,g=l();/* @__PURE__ */
|
|
2
2
|
return t("div",{role:"group","aria-label":f?void 0:m,"aria-labelledby":f,"aria-describedby":p,className:`flex flex-wrap gap-2 ${u}`.trim(),children:b.map((n,l)=>{const b=`${g}-${l}-state`,m=`${g}-${l}-reason`,u=Boolean(n.disabled)&&null!=n.disabledReason&&""!==n.disabledReason,f=/* @__PURE__ */c("button",{type:"button","aria-pressed":n.shown,disabled:!(!n.disabled||u)||void 0,"aria-disabled":!!u||void 0,"aria-describedby":i(b,u?m:void 0),onClick:u?e:()=>h(n.id,!n.shown),className:"inline-flex h-6 max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border pl-2 pr-3 text-xs font-medium transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-disabled:cursor-not-allowed aria-disabled:opacity-60 "+(n.shown?"border-blue-200 bg-accent-tint text-blue-700 hover:bg-blue-100":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink-strongest"),children:[
|
|
3
3
|
/* @__PURE__ */t(a,{name:n.shown?"eye":"eye-off",className:"h-4 w-4 shrink-0",strokeWidth:"1.75"}),
|
|
4
4
|
/* @__PURE__ */t(o,{children:n.label})]}),p=/* @__PURE__ */t("span",{id:b,className:"sr-only",children:n.shown?w.shown:w.hidden});/* @__PURE__ */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-G4GVLK44.js";import{CartesianPlot as t}from"./chunk-
|
|
2
|
-
return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{ChartTooltip as l}from"./chunk-G4GVLK44.js";import{CartesianPlot as t}from"./chunk-QO5E33DH.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-GDQJBQ5B.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:L,label:v,className:M,emptyLabel:O,radius:Q=3}){const N=o().charts,V=n(),A=w??(e=>h(e,V)),C=v??N.range,F=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),G=r(0,j,L);/* @__PURE__ */
|
|
2
|
+
return s(t,{labels:d,values:F,height:k,width:g,max:b,min:x,formatValue:A,yAxisLabel:y,className:M,emptyLabel:O,bandPadding:"bar"===p?.34:0,ariaLabel:N.rangeLabel(C,d.length),tooltip:e=>/* @__PURE__ */s(l,{title:d[e],rows:[{key:"high",label:N.high,color:G,value:null==u[e]?void 0:A(u[e].high)},{key:"low",label:N.low,color:G,value:null==u[e]?void 0:A(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:Q,fill:G,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
3
|
return m(c,{children:[
|
|
4
4
|
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:G,fillOpacity:.2,stroke:"none"}),
|
|
5
5
|
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:G,strokeWidth:2,strokeLinejoin:"round"}),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-G4GVLK44.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:$,formatValue:j,centerLabel:I,animate:w=!0,labels:F="none",labelMinShare:P=.04,className:S,emptyLabel:A}){const C=h().charts,R=c(),W=j??(e=>u(e,R)),z=$??C.other,B=A??C.nothingToBreakDown,E=d(),[L,T]=f(null),{highlighted:V}=a(),_=y(null),Q=o(_,Number.POSITIVE_INFINITY),U=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===U.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${S??""}`,children:B});const Y=[...U].sort((e,t)=>t.value-e.value),G=Y.slice(0,N),O=Y.slice(N),D=O.length>0?[...G,{key:"__other__",label:z,value:O.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:G,H=e=>i(e.slot,e.color,e.tone),J=D.reduce((e,t)=>e+t.value,0),Z=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,q="outside"===F&&Q>=120+2*Z,K=q?Z:0,X=q?Math.max(120,Math.min(k,Q-2*K)):k,ee=X+2*K,te=K+X/2,le=X/2,ae=X/2-12,re=M??("ring"===v?.58*ae:0),ne=n(D.length,b),oe=Math.max(...D.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!q)return[];let e=-Math.PI/2;const t=D.map((t,l)=>{const a="rose"===v?n(D.length,b).step:t.value/J*Math.PI*2,r="rose"===v?n(D.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/J,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=P),l=Math.max(1,Math.floor((X-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?X-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==L?L!==e:null!==V&&V!==t,me=null!==L?D[L]:void 0;/* @__PURE__ */
|
|
2
|
+
return g("div",{className:`relative ${S??""}`,ref:_,children:[
|
|
3
|
+
/* @__PURE__ */g("svg",{width:"100%",height:X,viewBox:`0 0 ${ee} ${X}`,role:"img","aria-labelledby":E,onMouseLeave:()=>T(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:E,children:C.breakdown(W(J),D.length)}),D.map((a,r)=>{const n=H(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/J*Math.PI*2-b;"rose"!==v&&(ie+=a.value/J*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
+
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:w?t.sweep:void 0,style:w?l(r,55):void 0,onMouseEnter:()=>T(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
|
+
return g("g",{children:[
|
|
7
|
+
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
+
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==L&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:C.value,color:H(me),value:W(me.value)},{key:"share",label:C.share,color:s.muted,value:m(me.value/J*100,1,R)}]})}),
|
|
10
|
+
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:D.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
|
+
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:H(e)}}),
|
|
12
|
+
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/J*100,1,R)})]},e.key))})]})}export{x as PieChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="10.17.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ColorPicker as e}from"./chunk-
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[
|
|
1
|
+
import{ColorPicker as e}from"./chunk-ZHAWOZA7.js";import{InputNumber_default as t}from"./chunk-5SIOCKCK.js";import{Segmented as l}from"./chunk-3ELLBQPS.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,l,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(t,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":l})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,z=null===O&&C.some(e=>null!==e),A=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",B=e=>S(e)??("number"==typeof d.width?d.width:null),E=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,B("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,B("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,B("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,B("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,z?"–":A,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(l,{block:!0,size:"sm",label:b.style,value:E,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
4
|
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(e,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-3PR5YMWZ.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-2UO47XB4.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),B=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),L=n(()=>B.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[B,M]),Y=n(()=>L.flatMap(e=>e.docs),[L]),A=(w?Y.find(e=>e.slug===w):void 0)??Y[0]??null,E=e=>!!M||(C[e]??e===A?.category);/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
|
6
6
|
/* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
8
|
/* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===
|
|
9
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===L.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):L.map(e=>{const t=E(e.key);/* @__PURE__ */
|
|
10
10
|
return i("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!E(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */o(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=A?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:A?/* @__PURE__ */i(c,{children:[
|
|
17
17
|
/* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */i("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(
|
|
19
|
+
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:A.title}),
|
|
20
|
+
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[A.category_label,!1===A.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(A),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(A):A.body?/* @__PURE__ */o(e,{children:A.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-
|
|
2
|
-
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${
|
|
3
|
-
/* @__PURE__ */p(t,{side:m,width:P,onResize:
|
|
4
|
-
return f("div",
|
|
5
|
-
/* @__PURE__ */p(g,{phone:
|
|
6
|
-
/* @__PURE__ */p(v,{phone:
|
|
1
|
+
import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-5QGBVTGS.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-GDQJBQ5B.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:j=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:z="bg-white"}){const C="right"===m,D=i().sidebar,O=a(),W=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[P,T]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),B=null!=l||null!=n,E=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:P},children:[
|
|
2
|
+
/* @__PURE__ */f("div",{className:`flex h-full flex-col ${B?"overflow-hidden":"overflow-y-auto"} ${j}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),B?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
|
|
3
|
+
/* @__PURE__ */p(t,{side:m,width:P,onResize:T,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:D.resize})]}),G=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${z}`,children:u});/* @__PURE__ */
|
|
4
|
+
return f("div",O?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
|
|
5
|
+
/* @__PURE__ */p(g,{phone:W,top:l,fallback:D.sections}),G,
|
|
6
|
+
/* @__PURE__ */p(v,{phone:W,bottom:n,label:D.sections,closeLabel:D.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[C?null:E,G,C?E:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
|
|
7
7
|
return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
|
|
8
8
|
/* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
|
|
9
9
|
/* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";function e({size:e=18,...t}){/* @__PURE__ */
|
|
2
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:/* @__PURE__ */r("path",{d:"M6 8.25h12L12 17.25Z"})})}export{e as SeparatorTriangleIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{CartesianPlot as l}from"./chunk-
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-G4GVLK44.js";import{CartesianPlot as l}from"./chunk-QO5E33DH.js";import{STATUS_VARS as o}from"./chunk-TZFACUMR.js";import{useShellStrings as t,useShellLocale as a}from"./chunk-GDQJBQ5B.js";import{formatPlain as i,formatFixed as r}from"./chunk-C3QOHMR6.js";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";function h({candles:h,variant:m="candle",height:p=260,width:d,formatValue:u,yAxisLabel:b,label:y,className:x,emptyLabel:k}){const g=t().charts,f=a(),w=u??(e=>Number.isInteger(e)?i(e,f):r(e,2,f)),M=y??g.price,v=h.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),j=Math.min(...v),L=Math.max(...v),A=.08*(L-j)||1;/* @__PURE__ */
|
|
2
2
|
return c(l,{labels:h.map(e=>e.label),values:v,height:p,width:d,min:j-A,max:L+A,bandPadding:.42,formatValue:w,yAxisLabel:b,className:x,emptyLabel:k,ariaLabel:g.ohlc(M,h.length),tooltip:l=>{const t=h[l],a=t.close>=t.open,i=a?o.good:o.critical;/* @__PURE__ */
|
|
3
3
|
return c(e,{title:t.label,rows:[{key:"open",label:g.open,color:i,value:w(t.open)},{key:"high",label:g.high,color:i,value:w(t.high)},{key:"low",label:g.low,color:i,value:w(t.low)},{key:"close",label:g.close,color:i,value:w(t.close)}],emphasisKey:"close",footnote:a?g.closedAbove:g.closedBelow})},children:({x:e,y:l,active:t})=>/* @__PURE__ */c("g",{children:h.map((a,i)=>{const r=a.close>=a.open,h=r?o.good:o.critical,p=e.center(i),d=Math.max(3,e.bandwidth),u=null!==t&&t!==i,b=l(Math.max(a.open,a.close)),y=Math.max(1,Math.abs(l(a.close)-l(a.open)));/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:u?.45:1,children:[
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const
|
|
1
|
+
import{parseFocal as e,formatFocal as t,nudgeFocal as n,focalFromRect as a}from"./chunk-25RR3GQW.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{useId as o,useRef as s}from"react";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c={background:"color-mix(in srgb, var(--status-on-solid) 45%, transparent)"},u={borderColor:"var(--status-on-solid)",boxShadow:"0 0 0 1px var(--rosh-media-scrim-button), 0 1px 4px var(--rosh-media-scrim-button)"};function d({value:d,onChange:m,label:f,image:p,hint:h,emptyText:x,actions:b,disabled:g=!1,id:v,className:y=""}){const N=r().imageFocus,w=o(),k=s(null),j=s(!1),{x:C,y:P}=e(d),K=t(C,P),$=e=>{e!==d&&m(e)},D=(e,n)=>{const r=k.current?.getBoundingClientRect();if(!r)return;const o=a(r,e,n);$(t(o.x,o.y))},B=()=>{j.current=!1};if(!p)/* @__PURE__ */
|
|
2
|
+
return i("div",{"data-image-focus":"",className:y||void 0,children:/* @__PURE__ */i("p",{className:"text-xs text-ink-faint",children:x??N.noImage})});const Q=void 0===h,R=null!==h;/* @__PURE__ */
|
|
3
3
|
return l("div",{"data-image-focus":"",className:`flex flex-col gap-2 ${y}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),
|
|
4
|
+
/* @__PURE__ */i("button",{id:v,type:"button","data-image-focus-picture":"",disabled:g,"aria-label":N.picture(f,K),"aria-describedby":w,onKeyDown:e=>{if(g||e.altKey||e.ctrlKey||e.metaKey)return;const t=n(d,e.key,e.shiftKey);null!==t&&(e.preventDefault(),$(t))},onPointerDown:e=>{g||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),j.current=!0,D(e.clientX,e.clientY))},onPointerMove:e=>{j.current&&!g&&D(e.clientX,e.clientY)},onPointerUp:B,onPointerCancel:B,onLostPointerCapture:B,className:["flex min-h-36 w-full touch-none items-center justify-center overflow-hidden rounded-md border border-line bg-surface-sunken p-0","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",g?"cursor-not-allowed opacity-60":"cursor-crosshair"].join(" "),children:/* @__PURE__ */l("span",{ref:k,"data-image-focus-pane":"",className:"relative block max-w-full",children:[
|
|
5
5
|
/* @__PURE__ */i("img",{src:p,alt:"",draggable:!1,className:"block h-auto max-h-36 w-auto max-w-full select-none object-contain"}),
|
|
6
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${
|
|
7
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${
|
|
8
|
-
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${
|
|
6
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"h",className:"pointer-events-none absolute inset-x-0 h-px",style:{top:`${P}%`,...c}}),
|
|
7
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-cross":"v",className:"pointer-events-none absolute inset-y-0 w-px",style:{left:`${C}%`,...c}}),
|
|
8
|
+
/* @__PURE__ */i("span",{"aria-hidden":"true","data-image-focus-dot":"",className:"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{left:`${C}%`,top:`${P}%`,...u}})]})}),R||b?/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */i("span",R?{id:Q?w:void 0,className:"min-w-0 flex-1 text-xs text-ink-faint",children:Q?N.hint:h}:{className:"min-w-0 flex-1"}),b]}):null,!Q&&/* @__PURE__ */i("span",{id:w,className:"sr-only",children:N.hint})]})}export{d as ImageFocusPoint};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var a=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","count-up","crop","crop-bottom","crop-left","crop-left-right","crop-right","crop-top","crop-y","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","detach","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","duration","edit","email","emphasis","enter","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","hover-lift","hover-next-image","hover-none","hover-rotate","hover-zoom","icon-after-text","icon-at-end","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","loop","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","nudge-x","nudge-y","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","palette","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","server","settings","shadow","shape-ellipse","shape-rect","share","shared","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],e=new Set(a),r=a=>"string"==typeof a&&e.has(a),n=["brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom"],o=new Set(n),d=a=>"string"==typeof a&&o.has(a);export{n as BRAND_ICON_NAMES,a as ICON_NAMES,d as isBrandIconName,r as isIconName};
|
|
1
|
+
var a=["academic-cap","accent","account","account-circle","add","add-circle","add-person","adjust","align-center","align-justify","align-left","align-right","align-separate","alignment","anchor","animation","apps","archive-box","arrow","arrow-down","arrow-left","arrow-left-end-on-rectangle","arrow-long-right","arrow-right","arrow-trending-down","arrow-trending-up","arrow-up","arrow-up-right","at-symbol","attach","background","bag","bank","bars-3-bottom-left","battery","beaker","bell","bell-alert","bell-plus","billing","black-and-white","block-badge","block-banner","block-box","block-button","block-column","block-coupon","block-divider","block-footer","block-heading","block-image","block-included-list","block-layered-images","block-product","block-product-title","block-section","block-social","block-spacer","block-text","block-video","blog-post","bold","bolt","book-open","bookmark","bookmark-square","border-all","border-bottom","border-left","border-right","border-top","braces","brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom","breadcrumb","briefcase","bug","bug-ant","building-library","building-office-2","button","button-arrow","button-icon","calculator","calendar","calendar-check","camera","caption","car","card-payment","caret","cart","case","case-capitalized","case-lower","case-normal","case-upper","category","chart","chart-bar","chart-bar-square","chart-line","chat","chat-bubble-left-right","chat-bubble-oval-left-ellipsis","check","check-circle","checkbox","chevron","chevron-double","chevron-double-left","chevron-double-right","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle-stack","clear-marks","clipboard","clipboard-check","clipboard-document-list","clipboard-list","clock","close","close-circle","cloud","cloud-alert","cloud-arrow-up","cloud-check","cloud-download","cloud-pause","cloud-slash","code","code-bracket","collapse","collapse-all","column-gap","column-widths","columns","company","compose","contrast","cookie","copied","copy","copy-style","copy-to-page","corner","count-up","crop","crop-bottom","crop-left","crop-left-right","crop-right","crop-top","crop-y","cube-transparent","cursor","cursor-arrow-rays","cursor-click","dashboard","date","desktop","detach","diagram","direction","direction-down","direction-left","direction-right","direction-up","document","document-check","document-magnifying-glass","dollar","dot","download","drag","drop","duplicate","duration","edit","email","emphasis","enter","eraser","error","expand","external","eye","eye-off","face-smile","filter","finish","fire","flag","flag-au","flag-ca","flag-eu","flag-gb","flag-nz","flag-us","folder","folder-open","folder-plus","forward","full-width","gap","gem","gift","globe","grid","ground","hand","hand-thumb-up","hash","headquarters","heart","height","help","help-off","hexagon","home","hover","hover-lift","hover-next-image","hover-none","hover-rotate","hover-zoom","icon-after-text","icon-at-end","icon-before-text","identification","image","image-off","images","inbox","info","italic","key","layers","layout","letter-spacing","lightbulb","line-between","line-dashed","line-dotted","line-solid","line-spacing","line-style","link","link-slash","list","list-format","list-none","location","lock","logo","logout","loop","map","media","media-layout-big-two","media-layout-inset","media-layout-side-by-side","media-layout-stacked","megaphone","menu","meta","microphone","money","moon","more","more-vertical","move-down","move-up","newspaper","no-symbol","note","nudge","nudge-x","nudge-y","numbered-list","opacity","own-text","package","package-open","padding-all","padding-bottom","padding-left","padding-left-right","padding-right","padding-top","padding-x","padding-y","page","paint-brush","palette","panel-left","panel-right","paragraph-spacing","parcel","paste","paste-style","pause","pen","people","percent","phone","phone-hidden","placement","play","plus-minus","power","presentation-chart-bar","print","product","product-field","product-size","progress","quote","radio-dot","radius","receipt","receipt-percent","receipt-refund","rectangle-group","redo","refresh","remove","remove-circle","rename","reply","reply-all","revert","robot","rotate","scale","scroll-point","scroll-text","search","select-all","send","separator-slash","separator-triangle","server","settings","shadow","shape-ellipse","shape-rect","share","shared","shield-check","shield-exclamation","sides-each","signal","signal-slash","sitemap","slide-arrows-bare","slide-arrows-round","slide-arrows-square","slide-picker-bar","slide-picker-cards","slide-picker-dots","slide-picker-numbers","slide-picker-squares","sort","sparkles","speaker","speaker-wave","spec-table","spinner","split","square","star","state","status-circle","status-dot","sticky","stop-circle","store","strike","styles","subscript","success-burst","sun","superscript","swap","swatch","table","tablet","tabs","tag","target","team","telephone","template","text-color","text-lines","text-size","text-small","text-value","texture","theme","ticket","title","trash","trigger","truck","tv","type","tyre","underline","undo","upload","v-align","verified","video-off","view-columns","wallet","warning","weight","wheel","widgets","width","window","windows","words-from","wrap","wrench","wrench-screwdriver","zoom-in"],e=new Set(a),r=a=>"string"==typeof a&&e.has(a),n=["brand-1password","brand-adyen","brand-afterpay","brand-aircall","brand-alipay","brand-amd","brand-americanexpress","brand-anthropic","brand-apple","brand-applepay","brand-aws","brand-bigcommerce","brand-brevo","brand-calendly","brand-campaignmonitor","brand-cloudflare","brand-dell","brand-dhl","brand-dinersclub","brand-dropbox","brand-ebay","brand-etsy","brand-facebook","brand-fedex","brand-github","brand-gmail","brand-googleads","brand-googleanalytics","brand-googlecalendar","brand-googledrive","brand-googlepay","brand-googlesheets","brand-hubspot","brand-instagram","brand-intel","brand-intercom","brand-jcb","brand-klarna","brand-line","brand-linkedin","brand-mailchimp","brand-mailgun","brand-make","brand-mastercard","brand-messenger","brand-meta","brand-myob","brand-notion","brand-nvidia","brand-paypal","brand-pinterest","brand-quickbooks","brand-sage","brand-samsung","brand-shopify","brand-square","brand-squarespace","brand-stripe","brand-telegram","brand-tiktok","brand-trello","brand-ups","brand-visa","brand-vonage","brand-wechat","brand-whatsapp","brand-wise","brand-wix","brand-woocommerce","brand-x","brand-xero","brand-youtube","brand-zapier","brand-zendesk","brand-zoom"],o=new Set(n),d=a=>"string"==typeof a&&o.has(a);export{n as BRAND_ICON_NAMES,a as ICON_NAMES,d as isBrandIconName,r as isIconName};
|