@falcondev-oss/nuxt-layers-base 0.35.9 → 0.36.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.
@@ -145,7 +145,7 @@ const [DefineErrorTemplate, ErrorTemplate] = createReusableTemplate({
145
145
  >
146
146
  <UIcon name="lucide:circle-alert" class="text-error" />
147
147
  <template #content>
148
- <div class="text-(--ui-color-neutral-800) max-w-sm text-xs">
148
+ <div class="max-w-sm text-xs text-(--ui-color-neutral-800)">
149
149
  <ErrorTemplate :errors="field.errors" />
150
150
  </div>
151
151
  </template>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import type { Toast } from '#ui/composables'
3
2
  import type { FormHandle } from '@falcondev-oss/form-core'
4
3
  import type { ButtonProps } from '@nuxt/ui'
4
+ import type { Toast } from '#ui/composables'
5
5
 
6
6
  const props = withDefaults(
7
7
  defineProps<{
@@ -80,7 +80,7 @@ const rootErrors = computed(() => props.form.errors?.filter((error) => error.pat
80
80
  </li>
81
81
  </ul>
82
82
 
83
- <hr class="text-(--ui-border-muted) h-px w-full" />
83
+ <hr class="h-px w-full text-(--ui-border-muted)" />
84
84
 
85
85
  <div v-show="!actionsTeleportTo" class="flex items-center justify-end gap-4">
86
86
  <Teleport defer :disabled="!actionsTeleportTo" :to="actionsTeleportTo">
@@ -17,7 +17,6 @@ const model = defineModel<number | null>({
17
17
  required: true,
18
18
  })
19
19
 
20
- // eslint-disable-next-line unicorn/prefer-string-raw
21
20
  const parser = regex('^-?(?<hours>\\d{1,}):?(?<minutes>\\d{1,2})?$')
22
21
  const duration = computed({
23
22
  get: () => {
@@ -3,29 +3,32 @@ import type { FileUploadEmits, FileUploadProps } from '@nuxt/ui'
3
3
  import { useForwardPropsEmits } from 'reka-ui'
4
4
  import { omit } from 'remeda'
5
5
 
6
- const props = defineProps<
7
- FileUploadProps<Multiple> & {
8
- /**
9
- * Set to `false` to disable compression
10
- */
11
- compression?:
12
- | boolean
13
- | {
14
- /**
15
- * @default 1920
16
- */
17
- maxDimension?: number
18
- /**
19
- * @default 0.85
20
- */
21
- quality?: number
22
- /**
23
- * @default 'image/webp'
24
- */
25
- outputType?: string
26
- }
27
- }
28
- >()
6
+ const props = withDefaults(
7
+ defineProps<
8
+ FileUploadProps<Multiple> & {
9
+ /**
10
+ * Set to `false` to disable compression
11
+ */
12
+ compression?:
13
+ | boolean
14
+ | {
15
+ /**
16
+ * @default 1920
17
+ */
18
+ maxDimension?: number
19
+ /**
20
+ * @default 0.85
21
+ */
22
+ quality?: number
23
+ /**
24
+ * @default 'image/webp'
25
+ */
26
+ outputType?: string
27
+ }
28
+ }
29
+ >(),
30
+ { compression: true },
31
+ )
29
32
  const emit = defineEmits<
30
33
  FileUploadEmits & {
31
34
  compressed: [
@@ -58,24 +61,20 @@ async function forwardFiles(files: File | File[] | null | undefined) {
58
61
  }),
59
62
  )
60
63
 
61
- model.value = (forwarded.value.multiple ? compressed : compressed[0]!) as Files
64
+ model.value = (props.multiple ? compressed : compressed[0]!) as Files
62
65
  }
63
66
 
64
67
  async function compressImage(file: File) {
65
- if (forwarded.value.compression === false) return file
68
+ if (props.compression === false) return file
66
69
  if (compressedFiles.has(file)) return compressedFiles.get(file)!
67
70
 
68
71
  const maxDimension =
69
- typeof forwarded.value.compression === 'object'
70
- ? (forwarded.value.compression?.maxDimension ?? 1920)
71
- : 1920
72
+ typeof props.compression === 'object' ? (props.compression?.maxDimension ?? 1920) : 1920
72
73
  const quality =
73
- typeof forwarded.value.compression === 'object'
74
- ? (forwarded.value.compression?.quality ?? 0.85)
75
- : 0.85
74
+ typeof props.compression === 'object' ? (props.compression?.quality ?? 0.85) : 0.85
76
75
  const outputType =
77
- typeof forwarded.value.compression === 'object'
78
- ? (forwarded.value.compression?.outputType ?? 'image/webp')
76
+ typeof props.compression === 'object'
77
+ ? (props.compression?.outputType ?? 'image/webp')
79
78
  : 'image/webp'
80
79
 
81
80
  const img = new Image()
@@ -49,15 +49,15 @@ export function useTableColumns<T extends MaybeRef<Record<string, any>[] | undef
49
49
  icon: 'lucide:trash',
50
50
  color: 'error',
51
51
  loadingAuto: true,
52
- onClick: async () => {
53
- await actions.onDelete?.(row)
52
+ onClick: () => {
53
+ actions.onDelete?.(row)
54
54
  },
55
55
  })
56
56
 
57
57
  return (
58
58
  <UActions
59
59
  defaults={rowActionDefaults}
60
- class="gap-2! justify-end"
60
+ class="justify-end gap-2!"
61
61
  actions={rowActions}
62
62
  />
63
63
  )
@@ -1,7 +1,6 @@
1
- import type { ObjectPlugin } from '#app'
2
1
  import type { DehydratedState, QueryClientConfig, VueQueryPluginOptions } from '@tanstack/vue-query'
3
2
  import type { AnyTRPCRouter } from '@trpc/server'
4
- import { useState } from '#app'
3
+ import type { ObjectPlugin } from '#app'
5
4
  import { typedFormDataLink } from '@falcondev-oss/trpc-typed-form-data/client'
6
5
  import { createTRPCVueQueryClient } from '@falcondev-oss/trpc-vue-query'
7
6
  import {
@@ -17,6 +16,7 @@ import { httpSubscriptionLink, isTRPCClientError, splitLink, TRPCClientError } f
17
16
  import defu from 'defu'
18
17
  import superjson from 'superjson'
19
18
  import { httpBatchLink, httpLink } from 'trpc-nuxt/client'
19
+ import { useState } from '#app'
20
20
 
21
21
  interface VueQueryNuxtPluginOptions {
22
22
  queryClientOptions?: QueryClientConfig
@@ -46,13 +46,12 @@ export function vueQueryPlugin(opts?: VueQueryNuxtPluginOptions) {
46
46
  name: 'vue-query',
47
47
  setup(nuxt) {
48
48
  const toast = useToast()
49
- const vueQueryState = useState<DehydratedState | null>('vue-query')
49
+ const vueQueryState = useState<Partial<DehydratedState>>('vue-query')
50
50
 
51
51
  const queryClient = new QueryClient(
52
52
  defu<QueryClientConfig, QueryClientConfig[]>(opts?.queryClientOptions, {
53
53
  defaultOptions: {
54
54
  queries: {
55
- experimental_prefetchInRender: true,
56
55
  retry(failureCount, error) {
57
56
  if (
58
57
  isTRPCClientError<AnyTRPCRouter>(error) &&
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.35.9",
4
+ "version": "0.36.1",
5
5
  "description": "Nuxt layer with lots of useful helpers and @nuxt/ui components",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -32,34 +32,34 @@
32
32
  "vue": ">=3.5.40"
33
33
  },
34
34
  "dependencies": {
35
- "@falcondev-oss/trpc-typed-form-data": "^0.4.3",
35
+ "@falcondev-oss/trpc-typed-form-data": "^0.5.3",
36
36
  "@falcondev-oss/trpc-vue-query": "^0.5.4",
37
- "@iconify-json/lucide": "^1.2.114",
38
- "@nuxt/icon": "^2.2.3",
37
+ "@iconify-json/lucide": "^1.2.125",
38
+ "@nuxt/icon": "^2.5.0",
39
39
  "@nuxtjs/color-mode": "^4.0.1",
40
- "@tanstack/vue-query": "^5.101.0",
40
+ "@tanstack/vue-query": "^5.102.1",
41
41
  "@trpc/client": "^11.18.0",
42
42
  "@trpc/server": "^11.18.0",
43
- "@vue/devtools-api": "^8.1.3",
44
- "@vueuse/core": "^14.3.0",
45
- "@vueuse/nuxt": "^14.3.0",
46
- "@vueuse/router": "^14.3.0",
47
- "arkregex": "^0.0.5",
43
+ "@vue/devtools-api": "^8.2.1",
44
+ "@vueuse/core": "^14.4.0",
45
+ "@vueuse/nuxt": "^14.4.0",
46
+ "@vueuse/router": "^14.4.0",
47
+ "arkregex": "^0.0.8",
48
48
  "consola": "^3.4.2",
49
49
  "defu": "^6.1.7",
50
50
  "maska": "^3.2.0",
51
- "reka-ui": "~2.9.10",
52
- "remeda": "^2.39.0",
51
+ "reka-ui": "~2.10.3",
52
+ "remeda": "^2.43.0",
53
53
  "superjson": "^2.2.6",
54
- "tailwindcss": "^4.3.1",
55
- "trpc-nuxt": "^2.1.1",
56
- "type-fest": "^5.7.0",
57
- "vue-router": "^5.1.0"
54
+ "tailwindcss": "^4.3.3",
55
+ "trpc-nuxt": "^2.1.2",
56
+ "type-fest": "^5.8.0",
57
+ "vue-router": "^5.2.0"
58
58
  },
59
59
  "devDependencies": {
60
- "nuxt": "^4.4.8",
60
+ "nuxt": "^4.5.2",
61
61
  "typescript": "^5.9.3",
62
- "vue-tsc": "^3.3.5",
62
+ "vue-tsc": "^3.3.11",
63
63
  "zod": "^4.4.3"
64
64
  },
65
65
  "scripts": {