efficient-shell 10.14.0 → 10.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/dist/{Browser-LAMGXJI6.js → Browser-RI5X7GMK.js} +11 -11
- package/dist/Calculator-Y566OMJZ.js +29 -0
- package/dist/{CurrencyConverter-577XB7A3.js → CurrencyConverter-2GUEE7ZR.js} +6 -6
- package/dist/{Documents-DW7I624C.js → Documents-GI346UL5.js} +8 -8
- package/dist/{Files-VLSMINW5.js → Files-UA23KXN7.js} +51 -51
- package/dist/{Notepad-54H6KCGS.js → Notepad-HRZKLHO3.js} +10 -10
- package/dist/PdfViewer-LU5JKHSG.js +1 -0
- package/dist/{PomodoroTimer-CXJVY7U3.js → PomodoroTimer-QYCTTTPZ.js} +63 -63
- package/dist/{Preview-OWMTJFTO.js → Preview-LSGN5GN7.js} +23 -23
- package/dist/Sidebar-2P26444H.js +44 -0
- package/dist/{Spreadsheet-HWNS4TSX.js → Spreadsheet-7JBZY6KJ.js} +13 -13
- package/dist/{Stock-M4TDRNCI.js → Stock-ZVQT25IE.js} +3 -3
- package/dist/{Weather-K634BVDX.js → Weather-RAUDLLVU.js} +19 -19
- package/dist/{WorldClock-56CYOGR2.js → WorldClock-2XBWZ6SZ.js} +6 -6
- package/dist/ai/index.d.ts +77 -2
- package/dist/ai/index.js +80 -60
- package/dist/ai.css +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-26LO7XCK.js +2 -0
- package/dist/{chunk-ALWVHNUO.js → chunk-2JG5JU4M.js} +4 -4
- package/dist/{chunk-QPJQJRHZ.js → chunk-2SY76NFO.js} +4 -4
- package/dist/{chunk-KKSVRIMP.js → chunk-2UO47XB4.js} +8 -3
- package/dist/{chunk-2K2W6VIR.js → chunk-2VGQS6CW.js} +1 -1
- package/dist/{chunk-O4V5PEA3.js → chunk-3AH524CN.js} +1 -1
- package/dist/{chunk-OZBM2XFQ.js → chunk-3EJ64VKE.js} +1 -1
- package/dist/{chunk-AZ3AR7U7.js → chunk-3LDXURVU.js} +2 -2
- package/dist/{chunk-CAVADOJK.js → chunk-4G2C6J4I.js} +1 -1
- package/dist/{chunk-KZX25YEW.js → chunk-4QJOEHM6.js} +11 -11
- package/dist/{chunk-DDCMMOB4.js → chunk-4UKGVLFP.js} +1 -1
- package/dist/{chunk-37U326EL.js → chunk-4WEFGKJL.js} +9 -9
- package/dist/{chunk-JGFY54A4.js → chunk-57HN6MPC.js} +2 -2
- package/dist/{chunk-QNK2I4IH.js → chunk-5UYZ75F3.js} +9 -9
- package/dist/{chunk-ZZOBG6GP.js → chunk-6AS5PHHK.js} +17 -17
- package/dist/chunk-6C6TRDNI.js +1 -0
- package/dist/{chunk-CGQAKGPT.js → chunk-74OUAR6L.js} +6 -6
- package/dist/chunk-7HLC352T.js +23 -0
- package/dist/{chunk-UNRPRMQO.js → chunk-7HTRLRVO.js} +63 -63
- package/dist/{chunk-KOBYM5JV.js → chunk-7MSC3Z5H.js} +12 -12
- package/dist/{chunk-EDKRGYZX.js → chunk-7NBSBGLX.js} +8 -8
- package/dist/{chunk-PXQG5EIH.js → chunk-7TNAOZZ2.js} +1 -1
- package/dist/{chunk-ORIGX2H5.js → chunk-7UTPXU6K.js} +1 -1
- package/dist/chunk-7XYTJPWW.js +29 -0
- package/dist/{chunk-SCPCZCYQ.js → chunk-7ZP64SC7.js} +1 -1
- package/dist/{chunk-C2L33LDZ.js → chunk-AJO72CPB.js} +2 -2
- package/dist/chunk-ALDGSODF.js +2 -0
- package/dist/{chunk-H64JJSXC.js → chunk-AOK3BHRT.js} +4 -4
- package/dist/{chunk-67JCJ2MG.js → chunk-B7UCXROE.js} +1 -1
- package/dist/{chunk-SWN3LSQX.js → chunk-BNJWZAQE.js} +11 -11
- package/dist/{chunk-RQSVBXBV.js → chunk-CBEKJTXU.js} +5 -5
- package/dist/{chunk-PBWUEBJ5.js → chunk-CQV3VSI2.js} +1 -1
- package/dist/{chunk-XNKIDGZW.js → chunk-CRILBBSU.js} +1 -1
- package/dist/{chunk-YJLLLO5R.js → chunk-D4I3U7UE.js} +1 -1
- package/dist/chunk-DESWIPOZ.js +3 -0
- package/dist/{chunk-MXH3UPCH.js → chunk-DWR7MYQU.js} +5 -5
- package/dist/{chunk-EYZZW6SO.js → chunk-E3753CWP.js} +1 -1
- package/dist/{chunk-XAROKI7X.js → chunk-E5QPXEKN.js} +2 -2
- package/dist/{chunk-URERZUX5.js → chunk-EXJXOKUU.js} +1 -1
- package/dist/{chunk-RBQWIHYD.js → chunk-F2R3UFNQ.js} +1 -1
- package/dist/{chunk-A4HJDSRA.js → chunk-FEQDZTZ7.js} +6 -6
- package/dist/{chunk-M3OYHYIS.js → chunk-FWVC4A2O.js} +1 -1
- package/dist/{chunk-LTKXAHS3.js → chunk-GPJO34QP.js} +7 -7
- package/dist/{chunk-LOFYSLC7.js → chunk-H32EQG5Z.js} +9 -9
- package/dist/chunk-JEH5EVIG.js +1 -0
- package/dist/{chunk-MBXLROCD.js → chunk-JGTGQGHY.js} +1 -1
- package/dist/{chunk-YGSU5KCP.js → chunk-JJW43QPS.js} +5 -5
- package/dist/{chunk-KUMEDH5M.js → chunk-K4ANB6AF.js} +1 -1
- package/dist/{chunk-7PUVPDUZ.js → chunk-KTA77U3P.js} +4 -4
- package/dist/{chunk-L3QNKCXH.js → chunk-KTVXPGGB.js} +10 -10
- package/dist/{chunk-JRZ7PPVJ.js → chunk-L4IW77TD.js} +4 -4
- package/dist/{chunk-QODTON7V.js → chunk-LJN77RG6.js} +1 -1
- package/dist/{chunk-SOECV4V5.js → chunk-LO5T2K4B.js} +3 -3
- package/dist/{chunk-63L5ORRZ.js → chunk-LPXMHYTM.js} +1 -1
- package/dist/chunk-LU6NA4RU.js +5 -0
- package/dist/chunk-M4K6FLIY.js +1 -0
- package/dist/{chunk-AGG4RFXR.js → chunk-MHB52H2Y.js} +13 -13
- package/dist/{chunk-2VTO64YC.js → chunk-MNSKGMVZ.js} +9 -9
- package/dist/chunk-MNZ7MGAT.js +2 -0
- package/dist/{chunk-JBOMPD3V.js → chunk-MTEFYFUO.js} +1 -1
- package/dist/{chunk-C2P2Z6HU.js → chunk-NBVHJZVS.js} +14 -14
- package/dist/{chunk-3RORPK2J.js → chunk-PCFBDXLN.js} +1 -1
- package/dist/{chunk-7YZ5TUXE.js → chunk-PJQGYKN6.js} +6 -6
- package/dist/chunk-PN5FQVMB.js +7 -0
- package/dist/{chunk-ZNAVCHBV.js → chunk-PVZGSCCB.js} +6 -6
- package/dist/{chunk-FFIQPFUR.js → chunk-PYAJCN2Q.js} +1 -1
- package/dist/chunk-Q6YNMNUH.js +6 -0
- package/dist/{chunk-6U6WVU5F.js → chunk-QDQ347RL.js} +1 -1
- package/dist/{chunk-SMUH7NAN.js → chunk-QYSEYYV7.js} +1 -1
- package/dist/{chunk-P5YFQ4IQ.js → chunk-RDYFZHT3.js} +1 -1
- package/dist/{chunk-3BYLHJLC.js → chunk-RLJHRDDW.js} +8 -8
- package/dist/{chunk-FZO6H3ZB.js → chunk-RPYFOQM2.js} +5 -5
- package/dist/chunk-RRUHQLUY.js +14 -0
- package/dist/{chunk-NSLQ3UYJ.js → chunk-S6FBMSFU.js} +2 -2
- package/dist/{chunk-KP2THXEI.js → chunk-SG4LO2AN.js} +5 -5
- package/dist/{chunk-VZ4PBHFN.js → chunk-SHKBDFSE.js} +1 -1
- package/dist/{chunk-BS7IPLRR.js → chunk-TM33D3CE.js} +1 -1
- package/dist/{chunk-MUMQ6PW7.js → chunk-U2RFKQVA.js} +1 -1
- package/dist/{chunk-XBB6LSSB.js → chunk-UBMY23AG.js} +5 -5
- package/dist/{chunk-F5FNYNHF.js → chunk-UDRMZ22J.js} +1 -1
- package/dist/{chunk-UWK5Q3R4.js → chunk-VNACNNCJ.js} +17 -17
- package/dist/{chunk-MKQZINBW.js → chunk-VTFZ6W2D.js} +2 -2
- package/dist/{chunk-LKTBKVN6.js → chunk-W35N7SL3.js} +4 -4
- package/dist/{chunk-W6SC3ZNO.js → chunk-W3OWPBQL.js} +2 -2
- package/dist/chunk-W4OBVKN4.js +1 -0
- package/dist/{chunk-F6JDUMM7.js → chunk-WB4P4QE2.js} +1 -1
- package/dist/{chunk-E3HSZQFI.js → chunk-WMEYNKXZ.js} +16 -16
- package/dist/{chunk-SO6X4CII.js → chunk-X6BFVDB4.js} +2 -2
- package/dist/{chunk-CHBRMAJV.js → chunk-XDBG4HPV.js} +1 -1
- package/dist/{chunk-7YOQS3C6.js → chunk-XTCXX5LJ.js} +1 -1
- package/dist/{chunk-GBCH3UHD.js → chunk-XZGGJHJC.js} +17 -17
- package/dist/{chunk-YWDEFPSW.js → chunk-YOSUCCHG.js} +1 -1
- package/dist/{chunk-GSKLHUQ6.js → chunk-ZW3IDCP2.js} +1 -1
- package/dist/{chunk-JAKOZNZK.js → chunk-ZZVE64OI.js} +2 -2
- package/dist/data/ListLoadError.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.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/SplitButton.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/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +1 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/EnterIcon.d.ts +8 -0
- package/dist/icons/glyphs/EnterIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/EnterMiniIcon.d.ts +8 -0
- package/dist/icons/looks/EnterMiniIcon.js +1 -0
- package/dist/icons/looks/EnterSolidIcon.d.ts +8 -0
- package/dist/icons/looks/EnterSolidIcon.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 +135 -135
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/{names-CwzeaUf6.d.ts → names-Bmx_9y41.d.ts} +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/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/FormLayoutPage.js +1 -1
- package/dist/tokens/colour.d.ts +2 -2
- 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-ZFMTTDQ6.js +0 -29
- package/dist/PdfViewer-Z4YKDHIH.js +0 -1
- package/dist/Sidebar-7RR5WNIF.js +0 -44
- package/dist/chunk-3GL4OVBB.js +0 -1
- package/dist/chunk-47EYPWCB.js +0 -14
- package/dist/chunk-A5BV6NFA.js +0 -7
- package/dist/chunk-DWMOUDMX.js +0 -1
- package/dist/chunk-IKMWKOT5.js +0 -1
- package/dist/chunk-KZMJE24J.js +0 -5
- package/dist/chunk-QKWYCOMM.js +0 -23
- package/dist/chunk-R7APUBZB.js +0 -29
- package/dist/chunk-UBOP6HFI.js +0 -6
- package/dist/chunk-WTTSB4SV.js +0 -3
- package/dist/chunk-ZTPMMNAZ.js +0 -1
- /package/dist/{chunk-744BFBBV.js → chunk-6V6ANLHW.js} +0 -0
- /package/dist/{chunk-S2P74CBN.js → chunk-N3TOHWFF.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{getNumberingConfigs as e}from"./chunk-
|
|
2
|
-
/* @__PURE__ */x("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{
|
|
1
|
+
import{getNumberingConfigs as e}from"./chunk-QYSEYYV7.js";import{SidebarLayout as t}from"./chunk-FEQDZTZ7.js";import"./chunk-QWK6DRSN.js";import"./chunk-DRDYZ633.js";import{timeAgo as r}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{AboutApp as n}from"./chunk-S6FBMSFU.js";import{useWindowManager as o,client_default as i}from"./chunk-7HTRLRVO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-XZGGJHJC.js";import"./chunk-LU6NA4RU.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-N3TOHWFF.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import{toast_default as s}from"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-7TNAOZZ2.js";import"./chunk-CDAJKLGL.js";import"./chunk-W4OBVKN4.js";import"./chunk-4WEFGKJL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as l}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useRef as a,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as g,jsx as x}from"react/jsx-runtime";var y=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var k={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:N,save:j}=c(),{data:v}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),T=a({});p(()=>{if(!v)return;const e={};for(const t of v){const r=k[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}T.current=e},[v]);const w=N.notepad_notes||[],[_,W]=d(null),[C,D]=d(""),[U,X]=d(""),[S,$]=d("yellow"),[J,F]=d(!1),[M,O]=d(!1),R=a(null),Z=a();p(()=>{if(!_&&w.length>0){const e=w[0];W(e.id),D(e.title),X(e.content),$(e.color)}},[w.length]);const E=m(e=>{j({notepad_notes:e})},[j]),G=m(()=>{if(!_||!J)return;const e=w.map(e=>e.id===_?{...e,title:C,content:U,color:S,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);E(e),F(!1)},[_,J,C,U,S,w,E]);p(()=>{if(J)return Z.current&&clearTimeout(Z.current),Z.current=setTimeout(G,800),()=>{Z.current&&clearTimeout(Z.current)}},[J,G]),p(()=>()=>{J&&G()},[]);const K=e=>{J&&G(),W(e.id),D(e.title),X(e.content),$(e.color),F(!1),O(!1)},Q=e=>{const t=U.slice(0,e),r=U.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=U.slice(e+r[0].length);X(t+n+o),F(!0)},V=async(e,t)=>{const r=T.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):s.error(`${n} not found`)}catch{s.error(`Failed to look up ${n}`)}},H="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",A=/* @__PURE__ */h(g,{children:[
|
|
2
|
+
/* @__PURE__ */x("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{J&&G();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...w];E(t),W(e.id),D(""),X(""),$("yellow"),F(!1),O(!0),setTimeout(()=>R.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-accent-fill text-on-accent px-3 min-h-8 py-1 text-sm font-medium hover:bg-accent-fill-hover transition-colors",children:[
|
|
3
3
|
/* @__PURE__ */x(l,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
|
|
4
|
-
/* @__PURE__ */x("div",{className:"flex-1 overflow-y-auto",children:0===
|
|
5
|
-
return h("button",{onClick:()=>
|
|
4
|
+
/* @__PURE__ */x("div",{className:"flex-1 overflow-y-auto",children:0===w.length?/* @__PURE__ */x("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):w.map(e=>{const t=(n=e.color,y.find(e=>e.key===n)||y[0]);var n;/* @__PURE__ */
|
|
5
|
+
return h("button",{onClick:()=>K(e),className:"w-full text-left px-3 py-3 border-b border-line-subtle transition-colors "+(_===e.id?"bg-accent-tint":"hover:bg-row-hover"),children:[
|
|
6
6
|
/* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */x("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
|
|
8
8
|
/* @__PURE__ */x("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"})]}),
|
|
@@ -10,15 +10,15 @@ return h("button",{onClick:()=>G(e),className:"w-full text-left px-3 py-3 border
|
|
|
10
10
|
/* @__PURE__ */x("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
|
|
11
11
|
return h("div",{className:"h-full",children:[
|
|
12
12
|
/* @__PURE__ */x(n,{app:"notepad"}),
|
|
13
|
-
/* @__PURE__ */x(t,{sidebar:
|
|
13
|
+
/* @__PURE__ */x(t,{sidebar:A,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
|
|
14
14
|
/* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
|
|
15
|
-
/* @__PURE__ */x("input",{value:
|
|
16
|
-
/* @__PURE__ */x("div",{className:"flex gap-1",children:y.map(e=>/* @__PURE__ */x("button",{onClick:()=>{
|
|
17
|
-
/* @__PURE__ */x("button",{onClick:()=>(e=>{const t=
|
|
18
|
-
return x("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(U):/* @__PURE__ */x("p",{className:"text-gray-300 whitespace-pre-line",children:
|
|
15
|
+
/* @__PURE__ */x("input",{value:C,onChange:e=>{D(e.target.value),F(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
|
|
16
|
+
/* @__PURE__ */x("div",{className:"flex gap-1",children:y.map(e=>/* @__PURE__ */x("button",{onClick:()=>{$(e.key),F(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${S===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
|
|
17
|
+
/* @__PURE__ */x("button",{onClick:()=>(e=>{const t=w.filter(t=>t.id!==e);if(E(t),_===e){const e=t[0];e?K(e):(W(null),D(""),X(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */x(l,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),M?/* @__PURE__ */x("textarea",{ref:R,value:U,onChange:e=>{X(e.target.value),F(!0)},onBlur:()=>{O(!1),J&&G()},placeholder:H,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */x("div",{onClick:()=>{O(!0),setTimeout(()=>R.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:U?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],c=/([A-Z]{2,4})#(\d{4,6})/g;let s;for(;null!==(s=c.exec(e));){const e=s[1],t=s[2];if(T.current[e]){const n=s.index,o=s[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */x("button",{onClick:()=>V(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let a=0;for(let e=0;e<r;e++)a+=t[e].length+1;for(;null!==(s=b.exec(e));){const e="x"===s[1]||"X"===s[1],t=s.index,n=a+t;i.push({idx:t,len:s[0].length,render:()=>/* @__PURE__ */x("button",{onClick:()=>Q(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */x(l,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */x("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */x("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */x("span",{children:""},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
|
|
18
|
+
return x("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(U):/* @__PURE__ */x("p",{className:"text-gray-300 whitespace-pre-line",children:H})}),
|
|
19
19
|
/* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-line-subtle flex items-center gap-4 text-2xs text-ink-faintest",children:[
|
|
20
20
|
/* @__PURE__ */x("span",{children:"[] checkbox"}),
|
|
21
21
|
/* @__PURE__ */x("span",{children:"SO#35001 entity link"}),
|
|
22
|
-
/* @__PURE__ */x("span",{className:"ml-auto",children:
|
|
22
|
+
/* @__PURE__ */x("span",{className:"ml-auto",children:M?"Editing":"Click to edit"})]})]}):/* @__PURE__ */x("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
|
|
23
23
|
/* @__PURE__ */x(l,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
|
|
24
24
|
/* @__PURE__ */x("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-NBVHJZVS.js";import"./chunk-AKM6JBMD.js";import"./chunk-UQYNPYF4.js";import"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-TM33D3CE.js";import{subscribePomo as o,getPomoSnapshot as a,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as l,setPomoFocusSound as i,useTodoTasks as c,migratePomodoroTasksOnce as d,pomoSwitchMode as u,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as f,previewFocusSound as k}from"./chunk-TVH7IZQ4.js";import{PLACEHOLDER_INK as b}from"./chunk-AYZY3YNC.js";import{pad2 as x}from"./chunk-LF27WIN2.js";import{useWidgetSettings as v}from"./chunk-7HTRLRVO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-XZGGJHJC.js";import"./chunk-LU6NA4RU.js";import{useShellPrefs as y}from"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-N3TOHWFF.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-7TNAOZZ2.js";import"./chunk-CDAJKLGL.js";import"./chunk-4WEFGKJL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as N}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as C,useEffect as w,useMemo as S,useState as j,useRef as B,useCallback as M}from"react";import{jsxs as T,Fragment as P,jsx as A}from"react/jsx-runtime";var I="pomodoro_appearance",D="pomodoro_active_task_id",V={focus:"Pomodoro",short:"Short Break",long:"Long Break"},L={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var W=25,R=5,$=15,U=!1,F=!1,J=4,E=!0,H=!0,O="bell",X=100,Z=1,G="none",K=50,Q=(e,t,o,a)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):a;function _(){const t=C(o,a,a),{prefs:g,save:k}=y(),b=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:Q(t.focusMinutes,1,120,W),shortBreakMinutes:Q(t.shortBreakMinutes,1,120,R),longBreakMinutes:Q(t.longBreakMinutes,1,120,$),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:U,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:F,longBreakInterval:Q(t.longBreakInterval,1,20,J),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:E,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:H,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:O,alarmVolume:Q(t.alarmVolume,0,100,X),alarmRepeat:Q(t.alarmRepeat,1,5,Z),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:G,focusVolume:Q(t.focusVolume,0,100,K)}}(g.pomodoro_settings);w(()=>{n({focus:60*b.focusMinutes,short:60*b.shortBreakMinutes,long:60*b.longBreakMinutes})},[b.focusMinutes,b.shortBreakMinutes,b.longBreakMinutes]),w(()=>{r(b.alarmSound),s(b.alarmVolume,b.alarmRepeat)},[b.alarmSound,b.alarmVolume,b.alarmRepeat]),w(()=>{l({autoStartBreaks:b.autoStartBreaks,autoStartPomodoros:b.autoStartPomodoros,longBreakInterval:b.longBreakInterval})},[b.autoStartBreaks,b.autoStartPomodoros,b.longBreakInterval]),w(()=>{i(b.focusSound,b.focusVolume)},[b.focusSound,b.focusVolume]),w(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const _=c(),z=_.tasks,q=S(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),ee=function(e,t){return S(()=>t?(e=>{const t=[],o=[];for(const a of e)(a.done?o:t).push(a);return[...t,...o]})(e):e,[e,t])}(S(()=>z.filter(e=>!!e.dueDate&&(e.dueDate===q||e.dueDate<q&&!e.done)),[z,q]),b.checkToBottom),[te,oe]=j(()=>localStorage.getItem(D)),[ae,ne]=j(!1),[re,se]=j(null),le=B(!1);w(()=>{le.current||(le.current=!0,d(z,_.setAllTasks))},[]),w(()=>{try{te?localStorage.setItem(D,te):localStorage.removeItem(D)}catch{}},[te]),w(()=>{if(!re)return;const e=()=>se(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[re]);const ie=B(t.streak);w(()=>{if(t.streak>ie.current&&te){const e=z.find(e=>e.id===te);if(e){const t=(e.completed??0)+1,o=e.estimated??0,a=b.autoCheckTasks&&o>0&&t>=o;_.updateTask(te,{completed:t,done:e.done||a})}}ie.current=t.streak},[t.streak,te,b.autoCheckTasks,z,_]);const de=ee.reduce((e,t)=>e+(t.completed??0),0),ue=ee.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),me=ee.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),he=t.running&&"focus"===t.mode?t.remaining:0,pe=me*b.focusMinutes*60+he,ge=new Date(Date.now()+1e3*pe).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),fe=(pe/3600).toFixed(1),ke=te?z.find(e=>e.id===te)??null:null,be=x(Math.floor(t.remaining/60)),xe=x(t.remaining%60),[ve,ye]=j(()=>e(I)),[Ne,Ce]=j(!1),[we,Se]=j(ve),[je,Be]=j(b);v(M(()=>{Se({...ve}),Be({...b}),Ce(!0)},[ve,b]));const Me="focus"!==t.mode,Te=L[t.mode],Pe=Me?(Ae=Te,Ie=ve.activeOpacity/100,`rgba(${parseInt(Ae.slice(1,3),16)}, ${parseInt(Ae.slice(3,5),16)}, ${parseInt(Ae.slice(5,7),16)}, ${Ie})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${ve.activeOpacity/100})`;var Ae,Ie;const De={primary:Me?"text-white":"text-gray-900",secondary:Me?"text-white/85":"text-gray-700",muted:Me?"text-white/65":"text-gray-500",tabActive:Me?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Me?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Me?"border-white/30":"border-gray-200",softDivider:Me?"border-white/20":"border-gray-200",iconBtn:Me?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Me?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Ve=Me?Te:"#0f172a";/* @__PURE__ */
|
|
2
2
|
return T(P,{children:[
|
|
3
3
|
/* @__PURE__ */T("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${De.primary}`,style:{backgroundColor:Pe,backdropFilter:ve.activeBlur>0?`blur(${ve.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */
|
|
4
|
+
/* @__PURE__ */A("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */A("button",{onClick:()=>u(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?De.tabActive:De.tabInactive}`,children:V[e]},e))}),
|
|
5
5
|
/* @__PURE__ */T("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[be,":",xe]}),
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
6
|
+
/* @__PURE__ */A("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */A("button",{onClick:()=>t.running?m():h(),className:"bg-surface px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Ve,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
|
|
7
|
+
/* @__PURE__ */A("div",{className:"px-3 py-3 text-center",children:ke?/* @__PURE__ */T(P,{children:[
|
|
8
8
|
/* @__PURE__ */T("div",{className:`text-xs leading-tight ${De.muted}`,children:["#",(ke.completed??0)+1]}),
|
|
9
|
-
/* @__PURE__ */
|
|
9
|
+
/* @__PURE__ */A("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${De.primary}`,children:ke.name})]}):/* @__PURE__ */A("div",{className:`text-xs italic ${De.muted}`,children:"No task selected"})}),
|
|
10
10
|
/* @__PURE__ */T("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
11
|
+
/* @__PURE__ */A("h3",{className:`text-base font-bold tracking-tight ${De.primary}`,children:"Tasks"}),
|
|
12
|
+
/* @__PURE__ */A("button",{className:`rounded p-1 transition-colors ${De.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */A(N,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
|
|
13
|
+
/* @__PURE__ */A("div",{className:`border-t mx-3 mt-2 ${De.divider}`}),
|
|
14
14
|
/* @__PURE__ */T("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[ee.map(e=>{const t=e.id===te;/* @__PURE__ */
|
|
15
15
|
return T("div",{onClick:()=>oe(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */A("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,_.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */A("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Ve},children:/* @__PURE__ */A("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */A("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */A("circle",{cx:"12",cy:"12",r:"10"})})}),
|
|
17
|
+
/* @__PURE__ */A("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
|
|
18
18
|
/* @__PURE__ */T("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */A("span",{className:"font-bold text-gray-500",children:e.completed??0}),
|
|
20
|
+
/* @__PURE__ */A("span",{className:"text-gray-400",children:" / "}),
|
|
21
|
+
/* @__PURE__ */A("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
|
|
22
22
|
/* @__PURE__ */T("div",{className:"relative",children:[
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */A("button",{onClick:t=>{t.stopPropagation(),se(re===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */A(N,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),re===e.id&&/* @__PURE__ */A("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */A("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,_.removeTask(o),te===o&&oe(null),se(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),ae?/* @__PURE__ */A(ce,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const a=_.addTask({name:o,estimated:t,completed:0,dueDate:q});te||oe(a),ne(!1)},onCancel:()=>ne(!1),accentColor:Ve}):/* @__PURE__ */T("button",{onClick:()=>ne(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${De.addTaskBtn}`,children:[
|
|
24
|
+
/* @__PURE__ */A(N,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
|
|
25
25
|
/* @__PURE__ */T("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${De.softDivider}`,children:[
|
|
26
26
|
/* @__PURE__ */T("span",{className:De.secondary,children:["Pomos: ",
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:de}),
|
|
28
|
+
/* @__PURE__ */A("span",{className:De.muted,children:" / "}),
|
|
29
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:ue})]}),pe>0&&/* @__PURE__ */T("span",{className:De.secondary,children:["Finish At: ",
|
|
30
|
+
/* @__PURE__ */A("span",{className:`font-bold ${De.primary}`,children:ge}),
|
|
31
31
|
/* @__PURE__ */T("span",{className:De.muted,children:[" (",fe,"h)"]})]})]})]}),
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */A(Y,{open:Ne,onClose:()=>Ce(!1),onSave:()=>{ye(we),localStorage.setItem(I,JSON.stringify(we)),k({pomodoro_settings:je}),Ce(!1)},configAppearance:we,setConfigAppearance:Se,configPrefs:je,setConfigPrefs:Be})]})}function Y({open:e,onClose:o,onSave:a,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:l}){const i=(e,t)=>l(o=>({...o,[e]:t}));/* @__PURE__ */
|
|
33
33
|
return T(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:a,children:[
|
|
34
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(se,{}),label:"TIMER",children:[
|
|
35
35
|
/* @__PURE__ */T("div",{children:[
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */A("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
|
|
37
37
|
/* @__PURE__ */T("div",{className:"grid grid-cols-3 gap-3",children:[
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */T(z,{icon:/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */A(te,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
|
|
39
|
+
/* @__PURE__ */A(te,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
|
|
40
|
+
/* @__PURE__ */A(te,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
|
|
41
|
+
/* @__PURE__ */A(q,{label:"Auto Start Breaks",children:/* @__PURE__ */A(ne,{checked:s.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
|
|
42
|
+
/* @__PURE__ */A(q,{label:"Auto Start Pomodoros",children:/* @__PURE__ */A(ne,{checked:s.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
|
|
43
|
+
/* @__PURE__ */A(q,{label:"Long Break interval",children:/* @__PURE__ */A(oe,{value:s.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
|
|
44
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(le,{}),label:"TASK",children:[
|
|
45
|
+
/* @__PURE__ */A(q,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */A(ne,{checked:s.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
|
|
46
|
+
/* @__PURE__ */A(q,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */A(ne,{checked:s.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
|
|
47
|
+
/* @__PURE__ */T(z,{icon:/* @__PURE__ */A(ie,{}),label:"SOUND",children:[
|
|
48
|
+
/* @__PURE__ */A(q,{label:"Alarm Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
|
|
49
|
+
/* @__PURE__ */A(ae,{value:s.alarmSound,onChange:e=>i("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */A("button",{type:"button",onClick:()=>g(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
50
|
+
/* @__PURE__ */A(ee,{value:s.alarmVolume,onChange:e=>i("alarmVolume",e)}),
|
|
51
|
+
/* @__PURE__ */A(q,{label:"repeat",children:/* @__PURE__ */A(oe,{value:s.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
|
|
52
|
+
/* @__PURE__ */A(q,{label:"Focus Sound",children:/* @__PURE__ */T("div",{className:"flex items-center gap-2",children:[
|
|
53
|
+
/* @__PURE__ */A(ae,{value:s.focusSound,onChange:e=>i("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */A("button",{type:"button",onClick:()=>k(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
|
|
54
|
+
/* @__PURE__ */A(ee,{value:s.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function z({icon:e,label:t,children:o}){/* @__PURE__ */
|
|
55
55
|
return T("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
|
|
56
56
|
/* @__PURE__ */T("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */A("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
|
|
58
|
+
/* @__PURE__ */A("div",{className:"space-y-3",children:o})]})}function q({label:e,info:t,children:o}){/* @__PURE__ */
|
|
59
59
|
return T("div",{className:"flex items-center justify-between gap-3",children:[
|
|
60
60
|
/* @__PURE__ */T("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */A("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */A(re,{title:t})]}),
|
|
62
|
+
/* @__PURE__ */A("div",{className:"shrink-0",children:o})]})}function ee({value:e,onChange:t}){/* @__PURE__ */
|
|
63
63
|
return T("div",{className:"flex items-center justify-end gap-3",children:[
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */A("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
|
|
65
|
+
/* @__PURE__ */A("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function te({label:e,value:t,onChange:o,min:a=1,max:n=99}){/* @__PURE__ */
|
|
66
66
|
return T("label",{className:"flex flex-col",children:[
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
return
|
|
67
|
+
/* @__PURE__ */A("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
|
|
68
|
+
/* @__PURE__ */A(oe,{value:t,onChange:o,min:a,max:n})]})}function oe({value:e,onChange:t,min:o=1,max:a=99,className:n=""}){/* @__PURE__ */
|
|
69
|
+
return A("input",{type:"number",min:o,max:a,value:e,onChange:e=>t(Math.max(o,Math.min(a,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function ae({value:e,onChange:t,options:o}){/* @__PURE__ */
|
|
70
70
|
return T("div",{className:"relative",children:[
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
return
|
|
74
|
-
return
|
|
71
|
+
/* @__PURE__ */A("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */A("option",{value:e.id,children:e.label},e.id))}),
|
|
72
|
+
/* @__PURE__ */A(N,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${b}`,strokeWidth:2.5})]})}function ne({checked:e,onChange:t}){/* @__PURE__ */
|
|
73
|
+
return A("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */A("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function re({title:e}){/* @__PURE__ */
|
|
74
|
+
return A("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function se(){/* @__PURE__ */
|
|
75
75
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */A("circle",{cx:"12",cy:"12",r:"9"}),
|
|
77
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function le(){/* @__PURE__ */
|
|
78
78
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */A("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
|
|
80
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function ie(){/* @__PURE__ */
|
|
81
81
|
return T("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
|
|
83
|
+
/* @__PURE__ */A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function ce({onSubmit:e,onCancel:t,accentColor:o}){const[a,n]=j(""),[r,s]=j(1),l=()=>e(a,r);/* @__PURE__ */
|
|
84
84
|
return T("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */A("input",{autoFocus:!0,value:a,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&l(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
|
|
86
86
|
/* @__PURE__ */T("div",{className:"flex items-center justify-between mt-2",children:[
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */A("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
|
|
88
|
+
/* @__PURE__ */A("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
|
|
89
89
|
/* @__PURE__ */T("div",{className:"flex gap-2 mt-3 justify-end",children:[
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */A("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
91
|
+
/* @__PURE__ */A("button",{onClick:l,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{_ as default};
|