@limno/next 0.1.11 → 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.
- package/dist/client.js +13 -0
- package/package.json +3 -8
package/dist/client.js
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
// src/client.ts
|
|
4
4
|
import { useEffect } from "react";
|
|
5
|
+
function holdFocusInFrame() {
|
|
6
|
+
const w = window;
|
|
7
|
+
if (w.name !== "limno-frame" || w.__limnoGuard) return;
|
|
8
|
+
w.__limnoGuard = true;
|
|
9
|
+
const guard = (e) => {
|
|
10
|
+
if (!w.__limnoHoldFocus || e.relatedTarget) return;
|
|
11
|
+
e.stopImmediatePropagation();
|
|
12
|
+
};
|
|
13
|
+
window.addEventListener("blur", guard, true);
|
|
14
|
+
window.addEventListener("focusout", guard, true);
|
|
15
|
+
document.addEventListener("visibilitychange", (e) => w.__limnoHoldFocus && e.stopImmediatePropagation(), true);
|
|
16
|
+
}
|
|
17
|
+
if (process.env.NODE_ENV === "development" && typeof window !== "undefined") holdFocusInFrame();
|
|
5
18
|
function Limno() {
|
|
6
19
|
if (process.env.NODE_ENV !== "development") return null;
|
|
7
20
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limno/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Limno for Next.js: edit your running app visually and hand exact changes to your coding agent.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,7 @@
|
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
|
-
"
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/armie3/limno.git",
|
|
26
|
-
"directory": "packages/next"
|
|
27
|
-
},
|
|
28
|
-
"homepage": "https://github.com/armie3/limno#readme",
|
|
23
|
+
"homepage": "https://limno.dev",
|
|
29
24
|
"keywords": [
|
|
30
25
|
"limno",
|
|
31
26
|
"nextjs",
|
|
@@ -44,7 +39,7 @@
|
|
|
44
39
|
"build": "tsup"
|
|
45
40
|
},
|
|
46
41
|
"dependencies": {
|
|
47
|
-
"@limno/core": "0.1.
|
|
42
|
+
"@limno/core": "0.1.13"
|
|
48
43
|
},
|
|
49
44
|
"peerDependencies": {
|
|
50
45
|
"next": ">=14",
|