@merkaly/nuxt 0.11.0 → 0.11.2

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.14.0"
6
6
  },
7
- "version": "0.11.0",
7
+ "version": "0.11.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -44,3 +44,7 @@ hook("page:finish", () => regenerate());
44
44
  </BApp>
45
45
  </main>
46
46
  </template>
47
+
48
+ <style>
49
+ :root{--nv-z:1090}
50
+ </style>
@@ -81,8 +81,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  }>, {
82
82
  mode: PlaceTypes;
83
83
  disabled: boolean;
84
- placeholder: string;
85
84
  countries: string[];
85
+ placeholder: string;
86
86
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
87
87
  declare const _default: typeof __VLS_export;
88
88
  export default _default;
@@ -81,8 +81,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  }>, {
82
82
  mode: PlaceTypes;
83
83
  disabled: boolean;
84
- placeholder: string;
85
84
  countries: string[];
85
+ placeholder: string;
86
86
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
87
87
  declare const _default: typeof __VLS_export;
88
88
  export default _default;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed } from "vue";
2
+ import { computed, useAttrs, useId } from "#imports";
3
3
  import { Money3Component } from "v-money3";
4
4
  import { useMoneyFormat } from "../../composables/useMoneyFormat";
5
5
  import { isCurrencyCode } from "../../utils/formatMoney";
@@ -9,6 +9,9 @@ const money = defineModel({ type: null, ...{
9
9
  set: (v) => Math.trunc(v * 100),
10
10
  type: [String, Number]
11
11
  } });
12
+ const attrs = useAttrs();
13
+ const generatedId = useId();
14
+ const inputId = computed(() => attrs.id ?? generatedId);
12
15
  const props = defineProps({
13
16
  /** ISO 4217 code (`BRL`). Falls back to the app default. */
14
17
  currency: { type: String, default: void 0 },
@@ -52,6 +55,7 @@ const config = computed(() => ({
52
55
 
53
56
  <template>
54
57
  <Money3Component
58
+ :id="inputId"
55
59
  v-model.number="money"
56
60
  :max="props.max"
57
61
  :min="props.min"
@@ -1,5 +1,4 @@
1
- import { getCurrentInstance, onServerPrefetch, reactive, ref } from "vue";
2
- import { useNuxtApp, useState } from "#imports";
1
+ import { getCurrentInstance, onServerPrefetch, reactive, ref, useNuxtApp, useState } from "#imports";
3
2
  function useApi(callback) {
4
3
  const { $api } = useNuxtApp();
5
4
  const controller = new AbortController();
@@ -36,9 +35,9 @@ function useApi(callback) {
36
35
  });
37
36
  };
38
37
  if (initialOptions.immediate) {
39
- if (import.meta.server && getCurrentInstance()) {
40
- onServerPrefetch(() => execute().then(() => void (prefetched.value = true)));
41
- } else if (!(nuxtApp.isHydrating && prefetched.value)) {
38
+ const instance = getCurrentInstance();
39
+ if (instance) onServerPrefetch(() => execute().then(() => void (prefetched.value = true)));
40
+ if (import.meta.server ? !instance : !(nuxtApp.isHydrating && prefetched.value)) {
42
41
  void execute();
43
42
  }
44
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/nuxt",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/merkaly-io/nuxt.git"