nuxt-og-image 3.0.0-rc.3 → 3.0.0-rc.31

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 (385) hide show
  1. package/README.md +4 -4
  2. package/dist/client/200.html +228 -15
  3. package/dist/client/404.html +228 -15
  4. package/dist/client/_nuxt/IconCSS.V7-3N1ew.js +1 -0
  5. package/dist/client/_nuxt/IconCSS.avVk0m4D.css +1 -0
  6. package/dist/client/_nuxt/abap.bJqzlTLD.js +816 -0
  7. package/dist/client/_nuxt/actionscript-3.NUzLYz6e.js +1 -0
  8. package/dist/client/_nuxt/ada.HSb8VHJ5.js +1 -0
  9. package/dist/client/_nuxt/andromeeda.TE0Toi4a.js +1 -0
  10. package/dist/client/_nuxt/angular-html.ulaXK71i.js +16 -0
  11. package/dist/client/_nuxt/angular-ts.CpB8xVpe.js +666 -0
  12. package/dist/client/_nuxt/apache.TpqIaH_y.js +1 -0
  13. package/dist/client/_nuxt/apex.rLr5RF8N.js +274 -0
  14. package/dist/client/_nuxt/apl.XB4V8Q_3.js +87 -0
  15. package/dist/client/_nuxt/applescript.uEUaUzem.js +38 -0
  16. package/dist/client/_nuxt/ara.yxVemEif.js +21 -0
  17. package/dist/client/_nuxt/asm.N3zWSyW8.js +1 -0
  18. package/dist/client/_nuxt/astro.5Up4Y-tq.js +1 -0
  19. package/dist/client/_nuxt/aurora-x.23vffHpO.js +1 -0
  20. package/dist/client/_nuxt/awk.tQAliBPt.js +1 -0
  21. package/dist/client/_nuxt/ayu-dark.09-XTo9D.js +1 -0
  22. package/dist/client/_nuxt/ballerina.j08zL6tL.js +62 -0
  23. package/dist/client/_nuxt/bat.4hprCtpO.js +1 -0
  24. package/dist/client/_nuxt/beancount.B4bgLeBI.js +1 -0
  25. package/dist/client/_nuxt/berry.99Qqo7Pl.js +1 -0
  26. package/dist/client/_nuxt/bibtex.PUS4KD1G.js +1 -0
  27. package/dist/client/_nuxt/bicep.U1vZFTkg.js +1 -0
  28. package/dist/client/_nuxt/blade.dLd1FX1V.js +831 -0
  29. package/dist/client/_nuxt/builds/latest.json +1 -1
  30. package/dist/client/_nuxt/builds/meta/e8c2abb1-c2da-455e-a7e8-26f4f28b10f9.json +1 -0
  31. package/dist/client/_nuxt/c.1HqcaTLZ.js +81 -0
  32. package/dist/client/_nuxt/cadence.wPBjDAPG.js +1 -0
  33. package/dist/client/_nuxt/catppuccin-frappe.3zzElYQH.js +1 -0
  34. package/dist/client/_nuxt/catppuccin-latte.7_seQpm6.js +1 -0
  35. package/dist/client/_nuxt/catppuccin-macchiato.xyLZ1Mzm.js +1 -0
  36. package/dist/client/_nuxt/catppuccin-mocha.sKQhYBeR.js +1 -0
  37. package/dist/client/_nuxt/clarity.9V3ikNUm.js +1 -0
  38. package/dist/client/_nuxt/clojure.m464_LIc.js +1 -0
  39. package/dist/client/_nuxt/cmake.YiKLaZ9A.js +1 -0
  40. package/dist/client/_nuxt/cobol.yHzQax91.js +1 -0
  41. package/dist/client/_nuxt/codeql.i7fhVOvX.js +1 -0
  42. package/dist/client/_nuxt/coffee.UjKhX0iS.js +100 -0
  43. package/dist/client/_nuxt/cpp.UIU91NPT.js +186 -0
  44. package/dist/client/_nuxt/crystal.ePodXjZr.js +25 -0
  45. package/dist/client/_nuxt/csharp.xHVQI8QI.js +756 -0
  46. package/dist/client/_nuxt/css.tuEqSfZX.js +505 -0
  47. package/dist/client/_nuxt/csv.REIP-dDb.js +1 -0
  48. package/dist/client/_nuxt/cue.ts9p4IYJ.js +1 -0
  49. package/dist/client/_nuxt/cypher.y2dXjvht.js +1 -0
  50. package/dist/client/_nuxt/d.91KOtcJM.js +1 -0
  51. package/dist/client/_nuxt/dark-plus.kgh98KCl.js +1 -0
  52. package/dist/client/_nuxt/dart.ATU8nP6d.js +1 -0
  53. package/dist/client/_nuxt/dax.M4oDHFBw.js +29 -0
  54. package/dist/client/_nuxt/diff.-l9-nN5b.js +1 -0
  55. package/dist/client/_nuxt/docker.FKXxym4E.js +1 -0
  56. package/dist/client/_nuxt/dracula-soft.E92bUq8i.js +1 -0
  57. package/dist/client/_nuxt/dracula.mNVTF5-9.js +1 -0
  58. package/dist/client/_nuxt/dream-maker.5lPMrnJr.js +52 -0
  59. package/dist/client/_nuxt/elixir.dYoE9A9d.js +17 -0
  60. package/dist/client/_nuxt/elm.AR6G1sGv.js +1 -0
  61. package/dist/client/_nuxt/entry.DjkITzvC.css +1 -0
  62. package/dist/client/_nuxt/entry.LuO6Nylf.js +134 -0
  63. package/dist/client/_nuxt/erb.vCu37omy.js +1 -0
  64. package/dist/client/_nuxt/erlang._Br9gip-.js +1 -0
  65. package/dist/client/_nuxt/{error-404.b7c0506a.js → error-404.DE_aZn4X.js} +1 -1
  66. package/dist/client/_nuxt/error-404.DkXpI38i.css +1 -0
  67. package/dist/client/_nuxt/{error-500.c45b2f29.js → error-500.4nIEY5y_.js} +1 -1
  68. package/dist/client/_nuxt/fish.k6NZEVUm.js +5 -0
  69. package/dist/client/_nuxt/fortran-fixed-form.5oVt_150.js +1 -0
  70. package/dist/client/_nuxt/fortran-free-form.l6j6vfmD.js +1 -0
  71. package/dist/client/_nuxt/fsharp.5TASvPJ1.js +1 -0
  72. package/dist/client/_nuxt/gdresource.7GKJFf55.js +1 -0
  73. package/dist/client/_nuxt/gdscript.E1_SGClP.js +44 -0
  74. package/dist/client/_nuxt/gdshader.6pjKCTQy.js +1 -0
  75. package/dist/client/_nuxt/gherkin.hgsyILVZ.js +1 -0
  76. package/dist/client/_nuxt/git-commit.RtAxFnK2.js +1 -0
  77. package/dist/client/_nuxt/git-rebase.-_3Z3F37.js +1 -0
  78. package/dist/client/_nuxt/github-dark-dimmed.yDYFqRVv.js +1 -0
  79. package/dist/client/_nuxt/github-dark.WrpzPehD.js +1 -0
  80. package/dist/client/_nuxt/github-light.QjB713Ax.js +1 -0
  81. package/dist/client/_nuxt/glimmer-js.8faD3vw8.js +13 -0
  82. package/dist/client/_nuxt/glimmer-ts.I8Eofu1P.js +13 -0
  83. package/dist/client/_nuxt/glsl.yLv_V-GM.js +1 -0
  84. package/dist/client/_nuxt/gnuplot.fIlAWhXw.js +266 -0
  85. package/dist/client/_nuxt/go.U2NlzxIl.js +1 -0
  86. package/dist/client/_nuxt/graphql.aYTh5yPU.js +4 -0
  87. package/dist/client/_nuxt/groovy.Z1Lrhk2B.js +37 -0
  88. package/dist/client/_nuxt/hack.9pFjhnG2.js +86 -0
  89. package/dist/client/_nuxt/haml.DYCf5dhF.js +1 -0
  90. package/dist/client/_nuxt/handlebars.Z9TIkDUw.js +1 -0
  91. package/dist/client/_nuxt/haskell.HW0BBkRd.js +559 -0
  92. package/dist/client/_nuxt/hcl.M9siRbiv.js +1 -0
  93. package/dist/client/_nuxt/hjson.fLk7JbZa.js +50 -0
  94. package/dist/client/_nuxt/hlsl.Do_j-o-7.js +1 -0
  95. package/dist/client/_nuxt/html.ZVb9jHrO.js +74 -0
  96. package/dist/client/_nuxt/http.McgS7Vpm.js +1 -0
  97. package/dist/client/_nuxt/imba.guICF3zN.js +223 -0
  98. package/dist/client/_nuxt/ini.T6bxBy5-.js +1 -0
  99. package/dist/client/_nuxt/java.tY-NU26U.js +68 -0
  100. package/dist/client/_nuxt/javascript.JMZ6uy5M.js +699 -0
  101. package/dist/client/_nuxt/jinja.H2a5aKFq.js +1 -0
  102. package/dist/client/_nuxt/jison.hEN1Pilr.js +1 -0
  103. package/dist/client/_nuxt/json.xL80yL3n.js +25 -0
  104. package/dist/client/_nuxt/json5.NRuQoh_0.js +17 -0
  105. package/dist/client/_nuxt/jsonc.Bb1R3obU.js +25 -0
  106. package/dist/client/_nuxt/jsonl.Yjg0VwMG.js +25 -0
  107. package/dist/client/_nuxt/jsonnet.WK26vH-O.js +1 -0
  108. package/dist/client/_nuxt/jssm.eioTUq4-.js +1 -0
  109. package/dist/client/_nuxt/jsx.3LZ_BoLB.js +699 -0
  110. package/dist/client/_nuxt/julia.zN5MNt1V.js +9 -0
  111. package/dist/client/_nuxt/kotlin.1iwCeGA4.js +1 -0
  112. package/dist/client/_nuxt/kusto.UpRCclYC.js +1 -0
  113. package/dist/client/_nuxt/latex.Pwsy_OsJ.js +3 -0
  114. package/dist/client/_nuxt/less.Mq8TrjER.js +159 -0
  115. package/dist/client/_nuxt/light-plus.TzXGjDsL.js +1 -0
  116. package/dist/client/_nuxt/liquid.UuwAmqmc.js +14 -0
  117. package/dist/client/_nuxt/lisp.iIZdsWzX.js +1 -0
  118. package/dist/client/_nuxt/logo.WuHqTpFy.js +1 -0
  119. package/dist/client/_nuxt/lua.OGbZEs3U.js +1 -0
  120. package/dist/client/_nuxt/make.8zIAVqFD.js +1 -0
  121. package/dist/client/_nuxt/markdown.Y8p9X7h3.js +129 -0
  122. package/dist/client/_nuxt/marko.gbQhFTQa.js +8 -0
  123. package/dist/client/_nuxt/material-theme-darker.e1lAwchJ.js +1 -0
  124. package/dist/client/_nuxt/material-theme-lighter.y77yPuAI.js +1 -0
  125. package/dist/client/_nuxt/material-theme-ocean.oIMAIpse.js +1 -0
  126. package/dist/client/_nuxt/material-theme-palenight.Z44VU5rQ.js +1 -0
  127. package/dist/client/_nuxt/material-theme.49YjOoAR.js +1 -0
  128. package/dist/client/_nuxt/matlab.LaB98_jd.js +70 -0
  129. package/dist/client/_nuxt/mdc.NowVT77H.js +76 -0
  130. package/dist/client/_nuxt/mdx.VhCSg2DJ.js +1 -0
  131. package/dist/client/_nuxt/mermaid.WuNnVULj.js +1 -0
  132. package/dist/client/_nuxt/min-dark._Ja8ZF5C.js +1 -0
  133. package/dist/client/_nuxt/min-light.N1m_6E3S.js +1 -0
  134. package/dist/client/_nuxt/mojo.zLNDSfD9.js +519 -0
  135. package/dist/client/_nuxt/monokai.WLw4Glvg.js +1 -0
  136. package/dist/client/_nuxt/narrat.KYi2rZr0.js +7 -0
  137. package/dist/client/_nuxt/nextflow.lYJjOZ_l.js +1 -0
  138. package/dist/client/_nuxt/nginx.CrBM8z2W.js +1 -0
  139. package/dist/client/_nuxt/night-owl.GWZK5Ce7.js +1 -0
  140. package/dist/client/_nuxt/nim.16czfBCm.js +1 -0
  141. package/dist/client/_nuxt/nix.z3u_V08Q.js +1 -0
  142. package/dist/client/_nuxt/nord.1NrVtx79.js +1 -0
  143. package/dist/client/_nuxt/nushell.GDk9yul-.js +1 -0
  144. package/dist/client/_nuxt/objective-c.Eci2Q5FN.js +109 -0
  145. package/dist/client/_nuxt/objective-cpp.nGsV46Zk.js +239 -0
  146. package/dist/client/_nuxt/ocaml.oQRvlYTD.js +1 -0
  147. package/dist/client/_nuxt/one-dark-pro.qlkgvdEn.js +1 -0
  148. package/dist/client/_nuxt/onig.mBJmD8D5.js +1 -0
  149. package/dist/client/_nuxt/pascal.aIRIFbih.js +1 -0
  150. package/dist/client/_nuxt/perl._x09KDDb.js +1 -0
  151. package/dist/client/_nuxt/php.2PDLwZAX.js +771 -0
  152. package/dist/client/_nuxt/plsql.vhhXsReo.js +1 -0
  153. package/dist/client/_nuxt/poimandres.oZrO-I17.js +1 -0
  154. package/dist/client/_nuxt/postcss.57yKeRpx.js +1 -0
  155. package/dist/client/_nuxt/powerquery.wBQvr9E-.js +1 -0
  156. package/dist/client/_nuxt/powershell.6Y_bsqLY.js +1 -0
  157. package/dist/client/_nuxt/prisma.fG9Ut-9i.js +1 -0
  158. package/dist/client/_nuxt/prolog.vggnm0Hd.js +1 -0
  159. package/dist/client/_nuxt/proto.yigfBmiL.js +1 -0
  160. package/dist/client/_nuxt/pug.ieZS468c.js +1 -0
  161. package/dist/client/_nuxt/puppet.NqXa_cO1.js +1 -0
  162. package/dist/client/_nuxt/purescript.NA5qsvV2.js +7 -0
  163. package/dist/client/_nuxt/python.V9Nu427R.js +518 -0
  164. package/dist/client/_nuxt/r.xMXDrvl2.js +1 -0
  165. package/dist/client/_nuxt/raku.NSWyGF40.js +1 -0
  166. package/dist/client/_nuxt/razor.wPI2afgP.js +40 -0
  167. package/dist/client/_nuxt/red.sV5NnIRC.js +1 -0
  168. package/dist/client/_nuxt/reg.Dr-lXfN9.js +1 -0
  169. package/dist/client/_nuxt/rel.vATIbX_E.js +1 -0
  170. package/dist/client/_nuxt/riscv.L73dAZEB.js +13 -0
  171. package/dist/client/_nuxt/rose-pine-dawn.qPi4euik.js +1 -0
  172. package/dist/client/_nuxt/rose-pine-moon.Im6VgKOx.js +1 -0
  173. package/dist/client/_nuxt/rose-pine._tQyNI4L.js +1 -0
  174. package/dist/client/_nuxt/rst.Nzb5IGfi.js +1 -0
  175. package/dist/client/_nuxt/ruby.oOCDDplm.js +80 -0
  176. package/dist/client/_nuxt/rust.yNm59Dur.js +1 -0
  177. package/dist/client/_nuxt/sas.fTu4QUYF.js +1 -0
  178. package/dist/client/_nuxt/sass.URKSWxt9.js +2 -0
  179. package/dist/client/_nuxt/scala.7DKpDMtV.js +5 -0
  180. package/dist/client/_nuxt/scheme.S0VUhbaV.js +136 -0
  181. package/dist/client/_nuxt/scss.9u5wOjnF.js +90 -0
  182. package/dist/client/_nuxt/shaderlab.MYTNW71C.js +1 -0
  183. package/dist/client/_nuxt/shellscript.82BvnTib.js +4 -0
  184. package/dist/client/_nuxt/shellsession.e2TODbDv.js +1 -0
  185. package/dist/client/_nuxt/slack-dark.1ZggNzwg.js +1 -0
  186. package/dist/client/_nuxt/slack-ochin.IcMt0x71.js +1 -0
  187. package/dist/client/_nuxt/smalltalk.ymyryZ3T.js +1 -0
  188. package/dist/client/_nuxt/solarized-dark.3DcwRX9o.js +1 -0
  189. package/dist/client/_nuxt/solarized-light.iUVMuJ2F.js +1 -0
  190. package/dist/client/_nuxt/solidity.rGqtk2dD.js +1 -0
  191. package/dist/client/_nuxt/sparql.b6B4dWwT.js +1 -0
  192. package/dist/client/_nuxt/splunk.OYnOZZCZ.js +1 -0
  193. package/dist/client/_nuxt/sql.KWFjTZGI.js +21 -0
  194. package/dist/client/_nuxt/ssh-config.jdYjUr9x.js +1 -0
  195. package/dist/client/_nuxt/stata.cF_ucIcM.js +3 -0
  196. package/dist/client/_nuxt/stylus.sPHLw37c.js +15 -0
  197. package/dist/client/_nuxt/svelte.j-bqdsch.js +1 -0
  198. package/dist/client/_nuxt/swift.YwiPyWKn.js +544 -0
  199. package/dist/client/_nuxt/synthwave-84.QD7ZGwpp.js +1 -0
  200. package/dist/client/_nuxt/system-verilog.gwJe9XJI.js +9 -0
  201. package/dist/client/_nuxt/tasl.IM3fg-4x.js +1 -0
  202. package/dist/client/_nuxt/tcl.h_zrCUh3.js +1 -0
  203. package/dist/client/_nuxt/tex.uNByjuDB.js +1 -0
  204. package/dist/client/_nuxt/tokyo-night.3j08uV2M.js +1 -0
  205. package/dist/client/_nuxt/toml.p_xIKQcU.js +69 -0
  206. package/dist/client/_nuxt/tsx.7LxggtAE.js +699 -0
  207. package/dist/client/_nuxt/turtle.qvOLXpiq.js +1 -0
  208. package/dist/client/_nuxt/twig.p6WenPmw.js +40 -0
  209. package/dist/client/_nuxt/typescript.HpdcmTOD.js +666 -0
  210. package/dist/client/_nuxt/v.BcVLQyAr.js +1 -0
  211. package/dist/client/_nuxt/vanilla-picker.P0dws0ou.js +8 -0
  212. package/dist/client/_nuxt/vb.nfm3ZogP.js +1 -0
  213. package/dist/client/_nuxt/verilog.32GaFvLA.js +1 -0
  214. package/dist/client/_nuxt/vhdl.BgfvI7C9.js +515 -0
  215. package/dist/client/_nuxt/viml.Ob-szSvk.js +1 -0
  216. package/dist/client/_nuxt/vitesse-black.uLlG6AUB.js +1 -0
  217. package/dist/client/_nuxt/vitesse-dark.5VceXvs6.js +1 -0
  218. package/dist/client/_nuxt/vitesse-light.HOMMxGxw.js +1 -0
  219. package/dist/client/_nuxt/vue-html.TGyjH-sv.js +1 -0
  220. package/dist/client/_nuxt/vue.AKvPdve9.js +6 -0
  221. package/dist/client/_nuxt/vyper.0ItMHLZu.js +575 -0
  222. package/dist/client/_nuxt/wasm.5qeU6UJI.js +1 -0
  223. package/dist/client/_nuxt/wenyan.gl1zQYA8.js +1 -0
  224. package/dist/client/_nuxt/wgsl.KpVp-DWl.js +1 -0
  225. package/dist/client/_nuxt/wolfram.K_QzNdW-.js +1 -0
  226. package/dist/client/_nuxt/xml.GygmfNh9.js +1 -0
  227. package/dist/client/_nuxt/xsl.TptR0G-3.js +1 -0
  228. package/dist/client/_nuxt/yaml.zytfnWoA.js +200 -0
  229. package/dist/client/_nuxt/zenscript.htRIWiQY.js +2 -0
  230. package/dist/client/_nuxt/zig.VzlkOal1.js +1 -0
  231. package/dist/client/index.html +228 -15
  232. package/dist/module.d.mts +10 -3
  233. package/dist/module.d.ts +10 -3
  234. package/dist/module.json +2 -2
  235. package/dist/module.mjs +197 -121
  236. package/dist/runtime/nitro/og-image/bindings/chromium/chrome-launcher.mjs +9 -0
  237. package/dist/runtime/nitro/og-image/bindings/chromium/on-demand.d.ts +2 -0
  238. package/dist/runtime/nitro/og-image/bindings/chromium/on-demand.mjs +36 -0
  239. package/dist/runtime/nitro/og-image/bindings/chromium/playwright.d.ts +2 -0
  240. package/dist/runtime/nitro/og-image/bindings/chromium/playwright.mjs +6 -0
  241. package/dist/runtime/nitro/og-image/bindings/css-inline/node.d.ts +8 -0
  242. package/dist/runtime/nitro/og-image/bindings/css-inline/node.mjs +7 -0
  243. package/dist/runtime/nitro/og-image/bindings/css-inline/wasm-fs.d.ts +8 -0
  244. package/dist/runtime/nitro/og-image/bindings/css-inline/wasm-fs.mjs +8 -0
  245. package/dist/runtime/nitro/og-image/bindings/css-inline/wasm.d.ts +8 -0
  246. package/dist/runtime/nitro/og-image/bindings/css-inline/wasm.mjs +8 -0
  247. package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm-fs.mjs +1 -1
  248. package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm.mjs +1 -1
  249. package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm-fs.mjs +1 -1
  250. package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm.mjs +1 -1
  251. package/dist/runtime/nitro/og-image/cache.d.ts +7 -0
  252. package/dist/runtime/{core/cache/htmlPayload.mjs → nitro/og-image/cache.mjs} +3 -0
  253. package/dist/runtime/{core/renderers → nitro/og-image}/chromium/screenshot.mjs +1 -1
  254. package/dist/runtime/nitro/og-image/context.d.ts +5 -0
  255. package/dist/runtime/nitro/og-image/context.mjs +177 -0
  256. package/dist/runtime/nitro/og-image/instances.d.ts +2 -0
  257. package/dist/runtime/nitro/og-image/instances.mjs +10 -0
  258. package/dist/runtime/{core/font/fetch.d.ts → nitro/og-image/satori/font.d.ts} +1 -1
  259. package/dist/runtime/nitro/og-image/satori/font.mjs +32 -0
  260. package/dist/runtime/{core/renderers → nitro/og-image}/satori/instances.d.ts +0 -2
  261. package/dist/runtime/{core/renderers → nitro/og-image}/satori/instances.mjs +2 -11
  262. package/dist/runtime/nitro/og-image/satori/plugins/encoding.mjs +17 -0
  263. package/dist/runtime/nitro/og-image/satori/plugins/imageSrc.mjs +82 -0
  264. package/dist/runtime/{core/renderers/satori/index.mjs → nitro/og-image/satori/renderer.mjs} +28 -15
  265. package/dist/runtime/{core/html/applyEmojis.d.ts → nitro/og-image/satori/transforms/emojis.d.ts} +3 -1
  266. package/dist/runtime/{core/html/applyEmojis.mjs → nitro/og-image/satori/transforms/emojis.mjs} +6 -2
  267. package/dist/runtime/{core/html/applyInlineCss.d.ts → nitro/og-image/satori/transforms/inlineCss.d.ts} +1 -1
  268. package/dist/runtime/nitro/og-image/satori/transforms/inlineCss.mjs +39 -0
  269. package/dist/runtime/{core/renderers → nitro/og-image}/satori/vnodes.mjs +7 -5
  270. package/dist/runtime/nitro/og-image/templates/html.d.ts +2 -0
  271. package/dist/runtime/{core/html/devIframeTemplate.mjs → nitro/og-image/templates/html.mjs} +17 -9
  272. package/dist/runtime/nitro/plugins/nuxt-content.mjs +7 -4
  273. package/dist/runtime/nitro/plugins/prerender.d.ts +1 -1
  274. package/dist/runtime/nitro/plugins/prerender.mjs +8 -16
  275. package/dist/runtime/{server/routes/__og-image__ → nitro/routes}/debug.json.d.ts +1 -5
  276. package/dist/runtime/{server/routes/__og-image__ → nitro/routes}/debug.json.mjs +1 -7
  277. package/dist/runtime/{server/routes/__og-image__/font-[name]-[weight].[extension].mjs → nitro/routes/font.mjs} +22 -3
  278. package/dist/runtime/{server/routes/__og-image__ → nitro/routes}/image.mjs +9 -12
  279. package/dist/runtime/nitro/tsconfig.json +3 -0
  280. package/dist/runtime/{cache.d.ts → nitro/util/cache.d.ts} +1 -1
  281. package/dist/runtime/nitro/util/encoding.d.ts +3 -0
  282. package/dist/runtime/nitro/util/encoding.mjs +15 -0
  283. package/dist/runtime/nitro/util/kit.d.ts +6 -0
  284. package/dist/runtime/nitro/util/kit.mjs +32 -0
  285. package/dist/runtime/{components → nuxt/components}/OgImage/OgImage.d.ts +2 -2
  286. package/dist/runtime/{components → nuxt/components}/OgImage/OgImageScreenshot.d.ts +2 -2
  287. package/dist/runtime/{components → nuxt/components}/Templates/Community/NuxtSeo.vue +2 -2
  288. package/dist/runtime/{components → nuxt/components}/Templates/Community/UnJs.vue +2 -2
  289. package/dist/runtime/{composables → nuxt/composables}/defineOgImage.d.ts +1 -1
  290. package/dist/runtime/{composables → nuxt/composables}/defineOgImage.mjs +6 -11
  291. package/dist/runtime/{composables → nuxt/composables}/defineOgImageComponent.d.ts +1 -1
  292. package/dist/runtime/{composables → nuxt/composables}/defineOgImageScreenshot.d.ts +1 -1
  293. package/dist/runtime/nuxt/composables/mock.d.ts +0 -0
  294. package/dist/runtime/nuxt/composables/mock.mjs +6 -0
  295. package/dist/runtime/nuxt/plugins/og-image-canonical-urls.server.mjs +10 -3
  296. package/dist/runtime/nuxt/plugins/route-rule-og-image.server.mjs +1 -1
  297. package/dist/runtime/nuxt/utils.d.ts +2 -1
  298. package/dist/runtime/nuxt/utils.mjs +5 -3
  299. package/dist/runtime/{utils.pure.d.ts → pure.d.ts} +3 -0
  300. package/dist/runtime/{utils.pure.mjs → pure.mjs} +19 -1
  301. package/dist/runtime/{utils.d.ts → shared.d.ts} +1 -1
  302. package/dist/runtime/{utils.mjs → shared.mjs} +1 -1
  303. package/dist/runtime/types.d.ts +9 -3
  304. package/dist/types.d.mts +2 -2
  305. package/package.json +71 -46
  306. package/dist/client/_nuxt/IconCSS.a9e1bda0.js +0 -1
  307. package/dist/client/_nuxt/IconCSS.f0b56d3e.css +0 -1
  308. package/dist/client/_nuxt/builds/meta/f6f30fc8-72d3-4090-90f8-10aeee14e041.json +0 -1
  309. package/dist/client/_nuxt/entry.a30f63d0.css +0 -1
  310. package/dist/client/_nuxt/entry.dd086114.js +0 -108
  311. package/dist/client/_nuxt/error-404.b751fa02.css +0 -1
  312. package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.23409a58.js +0 -8
  313. package/dist/runtime/core/bindings/chromium/node.mjs +0 -33
  314. package/dist/runtime/core/bindings/css-inline/node.d.ts +0 -2
  315. package/dist/runtime/core/bindings/css-inline/node.mjs +0 -2
  316. package/dist/runtime/core/cache/emojis.d.ts +0 -1
  317. package/dist/runtime/core/cache/emojis.mjs +0 -5
  318. package/dist/runtime/core/cache/fonts.d.ts +0 -3
  319. package/dist/runtime/core/cache/fonts.mjs +0 -6
  320. package/dist/runtime/core/cache/htmlPayload.d.ts +0 -5
  321. package/dist/runtime/core/cache/prerender.d.ts +0 -2
  322. package/dist/runtime/core/cache/prerender.mjs +0 -5
  323. package/dist/runtime/core/env/assets.d.ts +0 -1
  324. package/dist/runtime/core/env/assets.mjs +0 -11
  325. package/dist/runtime/core/font/fetch.mjs +0 -36
  326. package/dist/runtime/core/html/applyInlineCss.mjs +0 -32
  327. package/dist/runtime/core/html/devIframeTemplate.d.ts +0 -2
  328. package/dist/runtime/core/html/fetchIsland.d.ts +0 -3
  329. package/dist/runtime/core/html/fetchIsland.mjs +0 -17
  330. package/dist/runtime/core/options/extract.d.ts +0 -3
  331. package/dist/runtime/core/options/extract.mjs +0 -49
  332. package/dist/runtime/core/options/fetch.d.ts +0 -3
  333. package/dist/runtime/core/options/fetch.mjs +0 -32
  334. package/dist/runtime/core/renderers/satori/plugins/encoding.mjs +0 -8
  335. package/dist/runtime/core/renderers/satori/plugins/imageSrc.mjs +0 -75
  336. package/dist/runtime/core/utils/resolveRendererContext.d.ts +0 -3
  337. package/dist/runtime/core/utils/resolveRendererContext.mjs +0 -96
  338. package/dist/runtime/nitro/utils.d.ts +0 -2
  339. package/dist/runtime/nitro/utils.mjs +0 -17
  340. package/dist/runtime/server/assets/inter-latin-ext-400-normal.woff +0 -0
  341. package/dist/runtime/server/assets/inter-latin-ext-700-normal.woff +0 -0
  342. /package/dist/client/_nuxt/{error-500.69009e70.css → error-500.SLhS9LVu.css} +0 -0
  343. /package/dist/runtime/{core/bindings/chromium/node.d.ts → nitro/og-image/bindings/chromium/chrome-launcher.d.ts} +0 -0
  344. /package/dist/runtime/{core → nitro/og-image}/bindings/resvg/node.d.ts +0 -0
  345. /package/dist/runtime/{core → nitro/og-image}/bindings/resvg/node.mjs +0 -0
  346. /package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm-fs.d.ts +0 -0
  347. /package/dist/runtime/{core → nitro/og-image}/bindings/resvg/wasm.d.ts +0 -0
  348. /package/dist/runtime/{core → nitro/og-image}/bindings/satori/node.d.ts +0 -0
  349. /package/dist/runtime/{core → nitro/og-image}/bindings/satori/node.mjs +0 -0
  350. /package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm-fs.d.ts +0 -0
  351. /package/dist/runtime/{core → nitro/og-image}/bindings/satori/wasm.d.ts +0 -0
  352. /package/dist/runtime/{core → nitro/og-image}/bindings/sharp/node.d.ts +0 -0
  353. /package/dist/runtime/{core → nitro/og-image}/bindings/sharp/node.mjs +0 -0
  354. /package/dist/runtime/{core/renderers/chromium/index.d.ts → nitro/og-image/chromium/renderer.d.ts} +0 -0
  355. /package/dist/runtime/{core/renderers/chromium/index.mjs → nitro/og-image/chromium/renderer.mjs} +0 -0
  356. /package/dist/runtime/{core/renderers → nitro/og-image}/chromium/screenshot.d.ts +0 -0
  357. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/emojis.d.ts +0 -0
  358. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/emojis.mjs +0 -0
  359. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/encoding.d.ts +0 -0
  360. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/flex.d.ts +0 -0
  361. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/flex.mjs +0 -0
  362. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/imageSrc.d.ts +0 -0
  363. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/twClasses.d.ts +0 -0
  364. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/twClasses.mjs +0 -0
  365. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/unocss.d.ts +0 -0
  366. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/plugins/unocss.mjs +0 -0
  367. /package/dist/runtime/{core/renderers/satori/index.d.ts → nitro/og-image/satori/renderer.d.ts} +0 -0
  368. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/utils.d.ts +0 -0
  369. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/utils.mjs +0 -0
  370. /package/dist/runtime/{core/renderers → nitro/og-image}/satori/vnodes.d.ts +0 -0
  371. /package/dist/runtime/{server/routes/__og-image__/font-[name]-[weight].[extension].d.ts → nitro/routes/font.d.ts} +0 -0
  372. /package/dist/runtime/{server/routes/__og-image__ → nitro/routes}/image.d.ts +0 -0
  373. /package/dist/runtime/{cache.mjs → nitro/util/cache.mjs} +0 -0
  374. /package/dist/runtime/{core/utils → nitro/util}/wasm.d.ts +0 -0
  375. /package/dist/runtime/{core/utils → nitro/util}/wasm.mjs +0 -0
  376. /package/dist/runtime/{components → nuxt/components}/OgImage/OgImage.mjs +0 -0
  377. /package/dist/runtime/{components → nuxt/components}/OgImage/OgImageScreenshot.mjs +0 -0
  378. /package/dist/runtime/{components → nuxt/components}/Templates/Community/BrandedLogo.vue +0 -0
  379. /package/dist/runtime/{components → nuxt/components}/Templates/Community/Nuxt.vue +0 -0
  380. /package/dist/runtime/{components → nuxt/components}/Templates/Community/Pergel.vue +0 -0
  381. /package/dist/runtime/{components → nuxt/components}/Templates/Community/SimpleBlog.vue +0 -0
  382. /package/dist/runtime/{components → nuxt/components}/Templates/Community/Wave.vue +0 -0
  383. /package/dist/runtime/{components → nuxt/components}/Templates/Community/WithEmoji.vue +0 -0
  384. /package/dist/runtime/{composables → nuxt/composables}/defineOgImageComponent.mjs +0 -0
  385. /package/dist/runtime/{composables → nuxt/composables}/defineOgImageScreenshot.mjs +0 -0
