@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
package/README.md CHANGED
@@ -8,10 +8,10 @@ Scaffold a Vite app wired for `@bardioc/app-sdk`.
8
8
 
9
9
  ## Install
10
10
 
11
- Configure the `@bardioc` scoped registry and install the CLI globally:
11
+ Install the CLI globally from the public npm registry:
12
12
 
13
13
  ```bash
14
- npm config set @bardioc:registry http://nexus.almato.com/repository/npm-group/ --location=user && npm install -g @bardioc/create-bardioc-app
14
+ npm install -g @bardioc/create-bardioc-app
15
15
  ```
16
16
 
17
17
  If your default npm registry is not `https://registry.npmjs.org/`, set it in your user-level npm config before installing app dependencies.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bardioc/create-bardioc-app",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Scaffold a Bardioc app with framework templates (vite, react, vue, angular, svelte, solid, preact, nextjs)",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -30,10 +30,10 @@
30
30
  "react"
31
31
  ],
32
32
  "devDependencies": {
33
- "@vitest/coverage-v8": "4.1.5",
34
- "@types/node": "^25.6.0",
35
- "typescript": "^6.0.3",
36
- "vitest": "4.1.5"
33
+ "@vitest/coverage-v8": "^4.1.8",
34
+ "@types/node": "^25.9.1",
35
+ "typescript": "6.0.3",
36
+ "vitest": "^4.1.8"
37
37
  },
38
38
  "scripts": {
39
39
  "check-types": "tsc --noEmit",
@@ -1 +1 @@
1
- window.__BARDIOC_RUNTIME_ENV__ = {};
1
+ window.__BARDIOC_RUNTIME_ENV__ = {};
@@ -1,5 +1,5 @@
1
1
  import { createHostBridge, type HostBridge } from '@bardioc/app-sdk';
2
2
 
3
3
  export function createBardiocBridge(): HostBridge {
4
- return createHostBridge({});
4
+ return createHostBridge({});
5
5
  }
@@ -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
  <title>{{DISPLAY_NAME}}</title>
@@ -14,4 +14,4 @@ export function readRuntimeEnv(name: string): string | undefined {
14
14
 
15
15
  const trimmed = value.trim();
16
16
  return trimmed.length > 0 ? trimmed : undefined;
17
- }
17
+ }
@@ -1,258 +1,262 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  html,
6
6
  body,
7
7
  app-root {
8
- margin: 0;
9
- padding: 0;
10
- height: 100%;
11
- width: 100%;
12
- overflow: hidden;
8
+ margin: 0;
9
+ padding: 0;
10
+ height: 100%;
11
+ width: 100%;
12
+ overflow: hidden;
13
13
  }
14
14
 
15
15
  :root {
16
- --background: oklch(17.88% 0.0075 229.38);
17
- --foreground: oklch(98.69% 0.0093 99.98);
18
- --muted-foreground: oklch(86.03% 0.0056 95.11);
19
- --border: oklch(1 0 0 / 10%);
20
- --primary: oklch(97.02% 0 0);
21
- --primary-foreground: oklch(36.94% 0.0053 236.64);
22
- --destructive: oklch(68.04% 0.1386 21.38);
23
- --ring: oklch(79.43% 0.0084 98.91);
16
+ --background: oklch(17.88% 0.0075 229.38);
17
+ --foreground: oklch(98.69% 0.0093 99.98);
18
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
19
+ --border: oklch(1 0 0 / 10%);
20
+ --primary: oklch(97.02% 0 0);
21
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
22
+ --destructive: oklch(68.04% 0.1386 21.38);
23
+ --ring: oklch(79.43% 0.0084 98.91);
24
24
  }
25
25
 
26
26
  body {
27
- background: var(--background);
28
- color: var(--foreground);
29
- font-family: system-ui, -apple-system, sans-serif;
27
+ background: var(--background);
28
+ color: var(--foreground);
29
+ font-family:
30
+ system-ui,
31
+ -apple-system,
32
+ sans-serif;
30
33
  }
31
34
 
32
35
  code {
33
- font-family: inherit;
36
+ font-family: inherit;
34
37
  }
35
38
 
36
39
  .bg-background {
37
- background-color: var(--background);
40
+ background-color: var(--background);
38
41
  }
39
42
 
40
43
  .text-foreground {
41
- color: var(--foreground);
44
+ color: var(--foreground);
42
45
  }
43
46
 
44
47
  .text-muted-foreground {
45
- color: var(--muted-foreground);
48
+ color: var(--muted-foreground);
46
49
  }
47
50
 
48
51
  .border-border {
49
- border-color: var(--border);
52
+ border-color: var(--border);
50
53
  }
51
54
 
52
55
  .bg-primary {
53
- background-color: var(--primary);
56
+ background-color: var(--primary);
54
57
  }
