nuxt-og-image 3.0.0-rc.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -24
- package/dist/client/200.html +274 -15
- package/dist/client/404.html +274 -15
- package/dist/client/_nuxt/0OCEc-sb.js +1 -0
- package/dist/client/_nuxt/16nqZaIT.js +1 -0
- package/dist/client/_nuxt/3Ts0ZrM4.js +4 -0
- package/dist/client/_nuxt/44JOqR_V.js +1 -0
- package/dist/client/_nuxt/4FkZXfg1.js +3 -0
- package/dist/client/_nuxt/4WleZr1P.js +1 -0
- package/dist/client/_nuxt/5HixFuyr.js +1 -0
- package/dist/client/_nuxt/5bRVBCrv.js +1 -0
- package/dist/client/_nuxt/7LPQ6a13.js +2 -0
- package/dist/client/_nuxt/8WiSp-0_.js +1 -0
- package/dist/client/_nuxt/9CfBjzQa.js +1 -0
- package/dist/client/_nuxt/B-9EjyZr.js +1 -0
- package/dist/client/_nuxt/B-a2BbyY.js +1 -0
- package/dist/client/_nuxt/B0LoMq2b.js +1 -0
- package/dist/client/_nuxt/B1ejXUAS.js +1 -0
- package/dist/client/_nuxt/B2DkETJQ.js +1 -0
- package/dist/client/_nuxt/B3LRAdDP.js +1 -0
- package/dist/client/_nuxt/B3a86pAO.js +1 -0
- package/dist/client/_nuxt/B5La0Eyp.js +1 -0
- package/dist/client/_nuxt/B6E6ObS_.js +8 -0
- package/dist/client/_nuxt/B7-FEXAT.js +1 -0
- package/dist/client/_nuxt/B9HI_aQy.js +1 -0
- package/dist/client/_nuxt/B9vFkdfw.js +1 -0
- package/dist/client/_nuxt/BAGvEKUB.js +1 -0
- package/dist/client/_nuxt/BAp2aEeE.js +1 -0
- package/dist/client/_nuxt/BB9S_66N.js +1 -0
- package/dist/client/_nuxt/BBDuFDsq.js +1 -0
- package/dist/client/_nuxt/BC7ivatP.js +1 -0
- package/dist/client/_nuxt/BCOu96sC.js +1 -0
- package/dist/client/_nuxt/BD3t3nJY.js +1 -0
- package/dist/client/_nuxt/BDJ7po1j.js +1 -0
- package/dist/client/_nuxt/BGk6HrHT.js +1 -0
- package/dist/client/_nuxt/BHSTd-7M.js +1 -0
- package/dist/client/_nuxt/BITGhEdf.js +1 -0
- package/dist/client/_nuxt/BKFBoKT4.js +1 -0
- package/dist/client/_nuxt/BKNiEhql.js +1 -0
- package/dist/client/_nuxt/BLmvGqlk.js +1 -0
- package/dist/client/_nuxt/BMRpS3Xo.js +1 -0
- package/dist/client/_nuxt/BMkdSFOr.js +1 -0
- package/dist/client/_nuxt/BNgG76gt.js +1 -0
- package/dist/client/_nuxt/BNofkYSZ.js +165 -0
- package/dist/client/_nuxt/BOp3HRET.js +1 -0
- package/dist/client/_nuxt/BPhJoBd6.js +1 -0
- package/dist/client/_nuxt/BQnHL-cn.js +1 -0
- package/dist/client/_nuxt/BS9sT-GQ.js +1 -0
- package/dist/client/_nuxt/BSB_bK09.js +1 -0
- package/dist/client/_nuxt/BTtaZsq5.js +1 -0
- package/dist/client/_nuxt/BU83OF-G.js +1 -0
- package/dist/client/_nuxt/BUeIC4cT.js +1 -0
- package/dist/client/_nuxt/BXF7Vm5l.js +1 -0
- package/dist/client/_nuxt/BXP-NDAE.js +1 -0
- package/dist/client/_nuxt/BXUVD3TH.js +1 -0
- package/dist/client/_nuxt/BXWtGw2n.js +6 -0
- package/dist/client/_nuxt/BYLuaE_S.js +3 -0
- package/dist/client/_nuxt/BYelj_cE.js +1 -0
- package/dist/client/_nuxt/B_Sdu6N9.js +1 -0
- package/dist/client/_nuxt/BaWyeHV_.js +1 -0
- package/dist/client/_nuxt/Ba_2pva2.js +1 -0
- package/dist/client/_nuxt/BbJj1K1w.js +1 -0
- package/dist/client/_nuxt/BeX7BQ1y.js +1 -0
- package/dist/client/_nuxt/BeocmOPF.js +1 -0
- package/dist/client/_nuxt/BfVRrWqI.js +1 -0
- package/dist/client/_nuxt/BgEvnnZj.js +1 -0
- package/dist/client/_nuxt/Bgrlo6mM.js +1 -0
- package/dist/client/_nuxt/BiVAY1KT.js +1 -0
- package/dist/client/_nuxt/Bl6w8nq6.js +29 -0
- package/dist/client/_nuxt/BmUjtHPt.js +1 -0
- package/dist/client/_nuxt/Bn5gmY5k.js +1 -0
- package/dist/client/_nuxt/BnYPtiAB.js +1 -0
- package/dist/client/_nuxt/BotTw_1M.js +1 -0
- package/dist/client/_nuxt/BpDWT_aG.js +1 -0
- package/dist/client/_nuxt/BpqPLH6b.js +1 -0
- package/dist/client/_nuxt/Br4herk8.js +1 -0
- package/dist/client/_nuxt/Brmco9EZ.js +2 -0
- package/dist/client/_nuxt/Bs9WCFOo.js +1 -0
- package/dist/client/_nuxt/BsvsQ1iS.js +1 -0
- package/dist/client/_nuxt/BtPWTO6-.js +1 -0
- package/dist/client/_nuxt/BuqjW-Uc.js +1 -0
- package/dist/client/_nuxt/BvCdDh2R.js +1 -0
- package/dist/client/_nuxt/BwUg_Rem.js +1 -0
- package/dist/client/_nuxt/Bxuka25Y.js +1 -0
- package/dist/client/_nuxt/BxwAa5i0.js +1 -0
- package/dist/client/_nuxt/BxwkrKyP.js +3 -0
- package/dist/client/_nuxt/ByN1NmdT.js +11 -0
- package/dist/client/_nuxt/C2Z2wNnw.js +1 -0
- package/dist/client/_nuxt/C3wf4cjV.js +27 -0
- package/dist/client/_nuxt/C5J_9lw5.js +1 -0
- package/dist/client/_nuxt/C6doOGgB.js +1 -0
- package/dist/client/_nuxt/C7n-thn-.js +1 -0
- package/dist/client/_nuxt/C7oZ9nno.js +1 -0
- package/dist/client/_nuxt/C7xspq5a.js +1 -0
- package/dist/client/_nuxt/C86elO-m.js +1 -0
- package/dist/client/_nuxt/C8DXlOXe.js +1 -0
- package/dist/client/_nuxt/C9CNr0dZ.js +1 -0
- package/dist/client/_nuxt/CA2blNRc.js +1 -0
- package/dist/client/_nuxt/CA9nliXM.js +1 -0
- package/dist/client/_nuxt/CCW61mLD.js +1 -0
- package/dist/client/_nuxt/CDNnVXJ3.js +1 -0
- package/dist/client/_nuxt/CDP-pALJ.js +1 -0
- package/dist/client/_nuxt/CFTaR7kf.js +1 -0
- package/dist/client/_nuxt/CFy8Z7mU.js +1 -0
- package/dist/client/_nuxt/CGmujMTu.js +1 -0
- package/dist/client/_nuxt/CHDuk4cg.js +1 -0
- package/dist/client/_nuxt/CJYoS41Z.js +1 -0
- package/dist/client/_nuxt/CKK8qrH7.js +3 -0
- package/dist/client/_nuxt/CKqhLkpw.js +1 -0
- package/dist/client/_nuxt/CLTURUqp.js +9 -0
- package/dist/client/_nuxt/CO7HdiM_.js +1 -0
- package/dist/client/_nuxt/CPQn-Lhb.js +1 -0
- package/dist/client/_nuxt/CPw9RxLe.js +1 -0
- package/dist/client/_nuxt/CRDKj6ck.js +1 -0
- package/dist/client/_nuxt/CRUEGcu5.js +1 -0
- package/dist/client/_nuxt/CRlnGVMD.js +1 -0
- package/dist/client/_nuxt/CS6sTstm.js +4 -0
- package/dist/client/_nuxt/CSPPpfsQ.js +1 -0
- package/dist/client/_nuxt/CTeQKLZv.js +1 -0
- package/dist/client/_nuxt/CTsPJjdJ.js +1 -0
- package/dist/client/_nuxt/CUNQUWO_.js +1 -0
- package/dist/client/_nuxt/CV5B5C80.js +1 -0
- package/dist/client/_nuxt/CZZ6oYdA.js +1 -0
- package/dist/client/_nuxt/CZkFsSlX.js +1 -0
- package/dist/client/_nuxt/C_g069vW.js +1 -0
- package/dist/client/_nuxt/C_h5G2He.js +20 -0
- package/dist/client/_nuxt/CaR_I2C-.js +1 -0
- package/dist/client/_nuxt/Cb48SAmt.js +1 -0
- package/dist/client/_nuxt/Cda-MJFk.js +1 -0
- package/dist/client/_nuxt/CeIpHJfZ.js +12 -0
- package/dist/client/_nuxt/CgwOUXSn.js +1 -0
- package/dist/client/_nuxt/ChH25C4w.js +1 -0
- package/dist/client/_nuxt/CidHYXz9.js +1 -0
- package/dist/client/_nuxt/ClPxYbPx.js +1 -0
- package/dist/client/_nuxt/Clj_IpB8.js +1 -0
- package/dist/client/_nuxt/CmN1UzhW.js +1 -0
- package/dist/client/_nuxt/Crs1WKlG.js +1 -0
- package/dist/client/_nuxt/CsTmP73Z.js +1 -0
- package/dist/client/_nuxt/CsW3I34-.js +1 -0
- package/dist/client/_nuxt/CsuMf1xJ.js +1 -0
- package/dist/client/_nuxt/CsyjKwr8.js +1 -0
- package/dist/client/_nuxt/Ctb_e1-I.js +1 -0
- package/dist/client/_nuxt/CvHWZNAB.js +1 -0
- package/dist/client/_nuxt/CxK4ekaG.js +1 -0
- package/dist/client/_nuxt/CyUS7F7b.js +17 -0
- package/dist/client/_nuxt/Cz-n9WvF.js +1 -0
- package/dist/client/_nuxt/Cz3ygVR-.js +1 -0
- package/dist/client/_nuxt/CzK8D06Z.js +1 -0
- package/dist/client/_nuxt/CzPA46E-.js +1 -0
- package/dist/client/_nuxt/D0N_qbs7.js +2 -0
- package/dist/client/_nuxt/D0pnavP-.js +1 -0
- package/dist/client/_nuxt/D3VXSfF0.js +1 -0
- package/dist/client/_nuxt/D46m5Xd3.js +1 -0
- package/dist/client/_nuxt/D4miJ1xw.js +1 -0
- package/dist/client/_nuxt/D5lQfeOG.js +1 -0
- package/dist/client/_nuxt/D6oCKXcX.js +1 -0
- package/dist/client/_nuxt/D71BffLY.js +1 -0
- package/dist/client/_nuxt/D8V69RRQ.js +1 -0
- package/dist/client/_nuxt/DBLgxP_1.js +2 -0
- package/dist/client/_nuxt/DCmDdbvy.js +1 -0
- package/dist/client/_nuxt/DDG_rSGg.js +8 -0
- package/dist/client/_nuxt/DDK5Hw8n.js +1 -0
- package/dist/client/_nuxt/DFHN_7lU.js +3 -0
- package/dist/client/_nuxt/DFaziNDp.js +1 -0
- package/dist/client/_nuxt/DFsxFixh.js +1 -0
- package/dist/client/_nuxt/DGhhRy1e.js +1 -0
- package/dist/client/_nuxt/DIw1DfnK.js +1 -0
- package/dist/client/_nuxt/DJNHLfzP.js +1 -0
- package/dist/client/_nuxt/DJOPMAPO.js +10 -0
- package/dist/client/_nuxt/DKgh9jPU.js +20 -0
- package/dist/client/_nuxt/DNR26wTC.js +1 -0
- package/dist/client/_nuxt/DO04iIl4.js +1 -0
- package/dist/client/_nuxt/DOOuMSMh.js +1 -0
- package/dist/client/_nuxt/DOqtC9FP.js +1 -0
- package/dist/client/_nuxt/DQ-rpzxz.js +1 -0
- package/dist/client/_nuxt/DRuVOcqL.js +1 -0
- package/dist/client/_nuxt/DSmiUmWA.js +1 -0
- package/dist/client/_nuxt/DSv7Jr7N.js +5 -0
- package/dist/client/_nuxt/DTMFIK7w.js +1 -0
- package/dist/client/_nuxt/DV9_Ze0W.js +1 -0
- package/dist/client/_nuxt/DXZpi2gR.js +1 -0
- package/dist/client/_nuxt/DXdsTRaC.js +1 -0
- package/dist/client/_nuxt/DXtfa3TF.js +1 -0
- package/dist/client/_nuxt/DYgwfmdY.js +1 -0
- package/dist/client/_nuxt/DYikCEmq.js +1 -0
- package/dist/client/_nuxt/DYrknm32.js +1 -0
- package/dist/client/_nuxt/D_lsq3cR.js +1 -0
- package/dist/client/_nuxt/D_nC6SfZ.js +1 -0
- package/dist/client/_nuxt/Dc3u8CCo.js +1 -0
- package/dist/client/_nuxt/DeVv6D4_.js +1 -0
- package/dist/client/_nuxt/Df4vQnuo.js +1 -0
- package/dist/client/_nuxt/Di1G_BEd.js +1 -0
- package/dist/client/_nuxt/DjTlIhuc.js +1 -0
- package/dist/client/_nuxt/Dk2kDqHs.js +1 -0
- package/dist/client/_nuxt/DkIL16gc.js +2 -0
- package/dist/client/_nuxt/DkfuXiRx.js +204 -0
- package/dist/client/_nuxt/DmixpzPA.js +1 -0
- package/dist/client/_nuxt/DnLUQrgA.js +1 -0
- package/dist/client/_nuxt/Dnd6U92I.js +25 -0
- package/dist/client/_nuxt/DofIr7ih.js +1 -0
- package/dist/client/_nuxt/DrUHIbQf.js +1 -0
- package/dist/client/_nuxt/DrhOmAGa.js +1 -0
- package/dist/client/_nuxt/DsO5WfEU.js +1 -0
- package/dist/client/_nuxt/DsclqnHy.js +4 -0
- package/dist/client/_nuxt/Dwk9V841.js +1 -0
- package/dist/client/_nuxt/DyLIn2qo.js +1 -0
- package/dist/client/_nuxt/DzhYcJWo.js +1 -0
- package/dist/client/_nuxt/Dziqk49f.js +1 -0
- package/dist/client/_nuxt/E5r7Moxb.js +16 -0
- package/dist/client/_nuxt/FJDVp-XM.js +1 -0
- package/dist/client/_nuxt/FMRyFT8D.js +1 -0
- package/dist/client/_nuxt/GACPk8cj.js +16 -0
- package/dist/client/_nuxt/H94RPpLS.js +1 -0
- package/dist/client/_nuxt/HrnDn_2Q.js +1 -0
- package/dist/client/_nuxt/HxmVvryO.js +1 -0
- package/dist/client/_nuxt/JYC31MTV.js +1 -0
- package/dist/client/_nuxt/Jl0QvYgb.js +1 -0
- package/dist/client/_nuxt/KA8c-whL.js +1 -0
- package/dist/client/_nuxt/KEYLhlmT.js +1 -0
- package/dist/client/_nuxt/KN-DOLVO.js +1 -0
- package/dist/client/_nuxt/Ka_J5llu.js +1 -0
- package/dist/client/_nuxt/KuNYkU7X.js +1 -0
- package/dist/client/_nuxt/MS3qTAOR.js +1 -0
- package/dist/client/_nuxt/N3zwmhmW.js +1 -0
- package/dist/client/_nuxt/O4cDyHwR.js +1 -0
- package/dist/client/_nuxt/OPd3ySAa.js +1 -0
- package/dist/client/_nuxt/Opso89zU.js +16 -0
- package/dist/client/_nuxt/P3XzCKkX.js +1 -0
- package/dist/client/_nuxt/PBlC1IT3.js +1 -0
- package/dist/client/_nuxt/PauOf_jS.js +1 -0
- package/dist/client/_nuxt/Qj0mFepl.js +14 -0
- package/dist/client/_nuxt/R9SNgiQ9.js +1 -0
- package/dist/client/_nuxt/Rc0-bMtX.js +1 -0
- package/dist/client/_nuxt/TYaudu4O.js +1 -0
- package/dist/client/_nuxt/UREJT2Bw.js +1 -0
- package/dist/client/_nuxt/VRCUJX8G.js +1 -0
- package/dist/client/_nuxt/VntNkNt1.js +1 -0
- package/dist/client/_nuxt/Ys9ZunwU.js +1 -0
- package/dist/client/_nuxt/YxQm0tCS.js +1 -0
- package/dist/client/_nuxt/alpzPJ78.js +1 -0
- package/dist/client/_nuxt/bEygH-WE.js +3 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/c0255dff-4096-412a-b1f2-8c73ec29c527.json +1 -0
- package/dist/client/_nuxt/cW9vKj3g.js +1 -0
- package/dist/client/_nuxt/eJKZXzCK.js +1 -0
- package/dist/client/_nuxt/eQYbbmqd.js +16 -0
- package/dist/client/_nuxt/entry.DtsycVcr.css +1 -0
- package/dist/client/_nuxt/error-404.D2eZnIkK.css +1 -0
- package/dist/client/_nuxt/error-500.BJ-KsTwR.css +1 -0
- package/dist/client/_nuxt/gwSZkKbG.js +1 -0
- package/dist/client/_nuxt/hXH8Gyq8.js +1 -0
- package/dist/client/_nuxt/i0hkWYmE.js +1 -0
- package/dist/client/_nuxt/iSbrOpM4.js +1 -0
- package/dist/client/_nuxt/ithPx4uF.js +1 -0
- package/dist/client/_nuxt/jDrCW69G.js +1 -0
- package/dist/client/_nuxt/jaXbsbtS.js +1 -0
- package/dist/client/_nuxt/kveMaAK5.js +1 -0
- package/dist/client/_nuxt/lBoe4CZw.js +1 -0
- package/dist/client/_nuxt/lPxKsdjn.js +1 -0
- package/dist/client/_nuxt/lRZxrFTT.js +1 -0
- package/dist/client/_nuxt/mvTh5Gok.js +1 -0
- package/dist/client/_nuxt/pCnzZaOt.js +1 -0
- package/dist/client/_nuxt/qpF8edk8.js +1 -0
- package/dist/client/_nuxt/qvnQm5y7.js +1 -0
- package/dist/client/_nuxt/qwoaayiL.js +1 -0
- package/dist/client/_nuxt/qxoleWdb.js +1 -0
- package/dist/client/_nuxt/rS0jd3Ly.js +1 -0
- package/dist/client/_nuxt/sMI-pExk.js +1 -0
- package/dist/client/_nuxt/t1S7pxBA.js +1 -0
- package/dist/client/_nuxt/t6MJYFCU.js +5 -0
- package/dist/client/_nuxt/tEd5xQ4M.js +1 -0
- package/dist/client/_nuxt/xGgVA17b.js +1 -0
- package/dist/client/_nuxt/xPNGhBYe.js +1 -0
- package/dist/client/_nuxt/xuIuMB9j.js +1 -0
- package/dist/client/_nuxt/yvfKceIB.js +1 -0
- package/dist/client/_nuxt/z5DqfkHR.js +1 -0
- package/dist/client/index.html +274 -15
- package/dist/module.d.mts +23 -108
- package/dist/module.d.ts +23 -108
- package/dist/module.json +6 -2
- package/dist/module.mjs +430 -222
- package/dist/runtime/assets/Inter-400.ttf.base64 +1 -0
- package/dist/runtime/assets/Inter-700.ttf.base64 +1 -0
- package/dist/runtime/nitro/og-image/bindings/chromium/chrome-launcher.js +9 -0
- package/dist/runtime/nitro/og-image/bindings/chromium/on-demand.d.ts +2 -0
- package/dist/runtime/nitro/og-image/bindings/chromium/on-demand.js +35 -0
- package/dist/runtime/nitro/og-image/bindings/chromium/playwright.d.ts +2 -0
- package/dist/runtime/nitro/og-image/bindings/chromium/playwright.js +6 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/node.d.ts +8 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/node.js +7 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/wasm-fs.d.ts +7 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/wasm-fs.js +8 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/wasm.d.ts +7 -0
- package/dist/runtime/nitro/og-image/bindings/css-inline/wasm.js +7 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm-fs.d.ts +1 -1
- package/dist/runtime/{core/bindings/resvg/wasm-fs.mjs → nitro/og-image/bindings/resvg/wasm-fs.js} +1 -1
- package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm.d.ts +1 -1
- package/dist/runtime/nitro/og-image/bindings/resvg/wasm.js +5 -0
- package/dist/runtime/{core/bindings/satori/wasm-fs.mjs → nitro/og-image/bindings/satori/wasm-fs.js} +1 -1
- package/dist/runtime/{core/bindings/satori/wasm.mjs → nitro/og-image/bindings/satori/wasm.js} +2 -3
- package/dist/runtime/nitro/og-image/cache/lru.d.ts +9 -0
- package/dist/runtime/nitro/og-image/cache/lru.js +15 -0
- package/dist/runtime/nitro/og-image/cache/mock.d.ts +9 -0
- package/dist/runtime/nitro/og-image/cache/mock.js +9 -0
- package/dist/runtime/{core/renderers/chromium/index.d.ts → nitro/og-image/chromium/renderer.d.ts} +1 -1
- package/dist/runtime/{core/renderers/chromium/index.mjs → nitro/og-image/chromium/renderer.js} +2 -2
- package/dist/runtime/{core/renderers → nitro/og-image}/chromium/screenshot.d.ts +1 -2
- package/dist/runtime/{core/renderers/chromium/screenshot.mjs → nitro/og-image/chromium/screenshot.js} +2 -2
- package/dist/runtime/nitro/og-image/context.d.ts +5 -0
- package/dist/runtime/nitro/og-image/context.js +181 -0
- package/dist/runtime/nitro/og-image/instances.d.ts +2 -0
- package/dist/runtime/nitro/og-image/instances.js +10 -0
- package/dist/runtime/nitro/og-image/satori/font.d.ts +3 -0
- package/dist/runtime/nitro/og-image/satori/font.js +39 -0
- package/dist/runtime/{core/renderers → nitro/og-image}/satori/instances.d.ts +3 -4
- package/dist/runtime/{core/renderers/satori/instances.mjs → nitro/og-image/satori/instances.js} +2 -11
- package/dist/runtime/nitro/og-image/satori/plugins/classes.js +17 -0
- package/dist/runtime/{core/renderers/satori/plugins/emojis.mjs → nitro/og-image/satori/plugins/emojis.js} +2 -2
- package/dist/runtime/nitro/og-image/satori/plugins/encoding.js +17 -0
- package/dist/runtime/nitro/og-image/satori/plugins/flex.js +35 -0
- package/dist/runtime/nitro/og-image/satori/plugins/imageSrc.js +89 -0
- package/dist/runtime/{core/renderers/satori/plugins/unocss.mjs → nitro/og-image/satori/plugins/unocss.js} +2 -2
- package/dist/runtime/{core/renderers/satori/index.d.ts → nitro/og-image/satori/renderer.d.ts} +1 -1
- package/dist/runtime/{core/renderers/satori/index.mjs → nitro/og-image/satori/renderer.js} +26 -17
- package/dist/runtime/{core/html/applyEmojis.d.ts → nitro/og-image/satori/transforms/emojis.d.ts} +2 -2
- package/dist/runtime/nitro/og-image/satori/transforms/emojis.js +3593 -0
- package/dist/runtime/nitro/og-image/satori/transforms/inlineCss.d.ts +3 -0
- package/dist/runtime/nitro/og-image/satori/transforms/inlineCss.js +50 -0
- package/dist/runtime/{core/renderers → nitro/og-image}/satori/utils.d.ts +2 -2
- package/dist/runtime/{core/renderers/satori/utils.mjs → nitro/og-image/satori/utils.js} +9 -5
- package/dist/runtime/{core/renderers → nitro/og-image}/satori/vnodes.d.ts +1 -1
- package/dist/runtime/nitro/og-image/satori/vnodes.js +38 -0
- package/dist/runtime/nitro/og-image/templates/html.d.ts +2 -0
- package/dist/runtime/{core/html/devIframeTemplate.mjs → nitro/og-image/templates/html.js} +31 -29
- package/dist/runtime/nitro/plugins/__zero-runtime/nuxt-content.d.ts +2 -0
- package/dist/runtime/nitro/plugins/__zero-runtime/nuxt-content.js +9 -0
- package/dist/runtime/nitro/plugins/nuxt-content.d.ts +1 -1
- package/dist/runtime/nitro/plugins/nuxt-content.js +5 -0
- package/dist/runtime/nitro/plugins/prerender.js +33 -0
- package/dist/runtime/nitro/routes/__zero-runtime/font.js +8 -0
- package/dist/runtime/nitro/routes/__zero-runtime/image.js +8 -0
- package/dist/runtime/{server/routes/__og-image__ → nitro/routes}/debug.json.d.ts +1 -1
- package/dist/runtime/{server/routes/__og-image__/debug.json.mjs → nitro/routes/debug.json.js} +2 -2
- package/dist/runtime/nitro/routes/font.d.ts +2 -0
- package/dist/runtime/nitro/routes/font.js +3 -0
- package/dist/runtime/nitro/routes/image.d.ts +2 -0
- package/dist/runtime/nitro/routes/image.js +3 -0
- package/dist/runtime/nitro/tsconfig.json +3 -0
- package/dist/runtime/{cache.d.ts → nitro/util/cache.d.ts} +2 -2
- package/dist/runtime/{cache.mjs → nitro/util/cache.js} +5 -4
- package/dist/runtime/nitro/util/encoding.d.ts +3 -0
- package/dist/runtime/nitro/util/encoding.js +15 -0
- package/dist/runtime/nitro/util/eventHandlers.d.ts +3 -0
- package/dist/runtime/nitro/util/eventHandlers.js +155 -0
- package/dist/runtime/nitro/util/kit.d.ts +6 -0
- package/dist/runtime/nitro/util/kit.js +32 -0
- package/dist/runtime/nitro/util/logger.d.ts +1 -0
- package/dist/runtime/nitro/util/logger.js +6 -0
- package/dist/runtime/nitro/util/options.d.ts +2 -0
- package/dist/runtime/nitro/util/options.js +18 -0
- package/dist/runtime/nitro/util/plugins.d.ts +2 -0
- package/dist/runtime/nitro/{plugins/nuxt-content.mjs → util/plugins.js} +12 -8
- package/dist/runtime/{core/utils → nitro/util}/wasm.d.ts +0 -1
- package/dist/runtime/{components → nuxt/components}/OgImage/OgImage.d.ts +2 -4
- package/dist/runtime/nuxt/components/OgImage/OgImageScreenshot.d.ts +3 -0
- package/dist/runtime/nuxt/components/Templates/Community/Frame.vue +64 -0
- package/dist/runtime/{components → nuxt/components}/Templates/Community/Nuxt.vue +6 -5
- package/dist/runtime/{components → nuxt/components}/Templates/Community/NuxtSeo.vue +7 -7
- package/dist/runtime/{components → nuxt/components}/Templates/Community/Pergel.vue +1 -2
- package/dist/runtime/{components → nuxt/components}/Templates/Community/UnJs.vue +2 -2
- package/dist/runtime/{composables → nuxt/composables}/defineOgImage.d.ts +1 -1
- package/dist/runtime/{composables/defineOgImage.mjs → nuxt/composables/defineOgImage.js} +12 -15
- package/dist/runtime/{composables → nuxt/composables}/defineOgImageComponent.d.ts +1 -1
- package/dist/runtime/{composables/defineOgImageComponent.mjs → nuxt/composables/defineOgImageComponent.js} +1 -1
- package/dist/runtime/nuxt/composables/defineOgImageScreenshot.d.ts +2 -0
- package/dist/runtime/nuxt/composables/mock.d.ts +5 -0
- package/dist/runtime/nuxt/composables/mock.js +6 -0
- package/dist/runtime/nuxt/plugins/__zero-runtime/og-image-canonical-urls.server.d.ts +2 -0
- package/dist/runtime/nuxt/plugins/__zero-runtime/og-image-canonical-urls.server.js +9 -0
- package/dist/runtime/nuxt/plugins/__zero-runtime/route-rule-og-image.server.d.ts +2 -0
- package/dist/runtime/nuxt/plugins/__zero-runtime/route-rule-og-image.server.js +9 -0
- package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.d.ts +1 -1
- package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.js +5 -0
- package/dist/runtime/nuxt/plugins/route-rule-og-image.server.d.ts +1 -1
- package/dist/runtime/nuxt/plugins/route-rule-og-image.server.js +5 -0
- package/dist/runtime/nuxt/utils/plugins.d.ts +3 -0
- package/dist/runtime/nuxt/utils/plugins.js +87 -0
- package/dist/runtime/nuxt/utils.d.ts +3 -2
- package/dist/runtime/nuxt/{utils.mjs → utils.js} +12 -7
- package/dist/runtime/{utils.pure.d.ts → pure.d.ts} +2 -1
- package/dist/runtime/{utils.pure.mjs → pure.js} +22 -3
- package/dist/runtime/{utils.d.ts → shared.d.ts} +2 -2
- package/dist/runtime/{utils.mjs → shared.js} +5 -4
- package/dist/runtime/types.d.ts +19 -10
- package/dist/types.d.mts +2 -13
- package/dist/types.d.ts +2 -13
- package/package.json +87 -60
- package/dist/client/_nuxt/IconCSS.ad457eae.js +0 -1
- package/dist/client/_nuxt/IconCSS.f0b56d3e.css +0 -1
- package/dist/client/_nuxt/builds/meta/d8d0c16f-2709-4917-9aad-088138ea1bcf.json +0 -1
- package/dist/client/_nuxt/entry.6876d7da.js +0 -108
- package/dist/client/_nuxt/entry.a30f63d0.css +0 -1
- package/dist/client/_nuxt/error-404.1dded965.js +0 -1
- package/dist/client/_nuxt/error-404.b751fa02.css +0 -1
- package/dist/client/_nuxt/error-500.69009e70.css +0 -1
- package/dist/client/_nuxt/error-500.e54daf55.js +0 -1
- package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.23409a58.js +0 -8
- package/dist/runtime/components/OgImage/OgImageScreenshot.d.ts +0 -5
- package/dist/runtime/composables/defineOgImageScreenshot.d.ts +0 -2
- package/dist/runtime/core/bindings/chromium/node.mjs +0 -33
- package/dist/runtime/core/bindings/css-inline/node.d.ts +0 -2
- package/dist/runtime/core/bindings/css-inline/node.mjs +0 -2
- package/dist/runtime/core/bindings/resvg/wasm.mjs +0 -6
- package/dist/runtime/core/cache/emojis.d.ts +0 -1
- package/dist/runtime/core/cache/emojis.mjs +0 -5
- package/dist/runtime/core/cache/fonts.d.ts +0 -3
- package/dist/runtime/core/cache/fonts.mjs +0 -6
- package/dist/runtime/core/cache/htmlPayload.d.ts +0 -5
- package/dist/runtime/core/cache/htmlPayload.mjs +0 -6
- package/dist/runtime/core/cache/prerender.d.ts +0 -2
- package/dist/runtime/core/cache/prerender.mjs +0 -5
- package/dist/runtime/core/env/assets.d.ts +0 -1
- package/dist/runtime/core/env/assets.mjs +0 -11
- package/dist/runtime/core/font/fetch.d.ts +0 -2
- package/dist/runtime/core/font/fetch.mjs +0 -36
- package/dist/runtime/core/html/applyEmojis.mjs +0 -37
- package/dist/runtime/core/html/applyInlineCss.d.ts +0 -3
- package/dist/runtime/core/html/applyInlineCss.mjs +0 -32
- package/dist/runtime/core/html/devIframeTemplate.d.ts +0 -2
- package/dist/runtime/core/html/fetchIsland.d.ts +0 -3
- package/dist/runtime/core/html/fetchIsland.mjs +0 -17
- package/dist/runtime/core/options/extract.d.ts +0 -3
- package/dist/runtime/core/options/extract.mjs +0 -49
- package/dist/runtime/core/options/fetch.d.ts +0 -3
- package/dist/runtime/core/options/fetch.mjs +0 -32
- package/dist/runtime/core/renderers/satori/plugins/encoding.mjs +0 -8
- package/dist/runtime/core/renderers/satori/plugins/flex.mjs +0 -10
- package/dist/runtime/core/renderers/satori/plugins/imageSrc.mjs +0 -75
- package/dist/runtime/core/renderers/satori/plugins/twClasses.mjs +0 -8
- package/dist/runtime/core/renderers/satori/vnodes.mjs +0 -31
- package/dist/runtime/core/utils/resolveRendererContext.d.ts +0 -3
- package/dist/runtime/core/utils/resolveRendererContext.mjs +0 -97
- package/dist/runtime/nitro/plugins/prerender.mjs +0 -36
- package/dist/runtime/nitro/utils.d.ts +0 -2
- package/dist/runtime/nitro/utils.mjs +0 -16
- package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.mjs +0 -43
- package/dist/runtime/nuxt/plugins/route-rule-og-image.server.mjs +0 -37
- package/dist/runtime/server/assets/inter-latin-ext-400-normal.woff +0 -0
- package/dist/runtime/server/assets/inter-latin-ext-700-normal.woff +0 -0
- package/dist/runtime/server/routes/__og-image__/font-[name]-[weight].[extension].mjs +0 -49
- package/dist/runtime/server/routes/__og-image__/image.mjs +0 -91
- package/dist/runtime/{core/bindings/chromium/node.d.ts → nitro/og-image/bindings/chromium/chrome-launcher.d.ts} +0 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/resvg/node.d.ts +0 -0
- package/dist/runtime/{core/bindings/resvg/node.mjs → nitro/og-image/bindings/resvg/node.js} +0 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/satori/node.d.ts +0 -0
- package/dist/runtime/{core/bindings/satori/node.mjs → nitro/og-image/bindings/satori/node.js} +0 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm-fs.d.ts +0 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm.d.ts +0 -0
- package/dist/runtime/{core → nitro/og-image}/bindings/sharp/node.d.ts +0 -0
- package/dist/runtime/{core/bindings/sharp/node.mjs → nitro/og-image/bindings/sharp/node.js} +0 -0
- package/dist/runtime/{core/renderers/satori/plugins/emojis.d.ts → nitro/og-image/satori/plugins/classes.d.ts} +0 -0
- package/dist/runtime/{core/renderers/satori/plugins/encoding.d.ts → nitro/og-image/satori/plugins/emojis.d.ts} +0 -0
- package/dist/runtime/{core/renderers/satori/plugins/flex.d.ts → nitro/og-image/satori/plugins/encoding.d.ts} +0 -0
- package/dist/runtime/{core/renderers/satori/plugins/imageSrc.d.ts → nitro/og-image/satori/plugins/flex.d.ts} +0 -0
- package/dist/runtime/{core/renderers/satori/plugins/twClasses.d.ts → nitro/og-image/satori/plugins/imageSrc.d.ts} +0 -0
- package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/unocss.d.ts +0 -0
- package/dist/runtime/{server/routes/__og-image__/font-[name]-[weight].[extension].d.ts → nitro/routes/__zero-runtime/font.d.ts} +0 -0
- package/dist/runtime/{server/routes/__og-image__ → nitro/routes/__zero-runtime}/image.d.ts +0 -0
- package/dist/runtime/{core/utils/wasm.mjs → nitro/util/wasm.js} +0 -0
- package/dist/runtime/{components/OgImage/OgImage.mjs → nuxt/components/OgImage/OgImage.js} +1 -1
- package/dist/runtime/{components/OgImage/OgImageScreenshot.mjs → nuxt/components/OgImage/OgImageScreenshot.js} +1 -1
- package/dist/runtime/{components → nuxt/components}/Templates/Community/BrandedLogo.vue +0 -0
- package/dist/runtime/{components → nuxt/components}/Templates/Community/SimpleBlog.vue +1 -1
- /package/dist/runtime/{components → nuxt/components}/Templates/Community/Wave.vue +0 -0
- /package/dist/runtime/{components → nuxt/components}/Templates/Community/WithEmoji.vue +0 -0
- /package/dist/runtime/{composables/defineOgImageScreenshot.mjs → nuxt/composables/defineOgImageScreenshot.js} +0 -0
- /package/dist/runtime/{types.mjs → types.js} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { componentNames } from "#nuxt-og-image/component-names.mjs";
|
|
2
|
+
export function normaliseOptions(_options) {
|
|
3
|
+
const options = { ..._options };
|
|
4
|
+
if (!options)
|
|
5
|
+
return options;
|
|
6
|
+
if (options.component && componentNames) {
|
|
7
|
+
const originalName = options.component;
|
|
8
|
+
for (const component of componentNames) {
|
|
9
|
+
if (component.pascalName.endsWith(originalName) || component.kebabName.endsWith(originalName)) {
|
|
10
|
+
options.component = component.pascalName;
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
} else if (!options.component) {
|
|
15
|
+
options.component = componentNames[0]?.pascalName;
|
|
16
|
+
}
|
|
17
|
+
return options;
|
|
18
|
+
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { defineNitroPlugin } from "nitropack/dist/runtime/plugin";
|
|
2
1
|
import { defu } from "defu";
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { stringify } from "devalue";
|
|
3
|
+
import { getOgImagePath, useOgImageRuntimeConfig } from "../../shared.js";
|
|
4
|
+
import { normaliseOptions } from "./options.js";
|
|
5
|
+
export function nuxtContentPlugin(nitroApp) {
|
|
6
|
+
const { isNuxtContentDocumentDriven, defaults } = useOgImageRuntimeConfig();
|
|
5
7
|
nitroApp.hooks.hook("content:file:afterParse", async (content) => {
|
|
6
8
|
if (content._draft || content._extension !== "md" || content._partial || content.indexable === false || content.index === false)
|
|
7
9
|
return;
|
|
8
|
-
|
|
10
|
+
let path = content.path;
|
|
11
|
+
if (isNuxtContentDocumentDriven && content.path)
|
|
12
|
+
path = content._path;
|
|
13
|
+
if (path && content.ogImage) {
|
|
9
14
|
const ogImageConfig = typeof content.ogImage === "object" ? content.ogImage : {};
|
|
10
|
-
const { defaults } = useOgImageRuntimeConfig();
|
|
11
15
|
const optionsWithDefault = defu(ogImageConfig, defaults);
|
|
12
|
-
const src = getOgImagePath(
|
|
16
|
+
const src = getOgImagePath(path, optionsWithDefault);
|
|
13
17
|
const payload = {
|
|
14
18
|
title: content.title,
|
|
15
19
|
excerpt: content.description || content.excerpt,
|
|
@@ -24,7 +28,7 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
24
28
|
id: "nuxt-og-image-overrides",
|
|
25
29
|
type: "application/json",
|
|
26
30
|
processTemplateParams: true,
|
|
27
|
-
innerHTML: payload,
|
|
31
|
+
innerHTML: stringify(normaliseOptions(payload)),
|
|
28
32
|
// we want this to be last in our head
|
|
29
33
|
tagPosition: "bodyClose",
|
|
30
34
|
tagPriority: 30
|
|
@@ -48,4 +52,4 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
48
52
|
}
|
|
49
53
|
return content;
|
|
50
54
|
});
|
|
51
|
-
}
|
|
55
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { OgImageOptions } from '
|
|
2
|
-
declare const _default: import("vue").DefineComponent<OgImageOptions<"NuxtSeo">, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").
|
|
3
|
-
props?: any;
|
|
4
|
-
}, {}>;
|
|
1
|
+
import type { OgImageOptions } from '../../../types.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<OgImageOptions<"NuxtSeo">, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OgImageOptions<"NuxtSeo">> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
3
|
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { OgImagePageScreenshotOptions } from '../../../types.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<OgImagePageScreenshotOptions, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<OgImagePageScreenshotOptions> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* @credits @arashsheyda <https://github.com/arashsheyda>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
description?: string
|
|
9
|
+
bg?: string
|
|
10
|
+
icon?: string
|
|
11
|
+
logo?: string
|
|
12
|
+
image?: string
|
|
13
|
+
username?: string
|
|
14
|
+
socials?: { name: string, icon: string }[]
|
|
15
|
+
}>(), {
|
|
16
|
+
bg: 'linear-gradient(to bottom right, #171717, #131313)',
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
class="relative h-full w-full flex items-center justify-center bg-neutral-900 text-white border-2 border-white"
|
|
23
|
+
:style="{ backgroundImage: bg }"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
v-if="image"
|
|
27
|
+
class="absolute inset-0 w-full h-full bg-center opacity-10"
|
|
28
|
+
:style="{ backgroundImage: `url(${image})` }"
|
|
29
|
+
/>
|
|
30
|
+
<div class="flex flex-col items-center text-center">
|
|
31
|
+
<h1 class="flex gap-4 text-7xl font-bold">
|
|
32
|
+
<Icon
|
|
33
|
+
v-if="icon"
|
|
34
|
+
:name="icon"
|
|
35
|
+
/>
|
|
36
|
+
{{ title }}
|
|
37
|
+
</h1>
|
|
38
|
+
<p class="text-2xl max-w-3xl">
|
|
39
|
+
{{ description }}
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<img
|
|
44
|
+
v-if="logo"
|
|
45
|
+
:src="logo"
|
|
46
|
+
class="absolute bottom-0 left-0 p-5"
|
|
47
|
+
style="height: 125px; width: 153px;"
|
|
48
|
+
>
|
|
49
|
+
<div class="absolute bottom-5 right-5 flex gap-4">
|
|
50
|
+
<div
|
|
51
|
+
v-if="username"
|
|
52
|
+
class="absolute bottom-12 right-8 font-bold"
|
|
53
|
+
>
|
|
54
|
+
{{ username }}
|
|
55
|
+
</div>
|
|
56
|
+
<Icon
|
|
57
|
+
v-for="social of socials"
|
|
58
|
+
:key="social.name"
|
|
59
|
+
:name="social.icon!"
|
|
60
|
+
class="w-7 h-7"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
/**
|
|
3
3
|
* @credits NuxtLabs <https://nuxtlabs.com/>
|
|
4
|
-
* @see https://github.com/nuxt/nuxt.com/blob/main/components/OgImage/
|
|
4
|
+
* @see https://github.com/nuxt/nuxt.com/blob/main/components/OgImage/Docs.vue
|
|
5
5
|
*/
|
|
6
6
|
import { computed } from 'vue'
|
|
7
7
|
|
|
@@ -11,7 +11,8 @@ const props = withDefaults(defineProps<{ title?: string, description?: string, h
|
|
|
11
11
|
headline: 'headline',
|
|
12
12
|
})
|
|
13
13
|
|
|
14
|
-
const title = computed(() => props.title.slice(0, 60))
|
|
14
|
+
const title = computed(() => (props.title || '').slice(0, 60))
|
|
15
|
+
const description = computed(() => (props.description || '').slice(0, 200))
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<template>
|
|
@@ -48,11 +49,11 @@ const title = computed(() => props.title.slice(0, 60))
|
|
|
48
49
|
<p v-if="headline" class="uppercase text-[24px] text-[#00DC82] mb-4 font-semibold">
|
|
49
50
|
{{ headline }}
|
|
50
51
|
</p>
|
|
51
|
-
<h1 class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white flex items-center">
|
|
52
|
+
<h1 v-if="title" class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white flex items-center">
|
|
52
53
|
<span>{{ title }}</span>
|
|
53
54
|
</h1>
|
|
54
|
-
<p class="text-[32px] text-[#E4E4E7] leading-tight">
|
|
55
|
-
{{ description
|
|
55
|
+
<p v-if="description" class="text-[32px] text-[#E4E4E7] leading-tight">
|
|
56
|
+
{{ description }}
|
|
56
57
|
</p>
|
|
57
58
|
</div>
|
|
58
59
|
<svg
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @credits Nuxt SEO <https://nuxtseo.com/>
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { computed, defineComponent, h, resolveComponent } from 'vue'
|
|
7
|
-
import { useOgImageRuntimeConfig } from '../../../utils'
|
|
8
6
|
import { useSiteConfig } from '#imports'
|
|
7
|
+
import { useOgImageRuntimeConfig } from '#nuxt-og-image-utils'
|
|
8
|
+
import { computed, defineComponent, h, resolveComponent } from 'vue'
|
|
9
9
|
|
|
10
10
|
// convert to typescript props
|
|
11
11
|
const props = withDefaults(defineProps<{
|
|
@@ -21,7 +21,7 @@ const props = withDefaults(defineProps<{
|
|
|
21
21
|
title: 'title',
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
const HexRegex = /^#([0-9a-f]{3}){1,2}$/i
|
|
24
|
+
const HexRegex = /^#(?:[0-9a-f]{3}){1,2}$/i
|
|
25
25
|
|
|
26
26
|
const runtimeConfig = useOgImageRuntimeConfig()
|
|
27
27
|
|
|
@@ -78,13 +78,13 @@ const IconComponent = runtimeConfig.hasNuxtIcon
|
|
|
78
78
|
? resolveComponent('Icon')
|
|
79
79
|
: defineComponent({
|
|
80
80
|
render() {
|
|
81
|
-
return h('div', 'missing nuxt
|
|
81
|
+
return h('div', 'missing @nuxt/icon')
|
|
82
82
|
},
|
|
83
83
|
})
|
|
84
84
|
if (typeof props.icon === 'string' && !runtimeConfig.hasNuxtIcon && process.dev) {
|
|
85
|
-
console.warn('Please install
|
|
85
|
+
console.warn('Please install `@nuxt/icon` to use icons with the fallback OG Image component.')
|
|
86
86
|
// eslint-disable-next-line no-console
|
|
87
|
-
console.log('\
|
|
87
|
+
console.log('\nnpx nuxi module add icon\n')
|
|
88
88
|
// create simple div renderer component
|
|
89
89
|
}
|
|
90
90
|
</script>
|
|
@@ -93,7 +93,7 @@ if (typeof props.icon === 'string' && !runtimeConfig.hasNuxtIcon && process.dev)
|
|
|
93
93
|
<div
|
|
94
94
|
class="w-full h-full flex justify-between relative p-[60px]"
|
|
95
95
|
:class="[
|
|
96
|
-
colorMode === 'light' ? ['bg-white', 'text-gray-900'] : ['bg-gray-900', 'text-
|
|
96
|
+
colorMode === 'light' ? ['bg-white', 'text-gray-900'] : ['bg-gray-900', 'text-white'],
|
|
97
97
|
]"
|
|
98
98
|
>
|
|
99
99
|
<div
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
/**
|
|
3
3
|
* @credits Pergel <https://nuxtlabs.com/>
|
|
4
|
-
* @see https://github.com/nuxt/nuxt.com/blob/main/components/OgImage/OgImageDocs.vue
|
|
5
4
|
*/
|
|
6
5
|
import { computed } from 'vue'
|
|
7
6
|
|
|
@@ -33,7 +32,7 @@ const title = computed(() => props.title.slice(0, 60))
|
|
|
33
32
|
|
|
34
33
|
<div class="w-[600px] pl-[100px]">
|
|
35
34
|
<p v-if="headline" class="uppercase text-[24px] text-[#FEC476] mb-4 font-semibold">
|
|
36
|
-
|
|
35
|
+
{{ headline }}
|
|
37
36
|
</p>
|
|
38
37
|
<h1 class="w-[600px] m-0 text-[75px] font-semibold mb-4 text-white flex items-center">
|
|
39
38
|
<span>{{ title }}</span>
|
|
@@ -25,10 +25,10 @@ const org = computed(() => props.title.split('/')[0])
|
|
|
25
25
|
const repo = computed(() => props.title.split('/')[1])
|
|
26
26
|
|
|
27
27
|
const stars = computed(() => {
|
|
28
|
-
return new Intl.NumberFormat('en-US', { notation: 'compact', compactDisplay: 'short' }).format(props.stars || 0)
|
|
28
|
+
return new Intl.NumberFormat('en-US', { notation: 'compact', compactDisplay: 'short' }).format(Number(props.stars || 0))
|
|
29
29
|
})
|
|
30
30
|
const downloads = computed(() => new Intl.NumberFormat('en-US', { notation: 'compact', compactDisplay: 'short' })
|
|
31
|
-
.format(props.downloads || 0),
|
|
31
|
+
.format(Number(props.downloads || 0)),
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
const description = computed(() => (props.description || '').slice(0, 200))
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DefineOgImageInput } from '
|
|
1
|
+
import type { DefineOgImageInput } from '../../types.js';
|
|
2
2
|
export declare function defineOgImage(_options?: DefineOgImageInput): void;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { useNuxtApp, useRequestEvent, useRoute } from "#imports";
|
|
1
2
|
import { defu } from "defu";
|
|
2
3
|
import { appendHeader } from "h3";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createOgImageMeta, normaliseOptions } from "../nuxt/utils.mjs";
|
|
7
|
-
import { useNuxtApp, useRequestEvent, useRoute, useRuntimeConfig } from "#imports";
|
|
4
|
+
import { createNitroRouteRuleMatcher } from "../../nitro/util/kit.js";
|
|
5
|
+
import { getOgImagePath, separateProps, useOgImageRuntimeConfig } from "../../shared.js";
|
|
6
|
+
import { createOgImageMeta, normaliseOptions } from "../utils.js";
|
|
8
7
|
export function defineOgImage(_options = {}) {
|
|
9
8
|
if (!import.meta.server)
|
|
10
9
|
return;
|
|
@@ -12,12 +11,8 @@ export function defineOgImage(_options = {}) {
|
|
|
12
11
|
const ogImageInstances = nuxtApp.ssrContext._ogImageInstances || [];
|
|
13
12
|
const route = useRoute();
|
|
14
13
|
const basePath = route.path || "/";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
const routeRules = defu({}, ..._routeRulesMatcher.matchAll(
|
|
19
|
-
withoutBase(withoutQuery(basePath), useRuntimeConfig().app.baseURL)
|
|
20
|
-
).reverse()).ogImage;
|
|
14
|
+
const routeRuleMatcher = createNitroRouteRuleMatcher();
|
|
15
|
+
const routeRules = routeRuleMatcher(basePath).ogImage;
|
|
21
16
|
if (!_options || nuxtApp.ssrContext?.event.context._nitro?.routeRules?.ogImage === false || typeof routeRules !== "undefined" && routeRules === false) {
|
|
22
17
|
ogImageInstances.forEach((e) => {
|
|
23
18
|
e.dispose();
|
|
@@ -25,14 +20,16 @@ export function defineOgImage(_options = {}) {
|
|
|
25
20
|
nuxtApp.ssrContext._ogImageInstances = void 0;
|
|
26
21
|
return;
|
|
27
22
|
}
|
|
28
|
-
const
|
|
23
|
+
const { defaults } = useOgImageRuntimeConfig();
|
|
24
|
+
const options = normaliseOptions(defu({
|
|
29
25
|
..._options
|
|
30
|
-
}
|
|
26
|
+
}, {
|
|
27
|
+
component: defaults.component
|
|
28
|
+
}));
|
|
31
29
|
if (route.query)
|
|
32
30
|
options._query = route.query;
|
|
33
|
-
const { defaults } = useOgImageRuntimeConfig();
|
|
34
31
|
const resolvedOptions = normaliseOptions(defu(separateProps(_options), separateProps(routeRules), defaults));
|
|
35
|
-
if (
|
|
32
|
+
if (resolvedOptions.url) {
|
|
36
33
|
createOgImageMeta(null, options, resolvedOptions, nuxtApp.ssrContext);
|
|
37
34
|
} else {
|
|
38
35
|
const path = getOgImagePath(basePath, resolvedOptions);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ExtractComponentProps, OgImageOptions } from '../types';
|
|
2
1
|
import type { OgImageComponents } from '#nuxt-og-image/components';
|
|
2
|
+
import type { ExtractComponentProps, OgImageOptions } from '../../types.js';
|
|
3
3
|
export declare function defineOgImageComponent<T extends keyof OgImageComponents>(component: T, props?: Partial<ExtractComponentProps<OgImageComponents[T]>>, options?: OgImageOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OgImageComponents } from '#nuxt-og-image/components';
|
|
2
|
+
import type { DefineOgImageInput, ExtractComponentProps, OgImageOptions, OgImagePageScreenshotOptions } from '../../types.js';
|
|
3
|
+
export declare function defineOgImage(_options?: DefineOgImageInput): void;
|
|
4
|
+
export declare function defineOgImageComponent<T extends keyof OgImageComponents>(component: T, props?: Partial<ExtractComponentProps<OgImageComponents[T]>>, options?: OgImageOptions): void;
|
|
5
|
+
export declare function defineOgImageScreenshot(options?: OgImagePageScreenshotOptions): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useRequestEvent, withSiteUrl } from "#imports";
|
|
2
|
+
import { defu } from "defu";
|
|
3
|
+
import { parse, stringify } from "devalue";
|
|
4
|
+
import { createRouter as createRadixRouter, toRouteMatcher } from "radix3";
|
|
5
|
+
import { parseURL, withoutBase } from "ufo";
|
|
6
|
+
import { toValue } from "vue";
|
|
7
|
+
import { createOgImageMeta, normaliseOptions } from "../../nuxt/utils.js";
|
|
8
|
+
import { isInternalRoute, separateProps } from "../../pure.js";
|
|
9
|
+
import { getOgImagePath, useOgImageRuntimeConfig } from "../../shared.js";
|
|
10
|
+
export function ogImageCanonicalUrls(nuxtApp) {
|
|
11
|
+
nuxtApp.hooks.hook("app:rendered", async (ctx) => {
|
|
12
|
+
const { ssrContext } = ctx;
|
|
13
|
+
const e = useRequestEvent();
|
|
14
|
+
const path = parseURL(e.path).pathname;
|
|
15
|
+
if (isInternalRoute(path))
|
|
16
|
+
return;
|
|
17
|
+
ssrContext?.head.use({
|
|
18
|
+
key: "nuxt-og-image:overrides-and-canonical-urls",
|
|
19
|
+
hooks: {
|
|
20
|
+
"tags:resolve": async (ctx2) => {
|
|
21
|
+
const hasPrimaryPayload = ctx2.tags.some((tag) => tag.tag === "script" && tag.props.id === "nuxt-og-image-options");
|
|
22
|
+
let overrides;
|
|
23
|
+
for (const tag of ctx2.tags) {
|
|
24
|
+
if (tag.tag === "script" && tag.props.id === "nuxt-og-image-overrides") {
|
|
25
|
+
if (hasPrimaryPayload) {
|
|
26
|
+
overrides = separateProps(parse(tag.innerHTML || "{}"));
|
|
27
|
+
delete ctx2.tags[ctx2.tags.indexOf(tag)];
|
|
28
|
+
} else {
|
|
29
|
+
tag.props.id = "nuxt-og-image-options";
|
|
30
|
+
tag.innerHTML = stringify(separateProps(parse(tag.innerHTML || "{}")));
|
|
31
|
+
tag._d = "script:id:nuxt-og-image-options";
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
ctx2.tags = ctx2.tags.filter(Boolean);
|
|
37
|
+
for (const tag of ctx2.tags) {
|
|
38
|
+
if (tag.tag === "meta" && (tag.props.property === "og:image" || ["twitter:image:src", "twitter:image"].includes(tag.props.name))) {
|
|
39
|
+
if (!tag.props.content.startsWith("https")) {
|
|
40
|
+
await nuxtApp.runWithContext(() => {
|
|
41
|
+
tag.props.content = toValue(withSiteUrl(tag.props.content, {
|
|
42
|
+
withBase: true
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
} else if (overrides && tag.tag === "script" && tag.props.id === "nuxt-og-image-options") {
|
|
47
|
+
tag.innerHTML = stringify(defu(overrides, parse(tag.innerHTML)));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export function routeRuleOgImage(nuxtApp) {
|
|
56
|
+
nuxtApp.hooks.hook("app:rendered", async (ctx) => {
|
|
57
|
+
const { ssrContext } = ctx;
|
|
58
|
+
const e = useRequestEvent();
|
|
59
|
+
const path = parseURL(e.path).pathname;
|
|
60
|
+
if (isInternalRoute(path))
|
|
61
|
+
return;
|
|
62
|
+
const _routeRulesMatcher = toRouteMatcher(
|
|
63
|
+
createRadixRouter({ routes: ssrContext?.runtimeConfig?.nitro?.routeRules })
|
|
64
|
+
);
|
|
65
|
+
let routeRules = defu({}, ..._routeRulesMatcher.matchAll(
|
|
66
|
+
withoutBase(path.split("?")[0], ssrContext?.runtimeConfig?.app.baseURL)
|
|
67
|
+
).reverse()).ogImage;
|
|
68
|
+
if (typeof routeRules === "undefined")
|
|
69
|
+
return;
|
|
70
|
+
const ogImageInstances = nuxtApp.ssrContext._ogImageInstances || [];
|
|
71
|
+
if (routeRules === false) {
|
|
72
|
+
ogImageInstances?.forEach((e2) => {
|
|
73
|
+
e2.dispose();
|
|
74
|
+
});
|
|
75
|
+
nuxtApp.ssrContext._ogImagePayload = void 0;
|
|
76
|
+
nuxtApp.ssrContext._ogImageInstances = void 0;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const { defaults } = useOgImageRuntimeConfig();
|
|
80
|
+
routeRules = normaliseOptions(defu(nuxtApp.ssrContext?.event.context._nitro?.routeRules?.ogImage, routeRules, {
|
|
81
|
+
component: defaults.component
|
|
82
|
+
}));
|
|
83
|
+
const resolvedOptions = normaliseOptions(defu(routeRules, defaults));
|
|
84
|
+
const src = getOgImagePath(ssrContext.url, resolvedOptions);
|
|
85
|
+
createOgImageMeta(src, routeRules, resolvedOptions, nuxtApp.ssrContext);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { NuxtSSRContext } from 'nuxt/app';
|
|
2
|
+
import type { DefineOgImageInput, OgImageOptions, OgImagePrebuilt } from '../types.js';
|
|
3
|
+
export declare function createOgImageMeta(src: string | null, input: OgImageOptions | OgImagePrebuilt, resolvedOptions: OgImageOptions, ssrContext: NuxtSSRContext): void;
|
|
3
4
|
export declare function normaliseOptions(_options: DefineOgImageInput): OgImageOptions | OgImagePrebuilt;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { componentNames } from "#build/nuxt-og-image/components.mjs";
|
|
2
|
+
import { unref, useServerHead } from "#imports";
|
|
3
|
+
import { resolveUnrefHeadInput } from "@unhead/vue";
|
|
1
4
|
import { defu } from "defu";
|
|
5
|
+
import { stringify } from "devalue";
|
|
2
6
|
import { withQuery } from "ufo";
|
|
3
|
-
import { getExtension, separateProps } from "../
|
|
4
|
-
import { unref, useServerHead } from "#imports";
|
|
5
|
-
import { componentNames } from "#build/nuxt-og-image/components.mjs";
|
|
7
|
+
import { getExtension, separateProps } from "../shared.js";
|
|
6
8
|
export function createOgImageMeta(src, input, resolvedOptions, ssrContext) {
|
|
7
9
|
const _input = separateProps(defu(input, ssrContext._ogImagePayload));
|
|
8
10
|
let url = src || input.url || resolvedOptions.url;
|
|
@@ -41,10 +43,11 @@ export function createOgImageMeta(src, input, resolvedOptions, ssrContext) {
|
|
|
41
43
|
type: "application/json",
|
|
42
44
|
processTemplateParams: true,
|
|
43
45
|
innerHTML: () => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const payload = resolveUnrefHeadInput(_input);
|
|
47
|
+
if (typeof payload.props.title === "undefined")
|
|
48
|
+
payload.props.title = "%s";
|
|
49
|
+
delete payload.url;
|
|
50
|
+
return stringify(payload);
|
|
48
51
|
},
|
|
49
52
|
// we want this to be last in our head
|
|
50
53
|
tagPosition: "bodyClose"
|
|
@@ -71,6 +74,8 @@ export function normaliseOptions(_options) {
|
|
|
71
74
|
break;
|
|
72
75
|
}
|
|
73
76
|
}
|
|
77
|
+
} else if (!options.component) {
|
|
78
|
+
options.component = componentNames[0]?.pascalName;
|
|
74
79
|
}
|
|
75
80
|
return options;
|
|
76
81
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { InputFontConfig, OgImageOptions, ResolvedFontConfig } from './types';
|
|
1
|
+
import type { InputFontConfig, OgImageOptions, ResolvedFontConfig } from './types.js';
|
|
2
|
+
export declare function toBase64Image(data: string | ArrayBuffer): string;
|
|
2
3
|
export declare function isInternalRoute(path: string): boolean;
|
|
3
4
|
export declare function separateProps(options: OgImageOptions | undefined, ignoreKeys?: string[]): {
|
|
4
5
|
props: Record<string, any>;
|
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import { defu } from "defu";
|
|
2
|
+
function detectBase64MimeType(data) {
|
|
3
|
+
const signatures = {
|
|
4
|
+
"R0lGODdh": "image/gif",
|
|
5
|
+
"R0lGODlh": "image/gif",
|
|
6
|
+
"iVBORw0KGgo": "image/png",
|
|
7
|
+
"/9j/": "image/jpeg",
|
|
8
|
+
"UklGR": "image/webp",
|
|
9
|
+
"AAABAA": "image/x-icon"
|
|
10
|
+
};
|
|
11
|
+
for (const s in signatures) {
|
|
12
|
+
if (data.indexOf(s) === 0)
|
|
13
|
+
return signatures[s];
|
|
14
|
+
}
|
|
15
|
+
return "image/svg+xml";
|
|
16
|
+
}
|
|
17
|
+
export function toBase64Image(data) {
|
|
18
|
+
const base64 = typeof data === "string" ? data : Buffer.from(data).toString("base64");
|
|
19
|
+
const type = detectBase64MimeType(base64);
|
|
20
|
+
return `data:${type};base64,${base64}`;
|
|
21
|
+
}
|
|
2
22
|
export function isInternalRoute(path) {
|
|
3
|
-
|
|
4
|
-
return lastSegment.includes(".") || path.startsWith("/__") || path.startsWith("@");
|
|
23
|
+
return path.startsWith("/_") || path.startsWith("@");
|
|
5
24
|
}
|
|
6
25
|
function filterIsOgImageOption(key) {
|
|
7
26
|
const keys = [
|
|
@@ -49,7 +68,7 @@ export function normaliseFontInput(fonts) {
|
|
|
49
68
|
return {
|
|
50
69
|
cacheKey: f,
|
|
51
70
|
name,
|
|
52
|
-
weight: weight ||
|
|
71
|
+
weight: weight || 400,
|
|
53
72
|
style: "normal",
|
|
54
73
|
path: void 0
|
|
55
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OgImageOptions, OgImageRuntimeConfig } from './types';
|
|
2
|
-
export * from './
|
|
1
|
+
import type { OgImageOptions, OgImageRuntimeConfig } from './types.js';
|
|
2
|
+
export * from './pure.js';
|
|
3
3
|
export declare function getOgImagePath(pagePath: string, _options?: Partial<OgImageOptions>): string;
|
|
4
4
|
export declare function useOgImageRuntimeConfig(): OgImageRuntimeConfig;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { joinURL } from "ufo";
|
|
2
|
-
import { defu } from "defu";
|
|
3
1
|
import { useRuntimeConfig } from "#imports";
|
|
4
|
-
|
|
2
|
+
import { defu } from "defu";
|
|
3
|
+
import { joinURL } from "ufo";
|
|
4
|
+
export * from "./pure.js";
|
|
5
5
|
export function getOgImagePath(pagePath, _options) {
|
|
6
|
+
const baseURL = useRuntimeConfig().app.baseURL;
|
|
6
7
|
const options = defu(_options, useOgImageRuntimeConfig().defaults);
|
|
7
|
-
return joinURL("/__og-image__
|
|
8
|
+
return joinURL("/", baseURL, `__og-image__/${import.meta.prerender ? "static" : "image"}`, pagePath, `og.${options.extension}`);
|
|
8
9
|
}
|
|
9
10
|
export function useOgImageRuntimeConfig() {
|
|
10
11
|
return useRuntimeConfig()["nuxt-og-image"];
|