@agent-scope/render 1.0.1 → 1.1.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/dist/index.d.cts CHANGED
@@ -153,6 +153,23 @@ interface RenderOptions {
153
153
  viewportHeight?: number;
154
154
  /** Timeout in milliseconds to wait for `window.__renderReady`. Default: 10_000. */
155
155
  timeoutMs?: number;
156
+ /**
157
+ * Padding (in pixels) added around the component bounding box in the screenshot.
158
+ * Gives visual breathing room and avoids pixel-tight crops.
159
+ * Default: 24.
160
+ */
161
+ screenshotPadding?: number;
162
+ /**
163
+ * Minimum screenshot width in pixels. The output PNG will be at least this wide.
164
+ * Useful so tiny components (e.g. an icon) produce a readable image.
165
+ * Default: 320.
166
+ */
167
+ minScreenshotWidth?: number;
168
+ /**
169
+ * Minimum screenshot height in pixels. The output PNG will be at least this tall.
170
+ * Default: 200.
171
+ */
172
+ minScreenshotHeight?: number;
156
173
  }
157
174
  /**
158
175
  * Named pool size presets.
package/dist/index.d.ts CHANGED
@@ -153,6 +153,23 @@ interface RenderOptions {
153
153
  viewportHeight?: number;
154
154
  /** Timeout in milliseconds to wait for `window.__renderReady`. Default: 10_000. */
155
155
  timeoutMs?: number;
156
+ /**
157
+ * Padding (in pixels) added around the component bounding box in the screenshot.
158
+ * Gives visual breathing room and avoids pixel-tight crops.
159
+ * Default: 24.
160
+ */
161
+ screenshotPadding?: number;
162
+ /**
163
+ * Minimum screenshot width in pixels. The output PNG will be at least this wide.
164
+ * Useful so tiny components (e.g. an icon) produce a readable image.
165
+ * Default: 320.
166
+ */
167
+ minScreenshotWidth?: number;
168
+ /**
169
+ * Minimum screenshot height in pixels. The output PNG will be at least this tall.
170
+ * Default: 200.
171
+ */
172
+ minScreenshotHeight?: number;
156
173
  }
157
174
  /**
158
175
  * Named pool size presets.
package/dist/index.js CHANGED
@@ -647,7 +647,7 @@ function detectHeuristicFlags(errorMessage, componentStack) {
647
647
  const flags = /* @__PURE__ */ new Set();
648
648
  const msg = errorMessage.toLowerCase();
649
649
  const stack = componentStack.toLowerCase();
650
- const combined = msg + " " + stack;
650
+ const combined = `${msg} ${stack}`;
651
651
  if (combined.includes("must be used within") || combined.includes("no provider") || combined.includes("provider") && combined.includes("context") || combined.includes("context") && combined.includes("undefined") || combined.includes("provider") && combined.includes("undefined")) {
652
652
  flags.add("MISSING_PROVIDER");
653
653
  }