@vercel/og 0.5.13 → 0.5.15

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.
@@ -1,5 +1,5 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { ImageResponseOptions } from './types';
3
- export declare class ImageResponse {
3
+ export declare class ImageResponse extends Response {
4
4
  constructor(element: ReactElement, options?: ImageResponseOptions);
5
5
  }
@@ -3614,7 +3614,7 @@ var $557adaaeb0c7885f$var$LineBreaker = class {
3614
3614
  };
3615
3615
  $557adaaeb0c7885f$exports = $557adaaeb0c7885f$var$LineBreaker;
3616
3616
 
3617
- // node_modules/.pnpm/satori@0.10.4/node_modules/satori/dist/index.wasm.js
3617
+ // node_modules/.pnpm/satori@0.10.6/node_modules/satori/dist/index.wasm.js
3618
3618
  var import_css_to_react_native = __toESM(require_css_to_react_native(), 1);
3619
3619
  var import_css_background_parser = __toESM(require_css_background_parser(), 1);
3620
3620
  var import_css_box_shadow = __toESM(require_css_box_shadow(), 1);
@@ -3751,7 +3751,7 @@ var parseCSSColor = (str) => {
3751
3751
  };
3752
3752
  var index_esm_default = parseCSSColor;
3753
3753
 
3754
- // node_modules/.pnpm/satori@0.10.4/node_modules/satori/dist/index.wasm.js
3754
+ // node_modules/.pnpm/satori@0.10.6/node_modules/satori/dist/index.wasm.js
3755
3755
  var import_postcss_value_parser = __toESM(require_lib(), 1);
3756
3756
  var import_css_to_react_native2 = __toESM(require_css_to_react_native(), 1);
3757
3757
  var import_escape_html = __toESM(require_escape_html(), 1);
@@ -11889,7 +11889,7 @@ var opentype = /* @__PURE__ */ Object.freeze({
11889
11889
  });
11890
11890
  var opentype_module_default = opentype;
11891
11891
 
11892
- // node_modules/.pnpm/satori@0.10.4/node_modules/satori/dist/index.wasm.js
11892
+ // node_modules/.pnpm/satori@0.10.6/node_modules/satori/dist/index.wasm.js
11893
11893
  var _l = Object.create;
11894
11894
  var Br = Object.defineProperty;
11895
11895
  var Sl = Object.getOwnPropertyDescriptor;
@@ -15103,7 +15103,8 @@ function pf(e, t, n, r) {
15103
15103
  return e === "textDecoration" && !n.includes(t.textDecorationColor) && (t.textDecorationColor = r), t;
15104
15104
  }
15105
15105
  function It(e, t) {
15106
- return typeof t == "number" ? cf.has(e) ? df.has(e) ? t : String(t) : t + "px" : t;
15106
+ let n = Number(t);
15107
+ return isNaN(n) ? t : cf.has(e) ? df.has(e) ? n : String(t) : n + "px";
15107
15108
  }
15108
15109
  function hf(e, t, n) {
15109
15110
  if (e === "lineHeight")
@@ -15481,9 +15482,9 @@ async function* Mn(e, t) {
15481
15482
  let { height: me } = Dn(H);
15482
15483
  me > X ? G = H : ie = H;
15483
15484
  }
15484
- return Dn(ie), Cr = { width: ie, height: X }, { width: ie, height: X };
15485
+ return Dn(ie), Cr = { width: ie, height: X }, { width: Math.ceil(ie), height: X };
15485
15486
  }
15486
- return Cr = { width: $, height: X }, { width: $, height: X };
15487
+ return Cr = { width: $, height: X }, { width: Math.ceil($), height: X };
15487
15488
  });
15488
15489
  let [Fl, wl] = yield, gn = "", _r = "", je = i._inheritedClipPathId, Mo = i._inheritedMaskId, { left: No, top: $o, width: bn, height: El } = de.getComputedLayout(), Sr = o.getComputedWidth() - o.getComputedPadding(n.EDGE_LEFT) - o.getComputedPadding(n.EDGE_RIGHT) - o.getComputedBorder(n.EDGE_LEFT) - o.getComputedBorder(n.EDGE_RIGHT), pt = Fl + No, ht = wl + $o, { matrix: $e, opacity: kr } = xu({ left: No, top: $o, width: bn, height: El, isInheritingTransform: a }, r), mt = "";
15489
15490
  if (r.textShadowOffset) {
@@ -18785,7 +18786,7 @@ async function render(satori, resvg, opts, defaultFonts, element) {
18785
18786
  var initializedResvg = initWasm(resvg_wasm);
18786
18787
  var initializedYoga = initYoga(yoga_wasm).then((yoga2) => Bl(yoga2));
18787
18788
  var fallbackFont = fetch(new URL("./noto-sans-v27-latin-regular.ttf", import.meta.url)).then((res) => res.arrayBuffer());
18788
- var ImageResponse = class {
18789
+ var ImageResponse = class extends Response {
18789
18790
  constructor(element, options = {}) {
18790
18791
  const result = new ReadableStream({
18791
18792
  async start(controller) {
@@ -18805,7 +18806,7 @@ var ImageResponse = class {
18805
18806
  controller.close();
18806
18807
  }
18807
18808
  });
18808
- return new Response(result, {
18809
+ super(result, {
18809
18810
  headers: {
18810
18811
  "content-type": "image/png",
18811
18812
  "cache-control": process.env.NODE_ENV === "development" ? "no-cache, no-store" : "public, immutable, no-transform, max-age=31536000",