@insitue/sdk 0.4.0 → 0.4.2
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/capture-only.js
CHANGED
|
@@ -535,7 +535,7 @@ function toLoc(workspaceCwdRelative) {
|
|
|
535
535
|
function fromAttribute(el) {
|
|
536
536
|
let cur = el;
|
|
537
537
|
for (let i3 = 0; cur && i3 < 8; i3++, cur = cur.parentElement) {
|
|
538
|
-
const raw = cur.getAttribute("data-insitue-source");
|
|
538
|
+
const raw = cur.getAttribute("data-insitue-source") ?? cur.getAttribute("data-insitu-source");
|
|
539
539
|
if (raw) {
|
|
540
540
|
const m3 = /^(.*):(\d+):(\d+)$/.exec(raw);
|
|
541
541
|
if (m3) return { file: m3[1], line: Number(m3[2]), column: Number(m3[3]) };
|
|
@@ -2635,18 +2635,21 @@ function CaptureApp(props) {
|
|
|
2635
2635
|
const picking = phase === "picking";
|
|
2636
2636
|
const offline = isDev && companionState !== "connected";
|
|
2637
2637
|
if (isDev) {
|
|
2638
|
-
const
|
|
2639
|
-
const
|
|
2638
|
+
const containerBg = offline ? C3.surface : CLOUD.accentSolid;
|
|
2639
|
+
const containerBorder = offline ? `1px solid ${C3.line}` : "1px solid transparent";
|
|
2640
|
+
const containerShadow = offline ? C3.shadow : `0 0 0 4px rgba(91,91,240,.16),0 12px 30px rgba(60,55,200,.42)`;
|
|
2641
|
+
const innerBg = offline ? "#9a9aa4" : "#ffffff";
|
|
2642
|
+
const innerShadow = offline ? "none" : "0 1px 3px rgba(0,0,0,.20)";
|
|
2640
2643
|
return k(
|
|
2641
2644
|
"button",
|
|
2642
2645
|
{
|
|
2643
2646
|
onClick: picking ? void 0 : () => void startPick(),
|
|
2644
|
-
style: `all:unset;position:fixed;bottom:20px;right:20px;z-index:2147483000;display:flex;align-items:center;justify-content:center;width:38px;height:38px;cursor:${picking ? "default" : "pointer"};background:${
|
|
2647
|
+
style: `all:unset;position:fixed;bottom:20px;right:20px;z-index:2147483000;display:flex;align-items:center;justify-content:center;width:38px;height:38px;cursor:${picking ? "default" : "pointer"};background:${containerBg};border:${containerBorder};border-radius:50%;box-shadow:${containerShadow};transition:background .18s ease,box-shadow .18s ease`,
|
|
2645
2648
|
title: picking ? "Click an element \xB7 Esc to cancel" : offline ? "InSitue companion not running \u2014 start `claude` with /insitue:connect" : "Pick an element to talk to claude about"
|
|
2646
2649
|
},
|
|
2647
2650
|
[
|
|
2648
2651
|
k("span", {
|
|
2649
|
-
style: `width:11px;height:11px;border-radius:3px;background:${
|
|
2652
|
+
style: `width:11px;height:11px;border-radius:3px;background:${innerBg};box-shadow:${innerShadow};${picking ? "animation:ipulse 1.1s ease-in-out infinite" : ""}`
|
|
2650
2653
|
}),
|
|
2651
2654
|
picking ? k(
|
|
2652
2655
|
"style",
|
|
@@ -2917,8 +2920,8 @@ function CaptureApp(props) {
|
|
|
2917
2920
|
k("span", {}, isDev ? "InSitue Dev \xB7 pick + describe \u2192 CLI" : ""),
|
|
2918
2921
|
k(
|
|
2919
2922
|
"span",
|
|
2920
|
-
{ title: `@insitue/sdk@${"0.4.
|
|
2921
|
-
`InSitue \xB7 v${"0.4.
|
|
2923
|
+
{ title: `@insitue/sdk@${"0.4.2"}` },
|
|
2924
|
+
`InSitue \xB7 v${"0.4.2"}`
|
|
2922
2925
|
)
|
|
2923
2926
|
]
|
|
2924
2927
|
)
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mountCaptureOnly
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FP74MO33.js";
|
|
4
4
|
|
|
5
5
|
// src/InSitue.tsx
|
|
6
6
|
import { useEffect } from "react";
|
|
@@ -54,7 +54,7 @@ function InSitue({ port }) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// src/index.ts
|
|
57
|
-
var SDK_VERSION = "0.4.
|
|
57
|
+
var SDK_VERSION = "0.4.2";
|
|
58
58
|
export {
|
|
59
59
|
InSitue,
|
|
60
60
|
InSitueCapture,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insitue/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"tsup": "^8.3.5",
|
|
52
52
|
"typescript": "^5.6.3",
|
|
53
53
|
"vitest": "^3.2.4",
|
|
54
|
-
"@insitue/capture-core": "0.3.
|
|
54
|
+
"@insitue/capture-core": "0.3.1"
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|