@cryptiklemur/lattice 0.0.0 → 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/.github/workflows/release.yml +4 -4
- package/.releaserc.json +2 -1
- package/client/src/components/auth/PassphrasePrompt.tsx +70 -70
- package/client/src/components/mesh/NodeBadge.tsx +24 -24
- package/client/src/components/mesh/PairingDialog.tsx +281 -281
- package/client/src/components/panels/FileBrowser.tsx +241 -241
- package/client/src/components/panels/StickyNotes.tsx +187 -187
- package/client/src/components/settings/Appearance.tsx +151 -151
- package/client/src/components/settings/MeshStatus.tsx +145 -145
- package/client/src/components/settings/SettingsView.tsx +57 -57
- package/client/src/components/setup/SetupWizard.tsx +750 -750
- package/client/src/components/ui/ErrorBoundary.tsx +56 -56
- package/client/src/router.tsx +391 -391
- package/client/vite.config.ts +20 -20
- package/package.json +1 -1
- package/server/src/handlers/chat.ts +194 -194
- package/server/src/handlers/settings.ts +109 -109
- package/themes/amoled.json +20 -20
- package/themes/ayu-light.json +9 -9
- package/themes/catppuccin-latte.json +9 -9
- package/themes/catppuccin-mocha.json +9 -9
- package/themes/clay-light.json +10 -10
- package/themes/clay.json +10 -10
- package/themes/dracula.json +9 -9
- package/themes/everforest-light.json +9 -9
- package/themes/everforest.json +9 -9
- package/themes/github-light.json +9 -9
- package/themes/gruvbox-dark.json +9 -9
- package/themes/gruvbox-light.json +9 -9
- package/themes/monokai.json +9 -9
- package/themes/nord-light.json +9 -9
- package/themes/nord.json +9 -9
- package/themes/one-dark.json +9 -9
- package/themes/one-light.json +9 -9
- package/themes/rose-pine-dawn.json +9 -9
- package/themes/rose-pine.json +9 -9
- package/themes/solarized-dark.json +9 -9
- package/themes/solarized-light.json +9 -9
- package/themes/tokyo-night-light.json +9 -9
- package/themes/tokyo-night.json +9 -9
- package/.serena/project.yml +0 -138
|
@@ -15,9 +15,10 @@ jobs:
|
|
|
15
15
|
release:
|
|
16
16
|
name: Release
|
|
17
17
|
runs-on: ubuntu-latest
|
|
18
|
+
environment: npm
|
|
18
19
|
steps:
|
|
19
20
|
- name: Checkout
|
|
20
|
-
uses: actions/checkout@
|
|
21
|
+
uses: actions/checkout@v5
|
|
21
22
|
with:
|
|
22
23
|
fetch-depth: 0
|
|
23
24
|
|
|
@@ -27,10 +28,9 @@ jobs:
|
|
|
27
28
|
bun-version: latest
|
|
28
29
|
|
|
29
30
|
- name: Setup Node.js
|
|
30
|
-
uses: actions/setup-node@
|
|
31
|
+
uses: actions/setup-node@v5
|
|
31
32
|
with:
|
|
32
|
-
node-version:
|
|
33
|
-
registry-url: https://registry.npmjs.org
|
|
33
|
+
node-version: 24
|
|
34
34
|
|
|
35
35
|
- name: Install dependencies
|
|
36
36
|
run: bun install --frozen-lockfile
|
package/.releaserc.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
|
|
3
|
-
export function PassphrasePrompt() {
|
|
4
|
-
var [passphrase, setPassphrase] = useState("");
|
|
5
|
-
var [error, setError] = useState("");
|
|
6
|
-
var [loading, setLoading] = useState(false);
|
|
7
|
-
|
|
8
|
-
function handleSubmit(e: React.FormEvent) {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
setError("");
|
|
11
|
-
setLoading(true);
|
|
12
|
-
|
|
13
|
-
fetch("/auth", {
|
|
14
|
-
method: "POST",
|
|
15
|
-
headers: { "Content-Type": "application/json" },
|
|
16
|
-
body: JSON.stringify({ passphrase }),
|
|
17
|
-
})
|
|
18
|
-
.then(function (res) {
|
|
19
|
-
if (res.ok) {
|
|
20
|
-
window.location.reload();
|
|
21
|
-
} else {
|
|
22
|
-
setError("Invalid passphrase.");
|
|
23
|
-
setLoading(false);
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
.catch(function () {
|
|
27
|
-
setError("Connection error.");
|
|
28
|
-
setLoading(false);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div className="min-h-screen bg-base-100 flex items-center justify-center">
|
|
34
|
-
<div className="card bg-base-200 border border-base-300 w-full max-w-[340px] shadow-xl">
|
|
35
|
-
<div className="card-body p-10">
|
|
36
|
-
<h1 className="text-[15px] font-bold tracking-[0.12em] uppercase text-base-content/60 mb-7">
|
|
37
|
-
Lattice
|
|
38
|
-
</h1>
|
|
39
|
-
<form onSubmit={handleSubmit} className="flex flex-col gap-4">
|
|
40
|
-
<fieldset className="fieldset">
|
|
41
|
-
<legend className="fieldset-legend text-[11px] uppercase tracking-[0.1em] text-base-content/40">
|
|
42
|
-
Passphrase
|
|
43
|
-
</legend>
|
|
44
|
-
<input
|
|
45
|
-
id="passphrase"
|
|
46
|
-
type="password"
|
|
47
|
-
value={passphrase}
|
|
48
|
-
onChange={function (e) { setPassphrase(e.target.value); }}
|
|
49
|
-
autoFocus
|
|
50
|
-
autoComplete="current-password"
|
|
51
|
-
disabled={loading}
|
|
52
|
-
className="input input-bordered w-full bg-base-100 text-base-content text-[14px]"
|
|
53
|
-
/>
|
|
54
|
-
</fieldset>
|
|
55
|
-
<button
|
|
56
|
-
type="submit"
|
|
57
|
-
disabled={loading}
|
|
58
|
-
className={"btn btn-primary w-full mt-1 " + (loading ? "cursor-not-allowed" : "")}
|
|
59
|
-
>
|
|
60
|
-
{loading ? "Authenticating..." : "Authenticate"}
|
|
61
|
-
</button>
|
|
62
|
-
{error && (
|
|
63
|
-
<p className="text-[12px] text-error text-center">{error}</p>
|
|
64
|
-
)}
|
|
65
|
-
</form>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
export function PassphrasePrompt() {
|
|
4
|
+
var [passphrase, setPassphrase] = useState("");
|
|
5
|
+
var [error, setError] = useState("");
|
|
6
|
+
var [loading, setLoading] = useState(false);
|
|
7
|
+
|
|
8
|
+
function handleSubmit(e: React.FormEvent) {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
setError("");
|
|
11
|
+
setLoading(true);
|
|
12
|
+
|
|
13
|
+
fetch("/auth", {
|
|
14
|
+
method: "POST",
|
|
15
|
+
headers: { "Content-Type": "application/json" },
|
|
16
|
+
body: JSON.stringify({ passphrase }),
|
|
17
|
+
})
|
|
18
|
+
.then(function (res) {
|
|
19
|
+
if (res.ok) {
|
|
20
|
+
window.location.reload();
|
|
21
|
+
} else {
|
|
22
|
+
setError("Invalid passphrase.");
|
|
23
|
+
setLoading(false);
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
.catch(function () {
|
|
27
|
+
setError("Connection error.");
|
|
28
|
+
setLoading(false);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className="min-h-screen bg-base-100 flex items-center justify-center">
|
|
34
|
+
<div className="card bg-base-200 border border-base-300 w-full max-w-[340px] shadow-xl">
|
|
35
|
+
<div className="card-body p-10">
|
|
36
|
+
<h1 className="text-[15px] font-bold tracking-[0.12em] uppercase text-base-content/60 mb-7">
|
|
37
|
+
Lattice
|
|
38
|
+
</h1>
|
|
39
|
+
<form onSubmit={handleSubmit} className="flex flex-col gap-4">
|
|
40
|
+
<fieldset className="fieldset">
|
|
41
|
+
<legend className="fieldset-legend text-[11px] uppercase tracking-[0.1em] text-base-content/40">
|
|
42
|
+
Passphrase
|
|
43
|
+
</legend>
|
|
44
|
+
<input
|
|
45
|
+
id="passphrase"
|
|
46
|
+
type="password"
|
|
47
|
+
value={passphrase}
|
|
48
|
+
onChange={function (e) { setPassphrase(e.target.value); }}
|
|
49
|
+
autoFocus
|
|
50
|
+
autoComplete="current-password"
|
|
51
|
+
disabled={loading}
|
|
52
|
+
className="input input-bordered w-full bg-base-100 text-base-content text-[14px]"
|
|
53
|
+
/>
|
|
54
|
+
</fieldset>
|
|
55
|
+
<button
|
|
56
|
+
type="submit"
|
|
57
|
+
disabled={loading}
|
|
58
|
+
className={"btn btn-primary w-full mt-1 " + (loading ? "cursor-not-allowed" : "")}
|
|
59
|
+
>
|
|
60
|
+
{loading ? "Authenticating..." : "Authenticate"}
|
|
61
|
+
</button>
|
|
62
|
+
{error && (
|
|
63
|
+
<p className="text-[12px] text-error text-center">{error}</p>
|
|
64
|
+
)}
|
|
65
|
+
</form>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type { NodeInfo } from "@lattice/shared";
|
|
2
|
-
|
|
3
|
-
interface NodeBadgeProps {
|
|
4
|
-
node: NodeInfo;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function NodeBadge(props: NodeBadgeProps) {
|
|
8
|
-
var initials = props.node.name.slice(0, 2).toUpperCase();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<span
|
|
12
|
-
title={props.node.name + (props.node.online ? " (online)" : " (offline)")}
|
|
13
|
-
className="inline-flex items-center gap-[3px] px-[5px] py-[1px] rounded-full bg-base-300 border border-base-content/15 text-[10px] font-semibold text-base-content/40 tracking-[0.03em] flex-shrink-0"
|
|
14
|
-
>
|
|
15
|
-
<span
|
|
16
|
-
className={
|
|
17
|
-
"w-[5px] h-[5px] rounded-full flex-shrink-0 inline-block " +
|
|
18
|
-
(props.node.online ? "bg-success" : "bg-base-content/30")
|
|
19
|
-
}
|
|
20
|
-
/>
|
|
21
|
-
{initials}
|
|
22
|
-
</span>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
1
|
+
import type { NodeInfo } from "@lattice/shared";
|
|
2
|
+
|
|
3
|
+
interface NodeBadgeProps {
|
|
4
|
+
node: NodeInfo;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function NodeBadge(props: NodeBadgeProps) {
|
|
8
|
+
var initials = props.node.name.slice(0, 2).toUpperCase();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<span
|
|
12
|
+
title={props.node.name + (props.node.online ? " (online)" : " (offline)")}
|
|
13
|
+
className="inline-flex items-center gap-[3px] px-[5px] py-[1px] rounded-full bg-base-300 border border-base-content/15 text-[10px] font-semibold text-base-content/40 tracking-[0.03em] flex-shrink-0"
|
|
14
|
+
>
|
|
15
|
+
<span
|
|
16
|
+
className={
|
|
17
|
+
"w-[5px] h-[5px] rounded-full flex-shrink-0 inline-block " +
|
|
18
|
+
(props.node.online ? "bg-success" : "bg-base-content/30")
|
|
19
|
+
}
|
|
20
|
+
/>
|
|
21
|
+
{initials}
|
|
22
|
+
</span>
|
|
23
|
+
);
|
|
24
|
+
}
|