zframes 0.5.2 → 0.5.3
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/NOTICE +6 -2
- package/dist/index.js +6 -1
- package/package.json +4 -4
- package/runtime/assets/{bitcoin-dominance-CtnczH5N.js → bitcoin-dominance-CxfMBVwW.js} +1 -1
- package/runtime/assets/{breakeven-zbCEQ5ag.js → breakeven-BrpmE2y2.js} +1 -1
- package/runtime/assets/{breathing-6Wmy_hqF.js → breathing-Bjv7D86F.js} +1 -1
- package/runtime/assets/{btc-blocks-D1xOLm2L.js → btc-blocks-Cy-YFeqC.js} +1 -1
- package/runtime/assets/{btc-difficulty-BTbKIqrl.js → btc-difficulty-CQ_30M6B.js} +1 -1
- package/runtime/assets/{btc-fees-5Geh2TSa.js → btc-fees-DsYgskwn.js} +1 -1
- package/runtime/assets/{btc-hashrate-DZfnxUsi.js → btc-hashrate-C0dYT_WJ.js} +1 -1
- package/runtime/assets/{btc-mempool-8oOMDiaW.js → btc-mempool-DipekM7O.js} +1 -1
- package/runtime/assets/{calculator-D91iI7KM.js → calculator-zC8onHXp.js} +1 -1
- package/runtime/assets/{checklist-DNrOJw0w.js → checklist-baxMKxEm.js} +1 -1
- package/runtime/assets/{clock-BzAIAbhU.js → clock-x9v1tYQm.js} +1 -1
- package/runtime/assets/{coin-movers-99W2EABZ.js → coin-movers-fIxzBuhy.js} +1 -1
- package/runtime/assets/{countdown-ZAJmbykg.js → countdown-BlyeM771.js} +1 -1
- package/runtime/assets/{daily-analysis-CS5MqofA.js → daily-analysis-DxjxE53t.js} +1 -1
- package/runtime/assets/{day-meter-DzBvLcpd.js → day-meter-9YEIbKbk.js} +1 -1
- package/runtime/assets/{dex-volume-chart-BfnczfAT.js → dex-volume-chart-CIN2oKpJ.js} +1 -1
- package/runtime/assets/{dex-volume-treemap-CLyIrkgU.js → dex-volume-treemap-CqHdMsnd.js} +1 -1
- package/runtime/assets/{dice-CAvRf0md.js → dice-DnddcY-J.js} +1 -1
- package/runtime/assets/{dino-game-gsyCpJ-0.js → dino-game-D6AH1SSj.js} +1 -1
- package/runtime/assets/{divider-DCTu-qNh.js → divider-Bu8aGlm1.js} +1 -1
- package/runtime/assets/{drawdy-CZWCFtog.js → drawdy-BhOQeakE.js} +1 -1
- package/runtime/assets/{editor-Ckt9OQ98.js → editor-Ca-voh3h.js} +1 -1
- package/runtime/assets/{fear-greed-DOcPswrx.js → fear-greed-i87oWLnT.js} +1 -1
- package/runtime/assets/{filings-feed-Cs--DpYl.js → filings-feed-Cxg9eG9S.js} +1 -1
- package/runtime/assets/{financial-stress-BqnxLk2O.js → financial-stress-Bv_reW65.js} +1 -1
- package/runtime/assets/{flappy-bird-DaasqVGg.js → flappy-bird-BENHBDEL.js} +1 -1
- package/runtime/assets/{fundamentals-GseULnsD.js → fundamentals-AlhngJ8G.js} +1 -1
- package/runtime/assets/{funding-heatmap-2RvVLTPN.js → funding-heatmap-B4RGXX4K.js} +1 -1
- package/runtime/assets/{funding-rate-chart-DCRKHp6g.js → funding-rate-chart-Cg6gi0YC.js} +1 -1
- package/runtime/assets/{fx-board-CVW6VmbY.js → fx-board-BqGsP0Xx.js} +1 -1
- package/runtime/assets/{heading-BaRMJq2t.js → heading-Dr7Q6vy_.js} +1 -1
- package/runtime/assets/{holiday-calendar-2OBfwbh-.js → holiday-calendar-C1fruUVL.js} +1 -1
- package/runtime/assets/{image-CuTXEV7Q.js → image-BulRsYTV.js} +1 -1
- package/runtime/assets/{index-CH54P4Cn.js → index-BgSQpj_B.js} +43 -43
- package/runtime/assets/{inflation-pulse-B8E9uzQB.js → inflation-pulse-Q-3bZn55.js} +1 -1
- package/runtime/assets/{journal-log-7APM_99k.js → journal-log-FuAPC6JH.js} +1 -1
- package/runtime/assets/{journal-open-CcdGuysA.js → journal-open-BREaG6Cs.js} +1 -1
- package/runtime/assets/{journal-results-CUTn4-kq.js → journal-results-Y_pKQcgg.js} +1 -1
- package/runtime/assets/{journal-score-C31dg2yL.js → journal-score-ZATtCKrj.js} +1 -1
- package/runtime/assets/{journal-ui-C5ueSjZx.js → journal-ui-C_1ADbUX.js} +1 -1
- package/runtime/assets/{labor-market-DgvDQtFo.js → labor-market-DVybIeSN.js} +1 -1
- package/runtime/assets/{lightning-stats-CiUlm-e_.js → lightning-stats-ByvWkKyP.js} +1 -1
- package/runtime/assets/{link-grid-DlsY59eq.js → link-grid-CJC48i5r.js} +1 -1
- package/runtime/assets/{market-cap-treemap-6vqLUgVk.js → market-cap-treemap-CpnOP_gY.js} +1 -1
- package/runtime/assets/{market-hours-BArlXOQB.js → market-hours-B9zPCvQk.js} +1 -1
- package/runtime/assets/{marquee-2Di2SqI2.js → marquee-D8GTgVmy.js} +1 -1
- package/runtime/assets/{mining-pools-Bg02wm2V.js → mining-pools-DiyEBr6a.js} +1 -1
- package/runtime/assets/{mover-row-C8040L85.js → mover-row-CO2STKkw.js} +1 -1
- package/runtime/assets/{national-debt-BS57WjA3.js → national-debt-CcTydivP.js} +1 -1
- package/runtime/assets/{news-feed-oBCTiuoo.js → news-feed-D4xS-sLD.js} +1 -1
- package/runtime/assets/{note-BLWlz52v.js → note-BXsj5NlE.js} +1 -1
- package/runtime/assets/{open-interest-DxMqZcmu.js → open-interest-DaFRJd2O.js} +1 -1
- package/runtime/assets/{options-iv-CgIIFdpN.js → options-iv-MpSqgS3E.js} +1 -1
- package/runtime/assets/{options-oi-strike-blRp4kmB.js → options-oi-strike-BHF28ASR.js} +1 -1
- package/runtime/assets/{options-put-call-CyOwXBVQ.js → options-put-call-_ZFaepBW.js} +1 -1
- package/runtime/assets/{pomodoro-BKJlh-bz.js → pomodoro-CxHVmgqp.js} +1 -1
- package/runtime/assets/{portfolio-allocation-Cat1vq2_.js → portfolio-allocation-Cf251dcH.js} +1 -1
- package/runtime/assets/{portfolio-common-DeyRfuNV.js → portfolio-common-DnESc3oR.js} +1 -1
- package/runtime/assets/{portfolio-holdings-DDDhMMFL.js → portfolio-holdings-2vYKEk7f.js} +1 -1
- package/runtime/assets/{portfolio-value-D9qrGeZp.js → portfolio-value-B-7uIpG4.js} +1 -1
- package/runtime/assets/{price-chart-CQJNOBtu.js → price-chart-Cx_2scgb.js} +1 -1
- package/runtime/assets/{price-compare-DqBiHd7S.js → price-compare-DQcEOpnr.js} +1 -1
- package/runtime/assets/{price-liveline-BlVGC2-R.js → price-liveline-TTo-aOFd.js} +1 -1
- package/runtime/assets/{price-ticker-QdVoVaQh.js → price-ticker-Cp7yYsNm.js} +1 -1
- package/runtime/assets/{protocol-fees-treemap-39F-aE33.js → protocol-fees-treemap-D-koQrKr.js} +1 -1
- package/runtime/assets/{protocol-tvl-chart-DZOgbMZu.js → protocol-tvl-chart-CDZkrQuF.js} +1 -1
- package/runtime/assets/{protocol-tvl-treemap-DusQ6xL2.js → protocol-tvl-treemap-I8fjLZU7.js} +1 -1
- package/runtime/assets/{quote-Di049ggj.js → quote-CKEEp9tF.js} +1 -1
- package/runtime/assets/{rates-board-Dm3tb6-P.js → rates-board-BElUHlYN.js} +1 -1
- package/runtime/assets/{returns-projector-BiMx_kSw.js → returns-projector-DjIbvas1.js} +1 -1
- package/runtime/assets/{risk-reward-1Q_Kt75s.js → risk-reward-pVHqmm_g.js} +1 -1
- package/runtime/assets/{rules-card-BkAX9PEq.js → rules-card-uMZQ6oP0.js} +1 -1
- package/runtime/assets/scene-uwfOGek1.js +1 -0
- package/runtime/assets/{session-progress-D_1dzPzM.js → session-progress-Djhvb1G5.js} +1 -1
- package/runtime/assets/{short-volume-U-uFonb2.js → short-volume-CiBfmCKw.js} +1 -1
- package/runtime/assets/{snake-Dp4E3Dcv.js → snake-CYXVjy8d.js} +1 -1
- package/runtime/assets/{spotify-embed-Cw95WZjV.js → spotify-embed-CGYKFOmX.js} +1 -1
- package/runtime/assets/{stopwatch-B2_iDkKK.js → stopwatch-Cl10sfaX.js} +1 -1
- package/runtime/assets/{top-movers--vCUiTII.js → top-movers-vvOomk6S.js} +1 -1
- package/runtime/assets/{treasury-auctions-BpzYivLg.js → treasury-auctions-JMoATy9T.js} +1 -1
- package/runtime/assets/{tvl-treemap-BYgD9bNy.js → tvl-treemap-B28_19EZ.js} +1 -1
- package/runtime/assets/{video-D-nBm697.js → video-DjiOnvMm.js} +1 -1
- package/runtime/assets/{yield-curve-8IsrMS_9.js → yield-curve-Dj5vJwI4.js} +1 -1
- package/runtime/index.html +1 -1
- package/runtime/assets/unicorn-scene-DcohHRPZ.js +0 -1
package/NOTICE
CHANGED
|
@@ -28,6 +28,10 @@ copyright and license; consult the respective package for full terms.
|
|
|
28
28
|
- sirv (with @polka/url, mrmime, totalist) — MIT — static file serving for
|
|
29
29
|
the `serve` runtime (assets, sibling files, SPA fallback).
|
|
30
30
|
- d3, d3-hierarchy — ISC — chart math and layout.
|
|
31
|
-
-
|
|
32
|
-
|
|
31
|
+
- Unicorn Studio engine (unicornStudio.umd.mjs) — proprietary, © Unicorn
|
|
32
|
+
Studio (https://github.com/hiunicornstudio/unicornstudio.js; use granted
|
|
33
|
+
for integration with Unicorn Studio projects) — the optional animated
|
|
34
|
+
background. A copy of the publicly distributed web-embed engine is
|
|
35
|
+
self-hosted in the prebuilt runtime and used only to render Unicorn
|
|
36
|
+
Studio-hosted scenes.
|
|
33
37
|
- react, react-dom — MIT — bundled into the prebuilt runtime the CLI serves.
|
package/dist/index.js
CHANGED
|
@@ -1803,6 +1803,11 @@ function use(args) {
|
|
|
1803
1803
|
// src/init.ts
|
|
1804
1804
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
1805
1805
|
import { dirname, resolve as resolve2 } from "path";
|
|
1806
|
+
|
|
1807
|
+
// ../spec/src/presets.ts
|
|
1808
|
+
var SCENE_DEFAULT_PROJECT_ID = "YrTzGatwjK7EoFpCSfgZ";
|
|
1809
|
+
|
|
1810
|
+
// src/init.ts
|
|
1806
1811
|
function parseArgs(args) {
|
|
1807
1812
|
let target = "dashboard.json";
|
|
1808
1813
|
let title = "my dashboard";
|
|
@@ -1847,7 +1852,7 @@ function skeleton(title, author) {
|
|
|
1847
1852
|
grid: { columns: 12, rowHeight: 96, gap: 12 },
|
|
1848
1853
|
background: {
|
|
1849
1854
|
type: "unicorn",
|
|
1850
|
-
projectId:
|
|
1855
|
+
projectId: SCENE_DEFAULT_PROJECT_ID,
|
|
1851
1856
|
opacity: 1
|
|
1852
1857
|
},
|
|
1853
1858
|
theme: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zframes",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "zframes CLI — serve a dashboard.json as a live, editable market terminal (serve), print the frame catalogue for generating agents (catalogue), and validate a dashboard.json (lint).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zentry",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"typescript": "^5.8.0",
|
|
43
43
|
"@zframes/account": "0.0.0",
|
|
44
44
|
"@zframes/frames": "0.0.0",
|
|
45
|
-
"@zframes/provider-coingecko": "0.0.0",
|
|
46
45
|
"@zframes/provider-alternativeme": "0.0.0",
|
|
47
|
-
"@zframes/provider-
|
|
46
|
+
"@zframes/provider-coingecko": "0.0.0",
|
|
48
47
|
"@zframes/provider-hyperliquid": "0.0.0",
|
|
48
|
+
"@zframes/provider-defillama": "0.0.0",
|
|
49
49
|
"@zframes/serve": "0.0.0",
|
|
50
|
-
"@zframes/spec": "0.0.0",
|
|
51
50
|
"@zframes/store": "0.0.0",
|
|
51
|
+
"@zframes/spec": "0.0.0",
|
|
52
52
|
"@zframes/zai": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as e}from"./react-qoZPGuNy.js";import{b as r,f as p,a as x,c as g}from"./format-CfAcS4D8.js";import{f as j,n as i,o as v}from"./index-
|
|
1
|
+
import{r as f,j as e}from"./react-qoZPGuNy.js";import{b as r,f as p,a as x,c as g}from"./format-CfAcS4D8.js";import{f as j,n as i,o as v}from"./index-BgSQpj_B.js";import{F as o}from"./ui-Bq3RQsdJ.js";i.schema;const c={BTC:"linear-gradient(90deg, #FF810F 0%, #FF9E37 100%)",ETH:"hsl(var(--zf-accent-hue, 242) 85% 72%)",Others:"hsl(var(--zf-accent-hue, 242) 38% 52%)"};function y({config:d}){const{market:s,isLoading:m}=v(),n=f.useMemo(()=>{if(!s)return[];const a=s.dominance.btc??0,t=s.dominance.eth??0;return[{type:"BTC",value:a},{type:"ETH",value:t},{type:"Others",value:Math.max(0,100-a-t)}].sort((h,u)=>u.value-h.value)},[s]);if(m)return e.jsx(o,{loading:!0,children:"loading dominance…"});if(!s)return e.jsx(o,{children:"no market data"});const l=n[0];return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"metric-xl text-strong",children:r(l.value,1)}),e.jsx("span",{className:"body-md text-soft",children:l.type})]}),e.jsx("div",{className:"flex h-3 w-full max-w-sm gap-1 overflow-hidden rounded-full",children:n.map((a,t)=>e.jsx("div",{className:`h-full ${t===0?"rounded-l-full":""} ${t===n.length-1?"rounded-r-full":""}`,style:{width:`${a.value}%`,background:c[a.type]}},a.type))}),e.jsx("div",{className:"grid w-full max-w-sm grid-cols-3",children:n.map(a=>e.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[e.jsx("div",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{background:c[a.type]}}),e.jsx("span",{className:"body-sm text-soft",children:a.type}),e.jsx("span",{className:"body-sm text-normal font-bold tabular-nums",children:r(a.value,1)})]},a.type))}),d.showTotalMarketCap&&e.jsxs("div",{className:"caption text-soft",children:["total mcap ",p(s.totalMarketCapUsd)," ·"," ",e.jsxs("span",{style:{color:g(s.marketCapChangePct24h)},children:[x(s.marketCapChangePct24h)," 24h"]})]})]})}const F=j({...i,component:y});export{F as bitcoinDominanceFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as e}from"./react-qoZPGuNy.js";import{i as c}from"./content-shared-BZ1XzrJx.js";import{d as N,a as j,c as y}from"./format-CfAcS4D8.js";import{f as k,ba as b}from"./index-
|
|
1
|
+
import{r as u,j as e}from"./react-qoZPGuNy.js";import{i as c}from"./content-shared-BZ1XzrJx.js";import{d as N,a as j,c as y}from"./format-CfAcS4D8.js";import{f as k,ba as b}from"./index-BgSQpj_B.js";import{s as z}from"./ui-Bq3RQsdJ.js";b.schema;function C({config:l}){const[o,m]=u.useState(l.fills.length?l.fills:[{price:0,size:0}]),[n,g]=u.useState(l.currentPrice),{avg:r,totalSize:p}=u.useMemo(()=>{let s=0,a=0;for(const t of o)s+=t.price*t.size,a+=t.size;return{avg:a>0?s/a:0,totalSize:a}},[o]),x=r>0&&n>0?(n-r)/r*100:null,d=l.label.trim(),h=(s,a,t)=>m(f=>f.map((i,v)=>v===s?{...i,[a]:t}:i));return e.jsxs("div",{className:"flex h-full w-full flex-col gap-2",children:[d&&e.jsx("div",{className:"caption text-soft shrink-0 uppercase tracking-[0.12em]",children:d}),e.jsxs("div",{className:"shrink-0",children:[e.jsx("div",{className:"caption text-soft",children:"break-even (avg cost)"}),e.jsx("div",{className:"metric-lg text-strong",children:p>0?N(r):"—"}),e.jsxs("div",{className:"caption text-soft",children:[p>0?`${p} units`:"add fills below",x!==null&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("span",{style:{color:y(x)},children:[j(x)," unrealized"]})]})]})]}),e.jsxs("div",{className:`min-h-0 flex-1 ${z}`,children:[o.map((s,a)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsxs("label",{className:`flex flex-1 items-center gap-1 px-2 py-1 ${c}`,children:[e.jsx("span",{className:"caption text-soft",children:"px"}),e.jsx("input",{type:"number",value:Number.isFinite(s.price)?s.price:0,onChange:t=>h(a,"price",Number(t.target.value)),className:"body-sm text-strong w-full bg-transparent outline-none"})]}),e.jsxs("label",{className:`flex flex-1 items-center gap-1 px-2 py-1 ${c}`,children:[e.jsx("span",{className:"caption text-soft",children:"sz"}),e.jsx("input",{type:"number",value:Number.isFinite(s.size)?s.size:0,onChange:t=>h(a,"size",Number(t.target.value)),className:"body-sm text-strong w-full bg-transparent outline-none"})]}),e.jsx("button",{type:"button",onClick:()=>m(t=>t.length>1?t.filter((f,i)=>i!==a):t),className:"caption text-soft hover:text-strong shrink-0 px-1","aria-label":"remove fill",children:"×"})]},a)),e.jsx("button",{type:"button",onClick:()=>m(s=>[...s,{price:0,size:0}]),className:`caption text-soft hover:text-strong w-full px-2 py-1 ${c}`,children:"+ add fill"})]}),e.jsxs("label",{className:`flex shrink-0 items-center gap-1 px-2 py-1 ${c}`,children:[e.jsx("span",{className:"caption text-soft shrink-0",children:"current price"}),e.jsx("input",{type:"number",value:Number.isFinite(n)?n:0,onChange:s=>g(Number(s.target.value)),className:"body-sm text-strong w-full bg-transparent text-right outline-none"})]})]})}const E=k({...b,component:C});export{E as breakevenFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as r}from"./react-qoZPGuNy.js";import{f as m,be as n}from"./index-
|
|
1
|
+
import{r as s,j as r}from"./react-qoZPGuNy.js";import{f as m,be as n}from"./index-BgSQpj_B.js";n.schema;function c(e){return[{name:"Breathe in",dur:e.inhale,scale:1},{name:"Hold",dur:e.hold,scale:1},{name:"Breathe out",dur:e.exhale,scale:.45},{name:"Hold",dur:e.holdAfter,scale:.45}]}function x({config:e}){const t=c(e),[a,l]=s.useState(0);s.useEffect(()=>{l(0)},[e.inhale,e.hold,e.exhale,e.holdAfter]),s.useEffect(()=>{const d=Math.max(0,t[a].dur),u=setTimeout(()=>l(i=>(i+1)%t.length),Math.max(300,d*1e3));return()=>clearTimeout(u)},[a,e.inhale,e.hold,e.exhale,e.holdAfter]);const o=t[a].scale,h=Math.max(.3,t[a].dur);return r.jsxs("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden",children:[r.jsx("div",{className:"aspect-square w-[55%] rounded-full",style:{background:"var(--color-highlight)",opacity:.25,transform:`scale(${o})`,transition:`transform ${h}s ease-in-out`}}),r.jsx("div",{className:"caption text-soft absolute uppercase tracking-[0.2em]",children:t[a].name})]})}const b=m({...n,component:x});export{b as breathingFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{t as c,j as i}from"./format-CfAcS4D8.js";import{f as r,aS as o,aT as m}from"./index-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{t as c,j as i}from"./format-CfAcS4D8.js";import{f as r,aS as o,aT as m}from"./index-BgSQpj_B.js";import{F as a,s as d}from"./ui-Bq3RQsdJ.js";o.schema;function x({config:l}){const{blocks:e,isLoading:n}=m(l.count);return n?s.jsx(a,{loading:!0,children:"loading blocks…"}):e.length===0?s.jsx(a,{children:"no block data yet"}):s.jsx("div",{className:"flex h-full min-h-0 flex-col",children:s.jsx("div",{className:d,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:e.map(t=>s.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 rounded-md bg-white/[0.03] px-2 py-1.5",title:`Block ${t.height} · ${t.poolName} · ${t.txCount.toLocaleString("en-US")} txs`,children:[s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"body-sm text-strong font-bold tabular-nums",children:t.height.toLocaleString("en-US")}),s.jsx("span",{className:"caption text-soft",children:c(t.time)})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"body-sm text-normal block truncate",children:t.poolName}),s.jsxs("span",{className:"caption text-soft",children:[t.txCount.toLocaleString("en-US")," txs"]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("span",{className:"body-sm text-normal block font-bold tabular-nums",children:i(t.totalFees)}),s.jsxs("span",{className:"caption text-soft",children:["~",Math.round(t.medianFee)," sat/vB"]})]})]},t.id))})})})}const j=r({...o,component:x});export{j as btcBlocksFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./react-qoZPGuNy.js";import{a as r,b as m,c as o}from"./format-CfAcS4D8.js";import{f as u,aW as c,aX as h}from"./index-
|
|
1
|
+
import{j as t}from"./react-qoZPGuNy.js";import{a as r,b as m,c as o}from"./format-CfAcS4D8.js";import{f as u,aW as c,aX as h}from"./index-BgSQpj_B.js";import{F as l}from"./ui-Bq3RQsdJ.js";c.schema;function x(n){const e=Math.max(0,Math.round((n-Date.now())/1e3)),i=Math.floor(e/86400),s=Math.floor(e%86400/3600),a=Math.floor(e%3600/60);return i>0?`in ${i}d ${s}h`:s>0?`in ${s}h ${a}m`:`in ${a}m`}function j({config:n}){const{adjustment:e,isLoading:i}=h();if(i)return t.jsx(l,{loading:!0,children:"loading difficulty…"});if(!e)return t.jsx(l,{children:"no difficulty data yet"});const{progressPercent:s,difficultyChange:a,remainingBlocks:d}=e,f=o(a);return t.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[t.jsxs("div",{className:"flex items-end justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"caption text-soft uppercase",children:"next adjustment"}),t.jsx("div",{className:"metric-lg leading-none",style:{color:f},children:r(a)}),t.jsx("div",{className:"body-sm text-soft",children:a>=0?"harder":"easier"})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"body-md text-normal font-bold tabular-nums",children:x(e.estimatedRetargetDate)}),t.jsxs("div",{className:"caption text-soft",children:[d.toLocaleString("en-US")," blocks left"]})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"relative h-2.5 w-full overflow-hidden rounded-full bg-white/[0.08]",children:t.jsx("div",{className:"absolute left-0 top-0 h-full rounded-full",style:{width:`${Math.min(100,Math.max(0,s))}%`,background:"hsl(var(--zf-accent-hue, 242) 85% 72%)"}})}),t.jsxs("div",{className:"caption text-soft mt-1 tabular-nums",children:[m(s,1)," through this epoch"]})]}),n.showPrevious&&t.jsxs("div",{className:"caption text-soft border-t border-white/[0.08] pt-2",children:["previous retarget"," ",t.jsx("span",{className:"font-bold tabular-nums",style:{color:o(e.previousRetarget)},children:r(e.previousRetarget)})]})]})}const N=u({...c,component:j});export{N as btcDifficultyFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./react-qoZPGuNy.js";import{F as i,a as e}from"./btc-shared-DeqDaCze.js";import{f as c,aO as n,aP as f}from"./index-
|
|
1
|
+
import{j as t}from"./react-qoZPGuNy.js";import{F as i,a as e}from"./btc-shared-DeqDaCze.js";import{f as c,aO as n,aP as f}from"./index-BgSQpj_B.js";import{F as a}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";n.schema;const l={fastest:"Next block",halfHour:"~30 min",hour:"~1 hour",economy:"Economy",minimum:"Minimum"},u={fastest:e[0],halfHour:e[1],hour:e[2],economy:e[3],minimum:e[4]};function p({config:m}){const{fees:o,isLoading:r}=f();return r?t.jsx(a,{loading:!0,children:"loading fees…"}):o?t.jsx("div",{className:"flex h-full flex-wrap content-center items-stretch justify-center gap-2",children:m.tiers.map(s=>t.jsx(i,{className:"min-w-[64px] flex-1",color:u[s],value:o[s],caption:l[s]},s))}):t.jsx(a,{children:"no fee data yet"})}const E=c({...n,component:p});export{E as btcFeesFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{k as h,e as l}from"./format-CfAcS4D8.js";import{f as m,aU as i,aV as d}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{k as h,e as l}from"./format-CfAcS4D8.js";import{f as m,aU as i,aV as d}from"./index-BgSQpj_B.js";import{F as r}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-CHM5UBjJ.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";i.schema;function x({config:a}){const{data:t,isLoading:n}=d(a.window),o=c.useMemo(()=>((t==null?void 0:t.hashrates)??[]).map(s=>({date:new Date(s.time).toISOString(),value:s.hashrate})),[t==null?void 0:t.hashrates]);return n?e.jsx(r,{loading:!0,children:"loading hashrate…"}):t?e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"network hashrate"}),e.jsx("div",{className:"metric-lg text-strong leading-none",children:h(t.currentHashrate)})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"body-md text-normal font-bold tabular-nums",children:l(t.currentDifficulty)}),e.jsx("div",{className:"caption text-soft",children:"difficulty"})]})]}),e.jsx(f,{data:o,width:320,height:54,color:"hsl(var(--zf-accent-hue, 242) 85% 72%)"}),e.jsxs("div",{className:"caption text-soft",children:["past ",a.window]})]}):e.jsx(r,{children:"no hashrate data yet"})}const b=m({...i,component:x});export{b as btcHashrateFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{F as m,f as d}from"./btc-shared-DeqDaCze.js";import{e as x}from"./format-CfAcS4D8.js";import{f as p,aQ as o,aR as f}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{F as m,f as d}from"./btc-shared-DeqDaCze.js";import{e as x}from"./format-CfAcS4D8.js";import{f as p,aQ as o,aR as f}from"./index-BgSQpj_B.js";import{F as a,a as j}from"./ui-Bq3RQsdJ.js";o.schema;function u({config:i}){const{state:s,isLoading:n}=f();if(n)return e.jsx(a,{loading:!0,children:"loading mempool…"});if(!s)return e.jsx(a,{children:"no mempool data yet"});const l=s.projected.slice(0,i.projectedBlocks),r=(s.vsize/1e6).toFixed(1);return e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"unconfirmed"}),e.jsx("div",{className:"metric-lg text-strong leading-none",children:s.count.toLocaleString("en-US")}),e.jsx("div",{className:"body-sm text-soft",children:"transactions"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"body-md text-normal font-bold tabular-nums",children:[r," MvB"]}),e.jsx("div",{className:"caption text-soft",children:"pending vsize"})]})]}),e.jsx("div",{className:`flex gap-1.5 ${j}`,children:l.map((t,c)=>e.jsx(m,{className:"min-w-[76px]",color:d(t.medianFee),value:`~${Math.round(t.medianFee)}`,caption:`${x(t.nTx)} tx`},c))})]})}const M=p({...o,component:u});export{M as btcMempoolFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as e}from"./react-qoZPGuNy.js";import{i as C}from"./content-shared-BZ1XzrJx.js";import{f as F,aG as N}from"./index-
|
|
1
|
+
import{r as n,j as e}from"./react-qoZPGuNy.js";import{i as C}from"./content-shared-BZ1XzrJx.js";import{f as F,aG as N}from"./index-BgSQpj_B.js";import{s as A}from"./ui-Bq3RQsdJ.js";N.schema;const R="var(--color-highlight)";function x(t){const s=Number(t);return Number.isFinite(s)?s:0}function d({label:t,value:s,onChange:i,prefix:r,suffix:l}){return e.jsxs("label",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:t}),e.jsxs("span",{className:`flex items-center gap-1 px-2 py-1.5 ${C}`,children:[r&&e.jsx("span",{className:"body-sm text-soft",children:r}),e.jsx("input",{type:"number",inputMode:"decimal",value:s,onChange:c=>i(c.target.value),className:"body-sm text-normal min-w-0 flex-1 bg-transparent text-right tabular-nums outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"}),l&&e.jsx("span",{className:"body-sm text-soft",children:l})]})]})}function M({config:t}){const[s,i]=n.useState(String(t.account)),[r,l]=n.useState(String(t.riskPct)),[c,g]=n.useState(String(t.entry)),[h,v]=n.useState(String(t.stop));n.useEffect(()=>i(String(t.account)),[t.account]),n.useEffect(()=>l(String(t.riskPct)),[t.riskPct]),n.useEffect(()=>g(String(t.entry)),[t.entry]),n.useEffect(()=>v(String(t.stop)),[t.stop]);const a=n.useMemo(()=>{const o=x(s),w=x(r),m=x(c),j=x(h),S=o*w/100,p=Math.abs(m-j),y=p>0?S/p:0,E=y*m,P=m===j?"—":j<m?"long":"short";return{riskAmount:S,perUnit:p,size:y,value:E,side:P,hasStop:p>0}},[s,r,c,h]),u=t.currency,f=o=>`${u}${o.toLocaleString(void 0,{maximumFractionDigits:2})}`,k=o=>o.toLocaleString(void 0,{maximumFractionDigits:o>=1?2:4});return e.jsxs("div",{className:`${A} flex flex-col gap-3`,children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsx(d,{label:"Account",value:s,onChange:i,prefix:u}),e.jsx(d,{label:"Risk",value:r,onChange:l,suffix:"%"}),e.jsx(d,{label:"Entry",value:c,onChange:g,prefix:u}),e.jsx(d,{label:"Stop",value:h,onChange:v,prefix:u})]}),e.jsxs("div",{className:"flex flex-col gap-1.5 rounded-lg border border-white/[0.07] bg-white/[0.03] p-2.5",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:"Position size"}),e.jsx("span",{className:"body-lg font-extrabold tabular-nums",style:{color:a.hasStop?R:void 0},children:a.hasStop?k(a.size):"—"})]}),e.jsx(b,{label:"Risk amount",value:f(a.riskAmount)}),e.jsx(b,{label:"Per-unit risk",value:a.hasStop?f(a.perUnit):"set a stop"}),e.jsx(b,{label:"Position value",value:a.hasStop?f(a.value):"—"}),e.jsx(b,{label:"Direction",value:a.side})]})]})}function b({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("span",{className:"body-sm text-soft",children:t}),e.jsx("span",{className:"body-sm text-normal tabular-nums",children:s})]})}const U=F({...N,component:M});export{U as calculatorFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f as p,bb as o,m as u}from"./index-
|
|
1
|
+
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f as p,bb as o,m as u}from"./index-BgSQpj_B.js";import{s as b}from"./ui-Bq3RQsdJ.js";o.schema;function f({config:s}){const r=u(),[i,m]=x.useState(s.checked),l=r?s.checked:i,h=a=>{const e=s.items.map((k,c)=>c===a?!l[c]:!!l[c]);r?r({checked:e}):m(e)},d=s.items.filter((a,e)=>l[e]).length,n=s.title.trim();return t.jsxs("div",{className:"flex h-full w-full flex-col",children:[t.jsxs("div",{className:"mb-1 flex shrink-0 items-baseline justify-between gap-2",children:[n&&t.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:n}),t.jsxs("div",{className:"caption text-soft shrink-0 tabular-nums",children:[d,"/",s.items.length]})]}),t.jsx("div",{className:`min-h-0 flex-1 ${b}`,children:s.items.map((a,e)=>t.jsxs("button",{type:"button",onClick:()=>h(e),className:"flex w-full items-center gap-2 py-1 text-left",children:[t.jsx("span",{className:"caption flex h-4 w-4 shrink-0 items-center justify-center rounded border leading-none",style:{borderColor:l[e]?"var(--color-highlight)":"rgba(255,255,255,0.2)",background:l[e]?"var(--color-highlight)":"transparent",color:l[e]?"#0b0e14":"transparent"},children:"✓"}),t.jsx("span",{className:`body-sm ${l[e]?"text-disabled line-through":"text-normal"}`,children:a})]},e))})]})}const v=p({...o,component:f});export{v as checklistFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as o}from"./react-qoZPGuNy.js";import{f as R,q as y}from"./index-
|
|
1
|
+
import{r as s,j as o}from"./react-qoZPGuNy.js";import{f as R,q as y}from"./index-BgSQpj_B.js";import{F as b}from"./ui-Bq3RQsdJ.js";import{u as m}from"./use-countdown-BmcF-qdL.js";y.schema;function u(e){const r={hour:"",minute:"",second:"",fractional:"",period:""};for(const n of e.formatToParts(new Date))n.type==="hour"?r.hour=n.value:n.type==="minute"?r.minute=n.value:n.type==="second"?r.second=n.value:n.type==="fractionalSecond"?r.fractional=n.value:n.type==="dayPeriod"&&(r.period=n.value);return r}function j({config:e}){const r=s.useRef(null),n=s.useRef(null),f=s.useRef(null),p=s.useRef(null),h=s.useRef(null),a=e.timezone.trim()||void 0,c=e.showSeconds||e.showMillis,t=s.useMemo(()=>{var l;try{const z=new Intl.DateTimeFormat(void 0,{timeZone:a,hour:"2-digit",minute:"2-digit",second:c?"2-digit":void 0,fractionalSecondDigits:e.showMillis?3:void 0,hour12:e.hour12}),v=e.showDate?new Intl.DateTimeFormat(void 0,{timeZone:a,weekday:"short",month:"short",day:"numeric"}):null;let x="";return e.showTimezone&&(x=((l=new Intl.DateTimeFormat(void 0,{timeZone:a,hour:"2-digit",timeZoneName:"short"}).formatToParts(new Date).find(D=>D.type==="timeZoneName"))==null?void 0:l.value)??""),{time:z,date:v,zone:x,error:null}}catch{return{time:null,date:null,zone:"",error:a??"invalid timezone"}}},[a,c,e.showMillis,e.hour12,e.showDate,e.showTimezone]);if(m({ref:r,getRemainingMs:()=>Date.now(),format:()=>{if(!t.time)return"";const l=u(t.time);return`${l.hour}:${l.minute}`}}),m({ref:n,getRemainingMs:()=>Date.now(),format:()=>t.time?`:${u(t.time).second}`:""}),m({ref:f,getRemainingMs:()=>Date.now(),format:()=>t.time?`.${u(t.time).fractional}`:""}),m({ref:p,getRemainingMs:()=>Date.now(),format:()=>t.time?u(t.time).period:""}),m({ref:h,getRemainingMs:()=>Date.now(),format:()=>t.date?t.date.format(new Date):""}),t.error)return o.jsxs(b,{children:["unknown timezone: ",t.error]});const i=u(t.time),d="var(--color-highlight)",w="0 0 18px hsl(var(--zf-accent-hue, 242) 92% 70% / 0.45)";return o.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-center [container-type:size]",children:[o.jsxs("div",{className:"text-strong inline-flex max-w-full items-baseline justify-center whitespace-nowrap font-dmsans font-extrabold leading-none tracking-[-0.01em] tabular-nums",style:{fontSize:"clamp(1.6rem, 37cqmin, 5.5rem)"},children:[o.jsx("span",{ref:r,suppressHydrationWarning:!0,children:`${i.hour}:${i.minute}`}),c&&o.jsx("span",{ref:n,suppressHydrationWarning:!0,className:"font-bold",style:{fontSize:"0.46em",color:d,textShadow:w},children:`:${i.second}`}),e.showMillis&&o.jsx("span",{ref:f,suppressHydrationWarning:!0,className:"font-semibold",style:{fontSize:"0.3em",color:d,opacity:.65},children:`.${i.fractional}`}),e.hour12&&o.jsx("span",{ref:p,suppressHydrationWarning:!0,className:"text-soft ml-[0.3em] self-center font-semibold uppercase",style:{fontSize:"0.3em",letterSpacing:"0.08em"},children:i.period})]}),e.showDate&&t.date&&o.jsx("div",{ref:h,suppressHydrationWarning:!0,className:"caption text-soft tabular-nums",children:t.date.format(new Date)}),(e.label||t.zone)&&o.jsxs("div",{className:"caption text-soft inline-flex items-center gap-1.5 uppercase tracking-[0.18em]",children:[o.jsx("span",{"aria-hidden":!0,className:"inline-block h-1 w-1 rounded-full",style:{background:d,boxShadow:w}}),e.label&&t.zone?`${e.label} · ${t.zone}`:e.label||t.zone]})]})}const k=R({...y,component:j});export{k as clockFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,j as r}from"./react-qoZPGuNy.js";import{M as l}from"./mover-row-
|
|
1
|
+
import{r as p,j as r}from"./react-qoZPGuNy.js";import{M as l}from"./mover-row-CO2STKkw.js";import{f as h,b5 as t,b6 as x}from"./index-BgSQpj_B.js";import{F as n}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";t.schema;function u({config:e}){const{entries:o,isLoading:c}=x(),{gainers:i,losers:m}=p.useMemo(()=>{const s=o.filter(a=>a.rank<=e.minRank&&a.volume24hUsd>0).map(a=>({symbol:a.symbol,price:a.priceUsd,chg:a.changePct[e.window]??0})).sort((a,d)=>d.chg-a.chg);return{gainers:s.slice(0,e.count),losers:s.slice(-e.count).reverse()}},[o,e.window,e.count,e.minRank]);return c?r.jsx(n,{loading:!0,children:"loading movers…"}):i.length===0?r.jsx(n,{children:"no mover data yet"}):r.jsxs("div",{className:"grid h-full grid-cols-2 gap-x-4 overflow-hidden",children:[r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsxs("div",{className:"caption text-soft uppercase tracking-wide",children:["gainers · ",e.window]}),i.map(s=>r.jsx(l,{symbol:s.symbol,label:s.symbol,price:s.price,changePct:s.chg},s.symbol))]}),r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsxs("div",{className:"caption text-soft uppercase tracking-wide",children:["losers · ",e.window]}),m.map(s=>r.jsx(l,{symbol:s.symbol,label:s.symbol,price:s.price,changePct:s.chg},s.symbol))]})]})}const f=h({...t,component:u});export{f as coinMoversFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as t}from"./react-qoZPGuNy.js";import{f as z,aE as F}from"./index-
|
|
1
|
+
import{r,j as t}from"./react-qoZPGuNy.js";import{f as z,aE as F}from"./index-BgSQpj_B.js";import{F as S}from"./ui-Bq3RQsdJ.js";import{u as g}from"./use-countdown-BmcF-qdL.js";F.schema;const v=864e5,b=36e5,D=6e4;function f(n){let s=Math.max(0,n);const l=Math.floor(s/v);s-=l*v;const m=Math.floor(s/b);s-=m*b;const u=Math.floor(s/D);s-=u*D;const o=Math.floor(s/1e3);return{days:l,hours:m,minutes:u,seconds:o}}const y="var(--color-highlight)",N="0 0 18px hsl(var(--zf-accent-hue, 242) 92% 70% / 0.45)",c=n=>String(n).padStart(2,"0");function T({config:n}){const s=r.useRef(null),l=r.useRef(null),m=r.useRef(null),u=r.useRef(null),o=n.target.trim(),a=r.useMemo(()=>{if(!o)return null;const e=new Date(o).getTime();return Number.isFinite(e)?e:NaN},[o]),i=a!=null&&!Number.isNaN(a),[p,x]=r.useState(i&&a<=Date.now());r.useEffect(()=>{if(!i)return;const e=a-Date.now();if(e<=0){x(!0);return}x(!1);const w=window.setTimeout(()=>x(!0),e);return()=>window.clearTimeout(w)},[i,a]);const d=()=>i?a-Date.now():0;g({ref:s,getRemainingMs:d,format:e=>String(f(e).days)}),g({ref:l,getRemainingMs:d,format:e=>c(f(e).hours)}),g({ref:m,getRemainingMs:d,format:e=>c(f(e).minutes)}),g({ref:u,getRemainingMs:d,format:e=>c(f(e).seconds)});const R=r.useMemo(()=>i?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(a)):"",[i,a]);if(!o)return t.jsx(S,{children:"set a target date & time"});if(!i)return t.jsxs(S,{children:["invalid target date: ",o]});const h=f(d()),k=[[s,String(h.days),"days"],[l,c(h.hours),"hrs"],[m,c(h.minutes),"min"],[u,c(h.seconds),"sec"]];return t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 text-center [container-type:size]",children:[n.label&&t.jsxs("div",{className:"caption text-soft inline-flex items-center gap-1.5 uppercase tracking-[0.18em]",children:[t.jsx("span",{"aria-hidden":!0,className:"inline-block h-1 w-1 rounded-full",style:{background:y,boxShadow:N}}),n.label]}),t.jsx("div",{className:"flex items-start justify-center gap-[0.5em] leading-none tabular-nums",style:{fontSize:"clamp(0.9rem, 20cqmin, 2.8rem)"},children:k.map(([e,w,j],M)=>t.jsxs("div",{className:"flex flex-col items-center gap-[0.25em]",children:[t.jsx("span",{ref:e,suppressHydrationWarning:!0,className:"text-strong font-dmsans font-extrabold tracking-[-0.01em]",style:{fontSize:"1em",color:M===3&&!p?y:void 0,textShadow:M===3&&!p?N:void 0},children:w}),t.jsx("span",{className:"text-soft uppercase tracking-[0.12em]",style:{fontSize:"0.26em"},children:j})]},j))}),p?t.jsx("div",{className:"caption font-semibold uppercase tracking-[0.2em]",style:{color:y,textShadow:N},children:"reached"}):n.showTarget&&R&&t.jsx("div",{className:"caption text-soft tabular-nums",children:R})]})}const q=z({...F,component:T});export{q as countdownFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as s}from"./react-qoZPGuNy.js";import{f as L,r as b,h as R}from"./index-
|
|
1
|
+
import{r as x,j as s}from"./react-qoZPGuNy.js";import{f as L,r as b,h as R}from"./index-BgSQpj_B.js";import{D as g,U as O}from"./format-CfAcS4D8.js";import{F as N,s as C}from"./ui-Bq3RQsdJ.js";b.schema;const h={bullish:O,bearish:g,neutral:"var(--color-soft)"},I={hit:O,miss:g,partial:"#f4a259"};function y(r){let n=0,i=0;for(const m of r)for(const c of m.grades??[])i++,c.verdict==="hit"?n+=1:c.verdict==="partial"&&(n+=.5);return{rate:i?n/i:0,n:i}}function D({config:r}){const[n,i]=x.useState(null),[m,c]=x.useState(!1);if(x.useEffect(()=>{let e=!1;const l=()=>{fetch(r.src,{cache:"no-store"}).then(t=>{if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}).then(t=>{e||(i(t),c(!0))}).catch(()=>{e||c(!0)})};l();const o=()=>l();window.addEventListener("focus",o);const d=window.setInterval(l,r.refreshSec*1e3);return()=>{e=!0,window.removeEventListener("focus",o),window.clearInterval(d)}},[r.src,r.refreshSec]),!m)return s.jsx(N,{loading:!0,children:"loading brief…"});const f=(n==null?void 0:n.entries)??[];if(f.length===0)return s.jsx(N,{children:"no brief yet — run /zframes-brief"});const k=f.slice(-r.entries).reverse(),{rate:E,n:u}=y(f);return s.jsxs("div",{className:`body-sm flex flex-col gap-3 ${C}`,children:[u>0&&s.jsxs("div",{className:"caption text-soft flex items-center justify-between",children:[s.jsx("span",{className:"uppercase tracking-wide",children:"track record"}),s.jsxs("span",{className:"text-strong font-bold tabular-nums",children:[Math.round(E*100),"% · ",u," call",u===1?"":"s"]})]}),k.map((e,l)=>{var o,d,t,j,v,w;return s.jsxs("div",{className:"flex flex-col gap-1.5",children:[(e.date||((o=e.run)==null?void 0:o.model))&&s.jsxs("div",{className:"caption text-soft flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"uppercase tracking-wide",children:e.date}),((d=e.run)==null?void 0:d.model)&&s.jsxs("span",{className:"truncate opacity-70",title:e.run.timestamp??"",children:[e.run.model,e.run.effort?` · ${e.run.effort}`:""]})]}),e.summary&&s.jsx("div",{className:"text-normal whitespace-pre-wrap",children:e.summary}),(((t=e.calls)==null?void 0:t.length)??0)>0&&s.jsx("div",{className:"flex flex-col gap-1",children:(j=e.calls)==null?void 0:j.map((a,p)=>s.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] items-baseline gap-2",children:[s.jsx("span",{className:"caption font-bold uppercase tracking-wide",style:{color:h[a.direction??"neutral"]??h.neutral},children:a.symbol?R(a.symbol):a.direction??"•"}),s.jsx("span",{className:"text-normal",children:a.claim})]},a.id??p))}),(((v=e.grades)==null?void 0:v.length)??0)>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsx("span",{className:"caption text-soft uppercase tracking-wide",children:"graded"}),(w=e.grades)==null?void 0:w.map((a,p)=>s.jsx("span",{className:"caption rounded px-1.5 py-0.5 font-bold uppercase",style:{color:I[a.verdict??""]??h.neutral,background:"var(--color-surface)"},title:a.note??"",children:a.verdict??"—"},a.callId??p))]})]},e.date??l)})]})}const T=L({...b,component:D});export{T as dailyAnalysisFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./react-qoZPGuNy.js";import{E as p,a as c,i as u}from"./market-data-CvmpLFSo.js";import{f,b8 as m}from"./index-
|
|
1
|
+
import{j as a}from"./react-qoZPGuNy.js";import{E as p,a as c,i as u}from"./market-data-CvmpLFSo.js";import{f,b8 as m}from"./index-BgSQpj_B.js";import{F as w}from"./ui-Bq3RQsdJ.js";m.schema;const g=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],j="#f2b066",T=864e5;function b({config:t}){const o=p[t.exchange],n=o?c(t.exchange):null;if(!o||!n)return a.jsx(w,{children:"unknown exchange"});const y=new Date,x=(n.dow+6)%7,i=[];for(let e=0;e<7;e++){const s=c(t.exchange,new Date(y.getTime()+(e-x)*T));if(!s)continue;const r=o.days.includes(s.dow),l=r&&u(t.exchange,s.ymd);i.push({ymd:s.ymd,dow:s.dow,day:Number(s.ymd.split("-")[2]),isToday:s.ymd===n.ymd,isHoliday:l,isTrading:r&&!l})}const h=t.weekdaysOnly?i.filter(e=>o.days.includes(e.dow)):i,d=t.label.trim();return a.jsxs("div",{className:"flex h-full w-full flex-col justify-center gap-1.5",children:[d&&a.jsx("div",{className:"caption text-soft shrink-0 uppercase tracking-[0.12em]",children:d}),a.jsx("div",{className:"flex min-h-0 flex-1 items-stretch gap-1",children:h.map(e=>{const s=!e.isTrading&&!e.isHoliday;return a.jsxs("div",{title:e.isHoliday?"Market holiday":e.isTrading?"Trading day":"Closed",className:`flex flex-1 flex-col items-center justify-center rounded-md border px-1 py-1 ${e.isToday?"text-strong":s?"text-disabled":"text-normal"}`,style:{borderColor:e.isToday?"var(--color-highlight)":"rgba(255,255,255,0.06)",color:e.isHoliday&&!e.isToday?j:void 0},children:[a.jsx("span",{className:"caption opacity-80",children:g[e.dow]}),a.jsx("span",{className:"metric-sm",children:e.day})]},e.ymd)})})]})}const v=f({...m,component:b});export{v as dayMeterFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as r}from"./react-qoZPGuNy.js";import{p as x,f as C}from"./format-CfAcS4D8.js";import{f as M,ao as f,ap as S}from"./index-
|
|
1
|
+
import{r as l,j as r}from"./react-qoZPGuNy.js";import{p as x,f as C}from"./format-CfAcS4D8.js";import{f as M,ao as f,ap as S}from"./index-BgSQpj_B.js";import{F as p}from"./ui-Bq3RQsdJ.js";import{a,C as u}from"./chart-utils-BYIZMM9J.js";import{M as D}from"./index-DK7jWlTL.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";const E={"7D":{ms:10080*60*1e3,timeframe:a["7D"]},"1M":{ms:720*60*60*1e3,timeframe:a["1M"]},"3M":{ms:2160*60*60*1e3,timeframe:a["3M"]}};f.schema;function j({config:t}){const{ms:m,timeframe:c}=E[t.lookback],s=l.useMemo(()=>Date.now()-m,[m]),{history:i,isLoading:d}=S(t.protocols),n=l.useMemo(()=>t.protocols.map((e,h)=>({id:e,name:x(e),color:u[h%u.length],data:(i[e]??[]).filter(o=>o.time>=s).map(o=>({date:new Date(o.time).toISOString(),value:o.value}))})),[t.protocols,i,s]);return d?r.jsx(p,{loading:!0,children:"loading DEX volume…"}):n.every(e=>e.data.length===0)?r.jsx(p,{children:"no DEX volume data yet"}):r.jsx(D,{series:n,timeframe:c,height:250,formatValue:C})}const I=M({...f,component:j});export{I as dexVolumeChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as t}from"./react-qoZPGuNy.js";import{f as i}from"./format-CfAcS4D8.js";import{f as l,am as n,an as p}from"./index-
|
|
1
|
+
import{r as u,j as t}from"./react-qoZPGuNy.js";import{f as i}from"./format-CfAcS4D8.js";import{f as l,am as n,an as p}from"./index-BgSQpj_B.js";import{T as c,a as f}from"./treemap-leaf-DNIoJEK-.js";import{F as s}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";n.schema;function d({width:m,height:r,data:o}){const a=i(o.volume24h);return t.jsx(f,{width:m,height:r,label:o.id,secondary:a,title:`${o.id} · ${a} 24h volume`})}function h({config:m}){const{entries:r,isLoading:o}=p(),a=u.useMemo(()=>r.slice(0,m.topN).map(e=>({id:e.name,value:e.volume24h,volume24h:e.volume24h,changePct:e.changePct??0})),[r,m.topN]);return o?t.jsx(s,{loading:!0,children:"loading DEX volume…"}):a.length===0?t.jsx(s,{children:"no DEX volume data"}):t.jsx(c,{data:a,LeafComponent:d,getColorValue:e=>e.changePct})}const D=l({...n,component:h});export{D as dexVolumeTreemapFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as t}from"./react-qoZPGuNy.js";import{i as w}from"./content-shared-BZ1XzrJx.js";import{f as k,aK as x}from"./index-
|
|
1
|
+
import{r as s,j as t}from"./react-qoZPGuNy.js";import{i as w}from"./content-shared-BZ1XzrJx.js";import{f as k,aK as x}from"./index-BgSQpj_B.js";import{F as b}from"./ui-Bq3RQsdJ.js";x.schema;const h="var(--color-highlight)",p={coin:"Coin flip",dice:"Dice roll",list:"Random pick"},v={1:[!1,!1,!1,!1,!0,!1,!1,!1,!1],2:[!0,!1,!1,!1,!1,!1,!1,!1,!0],3:[!0,!1,!1,!1,!0,!1,!1,!1,!0],4:[!0,!1,!0,!1,!1,!1,!0,!1,!0],5:[!0,!1,!0,!1,!0,!1,!0,!1,!0],6:[!0,!1,!0,!0,!1,!0,!0,!1,!0]};function c(r,e){return r==="coin"?Math.random()<.5?"Heads":"Tails":r==="dice"?String(Math.floor(Math.random()*6)+1):e.length===0?"":e[Math.floor(Math.random()*e.length)]??""}function N({value:r}){const e=v[r];return e?t.jsx("div",{className:"grid grid-cols-3 gap-1","aria-hidden":!0,children:e.map((a,l)=>t.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:a?h:"transparent"}},l))}):null}function E({config:r}){const{mode:e,options:a,label:l}=r,n=e==="list"&&a.length===0,[o,f]=s.useState(()=>c(e,a)),[i,u]=s.useState(!1);s.useEffect(()=>{f(c(e,a))},[e,a]),s.useEffect(()=>{if(!i)return;let d=0;const m=window.setInterval(()=>{f(c(e,a)),d+=1,d>=6&&(window.clearInterval(m),u(!1))},60);return()=>window.clearInterval(m)},[i,e,a]);const g=s.useCallback(()=>{n||u(!0)},[n]);if(n)return t.jsx(b,{children:"add options to decide"});const j=e==="list"?"metric-lg":"metric-xl";return t.jsxs("button",{type:"button",onClick:g,"aria-label":`${p[e]} — roll again`,className:`flex h-full w-full cursor-pointer flex-col items-center justify-center gap-2 px-3 py-2 ${w}`,children:[t.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:p[e]}),t.jsx("span",{"aria-live":"polite",className:`${j} max-w-full break-words text-center leading-none transition-transform`,style:{color:h,transform:i?"scale(1.08)":void 0},children:o}),e==="dice"&&t.jsx(N,{value:Number(o)}),l.trim()&&t.jsx("span",{className:"caption text-soft max-w-full text-center",children:l.trim()}),t.jsx("span",{className:"caption text-disabled uppercase tracking-[0.12em]",children:"click to roll"})]})}const F=k({...x,component:E});export{F as diceFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as M}from"./react-qoZPGuNy.js";import{a as P,d as _,G as T}from"./game-ui-Dy_QYsPr.js";import{f as k,z}from"./index-
|
|
1
|
+
import{r as s,j as M}from"./react-qoZPGuNy.js";import{a as P,d as _,G as T}from"./game-ui-Dy_QYsPr.js";import{f as k,z}from"./index-BgSQpj_B.js";import"./format-CfAcS4D8.js";const F=.6,U=-12,I=40,W=40,b=44,Y=24,X=40,H=3,q=5e-4,p={ground:"rgba(255, 255, 255, 0.1)",groundTexture:"rgba(255, 255, 255, 0.06)",dino:"rgba(255, 255, 255, 1)",eye:"rgba(0, 0, 0, 0.8)",cactus:"#25A78D"};function L(t,n,o,c){t.fillStyle=p.dino,t.fillRect(n+10,o+10,25,24),t.fillRect(n+20,o,20,16),t.fillStyle=p.eye,t.fillRect(n+32,o+4,4,4),t.fillStyle=p.dino,t.fillRect(n,o+16,14,8),t.fillRect(n-4,o+12,8,8),c===null?(t.fillRect(n+12,o+34,6,10),t.fillRect(n+24,o+34,6,10)):(t.fillRect(n+12,o+34,6,c===0?10:6),t.fillRect(n+24,o+34,6,c===1?10:6)),t.fillRect(n+30,o+18,4,10)}function B(t,n,o,c,m){const f=o-m;t.fillStyle=p.cactus,t.fillRect(n+c/2-4,f,8,m),t.fillRect(n,f+10,8,6),t.fillRect(n,f+10,4,14),t.fillRect(n+c-8,f+18,8,6),t.fillRect(n+c-4,f+18,4,12)}function N(t,n,o,c,m,f){const u=t.height-I;n.clearRect(0,0,t.width,t.height),n.fillStyle=p.ground,n.fillRect(0,u,t.width,2),L(n,50,u-b,null),n.textAlign="center",o==="idle"?(n.fillStyle=T.text,n.font='bold 14px "DM Sans", sans-serif',n.fillText("Press SPACE or tap to start",t.width/2,t.height/2-30)):(n.fillStyle=T.gameOver,n.font='bold 20px "DM Sans", sans-serif',n.fillText("GAME OVER",t.width/2,t.height/2-40),n.fillStyle=T.text,n.font='bold 14px "DM Sans", sans-serif',n.fillText(`Score: ${c}`,t.width/2,t.height/2-10),n.fillStyle=T.textSoft,n.fillText("Press SPACE or tap to restart",t.width/2,t.height/2+20)),n.textAlign="left",_(t,n,c,m,f)}function K(){const t=s.useRef(null),n=s.useRef(null),[o,c]=s.useState("idle"),[m,f]=s.useState(0),[u,V]=s.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-dino-high-score");return e?parseInt(e,10):0}return 0}),[v,J]=s.useState(!1),g=s.useRef(0),S=s.useRef(u),D=s.useRef(o),y=s.useRef(P(null));s.useEffect(()=>{S.current=u,u>0&&localStorage.setItem("zframes-dino-high-score",String(u))},[u]),s.useEffect(()=>{D.current=o},[o]);const R=s.useRef({dinoY:0,dinoVelocity:0,isJumping:!1,obstacles:[],speed:H,frameCount:0,groundOffset:0}),O=s.useCallback(()=>{const e=t.current;e&&(R.current={dinoY:e.height-I-b,dinoVelocity:0,isJumping:!1,obstacles:[],speed:H,frameCount:0,groundOffset:0},g.current=0,f(0))},[]),C=s.useCallback(()=>{var i;if((i=n.current)==null||i.focus(),o!=="playing"){O(),c("playing");return}const e=R.current;e.isJumping||(e.dinoVelocity=U,e.isJumping=!0)},[o,O]);return s.useEffect(()=>{const e=a=>{const l=a.target;l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable||(a.code==="Space"||a.code==="ArrowUp")&&(a.preventDefault(),C())},i=n.current;if(i)return i.addEventListener("keydown",e),()=>i.removeEventListener("keydown",e)},[C]),s.useLayoutEffect(()=>{const e=t.current;if(!e)return;const i=()=>{const l=e.parentElement;if(l&&l.clientWidth>0&&l.clientHeight>0){e.width=l.clientWidth,e.height=l.clientHeight,y.current=P(e),R.current.dinoY=e.height-I-b;const E=e.getContext("2d");E&&D.current!=="playing"&&N(e,E,D.current,g.current,S.current,y.current),J(A=>!A)}};i();const a=new ResizeObserver(i);return a.observe(e.parentElement),()=>a.disconnect()},[]),s.useEffect(()=>{if(o!=="playing")return;const e=t.current,i=e==null?void 0:e.getContext("2d");if(!e||!i)return;let a;const l=e.height-I,E=()=>{i.fillStyle=p.ground,i.fillRect(0,l,e.width,2),i.fillStyle=p.groundTexture;const r=R.current.groundOffset%30;for(let h=-r;h<e.width;h+=30)i.beginPath(),i.arc(h,l+12,1.5,0,Math.PI*2),i.fill(),i.beginPath(),i.arc(h+15,l+20,1,0,Math.PI*2),i.fill()},A=r=>{const w=R.current.dinoY;return 50+W-5>r.x&&55<r.x+r.width&&w+b>l-r.height&&w+5<l},G=()=>{const r=R.current;i.clearRect(0,0,e.width,e.height),r.dinoVelocity+=F,r.dinoY+=r.dinoVelocity;const h=l-b;r.dinoY>=h&&(r.dinoY=h,r.dinoVelocity=0,r.isJumping=!1),r.obstacles=r.obstacles.filter(d=>d.x>-Y),r.obstacles.forEach(d=>{d.x-=r.speed});const w=r.obstacles[r.obstacles.length-1],j=300+Math.random()*200;(!w||w.x<e.width-j)&&Math.random()<.02&&r.obstacles.push({x:e.width,width:Y,height:X});for(const d of r.obstacles)if(A(d)){g.current>S.current&&(S.current=g.current,V(g.current)),c("gameover");return}r.frameCount++,r.frameCount%6===0&&(g.current+=1,f(g.current)),r.speed+=q,r.groundOffset+=r.speed,E(),L(i,50,r.dinoY,r.isJumping?null:Math.floor(r.frameCount/5)%2),r.obstacles.forEach(d=>B(i,d.x,l,d.width,d.height)),_(e,i,g.current,S.current,y.current),a=requestAnimationFrame(G)};return a=requestAnimationFrame(G),()=>cancelAnimationFrame(a)},[o]),s.useEffect(()=>{if(o==="playing")return;const e=t.current,i=e==null?void 0:e.getContext("2d");!e||!i||N(e,i,o,m,u,y.current)},[o,m,u,v]),M.jsx("div",{ref:n,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onClick:C,onTouchStart:C,role:"application","aria-label":"Dino running game. Press space or tap to jump over obstacles.",children:M.jsx("canvas",{ref:t,className:"h-full w-full"})})}const ee=k({...z,component:K});export{ee as dinoGameFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./react-qoZPGuNy.js";import{f as o,aI as a}from"./index-
|
|
1
|
+
import{j as t}from"./react-qoZPGuNy.js";import{f as o,aI as a}from"./index-BgSQpj_B.js";a.schema;const i="rgba(255,255,255,0.16)";function n({config:r}){const e=r.orientation==="vertical",s=r.label.trim(),l=c=>t.jsx("span",{className:`shrink ${e?"w-0 flex-1":"h-0 flex-1"} `,style:e?{borderLeftWidth:1,borderLeftStyle:r.style,borderColor:i}:{borderTopWidth:1,borderTopStyle:r.style,borderColor:i}});return s?t.jsxs("div",{className:`flex h-full w-full items-center justify-center gap-3 ${e?"flex-col py-1":"px-1"}`,children:[l(),t.jsx("span",{className:"caption text-soft shrink-0 whitespace-nowrap uppercase tracking-[0.14em]",style:e?{writingMode:"vertical-rl"}:void 0,children:s}),l()]}):t.jsx("div",{className:`flex h-full w-full items-center justify-center ${e?"flex-col":""}`,children:l()})}const m=o({...a,component:n});export{m as dividerFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as a}from"./react-qoZPGuNy.js";import{f as d,aD as s}from"./index-
|
|
1
|
+
import{r as t,j as a}from"./react-qoZPGuNy.js";import{f as d,aD as s}from"./index-BgSQpj_B.js";import{F as o}from"./ui-Bq3RQsdJ.js";function i(){const[r,e]=t.useState("loading");return r==="error"?a.jsx(o,{children:"canvas unavailable"}):a.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:[r==="loading"&&a.jsx("div",{className:"absolute inset-0 z-10",children:a.jsx(o,{loading:!0,children:"loading canvas…"})}),a.jsx("iframe",{src:"https://drawdy.io",title:"Drawdy Canvas",className:`h-full w-full border-0 transition-opacity duration-300 ${r==="loaded"?"opacity-100":"opacity-0"}`,allow:"clipboard-read; clipboard-write",onLoad:()=>e("loaded"),onError:()=>e("error")})]})}const m=d({...s,component:i});export{m as drawdyFrame};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as e,c as Es,a as Jt}from"./react-qoZPGuNy.js";import{G as Qt}from"./gridstack-BxxvPIFU.js";import{t as ut,u as Ts,B as Ne,T as es,F as ts,a as Ls,b as Fs,c as Is,d as $s,N as ss,e as as}from"./index-
|
|
1
|
+
import{r,j as e,c as Es,a as Jt}from"./react-qoZPGuNy.js";import{G as Qt}from"./gridstack-BxxvPIFU.js";import{t as ut,u as Ts,B as Ne,T as es,F as ts,a as Ls,b as Fs,c as Is,d as $s,N as ss,e as as}from"./index-BgSQpj_B.js";/**
|
|
2
2
|
* @license lucide-react v1.21.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,C as l,D as m}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{f as u,C as l,D as m}from"./index-BgSQpj_B.js";import{F as i}from"./ui-Bq3RQsdJ.js";import{M as p}from"./mini-line-chart-CHM5UBjJ.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";l.schema;function x(r){return r<=25?"#F21553":r<=45?"#F97316":r<=55?"#F59E0B":r<=75?"#84CC16":"#25A78D"}function f({config:r}){const{points:s,isLoading:o}=m(r.sparklineDays),t=s[0],d=c.useMemo(()=>[...s].reverse().map(n=>({date:new Date(n.time).toISOString(),value:n.value})),[s]);if(o)return e.jsx(i,{loading:!0,children:"loading index…"});if(!t)return e.jsx(i,{children:"no sentiment data yet"});const a=x(t.value);return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2.5",children:[e.jsx("div",{className:"metric-xl leading-none",style:{color:a,textShadow:`0 0 28px ${a}55`},children:t.value}),e.jsx("div",{className:"body-sm rounded-full px-2.5 py-0.5 font-semibold uppercase tracking-wide",style:{color:a,background:`${a}1f`,border:`1px solid ${a}33`},children:t.classification}),e.jsxs("div",{className:"relative w-full max-w-[180px] overflow-hidden rounded-xl",children:[e.jsx("div",{className:"h-[11px] w-full opacity-40",style:{background:"linear-gradient(90deg, #FF1F5F 4.89%, #464646 34.15%, #464646 69.98%, #81FE90 100%)"}}),e.jsx("div",{className:"absolute left-0 top-0 h-full w-full",style:{background:"repeating-linear-gradient(to right, var(--color-background-terminal), var(--color-background-terminal) 2px, transparent 2px, transparent 3px)"}}),e.jsx("div",{className:"absolute top-1/2 h-3 w-[3px] -translate-x-1/2 -translate-y-1/2 rounded-xs",style:{left:`${t.value}%`,background:a}})]}),e.jsx(p,{data:d,width:150,height:30,color:a}),e.jsxs("div",{className:"caption text-soft",children:["crypto fear & greed · ",r.sparklineDays,"d"]})]})}const b=u({...l,component:f});export{b as fearGreedFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,E as p,G as h,h as u,A as F}from"./index-
|
|
1
|
+
import{r as x,j as t}from"./react-qoZPGuNy.js";import{f,E as p,G as h,h as u,A as F}from"./index-BgSQpj_B.js";import{F as j}from"./feed-row-mVg1d5Zj.js";import{t as b}from"./format-CfAcS4D8.js";import{F as a,s as y}from"./ui-Bq3RQsdJ.js";p.schema;const n={"10-K":"Annual report","10-Q":"Quarterly report","8-K":"Material event","20-F":"Annual report (foreign)","40-F":"Annual report (foreign)","6-K":"Foreign interim report","S-1":"Registration","S-3":"Registration","S-4":"Registration (M&A)","DEF 14A":"Proxy statement",DEFA14A:"Proxy materials","SC 13D":"Activist stake","SC 13G":"Passive stake",SD:"Specialized disclosure",3:"Initial insider ownership",4:"Insider transaction",5:"Annual insider ownership",144:"Proposed insider sale","11-K":"Employee benefit plan"},A=/^(10-K|10-Q|8-K|20-F|40-F|6-K|S-|F-|424|DEF |DEFA|DEFM|11-K|SC 13|25)/i,E=/^(3|4|5|144)(\/A)?$/;function l(e){return e.replace(/^SCHEDULE /i,"SC ").trim()}function S(e,s){return s==="all"?!0:s==="insider"?E.test(e):A.test(e)}function D(e){const s=l(e.form);if(n[s])return n[s];const r=s.replace(/\/A$/,"");return r!==s&&n[r]?`${n[r]} (amended)`:e.description&&e.description.toUpperCase()!==e.form.toUpperCase()?e.description:s}function N({filing:e}){return t.jsx(j,{href:e.url,titleAttr:e.form,leading:t.jsx("span",{className:"caption text-strong inline-flex w-16 shrink-0 justify-center truncate rounded bg-white/[0.06] px-1.5 py-1 font-bold",children:l(e.form)}),title:D(e),subtitle:e.reportDate?`period ${e.reportDate}`:e.items?`items ${e.items}`:e.accessionNumber,meta:e.filingDate?b(new Date(e.filingDate).getTime()):void 0})}function v({config:e}){const{data:s,isLoading:r}=h(e.symbol),m=x.useMemo(()=>((s==null?void 0:s.filings)??[]).filter(i=>S(l(i.form),e.forms)).slice(0,e.count),[s==null?void 0:s.filings,e.forms,e.count]);if(r)return t.jsx(a,{loading:!0,children:"loading SEC filings…"});if(!s)return t.jsxs(a,{children:["no SEC data for “",u(e.symbol),"”"]});const o=s.tickers[0],c=e.symbol.includes(":")?e.symbol:o?`xyz:${o}`:null,d=[s.exchanges[0],s.category].filter(Boolean).join(" · ");return t.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[c&&t.jsx(F,{symbol:c,size:22}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:s.name||o||u(e.symbol)}),d&&t.jsx("div",{className:"caption text-soft truncate",children:d})]})]}),t.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"filings"})]}),t.jsx("div",{className:y,children:m.length>0?m.map(i=>t.jsx(N,{filing:i},i.accessionNumber)):t.jsxs(a,{children:["no ",e.forms==="all"?"":`${e.forms} `,"filings yet"]})})]})}const k=f({...p,component:v});export{k as filingsFeedFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-CfAcS4D8.js";import{f as h,J as l,K as u}from"./index-
|
|
1
|
+
import{r as c,j as e}from"./react-qoZPGuNy.js";import{D as m,U as x}from"./format-CfAcS4D8.js";import{f as h,J as l,K as u}from"./index-BgSQpj_B.js";import{F as r}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-CHM5UBjJ.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";l.schema;function n(t){return t>0?m:x}function p(t){return t>=2.5?"high stress":t>=1?"elevated":t>-1?"near average":"below average"}function j({config:t}){const{stress:s,isLoading:d}=u(),o=c.useMemo(()=>((s==null?void 0:s.trend)??[]).slice(-t.trendDays).map(a=>({date:new Date(a.time).toISOString(),value:a.value})),[t.trendDays,s==null?void 0:s.trend]);if(d)return e.jsx(r,{loading:!0,children:"loading stress index…"});if(!s)return e.jsx(r,{children:"no stress-index data yet"});const i=n(s.value);return e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"OFR FSI"}),e.jsx("div",{className:"body-sm text-normal",children:s.date})]}),e.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"metric-xl leading-none",style:{color:i,textShadow:`0 0 24px ${i}44`},children:[s.value>0?"+":"",s.value.toFixed(2)]}),e.jsx("div",{className:"caption text-soft mt-1",children:p(s.value)})]}),e.jsxs("div",{className:"caption text-soft max-w-[46%] text-right leading-snug",children:["0 = long-run average",e.jsx("br",{}),"higher = more stress"]})]}),e.jsx(f,{data:o,width:210,height:42,color:i}),t.showCategories&&s.categories.length>0&&e.jsx("div",{className:"grid grid-cols-2 gap-1.5 border-t border-white/[0.08] pt-2",children:s.categories.map(a=>e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"caption text-soft truncate",children:a.label}),e.jsxs("span",{className:"body-sm font-bold tabular-nums",style:{color:n(a.value)},children:[a.value>0?"+":"",a.value.toFixed(2)]})]},a.label))})]})}const y=h({...l,component:j});export{y as financialStressFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-Dy_QYsPr.js";import{f as O,aB as v}from"./index-
|
|
1
|
+
import{r as i,j as x}from"./react-qoZPGuNy.js";import{a as F,d as _,G as I}from"./game-ui-Dy_QYsPr.js";import{f as O,aB as v}from"./index-BgSQpj_B.js";import"./format-CfAcS4D8.js";const L=.225,j=-3.6,b=52,A=132,z=210,U=1.3,C=64,p=12,M=28,N=28,R={bird:"rgba(255, 255, 255, 0.95)",eye:"rgba(0, 0, 0, 0.8)",pipe:"hsla(160, 64%, 40%, 0.9)",ground:"rgba(255, 255, 255, 0.1)"};function B(t,r,f,d){t.save(),t.translate(C,r),t.rotate(Math.max(-.5,Math.min(.9,f*.06))),t.fillStyle=R.bird,t.beginPath(),t.arc(0,0,p,0,Math.PI*2),t.fill(),t.fillStyle=d,t.fillRect(-p+2,0,10,5),t.fillStyle=R.eye,t.beginPath(),t.arc(5,-4,2,0,Math.PI*2),t.fill(),t.restore()}function V(t,r,f,d,y,h){r.clearRect(0,0,t.width,t.height);const c=t.height-M;r.fillStyle=R.ground,r.fillRect(0,c,t.width,2),B(r,t.height/2,0,h),r.textAlign="center",f==="idle"?(r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText("Press SPACE or tap to fly",t.width/2,t.height/2-40)):(r.fillStyle=I.gameOver,r.font='bold 20px "DM Sans", sans-serif',r.fillText("GAME OVER",t.width/2,t.height/2-50),r.fillStyle=I.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText(`Score: ${d}`,t.width/2,t.height/2-22),r.fillStyle=I.textSoft,r.fillText("Press SPACE or tap to retry",t.width/2,t.height/2+6)),r.textAlign="left",_(t,r,d,y,h)}function X(){const t=i.useRef(null),r=i.useRef(null),[f,d]=i.useState("idle"),[y,h]=i.useState(0),[c,H]=i.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-flappy-bird-high-score");return e?parseInt(e,10):0}return 0}),[,k]=i.useState(!1),u=i.useRef(0),g=i.useRef(c),E=i.useRef(f),m=i.useRef(F(null));i.useEffect(()=>{g.current=c,c>0&&localStorage.setItem("zframes-flappy-bird-high-score",String(c))},[c]),i.useEffect(()=>{E.current=f},[f]);const w=i.useRef({birdY:0,birdVel:0,pipes:[],frameCount:0}),G=i.useCallback(e=>{const n=e.height-M,a=N,l=n-N-A;return a+Math.random()*Math.max(0,l-a)},[]),T=i.useCallback(()=>{const e=t.current;e&&(w.current={birdY:e.height/2,birdVel:0,pipes:[{x:e.width+60,gapY:G(e),passed:!1}],frameCount:0},u.current=0,h(0))},[G]),P=i.useCallback(()=>{var e;if((e=r.current)==null||e.focus(),E.current!=="playing"){T(),d("playing");return}w.current.birdVel=j},[T]);return i.useEffect(()=>{const e=a=>{const l=a.target;l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable||(a.code==="Space"||a.code==="ArrowUp")&&(a.preventDefault(),P())},n=r.current;if(n)return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)},[P]),i.useLayoutEffect(()=>{const e=t.current;if(!e)return;const n=()=>{const l=e.parentElement;if(l&&l.clientWidth>0&&l.clientHeight>0){e.width=l.clientWidth,e.height=l.clientHeight,m.current=F(e);const S=e.getContext("2d");E.current!=="playing"&&(w.current.birdY=e.height/2,S&&V(e,S,E.current,u.current,g.current,m.current)),k(Y=>!Y)}};n();const a=new ResizeObserver(n);return a.observe(e.parentElement),()=>a.disconnect()},[]),i.useEffect(()=>{if(f!=="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");if(!e||!n)return;let a;const l=e.height-M,S=()=>{u.current>g.current&&(g.current=u.current,H(u.current)),d("gameover")},Y=()=>{const o=w.current;n.clearRect(0,0,e.width,e.height),o.birdVel+=L,o.birdY+=o.birdVel,o.pipes=o.pipes.filter(s=>s.x>-b),o.pipes.forEach(s=>s.x-=U);const D=o.pipes[o.pipes.length-1];if((!D||D.x<e.width-z)&&o.pipes.push({x:e.width,gapY:G(e),passed:!1}),o.birdY-p<=0||o.birdY+p>=l){S();return}for(const s of o.pipes){if(C+p>s.x&&C-p<s.x+b&&(o.birdY-p<s.gapY||o.birdY+p>s.gapY+A)){S();return}!s.passed&&s.x+b<C&&(s.passed=!0,u.current+=1,h(u.current))}n.fillStyle=R.pipe;for(const s of o.pipes)n.fillRect(s.x,0,b,s.gapY),n.fillRect(s.x,s.gapY+A,b,l-(s.gapY+A));n.fillStyle=R.ground,n.fillRect(0,l,e.width,2),B(n,o.birdY,o.birdVel,m.current),_(e,n,u.current,g.current,m.current),o.frameCount++,a=requestAnimationFrame(Y)};return a=requestAnimationFrame(Y),()=>cancelAnimationFrame(a)},[f]),i.useEffect(()=>{if(f==="playing")return;const e=t.current,n=e==null?void 0:e.getContext("2d");!e||!n||V(e,n,f,y,c,m.current)},[f,y,c]),x.jsx("div",{ref:r,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onClick:P,onTouchStart:P,role:"application","aria-label":"Flappy bird game. Press space or tap to flap.",children:x.jsx("canvas",{ref:t,className:"h-full w-full"})})}const Q=O({...v,component:X});export{Q as flappyBirdFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{f as c,H as r,I as o,h as i}from"./index-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{f as c,H as r,I as o,h as i}from"./index-BgSQpj_B.js";import{d as m,e as d,f}from"./format-CfAcS4D8.js";import{F as n,s as u}from"./ui-Bq3RQsdJ.js";r.schema;function x(a){return a.unit==="USD/shares"?m(a.value):a.unit==="shares"?d(a.value):f(a.value)}function h({config:a}){const{data:t,isLoading:l}=o(a.symbol);return l?s.jsx(n,{loading:!0,children:"loading SEC financials…"}):!t||t.metrics.length===0?s.jsxs(n,{children:["no SEC financials for “",i(a.symbol),"”"]}):s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"body-sm text-strong truncate font-semibold",children:t.entityName||i(a.symbol)}),s.jsx("div",{className:"caption text-soft truncate",children:"SEC EDGAR · XBRL company facts"})]}),s.jsx("div",{className:"caption text-soft shrink-0 text-right",children:"on filing"})]}),s.jsx("div",{className:`grid grid-cols-2 content-start gap-2 ${u}`,children:t.metrics.map(e=>s.jsxs("div",{className:"rounded bg-white/[0.04] px-3 py-2",children:[s.jsx("div",{className:"caption text-soft truncate",children:e.label}),s.jsx("div",{className:"metric-sm text-strong",children:x(e)}),s.jsx("div",{className:"caption text-soft truncate",children:e.fiscalPeriod})]},e.label))})]})}const N=c({...r,component:h});export{N as fundamentalsFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as k,r as c,j as i}from"./react-qoZPGuNy.js";import{f as L,S as N,U as X,h as Y}from"./index-
|
|
1
|
+
import{R as k,r as c,j as i}from"./react-qoZPGuNy.js";import{f as L,S as N,U as X,h as Y}from"./index-BgSQpj_B.js";import{h as q}from"./format-CfAcS4D8.js";import{F as D}from"./ui-Bq3RQsdJ.js";import{c as B}from"./utils-DaT-yT0k.js";const z="4px",G=6,P=80,K=24;function J({data:u,className:_,CellComponent:R,getColorValue:g,gap:x=G,showLabels:l=!1,rowLabelWidth:p=P,columnLabelHeight:b=K}){const j=c.useRef(null),[,M]=c.useTransition(),[m,w]=c.useState({width:0,height:0});c.useEffect(()=>{const t=j.current;if(t){const e=new ResizeObserver(()=>{M(()=>{w({width:t.offsetWidth,height:t.offsetHeight})})});return e.observe(t),()=>{e.disconnect()}}},[]);const{uniqueRows:v,uniqueColumns:I,rowToIndex:C,columnToIndex:E}=c.useMemo(()=>{const t=new Set,e=new Set,n=[],r=[];for(const s of u)t.has(s.row)||(t.add(s.row),n.push(s.row)),e.has(s.column)||(e.add(s.column),r.push(s.column));const a=new Map(n.map((s,f)=>[s,f])),d=new Map(r.map((s,f)=>[s,f]));return{uniqueRows:n,uniqueColumns:r,rowToIndex:a,columnToIndex:d}},[u]),h=c.useMemo(()=>{const t=l?p:0,e=l?b:0;return{x:t,y:e,width:Math.max(0,m.width-t),height:Math.max(0,m.height-e)}},[m,l,p,b]),y=c.useMemo(()=>{const t=I.length,e=v.length,n=t>0?Math.max(0,(h.width-x*(t-1))/t):0,r=e>0?Math.max(0,(h.height-x*(e-1))/e):0;return{cellWidth:n,cellHeight:r,columnX:s=>s*(n+x),rowY:s=>s*(r+x)}},[v.length,I.length,h,x]),S=c.useMemo(()=>{const t=u.map(o=>g?g(o):o.value),e=t.filter(o=>o>=0),n=t.filter(o=>o<0),r=e.length>0?Math.min(...e):0,a=e.length>0?Math.max(...e):0,d=n.length>0?Math.min(...n):0,s=n.length>0?Math.max(...n):0,f=o=>o<0?s===d?1:(o-s)/(d-s):a===r?1:(o-r)/(a-r);return u.map(o=>{const T=g?g(o):o.value,$=f(T),W=T>=0;return{cell:o,colorValue:T,intensity:$,isPositive:W}})},[u,g]),F=(t,e)=>{if(e){const a=Math.round(34+t*16);return`hsl(152 ${Math.round(42+t*20)}% ${a}%)`}const n=Math.round(36+t*15);return`hsl(350 ${Math.round(48+t*22)}% ${n}%)`},A=c.useMemo(()=>{const{cellWidth:t,cellHeight:e,columnX:n,rowY:r}=y;return t<=0||e<=0?null:S.map(({cell:a,intensity:d,isPositive:s})=>{const f=C.get(a.row),o=E.get(a.column);if(f===void 0||o===void 0)return null;const T=F(d,s);return i.jsx("div",{className:"group absolute cursor-pointer border border-transparent hover:bg-[radial-gradient(146.13%_118.42%_at_50%_-15.5%,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0)_99.59%)] hover:bg-gradient-to-t",style:{left:h.x+n(o),top:h.y+r(f),width:t,height:e,borderRadius:z,backgroundColor:T},children:i.jsx(R,{width:t,height:e,data:a,rowIndex:f,columnIndex:o,colorIntensity:d,isPositive:s})},a.id)})},[S,y,h,C,E,R]),O=c.useMemo(()=>{if(!l)return null;const{cellHeight:t,rowY:e}=y;return v.map((n,r)=>i.jsx("div",{className:"absolute flex items-center justify-end pr-2 text-xs text-white/60",style:{left:0,top:h.y+e(r),width:p,height:t},children:i.jsx("span",{className:"truncate",children:n})},`row-${n}`))},[l,v,y,h,p]),U=c.useMemo(()=>{if(!l)return null;const{cellWidth:t,columnX:e}=y;return I.map((n,r)=>i.jsx("div",{className:"absolute flex items-end justify-center pb-1 text-xs text-white/60",style:{left:h.x+e(r),top:0,width:t,height:b},children:i.jsx("span",{className:"truncate",children:n})},`col-${n}`))},[l,I,y,h,b]);return i.jsx("div",{className:B("h-full w-full",_),ref:j,children:i.jsxs("div",{className:"relative overflow-hidden",style:{height:m.height,width:m.width},children:[O,U,A]})})}const Q=k.memo(J);N.schema;const H=1440*60*1e3,Z=10080*60*1e3;function V({data:u,width:_}){return _<44?null:i.jsx("div",{className:"flex h-full w-full items-center justify-center",children:i.jsx("span",{className:"caption text-normal tabular-nums",children:q(u.rate*100)})})}function tt({config:u}){const _=c.useMemo(()=>Date.now()-Z,[]),{history:R,isLoading:g}=X(u.symbols,_),x=c.useMemo(()=>{const l=[];for(const p of u.symbols){const b=R[p]??[],j=new Map;for(const M of b){const m=Math.floor(M.time/H)*H,w=j.get(m)??{sum:0,n:0};w.sum+=M.fundingRate,w.n+=1,j.set(m,w)}for(const[M,{sum:m,n:w}]of j){const v=m/w,C=new Date(M).toLocaleDateString("en-US",{month:"short",day:"numeric"});l.push({id:`${p}-${M}`,row:Y(p),column:C,value:v*1e4,rate:v})}}return l},[R,u.symbols]);return g?i.jsx(D,{loading:!0,children:"loading funding…"}):x.length===0?i.jsx(D,{children:"no funding data"}):i.jsx(Q,{data:x,CellComponent:V,gap:3,showLabels:!0,rowLabelWidth:48,columnLabelHeight:20})}const ct=L({...N,component:tt});export{ct as fundingHeatmapFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,V as d,U as C,h as M}from"./index-
|
|
1
|
+
import{r as o,j as a}from"./react-qoZPGuNy.js";import{f as l,V as d,U as C,h as M}from"./index-BgSQpj_B.js";import{h as R}from"./format-CfAcS4D8.js";import{F as f}from"./ui-Bq3RQsdJ.js";import{a as r,C as u}from"./chart-utils-BYIZMM9J.js";import{M as S}from"./index-DK7jWlTL.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";const x={"24h":{ms:1440*60*1e3,timeframe:r["24h"]},"7D":{ms:10080*60*1e3,timeframe:r["7D"]},"1M":{ms:720*60*60*1e3,timeframe:r["1M"]}};d.schema;function F({config:e}){const{ms:s,timeframe:h}=x[e.lookback],c=o.useMemo(()=>Date.now()-s,[s]),{history:m,isLoading:p}=C(e.symbols,c),i=o.useMemo(()=>e.symbols.map((t,g)=>({id:t,name:M(t),color:u[g%u.length],data:(m[t]??[]).map(n=>({date:new Date(n.time).toISOString(),value:n.fundingRate*100}))})),[e.symbols,m]);return p?a.jsx(f,{loading:!0,children:"loading funding rates…"}):i.every(t=>t.data.length===0)?a.jsx(f,{children:"no funding data yet"}):a.jsx(S,{series:i,timeframe:h,height:250,formatValue:R})}const I=l({...d,component:F});export{I as fundingRateChartFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-CfAcS4D8.js";import{f as b,ad as d,ae as j}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{c as x,i as p,a as f}from"./format-CfAcS4D8.js";import{f as b,ad as d,ae as j}from"./index-BgSQpj_B.js";import{F as c}from"./ui-Bq3RQsdJ.js";import{M as u}from"./mini-line-chart-CHM5UBjJ.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";d.schema;function g({config:a}){var n,o;const{rates:t,isLoading:h}=j(a.base,a.symbols);if(h)return e.jsx(c,{loading:!0,children:"loading FX rates…"});if(!t.length)return e.jsx(c,{children:"no FX data yet"});const r=(o=(n=t[0])==null?void 0:n.history.at(-1))==null?void 0:o.time;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"FX rates"}),e.jsxs("div",{className:"body-sm text-normal",children:["1 ",a.base.toUpperCase()," buys"]})]}),e.jsx("div",{className:"caption text-soft text-right",children:r?new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric"}):"ECB daily"})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:t.map(s=>{const i=x(s.changePct),l=s.history.map(m=>({date:new Date(m.time).toISOString(),value:m.value}));return e.jsxs("div",{className:"flex items-center gap-3 border-b border-white/[0.06] py-1.5 last:border-b-0",children:[e.jsx("span",{className:"body-sm w-9 font-bold text-strong",children:s.symbol}),e.jsx("div",{className:"flex-1"}),a.showSparkline&&l.length>1&&e.jsx(u,{data:l,width:72,height:20,color:i}),e.jsxs("span",{className:"whitespace-nowrap text-right tabular-nums",children:[e.jsx("span",{className:"body-sm text-strong",children:p(s.rate)}),e.jsx("span",{className:"caption ml-2 font-bold",style:{color:i},children:f(s.changePct)})]})]},s.symbol)})})]})}const B=b({...d,component:g});export{B as fxBoardFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{f as l,W as s}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{f as l,W as s}from"./index-BgSQpj_B.js";s.schema;function n({config:a}){return e.jsxs("div",{className:"flex h-full w-full items-end gap-3 pb-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-[5px] w-[5px] shrink-0 rounded-full",style:{background:"var(--color-highlight)",boxShadow:"0 0 8px var(--color-highlight)"}}),e.jsx("h2",{className:"body-md text-strong font-extrabold uppercase leading-none tracking-[0.14em]",children:a.title})]}),a.subtitle&&e.jsx("p",{className:"caption text-soft pl-[13px] leading-none",children:a.subtitle})]}),e.jsx("span",{className:"mb-[5px] h-px flex-1",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 65%, transparent)"}})]})}const i=l({...s,component:n});export{i as headingFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,b7 as m}from"./index-
|
|
1
|
+
import{j as n}from"./react-qoZPGuNy.js";import{E as d,a as u,n as h}from"./market-data-CvmpLFSo.js";import{M as f}from"./metric-row-BVVhjsjK.js";import{f as x,b7 as m}from"./index-BgSQpj_B.js";import{F as i,s as p}from"./ui-Bq3RQsdJ.js";m.schema;function y(e,o){const[t,a,s]=e.split("-").map(Number),[l,r,c]=o.split("-").map(Number);return Math.round((Date.UTC(l,r-1,c)-Date.UTC(t,a-1,s))/864e5)}function b(e){const[o,t,a]=e.split("-").map(Number);return new Date(Date.UTC(o,t-1,a)).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"})}function C(e){return e<=0?"today":e===1?"tomorrow":`in ${e}d`}function j({config:e}){var l;if(!d[e.exchange])return n.jsx(i,{children:"unknown exchange"});const t=(l=u(e.exchange))==null?void 0:l.ymd,a=h(e.exchange,e.count),s=e.label.trim();return!t||a.length===0?n.jsx(i,{children:"no upcoming holidays on file"}):n.jsxs("div",{className:"flex h-full w-full flex-col",children:[s&&n.jsx("div",{className:"caption text-soft mb-1 shrink-0 uppercase tracking-[0.12em]",children:s}),n.jsx("div",{className:`min-h-0 flex-1 ${p}`,children:a.map(r=>n.jsx(f,{label:b(r),value:C(y(t,r))},r))})]})}const k=x({...m,component:j});export{k as holidayCalendarFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as e}from"./react-qoZPGuNy.js";import{f as l,X as o}from"./index-
|
|
1
|
+
import{r as s,j as e}from"./react-qoZPGuNy.js";import{f as l,X as o}from"./index-BgSQpj_B.js";import{F as i}from"./ui-Bq3RQsdJ.js";o.schema;function n({config:a}){const[t,r]=s.useState("loading");return s.useEffect(()=>r("loading"),[a.url]),t==="error"?e.jsx(i,{children:"image unavailable"}):e.jsxs("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden rounded-md",children:[t==="loading"&&e.jsx("div",{className:"absolute inset-0 z-10",children:e.jsx(i,{loading:!0,children:"loading image…"})}),e.jsx("img",{src:a.url,alt:a.alt,className:`h-full w-full transition-opacity duration-300 ${t==="loaded"?"opacity-100":"opacity-0"}`,style:{objectFit:a.fit},onLoad:()=>r("loaded"),onError:()=>r("error")})]})}const c=l({...o,component:n});export{c as imageFrame};
|