@insitue/sdk 0.3.1 → 0.3.3
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
|
@@ -2572,26 +2572,13 @@ function CaptureApp(props) {
|
|
|
2572
2572
|
}, [phase]);
|
|
2573
2573
|
y2(() => {
|
|
2574
2574
|
const onKey = (ev) => {
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
const isMeta = ev.metaKey || ev.ctrlKey;
|
|
2579
|
-
if (isMeta && (ev.key === "k" || ev.key === "K") && !inHostInput) {
|
|
2580
|
-
if (phase === "idle" || phase === "compose" || phase === "sent") {
|
|
2581
|
-
ev.preventDefault();
|
|
2582
|
-
void startPick();
|
|
2583
|
-
}
|
|
2584
|
-
return;
|
|
2585
|
-
}
|
|
2586
|
-
if (ev.key === "Escape") {
|
|
2587
|
-
if (phase === "compose") {
|
|
2588
|
-
ev.preventDefault();
|
|
2589
|
-
reset();
|
|
2590
|
-
}
|
|
2575
|
+
if (ev.key === "Escape" && phase === "compose") {
|
|
2576
|
+
ev.preventDefault();
|
|
2577
|
+
reset();
|
|
2591
2578
|
}
|
|
2592
2579
|
};
|
|
2593
|
-
window.addEventListener("keydown", onKey
|
|
2594
|
-
return () => window.removeEventListener("keydown", onKey
|
|
2580
|
+
window.addEventListener("keydown", onKey);
|
|
2581
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
2595
2582
|
}, [phase]);
|
|
2596
2583
|
const startPick = async () => {
|
|
2597
2584
|
setPhase("picking");
|
|
@@ -2647,42 +2634,41 @@ function CaptureApp(props) {
|
|
|
2647
2634
|
if (phase === "idle" || phase === "picking") {
|
|
2648
2635
|
const picking = phase === "picking";
|
|
2649
2636
|
const offline = isDev && companionState !== "connected";
|
|
2637
|
+
if (isDev) {
|
|
2638
|
+
const dotColor = offline ? "#9a9aa4" : CLOUD.accentSolid;
|
|
2639
|
+
const ringColor = offline ? "rgba(154,154,164,.4)" : "rgba(87,81,230,.45)";
|
|
2640
|
+
return k(
|
|
2641
|
+
"button",
|
|
2642
|
+
{
|
|
2643
|
+
onClick: picking ? void 0 : () => void startPick(),
|
|
2644
|
+
style: `all:unset;position:fixed;bottom:20px;right:20px;z-index:2147483000;width:20px;height:20px;border-radius:5px;background:${dotColor};box-shadow:0 4px 14px ${ringColor};cursor:${picking ? "default" : "pointer"};${picking ? "animation:ipulse 1.1s ease-in-out infinite;" : ""}transition:transform .15s ease`,
|
|
2645
|
+
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
|
+
},
|
|
2647
|
+
picking ? k(
|
|
2648
|
+
"style",
|
|
2649
|
+
{},
|
|
2650
|
+
"@keyframes ipulse{0%,100%{opacity:.45}50%{opacity:1}}"
|
|
2651
|
+
) : null
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2650
2654
|
return k(
|
|
2651
2655
|
"button",
|
|
2652
2656
|
{
|
|
2653
2657
|
onClick: picking ? void 0 : () => void startPick(),
|
|
2654
2658
|
style: `all:unset;position:fixed;bottom:20px;right:20px;z-index:2147483000;display:flex;align-items:center;gap:9px;cursor:${picking ? "default" : "pointer"};padding:11px 16px;font:600 13.5px/1 ${C3.sans};color:${C3.ink};background:${C3.surface};border:1px solid ${C3.line};border-radius:999px;box-shadow:${C3.shadow};letter-spacing:-.01em`,
|
|
2655
|
-
title:
|
|
2659
|
+
title: "Report a problem"
|
|
2656
2660
|
},
|
|
2657
2661
|
picking ? [
|
|
2658
2662
|
k("span", {
|
|
2659
2663
|
style: `width:9px;height:9px;border-radius:50%;background:${C3.accentSolid};animation:ipulse 1.1s ease-in-out infinite`
|
|
2660
2664
|
}),
|
|
2661
|
-
k("span", { style: `color:${C3.sub}` },
|
|
2665
|
+
k("span", { style: `color:${C3.sub}` }, "Click the broken element"),
|
|
2662
2666
|
k("span", { style: `color:${C3.faint}` }, "\xB7 Esc to cancel"),
|
|
2663
2667
|
k(
|
|
2664
2668
|
"style",
|
|
2665
2669
|
{},
|
|
2666
2670
|
"@keyframes ipulse{0%,100%{opacity:.35}50%{opacity:1}}"
|
|
2667
2671
|
)
|
|
2668
|
-
] : isDev ? [
|
|
2669
|
-
k("span", {
|
|
2670
|
-
style: `width:9px;height:9px;border-radius:50%;background:${offline ? "#9a9aa4" : "#5fd190"};box-shadow:${offline ? "none" : "0 0 6px #5fd190"}`
|
|
2671
|
-
}),
|
|
2672
|
-
k("span", {}, "InSitue Dev"),
|
|
2673
|
-
k(
|
|
2674
|
-
"span",
|
|
2675
|
-
{ style: `color:${C3.faint};font-family:${C3.mono};font-size:11px` },
|
|
2676
|
-
offline ? "offline" : "\u2192 claude"
|
|
2677
|
-
),
|
|
2678
|
-
k(
|
|
2679
|
-
"span",
|
|
2680
|
-
{
|
|
2681
|
-
style: `color:${C3.faint};font-family:${C3.mono};font-size:10.5px;padding:1px 5px;border:1px solid ${C3.line};border-radius:4px;background:${C3.surface2}`,
|
|
2682
|
-
title: "Press to pick an element"
|
|
2683
|
-
},
|
|
2684
|
-
"\u2318K"
|
|
2685
|
-
)
|
|
2686
2672
|
] : [dot, "Report a problem"]
|
|
2687
2673
|
);
|
|
2688
2674
|
}
|
|
@@ -2926,8 +2912,8 @@ function CaptureApp(props) {
|
|
|
2926
2912
|
k("span", {}, isDev ? "InSitue Dev \xB7 pick + describe \u2192 CLI" : ""),
|
|
2927
2913
|
k(
|
|
2928
2914
|
"span",
|
|
2929
|
-
{ title: `@insitue/sdk@${"0.3.
|
|
2930
|
-
`InSitue \xB7 v${"0.3.
|
|
2915
|
+
{ title: `@insitue/sdk@${"0.3.3"}` },
|
|
2916
|
+
`InSitue \xB7 v${"0.3.3"}`
|
|
2931
2917
|
)
|
|
2932
2918
|
]
|
|
2933
2919
|
)
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mountCaptureOnly
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4NBN3ZZC.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.3.
|
|
57
|
+
var SDK_VERSION = "0.3.3";
|
|
58
58
|
export {
|
|
59
59
|
InSitue,
|
|
60
60
|
InSitueCapture,
|
package/package.json
CHANGED