@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.
Files changed (41) hide show
  1. package/.github/workflows/release.yml +4 -4
  2. package/.releaserc.json +2 -1
  3. package/client/src/components/auth/PassphrasePrompt.tsx +70 -70
  4. package/client/src/components/mesh/NodeBadge.tsx +24 -24
  5. package/client/src/components/mesh/PairingDialog.tsx +281 -281
  6. package/client/src/components/panels/FileBrowser.tsx +241 -241
  7. package/client/src/components/panels/StickyNotes.tsx +187 -187
  8. package/client/src/components/settings/Appearance.tsx +151 -151
  9. package/client/src/components/settings/MeshStatus.tsx +145 -145
  10. package/client/src/components/settings/SettingsView.tsx +57 -57
  11. package/client/src/components/setup/SetupWizard.tsx +750 -750
  12. package/client/src/components/ui/ErrorBoundary.tsx +56 -56
  13. package/client/src/router.tsx +391 -391
  14. package/client/vite.config.ts +20 -20
  15. package/package.json +1 -1
  16. package/server/src/handlers/chat.ts +194 -194
  17. package/server/src/handlers/settings.ts +109 -109
  18. package/themes/amoled.json +20 -20
  19. package/themes/ayu-light.json +9 -9
  20. package/themes/catppuccin-latte.json +9 -9
  21. package/themes/catppuccin-mocha.json +9 -9
  22. package/themes/clay-light.json +10 -10
  23. package/themes/clay.json +10 -10
  24. package/themes/dracula.json +9 -9
  25. package/themes/everforest-light.json +9 -9
  26. package/themes/everforest.json +9 -9
  27. package/themes/github-light.json +9 -9
  28. package/themes/gruvbox-dark.json +9 -9
  29. package/themes/gruvbox-light.json +9 -9
  30. package/themes/monokai.json +9 -9
  31. package/themes/nord-light.json +9 -9
  32. package/themes/nord.json +9 -9
  33. package/themes/one-dark.json +9 -9
  34. package/themes/one-light.json +9 -9
  35. package/themes/rose-pine-dawn.json +9 -9
  36. package/themes/rose-pine.json +9 -9
  37. package/themes/solarized-dark.json +9 -9
  38. package/themes/solarized-light.json +9 -9
  39. package/themes/tokyo-night-light.json +9 -9
  40. package/themes/tokyo-night.json +9 -9
  41. 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
+ }