@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.
- package/README.md +3 -5
- package/bin/create.mjs +2 -4
- package/package.json +5 -5
- package/templates/_base/README.md +17 -3
- package/templates/_base/scripts/stamp-manifest.mjs +1 -1
- package/templates/_opt-link/scripts/link-source.mjs +7 -5
- package/templates/angular/.env.example +4 -2
- package/templates/angular/_gitignore +1 -0
- package/templates/angular/package.json +2 -4
- package/templates/angular/public/runtime-env.js +1 -1
- package/templates/angular/scripts/dev-auth-proxy.mjs +10 -84
- package/templates/angular/scripts/sync-runtime-env.mjs +17 -36
- package/templates/angular/src/app/app.component.ts +2 -2
- package/templates/angular/src/app/bardioc-bridge.ts +1 -1
- package/templates/angular/src/index.html +2 -2
- package/templates/angular/src/runtime-env.ts +1 -1
- package/templates/angular/src/styles.css +84 -80
- package/templates/angular/src/vite-env.d.ts +3 -3
- package/templates/angular/tsconfig.json +1 -0
- package/templates/manifest.json +2 -10
- package/templates/nextjs/.env.example +4 -2
- package/templates/nextjs/_gitignore +1 -0
- package/templates/nextjs/app/globals.css +31 -28
- package/templates/nextjs/app/layout.tsx +2 -0
- package/templates/nextjs/app/page.tsx +8 -5
- package/templates/nextjs/eslint.config.mjs +4 -0
- package/templates/nextjs/global.d.ts +1 -1
- package/templates/nextjs/next.config.ts +7 -26
- package/templates/nextjs/package.json +8 -3
- package/templates/nextjs/prettier.config.mjs +1 -0
- package/templates/nextjs/scripts/dev-auth-proxy.mjs +17 -0
- package/templates/nextjs/tailwind.config.ts +1 -4
- package/templates/nextjs/tsconfig.json +3 -18
- package/templates/preact/eslint.config.mjs +3 -0
- package/templates/preact/index.html +2 -2
- package/templates/preact/package.json +8 -3
- package/templates/preact/prettier.config.mjs +1 -0
- package/templates/preact/src/App.tsx +6 -5
- package/templates/preact/src/index.css +31 -28
- package/templates/preact/src/vite-env.d.ts +2 -2
- package/templates/preact/tsconfig.json +4 -10
- package/templates/preact/vite.config.ts +6 -1
- package/templates/solid/eslint.config.mjs +3 -0
- package/templates/solid/index.html +2 -2
- package/templates/solid/package.json +8 -4
- package/templates/solid/prettier.config.mjs +1 -0
- package/templates/solid/src/App.tsx +7 -6
- package/templates/solid/src/bardioc-sdk.tsx +18 -18
- package/templates/solid/src/index.css +31 -28
- package/templates/solid/src/vite-env.d.ts +2 -2
- package/templates/solid/tsconfig.json +4 -9
- package/templates/solid/vite.config.ts +7 -2
- package/templates/svelte/_gitignore +1 -0
- package/templates/svelte/eslint.config.mjs +3 -0
- package/templates/svelte/index.html +2 -2
- package/templates/svelte/package.json +8 -3
- package/templates/svelte/prettier.config.mjs +1 -0
- package/templates/svelte/src/App.svelte +1 -1
- package/templates/svelte/src/index.css +31 -28
- package/templates/svelte/src/main.ts +1 -1
- package/templates/svelte/src/vite-env.d.ts +2 -2
- package/templates/svelte/tsconfig.json +4 -4
- package/templates/svelte/vite.config.ts +6 -1
- package/templates/vite/CLAUDE.md +11 -8
- package/templates/vite/eslint.config.mjs +3 -0
- package/templates/vite/index.html +2 -2
- package/templates/vite/package.json +9 -5
- package/templates/vite/prettier.config.mjs +1 -0
- package/templates/vite/src/climate/climate-data.ts +13 -6
- package/templates/vite/src/climate/conditions-chart.tsx +6 -8
- package/templates/vite/src/events/live-events-view.tsx +1 -3
- package/templates/vite/src/graph/requests.ts +2 -1
- package/templates/vite/src/i18n.tsx +7 -9
- package/templates/vite/src/shell/header.tsx +1 -2
- package/templates/vite/tsconfig.json +4 -10
- package/templates/vite/vite.config.ts +7 -2
- package/templates/vue/_gitignore +1 -0
- package/templates/vue/eslint.config.mjs +3 -0
- package/templates/vue/index.html +2 -2
- package/templates/vue/package.json +8 -3
- package/templates/vue/prettier.config.mjs +1 -0
- package/templates/vue/src/App.vue +26 -10
- package/templates/vue/src/bardioc-sdk.ts +11 -11
- package/templates/vue/src/index.css +31 -28
- package/templates/vue/src/vite-env.d.ts +2 -2
- package/templates/vue/tsconfig.json +5 -9
- 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
|
-
|
|
7
|
+
return createHostBridge({ appId });
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function useBardiocBridge(): HostBridge {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
4
|
+
box-sizing: border-box;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
html,
|
|
8
8
|
body,
|
|
9
9
|
#app {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
overflow: hidden;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
38
|
+
font-family: inherit;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
.bg-background {
|
|
39
|
-
|
|
42
|
+
background-color: var(--background);
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
.text-foreground {
|
|
43
|
-
|
|
46
|
+
color: var(--foreground);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
.text-muted-foreground {
|
|
47
|
-
|
|
50
|
+
color: var(--muted-foreground);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
.border-border {
|
|
51
|
-
|
|
54
|
+
border-color: var(--border);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
.bg-primary {
|
|
55
|
-
|
|
58
|
+
background-color: var(--primary);
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.text-primary-foreground {
|
|
59
|
-
|
|
62
|
+
color: var(--primary-foreground);
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
.text-destructive {
|
|
63
|
-
|
|
66
|
+
color: var(--destructive);
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
.focus\:ring-ring:focus {
|
|
67
|
-
|
|
70
|
+
--tw-ring-color: var(--ring);
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
.hover\:bg-primary\/90:hover {
|
|
71
|
-
|
|
74
|
+
background-color: oklch(from var(--primary) calc(l * 0.9) c h);
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
.hover\:text-foreground:hover {
|
|
75
|
-
|
|
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
|
-
"
|
|
4
|
-
"
|
|
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: [
|
|
15
|
+
plugins: [
|
|
16
|
+
bardiocDevAuth({ appName }),
|
|
17
|
+
vue(),
|
|
18
|
+
bardiocApp({ appName, port: {{PORT}} }),
|
|
19
|
+
tailwindcss(),
|
|
20
|
+
],
|
|
16
21
|
};
|
|
17
22
|
});
|