@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.
@@ -2,7 +2,7 @@
2
2
  import type { ReactElement } from 'react';
3
3
  import type { ImageResponseNodeOptions, ImageResponseOptions } from './types';
4
4
  import { Readable } from 'stream';
5
- export declare class ImageResponse {
5
+ export declare class ImageResponse extends Response {
6
6
  constructor(element: ReactElement, options?: ImageResponseOptions);
7
7
  }
8
8
  /**
@@ -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) {
@@ -18790,7 +18791,7 @@ var yoga_wasm = fs.readFileSync(fileURLToPath(join(import.meta.url, "../yoga.was
18790
18791
  var resvg_wasm = fs.readFileSync(fileURLToPath(join(import.meta.url, "../resvg.wasm")));
18791
18792
  var initializedResvg = initWasm(resvg_wasm);
18792
18793
  var initializedYoga = initYoga(yoga_wasm).then((yoga2) => Bl(yoga2));
18793
- var ImageResponse = class {
18794
+ var ImageResponse = class extends Response {
18794
18795
  constructor(element, options = {}) {
18795
18796
  if (typeof Response === "undefined" || typeof ReadableStream === "undefined") {
18796
18797
  throw new Error("The `ImageResponse` API is not supported in this runtime, use the `unstable_createNodejsStream` API instead or switch to the Vercel Edge Runtime.");
@@ -18812,7 +18813,7 @@ var ImageResponse = class {
18812
18813
  controller.close();
18813
18814
  }
18814
18815
  });
18815
- return new Response(result, {
18816
+ super(result, {
18816
18817
  headers: {
18817
18818
  "content-type": "image/png",
18818
18819
  "cache-control": process.env.NODE_ENV === "development" ? "no-cache, no-store" : "public, immutable, no-transform, max-age=31536000",