@m1kapp/kit 0.0.30 → 0.0.32

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/dist/meta.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.0.30",
3
- "generatedAt": "2026-07-08T03:05:22.216Z",
4
- "totalCodeLines": 4512,
2
+ "version": "0.0.32",
3
+ "generatedAt": "2026-07-17T09:44:55.172Z",
4
+ "totalCodeLines": 4337,
5
5
  "features": {
6
6
  "Button": {
7
7
  "loc": 61,
@@ -75,6 +75,18 @@
75
75
  "source": "ui/components/input.tsx",
76
76
  "isPrimary": false
77
77
  },
78
+ "MediaCard": {
79
+ "loc": 36,
80
+ "category": "component",
81
+ "source": "ui/components/media-card.tsx",
82
+ "isPrimary": true
83
+ },
84
+ "UnderlineTabs": {
85
+ "loc": 53,
86
+ "category": "component",
87
+ "source": "ui/components/underline-tabs.tsx",
88
+ "isPrimary": true
89
+ },
78
90
  "Section": {
79
91
  "loc": 17,
80
92
  "category": "component",
@@ -106,7 +118,7 @@
106
118
  "isPrimary": true
107
119
  },
108
120
  "Watermark": {
109
- "loc": 244,
121
+ "loc": 188,
110
122
  "category": "component",
111
123
  "source": "ui/components/watermark.tsx",
112
124
  "isPrimary": true
@@ -178,7 +190,7 @@
178
190
  "isPrimary": true
179
191
  },
180
192
  "GrassMap": {
181
- "loc": 314,
193
+ "loc": 194,
182
194
  "category": "component",
183
195
  "source": "ui/components/grass-map.tsx",
184
196
  "isPrimary": true
@@ -280,7 +292,7 @@
280
292
  "isPrimary": true
281
293
  },
282
294
  "InAppSheet": {
283
- "loc": 168,
295
+ "loc": 175,
284
296
  "category": "component",
285
297
  "source": "ui/components/in-app-sheet.tsx",
286
298
  "isPrimary": true
@@ -328,7 +340,7 @@
328
340
  "isPrimary": false
329
341
  },
330
342
  "ActionCard": {
331
- "loc": 117,
343
+ "loc": 114,
332
344
  "category": "component",
333
345
  "source": "ui/components/action-card.tsx",
334
346
  "isPrimary": true
@@ -346,13 +358,13 @@
346
358
  "isPrimary": true
347
359
  },
348
360
  "Stepper": {
349
- "loc": 87,
361
+ "loc": 111,
350
362
  "category": "component",
351
363
  "source": "ui/components/stepper.tsx",
352
364
  "isPrimary": true
353
365
  },
354
366
  "Collapsible": {
355
- "loc": 80,
367
+ "loc": 94,
356
368
  "category": "component",
357
369
  "source": "ui/components/collapsible.tsx",
358
370
  "isPrimary": true
@@ -436,7 +448,7 @@
436
448
  "isPrimary": true
437
449
  },
438
450
  "PWAInstallButton": {
439
- "loc": 213,
451
+ "loc": 53,
440
452
  "category": "component",
441
453
  "source": "pwa/pwa-install-button.tsx",
442
454
  "isPrimary": true
@@ -472,7 +484,7 @@
472
484
  "isPrimary": false
473
485
  },
474
486
  "relativeTime": {
475
- "loc": 137,
487
+ "loc": 167,
476
488
  "category": "util",
477
489
  "source": "utils/index.ts",
478
490
  "isPrimary": true
@@ -519,6 +531,24 @@
519
531
  "source": "utils/index.ts",
520
532
  "isPrimary": false
521
533
  },
534
+ "formatKoreanNumber": {
535
+ "loc": 0,
536
+ "category": "util",
537
+ "source": "utils/index.ts",
538
+ "isPrimary": false
539
+ },
540
+ "parseIsoDuration": {
541
+ "loc": 0,
542
+ "category": "util",
543
+ "source": "utils/index.ts",
544
+ "isPrimary": false
545
+ },
546
+ "isoDurationToSec": {
547
+ "loc": 0,
548
+ "category": "util",
549
+ "source": "utils/index.ts",
550
+ "isPrimary": false
551
+ },
522
552
  "createMetadata": {
523
553
  "loc": 76,
524
554
  "category": "util",
package/dist/ogimage.js CHANGED
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var A=(o,e)=>{for(var n in e)C(o,n,{get:e[n],enumerable:!0})},N=(o,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of j(e))!D.call(o,r)&&r!==n&&C(o,r,{get:()=>e[r],enumerable:!(i=M(e,r))||i.enumerable});return o};var H=o=>N(C({},"__esModule",{value:!0}),o);var rt={};A(rt,{OGImage:()=>T,createEmojiLoader:()=>$,createFaviconElement:()=>w,getOGVersion:()=>W,loadFont:()=>R,loadGoogleFont:()=>P,loadPretendard:()=>B});module.exports=H(rt);var t=require("react/jsx-runtime");function L(o){let e=[],n=/\p{Extended_Pictographic}/gu,i=0;for(let a of o.matchAll(n)){let l=o.slice(i,a.index).trim();l&&e.push(l),e.push(a[0]),i=a.index+a[0].length}let r=o.slice(i).trim();return r&&e.push(r),e}function p({text:o,style:e}){let n=L(o);return n.length<=1?(0,t.jsx)("span",{style:{display:"flex",...e},children:o}):(0,t.jsx)("span",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",...e},children:n.map((i,r)=>(0,t.jsx)("span",{children:i},r))})}function x(o){let e=o.replace("#",""),n=parseInt(e.length===3?e.split("").map(i=>i+i).join(""):e,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function h(o,e){let{r:n,g:i,b:r}=x(o);return`rgba(${n},${i},${r},${e})`}function q(o,e,n){o/=255,e/=255,n/=255;let i=Math.max(o,e,n),r=Math.min(o,e,n),a=(i+r)/2;if(i===r)return{h:0,s:0,l:a};let l=i-r,f=a>.5?l/(2-i-r):l/(i+r),s=0;return i===o?s=60*(((e-n)/l+(e<n?6:0))%6):i===e?s=60*(((n-o)/l+2)%6):s=60*(((o-e)/l+4)%6),{h:s,s:f,l:a}}function U(o,e,n){let i=(1-Math.abs(2*n-1))*e,r=i*(1-Math.abs(o/60%2-1)),a=n-i/2,l=0,f=0,s=0;return o<60?[l,f,s]=[i,r,0]:o<120?[l,f,s]=[r,i,0]:o<180?[l,f,s]=[0,i,r]:o<240?[l,f,s]=[0,r,i]:o<300?[l,f,s]=[r,0,i]:[l,f,s]=[i,0,r],{r:Math.round((l+a)*255),g:Math.round((f+a)*255),b:Math.round((s+a)*255)}}function y(o,e=45){let{r:n,g:i,b:r}=x(o),{h:a,s:l,l:f}=q(n,i,r),s=(a+e)%360,{r:d,g:c,b:g}=U(s,l,f);return`rgb(${d},${c},${g})`}function G(o,e){let{r:n,g:i,b:r}=x(o),a=l=>Math.max(0,Math.min(255,l));return`rgb(${a(n+e)},${a(i+e)},${a(r+e)})`}function O(o,e=.5){let{r:n,g:i,b:r}=x(o),a=l=>Math.round(l+(255-l)*e);return`rgb(${a(n)},${a(i)},${a(r)})`}function m({text:o,color:e,bg:n="dark"}){let i=n==="gradient",r=n==="blend";return(0,t.jsx)("div",{style:{display:"flex"},children:(0,t.jsx)("div",{style:{display:"flex",backgroundColor:r||i?"rgba(255,255,255,0.2)":h(e,.12),borderRadius:24,paddingLeft:18,paddingRight:18,paddingTop:8,paddingBottom:8},children:(0,t.jsx)(p,{text:o,style:{fontSize:22,fontWeight:700,color:r||i?"#ffffff":e,letterSpacing:"0.2px"}})})})}function _({appName:o,color:e="#007B5F",domain:n,bg:i="dark",logoUrl:r,children:a}){let l=o||"m1k",f=i==="gradient",s=i==="blend",d="#ffffff",c=s?"rgba(255,255,255,0.2)":f?"rgba(255,255,255,0.18)":e,g="#ffffff",u=s?"#ffffff":f?"rgba(255,255,255,0.95)":"#e4e4e7",b=s?"rgba(255,255,255,0.75)":f?"rgba(255,255,255,0.5)":"#52525b",v=s?"rgba(255,255,255,0.6)":f?"rgba(255,255,255,0.5)":e,I=e,z=y(e,50),E=y(e,-50);return(0,t.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:s?O(e,.55):f?"#06060a":"#0a0a0c",...!f&&!s?{background:"linear-gradient(180deg, #1a1a1f 0%, #0a0a0c 100%)"}:{},padding:"72px 80px",fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",top:-500,left:-400,width:1400,height:1300,borderRadius:"50%",backgroundColor:I,opacity:.7,filter:"blur(240px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",bottom:-480,right:-380,width:1380,height:1280,borderRadius:"50%",backgroundColor:z,opacity:.65,filter:"blur(235px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:"20%",right:-200,width:1e3,height:900,borderRadius:"50%",backgroundColor:E,opacity:.6,filter:"blur(220px)",display:"flex"}})]}):f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",bottom:-180,left:-80,width:700,height:560,borderRadius:"50%",backgroundColor:e,opacity:.8,filter:"blur(130px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:-160,right:-60,width:580,height:480,borderRadius:"50%",backgroundColor:G(e,70),opacity:.6,filter:"blur(110px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:-80,left:"20%",width:340,height:260,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(70px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",bottom:-60,right:"10%",width:380,height:300,borderRadius:"50%",backgroundColor:G(e,-50),opacity:.4,filter:"blur(90px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.52)",display:"flex"}})]}):(0,t.jsx)("div",{style:{position:"absolute",bottom:-200,left:"30%",width:500,height:300,borderRadius:"50%",backgroundColor:e,opacity:.08,filter:"blur(80px)",display:"flex"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:18,position:"relative",zIndex:1},children:[r?(0,t.jsx)("img",{src:r,width:52,height:52,style:{borderRadius:14,objectFit:"cover",display:"flex"}}):(0,t.jsx)("div",{style:{width:52,height:52,borderRadius:14,backgroundColor:c,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:900,color:g},children:l[0].toUpperCase()}),(0,t.jsx)("span",{style:{fontSize:30,fontWeight:800,color:u,letterSpacing:"-0.5px"},children:l})]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",position:"relative",zIndex:1},children:a}),n&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,position:"relative",zIndex:1},children:[(0,t.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:v,display:"flex"}}),(0,t.jsx)("span",{style:{fontSize:22,color:b,fontWeight:600},children:n})]})]})}function V({title:o,sub:e,badge:n,color:i="#007B5F",bg:r="dark"}){let a=r==="blend";return(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,t.jsx)(m,{text:n,color:i,bg:r})}),(0,t.jsx)(p,{text:o,style:{fontSize:72,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.1}}),e&&(0,t.jsx)(p,{text:e,style:{fontSize:34,color:r==="gradient"?"rgba(255,255,255,0.72)":a?"rgba(255,255,255,0.85)":"#a1a1aa",marginTop:22,fontWeight:500}})]})}function J({home:o,away:e,score:n,sub:i,badge:r,color:a="#007B5F",bg:l="dark"}){let f=l==="gradient",s=l==="blend",d="#ffffff",c=f?"rgba(255,255,255,0.9)":s?"rgba(255,255,255,0.85)":a,g=f?"rgba(255,255,255,0.6)":s?"rgba(255,255,255,0.9)":h(a,.6),u=f?"rgba(255,255,255,0.35)":s?h(a,.5):h(a,.35);return(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)(p,{text:i,style:{fontSize:28,color:c,fontWeight:700,marginBottom:24}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:28},children:[(0,t.jsx)("span",{style:{fontSize:64,fontWeight:900,color:d,letterSpacing:"-1.5px"},children:o}),n?(0,t.jsx)("span",{style:{fontSize:48,fontWeight:900,color:g,letterSpacing:"3px"},children:n}):(0,t.jsx)("span",{style:{fontSize:36,fontWeight:700,color:u},children:"vs"}),(0,t.jsx)("span",{style:{fontSize:64,fontWeight:900,color:"#ffffff",letterSpacing:"-1.5px"},children:e})]}),r&&(0,t.jsx)("div",{style:{display:"flex",marginTop:24},children:(0,t.jsx)(m,{text:r,color:a,bg:l})})]})}function Y({title:o,sub:e,badge:n,color:i="#007B5F",bg:r="dark"}){let a=r==="blend";return(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)("div",{style:{display:"flex",marginBottom:24},children:(0,t.jsx)(m,{text:n,color:i,bg:r})}),(0,t.jsx)(p,{text:o,style:{fontSize:80,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.15}}),e&&(0,t.jsx)(p,{text:e,style:{fontSize:38,color:r==="gradient"?"rgba(255,255,255,0.72)":a?"rgba(255,255,255,0.85)":"#71717a",marginTop:28,fontWeight:500}})]})}function K({letter:o,radius:e=96,appName:n="m1k",color:i="#007B5F",bg:r="dark",fontSize:a=240}){let f=o??(n||"m1k")[0].toUpperCase(),s=r==="gradient",d=r==="blend",c=d?O(i,.55):s?"#06060a":i,g=i,u=y(i,50),b=y(i,-50);return(0,t.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c,borderRadius:e,fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",top:-280,left:-250,width:800,height:750,borderRadius:"50%",backgroundColor:g,opacity:.62,filter:"blur(200px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",bottom:-260,right:-220,width:780,height:730,borderRadius:"50%",backgroundColor:u,opacity:.58,filter:"blur(195px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:"25%",right:-100,width:600,height:550,borderRadius:"50%",backgroundColor:b,opacity:.55,filter:"blur(180px)",display:"flex"}})]}):s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",bottom:-100,left:-80,width:420,height:380,borderRadius:"50%",backgroundColor:i,opacity:.7,filter:"blur(100px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:-80,right:-60,width:350,height:320,borderRadius:"50%",backgroundColor:G(i,70),opacity:.45,filter:"blur(90px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",top:-40,left:"25%",width:200,height:150,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(60px)",display:"flex"}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{position:"absolute",top:-80,right:-80,width:300,height:300,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.1,filter:"blur(80px)",display:"flex"}}),(0,t.jsx)("div",{style:{position:"absolute",bottom:-60,left:-60,width:250,height:250,borderRadius:"50%",backgroundColor:"#000000",opacity:.15,filter:"blur(60px)",display:"flex"}})]}),(0,t.jsx)("span",{style:{fontSize:a,fontWeight:900,color:"#ffffff",letterSpacing:`${(-a*.025).toFixed(1)}px`,lineHeight:1,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",...d?{textShadow:"0 2px 8px rgba(0,0,0,0.3)"}:{}},children:f})]})}function Q({title:o,author:e,date:n,category:i,sub:r,color:a="#007B5F",bg:l="dark"}){let f=l==="gradient",s=l==="blend",d="#ffffff",c=f?"rgba(255,255,255,0.55)":s?"rgba(255,255,255,0.8)":"#71717a",g=f?"rgba(255,255,255,0.9)":s?"rgba(255,255,255,0.6)":a,u=s?"#000000":f?"#18181b":"#fff",b=f?"rgba(255,255,255,0.3)":s?"rgba(255,255,255,0.5)":"#3f3f46";return(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,t.jsx)(m,{text:i,color:a,bg:l})}),(0,t.jsx)(p,{text:o,style:{fontSize:64,fontWeight:900,color:d,letterSpacing:"-1.5px",lineHeight:1.15}}),r&&(0,t.jsx)(p,{text:r,style:{fontSize:30,color:c,marginTop:18,fontWeight:500}}),(e||n)&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginTop:28},children:[e&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,t.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:g,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:800,color:u},children:e[0].toUpperCase()}),(0,t.jsx)("span",{style:{fontSize:22,color:c,fontWeight:600},children:e})]}),e&&n&&(0,t.jsx)("span",{style:{fontSize:20,color:b,display:"flex"},children:"\xB7"}),n&&(0,t.jsx)("span",{style:{fontSize:22,color:c,fontWeight:500,display:"flex"},children:n})]})]})}function X({stat:o,label:e,sub:n,badge:i,color:r="#007B5F",bg:a="dark"}){let l=a==="gradient",f=a==="blend";return(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,t.jsx)(m,{text:i,color:r,bg:a})}),(0,t.jsx)(p,{text:o,style:{fontSize:110,fontWeight:900,color:f||l?"#ffffff":r,letterSpacing:"-4px",lineHeight:1}}),(0,t.jsx)("div",{style:{fontSize:36,fontWeight:700,color:"#ffffff",marginTop:12,display:"flex"},children:e}),n&&(0,t.jsx)(p,{text:n,style:{fontSize:26,color:f?"rgba(255,255,255,0.8)":l?"rgba(255,255,255,0.55)":"#71717a",marginTop:14,fontWeight:500}})]})}function Z({title:o,tagline:e,features:n,badge:i,color:r="#007B5F",bg:a="dark"}){let l=a==="gradient",f=a==="blend",s="#ffffff",d=l?"rgba(255,255,255,0.75)":f?"rgba(255,255,255,0.85)":"#a1a1aa",c=l?"rgba(255,255,255,0.7)":f?"rgba(255,255,255,0.8)":"#a1a1aa",g=l?"rgba(255,255,255,0.5)":f?"rgba(255,255,255,0.6)":r,u=(n??[]).slice(0,3);return(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,t.jsx)(m,{text:i,color:r,bg:a})}),(0,t.jsx)(p,{text:o,style:{fontSize:72,fontWeight:900,color:s,letterSpacing:"-2px",lineHeight:1.1}}),e&&(0,t.jsx)(p,{text:e,style:{fontSize:32,color:d,marginTop:16,fontWeight:500}}),u.length>0&&(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:u.map((b,v)=>(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,t.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:g,display:"flex",flexShrink:0}}),(0,t.jsx)(p,{text:b,style:{fontSize:24,color:c,fontWeight:500}})]},v))})]})}function w({text:o,appName:e="app",color:n="#0f0f1a",size:i=512}={}){let r=o??e,a=i*(r.length===1?.6:r.length<=3?.42:.3);return(0,t.jsx)("div",{style:{width:i,height:i,display:"flex",alignItems:"center",justifyContent:"center",background:n},children:(0,t.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:`${i*.02}px`,alignItems:"center"},children:r.split("").map((l,f)=>(0,t.jsx)("span",{style:{fontSize:a,fontWeight:900,color:"#ffffff",fontFamily:"system-ui, sans-serif",lineHeight:1},children:l},f))})})}function T(o){let{appName:e,color:n,domain:i,bg:r,logoUrl:a}=o,l=o.type??"default";return l==="icon"?(0,t.jsx)(K,{...o,appName:e,color:n,bg:r}):(0,t.jsx)(_,{appName:e,color:n,domain:i,bg:r,logoUrl:a,children:l==="match"?(0,t.jsx)(J,{...o,color:n,bg:r}):l==="square"?(0,t.jsx)(Y,{...o,color:n,bg:r}):l==="article"?(0,t.jsx)(Q,{...o,color:n,bg:r}):l==="stat"?(0,t.jsx)(X,{...o,color:n,bg:r}):l==="product"?(0,t.jsx)(Z,{...o,color:n,bg:r}):(0,t.jsx)(V,{...o,color:n,bg:r})})}var tt="https://cdn.jsdelivr.net/gh/fonts-archive/Pretendard",et={400:"Pretendard-Regular.otf",700:"Pretendard-Bold.otf",900:"Pretendard-Black.otf"},k=new Map;function S(o){let e=k.get(o);if(e)return e;let n=fetch(o).then(i=>{if(!i.ok)throw new Error(`Font fetch failed: ${i.status} ${o}`);return i.arrayBuffer()});return k.set(o,n),n}async function B(o=[700,900]){return await Promise.all(o.map(async n=>{let i=et[n];return{name:"Pretendard",data:await S(`${tt}/${i}`),weight:n,style:"normal"}}))}async function R(o){let e=await S(o.url);return{name:o.name,data:e,weight:o.weight??400,style:o.style??"normal"}}async function P(o,e=[400,700]){let n=e.map(s=>`${s}`).join(";"),i=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(o)}:wght@${n}&display=swap`,r=await fetch(i,{headers:{"User-Agent":"Mozilla/5.0"}}).then(s=>{if(!s.ok)throw new Error(`Google Fonts fetch failed: ${s.status}`);return s.text()}),a=[...r.matchAll(/src:\s*url\(([^)]+)\)\s*format\(['"]?(truetype|opentype|woff2?)['"]?\)/g)],l=[...r.matchAll(/font-weight:\s*(\d+)/g)],f=[];for(let s=0;s<a.length;s++){let d=a[s][1].replace(/['"]/g,""),c=l[s]?Number(l[s][1]):e[s]??400,g=await S(d);f.push({name:o,data:g,weight:c,style:"normal"})}if(f.length===0)throw new Error(`No fonts found for "${o}"`);return f}var ot="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg",F=new Map;function nt(o){let e=[];for(let n=0;n<o.length;n++){let i=o.codePointAt(n);i>65535&&n++,i!==65039&&e.push(i.toString(16))}return e.join("-")}async function it(o){let e=nt(o),n=`${ot}/${e}.svg`,i=F.get(n);if(i)return i;let r=fetch(n).then(async a=>a.ok?a.text():"");return F.set(n,r),r}function $(){return async(o,e)=>{if(o==="emoji"){let n=await it(e);return n?`data:image/svg+xml;base64,${btoa(n)}`:void 0}}}function W(){let o=new Date,e=o.getFullYear(),n=String(o.getMonth()+1).padStart(2,"0"),i=String(o.getDate()).padStart(2,"0"),r=String(o.getHours()).padStart(2,"0"),a=String(o.getMinutes()).padStart(2,"0"),l=String(o.getSeconds()).padStart(2,"0");return`${e}${n}${i}${r}${a}${l}`}0&&(module.exports={OGImage,createEmojiLoader,createFaviconElement,getOGVersion,loadFont,loadGoogleFont,loadPretendard});
1
+ "use strict";var w=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var o in e)w(t,o,{get:e[o],enumerable:!0})},X=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Y(e))!K.call(t,n)&&n!==o&&w(t,n,{get:()=>e[n],enumerable:!(r=J(e,n))||r.enumerable});return t};var Z=t=>X(w({},"__esModule",{value:!0}),t);var gt={};Q(gt,{OGImage:()=>A,createEmojiLoader:()=>U,createFaviconElement:()=>M,getOGVersion:()=>_,loadFont:()=>N,loadGoogleFont:()=>H,loadPretendard:()=>j});module.exports=Z(gt);function S(t){let e=t.replace("#",""),o=parseInt(e.length===3?e.split("").map(r=>r+r).join(""):e,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}function C(t,e){let{r:o,g:r,b:n}=S(t);return`rgba(${o},${r},${n},${e})`}function tt(t,e,o){t/=255,e/=255,o/=255;let r=Math.max(t,e,o),n=Math.min(t,e,o),i=(r+n)/2;if(r===n)return{h:0,s:0,l:i};let a=r-n,s=i>.5?a/(2-r-n):a/(r+n),f=0;return r===t?f=60*(((e-o)/a+(e<o?6:0))%6):r===e?f=60*(((o-t)/a+2)%6):f=60*(((t-e)/a+4)%6),{h:f,s,l:i}}function et(t,e,o){let r=(1-Math.abs(2*o-1))*e,n=r*(1-Math.abs(t/60%2-1)),i=o-r/2,a=0,s=0,f=0;return t<60?[a,s,f]=[r,n,0]:t<120?[a,s,f]=[n,r,0]:t<180?[a,s,f]=[0,r,n]:t<240?[a,s,f]=[0,n,r]:t<300?[a,s,f]=[n,0,r]:[a,s,f]=[r,0,n],{r:Math.round((a+i)*255),g:Math.round((s+i)*255),b:Math.round((f+i)*255)}}function G(t,e=45){let{r:o,g:r,b:n}=S(t),{h:i,s:a,l:s}=tt(o,r,n),f=(i+e)%360,{r:c,g:u,b:m}=et(f,a,s);return`rgb(${c},${u},${m})`}function v(t,e){let{r:o,g:r,b:n}=S(t),i=a=>Math.max(0,Math.min(255,a));return`rgb(${i(o+e)},${i(r+e)},${i(n+e)})`}function T(t,e=.5){let{r:o,g:r,b:n}=S(t),i=a=>Math.round(a+(255-a)*e);return`rgb(${i(o)},${i(r)},${i(n)})`}var d=require("react/jsx-runtime"),B={blend:{logoIconBg:()=>"rgba(255,255,255,0.2)",logoTextColor:"#ffffff",domainColor:"rgba(255,255,255,0.75)",dotColor:()=>"rgba(255,255,255,0.6)",baseBg:t=>T(t,.55),baseGradient:void 0},gradient:{logoIconBg:()=>"rgba(255,255,255,0.18)",logoTextColor:"rgba(255,255,255,0.95)",domainColor:"rgba(255,255,255,0.5)",dotColor:()=>"rgba(255,255,255,0.5)",baseBg:()=>"#06060a",baseGradient:void 0},dark:{logoIconBg:t=>t,logoTextColor:"#e4e4e7",domainColor:"#52525b",dotColor:t=>t,baseBg:()=>"#0a0a0c",baseGradient:"linear-gradient(180deg, #1a1a1f 0%, #0a0a0c 100%)"}};function ot({color:t}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{position:"absolute",top:-500,left:-400,width:1400,height:1300,borderRadius:"50%",backgroundColor:t,opacity:.7,filter:"blur(240px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",bottom:-480,right:-380,width:1380,height:1280,borderRadius:"50%",backgroundColor:G(t,50),opacity:.65,filter:"blur(235px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",top:"20%",right:-200,width:1e3,height:900,borderRadius:"50%",backgroundColor:G(t,-50),opacity:.6,filter:"blur(220px)",display:"flex"}})]})}function rt({color:t}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{position:"absolute",bottom:-180,left:-80,width:700,height:560,borderRadius:"50%",backgroundColor:t,opacity:.8,filter:"blur(130px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",top:-160,right:-60,width:580,height:480,borderRadius:"50%",backgroundColor:v(t,70),opacity:.6,filter:"blur(110px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",top:-80,left:"20%",width:340,height:260,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(70px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",bottom:-60,right:"10%",width:380,height:300,borderRadius:"50%",backgroundColor:v(t,-50),opacity:.4,filter:"blur(90px)",display:"flex"}}),(0,d.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.52)",display:"flex"}})]})}function nt({color:t}){return(0,d.jsx)("div",{style:{position:"absolute",bottom:-200,left:"30%",width:500,height:300,borderRadius:"50%",backgroundColor:t,opacity:.08,filter:"blur(80px)",display:"flex"}})}function P({appName:t,color:e="#007B5F",domain:o,bg:r="dark",logoUrl:n,children:i}){let a=t||"m1k",s=B[r]??B.dark,f=s.logoIconBg(e),c="#ffffff",u=s.logoTextColor,m=s.domainColor,y=s.dotColor(e);return(0,d.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:s.baseBg(e),...s.baseGradient?{background:s.baseGradient}:{},padding:"72px 80px",fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[r==="blend"?(0,d.jsx)(ot,{color:e}):r==="gradient"?(0,d.jsx)(rt,{color:e}):(0,d.jsx)(nt,{color:e}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:18,position:"relative",zIndex:1},children:[n?(0,d.jsx)("img",{src:n,width:52,height:52,style:{borderRadius:14,objectFit:"cover",display:"flex"}}):(0,d.jsx)("div",{style:{width:52,height:52,borderRadius:14,backgroundColor:f,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:900,color:c},children:a[0].toUpperCase()}),(0,d.jsx)("span",{style:{fontSize:30,fontWeight:800,color:u,letterSpacing:"-0.5px"},children:a})]}),(0,d.jsx)("div",{style:{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",position:"relative",zIndex:1},children:i}),o&&(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,position:"relative",zIndex:1},children:[(0,d.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:y,display:"flex"}}),(0,d.jsx)("span",{style:{fontSize:22,color:m,fontWeight:600},children:o})]})]})}var x=require("react/jsx-runtime");function it(t){let e=[],o=/\p{Extended_Pictographic}/gu,r=0;for(let i of t.matchAll(o)){let a=t.slice(r,i.index).trim();a&&e.push(a),e.push(i[0]),r=i.index+i[0].length}let n=t.slice(r).trim();return n&&e.push(n),e}function p({text:t,style:e}){let o=it(t);return o.length<=1?(0,x.jsx)("span",{style:{display:"flex",...e},children:t}):(0,x.jsx)("span",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",...e},children:o.map((r,n)=>(0,x.jsx)("span",{children:r},n))})}function h({text:t,color:e,bg:o="dark"}){let r=o==="gradient",n=o==="blend";return(0,x.jsx)("div",{style:{display:"flex"},children:(0,x.jsx)("div",{style:{display:"flex",backgroundColor:n||r?"rgba(255,255,255,0.2)":C(e,.12),borderRadius:24,paddingLeft:18,paddingRight:18,paddingTop:8,paddingBottom:8},children:(0,x.jsx)(p,{text:t,style:{fontSize:22,fontWeight:700,color:n||r?"#ffffff":e,letterSpacing:"0.2px"}})})})}var g=require("react/jsx-runtime");function R({title:t,sub:e,badge:o,color:r="#007B5F",bg:n="dark"}){let i=n==="blend";return(0,g.jsxs)(g.Fragment,{children:[o&&(0,g.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,g.jsx)(h,{text:o,color:r,bg:n})}),(0,g.jsx)(p,{text:t,style:{fontSize:72,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.1}}),e&&(0,g.jsx)(p,{text:e,style:{fontSize:34,color:n==="gradient"?"rgba(255,255,255,0.72)":i?"rgba(255,255,255,0.85)":"#a1a1aa",marginTop:22,fontWeight:500}})]})}function I({home:t,away:e,score:o,sub:r,badge:n,color:i="#007B5F",bg:a="dark"}){let s=a==="gradient",f=a==="blend",c="#ffffff",u=s?"rgba(255,255,255,0.9)":f?"rgba(255,255,255,0.85)":i,m=s?"rgba(255,255,255,0.6)":f?"rgba(255,255,255,0.9)":C(i,.6),y=s?"rgba(255,255,255,0.35)":f?C(i,.5):C(i,.35);return(0,g.jsxs)(g.Fragment,{children:[r&&(0,g.jsx)(p,{text:r,style:{fontSize:28,color:u,fontWeight:700,marginBottom:24}}),(0,g.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:28},children:[(0,g.jsx)("span",{style:{fontSize:64,fontWeight:900,color:c,letterSpacing:"-1.5px"},children:t}),o?(0,g.jsx)("span",{style:{fontSize:48,fontWeight:900,color:m,letterSpacing:"3px"},children:o}):(0,g.jsx)("span",{style:{fontSize:36,fontWeight:700,color:y},children:"vs"}),(0,g.jsx)("span",{style:{fontSize:64,fontWeight:900,color:"#ffffff",letterSpacing:"-1.5px"},children:e})]}),n&&(0,g.jsx)("div",{style:{display:"flex",marginTop:24},children:(0,g.jsx)(h,{text:n,color:i,bg:a})})]})}function F({title:t,sub:e,badge:o,color:r="#007B5F",bg:n="dark"}){let i=n==="blend";return(0,g.jsxs)(g.Fragment,{children:[o&&(0,g.jsx)("div",{style:{display:"flex",marginBottom:24},children:(0,g.jsx)(h,{text:o,color:r,bg:n})}),(0,g.jsx)(p,{text:t,style:{fontSize:80,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.15}}),e&&(0,g.jsx)(p,{text:e,style:{fontSize:38,color:n==="gradient"?"rgba(255,255,255,0.72)":i?"rgba(255,255,255,0.85)":"#71717a",marginTop:28,fontWeight:500}})]})}var l=require("react/jsx-runtime");function E({letter:t,radius:e=96,appName:o="m1k",color:r="#007B5F",bg:n="dark",fontSize:i=240}){let s=t??(o||"m1k")[0].toUpperCase(),f=n==="gradient",c=n==="blend",u=c?T(r,.55):f?"#06060a":r,m=r,y=G(r,50),O=G(r,-50);return(0,l.jsxs)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u,borderRadius:e,fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[c?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{position:"absolute",top:-280,left:-250,width:800,height:750,borderRadius:"50%",backgroundColor:m,opacity:.62,filter:"blur(200px)",display:"flex"}}),(0,l.jsx)("div",{style:{position:"absolute",bottom:-260,right:-220,width:780,height:730,borderRadius:"50%",backgroundColor:y,opacity:.58,filter:"blur(195px)",display:"flex"}}),(0,l.jsx)("div",{style:{position:"absolute",top:"25%",right:-100,width:600,height:550,borderRadius:"50%",backgroundColor:O,opacity:.55,filter:"blur(180px)",display:"flex"}})]}):f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{position:"absolute",bottom:-100,left:-80,width:420,height:380,borderRadius:"50%",backgroundColor:r,opacity:.7,filter:"blur(100px)",display:"flex"}}),(0,l.jsx)("div",{style:{position:"absolute",top:-80,right:-60,width:350,height:320,borderRadius:"50%",backgroundColor:v(r,70),opacity:.45,filter:"blur(90px)",display:"flex"}}),(0,l.jsx)("div",{style:{position:"absolute",top:-40,left:"25%",width:200,height:150,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(60px)",display:"flex"}})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{style:{position:"absolute",top:-80,right:-80,width:300,height:300,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.1,filter:"blur(80px)",display:"flex"}}),(0,l.jsx)("div",{style:{position:"absolute",bottom:-60,left:-60,width:250,height:250,borderRadius:"50%",backgroundColor:"#000000",opacity:.15,filter:"blur(60px)",display:"flex"}})]}),(0,l.jsx)("span",{style:{fontSize:i,fontWeight:900,color:"#ffffff",letterSpacing:`${(-i*.025).toFixed(1)}px`,lineHeight:1,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",...c?{textShadow:"0 2px 8px rgba(0,0,0,0.3)"}:{}},children:s})]})}var $={gradient:{muted:"rgba(255,255,255,0.55)",accent:t=>"rgba(255,255,255,0.9)",authorLetter:"#18181b",dotSep:"rgba(255,255,255,0.3)"},blend:{muted:"rgba(255,255,255,0.8)",accent:t=>"rgba(255,255,255,0.6)",authorLetter:"#000000",dotSep:"rgba(255,255,255,0.5)"},dark:{muted:"#71717a",accent:t=>t,authorLetter:"#fff",dotSep:"#3f3f46"}};function W({title:t,author:e,date:o,category:r,sub:n,color:i="#007B5F",bg:a="dark"}){let s=$[a]??$.dark,f="#ffffff",c=s.muted,u=s.accent(i),m=s.authorLetter,y=s.dotSep;return(0,l.jsxs)(l.Fragment,{children:[r&&(0,l.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,l.jsx)(h,{text:r,color:i,bg:a})}),(0,l.jsx)(p,{text:t,style:{fontSize:64,fontWeight:900,color:f,letterSpacing:"-1.5px",lineHeight:1.15}}),n&&(0,l.jsx)(p,{text:n,style:{fontSize:30,color:c,marginTop:18,fontWeight:500}}),(e||o)&&(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16,marginTop:28},children:[e&&(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,l.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:u,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:800,color:m},children:e[0].toUpperCase()}),(0,l.jsx)("span",{style:{fontSize:22,color:c,fontWeight:600},children:e})]}),e&&o&&(0,l.jsx)("span",{style:{fontSize:20,color:y,display:"flex"},children:"\xB7"}),o&&(0,l.jsx)("span",{style:{fontSize:22,color:c,fontWeight:500,display:"flex"},children:o})]})]})}function z({stat:t,label:e,sub:o,badge:r,color:n="#007B5F",bg:i="dark"}){let a=i==="gradient",s=i==="blend";return(0,l.jsxs)(l.Fragment,{children:[r&&(0,l.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,l.jsx)(h,{text:r,color:n,bg:i})}),(0,l.jsx)(p,{text:t,style:{fontSize:110,fontWeight:900,color:s||a?"#ffffff":n,letterSpacing:"-4px",lineHeight:1}}),(0,l.jsx)("div",{style:{fontSize:36,fontWeight:700,color:"#ffffff",marginTop:12,display:"flex"},children:e}),o&&(0,l.jsx)(p,{text:o,style:{fontSize:26,color:s?"rgba(255,255,255,0.8)":a?"rgba(255,255,255,0.55)":"#71717a",marginTop:14,fontWeight:500}})]})}function L({title:t,tagline:e,features:o,badge:r,color:n="#007B5F",bg:i="dark"}){let a=i==="gradient",s=i==="blend",f="#ffffff",c=a?"rgba(255,255,255,0.75)":s?"rgba(255,255,255,0.85)":"#a1a1aa",u=a?"rgba(255,255,255,0.7)":s?"rgba(255,255,255,0.8)":"#a1a1aa",m=a?"rgba(255,255,255,0.5)":s?"rgba(255,255,255,0.6)":n,y=(o??[]).slice(0,3);return(0,l.jsxs)(l.Fragment,{children:[r&&(0,l.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,l.jsx)(h,{text:r,color:n,bg:i})}),(0,l.jsx)(p,{text:t,style:{fontSize:72,fontWeight:900,color:f,letterSpacing:"-2px",lineHeight:1.1}}),e&&(0,l.jsx)(p,{text:e,style:{fontSize:32,color:c,marginTop:16,fontWeight:500}}),y.length>0&&(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:y.map((O,V)=>(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,l.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:m,display:"flex",flexShrink:0}}),(0,l.jsx)(p,{text:O,style:{fontSize:24,color:u,fontWeight:500}})]},V))})]})}var b=require("react/jsx-runtime");function M({text:t,appName:e="app",color:o="#0f0f1a",size:r=512}={}){let n=t??e,i=r*(n.length===1?.6:n.length<=3?.42:.3);return(0,b.jsx)("div",{style:{width:r,height:r,display:"flex",alignItems:"center",justifyContent:"center",background:o},children:(0,b.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:`${r*.02}px`,alignItems:"center"},children:n.split("").map((a,s)=>(0,b.jsx)("span",{style:{fontSize:i,fontWeight:900,color:"#ffffff",fontFamily:"system-ui, sans-serif",lineHeight:1},children:a},s))})})}function A(t){let{appName:e,color:o,domain:r,bg:n,logoUrl:i}=t,a=t.type??"default";return a==="icon"?(0,b.jsx)(E,{...t,appName:e,color:o,bg:n}):(0,b.jsx)(P,{appName:e,color:o,domain:r,bg:n,logoUrl:i,children:a==="match"?(0,b.jsx)(I,{...t,color:o,bg:n}):a==="square"?(0,b.jsx)(F,{...t,color:o,bg:n}):a==="article"?(0,b.jsx)(W,{...t,color:o,bg:n}):a==="stat"?(0,b.jsx)(z,{...t,color:o,bg:n}):a==="product"?(0,b.jsx)(L,{...t,color:o,bg:n}):(0,b.jsx)(R,{...t,color:o,bg:n})})}var at="https://cdn.jsdelivr.net/gh/fonts-archive/Pretendard",lt={400:"Pretendard-Regular.otf",700:"Pretendard-Bold.otf",900:"Pretendard-Black.otf"},D=new Map;function k(t){let e=D.get(t);if(e)return e;let o=fetch(t).then(r=>{if(!r.ok)throw new Error(`Font fetch failed: ${r.status} ${t}`);return r.arrayBuffer()});return D.set(t,o),o}async function j(t=[700,900]){return await Promise.all(t.map(async o=>{let r=lt[o];return{name:"Pretendard",data:await k(`${at}/${r}`),weight:o,style:"normal"}}))}async function N(t){let e=await k(t.url);return{name:t.name,data:e,weight:t.weight??400,style:t.style??"normal"}}async function H(t,e=[400,700]){let o=e.map(f=>`${f}`).join(";"),r=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(t)}:wght@${o}&display=swap`,n=await fetch(r,{headers:{"User-Agent":"Mozilla/5.0"}}).then(f=>{if(!f.ok)throw new Error(`Google Fonts fetch failed: ${f.status}`);return f.text()}),i=[...n.matchAll(/src:\s*url\(([^)]+)\)\s*format\(['"]?(truetype|opentype|woff2?)['"]?\)/g)],a=[...n.matchAll(/font-weight:\s*(\d+)/g)],s=[];for(let f=0;f<i.length;f++){let c=i[f][1].replace(/['"]/g,""),u=a[f]?Number(a[f][1]):e[f]??400,m=await k(c);s.push({name:t,data:m,weight:u,style:"normal"})}if(s.length===0)throw new Error(`No fonts found for "${t}"`);return s}var st="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg",q=new Map;function ft(t){let e=[];for(let o=0;o<t.length;o++){let r=t.codePointAt(o);r>65535&&o++,r!==65039&&e.push(r.toString(16))}return e.join("-")}async function dt(t){let e=ft(t),o=`${st}/${e}.svg`,r=q.get(o);if(r)return r;let n=fetch(o).then(async i=>i.ok?i.text():"");return q.set(o,n),n}function U(){return async(t,e)=>{if(t==="emoji"){let o=await dt(e);return o?`data:image/svg+xml;base64,${btoa(o)}`:void 0}}}function _(){let t=new Date,e=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${e}${o}${r}${n}${i}${a}`}0&&(module.exports={OGImage,createEmojiLoader,createFaviconElement,getOGVersion,loadFont,loadGoogleFont,loadPretendard});
package/dist/ogimage.mjs CHANGED
@@ -1 +1 @@
1
- import{Fragment as b,jsx as r,jsxs as d}from"react/jsx-runtime";function F(t){let e=[],n=/\p{Extended_Pictographic}/gu,o=0;for(let a of t.matchAll(n)){let l=t.slice(o,a.index).trim();l&&e.push(l),e.push(a[0]),o=a.index+a[0].length}let i=t.slice(o).trim();return i&&e.push(i),e}function u({text:t,style:e}){let n=F(t);return n.length<=1?r("span",{style:{display:"flex",...e},children:t}):r("span",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",...e},children:n.map((o,i)=>r("span",{children:o},i))})}function C(t){let e=t.replace("#",""),n=parseInt(e.length===3?e.split("").map(o=>o+o).join(""):e,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function x(t,e){let{r:n,g:o,b:i}=C(t);return`rgba(${n},${o},${i},${e})`}function $(t,e,n){t/=255,e/=255,n/=255;let o=Math.max(t,e,n),i=Math.min(t,e,n),a=(o+i)/2;if(o===i)return{h:0,s:0,l:a};let l=o-i,f=a>.5?l/(2-o-i):l/(o+i),s=0;return o===t?s=60*(((e-n)/l+(e<n?6:0))%6):o===e?s=60*(((n-t)/l+2)%6):s=60*(((t-e)/l+4)%6),{h:s,s:f,l:a}}function W(t,e,n){let o=(1-Math.abs(2*n-1))*e,i=o*(1-Math.abs(t/60%2-1)),a=n-o/2,l=0,f=0,s=0;return t<60?[l,f,s]=[o,i,0]:t<120?[l,f,s]=[i,o,0]:t<180?[l,f,s]=[0,o,i]:t<240?[l,f,s]=[0,i,o]:t<300?[l,f,s]=[i,0,o]:[l,f,s]=[o,0,i],{r:Math.round((l+a)*255),g:Math.round((f+a)*255),b:Math.round((s+a)*255)}}function v(t,e=45){let{r:n,g:o,b:i}=C(t),{h:a,s:l,l:f}=$(n,o,i),s=(a+e)%360,{r:c,g,b:p}=W(s,l,f);return`rgb(${c},${g},${p})`}function S(t,e){let{r:n,g:o,b:i}=C(t),a=l=>Math.max(0,Math.min(255,l));return`rgb(${a(n+e)},${a(o+e)},${a(i+e)})`}function w(t,e=.5){let{r:n,g:o,b:i}=C(t),a=l=>Math.round(l+(255-l)*e);return`rgb(${a(n)},${a(o)},${a(i)})`}function y({text:t,color:e,bg:n="dark"}){let o=n==="gradient",i=n==="blend";return r("div",{style:{display:"flex"},children:r("div",{style:{display:"flex",backgroundColor:i||o?"rgba(255,255,255,0.2)":x(e,.12),borderRadius:24,paddingLeft:18,paddingRight:18,paddingTop:8,paddingBottom:8},children:r(u,{text:t,style:{fontSize:22,fontWeight:700,color:i||o?"#ffffff":e,letterSpacing:"0.2px"}})})})}function I({appName:t,color:e="#007B5F",domain:n,bg:o="dark",logoUrl:i,children:a}){let l=t||"m1k",f=o==="gradient",s=o==="blend",c="#ffffff",g=s?"rgba(255,255,255,0.2)":f?"rgba(255,255,255,0.18)":e,p="#ffffff",m=s?"#ffffff":f?"rgba(255,255,255,0.95)":"#e4e4e7",h=s?"rgba(255,255,255,0.75)":f?"rgba(255,255,255,0.5)":"#52525b",G=s?"rgba(255,255,255,0.6)":f?"rgba(255,255,255,0.5)":e,B=e,R=v(e,50),P=v(e,-50);return d("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:s?w(e,.55):f?"#06060a":"#0a0a0c",...!f&&!s?{background:"linear-gradient(180deg, #1a1a1f 0%, #0a0a0c 100%)"}:{},padding:"72px 80px",fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[s?d(b,{children:[r("div",{style:{position:"absolute",top:-500,left:-400,width:1400,height:1300,borderRadius:"50%",backgroundColor:B,opacity:.7,filter:"blur(240px)",display:"flex"}}),r("div",{style:{position:"absolute",bottom:-480,right:-380,width:1380,height:1280,borderRadius:"50%",backgroundColor:R,opacity:.65,filter:"blur(235px)",display:"flex"}}),r("div",{style:{position:"absolute",top:"20%",right:-200,width:1e3,height:900,borderRadius:"50%",backgroundColor:P,opacity:.6,filter:"blur(220px)",display:"flex"}})]}):f?d(b,{children:[r("div",{style:{position:"absolute",bottom:-180,left:-80,width:700,height:560,borderRadius:"50%",backgroundColor:e,opacity:.8,filter:"blur(130px)",display:"flex"}}),r("div",{style:{position:"absolute",top:-160,right:-60,width:580,height:480,borderRadius:"50%",backgroundColor:S(e,70),opacity:.6,filter:"blur(110px)",display:"flex"}}),r("div",{style:{position:"absolute",top:-80,left:"20%",width:340,height:260,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(70px)",display:"flex"}}),r("div",{style:{position:"absolute",bottom:-60,right:"10%",width:380,height:300,borderRadius:"50%",backgroundColor:S(e,-50),opacity:.4,filter:"blur(90px)",display:"flex"}}),r("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.52)",display:"flex"}})]}):r("div",{style:{position:"absolute",bottom:-200,left:"30%",width:500,height:300,borderRadius:"50%",backgroundColor:e,opacity:.08,filter:"blur(80px)",display:"flex"}}),d("div",{style:{display:"flex",alignItems:"center",gap:18,position:"relative",zIndex:1},children:[i?r("img",{src:i,width:52,height:52,style:{borderRadius:14,objectFit:"cover",display:"flex"}}):r("div",{style:{width:52,height:52,borderRadius:14,backgroundColor:g,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:900,color:p},children:l[0].toUpperCase()}),r("span",{style:{fontSize:30,fontWeight:800,color:m,letterSpacing:"-0.5px"},children:l})]}),r("div",{style:{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",position:"relative",zIndex:1},children:a}),n&&d("div",{style:{display:"flex",alignItems:"center",gap:10,position:"relative",zIndex:1},children:[r("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:G,display:"flex"}}),r("span",{style:{fontSize:22,color:h,fontWeight:600},children:n})]})]})}function z({title:t,sub:e,badge:n,color:o="#007B5F",bg:i="dark"}){let a=i==="blend";return d(b,{children:[n&&r("div",{style:{display:"flex",marginBottom:20},children:r(y,{text:n,color:o,bg:i})}),r(u,{text:t,style:{fontSize:72,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.1}}),e&&r(u,{text:e,style:{fontSize:34,color:i==="gradient"?"rgba(255,255,255,0.72)":a?"rgba(255,255,255,0.85)":"#a1a1aa",marginTop:22,fontWeight:500}})]})}function E({home:t,away:e,score:n,sub:o,badge:i,color:a="#007B5F",bg:l="dark"}){let f=l==="gradient",s=l==="blend",c="#ffffff",g=f?"rgba(255,255,255,0.9)":s?"rgba(255,255,255,0.85)":a,p=f?"rgba(255,255,255,0.6)":s?"rgba(255,255,255,0.9)":x(a,.6),m=f?"rgba(255,255,255,0.35)":s?x(a,.5):x(a,.35);return d(b,{children:[o&&r(u,{text:o,style:{fontSize:28,color:g,fontWeight:700,marginBottom:24}}),d("div",{style:{display:"flex",alignItems:"center",gap:28},children:[r("span",{style:{fontSize:64,fontWeight:900,color:c,letterSpacing:"-1.5px"},children:t}),n?r("span",{style:{fontSize:48,fontWeight:900,color:p,letterSpacing:"3px"},children:n}):r("span",{style:{fontSize:36,fontWeight:700,color:m},children:"vs"}),r("span",{style:{fontSize:64,fontWeight:900,color:"#ffffff",letterSpacing:"-1.5px"},children:e})]}),i&&r("div",{style:{display:"flex",marginTop:24},children:r(y,{text:i,color:a,bg:l})})]})}function M({title:t,sub:e,badge:n,color:o="#007B5F",bg:i="dark"}){let a=i==="blend";return d(b,{children:[n&&r("div",{style:{display:"flex",marginBottom:24},children:r(y,{text:n,color:o,bg:i})}),r(u,{text:t,style:{fontSize:80,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.15}}),e&&r(u,{text:e,style:{fontSize:38,color:i==="gradient"?"rgba(255,255,255,0.72)":a?"rgba(255,255,255,0.85)":"#71717a",marginTop:28,fontWeight:500}})]})}function j({letter:t,radius:e=96,appName:n="m1k",color:o="#007B5F",bg:i="dark",fontSize:a=240}){let f=t??(n||"m1k")[0].toUpperCase(),s=i==="gradient",c=i==="blend",g=c?w(o,.55):s?"#06060a":o,p=o,m=v(o,50),h=v(o,-50);return d("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:g,borderRadius:e,fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[c?d(b,{children:[r("div",{style:{position:"absolute",top:-280,left:-250,width:800,height:750,borderRadius:"50%",backgroundColor:p,opacity:.62,filter:"blur(200px)",display:"flex"}}),r("div",{style:{position:"absolute",bottom:-260,right:-220,width:780,height:730,borderRadius:"50%",backgroundColor:m,opacity:.58,filter:"blur(195px)",display:"flex"}}),r("div",{style:{position:"absolute",top:"25%",right:-100,width:600,height:550,borderRadius:"50%",backgroundColor:h,opacity:.55,filter:"blur(180px)",display:"flex"}})]}):s?d(b,{children:[r("div",{style:{position:"absolute",bottom:-100,left:-80,width:420,height:380,borderRadius:"50%",backgroundColor:o,opacity:.7,filter:"blur(100px)",display:"flex"}}),r("div",{style:{position:"absolute",top:-80,right:-60,width:350,height:320,borderRadius:"50%",backgroundColor:S(o,70),opacity:.45,filter:"blur(90px)",display:"flex"}}),r("div",{style:{position:"absolute",top:-40,left:"25%",width:200,height:150,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(60px)",display:"flex"}})]}):d(b,{children:[r("div",{style:{position:"absolute",top:-80,right:-80,width:300,height:300,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.1,filter:"blur(80px)",display:"flex"}}),r("div",{style:{position:"absolute",bottom:-60,left:-60,width:250,height:250,borderRadius:"50%",backgroundColor:"#000000",opacity:.15,filter:"blur(60px)",display:"flex"}})]}),r("span",{style:{fontSize:a,fontWeight:900,color:"#ffffff",letterSpacing:`${(-a*.025).toFixed(1)}px`,lineHeight:1,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",...c?{textShadow:"0 2px 8px rgba(0,0,0,0.3)"}:{}},children:f})]})}function D({title:t,author:e,date:n,category:o,sub:i,color:a="#007B5F",bg:l="dark"}){let f=l==="gradient",s=l==="blend",c="#ffffff",g=f?"rgba(255,255,255,0.55)":s?"rgba(255,255,255,0.8)":"#71717a",p=f?"rgba(255,255,255,0.9)":s?"rgba(255,255,255,0.6)":a,m=s?"#000000":f?"#18181b":"#fff",h=f?"rgba(255,255,255,0.3)":s?"rgba(255,255,255,0.5)":"#3f3f46";return d(b,{children:[o&&r("div",{style:{display:"flex",marginBottom:20},children:r(y,{text:o,color:a,bg:l})}),r(u,{text:t,style:{fontSize:64,fontWeight:900,color:c,letterSpacing:"-1.5px",lineHeight:1.15}}),i&&r(u,{text:i,style:{fontSize:30,color:g,marginTop:18,fontWeight:500}}),(e||n)&&d("div",{style:{display:"flex",alignItems:"center",gap:16,marginTop:28},children:[e&&d("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:p,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:800,color:m},children:e[0].toUpperCase()}),r("span",{style:{fontSize:22,color:g,fontWeight:600},children:e})]}),e&&n&&r("span",{style:{fontSize:20,color:h,display:"flex"},children:"\xB7"}),n&&r("span",{style:{fontSize:22,color:g,fontWeight:500,display:"flex"},children:n})]})]})}function A({stat:t,label:e,sub:n,badge:o,color:i="#007B5F",bg:a="dark"}){let l=a==="gradient",f=a==="blend";return d(b,{children:[o&&r("div",{style:{display:"flex",marginBottom:20},children:r(y,{text:o,color:i,bg:a})}),r(u,{text:t,style:{fontSize:110,fontWeight:900,color:f||l?"#ffffff":i,letterSpacing:"-4px",lineHeight:1}}),r("div",{style:{fontSize:36,fontWeight:700,color:"#ffffff",marginTop:12,display:"flex"},children:e}),n&&r(u,{text:n,style:{fontSize:26,color:f?"rgba(255,255,255,0.8)":l?"rgba(255,255,255,0.55)":"#71717a",marginTop:14,fontWeight:500}})]})}function N({title:t,tagline:e,features:n,badge:o,color:i="#007B5F",bg:a="dark"}){let l=a==="gradient",f=a==="blend",s="#ffffff",c=l?"rgba(255,255,255,0.75)":f?"rgba(255,255,255,0.85)":"#a1a1aa",g=l?"rgba(255,255,255,0.7)":f?"rgba(255,255,255,0.8)":"#a1a1aa",p=l?"rgba(255,255,255,0.5)":f?"rgba(255,255,255,0.6)":i,m=(n??[]).slice(0,3);return d(b,{children:[o&&r("div",{style:{display:"flex",marginBottom:20},children:r(y,{text:o,color:i,bg:a})}),r(u,{text:t,style:{fontSize:72,fontWeight:900,color:s,letterSpacing:"-2px",lineHeight:1.1}}),e&&r(u,{text:e,style:{fontSize:32,color:c,marginTop:16,fontWeight:500}}),m.length>0&&r("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:m.map((h,G)=>d("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:p,display:"flex",flexShrink:0}}),r(u,{text:h,style:{fontSize:24,color:g,fontWeight:500}})]},G))})]})}function H({text:t,appName:e="app",color:n="#0f0f1a",size:o=512}={}){let i=t??e,a=o*(i.length===1?.6:i.length<=3?.42:.3);return r("div",{style:{width:o,height:o,display:"flex",alignItems:"center",justifyContent:"center",background:n},children:r("div",{style:{display:"flex",flexDirection:"row",gap:`${o*.02}px`,alignItems:"center"},children:i.split("").map((l,f)=>r("span",{style:{fontSize:a,fontWeight:900,color:"#ffffff",fontFamily:"system-ui, sans-serif",lineHeight:1},children:l},f))})})}function L(t){let{appName:e,color:n,domain:o,bg:i,logoUrl:a}=t,l=t.type??"default";return l==="icon"?r(j,{...t,appName:e,color:n,bg:i}):r(I,{appName:e,color:n,domain:o,bg:i,logoUrl:a,children:l==="match"?r(E,{...t,color:n,bg:i}):l==="square"?r(M,{...t,color:n,bg:i}):l==="article"?r(D,{...t,color:n,bg:i}):l==="stat"?r(A,{...t,color:n,bg:i}):l==="product"?r(N,{...t,color:n,bg:i}):r(z,{...t,color:n,bg:i})})}var q="https://cdn.jsdelivr.net/gh/fonts-archive/Pretendard",U={400:"Pretendard-Regular.otf",700:"Pretendard-Bold.otf",900:"Pretendard-Black.otf"},T=new Map;function O(t){let e=T.get(t);if(e)return e;let n=fetch(t).then(o=>{if(!o.ok)throw new Error(`Font fetch failed: ${o.status} ${t}`);return o.arrayBuffer()});return T.set(t,n),n}async function _(t=[700,900]){return await Promise.all(t.map(async n=>{let o=U[n];return{name:"Pretendard",data:await O(`${q}/${o}`),weight:n,style:"normal"}}))}async function V(t){let e=await O(t.url);return{name:t.name,data:e,weight:t.weight??400,style:t.style??"normal"}}async function J(t,e=[400,700]){let n=e.map(s=>`${s}`).join(";"),o=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(t)}:wght@${n}&display=swap`,i=await fetch(o,{headers:{"User-Agent":"Mozilla/5.0"}}).then(s=>{if(!s.ok)throw new Error(`Google Fonts fetch failed: ${s.status}`);return s.text()}),a=[...i.matchAll(/src:\s*url\(([^)]+)\)\s*format\(['"]?(truetype|opentype|woff2?)['"]?\)/g)],l=[...i.matchAll(/font-weight:\s*(\d+)/g)],f=[];for(let s=0;s<a.length;s++){let c=a[s][1].replace(/['"]/g,""),g=l[s]?Number(l[s][1]):e[s]??400,p=await O(c);f.push({name:t,data:p,weight:g,style:"normal"})}if(f.length===0)throw new Error(`No fonts found for "${t}"`);return f}var Y="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg",k=new Map;function K(t){let e=[];for(let n=0;n<t.length;n++){let o=t.codePointAt(n);o>65535&&n++,o!==65039&&e.push(o.toString(16))}return e.join("-")}async function Q(t){let e=K(t),n=`${Y}/${e}.svg`,o=k.get(n);if(o)return o;let i=fetch(n).then(async a=>a.ok?a.text():"");return k.set(n,i),i}function X(){return async(t,e)=>{if(t==="emoji"){let n=await Q(e);return n?`data:image/svg+xml;base64,${btoa(n)}`:void 0}}}function Z(){let t=new Date,e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),l=String(t.getSeconds()).padStart(2,"0");return`${e}${n}${o}${i}${a}${l}`}export{L as OGImage,X as createEmojiLoader,H as createFaviconElement,Z as getOGVersion,V as loadFont,J as loadGoogleFont,_ as loadPretendard};
1
+ function w(t){let r=t.replace("#",""),o=parseInt(r.length===3?r.split("").map(e=>e+e).join(""):r,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}function C(t,r){let{r:o,g:e,b:n}=w(t);return`rgba(${o},${e},${n},${r})`}function _(t,r,o){t/=255,r/=255,o/=255;let e=Math.max(t,r,o),n=Math.min(t,r,o),i=(e+n)/2;if(e===n)return{h:0,s:0,l:i};let a=e-n,l=i>.5?a/(2-e-n):a/(e+n),s=0;return e===t?s=60*(((r-o)/a+(r<o?6:0))%6):e===r?s=60*(((o-t)/a+2)%6):s=60*(((t-r)/a+4)%6),{h:s,s:l,l:i}}function V(t,r,o){let e=(1-Math.abs(2*o-1))*r,n=e*(1-Math.abs(t/60%2-1)),i=o-e/2,a=0,l=0,s=0;return t<60?[a,l,s]=[e,n,0]:t<120?[a,l,s]=[n,e,0]:t<180?[a,l,s]=[0,e,n]:t<240?[a,l,s]=[0,n,e]:t<300?[a,l,s]=[n,0,e]:[a,l,s]=[e,0,n],{r:Math.round((a+i)*255),g:Math.round((l+i)*255),b:Math.round((s+i)*255)}}function G(t,r=45){let{r:o,g:e,b:n}=w(t),{h:i,s:a,l}=_(o,e,n),s=(i+r)%360,{r:d,g:u,b:m}=V(s,a,l);return`rgb(${d},${u},${m})`}function T(t,r){let{r:o,g:e,b:n}=w(t),i=a=>Math.max(0,Math.min(255,a));return`rgb(${i(o+r)},${i(e+r)},${i(n+r)})`}function k(t,r=.5){let{r:o,g:e,b:n}=w(t),i=a=>Math.round(a+(255-a)*r);return`rgb(${i(o)},${i(e)},${i(n)})`}import{Fragment as E,jsx as g,jsxs as O}from"react/jsx-runtime";var F={blend:{logoIconBg:()=>"rgba(255,255,255,0.2)",logoTextColor:"#ffffff",domainColor:"rgba(255,255,255,0.75)",dotColor:()=>"rgba(255,255,255,0.6)",baseBg:t=>k(t,.55),baseGradient:void 0},gradient:{logoIconBg:()=>"rgba(255,255,255,0.18)",logoTextColor:"rgba(255,255,255,0.95)",domainColor:"rgba(255,255,255,0.5)",dotColor:()=>"rgba(255,255,255,0.5)",baseBg:()=>"#06060a",baseGradient:void 0},dark:{logoIconBg:t=>t,logoTextColor:"#e4e4e7",domainColor:"#52525b",dotColor:t=>t,baseBg:()=>"#0a0a0c",baseGradient:"linear-gradient(180deg, #1a1a1f 0%, #0a0a0c 100%)"}};function J({color:t}){return O(E,{children:[g("div",{style:{position:"absolute",top:-500,left:-400,width:1400,height:1300,borderRadius:"50%",backgroundColor:t,opacity:.7,filter:"blur(240px)",display:"flex"}}),g("div",{style:{position:"absolute",bottom:-480,right:-380,width:1380,height:1280,borderRadius:"50%",backgroundColor:G(t,50),opacity:.65,filter:"blur(235px)",display:"flex"}}),g("div",{style:{position:"absolute",top:"20%",right:-200,width:1e3,height:900,borderRadius:"50%",backgroundColor:G(t,-50),opacity:.6,filter:"blur(220px)",display:"flex"}})]})}function Y({color:t}){return O(E,{children:[g("div",{style:{position:"absolute",bottom:-180,left:-80,width:700,height:560,borderRadius:"50%",backgroundColor:t,opacity:.8,filter:"blur(130px)",display:"flex"}}),g("div",{style:{position:"absolute",top:-160,right:-60,width:580,height:480,borderRadius:"50%",backgroundColor:T(t,70),opacity:.6,filter:"blur(110px)",display:"flex"}}),g("div",{style:{position:"absolute",top:-80,left:"20%",width:340,height:260,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(70px)",display:"flex"}}),g("div",{style:{position:"absolute",bottom:-60,right:"10%",width:380,height:300,borderRadius:"50%",backgroundColor:T(t,-50),opacity:.4,filter:"blur(90px)",display:"flex"}}),g("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.52)",display:"flex"}})]})}function K({color:t}){return g("div",{style:{position:"absolute",bottom:-200,left:"30%",width:500,height:300,borderRadius:"50%",backgroundColor:t,opacity:.08,filter:"blur(80px)",display:"flex"}})}function $({appName:t,color:r="#007B5F",domain:o,bg:e="dark",logoUrl:n,children:i}){let a=t||"m1k",l=F[e]??F.dark,s=l.logoIconBg(r),d="#ffffff",u=l.logoTextColor,m=l.domainColor,y=l.dotColor(r);return O("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",backgroundColor:l.baseBg(r),...l.baseGradient?{background:l.baseGradient}:{},padding:"72px 80px",fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[e==="blend"?g(J,{color:r}):e==="gradient"?g(Y,{color:r}):g(K,{color:r}),O("div",{style:{display:"flex",alignItems:"center",gap:18,position:"relative",zIndex:1},children:[n?g("img",{src:n,width:52,height:52,style:{borderRadius:14,objectFit:"cover",display:"flex"}}):g("div",{style:{width:52,height:52,borderRadius:14,backgroundColor:s,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:900,color:d},children:a[0].toUpperCase()}),g("span",{style:{fontSize:30,fontWeight:800,color:u,letterSpacing:"-0.5px"},children:a})]}),g("div",{style:{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",position:"relative",zIndex:1},children:i}),o&&O("div",{style:{display:"flex",alignItems:"center",gap:10,position:"relative",zIndex:1},children:[g("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:y,display:"flex"}}),g("span",{style:{fontSize:22,color:m,fontWeight:600},children:o})]})]})}import{jsx as v}from"react/jsx-runtime";function Q(t){let r=[],o=/\p{Extended_Pictographic}/gu,e=0;for(let i of t.matchAll(o)){let a=t.slice(e,i.index).trim();a&&r.push(a),r.push(i[0]),e=i.index+i[0].length}let n=t.slice(e).trim();return n&&r.push(n),r}function c({text:t,style:r}){let o=Q(t);return o.length<=1?v("span",{style:{display:"flex",...r},children:t}):v("span",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",...r},children:o.map((e,n)=>v("span",{children:e},n))})}function x({text:t,color:r,bg:o="dark"}){let e=o==="gradient",n=o==="blend";return v("div",{style:{display:"flex"},children:v("div",{style:{display:"flex",backgroundColor:n||e?"rgba(255,255,255,0.2)":C(r,.12),borderRadius:24,paddingLeft:18,paddingRight:18,paddingTop:8,paddingBottom:8},children:v(c,{text:t,style:{fontSize:22,fontWeight:700,color:n||e?"#ffffff":r,letterSpacing:"0.2px"}})})})}import{Fragment as R,jsx as p,jsxs as B}from"react/jsx-runtime";function W({title:t,sub:r,badge:o,color:e="#007B5F",bg:n="dark"}){let i=n==="blend";return B(R,{children:[o&&p("div",{style:{display:"flex",marginBottom:20},children:p(x,{text:o,color:e,bg:n})}),p(c,{text:t,style:{fontSize:72,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.1}}),r&&p(c,{text:r,style:{fontSize:34,color:n==="gradient"?"rgba(255,255,255,0.72)":i?"rgba(255,255,255,0.85)":"#a1a1aa",marginTop:22,fontWeight:500}})]})}function z({home:t,away:r,score:o,sub:e,badge:n,color:i="#007B5F",bg:a="dark"}){let l=a==="gradient",s=a==="blend",d="#ffffff",u=l?"rgba(255,255,255,0.9)":s?"rgba(255,255,255,0.85)":i,m=l?"rgba(255,255,255,0.6)":s?"rgba(255,255,255,0.9)":C(i,.6),y=l?"rgba(255,255,255,0.35)":s?C(i,.5):C(i,.35);return B(R,{children:[e&&p(c,{text:e,style:{fontSize:28,color:u,fontWeight:700,marginBottom:24}}),B("div",{style:{display:"flex",alignItems:"center",gap:28},children:[p("span",{style:{fontSize:64,fontWeight:900,color:d,letterSpacing:"-1.5px"},children:t}),o?p("span",{style:{fontSize:48,fontWeight:900,color:m,letterSpacing:"3px"},children:o}):p("span",{style:{fontSize:36,fontWeight:700,color:y},children:"vs"}),p("span",{style:{fontSize:64,fontWeight:900,color:"#ffffff",letterSpacing:"-1.5px"},children:r})]}),n&&p("div",{style:{display:"flex",marginTop:24},children:p(x,{text:n,color:i,bg:a})})]})}function L({title:t,sub:r,badge:o,color:e="#007B5F",bg:n="dark"}){let i=n==="blend";return B(R,{children:[o&&p("div",{style:{display:"flex",marginBottom:24},children:p(x,{text:o,color:e,bg:n})}),p(c,{text:t,style:{fontSize:80,fontWeight:900,color:"#ffffff",letterSpacing:"-2px",lineHeight:1.15}}),r&&p(c,{text:r,style:{fontSize:38,color:n==="gradient"?"rgba(255,255,255,0.72)":i?"rgba(255,255,255,0.85)":"#71717a",marginTop:28,fontWeight:500}})]})}import{Fragment as S,jsx as f,jsxs as h}from"react/jsx-runtime";function A({letter:t,radius:r=96,appName:o="m1k",color:e="#007B5F",bg:n="dark",fontSize:i=240}){let l=t??(o||"m1k")[0].toUpperCase(),s=n==="gradient",d=n==="blend",u=d?k(e,.55):s?"#06060a":e,m=e,y=G(e,50),P=G(e,-50);return h("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u,borderRadius:r,fontFamily:"Pretendard, system-ui, sans-serif",position:"relative",overflow:"hidden"},children:[d?h(S,{children:[f("div",{style:{position:"absolute",top:-280,left:-250,width:800,height:750,borderRadius:"50%",backgroundColor:m,opacity:.62,filter:"blur(200px)",display:"flex"}}),f("div",{style:{position:"absolute",bottom:-260,right:-220,width:780,height:730,borderRadius:"50%",backgroundColor:y,opacity:.58,filter:"blur(195px)",display:"flex"}}),f("div",{style:{position:"absolute",top:"25%",right:-100,width:600,height:550,borderRadius:"50%",backgroundColor:P,opacity:.55,filter:"blur(180px)",display:"flex"}})]}):s?h(S,{children:[f("div",{style:{position:"absolute",bottom:-100,left:-80,width:420,height:380,borderRadius:"50%",backgroundColor:e,opacity:.7,filter:"blur(100px)",display:"flex"}}),f("div",{style:{position:"absolute",top:-80,right:-60,width:350,height:320,borderRadius:"50%",backgroundColor:T(e,70),opacity:.45,filter:"blur(90px)",display:"flex"}}),f("div",{style:{position:"absolute",top:-40,left:"25%",width:200,height:150,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.07,filter:"blur(60px)",display:"flex"}})]}):h(S,{children:[f("div",{style:{position:"absolute",top:-80,right:-80,width:300,height:300,borderRadius:"50%",backgroundColor:"#ffffff",opacity:.1,filter:"blur(80px)",display:"flex"}}),f("div",{style:{position:"absolute",bottom:-60,left:-60,width:250,height:250,borderRadius:"50%",backgroundColor:"#000000",opacity:.15,filter:"blur(60px)",display:"flex"}})]}),f("span",{style:{fontSize:i,fontWeight:900,color:"#ffffff",letterSpacing:`${(-i*.025).toFixed(1)}px`,lineHeight:1,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",...d?{textShadow:"0 2px 8px rgba(0,0,0,0.3)"}:{}},children:l})]})}var M={gradient:{muted:"rgba(255,255,255,0.55)",accent:t=>"rgba(255,255,255,0.9)",authorLetter:"#18181b",dotSep:"rgba(255,255,255,0.3)"},blend:{muted:"rgba(255,255,255,0.8)",accent:t=>"rgba(255,255,255,0.6)",authorLetter:"#000000",dotSep:"rgba(255,255,255,0.5)"},dark:{muted:"#71717a",accent:t=>t,authorLetter:"#fff",dotSep:"#3f3f46"}};function D({title:t,author:r,date:o,category:e,sub:n,color:i="#007B5F",bg:a="dark"}){let l=M[a]??M.dark,s="#ffffff",d=l.muted,u=l.accent(i),m=l.authorLetter,y=l.dotSep;return h(S,{children:[e&&f("div",{style:{display:"flex",marginBottom:20},children:f(x,{text:e,color:i,bg:a})}),f(c,{text:t,style:{fontSize:64,fontWeight:900,color:s,letterSpacing:"-1.5px",lineHeight:1.15}}),n&&f(c,{text:n,style:{fontSize:30,color:d,marginTop:18,fontWeight:500}}),(r||o)&&h("div",{style:{display:"flex",alignItems:"center",gap:16,marginTop:28},children:[r&&h("div",{style:{display:"flex",alignItems:"center",gap:8},children:[f("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:u,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:800,color:m},children:r[0].toUpperCase()}),f("span",{style:{fontSize:22,color:d,fontWeight:600},children:r})]}),r&&o&&f("span",{style:{fontSize:20,color:y,display:"flex"},children:"\xB7"}),o&&f("span",{style:{fontSize:22,color:d,fontWeight:500,display:"flex"},children:o})]})]})}function j({stat:t,label:r,sub:o,badge:e,color:n="#007B5F",bg:i="dark"}){let a=i==="gradient",l=i==="blend";return h(S,{children:[e&&f("div",{style:{display:"flex",marginBottom:20},children:f(x,{text:e,color:n,bg:i})}),f(c,{text:t,style:{fontSize:110,fontWeight:900,color:l||a?"#ffffff":n,letterSpacing:"-4px",lineHeight:1}}),f("div",{style:{fontSize:36,fontWeight:700,color:"#ffffff",marginTop:12,display:"flex"},children:r}),o&&f(c,{text:o,style:{fontSize:26,color:l?"rgba(255,255,255,0.8)":a?"rgba(255,255,255,0.55)":"#71717a",marginTop:14,fontWeight:500}})]})}function N({title:t,tagline:r,features:o,badge:e,color:n="#007B5F",bg:i="dark"}){let a=i==="gradient",l=i==="blend",s="#ffffff",d=a?"rgba(255,255,255,0.75)":l?"rgba(255,255,255,0.85)":"#a1a1aa",u=a?"rgba(255,255,255,0.7)":l?"rgba(255,255,255,0.8)":"#a1a1aa",m=a?"rgba(255,255,255,0.5)":l?"rgba(255,255,255,0.6)":n,y=(o??[]).slice(0,3);return h(S,{children:[e&&f("div",{style:{display:"flex",marginBottom:20},children:f(x,{text:e,color:n,bg:i})}),f(c,{text:t,style:{fontSize:72,fontWeight:900,color:s,letterSpacing:"-2px",lineHeight:1.1}}),r&&f(c,{text:r,style:{fontSize:32,color:d,marginTop:16,fontWeight:500}}),y.length>0&&f("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:24},children:y.map((P,U)=>h("div",{style:{display:"flex",alignItems:"center",gap:12},children:[f("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:m,display:"flex",flexShrink:0}}),f(c,{text:P,style:{fontSize:24,color:u,fontWeight:500}})]},U))})]})}import{jsx as b}from"react/jsx-runtime";function X({text:t,appName:r="app",color:o="#0f0f1a",size:e=512}={}){let n=t??r,i=e*(n.length===1?.6:n.length<=3?.42:.3);return b("div",{style:{width:e,height:e,display:"flex",alignItems:"center",justifyContent:"center",background:o},children:b("div",{style:{display:"flex",flexDirection:"row",gap:`${e*.02}px`,alignItems:"center"},children:n.split("").map((a,l)=>b("span",{style:{fontSize:i,fontWeight:900,color:"#ffffff",fontFamily:"system-ui, sans-serif",lineHeight:1},children:a},l))})})}function Z(t){let{appName:r,color:o,domain:e,bg:n,logoUrl:i}=t,a=t.type??"default";return a==="icon"?b(A,{...t,appName:r,color:o,bg:n}):b($,{appName:r,color:o,domain:e,bg:n,logoUrl:i,children:a==="match"?b(z,{...t,color:o,bg:n}):a==="square"?b(L,{...t,color:o,bg:n}):a==="article"?b(D,{...t,color:o,bg:n}):a==="stat"?b(j,{...t,color:o,bg:n}):a==="product"?b(N,{...t,color:o,bg:n}):b(W,{...t,color:o,bg:n})})}var tt="https://cdn.jsdelivr.net/gh/fonts-archive/Pretendard",et={400:"Pretendard-Regular.otf",700:"Pretendard-Bold.otf",900:"Pretendard-Black.otf"},H=new Map;function I(t){let r=H.get(t);if(r)return r;let o=fetch(t).then(e=>{if(!e.ok)throw new Error(`Font fetch failed: ${e.status} ${t}`);return e.arrayBuffer()});return H.set(t,o),o}async function ot(t=[700,900]){return await Promise.all(t.map(async o=>{let e=et[o];return{name:"Pretendard",data:await I(`${tt}/${e}`),weight:o,style:"normal"}}))}async function rt(t){let r=await I(t.url);return{name:t.name,data:r,weight:t.weight??400,style:t.style??"normal"}}async function nt(t,r=[400,700]){let o=r.map(s=>`${s}`).join(";"),e=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(t)}:wght@${o}&display=swap`,n=await fetch(e,{headers:{"User-Agent":"Mozilla/5.0"}}).then(s=>{if(!s.ok)throw new Error(`Google Fonts fetch failed: ${s.status}`);return s.text()}),i=[...n.matchAll(/src:\s*url\(([^)]+)\)\s*format\(['"]?(truetype|opentype|woff2?)['"]?\)/g)],a=[...n.matchAll(/font-weight:\s*(\d+)/g)],l=[];for(let s=0;s<i.length;s++){let d=i[s][1].replace(/['"]/g,""),u=a[s]?Number(a[s][1]):r[s]??400,m=await I(d);l.push({name:t,data:m,weight:u,style:"normal"})}if(l.length===0)throw new Error(`No fonts found for "${t}"`);return l}var it="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg",q=new Map;function at(t){let r=[];for(let o=0;o<t.length;o++){let e=t.codePointAt(o);e>65535&&o++,e!==65039&&r.push(e.toString(16))}return r.join("-")}async function lt(t){let r=at(t),o=`${it}/${r}.svg`,e=q.get(o);if(e)return e;let n=fetch(o).then(async i=>i.ok?i.text():"");return q.set(o,n),n}function st(){return async(t,r)=>{if(t==="emoji"){let o=await lt(r);return o?`data:image/svg+xml;base64,${btoa(o)}`:void 0}}}function ft(){let t=new Date,r=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),e=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${r}${o}${e}${n}${i}${a}`}export{Z as OGImage,st as createEmojiLoader,X as createFaviconElement,ft as getOGVersion,rt as loadFont,nt as loadGoogleFont,ot as loadPretendard};
package/dist/pwa.d.mts CHANGED
@@ -10,6 +10,18 @@ interface UsePWAInstallReturn {
10
10
  }
11
11
  declare function usePWAInstall(): UsePWAInstallReturn;
12
12
 
13
+ interface IOSInstallSheetProps {
14
+ open: boolean;
15
+ onClose(): void;
16
+ appName: string;
17
+ iconSrc?: string;
18
+ }
19
+ /**
20
+ * Bottom-sheet guide for iOS "Add to Home Screen".
21
+ * Can also be used standalone if you need custom trigger UI.
22
+ */
23
+ declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): react_jsx_runtime.JSX.Element | null;
24
+
13
25
  interface PWAInstallButtonProps {
14
26
  /** App name shown in iOS guide sheet */
15
27
  appName?: string;
@@ -33,17 +45,6 @@ interface PWAInstallButtonProps {
33
45
  * <PWAInstallButton appName="My App" iconSrc="/icon.png" />
34
46
  */
35
47
  declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
36
- interface IOSInstallSheetProps {
37
- open: boolean;
38
- onClose(): void;
39
- appName: string;
40
- iconSrc?: string;
41
- }
42
- /**
43
- * Bottom-sheet guide for iOS "Add to Home Screen".
44
- * Can also be used standalone if you need custom trigger UI.
45
- */
46
- declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): react_jsx_runtime.JSX.Element | null;
47
48
 
48
49
  /**
49
50
  * Drop into <head> in your root layout to pre-load kit styles and
package/dist/pwa.d.ts CHANGED
@@ -10,6 +10,18 @@ interface UsePWAInstallReturn {
10
10
  }
11
11
  declare function usePWAInstall(): UsePWAInstallReturn;
12
12
 
13
+ interface IOSInstallSheetProps {
14
+ open: boolean;
15
+ onClose(): void;
16
+ appName: string;
17
+ iconSrc?: string;
18
+ }
19
+ /**
20
+ * Bottom-sheet guide for iOS "Add to Home Screen".
21
+ * Can also be used standalone if you need custom trigger UI.
22
+ */
23
+ declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): react_jsx_runtime.JSX.Element | null;
24
+
13
25
  interface PWAInstallButtonProps {
14
26
  /** App name shown in iOS guide sheet */
15
27
  appName?: string;
@@ -33,17 +45,6 @@ interface PWAInstallButtonProps {
33
45
  * <PWAInstallButton appName="My App" iconSrc="/icon.png" />
34
46
  */
35
47
  declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
36
- interface IOSInstallSheetProps {
37
- open: boolean;
38
- onClose(): void;
39
- appName: string;
40
- iconSrc?: string;
41
- }
42
- /**
43
- * Bottom-sheet guide for iOS "Add to Home Screen".
44
- * Can also be used standalone if you need custom trigger UI.
45
- */
46
- declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): react_jsx_runtime.JSX.Element | null;
47
48
 
48
49
  /**
49
50
  * Drop into <head> in your root layout to pre-load kit styles and