@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
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Component } from "react";
|
|
2
|
-
import type { ReactNode, ErrorInfo } from "react";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
fallback?: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface State {
|
|
10
|
-
hasError: boolean;
|
|
11
|
-
error: Error | null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export class ErrorBoundary extends Component<Props, State> {
|
|
15
|
-
constructor(props: Props) {
|
|
16
|
-
super(props);
|
|
17
|
-
this.state = { hasError: false, error: null };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static getDerivedStateFromError(error: Error): State {
|
|
21
|
-
return { hasError: true, error };
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
componentDidCatch(error: Error, info: ErrorInfo) {
|
|
25
|
-
console.error("[lattice] Render error:", error, info.componentStack);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
handleReload() {
|
|
29
|
-
window.location.reload();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
render() {
|
|
33
|
-
if (this.state.hasError) {
|
|
34
|
-
if (this.props.fallback) {
|
|
35
|
-
return this.props.fallback;
|
|
36
|
-
}
|
|
37
|
-
return (
|
|
38
|
-
<div className="min-h-screen bg-base-100 flex items-center justify-center">
|
|
39
|
-
<div className="text-center max-w-[400px] p-8">
|
|
40
|
-
<h2 className="text-[20px] font-semibold text-error mb-3">Something went wrong</h2>
|
|
41
|
-
<p className="text-[14px] text-base-content/60 mb-5">
|
|
42
|
-
{this.state.error?.message || "An unexpected error occurred."}
|
|
43
|
-
</p>
|
|
44
|
-
<button
|
|
45
|
-
onClick={this.handleReload}
|
|
46
|
-
className="btn btn-primary btn-sm"
|
|
47
|
-
>
|
|
48
|
-
Reload
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
return this.props.children;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import type { ReactNode, ErrorInfo } from "react";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
fallback?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface State {
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class ErrorBoundary extends Component<Props, State> {
|
|
15
|
+
constructor(props: Props) {
|
|
16
|
+
super(props);
|
|
17
|
+
this.state = { hasError: false, error: null };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static getDerivedStateFromError(error: Error): State {
|
|
21
|
+
return { hasError: true, error };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
componentDidCatch(error: Error, info: ErrorInfo) {
|
|
25
|
+
console.error("[lattice] Render error:", error, info.componentStack);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
handleReload() {
|
|
29
|
+
window.location.reload();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
render() {
|
|
33
|
+
if (this.state.hasError) {
|
|
34
|
+
if (this.props.fallback) {
|
|
35
|
+
return this.props.fallback;
|
|
36
|
+
}
|
|
37
|
+
return (
|
|
38
|
+
<div className="min-h-screen bg-base-100 flex items-center justify-center">
|
|
39
|
+
<div className="text-center max-w-[400px] p-8">
|
|
40
|
+
<h2 className="text-[20px] font-semibold text-error mb-3">Something went wrong</h2>
|
|
41
|
+
<p className="text-[14px] text-base-content/60 mb-5">
|
|
42
|
+
{this.state.error?.message || "An unexpected error occurred."}
|
|
43
|
+
</p>
|
|
44
|
+
<button
|
|
45
|
+
onClick={this.handleReload}
|
|
46
|
+
className="btn btn-primary btn-sm"
|
|
47
|
+
>
|
|
48
|
+
Reload
|
|
49
|
+
</button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return this.props.children;
|
|
55
|
+
}
|
|
56
|
+
}
|