@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
@@ -67,14 +67,14 @@ function clearResult() {
67
67
 
68
68
  <div class="flex flex-wrap gap-2">
69
69
  <button
70
- 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"
70
+ 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"
71
71
  @click="runGetProfile"
72
72
  :disabled="running"
73
73
  >
74
74
  Get Profile
75
75
  </button>
76
76
  <button
77
- 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"
77
+ 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"
78
78
  @click="handleNotify"
79
79
  :disabled="running"
80
80
  >
@@ -89,11 +89,20 @@ function clearResult() {
89
89
  </button>
90
90
  </div>
91
91
 
92
- <div class="border-border bg-background flex min-h-0 flex-1 flex-col overflow-hidden rounded border">
93
- <div v-if="result.status === 'idle'" class="text-muted-foreground flex h-full items-center justify-center p-3 text-center text-xs leading-5">
94
- Run a query to see results. If the host session is missing, the transport route will return 401.
92
+ <div
93
+ class="border-border bg-background flex min-h-0 flex-1 flex-col overflow-hidden rounded border"
94
+ >
95
+ <div
96
+ v-if="result.status === 'idle'"
97
+ class="text-muted-foreground flex h-full items-center justify-center p-3 text-center text-xs leading-5"
98
+ >
99
+ Run a query to see results. If the host session is missing, the transport route will
100
+ return 401.
95
101
  </div>
96
- <div v-else-if="result.status === 'loading'" class="flex h-full flex-col items-center justify-center gap-2 p-3">
102
+ <div
103
+ v-else-if="result.status === 'loading'"
104
+ class="flex h-full flex-col items-center justify-center gap-2 p-3"
105
+ >
97
106
  <div class="text-muted-foreground font-mono text-xs">{{ result.request }}</div>
98
107
  <div class="text-muted-foreground text-xs">Loading…</div>
99
108
  </div>
@@ -103,11 +112,18 @@ function clearResult() {
103
112
  </div>
104
113
  <div class="text-destructive whitespace-pre-wrap break-all">{{ result.message }}</div>
105
114
  </div>
106
- <div v-else-if="result.status === 'success'" class="flex h-full flex-col gap-0 overflow-hidden">
107
- <div class="border-border text-muted-foreground shrink-0 border-b px-3 py-1 font-mono text-xs">
115
+ <div
116
+ v-else-if="result.status === 'success'"
117
+ class="flex h-full flex-col gap-0 overflow-hidden"
118
+ >
119
+ <div
120
+ class="border-border text-muted-foreground shrink-0 border-b px-3 py-1 font-mono text-xs"
121
+ >
108
122
  {{ result.request }}
109
123
  </div>
110
- <pre class="text-foreground flex-1 overflow-auto p-3 text-[11px] leading-5">{{ JSON.stringify(result.data, null, 2) }}</pre>
124
+ <pre class="text-foreground flex-1 overflow-auto p-3 text-[11px] leading-5">{{
125
+ JSON.stringify(result.data, null, 2)
126
+ }}</pre>
111
127
  </div>
112
128
  </div>
113
129
  </div>
@@ -4,20 +4,20 @@ import { inject, type InjectionKey } from 'vue';
4
4
  export const BARDIOC_BRIDGE_KEY: InjectionKey<HostBridge> = Symbol('bardiocBridge');
5
5
 
6
6
  export function createAppSdkBridge(appId: string): HostBridge {
7
- return createHostBridge({ appId });
7
+ return createHostBridge({ appId });
8
8
  }
9
9
 
10
10
  export function useBardiocBridge(): HostBridge {
11
- const bridge = inject(BARDIOC_BRIDGE_KEY);
12
- if (!bridge) {
13
- throw new Error('useBardiocBridge() must be used after providing BARDIOC_BRIDGE_KEY');
14
- }
15
- return bridge;
11
+ const bridge = inject(BARDIOC_BRIDGE_KEY);
12
+ if (!bridge) {
13
+ throw new Error('useBardiocBridge() must be used after providing BARDIOC_BRIDGE_KEY');
14
+ }
15
+ return bridge;
16
16
  }
17
17
 
18
18
  export function useNotify() {
19
- const bridge = useBardiocBridge();
20
- return (message: string, level?: NotifyLevel) => {
21
- bridge.notify(message, level);
22
- };
23
- }
19
+ const bridge = useBardiocBridge();
20
+ return (message: string, level?: NotifyLevel) => {
21
+ bridge.notify(message, level);
22
+ };
23
+ }
@@ -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,11 +1,11 @@
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
  }
10
10
 
11
11
  declare module '*.vue' {