@@ -1 +0,0 @@
1
- .spotlight[data-v-05a2b8a3]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-05a2b8a3]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media (prefers-color-scheme:light){.gradient-border[data-v-05a2b8a3]{background-color:#ffffff4d}.gradient-border[data-v-05a2b8a3]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}@media (prefers-color-scheme:dark){.gradient-border[data-v-05a2b8a3]{background-color:#1414144d}.gradient-border[data-v-05a2b8a3]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82 50%,#36e4da 75%,#0047e1)}}.gradient-border[data-v-05a2b8a3]:before{background-size:400% auto;border-radius:.5rem;bottom:0;content:"";left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;right:0;top:0;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-05a2b8a3]:hover:before{background-position:-50% 0;opacity:1}.bg-white[data-v-05a2b8a3]{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.cursor-pointer[data-v-05a2b8a3]{cursor:pointer}.flex[data-v-05a2b8a3]{display:flex}.grid[data-v-05a2b8a3]{display:grid}.place-content-center[data-v-05a2b8a3]{place-content:center}.items-center[data-v-05a2b8a3]{align-items:center}.justify-center[data-v-05a2b8a3]{justify-content:center}.font-sans[data-v-05a2b8a3]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-medium[data-v-05a2b8a3]{font-weight:500}.font-light[data-v-05a2b8a3]{font-weight:300}.text-8xl[data-v-05a2b8a3]{font-size:6rem;line-height:1}.text-xl[data-v-05a2b8a3]{font-size:1.25rem;line-height:1.75rem}.leading-tight[data-v-05a2b8a3]{line-height:1.25}.mb-8[data-v-05a2b8a3]{margin-bottom:2rem}.mb-16[data-v-05a2b8a3]{margin-bottom:4rem}.max-w-520px[data-v-05a2b8a3]{max-width:520px}.min-h-screen[data-v-05a2b8a3]{min-height:100vh}.overflow-hidden[data-v-05a2b8a3]{overflow:hidden}.px-8[data-v-05a2b8a3]{padding-left:2rem;padding-right:2rem}.py-2[data-v-05a2b8a3]{padding-bottom:.5rem;padding-top:.5rem}.px-4[data-v-05a2b8a3]{padding-left:1rem;padding-right:1rem}.fixed[data-v-05a2b8a3]{position:fixed}.left-0[data-v-05a2b8a3]{left:0}.right-0[data-v-05a2b8a3]{right:0}.text-center[data-v-05a2b8a3]{text-align:center}.text-black[data-v-05a2b8a3]{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.antialiased[data-v-05a2b8a3]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-full[data-v-05a2b8a3]{width:100%}.z-10[data-v-05a2b8a3]{z-index:10}.z-20[data-v-05a2b8a3]{z-index:20}@media (min-width:640px){.sm\:text-4xl[data-v-05a2b8a3]{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl[data-v-05a2b8a3]{font-size:1.25rem;line-height:1.75rem}.sm\:text-10xl[data-v-05a2b8a3]{font-size:10rem;line-height:1}.sm\:px-0[data-v-05a2b8a3]{padding-left:0;padding-right:0}.sm\:py-3[data-v-05a2b8a3]{padding-bottom:.75rem;padding-top:.75rem}.sm\:px-6[data-v-05a2b8a3]{padding-left:1.5rem;padding-right:1.5rem}}@media (prefers-color-scheme:dark){.dark\:bg-black[data-v-05a2b8a3]{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.dark\:text-white[data-v-05a2b8a3]{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}}
@@ -1,8 +0,0 @@
1
- /*!
2
- * vanilla-picker v2.12.2
3
- * https://vanilla-picker.js.org
4
- *
5
- * Copyright 2017-2023 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
6
- * Released under the ISC license.
7
- */var H=function(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")},O=function(){function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),t}}(),w=function(){function a(t,e){var r=[],n=!0,o=!1,l=void 0;try{for(var p=t[Symbol.iterator](),i;!(n=(i=p.next()).done)&&(r.push(i.value),!(e&&r.length===e));n=!0);}catch(s){o=!0,l=s}finally{try{!n&&p.return&&p.return()}finally{if(o)throw l}}return r}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return a(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();String.prototype.startsWith=String.prototype.startsWith||function(a){return this.indexOf(a)===0};String.prototype.padStart=String.prototype.padStart||function(a,t){for(var e=this;e.length<a;)e=t+e;return e};var P={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function R(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,e=t>0?a.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):a.toString();return e||"0"}var z=function(){function a(t,e,r,n){H(this,a);var o=this;function l(i){if(i.startsWith("hsl")){var s=i.match(/([\-\d\.e]+)/g).map(Number),c=w(s,4),u=c[0],h=c[1],g=c[2],f=c[3];f===void 0&&(f=1),u/=360,h/=100,g/=100,o.hsla=[u,h,g,f]}else if(i.startsWith("rgb")){var b=i.match(/([\-\d\.e]+)/g).map(Number),d=w(b,4),v=d[0],x=d[1],k=d[2],m=d[3];m===void 0&&(m=1),o.rgba=[v,x,k,m]}else i.startsWith("#")?o.rgba=a.hexToRgb(i):o.rgba=a.nameToRgb(i)||a.hexToRgb(i)}if(t!==void 0)if(Array.isArray(t))this.rgba=t;else if(r===void 0){var p=t&&""+t;p&&l(p.toLowerCase())}else this.rgba=[t,e,r,n===void 0?1:n]}return O(a,[{key:"printRGB",value:function(t){var e=t?this.rgba:this.rgba.slice(0,3),r=e.map(function(n,o){return R(n,o===3?3:0)});return t?"rgba("+r+")":"rgb("+r+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],r=["","%","%",""],n=t?this.hsla:this.hsla.slice(0,3),o=n.map(function(l,p){return R(l*e[p],p===3?3:1)+r[p]});return t?"hsla("+o+")":"hsl("+o+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=a.hslToRgb(this._hsla)},set:function(t){t.length===3&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=a.rgbToHsl(this._rgba)},set:function(t){t.length===3&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var t=this.rgba,e=t.map(function(r,n){return n<3?r.toString(16):Math.round(r*255).toString(16)});return"#"+e.map(function(r){return r.padStart(2,"0")}).join("")},set:function(t){this.rgba=a.hexToRgb(t)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var r=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(n){return parseInt(n,16)});return r[3]=r[3]/255,r}},{key:"nameToRgb",value:function(t){var e=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=P[e];return r===void 0?r:a.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=w(t,4),r=e[0],n=e[1],o=e[2],l=e[3];r/=255,n/=255,o/=255;var p=Math.max(r,n,o),i=Math.min(r,n,o),s=void 0,c=void 0,u=(p+i)/2;if(p===i)s=c=0;else{var h=p-i;switch(c=u>.5?h/(2-p-i):h/(p+i),p){case r:s=(n-o)/h+(n<o?6:0);break;case n:s=(o-r)/h+2;break;case o:s=(r-n)/h+4;break}s/=6}return[s,c,u,l]}},{key:"hslToRgb",value:function(t){var e=w(t,4),r=e[0],n=e[1],o=e[2],l=e[3],p=void 0,i=void 0,s=void 0;if(n===0)p=i=s=o;else{var c=function(f,b,d){return d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?f+(b-f)*6*d:d<.5?b:d<.6666666666666666?f+(b-f)*(.6666666666666666-d)*6:f},u=o<.5?o*(1+n):o+n-o*n,h=2*o-u;p=c(h,u,r+1/3),i=c(h,u,r),s=c(h,u,r-1/3)}var g=[p*255,i*255,s*255].map(Math.round);return g[3]=l,g}}]),a}(),I=function(){function a(){H(this,a),this._events=[]}return O(a,[{key:"add",value:function(t,e,r){t.addEventListener(e,r,!1),this._events.push({target:t,type:e,handler:r})}},{key:"remove",value:function(t,e,r){this._events=this._events.filter(function(n){var o=!0;return t&&t!==n.target&&(o=!1),e&&e!==n.type&&(o=!1),r&&r!==n.handler&&(o=!1),o&&a._doRemove(n.target,n.type,n.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(t){return a._doRemove(t.target,t.type,t.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(t,e,r){t.removeEventListener(e,r,!1)}}]),a}();function q(a){var t=document.createElement("div");return t.innerHTML=a,t.firstElementChild}function S(a,t,e){var r=!1;function n(i,s,c){return Math.max(s,Math.min(i,c))}function o(i,s,c){if(c&&(r=!0),!!r){i.preventDefault();var u=t.getBoundingClientRect(),h=u.width,g=u.height,f=s.clientX,b=s.clientY,d=n(f-u.left,0,h),v=n(b-u.top,0,g);e(d/h,v/g)}}function l(i,s){var c=i.buttons===void 0?i.which:i.buttons;c===1?o(i,i,s):r=!1}function p(i,s){i.touches.length===1?o(i,i.touches[0],s):r=!1}a.add(t,"mousedown",function(i){l(i,!0)}),a.add(t,"touchstart",function(i){p(i,!0)}),a.add(window,"mousemove",l),a.add(t,"touchmove",p),a.add(window,"mouseup",function(i){r=!1}),a.add(t,"touchend",function(i){r=!1}),a.add(t,"touchcancel",function(i){r=!1})}var B=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,
8
- linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,F=360,$="keydown",y="mousedown",C="focusin";function _(a,t){return(t||document).querySelector(a)}function A(a){a.preventDefault(),a.stopPropagation()}function D(a,t,e,r,n){a.add(t,$,function(o){e.indexOf(o.key)>=0&&(n&&A(o),r(o))})}var W=function(){function a(t){H(this,a),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new I,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return O(a,[{key:"setOptions",value:function(t){var e=this;if(!t)return;var r=this.settings;function n(i,s,c){for(var u in i)c&&c.indexOf(u)>=0||(s[u]=i[u])}if(t instanceof HTMLElement)r.parent=t;else{r.parent&&t.parent&&r.parent!==t.parent&&(this._events.remove(r.parent),this._popupInited=!1),n(t,r),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var o=t.color||t.colour;o&&this._setColor(o)}var l=r.parent;if(l&&r.popup&&!this._popupInited){var p=function(i){return e.openHandler(i)};this._events.add(l,"click",p),D(this._events,l,[" ","Spacebar","Enter"],p),this._popupInited=!0}else t.parent&&!r.popup&&this.show()}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===$?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,r=!1;if(!t)r=!0;else if(e===y||e===C){var n=(this.__containedEvent||0)+100;t.timeStamp>n&&(r=!0)}else A(t),r=!0;r&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==y&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if(typeof t=="string"&&(t=t.trim()),!!t){e=e||{};var r=void 0;try{r=new z(t)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var n=r.hsla;n[3]=1,r.hsla=n}this.colour=this.color=r,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){var t=this.settings.parent;if(!t)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',n=q(r);return this.domElement=n,this._domH=_(".picker_hue",n),this._domSL=_(".picker_sl",n),this._domA=_(".picker_alpha",n),this._domEdit=_(".picker_editor input",n),this._domSample=_(".picker_sample",n),this._domOkay=_(".picker_done button",n),this._domCancel=_(".picker_cancel button",n),n.classList.add("layout_"+this.settings.layout),this.settings.alpha||n.classList.add("no_alpha"),this.settings.editor||n.classList.add("no_editor"),this.settings.cancelButton||n.classList.add("no_cancel"),this._ifPopup(function(){return n.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,r=this.domElement,n=this._events;function o(i,s,c){n.add(i,s,c)}o(r,"click",function(i){return i.preventDefault()}),S(n,this._domH,function(i,s){return e._setHSLA(i)}),S(n,this._domSL,function(i,s){return e._setHSLA(null,i,1-s)}),this.settings.alpha&&S(n,this._domA,function(i,s){return e._setHSLA(null,null,null,1-s)});var l=this._domEdit;o(l,"input",function(i){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(l,"focus",function(i){var s=this;s.selectionStart===s.selectionEnd&&s.select()}),this._ifPopup(function(){var i=function(c){return t.closeHandler(c)};o(window,y,i),o(window,C,i),D(n,r,["Esc","Escape"],i);var s=function(c){t.__containedEvent=c.timeStamp};o(r,y,s),o(r,C,s),o(t._domCancel,"click",i)});var p=function(i){t._ifPopup(function(){return t.closeHandler(i)}),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",p),D(n,r,["Enter"],p)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup(function(r){getComputedStyle(t).position==="static"&&(t.style.position="relative");var n=r===!0?"popup_right":"popup_"+r;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===n?e.classList.add(o):e.classList.remove(o)}),e.classList.add(n)})}},{key:"_setHSLA",value:function(t,e,r,n,o){o=o||{};var l=this.colour,p=l.hsla;[t,e,r,n].forEach(function(i,s){(i||i===0)&&(p[s]=i)}),l.hsla=p,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(l)}},{key:"_updateUI",value:function(t){if(!this.domElement)return;t=t||{};var e=this.colour,r=e.hsla,n="hsl("+r[0]*F+", 100%, 50%)",o=e.hslString,l=e.hslaString,p=this._domH,i=this._domSL,s=this._domA,c=_(".picker_selector",p),u=_(".picker_selector",i),h=_(".picker_selector",s);function g(M,E,L){E.style.left=L*100+"%"}function f(M,E,L){E.style.top=L*100+"%"}g(p,c,r[0]),this._domSL.style.backgroundColor=this._domH.style.color=n,g(i,u,r[1]),f(i,u,1-r[2]),i.style.color=o,f(s,h,1-r[3]);var b=o,d=b.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[b,d]+")";if(this._domA.style.background=v+", "+B,!t.fromEditor){var x=this.settings.editorFormat,k=this.settings.alpha,m=void 0;switch(x){case"rgb":m=e.printRGB(k);break;case"hsl":m=e.printHSL(k);break;default:m=e.printHex(k)}this._domEdit.value=m}this._domSample.style.color=l}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var r=t?"":"none",n=e.style.display!==r;return n&&(e.style.display=r),n}}]),a}();{var T=document.createElement("style");T.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(T),W.StyleElement=T}export{W as default};
@@ -1,33 +0,0 @@
1
- import playwrightCore from "playwright-core";
2
- export async function createBrowser() {
3
- if (import.meta.dev || import.meta.env.prerender) {
4
- try {
5
- const { Launcher } = await import(String("chrome-launcher"));
6
- const chromePath = Launcher.getFirstInstallation();
7
- return await playwrightCore.chromium.launch({
8
- headless: true,
9
- executablePath: chromePath
10
- });
11
- } catch (e) {
12
- }
13
- }
14
- try {
15
- return await playwrightCore.chromium.launch({
16
- headless: true
17
- });
18
- } catch (e) {
19
- }
20
- try {
21
- const playwright = await import(String("playwright"));
22
- return await playwright.chromium.launch({
23
- headless: true
24
- });
25
- } catch (e) {
26
- if (import.meta.dev) {
27
- console.warn("Failed to load chromium instance. Ensure you have chrome installed, otherwise add the dependency: `npm add -D playwright`.");
28
- } else {
29
- console.error("Failed to load browser instance. Please open an issue with the exception: https://github.com/harlan-zw/nuxt-og-image/issues.");
30
- throw e;
31
- }
32
- }
33
- }
@@ -1,2 +0,0 @@
1
- import cssInline from 'css-inline';
2
- export default cssInline;
@@ -1,2 +0,0 @@
1
- import cssInline from "css-inline";
2
- export default cssInline;
@@ -1 +0,0 @@
1
- export declare const emojiCache: import("unstorage/dist/shared/unstorage.745f9650").a<string>;
@@ -1,5 +0,0 @@
1
- import { createStorage } from "unstorage";
2
- import lruCacheDriver from "unstorage/drivers/lru-cache";
3
- export const emojiCache = createStorage({
4
- driver: lruCacheDriver({ max: 1e3 })
5
- });
@@ -1,3 +0,0 @@
1
- import type { ResolvedFontConfig } from '../../types';
2
- export declare const fontPromises: Record<string, Promise<ResolvedFontConfig>>;
3
- export declare const fontCache: import("unstorage/dist/shared/unstorage.745f9650").a<BufferSource>;
@@ -1,6 +0,0 @@
1
- import { createStorage } from "unstorage";
2
- import lruCacheDriver from "unstorage/drivers/lru-cache";
3
- export const fontPromises = {};
4
- export const fontCache = createStorage({
5
- driver: lruCacheDriver({ max: 10 })
6
- });
@@ -1,5 +0,0 @@
1
- import type { OgImageOptions } from '../../types';
2
- export declare const htmlPayloadCache: import("unstorage/dist/shared/unstorage.745f9650").a<{
3
- expiresAt: number;
4
- value: OgImageOptions;
5
- }>;
@@ -1,2 +0,0 @@
1
- import type { OgImageOptions } from '../../types';
2
- export declare const prerenderOptionsCache: import("unstorage/dist/shared/unstorage.745f9650").a<OgImageOptions<"NuxtSeo">> | undefined;
@@ -1,5 +0,0 @@
1
- import { createStorage } from "unstorage";
2
- import lruCacheDriver from "unstorage/drivers/lru-cache";
3
- export const prerenderOptionsCache = import.meta.prerender ? createStorage({
4
- driver: lruCacheDriver({ max: 1e3 })
5
- }) : void 0;
@@ -1 +0,0 @@
1
- export declare function toBase64Image(fileName: string, data: string | ArrayBuffer): string;
@@ -1,11 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
- export function toBase64Image(fileName, data) {
3
- const base64 = typeof data === "string" ? data : Buffer.from(data).toString("base64");
4
- let type = "image/jpeg";
5
- const ext = fileName.split(".").pop();
6
- if (ext === "svg")
7
- type = "image/svg+xml";
8
- else if (ext === "png")
9
- type = "image/png";
10
- return `data:${type};base64,${base64}`;
11
- }
@@ -1,36 +0,0 @@
1
- import { useStorage } from "#internal/nitro";
2
- import { useNitroOrigin } from "#imports";
3
- import { assets } from "#internal/nitro/virtual/server-assets";
4
- export async function loadFont({ e }, font) {
5
- const { name, weight } = font;
6
- let data;
7
- if (import.meta.dev || import.meta.prerender) {
8
- if (font.key && await assets.hasItem(font.key))
9
- data = await assets.getItemRaw(font.key);
10
- }
11
- if (!data) {
12
- if (font.path) {
13
- if (import.meta.dev || import.meta.prerender) {
14
- const key = `root:public${font.path.replace("./", ":").replace("/", ":")}`;
15
- if (await useStorage().hasItem(key))
16
- data = await useStorage().getItemRaw(key);
17
- if (!data) {
18
- data = await e.$fetch(font.path, {
19
- responseType: "arrayBuffer"
20
- });
21
- }
22
- } else {
23
- data = await e.$fetch(font.path, {
24
- baseURL: useNitroOrigin(e),
25
- responseType: "arrayBuffer"
26
- });
27
- }
28
- } else {
29
- data = await e.$fetch(`/__og-image__/font/${name}/${weight}.ttf`, {
30
- responseType: "arrayBuffer"
31
- });
32
- }
33
- }
34
- font.data = data;
35
- return font;
36
- }
@@ -1,32 +0,0 @@
1
- import { useCssInline } from "../renderers/satori/instances.mjs";
2
- import { useNitroOrigin } from "#imports";
3
- import cssInline from "#nuxt-og-image/bindings/css-inline";
4
- export async function applyInlineCss({ e }, island) {
5
- let html = island.html;
6
- const componentInlineStyles = island.head.link.filter((l) => l.href.startsWith("/_nuxt/components"));
7
- const usingInlineCss = !!componentInlineStyles.length;
8
- if (!cssInline.__unenv__ && componentInlineStyles.length) {
9
- const css = island.head.style.map((s) => s.innerHTML).join("\n");
10
- const linksToCss = (await Promise.all(
11
- componentInlineStyles.map((l) => {
12
- return e.$fetch(`${l.href}&hmr=false`, {
13
- responseType: "text",
14
- baseURL: useNitroOrigin(e)
15
- }).then((res) => {
16
- return res.trim().split("\n").filter((l2) => !l2.startsWith("//")).join("\n").trim();
17
- });
18
- })
19
- )).join("\n");
20
- const cssToInline = `${linksToCss}${css}`;
21
- const cssInline2 = await useCssInline();
22
- html = cssInline2.inline(island.html, {
23
- load_remote_stylesheets: false,
24
- extra_css: cssToInline
25
- });
26
- const classes = cssToInline.match(/\.([a-zA-Z0-9-_]+)/g)?.map((c) => c.replace(".", ""));
27
- if (classes)
28
- html = html.replace(new RegExp(`class="(${classes.join("|")})"`, "g"), "");
29
- island.html = html;
30
- }
31
- return usingInlineCss;
32
- }
@@ -1,2 +0,0 @@
1
- import type { OgImageRenderEventContext } from '../../types';
2
- export declare function devIframeTemplate(ctx: OgImageRenderEventContext): Promise<string>;
@@ -1,3 +0,0 @@
1
- import type { NuxtIslandResponse } from 'nuxt/dist/core/runtime/nitro/renderer';
2
- import type { OgImageRenderEventContext } from '../../types';
3
- export declare function fetchIsland({ options, e }: OgImageRenderEventContext): Promise<NuxtIslandResponse>;
@@ -1,17 +0,0 @@
1
- import { createError } from "h3";
2
- import { hash } from "ohash";
3
- export function fetchIsland({ options, e }) {
4
- if (!options.component) {
5
- throw createError({
6
- statusCode: 500,
7
- statusMessage: `[Nuxt OG Image] Rendering an invalid component. Received options: ${JSON.stringify(options)}.`
8
- });
9
- }
10
- const hashId = hash([options.component, options]);
11
- const props = typeof options.props !== "undefined" ? options.props : options;
12
- return e.$fetch(`/__nuxt_island/${options.component}_${hashId}.json`, {
13
- params: {
14
- props: JSON.stringify(props)
15
- }
16
- });
17
- }
@@ -1,3 +0,0 @@
1
- import type { OgImageOptions } from '../../types';
2
- export declare function decodeHtml(html: string): string;
3
- export declare function extractAndNormaliseOgImageOptions(html: string): OgImageOptions | false;
@@ -1,49 +0,0 @@
1
- export function decodeHtml(html) {
2
- return html.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&cent;/g, "\xA2").replace(/&pound;/g, "\xA3").replace(/&yen;/g, "\xA5").replace(/&euro;/g, "\u20AC").replace(/&copy;/g, "\xA9").replace(/&reg;/g, "\xAE").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/").replace(/&#([0-9]+);/g, (full, int) => {
3
- return String.fromCharCode(Number.parseInt(int));
4
- });
5
- }
6
- function decodeObjectHtmlEntities(obj) {
7
- Object.entries(obj).forEach(([key, value]) => {
8
- if (typeof value === "string")
9
- obj[key] = decodeHtml(value);
10
- });
11
- return obj;
12
- }
13
- export function extractAndNormaliseOgImageOptions(html) {
14
- const htmlPayload = html.match(/<script.+id="nuxt-og-image-options"[^>]*>(.+?)<\/script>/)?.[1];
15
- if (!htmlPayload)
16
- return false;
17
- let options;
18
- try {
19
- const payload2 = JSON.parse(htmlPayload);
20
- Object.entries(payload2).forEach(([key, value]) => {
21
- if (!value)
22
- delete payload2[key];
23
- });
24
- options = payload2;
25
- } catch (e) {
26
- if (import.meta.dev)
27
- console.warn("Failed to parse #nuxt-og-image-options", e, options);
28
- }
29
- if (!options)
30
- return false;
31
- const payload = decodeObjectHtmlEntities(options);
32
- if (import.meta.dev) {
33
- const socialPreview = {};
34
- const socialMetaTags = html.match(/<meta[^>]+(property|name)="(twitter|og):([^"]+)"[^>]*>/g);
35
- if (socialMetaTags) {
36
- socialMetaTags.forEach((tag) => {
37
- const [, , type, key] = tag.match(/(property|name)="(twitter|og):([^"]+)"/);
38
- const value = tag.match(/content="([^"]+)"/)?.[1];
39
- if (!value)
40
- return;
41
- if (!socialPreview[type])
42
- socialPreview[type] = {};
43
- socialPreview[type][key] = value;
44
- });
45
- }
46
- payload.socialPreview = socialPreview;
47
- }
48
- return payload;
49
- }
@@ -1,3 +0,0 @@
1
- import { type H3Error, type H3Event } from 'h3';
2
- import type { OgImageOptions } from '../../types';
3
- export declare function fetchPathHtmlAndExtractOptions(e: H3Event, path: string, key: string): Promise<H3Error | OgImageOptions>;
@@ -1,32 +0,0 @@
1
- import { createError } from "h3";
2
- import { htmlPayloadCache } from "../cache/htmlPayload.mjs";
3
- import { extractAndNormaliseOgImageOptions } from "./extract.mjs";
4
- export async function fetchPathHtmlAndExtractOptions(e, path, key) {
5
- const cachedHtmlPayload = await htmlPayloadCache.getItem(key);
6
- if (cachedHtmlPayload && cachedHtmlPayload.expiresAt < Date.now())
7
- return cachedHtmlPayload.value;
8
- let html;
9
- try {
10
- html = await e.$fetch(path);
11
- } catch (err) {
12
- return createError({
13
- statusCode: 500,
14
- statusMessage: `[Nuxt OG Image] Failed to read the path ${path} for og-image extraction. ${err.message}.`
15
- });
16
- }
17
- if (typeof html !== "string") {
18
- return createError({
19
- statusCode: 500,
20
- statusMessage: `[Nuxt OG Image] Got invalid response from ${path} for og-image extraction.`
21
- });
22
- }
23
- const payload = extractAndNormaliseOgImageOptions(html);
24
- if (payload) {
25
- await htmlPayloadCache.setItem(key, {
26
- // 60 minutes for prerender, 10 seconds for runtime
27
- expiresAt: Date.now() + 1e3 * (import.meta.prerender ? 60 * 60 : 10),
28
- value: payload
29
- });
30
- }
31
- return payload;
32
- }
@@ -1,8 +0,0 @@
1
- import { defineSatoriTransformer } from "../utils.mjs";
2
- import { decodeHtml } from "../../../options/extract.mjs";
3
- export default defineSatoriTransformer({
4
- filter: (node) => typeof node.props?.children === "string",
5
- transform: async (node) => {
6
- node.props.children = decodeHtml(node.props.children);
7
- }
8
- });
@@ -1,75 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
- import { withBase } from "ufo";
3
- import sizeOf from "image-size";
4
- import { defineSatoriTransformer } from "../utils.mjs";
5
- import { toBase64Image } from "../../../env/assets.mjs";
6
- import { useStorage } from "#internal/nitro";
7
- import { useNitroOrigin } from "#imports";
8
- export default defineSatoriTransformer([
9
- // fix <img src="">
10
- {
11
- filter: (node) => node.type === "img",
12
- transform: async (node, { e }) => {
13
- const src = node.props?.src;
14
- const isRelative = src?.startsWith("/");
15
- if (src) {
16
- let updated = false;
17
- let dimensions;
18
- let imageBuffer;
19
- let valid = true;
20
- if (import.meta.prerender || import.meta.dev) {
21
- const key = `root:public${src.replace("./", ":").replace("/", ":")}`;
22
- if (await useStorage().hasItem(key)) {
23
- imageBuffer = await useStorage().getItemRaw(key);
24
- updated = !!imageBuffer;
25
- }
26
- }
27
- if (!import.meta.prerender && !updated) {
28
- imageBuffer = await e.$fetch(src, {
29
- baseURL: useNitroOrigin(e),
30
- responseType: "arrayBuffer"
31
- }).catch(() => {
32
- valid = false;
33
- });
34
- valid = !!imageBuffer;
35
- }
36
- if (valid) {
37
- node.props.src = toBase64Image(src, imageBuffer);
38
- try {
39
- const imageSize = sizeOf(Buffer.from(imageBuffer));
40
- dimensions = { width: imageSize.width, height: imageSize.height };
41
- } catch (e2) {
42
- }
43
- updated = true;
44
- }
45
- if (dimensions?.width && dimensions?.height) {
46
- const naturalAspectRatio = dimensions.width / dimensions.height;
47
- if (node.props.width && !node.props.height) {
48
- node.props.height = Math.round(node.props.width / naturalAspectRatio);
49
- } else if (node.props.height && !node.props.width) {
50
- node.props.width = Math.round(node.props.height * naturalAspectRatio);
51
- } else if (!node.props.width && !node.props.height) {
52
- node.props.width = dimensions.width;
53
- node.props.height = dimensions.height;
54
- }
55
- }
56
- if (!updated && isRelative) {
57
- node.props.src = `${withBase(src, `${useNitroOrigin(e)}`)}?${Date.now()}`;
58
- }
59
- }
60
- }
61
- },
62
- // fix style="background-image: url('')"
63
- {
64
- filter: (node) => node.props?.style?.backgroundImage?.includes("url("),
65
- transform: async (node, { e }) => {
66
- const backgroundImage = node.props.style.backgroundImage;
67
- if (backgroundImage) {
68
- const src = backgroundImage.replace(/^url\(['"]?/, "").replace(/['"]?\)$/, "");
69
- const isRelative = src?.startsWith("/");
70
- if (isRelative)
71
- node.props.style.backgroundImage = `url(${withBase(src, `${useNitroOrigin(e)}`)}?${Date.now()})`;
72
- }
73
- }
74
- }
75
- ]);
@@ -1,3 +0,0 @@
1
- import type { H3Error, H3Event } from 'h3';
2
- import type { OgImageRenderEventContext } from '../../types';
3
- export declare function resolveRendererContext(e: H3Event): Promise<H3Error | OgImageRenderEventContext>;
@@ -1,96 +0,0 @@
1
- import { parseURL, withQuery, withoutBase, withoutTrailingSlash } from "ufo";
2
- import { createError, getQuery } from "h3";
3
- import { defu } from "defu";
4
- import { createRouter as createRadixRouter, toRouteMatcher } from "radix3";
5
- import { fetchPathHtmlAndExtractOptions } from "../options/fetch.mjs";
6
- import { prerenderOptionsCache } from "../cache/prerender.mjs";
7
- import { useChromiumRenderer, useSatoriRenderer } from "../renderers/satori/instances.mjs";
8
- import { separateProps, useOgImageRuntimeConfig } from "../../utils.mjs";
9
- import { resolvePathCacheKey } from "../../nitro/utils.mjs";
10
- import { useNitroApp, useRuntimeConfig } from "#internal/nitro";
11
- export async function resolveRendererContext(e) {
12
- const runtimeConfig = useOgImageRuntimeConfig();
13
- const path = parseURL(e.path).pathname;
14
- const extension = path.split(".").pop();
15
- if (!extension) {
16
- return createError({
17
- statusCode: 400,
18
- statusMessage: `[Nuxt OG Image] Missing OG Image type.`
19
- });
20
- }
21
- if (!["png", "jpeg", "jpg", "svg", "html", "json"].includes(extension)) {
22
- return createError({
23
- statusCode: 400,
24
- statusMessage: `[Nuxt OG Image] Unknown OG Image type ${extension}.`
25
- });
26
- }
27
- let queryParams = { ...getQuery(e) };
28
- queryParams.props = JSON.parse(queryParams.props || "{}");
29
- queryParams = separateProps(queryParams);
30
- let basePath = withoutTrailingSlash(
31
- path.replace(`/__og-image__/image`, "").replace(`/og.${extension}`, "")
32
- );
33
- if (queryParams._query)
34
- basePath = withQuery(basePath, JSON.parse(queryParams._query));
35
- const isDebugJsonPayload = extension === "json" && runtimeConfig.debug;
36
- const key = resolvePathCacheKey(e, basePath);
37
- let options = queryParams.options;
38
- if (!options) {
39
- if (import.meta.prerender)
40
- options = await prerenderOptionsCache?.getItem(key);
41
- if (!options) {
42
- const payload = await fetchPathHtmlAndExtractOptions(e, basePath, key);
43
- if (payload instanceof Error)
44
- return payload;
45
- options = payload;
46
- }
47
- }
48
- delete queryParams.options;
49
- const _routeRulesMatcher = toRouteMatcher(
50
- createRadixRouter({ routes: useRuntimeConfig().nitro?.routeRules })
51
- );
52
- const routeRules = defu({}, ..._routeRulesMatcher.matchAll(
53
- withoutBase(basePath.split("?")[0], useRuntimeConfig().app.baseURL)
54
- ).reverse());
55
- if (typeof routeRules.ogImage === "undefined" && !options) {
56
- return createError({
57
- statusCode: 400,
58
- statusMessage: "The route is missing the Nuxt OG Image payload or route rules."
59
- });
60
- }
61
- const ogImageRouteRules = separateProps(routeRules.ogImage);
62
- options = defu(queryParams, ogImageRouteRules, options, runtimeConfig.defaults);
63
- if (!options) {
64
- return createError({
65
- statusCode: 404,
66
- statusMessage: "[Nuxt OG Image] OG Image not found."
67
- });
68
- }
69
- let renderer;
70
- switch (options.renderer) {
71
- case "satori":
72
- renderer = await useSatoriRenderer();
73
- break;
74
- case "chromium":
75
- renderer = await useChromiumRenderer();
76
- break;
77
- }
78
- if (!renderer || renderer.__unenv__) {
79
- throw createError({
80
- statusCode: 400,
81
- statusMessage: `[Nuxt OG Image] Renderer ${options.renderer} is missing.`
82
- });
83
- }
84
- const ctx = {
85
- e,
86
- key,
87
- renderer,
88
- isDebugJsonPayload,
89
- extension,
90
- basePath,
91
- options,
92
- _nitro: useNitroApp()
93
- };
94
- await ctx._nitro.hooks.callHook("nuxt-og-image:context", ctx);
95
- return ctx;
96
- }
@@ -1,2 +0,0 @@
1
- import type { H3Event } from 'h3';
2
- export declare function resolvePathCacheKey(e: H3Event, path?: string): string;
@@ -1,17 +0,0 @@
1
- import { withoutLeadingSlash, withoutTrailingSlash } from "ufo";
2
- import { hash } from "ohash";
3
- import { normalizeKey } from "unstorage";
4
- import { getQuery } from "h3";
5
- import { useSiteConfig } from "#imports";
6
- export function resolvePathCacheKey(e, path) {
7
- const siteConfig = useSiteConfig(e);
8
- const basePath = withoutTrailingSlash(withoutLeadingSlash(normalizeKey(path || e.path)));
9
- return [
10
- !basePath || basePath === "/" ? "index" : basePath,
11
- hash([
12
- basePath,
13
- siteConfig.url,
14
- hash(getQuery(e))
15
- ])
16
- ].join(":");
17
- }