@bardioc/create-bardioc-app 0.5.4 → 0.5.5

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 (39) hide show
  1. package/README.md +2 -2
  2. package/package.json +5 -5
  3. package/templates/angular/public/runtime-env.js +1 -1
  4. package/templates/angular/src/app/bardioc-bridge.ts +1 -1
  5. package/templates/angular/src/index.html +2 -2
  6. package/templates/angular/src/runtime-env.ts +1 -1
  7. package/templates/angular/src/styles.css +84 -80
  8. package/templates/angular/src/vite-env.d.ts +3 -3
  9. package/templates/manifest.json +2 -10
  10. package/templates/nextjs/app/globals.css +31 -28
  11. package/templates/nextjs/app/page.tsx +3 -3
  12. package/templates/nextjs/global.d.ts +1 -1
  13. package/templates/nextjs/next.config.ts +23 -23
  14. package/templates/nextjs/tailwind.config.ts +1 -4
  15. package/templates/preact/index.html +2 -2
  16. package/templates/preact/src/App.tsx +5 -4
  17. package/templates/preact/src/index.css +31 -28
  18. package/templates/preact/src/vite-env.d.ts +2 -2
  19. package/templates/solid/index.html +2 -2
  20. package/templates/solid/src/App.tsx +5 -4
  21. package/templates/solid/src/bardioc-sdk.tsx +18 -18
  22. package/templates/solid/src/index.css +31 -28
  23. package/templates/solid/src/vite-env.d.ts +2 -2
  24. package/templates/svelte/index.html +2 -2
  25. package/templates/svelte/src/index.css +31 -28
  26. package/templates/svelte/src/main.ts +1 -1
  27. package/templates/svelte/src/vite-env.d.ts +2 -2
  28. package/templates/vite/CLAUDE.md +5 -7
  29. package/templates/vite/index.html +2 -2
  30. package/templates/vite/package.json +2 -4
  31. package/templates/vite/src/climate/conditions-chart.tsx +6 -8
  32. package/templates/vite/src/events/live-events-view.tsx +1 -3
  33. package/templates/vite/src/i18n.tsx +7 -9
  34. package/templates/vite/src/shell/header.tsx +1 -2
  35. package/templates/vue/index.html +2 -2
  36. package/templates/vue/src/App.vue +25 -9
  37. package/templates/vue/src/bardioc-sdk.ts +11 -11
  38. package/templates/vue/src/index.css +31 -28
  39. package/templates/vue/src/vite-env.d.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  import { isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
2
- import { useSdk, useNotify } from '@bardioc/app-sdk/react';
2
+ import { useNotify, useSdk } from '@bardioc/app-sdk/react';
3
3
  import { useState } from 'preact/hooks';
4
4
 
5
5
  type ResultState =
@@ -59,14 +59,14 @@ function SdkDemo() {
59
59
 
60
60
  <div className="flex flex-wrap gap-2">
61
61
  <button
62
- className="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
62
+ className="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
63
63
  onClick={() => void runGetProfile()}
64
64
  disabled={running}
65
65
  >
66
66
  Get Profile
67
67
  </button>
68
68
  <button
69
- className="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
69
+ className="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
70
70
  onClick={handleNotify}
71
71
  disabled={running}
72
72
  >
@@ -84,7 +84,8 @@ function SdkDemo() {
84
84
  <div className="border-border bg-background flex min-h-0 flex-1 flex-col overflow-hidden rounded border">
85
85
  {result.status === 'idle' && (
86
86
  <div className="text-muted-foreground flex h-full items-center justify-center p-3 text-center text-xs leading-5">
87
- Run a query to see results. If the host session is missing, the transport route will return 401.
87
+ Run a query to see results. If the host session is missing, the transport route will
88
+ return 401.
88
89
  </div>
89
90
  )}
90
91
  {result.status === 'loading' && (
@@ -1,76 +1,79 @@
1
1
  @import 'tailwindcss';
2
2
 
3
3
  * {
4
- box-sizing: border-box;
4
+ box-sizing: border-box;
5
5
  }
6
6
 
7
7
  html,
8
8
  body,
9
9
  #root {
10
- margin: 0;
11
- padding: 0;
12
- height: 100%;
13
- width: 100%;
14
- overflow: hidden;
10
+ margin: 0;
11
+ padding: 0;
12
+ height: 100%;
13
+ width: 100%;
14
+ overflow: hidden;
15
15
  }
16
16
 
17
17
  :root {
18
- --background: oklch(17.88% 0.0075 229.38);
19
- --foreground: oklch(98.69% 0.0093 99.98);
20
- --muted-foreground: oklch(86.03% 0.0056 95.11);
21
- --border: oklch(1 0 0 / 10%);
22
- --primary: oklch(97.02% 0 0);
23
- --primary-foreground: oklch(36.94% 0.0053 236.64);
24
- --destructive: oklch(68.04% 0.1386 21.38);
25
- --ring: oklch(79.43% 0.0084 98.91);
18
+ --background: oklch(17.88% 0.0075 229.38);
19
+ --foreground: oklch(98.69% 0.0093 99.98);
20
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
21
+ --border: oklch(1 0 0 / 10%);
22
+ --primary: oklch(97.02% 0 0);
23
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
24
+ --destructive: oklch(68.04% 0.1386 21.38);
25
+ --ring: oklch(79.43% 0.0084 98.91);
26
26
  }
27
27
 
28
28
  body {
29
- background: var(--background);
30
- color: var(--foreground);
31
- font-family: system-ui, -apple-system, sans-serif;
29
+ background: var(--background);
30
+ color: var(--foreground);
31
+ font-family:
32
+ system-ui,
33
+ -apple-system,
34
+ sans-serif;
32
35
  }
33
36
 
34
37
  code {
35
- font-family: inherit;
38
+ font-family: inherit;
36
39
  }
37
40
 
38
41
  .bg-background {
39
- background-color: var(--background);
42
+ background-color: var(--background);
40
43
  }
41
44
 
42
45
  .text-foreground {
43
- color: var(--foreground);
46
+ color: var(--foreground);
44
47
  }
45
48
 
46
49
  .text-muted-foreground {
47
- color: var(--muted-foreground);
50
+ color: var(--muted-foreground);
48
51
  }
49
52
 
50
53
  .border-border {
51
- border-color: var(--border);
54
+ border-color: var(--border);
52
55
  }
53
56
 
54
57
  .bg-primary {
55
- background-color: var(--primary);
58
+ background-color: var(--primary);
56
59
  }
57
60
 
58
61
  .text-primary-foreground {
59
- color: var(--primary-foreground);
62
+ color: var(--primary-foreground);
60
63
  }
61
64
 
62
65
  .text-destructive {
63
- color: var(--destructive);
66
+ color: var(--destructive);
64
67
  }
65
68
 
66
69
  .focus\:ring-ring:focus {
67
- --tw-ring-color: var(--ring);
70
+ --tw-ring-color: var(--ring);
68
71
  }
69
72
 
70
73
  .hover\:bg-primary\/90:hover {
71
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
74
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
72
75
  }
73
76
 
74
77
  .hover\:text-foreground:hover {
75
- color: var(--foreground);
78
+ color: var(--foreground);
76
79
  }
@@ -1,9 +1,9 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
3
  interface ImportMetaEnv {
4
- readonly VITE_APP_NAME: string
4
+ readonly VITE_APP_NAME: string;
5
5
  }
6
6
 
7
7
  interface ImportMeta {
8
- readonly env: ImportMetaEnv
8
+ readonly env: ImportMetaEnv;
9
9
  }
@@ -1,5 +1,5 @@
1
- <!DOCTYPE html>
2
- <html lang="en" class="dark" style="height: 100%; margin: 0">
1
+ <!doctype html>
2
+ <html lang="en" class="dark" style="height: 100%; margin: 0; color-scheme: dark">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -1,6 +1,6 @@
1
1
  import { isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
2
2
  import { createSignal } from 'solid-js';
3
- import { useSdk, useNotify } from './bardioc-sdk';
3
+ import { useNotify, useSdk } from './bardioc-sdk';
4
4
 
5
5
  type ResultState =
6
6
  | { status: 'idle' }
@@ -59,14 +59,14 @@ function SdkDemo() {
59
59
 
60
60
  <div class="flex flex-wrap gap-2">
61
61
  <button
62
- class="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
62
+ class="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
63
63
  onclick={runGetProfile}
64
64
  disabled={running()}
65
65
  >
66
66
  Get Profile
67
67
  </button>
68
68
  <button
69
- class="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
69
+ class="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
70
70
  onclick={handleNotify}
71
71
  disabled={running()}
72
72
  >
@@ -87,7 +87,8 @@ function SdkDemo() {
87
87
  if (r.status === 'idle') {
88
88
  return (
89
89
  <div class="text-muted-foreground flex h-full items-center justify-center p-3 text-center text-xs leading-5">
90
- Run a query to see results. If the host session is missing, the transport route will return 401.
90
+ Run a query to see results. If the host session is missing, the transport route will
91
+ return 401.
91
92
  </div>
92
93
  );
93
94
  }
@@ -4,30 +4,30 @@ import { createContext, onCleanup, onMount, useContext, type JSX } from 'solid-j
4
4
  const BardiocContext = createContext<HostBridge>();
5
5
 
6
6
  export function AppSdkProvider(props: { appId: string; children: JSX.Element }) {
7
- const bridge = createHostBridge({ appId: props.appId });
7
+ const bridge = createHostBridge({ appId: props.appId });
8
8
 
9
- onMount(() => {
10
- void bridge.connect();
11
- });
9
+ onMount(() => {
10
+ void bridge.connect();
11
+ });
12
12
 
13
- onCleanup(() => {
14
- bridge.destroy();
15
- });
13
+ onCleanup(() => {
14
+ bridge.destroy();
15
+ });
16
16
 
17
- return <BardiocContext.Provider value={bridge}>{props.children}</BardiocContext.Provider>;
17
+ return <BardiocContext.Provider value={bridge}>{props.children}</BardiocContext.Provider>;
18
18
  }
19
19
 
20
20
  export function useSdk(): HostBridge {
21
- const bridge = useContext(BardiocContext);
22
- if (!bridge) {
23
- throw new Error('useSdk() must be used inside AppSdkProvider');
24
- }
25
- return bridge;
21
+ const bridge = useContext(BardiocContext);
22
+ if (!bridge) {
23
+ throw new Error('useSdk() must be used inside AppSdkProvider');
24
+ }
25
+ return bridge;
26
26
  }
27
27
 
28
28
  export function useNotify() {
29
- const bridge = useSdk();
30
- return (message: string, level?: NotifyLevel) => {
31
- bridge.notify(message, level);
32
- };
33
- }
29
+ const bridge = useSdk();
30
+ return (message: string, level?: NotifyLevel) => {
31
+ bridge.notify(message, level);
32
+ };
33
+ }
@@ -1,76 +1,79 @@
1
1
  @import 'tailwindcss';
2
2
 
3
3
  * {
4
- box-sizing: border-box;
4
+ box-sizing: border-box;
5
5
  }
6
6
 
7
7
  html,
8
8
  body,
9
9
  #root {
10
- margin: 0;
11
- padding: 0;
12
- height: 100%;
13
- width: 100%;
14
- overflow: hidden;
10
+ margin: 0;
11
+ padding: 0;
12
+ height: 100%;
13
+ width: 100%;
14
+ overflow: hidden;
15
15
  }
16
16
 
17
17
  :root {
18
- --background: oklch(17.88% 0.0075 229.38);
19
- --foreground: oklch(98.69% 0.0093 99.98);
20
- --muted-foreground: oklch(86.03% 0.0056 95.11);
21
- --border: oklch(1 0 0 / 10%);
22
- --primary: oklch(97.02% 0 0);
23
- --primary-foreground: oklch(36.94% 0.0053 236.64);
24
- --destructive: oklch(68.04% 0.1386 21.38);
25
- --ring: oklch(79.43% 0.0084 98.91);
18
+ --background: oklch(17.88% 0.0075 229.38);
19
+ --foreground: oklch(98.69% 0.0093 99.98);
20
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
21
+ --border: oklch(1 0 0 / 10%);
22
+ --primary: oklch(97.02% 0 0);
23
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
24
+ --destructive: oklch(68.04% 0.1386 21.38);
25
+ --ring: oklch(79.43% 0.0084 98.91);
26
26
  }
27
27
 
28
28
  body {
29
- background: var(--background);
30
- color: var(--foreground);
31
- font-family: system-ui, -apple-system, sans-serif;
29
+ background: var(--background);
30
+ color: var(--foreground);
31
+ font-family:
32
+ system-ui,
33
+ -apple-system,
34
+ sans-serif;
32
35
  }
33
36
 
34
37
  code {
35
- font-family: inherit;
38
+ font-family: inherit;
36
39
  }
37
40
 
38
41
  .bg-background {
39
- background-color: var(--background);
42
+ background-color: var(--background);
40
43
  }
41
44
 
42
45
  .text-foreground {
43
- color: var(--foreground);
46
+ color: var(--foreground);
44
47
  }
45
48
 
46
49
  .text-muted-foreground {
47
- color: var(--muted-foreground);
50
+ color: var(--muted-foreground);
48
51
  }
49
52
 
50
53
  .border-border {
51
- border-color: var(--border);
54
+ border-color: var(--border);
52
55
  }
53
56
 
54
57
  .bg-primary {
55
- background-color: var(--primary);
58
+ background-color: var(--primary);
56
59
  }
57
60
 
58
61
  .text-primary-foreground {
59
- color: var(--primary-foreground);
62
+ color: var(--primary-foreground);
60
63
  }
61
64
 
62
65
  .text-destructive {
63
- color: var(--destructive);
66
+ color: var(--destructive);
64
67
  }
65
68
 
66
69
  .focus\:ring-ring:focus {
67
- --tw-ring-color: var(--ring);
70
+ --tw-ring-color: var(--ring);
68
71
  }
69
72
 
70
73
  .hover\:bg-primary\/90:hover {
71
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
74
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
72
75
  }
73
76
 
74
77
  .hover\:text-foreground:hover {
75
- color: var(--foreground);
78
+ color: var(--foreground);
76
79
  }
@@ -1,9 +1,9 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
3
  interface ImportMetaEnv {
4
- readonly VITE_APP_NAME: string
4
+ readonly VITE_APP_NAME: string;
5
5
  }
6
6
 
7
7
  interface ImportMeta {
8
- readonly env: ImportMetaEnv
8
+ readonly env: ImportMetaEnv;
9
9
  }
@@ -1,5 +1,5 @@
1
- <!DOCTYPE html>
2
- <html lang="en" class="dark" style="height: 100%; margin: 0">
1
+ <!doctype html>
2
+ <html lang="en" class="dark" style="height: 100%; margin: 0; color-scheme: dark">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -1,76 +1,79 @@
1
1
  @import 'tailwindcss';
2
2
 
3
3
  * {
4
- box-sizing: border-box;
4
+ box-sizing: border-box;
5
5
  }
6
6
 
7
7
  html,
8
8
  body,
9
9
  #app {
10
- margin: 0;
11
- padding: 0;
12
- height: 100%;
13
- width: 100%;
14
- overflow: hidden;
10
+ margin: 0;
11
+ padding: 0;
12
+ height: 100%;
13
+ width: 100%;
14
+ overflow: hidden;
15
15
  }
16
16
 
17
17
  :root {
18
- --background: oklch(17.88% 0.0075 229.38);
19
- --foreground: oklch(98.69% 0.0093 99.98);
20
- --muted-foreground: oklch(86.03% 0.0056 95.11);
21
- --border: oklch(1 0 0 / 10%);
22
- --primary: oklch(97.02% 0 0);
23
- --primary-foreground: oklch(36.94% 0.0053 236.64);
24
- --destructive: oklch(68.04% 0.1386 21.38);
25
- --ring: oklch(79.43% 0.0084 98.91);
18
+ --background: oklch(17.88% 0.0075 229.38);
19
+ --foreground: oklch(98.69% 0.0093 99.98);
20
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
21
+ --border: oklch(1 0 0 / 10%);
22
+ --primary: oklch(97.02% 0 0);
23
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
24
+ --destructive: oklch(68.04% 0.1386 21.38);
25
+ --ring: oklch(79.43% 0.0084 98.91);
26
26
  }
27
27
 
28
28
  body {
29
- background: var(--background);
30
- color: var(--foreground);
31
- font-family: system-ui, -apple-system, sans-serif;
29
+ background: var(--background);
30
+ color: var(--foreground);
31
+ font-family:
32
+ system-ui,
33
+ -apple-system,
34
+ sans-serif;
32
35
  }
33
36
 
34
37
  code {
35
- font-family: inherit;
38
+ font-family: inherit;
36
39
  }
37
40
 
38
41
  .bg-background {
39
- background-color: var(--background);
42
+ background-color: var(--background);
40
43
  }
41
44
 
42
45
  .text-foreground {
43
- color: var(--foreground);
46
+ color: var(--foreground);
44
47
  }
45
48
 
46
49
  .text-muted-foreground {
47
- color: var(--muted-foreground);
50
+ color: var(--muted-foreground);
48
51
  }
49
52
 
50
53
  .border-border {
51
- border-color: var(--border);
54
+ border-color: var(--border);
52
55
  }
53
56
 
54
57
  .bg-primary {
55
- background-color: var(--primary);
58
+ background-color: var(--primary);
56
59
  }
57
60
 
58
61
  .text-primary-foreground {
59
- color: var(--primary-foreground);
62
+ color: var(--primary-foreground);
60
63
  }
61
64
 
62
65
  .text-destructive {
63
- color: var(--destructive);
66
+ color: var(--destructive);
64
67
  }
65
68
 
66
69
  .focus\:ring-ring:focus {
67
- --tw-ring-color: var(--ring);
70
+ --tw-ring-color: var(--ring);
68
71
  }
69
72
 
70
73
  .hover\:bg-primary\/90:hover {
71
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
74
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
72
75
  }
73
76
 
74
77
  .hover\:text-foreground:hover {
75
- color: var(--foreground);
78
+ color: var(--foreground);
76
79
  }
@@ -1,5 +1,5 @@
1
- import { installDevBridge, isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
2
1
  import { createHostBridge } from '@bardioc/app-sdk';
2
+ import { installDevBridge, isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
3
3
  import { mount } from 'svelte';
4
4
  import App from './App.svelte';
5
5
  import './index.css';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="vite/client" />
2
2
 
3
3
  interface ImportMetaEnv {
4
- readonly VITE_APP_NAME: string
4
+ readonly VITE_APP_NAME: string;
5
5
  }
6
6
 
7
7
  interface ImportMeta {
8
- readonly env: ImportMetaEnv
8
+ readonly env: ImportMetaEnv;
9
9
  }
@@ -1,7 +1,7 @@
1
1
  # {{DISPLAY_NAME}}
2
2
 
3
3
  Bardioc hosted app. Vite + React 19 + TypeScript 6 + `@bardioc/app-sdk`, with
4
- `@bardioc/ui` (components + theme), `@bardioc/i18n` (translations), and `@bardioc/types`.
4
+ `@bardioc/ui` (components + theme) and `@bardioc/i18n-core` (translations).
5
5
 
6
6
  The starter ships a **Climate Dashboard** — a worked example of how a real Bardioc app
7
7
  is wired: a sidebar shell with multiple views, `@bardioc/ui` components (cards, metrics,
@@ -127,9 +127,9 @@ OS windows); the language switcher is `ConnectedLanguageSwitcher useI18n={useI18
127
127
 
128
128
  ---
129
129
 
130
- ## i18n — `@bardioc/i18n`
130
+ ## i18n — `@bardioc/i18n-core`
131
131
 
132
- All user-facing strings go through `t()`. Locales: `en`, `de` (`@bardioc/types`).
132
+ All user-facing strings go through `t()`. Locales: `en`, `de` (defined in `src/i18n.tsx`).
133
133
 
134
134
  ```typescript
135
135
  import { useTranslation } from './i18n';
@@ -143,10 +143,8 @@ t('overview.updated', { fallback: 'Updated {time}', params: { time } });
143
143
  - `AppI18nProvider syncWithOs` follows the OS language (`useOsConfig().language`); the header's
144
144
  `ConnectedLanguageSwitcher` lets the user switch it manually.
145
145
  - Always pass a `fallback` so a missing key degrades gracefully.
146
- - `@bardioc/ui` components translate against this **same** provideronly the app's `en/de.json`
147
- are loaded (the base `@bardioc/i18n` bundle is not merged). So shared-component keys must live in
148
- the app locales: `common.button.previous/next` and the `genericTable.*` set (DataTable pagination
149
- "1 to 5 of 5", Previous/Next). Without them those strings silently fall back to English.
146
+ - `@bardioc/ui` component strings ship with the `@bardioc/ui` package itself — the app only
147
+ carries its own `en/de.json`.
150
148
 
151
149
  ---
152
150
 
@@ -1,5 +1,5 @@
1
- <!DOCTYPE html>
2
- <html lang="en" class="dark" style="height: 100%; margin: 0">
1
+ <!doctype html>
2
+ <html lang="en" class="dark" style="height: 100%; margin: 0; color-scheme: dark">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -5,7 +5,6 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
- "dev:live": "BARDIOC_TUNNEL=1 vite",
9
8
  "build": "tsc && vite build && node scripts/stamp-manifest.mjs dist",
10
9
  "bundle": "rm -f {{APP_NAME}}.zip && tsc && vite build && node scripts/stamp-manifest.mjs dist && cd dist && zip -r ../{{APP_NAME}}.zip .",
11
10
  "preview": "vite preview",
@@ -17,9 +16,8 @@
17
16
  },
18
17
  "dependencies": {
19
18
  "@bardioc/app-sdk": "latest",
20
- "@bardioc/i18n": "^0.1.6",
21
- "@bardioc/types": "^0.3.0",
22
- "@bardioc/ui": "^0.2.11",
19
+ "@bardioc/i18n-core": "latest",
20
+ "@bardioc/ui": "latest",
23
21
  "lucide-react": "^0.544.0",
24
22
  "react": "19.2.6",
25
23
  "react-dom": "19.2.6"
@@ -16,14 +16,12 @@ export function ConditionsChart({ forecast }: Readonly<ConditionsChartProps>) {
16
16
  rainy: { label: t('conditions.rainy', { fallback: 'Rainy' }), color: 'var(--chart-1)' },
17
17
  };
18
18
 
19
- const seriesData = forecast.map(
20
- (entry): Record<string, string | number> => ({
21
- day: entry.day,
22
- sunny: entry.sunny,
23
- cloudy: entry.cloudy,
24
- rainy: entry.rainy,
25
- })
26
- );
19
+ const seriesData = forecast.map((entry): Record<string, string | number> => ({
20
+ day: entry.day,
21
+ sunny: entry.sunny,
22
+ cloudy: entry.cloudy,
23
+ rainy: entry.rainy,
24
+ }));
27
25
 
28
26
  return (
29
27
  <BarChartMultiple
@@ -24,9 +24,7 @@ export function LiveEventsView() {
24
24
  return (
25
25
  <div className="flex h-full min-w-0 flex-col gap-3">
26
26
  <div>
27
- <h2 className="text-lg font-semibold">
28
- {t('events.title', { fallback: 'Live Events' })}
29
- </h2>
27
+ <h2 className="text-lg font-semibold">{t('events.title', { fallback: 'Live Events' })}</h2>
30
28
  <p className="text-muted-foreground text-xs">
31
29
  {t('events.description', {
32
30
  fallback: 'Live graph events streamed from the OS over SSE (permission "events").',
@@ -1,22 +1,20 @@
1
1
  import { useOsConfig } from '@bardioc/app-sdk/react';
2
2
  import {
3
3
  I18nProvider as BaseI18nProvider,
4
- mergeTranslations,
5
4
  useI18n,
6
5
  type I18nConfig,
7
6
  type TranslationMessages,
8
- } from '@bardioc/i18n';
9
- import { deMessages as baseDe, enMessages as baseEn } from '@bardioc/i18n/translations';
10
- import { SUPPORTED_LOCALES, type Locale } from '@bardioc/types';
7
+ } from '@bardioc/i18n-core';
11
8
  import { useEffect, useMemo, type ReactNode } from 'react';
12
9
  import deMessages from './locales/de.json';
13
10
  import enMessages from './locales/en.json';
14
11
 
15
- // Layer the app's strings over the @bardioc base bundle so built-in @bardioc/ui component text
16
- // (table pagination, combobox, sidebar, window controls, …) is translated too. App keys win.
12
+ export const SUPPORTED_LOCALES = ['en', 'de'] as const;
13
+ export type Locale = (typeof SUPPORTED_LOCALES)[number];
14
+
17
15
  const DEFAULT_MESSAGES: Record<Locale, TranslationMessages> = {
18
- en: mergeTranslations(baseEn, enMessages),
19
- de: mergeTranslations(baseDe, deMessages),
16
+ en: enMessages,
17
+ de: deMessages,
20
18
  };
21
19
 
22
20
  const STORAGE_KEY = '{{APP_NAME}}.locale';
@@ -65,4 +63,4 @@ export function AppI18nProvider({ children, syncWithOs = false }: Readonly<AppI1
65
63
  );
66
64
  }
67
65
 
68
- export { useI18n, useTranslation } from '@bardioc/i18n';
66
+ export { useI18n, useTranslation } from '@bardioc/i18n-core';
@@ -1,9 +1,8 @@
1
- import { SUPPORTED_LOCALES } from '@bardioc/types';
2
1
  import { Button, ConnectedLanguageSwitcher } from '@bardioc/ui/components';
3
2
  import { RefreshCw } from 'lucide-react';
4
3
  import { LocationSelect } from '../climate/location-select';
5
4
  import { useDashboard } from '../dashboard-provider';
6
- import { useI18n, useTranslation } from '../i18n';
5
+ import { SUPPORTED_LOCALES, useI18n, useTranslation } from '../i18n';
7
6
 
8
7
  export function Header() {
9
8
  const { t } = useTranslation();
@@ -1,5 +1,5 @@
1
- <!DOCTYPE html>
2
- <html lang="en" class="dark" style="height: 100%; margin: 0">
1
+ <!doctype html>
2
+ <html lang="en" class="dark" style="height: 100%; margin: 0; color-scheme: dark">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />