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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./react-qoZPGuNy.js";import{i as S}from"./content-shared-BZ1XzrJx.js";import{D as h,U as f,a as y,d as v}from"./format-CfAcS4D8.js";import{f as M,aL as R}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./react-qoZPGuNy.js";import{i as S}from"./content-shared-BZ1XzrJx.js";import{D as h,U as f,a as y,d as v}from"./format-CfAcS4D8.js";import{f as M,aL as R}from"./index-BgSQpj_B.js";import{s as O}from"./ui-Bq3RQsdJ.js";R.schema;const P="var(--color-highlight)";function b(s){const a=Number(s);return Number.isFinite(a)?a:0}function g({label:s,value:a,onChange:n}){return e.jsxs("label",{className:"flex min-w-0 flex-col gap-1",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:s}),e.jsxs("span",{className:`flex items-center px-2 py-1.5 ${S}`,children:[e.jsx("span",{className:"body-sm text-soft",children:"$"}),e.jsx("input",{type:"number",inputMode:"decimal",value:a,onChange:c=>n(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"})]})]})}function L({value:s,onChange:a}){return e.jsx("div",{className:`flex gap-1 p-1 ${S}`,children:["long","short"].map(n=>{const c=n===s;return e.jsx("button",{type:"button",onClick:()=>a(n),className:`caption flex-1 rounded px-2 py-1 text-center uppercase tracking-[0.12em] transition-colors ${c?"bg-white/[0.06] font-semibold":"text-soft"}`,style:c?{color:P}:void 0,children:n},n)})})}function T({config:s}){const[a,n]=l.useState(String(s.entry)),[c,j]=l.useState(String(s.stop)),[m,N]=l.useState(String(s.target)),[o,k]=l.useState(s.direction);l.useEffect(()=>n(String(s.entry)),[s.entry]),l.useEffect(()=>j(String(s.stop)),[s.stop]),l.useEffect(()=>N(String(s.target)),[s.target]),l.useEffect(()=>k(s.direction),[s.direction]);const t=l.useMemo(()=>{const r=b(a),p=b(c),x=b(m),i=Math.abs(r-p),d=Math.abs(x-r),D=i>0?d/i:0,E=r!==0?i/r*100:0,$=r!==0?d/r*100:0,u=i+d,U=u>0?i/u*100:50,F=o==="long"?p<r&&r<x:x<r&&r<p;return{riskPerUnit:i,rewardPerUnit:d,rr:D,riskPct:E,rewardPct:$,riskShare:U,hasRisk:i>0,hasData:u>0,valid:F}},[a,c,m,o]),C=t.hasData?t.hasRisk?`1 : ${t.rr.toFixed(t.rr>=10?0:1)}`:"∞":"—",w=s.label.trim();return e.jsxs("div",{className:`${O} flex flex-col gap-3`,children:[w&&e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:w}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsx(g,{label:"Entry",value:a,onChange:n}),e.jsx(g,{label:"Stop",value:c,onChange:j}),e.jsx(g,{label:"Target",value:m,onChange:N})]}),e.jsx(L,{value:o,onChange:k}),e.jsxs("div",{className:"flex flex-col gap-2.5 rounded-lg border border-white/[0.07] bg-white/[0.03] p-3",children:[e.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:"Risk : Reward"}),e.jsx("span",{className:"metric-md",style:{color:t.hasData?P:void 0},children:C})]}),e.jsxs("div",{className:"flex h-2.5 w-full overflow-hidden rounded-full bg-white/[0.06]",children:[e.jsx("span",{className:"h-full",style:{width:`${t.riskShare}%`,background:h}}),e.jsx("span",{className:"h-full",style:{width:`${100-t.riskShare}%`,background:f}})]}),e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-col",children:[e.jsx("span",{className:"caption uppercase tracking-[0.12em]",style:{color:h},children:"Risk"}),e.jsx("span",{className:"body-sm tabular-nums",style:{color:h},children:y(-t.riskPct)}),e.jsxs("span",{className:"caption text-soft tabular-nums",children:[v(t.riskPerUnit)," / unit"]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col items-end text-right",children:[e.jsx("span",{className:"caption uppercase tracking-[0.12em]",style:{color:f},children:"Reward"}),e.jsx("span",{className:"body-sm tabular-nums",style:{color:f},children:y(t.rewardPct)}),e.jsxs("span",{className:"caption text-soft tabular-nums",children:[v(t.rewardPerUnit)," / unit"]})]})]}),t.hasData&&!t.valid&&e.jsxs("span",{className:"caption text-soft",children:["⚠ Prices don't bracket entry for a ",o," setup."]})]})]})}const B=M({...R,component:T});export{B as riskRewardFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{f as m,bd as n}from"./index-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{f as m,bd as n}from"./index-BgSQpj_B.js";import{F as i,s as o}from"./ui-Bq3RQsdJ.js";n.schema;function c({config:l}){const r=l.rules.filter(e=>e.trim()),a=l.title.trim();return r.length===0?s.jsx(i,{children:"no rules yet"}):s.jsxs("div",{className:"flex h-full w-full flex-col",children:[a&&s.jsx("div",{className:"body-sm text-strong mb-1 shrink-0 font-semibold",children:a}),s.jsx("ol",{className:`min-h-0 flex-1 ${o}`,children:r.map((e,t)=>s.jsxs("li",{className:"flex gap-2 py-1",children:[s.jsx("span",{className:"caption text-highlight shrink-0 tabular-nums",children:t+1}),s.jsx("span",{className:"body-sm text-normal",children:e})]},t))})]})}const u=m({...n,component:c});export{u as rulesCardFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as U}from"./react-qoZPGuNy.js";const S=new Map;function h(t){var d;if(typeof window>"u"||(d=window.UnicornStudio)!=null&&d.addScene)return Promise.resolve();const u=S.get(t);if(u)return u;const i=new Promise((c,s)=>{const a=document.querySelector(`script[src="${t}"]`),r=a??document.createElement("script"),p=()=>{var f;(f=window.UnicornStudio)!=null&&f.addScene?c():s(new Error("UnicornStudio global missing after script load"))};r.addEventListener("load",p),r.addEventListener("error",()=>s(new Error("UnicornStudio SDK failed to load"))),a||(r.src=t,r.async=!0,document.head.appendChild(r))}).catch(c=>{throw S.delete(t),c});return S.set(t,i),i}let v=0;function P({projectId:t,sdkUrl:u,width:i="100%",height:d="100%",scale:c,dpi:s,onLoad:a}){var m;const r=l.useRef(null),[p,f]=l.useState(typeof window<"u"&&!!((m=window.UnicornStudio)!=null&&m.addScene)),w=l.useRef(a);return w.current=a,l.useEffect(()=>{let o=!1;return h(u).then(()=>{var e;o||(f(!0),(e=w.current)==null||e.call(w))}).catch(()=>{o||f(!1)}),()=>{o=!0}},[u]),l.useEffect(()=>{var E;const o=r.current;if(!p||!o||!((E=window.UnicornStudio)!=null&&E.addScene))return;o.id||(o.id=`zf-unicorn-${v+=1}`);let e=null,y=!1;return window.UnicornStudio.addScene({elementId:o.id,projectId:t,scale:c??1,dpi:s??1.5,fps:60,lazyLoad:!0,production:!0}).then(n=>{var x;if(y){(x=n==null?void 0:n.destroy)==null||x.call(n);return}e=n}).catch(()=>{}),()=>{var n;y=!0,(n=e==null?void 0:e.destroy)==null||n.call(e)}},[p,t,c,s]),U.jsx("div",{ref:r,"aria-hidden":!0,style:{position:"relative",width:typeof i=="number"?`${i}px`:i,height:typeof d=="number"?`${d}px`:d}})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./react-qoZPGuNy.js";import{E as u,e as w,f as h}from"./market-data-CvmpLFSo.js";import{f as N,aN as f}from"./index-
|
|
1
|
+
import{r as d,j as e}from"./react-qoZPGuNy.js";import{E as u,e as w,f as h}from"./market-data-CvmpLFSo.js";import{f as N,aN as f}from"./index-BgSQpj_B.js";import{F as v}from"./ui-Bq3RQsdJ.js";f.schema;function x(s){const[o,r]=s.split(":").map(Number);return o*60+r}function b(s){return Math.min(1,Math.max(0,s))}function M({config:s}){const[o,r]=d.useState(()=>new Date);d.useEffect(()=>{const j=setInterval(()=>r(new Date),3e4);return()=>clearInterval(j)},[]);const n=u[s.exchange]??u.NYSE;if(!n)return e.jsx(v,{children:"unknown exchange"});const t=w(n,o),a=t.status==="open",c=s.label.trim(),l=x(t.close)-x(t.open),i=a&&l>0?b((l-t.nextChangeMin)/l):0,p=Math.round(i*100),g=t.status==="holiday"?"Holiday":a?`${p}%`:"Closed",m=a?`closes in ${h(t.nextChangeMin)}`:s.showCountdown?`opens in ${h(t.nextChangeMin)}`:null;return e.jsxs("div",{className:"flex h-full w-full flex-col justify-center gap-2",children:[e.jsxs("div",{className:"caption text-soft flex items-center gap-1.5 uppercase tracking-[0.14em]",children:[e.jsx("span",{className:"text-normal font-semibold",children:n.mark}),e.jsx("span",{children:n.code}),c&&e.jsxs("span",{className:"text-disabled truncate tracking-normal normal-case",children:["· ",c]})]}),e.jsx("div",{className:`metric-md leading-none ${a?"text-strong":"text-soft"}`,children:g}),e.jsx("div",{className:"bg-surface h-2 w-full overflow-hidden rounded-full",children:e.jsx("div",{className:"h-full rounded-full transition-[width] duration-500",style:{width:`${i*100}%`,background:"var(--color-highlight)"}})}),m&&e.jsx("div",{className:"caption text-soft",children:m})]})}const $=N({...f,component:M});export{$ as sessionProgressFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as s}from"./react-qoZPGuNy.js";import{f as x,af as h,ag as f,A as p}from"./index-
|
|
1
|
+
import{r as u,j as s}from"./react-qoZPGuNy.js";import{f as x,af as h,ag as f,A as p}from"./index-BgSQpj_B.js";import{b,e as i}from"./format-CfAcS4D8.js";import{F as c,s as j}from"./ui-Bq3RQsdJ.js";h.schema;const d=(e=1)=>`hsl(var(--zf-accent-hue, 242) 85% 72% / ${e})`;function y({symbol:e,entry:o}){const l=e.includes(":")?e:`xyz:${o.symbol}`,r=Math.max(0,Math.min(100,o.shortPct));return s.jsxs("div",{className:"flex min-w-0 items-center gap-3 border-b border-white/[0.06] py-2 last:border-b-0",children:[s.jsx(p,{symbol:l,size:20}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"body-sm text-strong truncate font-semibold",children:o.symbol}),s.jsx("span",{className:"body-md text-strong font-bold tabular-nums",children:b(r,1)})]}),s.jsx("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded-full bg-white/[0.07]",children:s.jsx("div",{className:"h-full rounded-full",style:{width:`${r}%`,background:d(.85),boxShadow:`0 0 8px ${d(.5)}`}})}),s.jsxs("div",{className:"caption text-soft mt-1 tabular-nums",children:["short ",i(o.shortVolume)," /"," ",i(o.totalVolume)]})]})]})}function v({config:e}){const{data:o,isLoading:l}=f(e.symbols),r=u.useMemo(()=>{const a=e.symbols.map(t=>({symbol:t,entry:o[t]})).filter(t=>!!t.entry);return a.sort((t,n)=>e.sort==="symbol"?t.entry.symbol.localeCompare(n.entry.symbol):e.sort==="volume"?n.entry.totalVolume-t.entry.totalVolume:n.entry.shortPct-t.entry.shortPct),a},[o,e.symbols,e.sort]);if(l)return s.jsx(c,{loading:!0,children:"loading short volume…"});if(r.length===0)return s.jsx(c,{children:"no FINRA short-volume data yet"});const m=r[0].entry.date;return 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",{children:[s.jsx("div",{className:"caption text-soft uppercase",children:"short volume"}),s.jsx("div",{className:"body-sm text-normal",children:m?`FINRA · ${m}`:"FINRA"})]}),s.jsxs("div",{className:"caption text-soft text-right",children:["reported volume",s.jsx("br",{}),"not short interest"]})]}),s.jsx("div",{className:j,children:r.map(({symbol:a,entry:t})=>s.jsx(y,{symbol:a,entry:t},a))})]})}const F=x({...h,component:v});export{F as shortVolumeFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as L}from"./react-qoZPGuNy.js";import{a as H,G as M,d as I}from"./game-ui-Dy_QYsPr.js";import{f as j,aA as z}from"./index-
|
|
1
|
+
import{r as a,j as L}from"./react-qoZPGuNy.js";import{a as H,G as M,d as I}from"./game-ui-Dy_QYsPr.js";import{f as j,aA as z}from"./index-BgSQpj_B.js";import"./format-CfAcS4D8.js";const g=18,P=14,W=0,N={snakeHead:"rgba(255, 255, 255, 0.95)",food:"hsla(347, 100%, 62%, 1)"};function O(s,r,l,u,f){s.fillStyle=u,s.fillRect(r.originX+l.x*g+f,r.originY+l.y*g+f,g-f*2,g-f*2)}function q(s,r,l,u,f,y){r.clearRect(0,0,s.width,s.height),O(r,l,l.food,N.food,3),l.snake.forEach((d,C)=>O(r,l,d,C===0?N.snakeHead:y,2)),I(s,r,u,f,y)}function X(s,r,l,u,f,y){r.clearRect(0,0,s.width,s.height),r.textAlign="center",l==="idle"?(r.fillStyle=M.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText("Arrow keys or swipe to start",s.width/2,s.height/2)):(r.fillStyle=M.gameOver,r.font='bold 20px "DM Sans", sans-serif',r.fillText("GAME OVER",s.width/2,s.height/2-30),r.fillStyle=M.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText(`Score: ${u}`,s.width/2,s.height/2),r.fillStyle=M.textSoft,r.fillText("Press an arrow or tap to play again",s.width/2,s.height/2+28)),r.textAlign="left",I(s,r,u,f,y)}function v(){const s=a.useRef(null),r=a.useRef(null),[l,u]=a.useState("idle"),[f,y]=a.useState(0),[d,C]=a.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-snake-high-score");return e?parseInt(e,10):0}return 0}),[,K]=a.useState(!1),h=a.useRef(0),S=a.useRef(d),x=a.useRef(l),A=a.useRef(null),b=a.useRef(H(null));a.useEffect(()=>{S.current=d,d>0&&localStorage.setItem("zframes-snake-high-score",String(d))},[d]),a.useEffect(()=>{x.current=l},[l]);const w=a.useRef({snake:[],dir:{x:1,y:0},pendingDir:{x:1,y:0},food:{x:0,y:0},cols:0,rows:0,originX:0,originY:0,stepCounter:0}),D=a.useCallback(()=>{const e=w.current;if(e.cols<=0||e.rows<=0)return;let t,o=0;do t={x:Math.floor(Math.random()*e.cols),y:Math.floor(Math.random()*e.rows)},o++;while(e.snake.some(i=>i.x===t.x&&i.y===t.y)&&o<400);e.food=t},[]),T=a.useCallback(()=>{const e=w.current,t=Math.floor(e.cols/2),o=Math.floor(e.rows/2);e.snake=[{x:t,y:o},{x:t-1,y:o},{x:t-2,y:o}],e.dir={x:1,y:0},e.pendingDir={x:1,y:0},e.stepCounter=0,D(),h.current=0,y(0)},[D]),p=a.useCallback(()=>{w.current.cols<=0||(T(),u("playing"))},[T]),m=a.useCallback((e,t)=>{const o=w.current;o.dir.x===-e&&o.dir.y===-t||(o.pendingDir={x:e,y:t})},[]);a.useEffect(()=>{const e=o=>{const i=o.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)return;const c=x.current==="playing";let n=!0;switch(o.code){case"ArrowUp":case"KeyW":c?m(0,-1):p();break;case"ArrowDown":case"KeyS":c?m(0,1):p();break;case"ArrowLeft":case"KeyA":c?m(-1,0):p();break;case"ArrowRight":case"KeyD":c?m(1,0):p();break;case"Space":c||p();break;default:n=!1}n&&o.preventDefault()},t=r.current;if(t)return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[m,p]),a.useLayoutEffect(()=>{const e=s.current;if(!e)return;const t=()=>{const i=e.parentElement;if(i&&i.clientWidth>0&&i.clientHeight>0){e.width=i.clientWidth,e.height=i.clientHeight-W,b.current=H(e);const c=w.current;c.cols=Math.max(5,Math.floor(e.width/g)),c.rows=Math.max(5,Math.floor(e.height/g)),c.originX=Math.floor((e.width-c.cols*g)/2),c.originY=Math.floor((e.height-c.rows*g)/2);const n=e.getContext("2d");n&&x.current!=="playing"&&X(e,n,x.current,h.current,S.current,b.current),K(E=>!E)}};t();const o=new ResizeObserver(t);return o.observe(e.parentElement),()=>o.disconnect()},[]),a.useEffect(()=>{if(l!=="playing")return;const e=s.current,t=e==null?void 0:e.getContext("2d");if(!e||!t)return;let o;const i=()=>{h.current>S.current&&(S.current=h.current,C(h.current)),u("gameover")},c=()=>{const n=w.current;if(n.stepCounter++,n.stepCounter>=P){n.stepCounter=0,n.dir=n.pendingDir;const E=n.snake[0],k=E.x+n.dir.x,R=E.y+n.dir.y;if(k<0||R<0||k>=n.cols||R>=n.rows){i();return}const G=k===n.food.x&&R===n.food.y;if((G?n.snake:n.snake.slice(0,-1)).some(F=>F.x===k&&F.y===R)){i();return}n.snake.unshift({x:k,y:R}),G?(h.current+=1,y(h.current),D()):n.snake.pop()}q(e,t,n,h.current,S.current,b.current),o=requestAnimationFrame(c)};return o=requestAnimationFrame(c),()=>cancelAnimationFrame(o)},[l]),a.useEffect(()=>{if(l==="playing")return;const e=s.current,t=e==null?void 0:e.getContext("2d");!e||!t||X(e,t,l,f,d,b.current)},[l,f,d]);const U=e=>{const t=e.touches[0];t&&(A.current={x:t.clientX,y:t.clientY})},Y=e=>{var n;const t=A.current;A.current=null;const o=e.changedTouches[0];if((n=r.current)==null||n.focus(),x.current!=="playing"){p();return}if(!t||!o)return;const i=o.clientX-t.x,c=o.clientY-t.y;Math.abs(i)<12&&Math.abs(c)<12||(Math.abs(i)>Math.abs(c)?m(i>0?1:-1,0):m(0,c>0?1:-1))};return L.jsx("div",{ref:r,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onTouchStart:U,onTouchEnd:Y,onClick:()=>{var e;return(e=r.current)==null?void 0:e.focus()},role:"application","aria-label":"Snake game. Use the arrow keys or swipe to steer.",children:L.jsx("canvas",{ref:s,className:"h-full w-full"})})}const Q=j({...z,component:v});export{Q as snakeFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as l}from"./react-qoZPGuNy.js";import{f as p,bf as i}from"./index-
|
|
1
|
+
import{r as s,j as l}from"./react-qoZPGuNy.js";import{f as p,bf as i}from"./index-BgSQpj_B.js";import{F as o}from"./ui-Bq3RQsdJ.js";i.schema;const c=["track","album","playlist","artist","episode","show"];function d(t){let a;try{a=new URL(t.trim())}catch{return null}if(a.hostname.replace(/^www\./,"")!=="open.spotify.com")return null;const r=a.pathname.split("/").filter(Boolean),e=r.findIndex(n=>c.includes(n));return e===-1||!r[e+1]?null:`https://open.spotify.com/embed/${r[e]}/${r[e+1]}`}function m({config:t}){const[a,r]=s.useState("loading"),e=s.useMemo(()=>d(t.url),[t.url]);return e?a==="error"?l.jsx(o,{children:"player unavailable"}):l.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:[a==="loading"&&l.jsx("div",{className:"absolute inset-0 z-10",children:l.jsx(o,{loading:!0,children:"loading player…"})}),l.jsx("iframe",{src:e,title:"Spotify player",className:"w-full",height:t.compact?152:"100%",style:{border:0,height:t.compact?152:"100%"},loading:"lazy",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",onLoad:()=>r("loaded"),onError:()=>r("error")},e+String(t.compact))]}):l.jsx(o,{children:"paste a Spotify track / album / playlist URL"})}const h=p({...i,component:m});export{h as spotifyEmbedFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as s}from"./react-qoZPGuNy.js";import{i as h}from"./content-shared-BZ1XzrJx.js";import{f as y,aM as f,m as S}from"./index-
|
|
1
|
+
import{r as l,j as s}from"./react-qoZPGuNy.js";import{i as h}from"./content-shared-BZ1XzrJx.js";import{f as y,aM as f,m as S}from"./index-BgSQpj_B.js";f.schema;const p="var(--color-highlight)",x="0 0 18px hsl(var(--zf-accent-hue, 242) 92% 70% / 0.45)",i=t=>String(t).padStart(2,"0");function g(t){const e=Math.floor(Math.max(0,t)/1e3),c=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return c>0?`${c}:${i(n)}:${i(o)}`:`${i(n)}:${i(o)}`}function k({config:t}){const e=S(),[c,n]=l.useState({startedAt:t.startedAt,accumulatedMs:t.accumulatedMs}),o=e?t.startedAt:c.startedAt,w=e?t.accumulatedMs:c.accumulatedMs,a=o!==0,d=l.useCallback(r=>{e?e(r):n(m=>({...m,...r}))},[e]),[,M]=l.useState(0);l.useEffect(()=>{if(!a)return;const r=window.setInterval(()=>M(m=>m+1),250);return()=>window.clearInterval(r)},[a]);const u=w+(a?Date.now()-o:0),b=()=>d({startedAt:Date.now()}),v=()=>d({startedAt:0,accumulatedMs:u}),j=()=>d({startedAt:0,accumulatedMs:0});return s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[t.label&&s.jsxs("div",{className:"caption text-soft inline-flex items-center gap-1.5 uppercase tracking-[0.18em]",children:[s.jsx("span",{"aria-hidden":!0,className:"inline-block h-1 w-1 rounded-full",style:{background:p,boxShadow:a?x:void 0}}),t.label]}),s.jsx("div",{className:"metric-lg text-strong leading-none",style:a?{color:p,textShadow:x}:void 0,children:g(u)}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("button",{type:"button",onClick:a?v:b,className:`caption text-normal px-3 py-1 uppercase tracking-[0.12em] ${h}`,style:a?void 0:{color:p},children:a?"Pause":"Start"}),s.jsx("button",{type:"button",onClick:j,disabled:!a&&u===0,className:`caption text-soft px-3 py-1 uppercase tracking-[0.12em] transition-opacity disabled:opacity-40 ${h}`,children:"Reset"})]})]})}const E=y({...f,component:k});export{E as stopwatchFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as s}from"./react-qoZPGuNy.js";import{f as h,ah as m,a9 as g,h as l}from"./index-
|
|
1
|
+
import{r as d,j as s}from"./react-qoZPGuNy.js";import{f as h,ah as m,a9 as g,h as l}from"./index-BgSQpj_B.js";import{M as i}from"./mover-row-CO2STKkw.js";import{F as n}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";m.schema;const f=["xyz:*"];function u({config:t}){const{stats:c,isLoading:p}=g(f,6e4),{gainers:o,losers:x}=d.useMemo(()=>{const e=Object.entries(c).map(([a,r])=>({symbol:a,...r})).filter(a=>a.symbol.includes(":")&&a.markPx>0&&a.prevDayPx>0).sort((a,r)=>r.changePct-a.changePct);return{gainers:e.slice(0,t.count),losers:e.slice(-t.count).reverse()}},[c,t.count]);return p?s.jsx(n,{loading:!0,children:"loading movers…"}):o.length===0?s.jsx(n,{children:"no mover data yet"}):s.jsxs("div",{className:"grid h-full grid-cols-2 gap-x-4 overflow-hidden",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("div",{className:"caption text-soft uppercase tracking-wide",children:"gainers"}),o.map(e=>s.jsx(i,{symbol:e.symbol,label:l(e.symbol),price:e.markPx,changePct:e.changePct},e.symbol))]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("div",{className:"caption text-soft uppercase tracking-wide",children:"losers"}),x.map(e=>s.jsx(i,{symbol:e.symbol,label:l(e.symbol),price:e.markPx,changePct:e.changePct},e.symbol))]})]})}const M=h({...m,component:u});export{M as topMoversFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./react-qoZPGuNy.js";import{b as c}from"./format-CfAcS4D8.js";import{M as m}from"./metric-row-BVVhjsjK.js";import{f as u,Q as a,R as d}from"./index-
|
|
1
|
+
import{j as s}from"./react-qoZPGuNy.js";import{b as c}from"./format-CfAcS4D8.js";import{M as m}from"./metric-row-BVVhjsjK.js";import{f as u,Q as a,R as d}from"./index-BgSQpj_B.js";import{F as i,s as x}from"./ui-Bq3RQsdJ.js";a.schema;function f({auction:e}){const t=[e.securityTerm,e.securityType].filter(Boolean).join(" ");return s.jsx(m,{label:t||e.securityType,meta:e.auctionDate+(e.bidToCover!==null?` · ${e.bidToCover.toFixed(2)}× bid-to-cover`:""),value:e.rate!==null?c(e.rate):"—"})}function p({config:e}){const{auctions:t,isLoading:o}=d(e.count);if(o)return s.jsx(i,{loading:!0,children:"loading auctions…"});if(!t.length)return s.jsx(i,{children:"no auction data yet"});const n=t.slice(0,e.count);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"caption text-soft uppercase",children:"treasury auctions"}),s.jsx("div",{className:"body-sm text-normal",children:"high yield · bid-to-cover"})]}),s.jsx("div",{className:"caption text-soft text-right",children:"results"})]}),s.jsx("div",{className:x,children:n.map((r,l)=>s.jsx(f,{auction:r},`${r.auctionDate}-${r.securityType}-${r.securityTerm}-${l}`))})]})}const T=u({...a,component:p});export{T as treasuryAuctionsFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as m}from"./react-qoZPGuNy.js";import{f as l}from"./format-CfAcS4D8.js";import{f as p,ai as i,aj as f}from"./index-
|
|
1
|
+
import{r as n,j as m}from"./react-qoZPGuNy.js";import{f as l}from"./format-CfAcS4D8.js";import{f as p,ai as i,aj as f}from"./index-BgSQpj_B.js";import{T as u,a as c}from"./treemap-leaf-DNIoJEK-.js";import{F as s}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";i.schema;function d({width:r,height:o,data:e}){const t=l(e.tvl);return m.jsx(c,{width:r,height:o,label:e.id,secondary:t,title:`${e.id} · ${t}`})}function v({config:r}){const{entries:o,isLoading:e}=f(),t=n.useMemo(()=>o.slice(0,r.topN).map(a=>({id:a.name,value:a.tvl,tvl:a.tvl})),[o,r.topN]);return e?m.jsx(s,{loading:!0,children:"loading TVL…"}):t.length===0?m.jsx(s,{children:"no TVL data"}):m.jsx(u,{data:t,LeafComponent:d,getColorValue:a=>a.tvl})}const F=p({...i,component:v});export{F as tvlTreemapFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as o}from"./react-qoZPGuNy.js";import{f as u,aC as s}from"./index-
|
|
1
|
+
import{r as l,j as o}from"./react-qoZPGuNy.js";import{f as u,aC as s}from"./index-BgSQpj_B.js";import{F as i}from"./ui-Bq3RQsdJ.js";s.schema;function c(a){let e;try{e=new URL(a.trim())}catch{return null}const r=e.hostname.replace(/^www\./,"");if(r==="youtu.be"){const t=e.pathname.slice(1).split("/")[0];return t?`https://www.youtube.com/embed/${t}`:null}if(r==="youtube.com"||r==="m.youtube.com"){if(e.pathname==="/watch"){const n=e.searchParams.get("v");return n?`https://www.youtube.com/embed/${n}`:null}const t=e.pathname.match(/^\/(?:embed|shorts)\/([^/]+)/);return t?`https://www.youtube.com/embed/${t[1]}`:null}if(r==="vimeo.com"){const t=e.pathname.split("/").filter(Boolean)[0];return t&&/^\d+$/.test(t)?`https://player.vimeo.com/video/${t}`:null}return r==="player.vimeo.com"||e.protocol==="https:"?e.toString():null}function m({config:a}){const[e,r]=l.useState("loading"),t=l.useMemo(()=>c(a.url),[a.url]);return l.useEffect(()=>r("loading"),[t]),t?e==="error"?o.jsx(i,{children:"video unavailable"}):o.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:[e==="loading"&&o.jsx("div",{className:"absolute inset-0 z-10",children:o.jsx(i,{loading:!0,children:"loading video…"})}),o.jsx("iframe",{src:t,title:a.title,className:`h-full w-full border-0 transition-opacity duration-300 ${e==="loaded"?"opacity-100":"opacity-0"}`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,onLoad:()=>r("loaded"),onError:()=>r("error")},t)]}):o.jsx(i,{children:"invalid video URL"})}const f=u({...s,component:m});export{f as videoFrame};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./react-qoZPGuNy.js";import{c as x,b as v}from"./format-CfAcS4D8.js";import{f as j,ak as p,al as g}from"./index-
|
|
1
|
+
import{j as e}from"./react-qoZPGuNy.js";import{c as x,b as v}from"./format-CfAcS4D8.js";import{f as j,ak as p,al as g}from"./index-BgSQpj_B.js";import{F as u}from"./ui-Bq3RQsdJ.js";p.schema;const h=(n=1)=>`hsl(var(--zf-accent-hue, 242) 85% 72% / ${n})`;function y({rates:n}){const a=Math.min(...n),m=Math.max(...n),i=Math.max(.01,m-a),o=n.length,c=r=>100*r/(o-1),t=r=>4+32*(1-(r-a)/i),d=n.map((r,s)=>`${s?"L":"M"}${c(s).toFixed(2)},${t(r).toFixed(2)}`).join(" ");return e.jsxs("svg",{viewBox:"0 0 100 40",preserveAspectRatio:"none",className:"h-20 w-full","aria-hidden":!0,children:[e.jsx("path",{d:`${d} L100,40 L0,40 Z`,fill:h(.14)}),e.jsx("path",{d,fill:"none",stroke:h(.9),strokeWidth:1.5,vectorEffect:"non-scaling-stroke",strokeLinejoin:"round"})]})}function N({config:n}){const{curve:a,isLoading:m}=g();if(m)return e.jsx(u,{loading:!0,children:"loading yield curve…"});if(!a||a.points.length<2)return e.jsx(u,{children:"no yield-curve data yet"});const i=s=>{var l;return(l=a.points.find(f=>f.label===s))==null?void 0:l.rate},o=i("2Y"),c=i("10Y"),t=o!=null&&c!=null?Math.round((c-o)*100):null,d=t!=null&&t<0,r=n.maturities;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",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:"Treasury yield curve"}),e.jsxs("div",{className:"body-sm text-normal",children:["U.S. Treasury · ",a.date]})]}),e.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),t!=null&&e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"metric-md leading-none",style:{color:x(t),textShadow:`0 0 24px ${x(t)}44`},children:[t>=0?"+":"",t," bps"]}),e.jsxs("span",{className:"caption text-soft",children:["2s10s · ",d?"inverted":"normal"]})]}),e.jsx(y,{rates:a.points.map(s=>s.rate)}),e.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${r.length}, minmax(0, 1fr))`},children:r.map(s=>{const l=i(s);return e.jsxs("div",{className:"rounded bg-white/[0.04] px-1.5 py-1 text-center",children:[e.jsx("div",{className:"caption text-soft",children:s}),e.jsx("div",{className:"body-sm text-strong font-bold tabular-nums",children:l!=null?v(l):"—"})]},s)})})]})}const F=j({...p,component:N});export{F as yieldCurveFrame};
|
package/runtime/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" />
|
|
9
9
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
10
10
|
<title>zframes runtime</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-BgSQpj_B.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/react-qoZPGuNy.js">
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-BqHx9BjX.css">
|
|
14
14
|
</head>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,j as E}from"./react-qoZPGuNy.js";const w=new Map;function x(n){var i;if(typeof window>"u"||(i=window.UnicornStudio)!=null&&i.addScene)return Promise.resolve();const a=w.get(n);if(a)return a;const r=new Promise((d,s)=>{const u=document.querySelector(`script[src="${n}"]`),t=u??document.createElement("script"),l=()=>{var f;(f=window.UnicornStudio)!=null&&f.addScene?d():s(new Error("UnicornStudio global missing after script load"))};t.addEventListener("load",l),t.addEventListener("error",()=>s(new Error("UnicornStudio SDK failed to load"))),u||(t.src=n,t.async=!0,document.head.appendChild(t))}).catch(d=>{throw w.delete(n),d});return w.set(n,r),r}let U=0;function v({projectId:n,sdkUrl:a,width:r="100%",height:i="100%",scale:d,dpi:s}){var f;const u=p.useRef(null),[t,l]=p.useState(typeof window<"u"&&!!((f=window.UnicornStudio)!=null&&f.addScene));return p.useEffect(()=>{let o=!1;return x(a).then(()=>{o||l(!0)}).catch(()=>{o||l(!1)}),()=>{o=!0}},[a]),p.useEffect(()=>{var m;const o=u.current;if(!t||!o||!((m=window.UnicornStudio)!=null&&m.addScene))return;o.id||(o.id=`zf-unicorn-${U+=1}`);let c=null,S=!1;return window.UnicornStudio.addScene({elementId:o.id,projectId:n,scale:d??1,dpi:s??1.5,fps:60,lazyLoad:!0,production:!0}).then(e=>{var y;if(S){(y=e==null?void 0:e.destroy)==null||y.call(e);return}c=e}).catch(()=>{}),()=>{var e;S=!0,(e=c==null?void 0:c.destroy)==null||e.call(c)}},[t,n,d,s]),E.jsx("div",{ref:u,"aria-hidden":!0,style:{position:"relative",width:typeof r=="number"?`${r}px`:r,height:typeof i=="number"?`${i}px`:i}})}export{v as default};
|