55
58
 
56
59
  .text-primary-foreground {
57
- color: var(--primary-foreground);
60
+ color: var(--primary-foreground);
58
61
  }
59
62
 
60
63
  .text-destructive {
61
- color: var(--destructive);
64
+ color: var(--destructive);
62
65
  }
63
66
 
64
67
  .focus\:ring-ring:focus {
65
- --tw-ring-color: var(--ring);
68
+ --tw-ring-color: var(--ring);
66
69
  }
67
70
 
68
71
  .hover\:bg-primary\/90:hover {
69
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
72
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
70
73
  }
71
74
 
72
75
  .hover\:text-foreground:hover {
73
- color: var(--foreground);
76
+ color: var(--foreground);
74
77
  }
75
78
 
76
79
  .mx-auto {
77
- margin-left: auto;
78
- margin-right: auto;
80
+ margin-left: auto;
81
+ margin-right: auto;
79
82
  }
80
83
 
81
84
  .m-0 {
82
- margin: 0;
85
+ margin: 0;
83
86
  }
84
87
 
85
88
  .flex {
86
- display: flex;
89
+ display: flex;
87
90
  }
88
91
 
89
92
  .min-h-0 {
90
- min-height: 0;
93
+ min-height: 0;
91
94
  }
92
95
 
93
96
  .min-h-screen {
94
- min-height: 100vh;
97
+ min-height: 100vh;
95
98
  }
96
99
 
97
100
  .h-full {
98
- height: 100%;
101
+ height: 100%;
99
102
  }
100
103
 
101
104
  .w-full {
102
- width: 100%;
105
+ width: 100%;
103
106
  }
104
107
 
105
108
  .max-w-2xl {
106
- max-width: 42rem;
109
+ max-width: 42rem;
107
110
  }
108
111
 
109
112
  .max-w-3xl {
110
- max-width: 48rem;
113
+ max-width: 48rem;
111
114
  }
112
115
 
113
116
  .shrink-0 {
114
- flex-shrink: 0;
117
+ flex-shrink: 0;
115
118
  }
116
119
 
117
120
  .flex-1 {
118
- flex: 1 1 0%;
121
+ flex: 1 1 0%;
119
122
  }
120
123
 
121
124
  .flex-col {
122
- flex-direction: column;
125
+ flex-direction: column;
123
126
  }
124
127
 
125
128
  .flex-wrap {
126
- flex-wrap: wrap;
129
+ flex-wrap: wrap;
127
130
  }
128
131
 
129
132
  .items-center {
130
- align-items: center;
133
+ align-items: center;
131
134
  }
132
135
 
133
136
  .justify-center {
134
- justify-content: center;
137
+ justify-content: center;
135
138
  }
136
139
 
137
140
  .gap-0 {
138
- gap: 0;
141
+ gap: 0;
139
142
  }
140
143
 
141
144
  .gap-1 {
142
- gap: 0.25rem;
145
+ gap: 0.25rem;
143
146
  }
144
147
 
145
148
  .gap-2 {
146
- gap: 0.5rem;
149
+ gap: 0.5rem;
147
150
  }
148
151
 
149
152
  .gap-3 {
150
- gap: 0.75rem;
153
+ gap: 0.75rem;
151
154
  }
152
155
 
153
156
  .gap-4 {
154
- gap: 1rem;
157
+ gap: 1rem;
155
158
  }
156
159
 
157
160
  .overflow-hidden {
158
- overflow: hidden;
161
+ overflow: hidden;
159
162
  }
160
163
 
161
164
  .overflow-auto {
162
- overflow: auto;
165
+ overflow: auto;
163
166
  }
164
167
 
165
168
  .rounded {
166
- border-radius: 0.25rem;
169
+ border-radius: 0.25rem;
167
170
  }
168
171
 
169
172
  .rounded-xl {
170
- border-radius: 0.75rem;
173
+ border-radius: 0.75rem;
171
174
  }
172
175
 
173
176
  .border {
174
- border-width: 1px;
175
- border-style: solid;
177
+ border-width: 1px;
178
+ border-style: solid;
176
179
  }
177
180
 
178
181
  .border-b {
179
- border-bottom-width: 1px;
180
- border-bottom-style: solid;
182
+ border-bottom-width: 1px;
183
+ border-bottom-style: solid;
181
184
  }
182
185
 
183
186
  .p-3 {
184
- padding: 0.75rem;
187
+ padding: 0.75rem;
185
188
  }
186
189
 
187
190
  .p-4 {
188
- padding: 1rem;
191
+ padding: 1rem;
189
192
  }
190
193
 
191
194
  .px-3 {
192
- padding-left: 0.75rem;
193
- padding-right: 0.75rem;
195
+ padding-left: 0.75rem;
196
+ padding-right: 0.75rem;
194
197
  }
