nuxt-og-image 6.2.3 → 6.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/chunks/tw4.cjs +1 -1
  2. package/dist/chunks/tw4.mjs +1 -1
  3. package/dist/chunks/uno.cjs +1 -1
  4. package/dist/chunks/uno.mjs +1 -1
  5. package/dist/devtools/200.html +1 -1
  6. package/dist/devtools/404.html +1 -1
  7. package/dist/devtools/_nuxt/{BxWyagB1.js → BXPqj_uX.js} +1 -1
  8. package/dist/devtools/_nuxt/Bo4lSgm2.js +3 -0
  9. package/dist/devtools/_nuxt/C9JKABtj.js +1 -0
  10. package/dist/devtools/_nuxt/CHHO6nw6.js +1 -0
  11. package/dist/devtools/_nuxt/{CAzZHHIh.js → Co3OAyKc.js} +1 -1
  12. package/dist/devtools/_nuxt/D7z5XWgK.js +4 -0
  13. package/dist/devtools/_nuxt/DGCfXCQ-.js +2 -0
  14. package/dist/devtools/_nuxt/DS7cgx7X.js +174 -0
  15. package/dist/devtools/_nuxt/DevtoolsSnippet.DzxGChOp.css +1 -0
  16. package/dist/devtools/_nuxt/KJjel4YO.js +1 -0
  17. package/dist/devtools/_nuxt/builds/latest.json +1 -1
  18. package/dist/devtools/_nuxt/builds/meta/dfa7312f-7f4d-4432-b920-c3983bc07cfc.json +1 -0
  19. package/dist/devtools/_nuxt/entry.COZPpVMd.css +2 -0
  20. package/dist/devtools/_nuxt/pages.Cmouj34P.css +1 -0
  21. package/dist/devtools/debug/index.html +1 -1
  22. package/dist/devtools/docs/index.html +1 -1
  23. package/dist/devtools/index.html +1 -1
  24. package/dist/devtools/templates/index.html +1 -1
  25. package/dist/module.cjs +1 -1
  26. package/dist/module.d.cts +33 -0
  27. package/dist/module.d.mts +33 -0
  28. package/dist/module.d.ts +33 -0
  29. package/dist/module.json +1 -1
  30. package/dist/module.mjs +1 -1
  31. package/dist/runtime/app/utils.d.ts +1 -1
  32. package/dist/runtime/app/utils.js +7 -5
  33. package/dist/runtime/server/og-image/context.d.ts +1 -1
  34. package/dist/runtime/server/og-image/context.js +43 -5
  35. package/dist/runtime/server/og-image/core/plugins/imageSrc.js +73 -12
  36. package/dist/runtime/server/og-image/takumi/renderer.js +5 -3
  37. package/dist/runtime/server/util/eventHandlers.js +34 -3
  38. package/dist/runtime/server/utils.d.ts +2 -2
  39. package/dist/runtime/server/utils.js +7 -1
  40. package/dist/runtime/shared/urlEncoding.js +4 -1
  41. package/dist/runtime/shared.d.ts +5 -0
  42. package/dist/runtime/shared.js +10 -0
  43. package/dist/runtime/types.d.ts +9 -0
  44. package/dist/shared/{nuxt-og-image.CvPWboEh.mjs → nuxt-og-image.CA6cPvTd.mjs} +48 -3
  45. package/dist/shared/{nuxt-og-image.Ni0_6XZ0.cjs → nuxt-og-image.DVJetxwr.cjs} +49 -4
  46. package/package.json +9 -7
  47. package/dist/devtools/_nuxt/BWyopNGL.js +0 -173
  48. package/dist/devtools/_nuxt/BexYm1Ph.js +0 -3
  49. package/dist/devtools/_nuxt/C31aju0P.js +0 -1
  50. package/dist/devtools/_nuxt/Cad3TRlU.js +0 -2
  51. package/dist/devtools/_nuxt/D69ab5lN.js +0 -1
  52. package/dist/devtools/_nuxt/D_4A40tz.js +0 -4
  53. package/dist/devtools/_nuxt/DevtoolsSection.C6JB6bJh.css +0 -1
  54. package/dist/devtools/_nuxt/DevtoolsSnippet.C3GhU5E5.css +0 -1
  55. package/dist/devtools/_nuxt/builds/meta/5bd1f05d-c888-4aaa-b6d8-022addcf074f.json +0 -1
  56. package/dist/devtools/_nuxt/entry.B9oj49pl.css +0 -2
  57. package/dist/devtools/_nuxt/pages.XaEO80KK.css +0 -1
  58. package/dist/devtools/_nuxt/u09lXEfj.js +0 -1
