@insitue/sdk 0.1.12 → 0.1.13

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,7 +1,7 @@
1
1
  import {
2
2
  mountCaptureOnly
3
- } from "./chunk-QD5ORBG3.js";
4
- import "./chunk-6QESDKMV.js";
3
+ } from "./chunk-RTIWK5P2.js";
4
+ import "./chunk-MGEIT55T.js";
5
5
  export {
6
6
  mountCaptureOnly
7
7
  };
@@ -804,7 +804,8 @@ function beginPick(mode = "element") {
804
804
 
805
805
  // src/capture-settings.ts
806
806
  var DEFAULT_SETTINGS = {
807
- alwaysPixelPerfect: false
807
+ alwaysPixelPerfect: false,
808
+ disableLayer2: false
808
809
  };
809
810
  function storageKey() {
810
811
  if (typeof location === "undefined") return "insitu:capture-settings";
@@ -2139,7 +2140,8 @@ async function buildBundle(sel) {
2139
2140
  quality = assessCaptureQuality(cropRect, r3.failedImages);
2140
2141
  }
2141
2142
  const imperfect = !layer1Result || quality != null && (quality.unembeddableImages > 0 || quality.hasVideo || quality.hasCanvas);
2142
- if (imperfect || skipLayer1) {
2143
+ const allowLayer2 = !settings.disableLayer2;
2144
+ if ((imperfect || skipLayer1) && allowLayer2) {
2143
2145
  const grab = await tryGrabViaDisplayMedia(
2144
2146
  cropRect,
2145
2147
  Math.min(dpr, 2)
@@ -11,7 +11,7 @@ import {
11
11
  setCaptureSettings,
12
12
  stopDisplayMedia,
13
13
  y
14
- } from "./chunk-6QESDKMV.js";
14
+ } from "./chunk-MGEIT55T.js";
15
15
 
16
16
  // src/capture-only.ts
17
17
  var DEFAULT_INGEST = "https://www.insitue.com/api/v1/capture";
@@ -362,8 +362,8 @@ function CaptureOnlyApp(props) {
362
362
  k("span", {}, ""),
363
363
  k(
364
364
  "span",
365
- { title: `@insitue/sdk@${"0.1.12"}` },
366
- `InSitue \xB7 v${"0.1.12"}`
365
+ { title: `@insitue/sdk@${"0.1.13"}` },
366
+ `InSitue \xB7 v${"0.1.13"}`
367
367
  )
368
368
  ]
369
369
  )
@@ -15,7 +15,7 @@ import {
15
15
  setCaptureSettings,
16
16
  stopDisplayMedia,
17
17
  y
18
- } from "./chunk-6QESDKMV.js";
18
+ } from "./chunk-MGEIT55T.js";
19
19
 
20
20
  // src/client.ts
21
21
  var CompanionClient = class {
@@ -1168,6 +1168,7 @@ ${resolved.snippet}`
1168
1168
  ]);
1169
1169
  }
1170
1170
  function mountInSitue(opts = {}) {
1171
+ setCaptureSettings({ disableLayer2: true });
1171
1172
  const host = document.createElement("div");
1172
1173
  host.id = "insitu-root";
1173
1174
  host.setAttribute("data-insitu", "");
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  mountCaptureOnly
3
- } from "./chunk-QD5ORBG3.js";
3
+ } from "./chunk-RTIWK5P2.js";
4
4
  import {
5
5
  mountInSitue
6
- } from "./chunk-BOHPIOZ6.js";
7
- import "./chunk-6QESDKMV.js";
6
+ } from "./chunk-SXX75N6T.js";
7
+ import "./chunk-MGEIT55T.js";
8
8
 
9
9
  // src/InSitue.tsx
10
10
  import { useEffect } from "react";
@@ -52,7 +52,7 @@ function InSitueCapture({
52
52
  }
53
53
 
54
54
  // src/index.ts
55
- var SDK_VERSION = "0.1.12";
55
+ var SDK_VERSION = "0.1.13";
56
56
  export {
57
57
  InSitue,
58
58
  InSitueCapture,
package/dist/overlay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mountInSitue
3
- } from "./chunk-BOHPIOZ6.js";
4
- import "./chunk-6QESDKMV.js";
3
+ } from "./chunk-SXX75N6T.js";
4
+ import "./chunk-MGEIT55T.js";
5
5
  export {
6
6
  mountInSitue
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insitue/sdk",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "InSitue capture SDK — drop one snippet into your deployed app; your users point at a bug, InSitue opens a verified pull request.",
5
5
  "license": "MIT",
6
6
  "type": "module",