195
198
 
196
199
  .py-1 {
197
- padding-top: 0.25rem;
198
- padding-bottom: 0.25rem;
200
+ padding-top: 0.25rem;
201
+ padding-bottom: 0.25rem;
199
202
  }
200
203
 
201
204
  .pb-2 {
202
- padding-bottom: 0.5rem;
205
+ padding-bottom: 0.5rem;
203
206
  }
204
207
 
205
208
  .text-center {
206
- text-align: center;
209
+ text-align: center;
207
210
  }
208
211
 
209
212
  .text-2xl {
210
- font-size: 1.5rem;
211
- line-height: 2rem;
213
+ font-size: 1.5rem;
214
+ line-height: 2rem;
212
215
  }
213
216
 
214
217
  .text-xs {
215
- font-size: 0.75rem;
216
- line-height: 1rem;
218
+ font-size: 0.75rem;
219
+ line-height: 1rem;
217
220
  }
218
221
 
219
222
  .text-\[11px\] {
220
- font-size: 11px;
223
+ font-size: 11px;
221
224
  }
222
225
 
223
226
  .font-medium {
224
- font-weight: 500;
227
+ font-weight: 500;
225
228
  }
226
229
 
227
230
  .font-semibold {
228
- font-weight: 600;
231
+ font-weight: 600;
229
232
  }
230
233
 
231
234
  .font-mono {
232
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
233
- 'Courier New', monospace;
235
+ font-family:
236
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
237
+ monospace;
234
238
  }
235
239
 
236
240
  .leading-5 {
237
- line-height: 1.25rem;
241
+ line-height: 1.25rem;
238
242
  }
239
243
 
240
244
  .whitespace-pre-wrap {
241
- white-space: pre-wrap;
245
+ white-space: pre-wrap;
242
246
  }
243
247
 
244
248
  .break-all {
245
- word-break: break-all;
249
+ word-break: break-all;
246
250
  }
247
251
 
248
252
  .bg-muted\/20 {
249
- background-color: oklch(from var(--muted-foreground) l c h / 0.2);
253
+ background-color: oklch(from var(--muted-foreground) l c h / 0.2);
250
254
  }
251
255
 
252
256
  .disabled\:opacity-50:disabled {
253
- opacity: 0.5;
257
+ opacity: 0.5;
254
258
  }
255
259
 
256
260
  .disabled\:cursor-not-allowed:disabled {
257
- cursor: not-allowed;
261
+ cursor: not-allowed;
258
262
  }
@@ -1,8 +1,8 @@
1
1
  interface ImportMetaEnv {
2
- readonly DEV?: boolean;
3
- readonly VITE_APP_NAME?: string;
2
+ readonly DEV?: boolean;
3
+ readonly VITE_APP_NAME?: string;
4
4
  }
5
5
 
6
6
  interface ImportMeta {
7
- readonly env: ImportMetaEnv;
7
+ readonly env: ImportMetaEnv;
8
8
  }
@@ -1,13 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "defaultTemplate": "vite",
4
- "templates": [
5
- "angular",
6
- "nextjs",
7
- "preact",
8
- "solid",
9
- "svelte",
10
- "vite",
11
- "vue"
12
- ]
13
- }
4
+ "templates": ["angular", "nextjs", "preact", "solid", "svelte", "vite", "vue"]
5
+ }
@@ -1,75 +1,78 @@
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
- margin: 0;
10
- padding: 0;
11
- height: 100%;
12
- width: 100%;
13
- overflow: hidden;
9
+ margin: 0;
10
+ padding: 0;
11
+ height: 100%;
12
+ width: 100%;
13
+ overflow: hidden;
14
14
  }
15
15
 
16
16
  :root {
17
- --background: oklch(17.88% 0.0075 229.38);
18
- --foreground: oklch(98.69% 0.0093 99.98);
19
- --muted-foreground: oklch(86.03% 0.0056 95.11);
20
- --border: oklch(1 0 0 / 10%);
21
- --primary: oklch(97.02% 0 0);
22
- --primary-foreground: oklch(36.94% 0.0053 236.64);
23
- --destructive: oklch(68.04% 0.1386 21.38);
24
- --ring: oklch(79.43% 0.0084 98.91);
17
+ --background: oklch(17.88% 0.0075 229.38);
18
+ --foreground: oklch(98.69% 0.0093 99.98);
19
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
20
+ --border: oklch(1 0 0 / 10%);
21
+ --primary: oklch(97.02% 0 0);
22
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
23
+ --destructive: oklch(68.04% 0.1386 21.38);
24
+ --ring: oklch(79.43% 0.0084 98.91);
25
25
  }
26
26
 