@@ -5,7 +5,7 @@ const node_url = require('node:url');
5
5
  const exsolve = require('exsolve');
6
6
  const pathe = require('pathe');
7
7
  const cssProvider = require('./css-provider.cjs');
8
- const module$1 = require('../shared/nuxt-og-image.Ni0_6XZ0.cjs');
8
+ const module$1 = require('../shared/nuxt-og-image.DVJetxwr.cjs');
9
9
  require('node:fs');
10
10
  require('@nuxt/kit');
11
11
  require('defu');
@@ -3,7 +3,7 @@ import { pathToFileURL } from 'node:url';
3
3
  import { resolveModulePath } from 'exsolve';
4
4
  import { dirname, join } from 'pathe';
5
5
  import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
6
- import { g as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, e as extractCssVars, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles } from '../shared/nuxt-og-image.CvPWboEh.mjs';
6
+ import { g as resolveVarsDeep, s as simplifyCss, p as postProcessStyles, l as loadLightningCss, e as extractCssVars, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles } from '../shared/nuxt-og-image.CA6cPvTd.mjs';
7
7
  import 'node:fs';
8
8
  import '@nuxt/kit';
9
9
  import 'defu';
@@ -4,7 +4,7 @@ const promises = require('node:fs/promises');
4
4
  const defu = require('defu');
5
5
  const logger_js = require('../../dist/runtime/logger.js');
6
6
  const cssProvider = require('./css-provider.cjs');
7
- const module$1 = require('../shared/nuxt-og-image.Ni0_6XZ0.cjs');
7
+ const module$1 = require('../shared/nuxt-og-image.DVJetxwr.cjs');
8
8
  require('exsolve');
9
9
  require('node:fs');
10
10
  require('node:url');
@@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises';
2
2
  import { defu } from 'defu';
3
3
  import { logger } from '../../dist/runtime/logger.js';
4
4
  import { extractVariantBaseClasses, resolveVariantPrefixes } from './css-provider.mjs';
5
- import { s as simplifyCss, e as extractCssVars, a as extractPropertyInitialValues, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles, p as postProcessStyles, f as extractVarsFromCss, r as resolveExtractedVars } from '../shared/nuxt-og-image.CvPWboEh.mjs';
5
+ import { s as simplifyCss, e as extractCssVars, a as extractPropertyInitialValues, b as extractUniversalVars, c as extractPerClassVars, d as extractClassStyles, p as postProcessStyles, f as extractVarsFromCss, r as resolveExtractedVars } from '../shared/nuxt-og-image.CA6cPvTd.mjs';
6
6
  import 'exsolve';
7
7
  import 'node:fs';
