@falcondev-oss/nuxt-layers-base 0.2.2 → 0.4.1

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/app/app.config.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export default defineAppConfig({
2
2
  ui: {
3
3
  colors: {
4
- neutral: 'gray',
4
+ primary: 'brand-primary',
5
+ secondary: 'brand-secondary',
6
+ neutral: 'slate',
5
7
  },
6
8
  },
7
9
  })
@@ -1,6 +1,9 @@
1
1
  @import 'tailwindcss';
2
2
  @import '@nuxt/ui';
3
3
 
4
+ @import './theme.css';
5
+ @import './utilities.css';
6
+
4
7
  @layer base {
5
8
  html,
6
9
  body,
@@ -0,0 +1,31 @@
1
+ @theme static {
2
+ --color-brand-primary-50: color-mix(in oklch, var(--color-brand-primary) 8%, white);
3
+ --color-brand-primary-100: color-mix(in oklch, var(--color-brand-primary) 16%, white);
4
+ --color-brand-primary-200: color-mix(in oklch, var(--color-brand-primary) 30%, white);
5
+ --color-brand-primary-300: color-mix(in oklch, var(--color-brand-primary) 50%, white);
6
+ --color-brand-primary-400: color-mix(in oklch, var(--color-brand-primary) 80%, white);
7
+ --color-brand-primary-500: var(--color-brand-primary);
8
+ --color-brand-primary-600: color-mix(in oklch, var(--color-brand-primary), black 16%);
9
+ --color-brand-primary-700: color-mix(in oklch, var(--color-brand-primary), black 30%);
10
+ --color-brand-primary-800: color-mix(in oklch, var(--color-brand-primary), black 42%);
11
+ --color-brand-primary-900: color-mix(in oklch, var(--color-brand-primary), black 55%);
12
+ --color-brand-primary-950: color-mix(in oklch, var(--color-brand-primary), black 64%);
13
+
14
+ --color-brand-secondary-50: color-mix(in oklch, var(--color-brand-secondary) 8%, white);
15
+ --color-brand-secondary-100: color-mix(in oklch, var(--color-brand-secondary) 16%, white);
16
+ --color-brand-secondary-200: color-mix(in oklch, var(--color-brand-secondary) 30%, white);
17
+ --color-brand-secondary-300: color-mix(in oklch, var(--color-brand-secondary) 50%, white);
18
+ --color-brand-secondary-400: color-mix(in oklch, var(--color-brand-secondary) 80%, white);
19
+ --color-brand-secondary-500: var(--color-brand-secondary);
20
+ --color-brand-secondary-600: color-mix(in oklch, var(--color-brand-secondary), black 16%);
21
+ --color-brand-secondary-700: color-mix(in oklch, var(--color-brand-secondary), black 30%);
22
+ --color-brand-secondary-800: color-mix(in oklch, var(--color-brand-secondary), black 42%);
23
+ --color-brand-secondary-900: color-mix(in oklch, var(--color-brand-secondary), black 55%);
24
+ --color-brand-secondary-950: color-mix(in oklch, var(--color-brand-secondary), black 64%);
25
+
26
+ --color-slate-*: initial;
27
+ --color-gray-*: initial;
28
+ --color-zinc-*: initial;
29
+ --color-neutral-*: initial;
30
+ --color-stone-*: initial;
31
+ }
@@ -13,8 +13,11 @@ const config = useRuntimeConfig()
13
13
 
14
14
  <template>
15
15
  <UApp v-bind="forwarded.app" :nonce="config.public.projectId">
16
- <NuxtLayout>
17
- <NuxtPage />
18
- </NuxtLayout>
16
+ <NuxtLoadingIndicator color="var(--color-brand-secondary, var(--color-brand-primary))" />
17
+ <Suspense>
18
+ <NuxtLayout>
19
+ <NuxtPage />
20
+ </NuxtLayout>
21
+ </Suspense>
19
22
  </UApp>
20
23
  </template>
@@ -7,6 +7,7 @@ import {
7
7
  hydrate,
8
8
  MutationCache,
9
9
  QueryClient,
10
+ useIsFetching,
10
11
  useQueryClient,
11
12
  VueQueryPlugin,
12
13
  } from '@tanstack/vue-query'
@@ -83,6 +84,23 @@ export function vueQueryPlugin(opts?: VueQueryNuxtPluginOptions) {
83
84
  hydrate(queryClient, vueQueryState.value)
84
85
  })
85
86
  }
87
+
88
+ // global nuxt loading indicator
89
+ const loadingIndicator = useLoadingIndicator()
90
+ const isFetching = useIsFetching()
91
+
92
+ let timeout: ReturnType<typeof setTimeout> | null = null
93
+ watch(isFetching, () => {
94
+ if (isFetching.value > 0) {
95
+ loadingIndicator.start()
96
+ timeout = setTimeout(() => {
97
+ loadingIndicator.set(0)
98
+ }, 300)
99
+ } else {
100
+ if (timeout) clearTimeout(timeout)
101
+ loadingIndicator.finish()
102
+ }
103
+ })
86
104
  },
87
105
  } satisfies ObjectPlugin
88
106
  }
package/nuxt.config.ts CHANGED
@@ -20,7 +20,16 @@ export default defineNuxtConfig({
20
20
  strict: true,
21
21
  },
22
22
  nitro: {
23
+ experimental: {
24
+ tasks: true,
25
+ },
23
26
  typescript: {
27
+ tsConfig: {
28
+ compilerOptions: {
29
+ noImplicitOverride: true,
30
+ noUncheckedIndexedAccess: true,
31
+ },
32
+ },
24
33
  strict: true,
25
34
  },
26
35
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/nuxt-layers-base",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.4.1",
5
5
  "description": "Nuxt layer with lots of useful helpers and @nuxt/ui components",
6
6
  "license": "MIT",
7
7
  "repository": "github:falcondev-oss/nuxt-layers",
@@ -13,7 +13,7 @@
13
13
  "node": "24",
14
14
  "pnpm": "10"
15
15
  },
16
- "dependencies": {
16
+ "peerDependencies": {
17
17
  "@falcondev-oss/form-core": "^0.18.5",
18
18
  "@falcondev-oss/form-vue": "^0.18.5",
19
19
  "@falcondev-oss/trpc-vue-query": "^0.5.2",
@@ -33,21 +33,21 @@
33
33
  "consola": "^3.4.2",
34
34
  "defu": "^6.1.4",
35
35
  "maska": "^3.2.0",
36
+ "nuxt": "^4.2.2",
36
37
  "reka-ui": "^2.7.0",
37
38
  "remeda": "^2.33.1",
38
39
  "superjson": "^2.2.6",
39
40
  "tailwindcss": "^4.1.18",
40
- "trpc-nuxt": "^2.0.1"
41
+ "trpc-nuxt": "^2.0.1",
42
+ "type-fest": "^5.4.0",
43
+ "vue": "^3.5.26",
44
+ "vue-router": "^4.6.4"
41
45
  },
42
46
  "devDependencies": {
43
47
  "@falcondev-oss/configs": "^5.0.2",
44
48
  "eslint": "^9.39.2",
45
- "nuxt": "^4.2.2",
46
49
  "prettier": "^3.7.4",
47
- "type-fest": "^5.3.1",
48
50
  "typescript": "^5.9.3",
49
- "vue": "^3.5.26",
50
- "vue-router": "^4.6.4",
51
51
  "vue-tsc": "^3.2.2",
52
52
  "zod": "^4.3.5"
53
53
  },