27
27
  body {
28
- background: var(--background);
29
- color: var(--foreground);
30
- font-family: system-ui, -apple-system, sans-serif;
28
+ background: var(--background);
29
+ color: var(--foreground);
30
+ font-family:
31
+ system-ui,
32
+ -apple-system,
33
+ sans-serif;
31
34
  }
32
35
 
33
36
  code {
34
- font-family: inherit;
37
+ font-family: inherit;
35
38
  }
36
39
 
37
40
  .bg-background {
38
- background-color: var(--background);
41
+ background-color: var(--background);
39
42
  }
40
43
 
41
44
  .text-foreground {
42
- color: var(--foreground);
45
+ color: var(--foreground);
43
46
  }
44
47
 
45
48
  .text-muted-foreground {
46
- color: var(--muted-foreground);
49
+ color: var(--muted-foreground);
47
50
  }
48
51
 
49
52
  .border-border {
50
- border-color: var(--border);
53
+ border-color: var(--border);
51
54
  }
52
55
 
53
56
  .bg-primary {
54
- background-color: var(--primary);
57
+ background-color: var(--primary);
55
58
  }
56
59
 
57
60
  .text-primary-foreground {
58
- color: var(--primary-foreground);
61
+ color: var(--primary-foreground);
59
62
  }
60
63
 
61
64
  .text-destructive {
62
- color: var(--destructive);
65
+ color: var(--destructive);
63
66
  }
64
67
 
65
68
  .focus\:ring-ring:focus {
66
- --tw-ring-color: var(--ring);
69
+ --tw-ring-color: var(--ring);
67
70
  }
68
71
 
69
72
  .hover\:bg-primary\/90:hover {
70
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
73
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
71
74
  }
72
75
 
73
76
  .hover\:text-foreground:hover {
74
- color: var(--foreground);
77
+ color: var(--foreground);
75
78
  }
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { isInsideIframe, isDevStandalone, installDevBridge } from '@bardioc/app-sdk/dev';
3
+ import { installDevBridge, isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
4
4
  import { AppSdkProvider, useNotify, useSdk } from '@bardioc/app-sdk/react';
5
5
  import { useEffect, useState } from 'react';
6
6
 
@@ -63,14 +63,14 @@ function SdkDemo() {
63
63
 
64
64
  <div className="flex flex-wrap gap-2">
65
65
  <button
66
- 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"
66
+ 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"
67
67
  onClick={() => void runGetProfile()}
68
68
  disabled={running}
69
69
  >
70
70
  Get Profile
71
71
  </button>
72
72
  <button
73
- 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"
73
+ 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"
74
74
  onClick={handleNotify}
75
75
  disabled={running}
76
76
  >
@@ -1 +1 @@
1
- declare module '*.css';
1
+ declare module '*.css';
@@ -4,29 +4,29 @@ const apiBaseUrl = process.env.API_BASE_URL?.replace(/\/$/, '');
4
4
  const devSecret = process.env.DEV_SECRET;
5
5
 
6
6
  const nextConfig: NextConfig = {
7
- output: 'export',
8
- images: {
9
- unoptimized: true,
10
- },
11
- trailingSlash: true,
12
- async headers() {
13
- if (!devSecret) return [];
14
- return [
15
- {
16
- source: '/rest/:path*',
17
- headers: [{ key: 'X-Dev-Secret', value: devSecret }],
18
- },
19
- ];
20
- },
21
- async rewrites() {
22
- if (!apiBaseUrl) return [];
23
- return [
24
- {
25
- source: '/rest/:path*',
26
- destination: `${apiBaseUrl}/:path*`,
27
- },
28
- ];
29
- },
7
+ output: 'export',
8
+ images: {
9
+ unoptimized: true,
10
+ },
11
+ trailingSlash: true,
12
+ async headers() {
13
+ if (!devSecret) return [];
14
+ return [
15
+ {
16
+ source: '/rest/:path*',
17
+ headers: [{ key: 'X-Dev-Secret', value: devSecret }],
18
+ },
19
+ ];
20
+ },
21
+ async rewrites() {
22
+ if (!apiBaseUrl) return [];
23
+ return [
24
+ {
25
+ source: '/rest/:path*',
26
+ destination: `${apiBaseUrl}/:path*`,
27
+ },
28
+ ];
29
+ },
30
30
  };
31
31
 
32
32
  export default nextConfig;
@@ -1,10 +1,7 @@
1
1
  import type { Config } from 'tailwindcss';
2
2
 
3
3
  const config: Config = {
4
- content: [
5
- './app/**/*.{js,ts,jsx,tsx,mdx}',
6
- './components/**/*.{js,ts,jsx,tsx,mdx}',
7
- ],
4
+ content: ['./app/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}'],
8
5
  };
9
6
 
10
7
  export default config;
@@ -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" />