8
8
  import 'node:url';
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/BWyopNGL.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.B9oj49pl.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BWyopNGL.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D2zWjF09.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CAzZHHIh.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C-b6hTTf.js"><script type="module" src="/__nuxt-og-image/_nuxt/BWyopNGL.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"5bd1f05d-c888-4aaa-b6d8-022addcf074f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774499598205,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DS7cgx7X.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.COZPpVMd.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DS7cgx7X.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CHHO6nw6.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D2zWjF09.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Co3OAyKc.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C-b6hTTf.js"><script type="module" src="/__nuxt-og-image/_nuxt/DS7cgx7X.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"dfa7312f-7f4d-4432-b920-c3983bc07cfc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774539628115,false]</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/BWyopNGL.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.B9oj49pl.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/BWyopNGL.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D2zWjF09.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CAzZHHIh.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C-b6hTTf.js"><script type="module" src="/__nuxt-og-image/_nuxt/BWyopNGL.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"5bd1f05d-c888-4aaa-b6d8-022addcf074f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774499598205,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-og-image/_nuxt/DS7cgx7X.js"}}</script><link rel="stylesheet" href="/__nuxt-og-image/_nuxt/entry.COZPpVMd.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/DS7cgx7X.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/CHHO6nw6.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/D2zWjF09.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/Co3OAyKc.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-og-image/_nuxt/C-b6hTTf.js"><script type="module" src="/__nuxt-og-image/_nuxt/DS7cgx7X.js" crossorigin></script><script>"use strict";(()=>{const t=window,e=document.documentElement,c=["dark","light"],n=getStorageValue("localStorage","nuxt-color-mode")||"system";let i=n==="system"?u():n;const r=e.getAttribute("data-color-mode-forced");r&&(i=r),l(i),t["__NUXT_COLOR_MODE__"]={preference:n,value:i,getColorScheme:u,addColorScheme:l,removeColorScheme:d};function l(o){const s=""+o+"",a="";e.classList?e.classList.add(s):e.className+=" "+s,a&&e.setAttribute("data-"+a,o)}function d(o){const s=""+o+"",a="";e.classList?e.classList.remove(s):e.className=e.className.replace(new RegExp(s,"g"),""),a&&e.removeAttribute("data-"+a)}function f(o){return t.matchMedia("(prefers-color-scheme"+o+")")}function u(){if(t.matchMedia&&f("").media!=="not all"){for(const o of c)if(f(":"+o).matches)return o}return"light"}})();function getStorageValue(t,e){switch(t){case"localStorage":return window.localStorage.getItem(e);case"sessionStorage":return window.sessionStorage.getItem(e);case"cookie":return getCookie(e);default:return null}}function getCookie(t){const c=("; "+window.document.cookie).split("; "+t+"=");if(c.length===2)return c.pop()?.split(";").shift()}</script></head><body><div id="__nuxt" class="isolate"></div><div id="teleports"></div><script>window.__NUXT_SITE_CONFIG__={_priority:{env:-15,url:-3},env:"production",url:"https:\u002F\u002Fnuxtseo.com"}</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-og-image",buildId:"dfa7312f-7f4d-4432-b920-c3983bc07cfc",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1774539628115,false]</script></body></html>
@@ -1 +1 @@
1
- import{At as e,C as t,K as n,Ot as r,S as i,T as a,Tt as o,U as s,_ as c,at as l,c as u,g as d,gt as f,h as p,jt as m,u as h,v as g,y as _}from"./D2zWjF09.js";import{Vt as v,pt as y}from"./C-b6hTTf.js";import{D as b,h as x,n as S,t as C,v as w}from"./CAzZHHIh.js";import{d as T}from"#entry";import{t as E}from"./C31aju0P.js";import{n as D,t as O}from"./BexYm1Ph.js";var k={class:`template-card group`},A={class:`template-header`},j={class:`template-footer`},M={key:0,class:`template-credit`},N=Object.assign(T(a({__name:`TemplateComponentPreview`,props:{src:{},aspectRatio:{},component:{},active:{type:Boolean},imageFormat:{},width:{},height:{}},setup(n){let a=n,h=/>/g;function y(){S.value?.devtools.rpc.openInEditor(a.component.path)}let C=p(()=>a.src.includes(`.html`)),T=p(()=>a.component.credits?.split(`<`)[0]?.trim()),E=p(()=>a.component.credits?.split(`<`)[1]?.trim().replace(h,``)),N=f();return(a,f)=>{let p=x,h=b,S=D,P=O,F=w;return s(),_(`div`,k,[d(`div`,A,[t(p,{to:E.value,target:`_blank`,class:`template-name`},{default:l(()=>[i(m(n.component.pascalName),1)]),_:1},8,[`to`])]),d(`div`,{class:r([`template-preview`,n.active?`is-active`:``])},[t(F,{text:`Preview ${n.component.pascalName} for the current page.`},{default:l(()=>[d(`div`,{class:`template-image`,style:e({aspectRatio:n.aspectRatio})},[n.active?(s(),c(h,{key:0,name:`carbon:checkmark-filled`,class:`active-badge`})):g(``,!0),C.value?(s(),c(P,{key:2,src:n.src,class:`pointer-events-none`,"aspect-ratio":n.aspectRatio,onLoad:f[1]||=e=>N.value=e},null,8,[`src`,`aspect-ratio`])):(s(),c(S,{key:1,src:o(v)(n.src,{component:n.component.pascalName}),"aspect-ratio":n.aspectRatio,class:`w-full h-full`,onLoad:f[0]||=e=>N.value=e},null,8,[`src`,`aspect-ratio`]))],4)]),_:1},8,[`text`])],2),d(`div`,j,[t(F,{text:`Open the source code of ${n.component.pascalName}.vue in your IDE`},{default:l(()=>[t(p,{class:`template-action`,onClick:u(y,[`stop`])},{default:l(()=>[t(h,{name:`carbon:code`,class:`w-3 h-3`}),f[2]||=i(` View source `,-1)]),_:1})]),_:1},8,[`text`]),n.component.credits?(s(),_(`div`,M,[E.value?(s(),c(p,{key:0,to:E.value,target:`_blank`},{default:l(()=>[i(m(T.value),1)]),_:1},8,[`to`])):g(``,!0)])):g(``,!0)])])}}}),[[`__scopeId`,`data-v-20711018`]]),{__name:`TemplateComponentPreview`}),P={class:`templates-page animate-fade-up`},F={key:0,class:`loading-container`},I={key:1,class:`templates-content stagger-children`},L={class:`template-grid`},R=[`onClick`],z={class:`template-grid`},B=[`onClick`],V=T(a({__name:`templates`,setup(e){let{appComponents:r,communityComponents:a,activeComponentName:u,src:f,aspectRatio:p,isLoading:m,patchOptions:b}=C();async function x(e){b({component:e}),await y(`/`)}return(e,y)=>{let b=N,S=E;return s(),_(`div`,P,[o(m)?(s(),_(`div`,F,[...y[0]||=[d(`div`,{class:`loading-spinner`},null,-1),d(`p`,{class:`loading-text`},` Loading templates… `,-1)]])):(s(),_(`div`,I,[o(r).length?(s(),c(S,{key:0,icon:`carbon:app`,text:`Your Templates`},{description:l(()=>[...y[1]||=[i(` Custom OG Image components in your project `,-1)]]),default:l(()=>[d(`div`,L,[(s(!0),_(h,null,n(o(r),e=>(s(),_(`button`,{key:e.pascalName,class:`template-item`,onClick:t=>x(e.pascalName)},[t(b,{component:e,src:o(v)(o(f),{component:e.pascalName}),"aspect-ratio":o(p),active:e.pascalName===o(u)},null,8,[`component`,`src`,`aspect-ratio`,`active`])],8,R))),128))])]),_:1})):g(``,!0),t(S,{icon:`carbon:user-multiple`,text:`Community Templates`},{description:l(()=>[...y[2]||=[i(` Pre-built templates you can use or eject `,-1)]]),default:l(()=>[d(`div`,z,[(s(!0),_(h,null,n(o(a),e=>(s(),_(`button`,{key:e.pascalName,class:`template-item`,onClick:t=>x(e.pascalName)},[t(b,{component:e,src:o(v)(o(f),{component:e.pascalName}),"aspect-ratio":o(p),active:e.pascalName===o(u)},null,8,[`component`,`src`,`aspect-ratio`,`active`])],8,B))),128))])]),_:1})]))])}}}),[[`__scopeId`,`data-v-6c5c4c86`]]);export{V as default};
1
+ import{At as e,C as t,K as n,Ot as r,S as i,T as a,Tt as o,U as s,_ as c,at as l,c as u,g as d,gt as f,h as p,jt as m,u as h,v as g,y as _}from"./D2zWjF09.js";import{Vt as v,pt as y}from"./C-b6hTTf.js";import{D as b,h as x,n as S,t as C,v as w}from"./Co3OAyKc.js";import{t as T}from"./CHHO6nw6.js";import{a as E}from"#entry";import{n as D,t as O}from"./Bo4lSgm2.js";var k={class:`template-card group`},A={class:`template-header`},j={class:`template-footer`},M={key:0,class:`template-credit`},N=Object.assign(T(a({__name:`TemplateComponentPreview`,props:{src:{},aspectRatio:{},component:{},active:{type:Boolean},imageFormat:{},width:{},height:{}},setup(n){let a=n,h=/>/g;function y(){S.value?.devtools.rpc.openInEditor(a.component.path)}let C=p(()=>a.src.includes(`.html`)),T=p(()=>a.component.credits?.split(`<`)[0]?.trim()),E=p(()=>a.component.credits?.split(`<`)[1]?.trim().replace(h,``)),N=f();return(a,f)=>{let p=x,h=b,S=D,P=O,F=w;return s(),_(`div`,k,[d(`div`,A,[t(p,{to:E.value,target:`_blank`,class:`template-name`},{default:l(()=>[i(m(n.component.pascalName),1)]),_:1},8,[`to`])]),d(`div`,{class:r([`template-preview`,n.active?`is-active`:``])},[t(F,{text:`Preview ${n.component.pascalName} for the current page.`},{default:l(()=>[d(`div`,{class:`template-image`,style:e({aspectRatio:n.aspectRatio})},[n.active?(s(),c(h,{key:0,name:`carbon:checkmark-filled`,class:`active-badge`})):g(``,!0),C.value?(s(),c(P,{key:2,src:n.src,class:`pointer-events-none`,"aspect-ratio":n.aspectRatio,onLoad:f[1]||=e=>N.value=e},null,8,[`src`,`aspect-ratio`])):(s(),c(S,{key:1,src:o(v)(n.src,{component:n.component.pascalName}),"aspect-ratio":n.aspectRatio,class:`w-full h-full`,onLoad:f[0]||=e=>N.value=e},null,8,[`src`,`aspect-ratio`]))],4)]),_:1},8,[`text`])],2),d(`div`,j,[t(F,{text:`Open the source code of ${n.component.pascalName}.vue in your IDE`},{default:l(()=>[t(p,{class:`template-action`,onClick:u(y,[`stop`])},{default:l(()=>[t(h,{name:`carbon:code`,class:`w-3 h-3`}),f[2]||=i(` View source `,-1)]),_:1})]),_:1},8,[`text`]),n.component.credits?(s(),_(`div`,M,[E.value?(s(),c(p,{key:0,to:E.value,target:`_blank`},{default:l(()=>[i(m(T.value),1)]),_:1},8,[`to`])):g(``,!0)])):g(``,!0)])])}}}),[[`__scopeId`,`data-v-20711018`]]),{__name:`TemplateComponentPreview`}),P={class:`templates-page animate-fade-up`},F={key:0,class:`loading-container`},I={key:1,class:`templates-content stagger-children`},L={class:`template-grid`},R=[`onClick`],z={class:`template-grid`},B=[`onClick`],V=T(a({__name:`templates`,setup(e){let{appComponents:r,communityComponents:a,activeComponentName:u,src:f,aspectRatio:p,isLoading:m,patchOptions:b}=C();async function x(e){b({component:e}),await y(`/`)}return(e,y)=>{let b=N,S=E;return s(),_(`div`,P,[o(m)?(s(),_(`div`,F,[...y[0]||=[d(`div`,{class:`loading-spinner`},null,-1),d(`p`,{class:`loading-text`},` Loading templates… `,-1)]])):(s(),_(`div`,I,[o(r).length?(s(),c(S,{key:0,icon:`carbon:app`,text:`Your Templates`},{description:l(()=>[...y[1]||=[i(` Custom OG Image components in your project `,-1)]]),default:l(()=>[d(`div`,L,[(s(!0),_(h,null,n(o(r),e=>(s(),_(`button`,{key:e.pascalName,class:`template-item`,onClick:t=>x(e.pascalName)},[t(b,{component:e,src:o(v)(o(f),{component:e.pascalName}),"aspect-ratio":o(p),active:e.pascalName===o(u)},null,8,[`component`,`src`,`aspect-ratio`,`active`])],8,R))),128))])]),_:1})):g(``,!0),t(S,{icon:`carbon:user-multiple`,text:`Community Templates`},{description:l(()=>[...y[2]||=[i(` Pre-built templates you can use or eject `,-1)]]),default:l(()=>[d(`div`,z,[(s(!0),_(h,null,n(o(a),e=>(s(),_(`button`,{key:e.pascalName,class:`template-item`,onClick:t=>x(e.pascalName)},[t(b,{component:e,src:o(v)(o(f),{component:e.pascalName}),"aspect-ratio":o(p),active:e.pascalName===o(u)},null,8,[`component`,`src`,`aspect-ratio`,`active`])],8,B))),128))])]),_:1})]))])}}}),[[`__scopeId`,`data-v-6c5c4c86`]]);export{V as default};
@@ -0,0 +1,3 @@
1
+ import{At as e,B as t,C as n,Ct as r,L as i,Ot as a,T as o,Tt as s,U as c,g as l,gt as u,jt as d,o as f,ot as p,tt as m,v as h,y as g}from"./D2zWjF09.js";import{Vt as _}from"./C-b6hTTf.js";import{Ct as v,D as y,jt as b,o as x}from"./Co3OAyKc.js";import{t as S}from"./CHHO6nw6.js";var C=[`src`],w={key:0,class:`loading-state`},T={key:1,class:`error-state`},E={class:`error-header`},D={class:`error-type`},O={class:`error-message`},k={key:0,class:`error-stack`},A=Object.assign(S(o({__name:`ImageLoader`,props:{src:{},aspectRatio:{},maxHeight:{},maxWidth:{},minHeight:{}},emits:[`load`],setup(t,{emit:o}){let _=t,v=o,b=u(!1),S=u(!1),A=u(!1),j=u(0),M;m(()=>_.src,()=>{S.value=!0,A.value=!1,b.value=!1,j.value=Date.now(),clearTimeout(M),M=setTimeout(()=>{S.value&&(A.value=!0)},200)},{immediate:!0});function N(){S.value=!1,A.value=!1,clearTimeout(M),v(`load`,{timeTaken:Date.now()-j.value,sizeKb:``})}i(()=>clearTimeout(M));function P(){S.value=!1,A.value=!1,clearTimeout(M),$fetch(_.src).catch(e=>{b.value=e.data?.stack||[`Failed to load image`]})}return(i,o)=>{let u=y;return c(),g(`div`,{class:a([`image-loader`,{"is-valid":!s(b)&&!s(S),"is-error":s(b)}]),style:e({aspectRatio:t.aspectRatio,minHeight:t.minHeight})},[p(l(`img`,{src:t.src,style:e({aspectRatio:t.aspectRatio,maxWidth:`${s(r)(s(x).width)||1200}px`}),onLoad:N,onError:P},null,44,C),[[f,!s(S)&&!s(b)]]),s(A)?(c(),g(`div`,w,[...o[0]||=[l(`div`,{class:`loading-spinner`},null,-1)]])):h(``,!0),s(b)?(c(),g(`div`,T,[l(`div`,E,[n(u,{name:`carbon:warning`,class:`error-icon`}),l(`span`,D,d(s(b).join(`
2
+ `).includes(`satori`)?`SatoriError`:`ImageError`),1)]),l(`p`,O,d(s(b)[0]?.replace(`Error:`,``)),1),s(b).length>1?(c(),g(`pre`,k,d(s(b).slice(1).join(`
3
+ `)),1)):h(``,!0)])):h(``,!0)],6)}}}),[[`__scopeId`,`data-v-7f953e88`]]),{__name:`ImageLoader`}),j=Object.assign(S(o({__name:`IFrameLoader`,props:{src:{},aspectRatio:{}},emits:[`load`],setup(n,{emit:i}){let a=n,o=i,d=u(),f=u(),p=u(),h=b(()=>{let e=f.value;if(!e||!d.value)return;let t=Date.now();e.src=``;let n=r(x.value.width)||1200,i=p.value?.offsetWidth,a=i?Math.min(1,i/n):1;e.style.opacity=`0`,e.onload=()=>{e.style.opacity=`1`,o(`load`,{timeTaken:Date.now()-t})},e.src=_(d.value,{scale:a})},200);return t(()=>{m(()=>a.src,e=>{d.value!==e&&f.value&&(d.value=e,h())},{immediate:!0}),m(f,()=>{h()})}),v(p,()=>{d.value&&h()}),m(()=>r(x.value.width),()=>{d.value&&h()},{flush:`post`}),(t,i)=>(c(),g(`div`,{ref_key:`container`,ref:p,class:`iframe-loader`,style:e({aspectRatio:n.aspectRatio,maxWidth:`${s(r)(s(x).width)||1200}px`})},[l(`iframe`,{ref_key:`iframe`,ref:f},null,512)],4))}}),[[`__scopeId`,`data-v-6929e48a`]]),{__name:`IFrameLoader`});export{A as n,j as t};
@@ -0,0 +1 @@
1
+ import{T as e,U as t,_ as n,g as r,y as i}from"./D2zWjF09.js";import{t as a}from"./CHHO6nw6.js";var o={class:`h-full max-h-full overflow-hidden`},s=[`src`,`title`],c=Object.assign(e({__name:`DevtoolsDocs`,props:{url:{}},setup(e){return(n,a)=>(t(),i(`div`,o,[r(`iframe`,{src:e.url,title:`Documentation - ${e.url}`,class:`w-full h-full border-none`,style:{"min-height":`calc(100vh - 100px)`}},null,8,s)]))}}),{__name:`DevtoolsDocs`}),l={};function u(e,r){let i=c;return t(),n(i,{url:`https://nuxtseo.com/og-image`})}var d=a(l,[[`render`,u]]);export{d as default};
@@ -0,0 +1 @@
1
+ var e=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{e as t};