@bardioc/create-bardioc-app 0.5.4 → 0.5.6

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 (87) hide show
  1. package/README.md +3 -5
  2. package/bin/create.mjs +2 -4
  3. package/package.json +5 -5
  4. package/templates/_base/README.md +17 -3
  5. package/templates/_base/scripts/stamp-manifest.mjs +1 -1
  6. package/templates/_opt-link/scripts/link-source.mjs +7 -5
  7. package/templates/angular/.env.example +4 -2
  8. package/templates/angular/_gitignore +1 -0
  9. package/templates/angular/package.json +2 -4
  10. package/templates/angular/public/runtime-env.js +1 -1
  11. package/templates/angular/scripts/dev-auth-proxy.mjs +10 -84
  12. package/templates/angular/scripts/sync-runtime-env.mjs +17 -36
  13. package/templates/angular/src/app/app.component.ts +2 -2
  14. package/templates/angular/src/app/bardioc-bridge.ts +1 -1
  15. package/templates/angular/src/index.html +2 -2
  16. package/templates/angular/src/runtime-env.ts +1 -1
  17. package/templates/angular/src/styles.css +84 -80
  18. package/templates/angular/src/vite-env.d.ts +3 -3
  19. package/templates/angular/tsconfig.json +1 -0
  20. package/templates/manifest.json +2 -10
  21. package/templates/nextjs/.env.example +4 -2
  22. package/templates/nextjs/_gitignore +1 -0
  23. package/templates/nextjs/app/globals.css +31 -28
  24. package/templates/nextjs/app/layout.tsx +2 -0
  25. package/templates/nextjs/app/page.tsx +8 -5
  26. package/templates/nextjs/eslint.config.mjs +4 -0
  27. package/templates/nextjs/global.d.ts +1 -1
  28. package/templates/nextjs/next.config.ts +7 -26
  29. package/templates/nextjs/package.json +8 -3
  30. package/templates/nextjs/prettier.config.mjs +1 -0
  31. package/templates/nextjs/scripts/dev-auth-proxy.mjs +17 -0
  32. package/templates/nextjs/tailwind.config.ts +1 -4
  33. package/templates/nextjs/tsconfig.json +3 -18
  34. package/templates/preact/eslint.config.mjs +3 -0
  35. package/templates/preact/index.html +2 -2
  36. package/templates/preact/package.json +8 -3
  37. package/templates/preact/prettier.config.mjs +1 -0
  38. package/templates/preact/src/App.tsx +6 -5
  39. package/templates/preact/src/index.css +31 -28
  40. package/templates/preact/src/vite-env.d.ts +2 -2
  41. package/templates/preact/tsconfig.json +4 -10
  42. package/templates/preact/vite.config.ts +6 -1
  43. package/templates/solid/eslint.config.mjs +3 -0
  44. package/templates/solid/index.html +2 -2
  45. package/templates/solid/package.json +8 -4
  46. package/templates/solid/prettier.config.mjs +1 -0
  47. package/templates/solid/src/App.tsx +7 -6
  48. package/templates/solid/src/bardioc-sdk.tsx +18 -18
  49. package/templates/solid/src/index.css +31 -28
  50. package/templates/solid/src/vite-env.d.ts +2 -2
  51. package/templates/solid/tsconfig.json +4 -9
  52. package/templates/solid/vite.config.ts +7 -2
  53. package/templates/svelte/_gitignore +1 -0
  54. package/templates/svelte/eslint.config.mjs +3 -0
  55. package/templates/svelte/index.html +2 -2
  56. package/templates/svelte/package.json +8 -3
  57. package/templates/svelte/prettier.config.mjs +1 -0
  58. package/templates/svelte/src/App.svelte +1 -1
  59. package/templates/svelte/src/index.css +31 -28
  60. package/templates/svelte/src/main.ts +1 -1
  61. package/templates/svelte/src/vite-env.d.ts +2 -2
  62. package/templates/svelte/tsconfig.json +4 -4
  63. package/templates/svelte/vite.config.ts +6 -1
  64. package/templates/vite/CLAUDE.md +11 -8
  65. package/templates/vite/eslint.config.mjs +3 -0
  66. package/templates/vite/index.html +2 -2
  67. package/templates/vite/package.json +9 -5
  68. package/templates/vite/prettier.config.mjs +1 -0
  69. package/templates/vite/src/climate/climate-data.ts +13 -6
  70. package/templates/vite/src/climate/conditions-chart.tsx +6 -8
  71. package/templates/vite/src/events/live-events-view.tsx +1 -3
  72. package/templates/vite/src/graph/requests.ts +2 -1
  73. package/templates/vite/src/i18n.tsx +7 -9
  74. package/templates/vite/src/shell/header.tsx +1 -2
  75. package/templates/vite/tsconfig.json +4 -10
  76. package/templates/vite/vite.config.ts +7 -2
  77. package/templates/vue/_gitignore +1 -0
  78. package/templates/vue/eslint.config.mjs +3 -0
  79. package/templates/vue/index.html +2 -2
  80. package/templates/vue/package.json +8 -3
  81. package/templates/vue/prettier.config.mjs +1 -0
  82. package/templates/vue/src/App.vue +26 -10
  83. package/templates/vue/src/bardioc-sdk.ts +11 -11
  84. package/templates/vue/src/index.css +31 -28
  85. package/templates/vue/src/vite-env.d.ts +2 -2
  86. package/templates/vue/tsconfig.json +5 -9
  87. package/templates/vue/vite.config.ts +7 -2
@@ -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' {
@@ -1,22 +1,18 @@
1
1
  {
2
+ "extends": "@bardioc/configs/typescript/base.json",
2
3
  "compilerOptions": {
3
- "target": "ES2022",
4
- "useDefineForClassFields": true,
4
+ "declaration": false,
5
+ "declarationMap": false,
5
6
  "module": "ESNext",
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
7
  "moduleResolution": "bundler",
9
- "allowImportingTsExtensions": true,
10
- "isolatedModules": true,
11
- "moduleDetection": "force",
12
8
  "noEmit": true,
9
+ "useDefineForClassFields": true,
10
+ "allowImportingTsExtensions": true,
13
11
  "jsx": "preserve",
14
- "strict": true,
15
12
  "noUnusedLocals": true,
16
13
  "noUnusedParameters": true,
17
14
  "noFallthroughCasesInSwitch": true,
18
15
  "noUncheckedSideEffectImports": true,
19
- "ignoreDeprecations": "6.0",
20
16
  "baseUrl": ".",
21
17
  "paths": {
22
18
  "@/*": ["./src/*"]
@@ -1,6 +1,6 @@
1
1
  import { bardiocApp, bardiocDevAuth } from '@bardioc/app-sdk/vite';
2
- import vue from '@vitejs/plugin-vue';
3
2
  import tailwindcss from '@tailwindcss/vite';
3
+ import vue from '@vitejs/plugin-vue';
4
4
  import { defineConfig, loadEnv } from 'vite';
5
5
 
6
6
  export default defineConfig(({ mode }) => {
@@ -12,6 +12,11 @@ export default defineConfig(({ mode }) => {
12
12
  }
13
13
 
14
14
  return {
15
- plugins: [bardiocDevAuth({ appName }), vue(), bardiocApp({ appName, port: {{PORT}} }), tailwindcss()],
15
+ plugins: [
16
+ bardiocDevAuth({ appName }),
17
+ vue(),
18
+ bardiocApp({ appName, port: {{PORT}} }),
19
+ tailwindcss(),
20
+ ],
16
21
  };
17
22
  });