zframes 0.5.3 → 0.7.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.
Files changed (134) hide show
  1. package/dist/index.js +735 -9
  2. package/package.json +5 -5
  3. package/runtime/assets/{bitcoin-dominance-CxfMBVwW.js → bitcoin-dominance-rskkp4h2.js} +1 -1
  4. package/runtime/assets/{breakeven-BrpmE2y2.js → breakeven-DyCA3ya5.js} +1 -1
  5. package/runtime/assets/{breathing-Bjv7D86F.js → breathing-C8Y-Izs8.js} +1 -1
  6. package/runtime/assets/{btc-blocks-Cy-YFeqC.js → btc-blocks-BxS4aEAB.js} +1 -1
  7. package/runtime/assets/{btc-difficulty-CQ_30M6B.js → btc-difficulty-CNFxEiPh.js} +1 -1
  8. package/runtime/assets/{btc-fees-DsYgskwn.js → btc-fees-Db-5JKh9.js} +1 -1
  9. package/runtime/assets/{btc-hashrate-C0dYT_WJ.js → btc-hashrate-Dy2c30Gb.js} +1 -1
  10. package/runtime/assets/{btc-mempool-DipekM7O.js → btc-mempool-DFgUVk8y.js} +1 -1
  11. package/runtime/assets/{calculator-zC8onHXp.js → calculator-v01_FkZv.js} +1 -1
  12. package/runtime/assets/chain-activity-CuA1eiPY.js +1 -0
  13. package/runtime/assets/{chart-utils-BYIZMM9J.js → chart-utils-Ct7WziT9.js} +1 -1
  14. package/runtime/assets/{checklist-baxMKxEm.js → checklist-Be_y1aTE.js} +1 -1
  15. package/runtime/assets/{clock-x9v1tYQm.js → clock-BWFux5om.js} +1 -1
  16. package/runtime/assets/{coin-movers-fIxzBuhy.js → coin-movers-BcXfoFc6.js} +1 -1
  17. package/runtime/assets/{countdown-BlyeM771.js → countdown-CXSOeUWD.js} +1 -1
  18. package/runtime/assets/cycle-shared-pyXzkgt1.js +1 -0
  19. package/runtime/assets/cycle-signals-BrKJX2c6.js +1 -0
  20. package/runtime/assets/{d3-xK4fOkBU.js → d3-Dr3MHXm3.js} +1 -1
  21. package/runtime/assets/{daily-analysis-DxjxE53t.js → daily-analysis-CWluVygw.js} +1 -1
  22. package/runtime/assets/{day-meter-9YEIbKbk.js → day-meter-Bi5OZCC4.js} +1 -1
  23. package/runtime/assets/defi-revenue-CFNSNfG7.js +1 -0
  24. package/runtime/assets/dex-hot-pools-C4TrRB17.js +1 -0
  25. package/runtime/assets/dex-pool-treemap-DqvlN1Jo.js +1 -0
  26. package/runtime/assets/{dex-volume-chart-CIN2oKpJ.js → dex-volume-chart-BLR-L_B0.js} +1 -1
  27. package/runtime/assets/{dex-volume-treemap-CqHdMsnd.js → dex-volume-treemap-qyEBx4ll.js} +1 -1
  28. package/runtime/assets/{dice-DnddcY-J.js → dice-CuzcQipj.js} +1 -1
  29. package/runtime/assets/{dino-game-D6AH1SSj.js → dino-game-CiGWzsag.js} +1 -1
  30. package/runtime/assets/{divider-Bu8aGlm1.js → divider-DvK5oM9v.js} +1 -1
  31. package/runtime/assets/{drawdy-BhOQeakE.js → drawdy-Bxr7eJ-7.js} +1 -1
  32. package/runtime/assets/dxy-CVbZmRsT.js +1 -0
  33. package/runtime/assets/editor-CQM8mtD8.css +1 -0
  34. package/runtime/assets/editor-EOEtB4_n.js +68 -0
  35. package/runtime/assets/etf-flows-Cl1WliDl.js +1 -0
  36. package/runtime/assets/etf-flows-chart-B4Im9TVy.js +1 -0
  37. package/runtime/assets/eth-staking-_q2b8DEx.js +1 -0
  38. package/runtime/assets/eth-supply-55OpYYBL.js +1 -0
  39. package/runtime/assets/{fear-greed-i87oWLnT.js → fear-greed-CywOCckQ.js} +1 -1
  40. package/runtime/assets/{filings-feed-Cxg9eG9S.js → filings-feed-CosEi4NL.js} +1 -1
  41. package/runtime/assets/{financial-stress-Bv_reW65.js → financial-stress-DBCae4TA.js} +1 -1
  42. package/runtime/assets/{flappy-bird-BENHBDEL.js → flappy-bird-CBVgwfgX.js} +1 -1
  43. package/runtime/assets/{fundamentals-AlhngJ8G.js → fundamentals-zRwGUcmb.js} +1 -1
  44. package/runtime/assets/funding-comparison-wCNoCb1H.js +1 -0
  45. package/runtime/assets/{funding-heatmap-B4RGXX4K.js → funding-heatmap-a4zdnKi9.js} +1 -1
  46. package/runtime/assets/{funding-rate-chart-Cg6gi0YC.js → funding-rate-chart-Da9WMKyJ.js} +1 -1
  47. package/runtime/assets/{fx-board-BqGsP0Xx.js → fx-board-CxhwDBHO.js} +1 -1
  48. package/runtime/assets/{heading-Dr7Q6vy_.js → heading-b5H33lig.js} +1 -1
  49. package/runtime/assets/{holiday-calendar-C1fruUVL.js → holiday-calendar-C77t3m6c.js} +1 -1
  50. package/runtime/assets/{image-BulRsYTV.js → image-C8ZSUHEx.js} +1 -1
  51. package/runtime/assets/{index-XGtH5pVY.css → index-BXLwJuoo.css} +1 -1
  52. package/runtime/assets/index-C-VdMqKb.css +1 -0
  53. package/runtime/assets/index-DKixdHYB.js +1 -0
  54. package/runtime/assets/index-kB-TyxKi.js +1073 -0
  55. package/runtime/assets/indicators-CogwjDn9.js +1 -0
  56. package/runtime/assets/{inflation-pulse-Q-3bZn55.js → inflation-pulse-CoXcuabd.js} +1 -1
  57. package/runtime/assets/{journal-log-FuAPC6JH.js → journal-log-BDu39CBE.js} +1 -1
  58. package/runtime/assets/{journal-open-BREaG6Cs.js → journal-open-FejLOzlA.js} +1 -1
  59. package/runtime/assets/{journal-results-Y_pKQcgg.js → journal-results-CtKy6MZM.js} +1 -1
  60. package/runtime/assets/{journal-score-ZATtCKrj.js → journal-score-Bd7IDYl4.js} +1 -1
  61. package/runtime/assets/{journal-ui-C_1ADbUX.js → journal-ui-C_htu3aM.js} +1 -1
  62. package/runtime/assets/{labor-market-DVybIeSN.js → labor-market-DR0j05Gy.js} +1 -1
  63. package/runtime/assets/{lightning-stats-ByvWkKyP.js → lightning-stats-botYMCIX.js} +1 -1
  64. package/runtime/assets/{link-grid-CJC48i5r.js → link-grid-DFuD6XVK.js} +1 -1
  65. package/runtime/assets/ma-multiplier-s6ix-kL8.js +1 -0
  66. package/runtime/assets/macro-calendar-Dhnx2n5Q.js +1 -0
  67. package/runtime/assets/{market-cap-treemap-CpnOP_gY.js → market-cap-treemap-BWtivvac.js} +1 -1
  68. package/runtime/assets/{market-hours-B9zPCvQk.js → market-hours-wSrW5Elv.js} +1 -1
  69. package/runtime/assets/{marquee-D8GTgVmy.js → marquee-NHBiLJUk.js} +1 -1
  70. package/runtime/assets/mayer-multiple-CZC5q6ra.js +1 -0
  71. package/runtime/assets/{mini-line-chart-CHM5UBjJ.js → mini-line-chart-QWeuTPfP.js} +1 -1
  72. package/runtime/assets/{mining-pools-DiyEBr6a.js → mining-pools-BxipfJmv.js} +1 -1
  73. package/runtime/assets/{mover-row-CO2STKkw.js → mover-row-CUd1i2yt.js} +1 -1
  74. package/runtime/assets/mvrv-BIwCiyRN.js +1 -0
  75. package/runtime/assets/{national-debt-CcTydivP.js → national-debt-DwC5azy3.js} +1 -1
  76. package/runtime/assets/{news-feed-D4xS-sLD.js → news-feed-BhAsJ6gt.js} +1 -1
  77. package/runtime/assets/nft-collections-sD-yDfKU.js +1 -0
  78. package/runtime/assets/nft-treemap-Bqhk41Of.js +1 -0
  79. package/runtime/assets/{note-BXsj5NlE.js → note-C1-RPOvR.js} +1 -1
  80. package/runtime/assets/nupl-U-WHVDJ0.js +1 -0
  81. package/runtime/assets/{open-interest-DaFRJd2O.js → open-interest-C0_M6MkH.js} +1 -1
  82. package/runtime/assets/{options-iv-MpSqgS3E.js → options-iv-CIHzBULM.js} +1 -1
  83. package/runtime/assets/{options-oi-strike-BHF28ASR.js → options-oi-strike-Db8lP27S.js} +1 -1
  84. package/runtime/assets/{options-put-call-_ZFaepBW.js → options-put-call-5ex7Ablt.js} +1 -1
  85. package/runtime/assets/pi-cycle-eACZGQhd.js +1 -0
  86. package/runtime/assets/{pomodoro-CxHVmgqp.js → pomodoro-CaS6y-eQ.js} +1 -1
  87. package/runtime/assets/portfolio-allocation-NR-4wbGL.js +1 -0
  88. package/runtime/assets/{portfolio-common-DnESc3oR.js → portfolio-common-Cfpnudvk.js} +1 -1
  89. package/runtime/assets/{portfolio-holdings-2vYKEk7f.js → portfolio-holdings-D-SG9B5X.js} +1 -1
  90. package/runtime/assets/{portfolio-value-B-7uIpG4.js → portfolio-value-DPKyirHc.js} +1 -1
  91. package/runtime/assets/prediction-markets-Cnf0KZba.js +1 -0
  92. package/runtime/assets/{price-chart-Cx_2scgb.js → price-chart-BEnpZLyb.js} +1 -1
  93. package/runtime/assets/{price-compare-DQcEOpnr.js → price-compare-8LvkF-xq.js} +1 -1
  94. package/runtime/assets/{price-liveline-TTo-aOFd.js → price-liveline-DkTeXuC2.js} +1 -1
  95. package/runtime/assets/{price-ticker-Cp7yYsNm.js → price-ticker-DgDJ3k4b.js} +1 -1
  96. package/runtime/assets/{protocol-fees-treemap-D-koQrKr.js → protocol-fees-treemap-fvVOfUFt.js} +1 -1
  97. package/runtime/assets/{protocol-tvl-chart-CDZkrQuF.js → protocol-tvl-chart-BfrszRqq.js} +1 -1
  98. package/runtime/assets/{protocol-tvl-treemap-I8fjLZU7.js → protocol-tvl-treemap-v5kaQdP4.js} +1 -1
  99. package/runtime/assets/puell-multiple-BdOLF9Wh.js +1 -0
  100. package/runtime/assets/{quote-CKEEp9tF.js → quote-slpulzHo.js} +1 -1
  101. package/runtime/assets/{rates-board-BElUHlYN.js → rates-board-B6hHyiDM.js} +1 -1
  102. package/runtime/assets/realized-price-dn6bApj-.js +1 -0
  103. package/runtime/assets/reserve-risk-_07r_h5w.js +1 -0
  104. package/runtime/assets/{returns-projector-DjIbvas1.js → returns-projector-NBs7iGAV.js} +1 -1
  105. package/runtime/assets/{risk-reward-pVHqmm_g.js → risk-reward-Baq_TRho.js} +1 -1
  106. package/runtime/assets/rsi-momentum-B6oTu5W6.js +1 -0
  107. package/runtime/assets/{rules-card-uMZQ6oP0.js → rules-card-D98hKEwY.js} +1 -1
  108. package/runtime/assets/sector-performance-DlnYIM-L.js +1 -0
  109. package/runtime/assets/sector-treemap-C3sX3Q9o.js +1 -0
  110. package/runtime/assets/{session-progress-Djhvb1G5.js → session-progress-BYwNuuP-.js} +1 -1
  111. package/runtime/assets/{short-volume-CiBfmCKw.js → short-volume-CxBDSjP6.js} +1 -1
  112. package/runtime/assets/{snake-CYXVjy8d.js → snake-CGV0Kg4z.js} +1 -1
  113. package/runtime/assets/sopr-DAn99w9D.js +1 -0
  114. package/runtime/assets/{spotify-embed-CGYKFOmX.js → spotify-embed-BBfim9vk.js} +1 -1
  115. package/runtime/assets/stablecoin-chains-D4EKi_YR.js +1 -0
  116. package/runtime/assets/stablecoin-supply-1m6FGR7-.js +1 -0
  117. package/runtime/assets/{stopwatch-Cl10sfaX.js → stopwatch-CCqsSaII.js} +1 -1
  118. package/runtime/assets/{top-movers-vvOomk6S.js → top-movers-CAqBZOUL.js} +1 -1
  119. package/runtime/assets/{treasury-auctions-JMoATy9T.js → treasury-auctions-Bl19yaM_.js} +1 -1
  120. package/runtime/assets/{treemap-leaf-DNIoJEK-.js → treemap-leaf-A45Ge4-e.js} +1 -1
  121. package/runtime/assets/trending-coins-Dm9R9zGQ.js +1 -0
  122. package/runtime/assets/{tvl-treemap-B28_19EZ.js → tvl-treemap-CSM9ioUr.js} +1 -1
  123. package/runtime/assets/{utils-DaT-yT0k.js → utils-DxneYyA_.js} +1 -1
  124. package/runtime/assets/{video-DjiOnvMm.js → video-CkvIGlHg.js} +1 -1
  125. package/runtime/assets/volume-profile-UJPTgNwV.js +1 -0
  126. package/runtime/assets/{yield-curve-Dj5vJwI4.js → yield-curve-DlXQg4sl.js} +1 -1
  127. package/runtime/assets/yield-scanner-Qm88hZuv.js +1 -0
  128. package/runtime/index.html +2 -2
  129. package/runtime/assets/editor-BMMobjrE.css +0 -1
  130. package/runtime/assets/editor-Ca-voh3h.js +0 -68
  131. package/runtime/assets/index-BgSQpj_B.js +0 -936
  132. package/runtime/assets/index-BqHx9BjX.css +0 -1
  133. package/runtime/assets/index-DK7jWlTL.js +0 -1
  134. package/runtime/assets/portfolio-allocation-Cf251dcH.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zframes",
