@falcondev-oss/nuxt-layers-base 0.8.0 → 0.10.0
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.
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
ButtonProps,
|
|
4
|
+
FooterProps,
|
|
5
|
+
FooterSlots,
|
|
6
|
+
HeaderProps,
|
|
7
|
+
HeaderSlots,
|
|
8
|
+
NavigationMenuItem,
|
|
9
|
+
NavigationMenuProps,
|
|
10
|
+
} from '@nuxt/ui'
|
|
3
11
|
import { omit, pickBy, pipe } from 'remeda'
|
|
4
12
|
|
|
5
13
|
defineProps<{
|
|
@@ -8,12 +16,14 @@ defineProps<{
|
|
|
8
16
|
src?: string
|
|
9
17
|
iconSrc?: string
|
|
10
18
|
}
|
|
11
|
-
|
|
19
|
+
navigation?: NavigationMenuProps
|
|
12
20
|
actions?: ButtonProps[]
|
|
21
|
+
ui?: HeaderProps['ui']
|
|
13
22
|
}
|
|
14
23
|
footer?: {
|
|
15
24
|
items?: NavigationMenuItem[]
|
|
16
25
|
actions?: ButtonProps[]
|
|
26
|
+
ui?: FooterProps['ui']
|
|
17
27
|
}
|
|
18
28
|
}>()
|
|
19
29
|
|
|
@@ -44,7 +54,7 @@ const omitFooterSlots = [
|
|
|
44
54
|
<!-- eslint-disable vue/require-explicit-slots -->
|
|
45
55
|
<template>
|
|
46
56
|
<div>
|
|
47
|
-
<UHeader v-if="header">
|
|
57
|
+
<UHeader v-if="header" :ui="header.ui">
|
|
48
58
|
<template v-if="header.logo || slots['header-title']" #title>
|
|
49
59
|
<slot name="header-title">
|
|
50
60
|
<template v-if="header.logo">
|
|
@@ -58,7 +68,7 @@ const omitFooterSlots = [
|
|
|
58
68
|
</slot>
|
|
59
69
|
</template>
|
|
60
70
|
|
|
61
|
-
<UNavigationMenu v-if="header.
|
|
71
|
+
<UNavigationMenu v-if="header.navigation" v-bind="header.navigation" />
|
|
62
72
|
|
|
63
73
|
<template v-if="header.actions || slots['header-right']" #right>
|
|
64
74
|
<slot name="header-right">
|
|
@@ -87,7 +97,7 @@ const omitFooterSlots = [
|
|
|
87
97
|
<UMain>
|
|
88
98
|
<slot />
|
|
89
99
|
</UMain>
|
|
90
|
-
<UFooter v-if="footer">
|
|
100
|
+
<UFooter v-if="footer" :ui="footer.ui">
|
|
91
101
|
<template #left>
|
|
92
102
|
<p class="text-muted text-sm">Copyright © {{ new Date().getFullYear() }}</p>
|
|
93
103
|
</template>
|
package/app/utils/plugins.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DehydratedState, QueryClientConfig, VueQueryPluginOptions } from '@tanstack/vue-query'
|
|
2
2
|
import type { AnyTRPCRouter } from '@trpc/server'
|
|
3
3
|
import type { ObjectPlugin } from 'nuxt/app'
|
|
4
|
+
import { typedFormDataLink } from '@falcondev-oss/trpc-typed-form-data/client'
|
|
4
5
|
import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
|
|
5
6
|
import {
|
|
6
7
|
dehydrate,
|
|
@@ -128,10 +129,15 @@ export function trpcPlugin<Router extends AnyTRPCRouter>(opts: TrpcNuxtPluginOpt
|
|
|
128
129
|
}),
|
|
129
130
|
false: splitLink({
|
|
130
131
|
condition: (op) => op.type === 'mutation',
|
|
131
|
-
true:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
true: [
|
|
133
|
+
typedFormDataLink<AnyTRPCRouter>({
|
|
134
|
+
transformer: superjson,
|
|
135
|
+
}),
|
|
136
|
+
httpLink({
|
|
137
|
+
transformer: superjson,
|
|
138
|
+
url: opts.url,
|
|
139
|
+
}),
|
|
140
|
+
],
|
|
135
141
|
false: httpBatchLink({
|
|
136
142
|
transformer: superjson,
|
|
137
143
|
url: opts.url,
|
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.
|
|
4
|
+
"version": "0.10.0",
|
|
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",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@falcondev-oss/form-core": "^0.18.5",
|
|
18
18
|
"@falcondev-oss/form-vue": "^0.18.5",
|
|
19
|
+
"@falcondev-oss/trpc-typed-form-data": "^0.1.1",
|
|
19
20
|
"@falcondev-oss/trpc-vue-query": "^0.5.2",
|
|
20
21
|
"@iconify-json/lucide": "^1.2.2",
|
|
21
22
|
"@internationalized/date": "^3.10.1",
|