efficient-shell 13.14.0 → 13.15.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 +2 -1
- package/dist/{Browser-FJSOZLWR.js → Browser-KHMTFVKZ.js} +18 -18
- package/dist/Calculator-OKVS4UOJ.js +29 -0
- package/dist/CurrencyConverter-ZA2NGJWI.js +21 -0
- package/dist/{Files-XLDCJ7DO.js → Files-EN4DDZYV.js} +78 -78
- package/dist/Notepad-PHQNEUKW.js +24 -0
- package/dist/{PomodoroTimer-XKSYNHS7.js → PomodoroTimer-PW7BRZUJ.js} +6 -6
- package/dist/{Preview-24XTJDIR.js → Preview-OSQHIS3Z.js} +31 -31
- package/dist/Stock-2P4NWUNB.js +16 -0
- package/dist/{Weather-IWM5XTE5.js → Weather-7LIQ4POB.js} +20 -20
- package/dist/{WorldClock-35TNXAJM.js → WorldClock-KHBYIJQZ.js} +6 -6
- package/dist/ai/index.js +43 -43
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/ChartFrame.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/SpecChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/{chunk-UGEA3C5C.js → chunk-23LK4PLJ.js} +5 -5
- package/dist/{chunk-SNHBDP4X.js → chunk-3J4SFHC7.js} +5 -5
- package/dist/{chunk-RT77WNRB.js → chunk-3OUG6QAD.js} +1 -1
- package/dist/{chunk-775K6APE.js → chunk-3QNZ7YGZ.js} +1 -1
- package/dist/chunk-42RCQEEJ.js +14 -0
- package/dist/{chunk-36UB4MJX.js → chunk-4OBSVO6U.js} +1 -1
- package/dist/{chunk-64PPKUJG.js → chunk-5HBAJ2UA.js} +1 -1
- package/dist/{chunk-GTT7LIWK.js → chunk-7JG64RQW.js} +1 -1
- package/dist/{chunk-QNQLKGBC.js → chunk-A4WNUFLT.js} +1 -1
- package/dist/{chunk-A7ZYFJ6V.js → chunk-AOLJKOO6.js} +23 -23
- package/dist/chunk-BWJZTHZ6.js +1 -0
- package/dist/{chunk-2GMYO6ET.js → chunk-BWLC56GZ.js} +1 -1
- package/dist/chunk-CBUBDXJ2.js +1 -0
- package/dist/{chunk-JWLOERV5.js → chunk-CGKY4ZRA.js} +2 -2
- package/dist/{chunk-OYXA7SWV.js → chunk-D3T3JCUC.js} +1 -1
- package/dist/chunk-G5UGCAWN.js +17 -0
- package/dist/{chunk-HTANBHNV.js → chunk-GKNF53YM.js} +1 -1
- package/dist/chunk-GSLZ46DJ.js +24 -0
- package/dist/chunk-HNPJ3V3I.js +6 -0
- package/dist/{chunk-JPKNVTTK.js → chunk-I6JTDAOB.js} +1 -1
- package/dist/{chunk-YY7OFUT2.js → chunk-JFRBUVHX.js} +2 -2
- package/dist/chunk-KXPXLUNM.js +4 -0
- package/dist/{chunk-KBQNMQCK.js → chunk-LLYMOV4S.js} +1 -1
- package/dist/{chunk-WIFK6TLB.js → chunk-NYKOATR5.js} +1 -1
- package/dist/chunk-O2PVZC5D.js +8 -0
- package/dist/{chunk-FMERX3PG.js → chunk-OLSA36VX.js} +2 -2
- package/dist/{chunk-FUP2J2OX.js → chunk-QQK7HKNK.js} +1 -1
- package/dist/{chunk-RZJ63ZM4.js → chunk-QVQO3EFL.js} +9 -9
- package/dist/{chunk-ZDYIVU5R.js → chunk-RZ3OQFOD.js} +6 -6
- package/dist/chunk-S25KELFW.js +11 -0
- package/dist/{chunk-YBYJUBWE.js → chunk-TTLVTJR6.js} +1 -1
- package/dist/{chunk-EHM3ZVVT.js → chunk-UC5IC3AM.js} +4 -4
- package/dist/{chunk-YUDBB7VC.js → chunk-UGEX7SVM.js} +3 -3
- package/dist/{chunk-G3MJO3A6.js → chunk-W6NGPSMM.js} +13 -13
- package/dist/{chunk-ALHYNNE2.js → chunk-WJ7U6TGK.js} +6 -6
- package/dist/{chunk-YNVH2EIE.js → chunk-ZNKZ6J65.js} +3 -3
- package/dist/chunk-ZOCE74ED.js +2 -0
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +515 -515
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/Dialog.d.ts +14 -4
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +4 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-ZHINQHFI.js +0 -29
- package/dist/CurrencyConverter-AAXS7RPC.js +0 -21
- package/dist/Notepad-NENKOSXJ.js +0 -24
- package/dist/Stock-TCQSVSSY.js +0 -16
- package/dist/chunk-4S3E3VJH.js +0 -11
- package/dist/chunk-64RHGJXK.js +0 -4
- package/dist/chunk-6AUQWWUA.js +0 -17
- package/dist/chunk-FQD6P6EZ.js +0 -4
- package/dist/chunk-IQDHVQAQ.js +0 -14
- package/dist/chunk-JGKDWDVM.js +0 -27
- package/dist/chunk-KY3KGRGC.js +0 -1
- package/dist/chunk-RIG5FEVS.js +0 -1
- package/dist/chunk-XSHDPG45.js +0 -9
- /package/dist/{chunk-JR2HHKVP.js → chunk-HOHHRNCB.js} +0 -0
package/README.md
CHANGED
|
@@ -2022,7 +2022,7 @@ needs `worker-src 'self'` and nothing from a CDN. pdf.js 6 compiles nothing
|
|
|
2022
2022
|
with `eval`; a CSP without `'wasm-unsafe-eval'` makes it load the decoders'
|
|
2023
2023
|
JavaScript fallbacks from `wasmUrl` instead of the WebAssembly ones.
|
|
2024
2024
|
|
|
2025
|
-
`Dialog`'s `size="xl"` is the width for reading a page in. `size="2xl"` is the big chooser (the editors' media popup). `aside` keeps a dialog open with everything in it while its scrim and panel turn invisible and let the pointer through; the media popup sets it for the length of a drag out of it, then closes (dropped) or comes back (cancelled).
|
|
2025
|
+
`Dialog`'s `size="xl"` is the width for reading a page in. `size="2xl"` is the big chooser (the editors' media popup). `size="full"` is a chooser laid out like a window (the website editor's Add page window): the whole layer inside its gutter, the popup corner, no padding of its own, the title in a head bar with a line under it, a body that fills the rest and scrolls inside itself, and a footer bar. `headerActions` puts buttons beside the cross, at any size, in a grid column of their own so the title never runs under them; they come after the body in the DOM, with the cross. `aside` keeps a dialog open with everything in it while its scrim and panel turn invisible and let the pointer through; the media popup sets it for the length of a drag out of it, then closes (dropped) or comes back (cancelled).
|
|
2026
2026
|
|
|
2027
2027
|
### UI kit without the window manager — `efficient-shell/ui`
|
|
2028
2028
|
|
|
@@ -5284,6 +5284,7 @@ itself where the kit has an answer:
|
|
|
5284
5284
|
| `chart-dep` | one of those chart libraries declared in `package.json`, whether or not anything imports it (not `devDependencies`) | remove it |
|
|
5285
5285
|
| `ellipsis-label` | a button, link or menu label that ends in `…` or `...`: the text of `button`, `a`, `option`, `Button`, `IconButton`, `SplitButton`, `Link`, `NavLink`, `PopupMenuItem`, `PopupMenuLabel`, `DropdownMenuItem`, `MenuItem`, `ContextMenuItem` (through any spans inside), a `label` or `aria-label`, and a `label:` in an object. Each branch of a `?:` is read, and so is the English phrase handed to `say()` or `t()` (a key such as `team:menu.remove` has no dots of its own); no other call's result is. A `…` with no word of its own in the same string is a truncation's and is not counted. Not counted yet, by name in `ELLIPSIS_EXEMPT` until the sweep that clears each: `busy` (a listed first word such as Saving, Loading, and the Chinese busy forms), `placeholder` (`placeholder`, `searchPlaceholder`, `emptyOptionLabel`, `blankLabel`) and `prompt` (an `<option value="">` or `{ value: '', label }`) | the label without the dots, saying what it does ("Extend trial"). `…` means only "the words are cut" (owner ruling 2026-10-14) |
|
|
5286
5286
|
| `colour` | a literal colour, in a script string (`.ts` and `.tsx`) or a stylesheet declaration (`.css`, `.scss`, which this kind alone reads): a hex; an `rgb()` / `rgba()` / `hsl()` / `hsla()` / `hwb()` / `oklch()` / `oklab()` / `lab()` / `lch()` with a number in it; a Tailwind palette class (a colour utility with a hue and a step, or `white` / `black`, under any variant and alpha); a `--color-<hue>-<step>` variable; a named colour as the value of a colour property; and a palette class in `@apply`. A `var()` fallback counts (a fallback is a second palette). Not counted: a role or token, `transparent`, `currentColor`, `url(#…)`, a `#` in a link or id, a comment, a `mask` declaration (its black is alpha) | a colour role: its utility (`text-ink`, `bg-surface`, `border-line`, `bg-accent-fill` …) or `var(--role)`; `COLOUR_ROLES` lists them. A merchant site reads the site theme. A colour a frame needs because the shell's stylesheet cannot reach it is an `allow` entry with its reason (owner ruling 2026-10-23) |
|
|
5287
|
+
| `dialog-frame` | a `className` on a shell `Dialog`, `PopupForm` or `ConfirmDialog` (bare or namespaced) that redraws its frame (a string or a template literal): a zero padding on any side, named or `[0]` / `[0px]`; a width or height cap taken off or set (`none`, `screen`, `full`, any arbitrary value); a height of `full`, `screen` or a viewport unit (`dvh`, `svh` …); an arbitrary width or height in viewport units, a percentage or a `calc()`; a minimum height of the screen. Not counted: a class held in a variable (`className={cls}`), and a `style` prop | a `Dialog` size: `size="full"` for a chooser laid out like a window, with `headerActions` beside the cross |
|
|
5287
5288
|
|
|
5288
5289
|
Known gaps: `rgb()` / `hsl()` colours, colours in `.ts` maps, and
|
|
5289
5290
|
`createElement('button')` are not counted.
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import{InputEndActionButton as e}from"./chunk-PT4GMPUB.js";import"./chunk-3DSGJIC7.js";import"./chunk-UZFFSZFI.js";import"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-
|
|
1
|
+
import{InputEndActionButton as e}from"./chunk-PT4GMPUB.js";import"./chunk-3DSGJIC7.js";import"./chunk-UZFFSZFI.js";import"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-TTLVTJR6.js";import{WindowTitle as n}from"./chunk-3QNZ7YGZ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-BG3C4ALM.js";import{confirm as s}from"./chunk-GSLZ46DJ.js";import"./chunk-HNPJ3V3I.js";import"./chunk-EIFNESXS.js";import"./chunk-FTKLODQK.js";import"./chunk-ZOCE74ED.js";import"./chunk-HOHHRNCB.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-WLG7BE55.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-CBUBDXJ2.js";import"./chunk-DWGYC7OD.js";import"./chunk-WU2ZA6J2.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as a}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-IUVGHHR3.js";import"./chunk-C3QOHMR6.js";import{useRef as i,useEffect as c,useState as l}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],g=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function f(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),c(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=l(y),[w,v]=l(k||b),[C,S]=l(w),[W,R]=l([w]),[D,z]=l(0),[T,U]=l(0),[G,H]=l(x),[L,E]=l(!1),[J,M]=l(null),Z=i(null),O=i(null);c(()=>{try{localStorage.setItem(d,JSON.stringify(G))}catch{}},[G]);const F=e=>{const t=f(e);t&&(v(t),S(t),R(e=>{const o=e.slice(0,D+1);return o.push(t),o}),z(e=>e+1),E(!1))},B=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},A=()=>{const e=J?.trim();e?(H(t=>[...t,{label:e,url:w}]),M(null)):M(null)};c(()=>{if(null===J)return;Z.current?.focus(),Z.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||M(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==J]);const I=e=>{H(t=>t.filter((t,o)=>o!==e))},P=D>0,Q=D<W.length-1,K=G.some(e=>e.url===w),V="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
|
|
2
2
|
return m("div",{className:"relative flex flex-col h-full bg-white",children:[
|
|
3
|
-
/* @__PURE__ */u(n,{title:`Browser - ${
|
|
3
|
+
/* @__PURE__ */u(n,{title:`Browser - ${N(w)}`}),
|
|
4
4
|
/* @__PURE__ */u(r,{app:"browser"}),
|
|
5
5
|
/* @__PURE__ */m("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
|
|
6
|
-
/* @__PURE__ */u("button",{onClick:()=>{if(D>0){const e=D-1;z(e),v(
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{if(D<
|
|
8
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
9
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
10
|
-
/* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),
|
|
6
|
+
/* @__PURE__ */u("button",{onClick:()=>{if(D>0){const e=D-1;z(e),v(W[e]),S(W[e]),E(!1)}},disabled:!P,className:V,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
|
|
7
|
+
/* @__PURE__ */u("button",{onClick:()=>{if(D<W.length-1){const e=D+1;z(e),v(W[e]),S(W[e]),E(!1)}},disabled:!Q,className:V,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
|
|
8
|
+
/* @__PURE__ */u("button",{onClick:()=>U(e=>e+1),className:V,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
9
|
+
/* @__PURE__ */u("button",{onClick:()=>F(b),className:V,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
|
|
10
|
+
/* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),F(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
|
|
11
11
|
/* @__PURE__ */u("span",{className:"px-2 text-gray-400 text-xs",children:w.startsWith("https://")?"🔒":"⚠️"}),
|
|
12
|
-
/* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>
|
|
13
|
-
/* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>
|
|
14
|
-
/* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
12
|
+
/* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>S(e.target.value),onFocus:e=>e.target.select(),className:"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",spellCheck:!1,placeholder:"Enter URL or search…"}),w!==C&&
|
|
13
|
+
/* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>S(w)}})})]})}),
|
|
14
|
+
/* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>K?I(G.findIndex(e=>e.url===w)):void M(N(w)),className:V+" "+(K?"text-yellow-500":""),title:K?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:K?"currentColor":"none",strokeWidth:1.5})}),
|
|
15
|
+
/* @__PURE__ */u("button",{onClick:B,className:V,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
|
|
16
|
+
/* @__PURE__ */u("button",{onClick:()=>E(e=>!e),className:V,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==J&&/* @__PURE__ */m("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
|
|
17
17
|
/* @__PURE__ */u("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
|
|
18
18
|
/* @__PURE__ */u("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:w,children:w}),
|
|
19
|
-
/* @__PURE__ */u("input",{ref:
|
|
19
|
+
/* @__PURE__ */u("input",{ref:Z,type:"text",value:J,onChange:e=>M(e.target.value),onKeyDown:e=>{"Enter"===e.key?A():"Escape"===e.key&&M(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
|
|
20
20
|
/* @__PURE__ */m("div",{className:"flex justify-end gap-1 mt-2",children:[
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:
|
|
23
|
-
/* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===
|
|
21
|
+
/* @__PURE__ */u("button",{onClick:()=>M(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
|
|
22
|
+
/* @__PURE__ */u("button",{onClick:A,disabled:!J.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
|
|
23
|
+
/* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===G.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),G.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>F(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&I(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
|
|
24
24
|
/* @__PURE__ */u("img",{src:`https://icons.duckduckgo.com/ip3/${new URL(e.url).hostname}.ico`,alt:"",className:"h-3.5 w-3.5",onError:e=>{e.target.style.visibility="hidden"}}),e.label]},t)),
|
|
25
25
|
/* @__PURE__ */u("div",{className:"flex-1"}),
|
|
26
26
|
/* @__PURE__ */u("button",{onClick:()=>{g(w);try{localStorage.setItem(p,w)}catch{}},className:"px-2 py-0.5 text-2xs text-ink-faint hover:text-ink-strong",title:"Set current page as homepage",children:"Set as home"})]}),
|
|
27
|
-
/* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(
|
|
27
|
+
/* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(j,{url:w,iframeKey:T,iframeRef:O,openExternal:B,showHelp:L,dismissHelp:()=>E(!1)})})]})}function N(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function j({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[i,d]=l(!1);c(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
|
|
28
28
|
/* @__PURE__ */u(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
|
|
29
|
-
/* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[
|
|
29
|
+
/* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[N(e)," can't be embedded"]}),
|
|
30
30
|
/* @__PURE__ */m("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
|
|
31
31
|
/* @__PURE__ */u("span",{className:"font-mono text-xs",children:"X-Frame-Options"})," ","or ",
|
|
32
32
|
/* @__PURE__ */u("span",{className:"font-mono text-xs",children:"Content-Security-Policy"})," header that refuses iframe embedding. The browser blocks the load before our app can do anything about it."]}),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-7JG64RQW.js";import{useWidgetSettings as n}from"./chunk-3QNZ7YGZ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-BG3C4ALM.js";import"./chunk-GSLZ46DJ.js";import"./chunk-HNPJ3V3I.js";import"./chunk-EIFNESXS.js";import"./chunk-FTKLODQK.js";import"./chunk-ZOCE74ED.js";import"./chunk-HOHHRNCB.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-WLG7BE55.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-WU2ZA6J2.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as r}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-IUVGHHR3.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[y,x]=c(""),[C,f]=c([]),[v,$]=c(!1),[E,S]=c(()=>e(h)),[W,D]=c(!1),[T,G]=c(E),J=i(null);n(o(()=>{G({...E}),D(!0)},[E]));const Z=o(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),F=o(()=>{k("0"),d(null),g(null),N(!1)},[]),H=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),M=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=H(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,H]),Q=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=H(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,H]),U=o(()=>{k(e=>String(parseFloat(e)/100))},[]),w=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?Z(e.key):"."===e.key?Z("."):"+"===e.key?M("+"):"-"===e.key?M("-"):"*"===e.key?M("×"):"/"===e.key?(e.preventDefault(),M("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&J.current?.contains(e.target)&&e.preventDefault(),Q()):"Escape"===e.key?F():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&U())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[Z,M,Q,F,U]);const A="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",O=`${A} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,R=`${A} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,B=`${A} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,L=`${A} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
+
return l(a,{children:[
|
|
3
|
+
/* @__PURE__ */l("div",{ref:J,className:"flex flex-col h-full",style:{opacity:E.activeOpacity/100,backdropFilter:E.activeBlur>0?`blur(${E.activeBlur}px)`:void 0},children:[
|
|
4
|
+
/* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
+
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:C.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${j?"":m}`}),
|
|
6
|
+
/* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
|
|
7
|
+
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
+
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
|
|
9
|
+
/* @__PURE__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
+
/* @__PURE__ */u("button",{onClick:F,className:B,children:"AC"}),
|
|
11
|
+
/* @__PURE__ */u("button",{onClick:w,className:B,children:"+/−"}),
|
|
12
|
+
/* @__PURE__ */u("button",{onClick:U,className:B,children:"%"}),
|
|
13
|
+
/* @__PURE__ */u("button",{onClick:()=>M("÷"),className:`${R} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("7"),className:O,children:"7"}),
|
|
15
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("8"),className:O,children:"8"}),
|
|
16
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("9"),className:O,children:"9"}),
|
|
17
|
+
/* @__PURE__ */u("button",{onClick:()=>M("×"),className:`${R} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("4"),className:O,children:"4"}),
|
|
19
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("5"),className:O,children:"5"}),
|
|
20
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("6"),className:O,children:"6"}),
|
|
21
|
+
/* @__PURE__ */u("button",{onClick:()=>M("-"),className:`${R} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("1"),className:O,children:"1"}),
|
|
23
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("2"),className:O,children:"2"}),
|
|
24
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("3"),className:O,children:"3"}),
|
|
25
|
+
/* @__PURE__ */u("button",{onClick:()=>M("+"),className:`${R} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("0"),className:`${O} col-span-2`,children:"0"}),
|
|
27
|
+
/* @__PURE__ */u("button",{onClick:()=>Z("."),className:O,children:"."}),
|
|
28
|
+
/* @__PURE__ */u("button",{onClick:Q,className:L,children:"="})]})]}),
|
|
29
|
+
/* @__PURE__ */u(t,{open:W,onClose:()=>D(!1),title:"Calculator Settings",appearance:T,onAppearanceChange:G,onSave:()=>{S(T),localStorage.setItem(h,JSON.stringify(T)),D(!1)}})]})}export{m as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-7JG64RQW.js";import{useWidgetSettings as r}from"./chunk-3QNZ7YGZ.js";import"./chunk-4LXCCZDM.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-M2TQOJ3G.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-BG3C4ALM.js";import"./chunk-GSLZ46DJ.js";import"./chunk-HNPJ3V3I.js";import"./chunk-EIFNESXS.js";import"./chunk-FTKLODQK.js";import"./chunk-ZOCE74ED.js";import"./chunk-HOHHRNCB.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-WLG7BE55.js";import"./chunk-AW7TOB6N.js";import"./chunk-4U5M37SF.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-DWGYC7OD.js";import"./chunk-WU2ZA6J2.js";import"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-BWJZTHZ6.js";import"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-IUVGHHR3.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as i,Fragment as a,jsx as m}from"react/jsx-runtime";var l=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function k(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function g(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function j(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var N={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(j),[f,x]=s(()=>t(h)),[y,b]=s({}),[D,S]=s(!1),[C,v]=s(!1),[J,U]=s([]),[G,H]=s(f),[O,R]=s("USD"),[A,B]=s("CNY");r(o(()=>{U([...u]),H({...f}),v(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){S(!0);const r={};for(const e of t){const t=k(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,g(e,n.rates))}catch{}}e&&(b(r),S(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
|
|
2
|
+
return i(a,{children:[
|
|
3
|
+
/* @__PURE__ */m("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${f.activeOpacity/100})`,backdropFilter:f.activeBlur>0?`blur(${f.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3 space-y-1",children:[D&&/* @__PURE__ */m(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
|
|
4
|
+
return i("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
|
|
5
|
+
/* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
|
|
6
|
+
/* @__PURE__ */m("span",{className:"text-base",children:N[t]||""}),
|
|
7
|
+
/* @__PURE__ */m("span",{className:"text-sm font-semibold text-gray-700",children:t}),
|
|
8
|
+
/* @__PURE__ */m("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
|
|
9
|
+
/* @__PURE__ */m("span",{className:"text-base",children:N[e]||""}),
|
|
10
|
+
/* @__PURE__ */m("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
|
|
11
|
+
/* @__PURE__ */m("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
|
|
12
|
+
/* @__PURE__ */m(e,{open:C,onClose:()=>v(!1),title:"Currency Settings",appearance:G,onAppearanceChange:H,onSave:()=>{if(0===J.length)return;const t=J.slice(0,4);d(t),x(G),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(G)),v(!1)},children:/* @__PURE__ */i("div",{children:[
|
|
13
|
+
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Currency Pairs ",
|
|
14
|
+
/* @__PURE__ */i("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",J.length,"/",4,")"]})]}),
|
|
15
|
+
/* @__PURE__ */m("div",{className:"space-y-1 mb-2",children:J.map(([t,e],r)=>/* @__PURE__ */i("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
|
|
16
|
+
/* @__PURE__ */i("span",{className:"text-sm",children:[N[t]||""," ",t," → ",N[e]||""," ",e]}),
|
|
17
|
+
/* @__PURE__ */m("button",{onClick:()=>U(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),J.length<4?/* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
|
|
18
|
+
/* @__PURE__ */m("select",{value:O,onChange:t=>R(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
|
|
19
|
+
/* @__PURE__ */m("span",{className:"text-gray-400",children:"→"}),
|
|
20
|
+
/* @__PURE__ */m("select",{value:A,onChange:t=>B(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
|
|
21
|
+
/* @__PURE__ */m("button",{onClick:()=>{O!==A&&J.length<4&&U(t=>[...t,[O,A]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};
|