3
- "version": "0.5.3",
3
+ "version": "0.7.0",
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",
@@ -44,12 +44,12 @@
44
44
  "@zframes/frames": "0.0.0",
45
45
  "@zframes/provider-alternativeme": "0.0.0",
46
46
  "@zframes/provider-coingecko": "0.0.0",
47
- "@zframes/provider-hyperliquid": "0.0.0",
48
47
  "@zframes/provider-defillama": "0.0.0",
49
- "@zframes/serve": "0.0.0",
50
- "@zframes/store": "0.0.0",
48
+ "@zframes/provider-hyperliquid": "0.0.0",
51
49
  "@zframes/spec": "0.0.0",
52
- "@zframes/zai": "0.0.0"
50
+ "@zframes/serve": "0.0.0",
51
+ "@zframes/zai": "0.0.0",
52
+ "@zframes/store": "0.0.0"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "node scripts/build-runtime.mjs && tsup && node scripts/assert-artifacts.mjs",
@@ -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-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
+ 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-kB-TyxKi.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-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
+ 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,bO as b}from"./index-kB-TyxKi.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-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
+ import{r as s,j as r}from"./react-qoZPGuNy.js";import{f as m,bS as n}from"./index-kB-TyxKi.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-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
+ 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-kB-TyxKi.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-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
+ 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-kB-TyxKi.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-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
+ 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-kB-TyxKi.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-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
+ 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-kB-TyxKi.js";import{F as r}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.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-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
+ 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-kB-TyxKi.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-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
+ 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-kB-TyxKi.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};
@@ -0,0 +1 @@
1
+ import{j as i}from"./react-qoZPGuNy.js";import{e as t}from"./format-CfAcS4D8.js";import{M as r}from"./metric-row-BVVhjsjK.js";import{f as e,bY as m,bZ as c}from"./index-kB-TyxKi.js";import{F as s,s as l}from"./ui-Bq3RQsdJ.js";function h(){const{chains:o,isLoading:n}=c();return n?i.jsx(s,{loading:!0,children:"loading chain activity…"}):o.length===0?i.jsx(s,{children:"no chain data"}):i.jsx("div",{className:l,children:o.map(a=>i.jsx(r,{label:a.label,meta:`${t(a.mempoolTxns)} mempool · ${t(a.blocks24h)} blocks`,value:`${t(a.transactions24h)} tx`},a.chain))})}const v=e({...m,component:h});export{v as chainActivityFrame};
@@ -1 +1 @@
1
- import{m as M,b as r,t as u}from"./d3-xK4fOkBU.js";var l=(n=>(n["30m"]="30m",n["24h"]="24h",n["3D"]="3D",n["7D"]="7D",n["1M"]="1M",n["3M"]="3M",n.YTD="YTD",n))(l||{});const e=(n,o)=>{const t=new Date(n);return o===l["24h"]?u("%H:%M")(t):u("%b %d")(t)},x=(n,o=.1)=>{const t=n.map(F=>F.value),s=M(t)||0,c=r(t)||0,D=c-s,m=c+D*o;let a=s-D*o;return s>=0&&a<0&&(a=0),[a,m]},E=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#06B6D4","#84CC16","#F97316"];export{E as C,l as a,x as c,e as f};
1
+ import{m as M,b as r,t as u}from"./d3-Dr3MHXm3.js";var l=(n=>(n["30m"]="30m",n["24h"]="24h",n["3D"]="3D",n["7D"]="7D",n["1M"]="1M",n["3M"]="3M",n.YTD="YTD",n))(l||{});const e=(n,o)=>{const t=new Date(n);return o===l["24h"]?u("%H:%M")(t):u("%b %d")(t)},x=(n,o=.1)=>{const t=n.map(F=>F.value),s=M(t)||0,c=r(t)||0,D=c-s,m=c+D*o;let a=s-D*o;return s>=0&&a<0&&(a=0),[a,m]},E=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#06B6D4","#84CC16","#F97316"];export{E as C,l as a,x as c,e as f};
@@ -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-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
+ import{r as x,j as t}from"./react-qoZPGuNy.js";import{f as p,bP as o,m as u}from"./index-kB-TyxKi.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-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
+ import{r as s,j as o}from"./react-qoZPGuNy.js";import{f as R,q as y}from"./index-kB-TyxKi.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-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
+ import{r as p,j as r}from"./react-qoZPGuNy.js";import{M as l}from"./mover-row-CUd1i2yt.js";import{f as h,b5 as t,b6 as x}from"./index-kB-TyxKi.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-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
+ import{r,j as t}from"./react-qoZPGuNy.js";import{f as z,aE as F}from"./index-kB-TyxKi.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};
@@ -0,0 +1 @@
1
+ import{j as s}from"./react-qoZPGuNy.js";import{a as i}from"./indicators-CogwjDn9.js";import{M as f}from"./mini-line-chart-QWeuTPfP.js";const x="#cbd5e1",u="#f5a524";function h({caption:e,headline:n,headlineColor:a,zone:o,sub:t,sparkline:r,sparkColor:l}){const c=i(r);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-2",children:[s.jsx("div",{className:"caption text-soft",children:e}),s.jsx("div",{className:"metric-xl leading-none",style:{color:a,textShadow:`0 0 24px ${a}44`},children:n}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"caption rounded-full px-2 py-0.5 font-semibold",style:{color:o.color,background:`${o.color}1f`},children:o.label}),t!=null&&s.jsx("span",{className:"caption text-soft truncate",children:t})]}),c.length>1&&s.jsx(f,{data:c,width:280,height:44,color:l,className:"w-full"})]})}function N(e,n,a){for(const o of n){const t=o.upTo===void 0||e<o.upTo,r=o.from===void 0||e>=o.from;if(t&&r)return o.zone}return a}export{h as M,x as Z,u as a,N as z};
@@ -0,0 +1 @@
1
+ import{r as T,j as e}from"./react-qoZPGuNy.js";import{D as _,U as $}from"./format-CfAcS4D8.js";import{Z as A}from"./cycle-shared-pyXzkgt1.js";import{s as g,r as B,e as H}from"./indicators-CogwjDn9.js";import{f as W,bl as E,b8 as q,bb as z,be as G}from"./index-kB-TyxKi.js";import{M as J}from"./metric-row-BVVhjsjK.js";import{F,s as K}from"./ui-Bq3RQsdJ.js";import"./mini-line-chart-QWeuTPfP.js";import"./d3-Dr3MHXm3.js";import"./utils-DxneYyA_.js";E.schema;function p(f){for(let i=f.length-1;i>=0;i--)if(f[i]!==null)return f[i];return null}function Q({config:f}){const{valuation:i,isLoading:U}=q(),{extras:d}=z(),{history:N,isLoading:Z}=G("btc"),h=f.mode==="peak",y=T.useMemo(()=>{if(!i)return[];const l=N.map(t=>t.value),C=l.at(-1)??null,L=p(g(l,200)),o=C!==null&&L?C/L:null,a=p(B(l,14)),S=p(g(l,111)),V=p(g(l,350)),M=S!==null&&V?S/(2*V):null,I=H(l,150).at(-1)??null,O=p(g(l,471)),j=I!==null&&O?I/O:null,r=(d==null?void 0:d.puell)??null,{mvrv:c,mvrvZScore:m,nupl:u}=i,n=(t,x,D,k,w)=>({name:t,value:x,display:D,threshold:k,fired:x!==null&&w}),P=t=>t!==null?`${(t*100).toFixed(0)}%`:"—",s=(t,x=2)=>t!==null?t.toFixed(x):"—";return h?[n("MVRV",c,s(c),"≥ 3",(c??0)>=3),n("MVRV Z-Score",m,s(m),"≥ 7",(m??0)>=7),n("NUPL",u,P(u),"≥ 75%",(u??0)>=.75),n("Mayer Multiple",o,s(o),"≥ 2.4",(o??0)>=2.4),n("Puell Multiple",r,s(r),"≥ 4",(r??0)>=4),n("RSI (14)",a,s(a,0),"≥ 80",(a??0)>=80),n("Pi Cycle Top",M,s(M),"≥ 1",(M??0)>=1)]:[n("MVRV",c,s(c),"≤ 1",(c??1/0)<=1),n("MVRV Z-Score",m,s(m),"≤ 0",(m??1/0)<=0),n("NUPL",u,P(u),"≤ 0%",(u??1/0)<=0),n("Mayer Multiple",o,s(o),"≤ 0.8",(o??1/0)<=.8),n("Puell Multiple",r,s(r),"≤ 0.5",(r??1/0)<=.5),n("RSI (14)",a,s(a,0),"≤ 30",(a??1/0)<=30),n("Pi Cycle Bottom",j,s(j),"≥ 0.745",(j??0)>=.745)]},[i,d,N,h]);if((U||Z)&&y.length===0)return e.jsx(F,{loading:!0,children:"loading cycle signals…"});if(y.length===0)return e.jsx(F,{children:"no on-chain data yet"});const R=y.filter(l=>l.value!==null),b=R.filter(l=>l.fired).length,v=h?_:$;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsx("span",{className:"caption text-soft",children:h?"Cycle-top signals":"Cycle-bottom signals"}),e.jsxs("span",{className:"metric-md",style:{color:b>0?v:A},children:[b,e.jsxs("span",{className:"text-soft",children:["/",R.length]})]})]}),e.jsx("div",{className:`${K} flex flex-col`,children:y.map(l=>e.jsx(J,{label:l.name,meta:`fires ${l.threshold}`,value:e.jsxs("span",{style:{color:l.fired?v:void 0},children:[l.fired?"● ":"",l.display]})},l.name))})]})}const rl=W({...E,component:Q});export{rl as cycleSignalsFrame};