notform-nuxt 2.1.1 → 2.1.3

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 CHANGED
@@ -25,9 +25,7 @@ Add `notform-nuxt` to the `modules` section of your `nuxt.config.ts`:
25
25
 
26
26
  ```ts
27
27
  export default defineNuxtConfig({
28
- modules: [
29
- 'notform-nuxt'
30
- ]
28
+ modules: ['notform-nuxt'],
31
29
  })
32
30
  ```
33
31
 
@@ -48,29 +46,44 @@ After installing the module, you can use NotForm directly in your components:
48
46
  import { z } from 'zod'
49
47
 
50
48
  const schema = z.object({
51
- name: z.string().min(1, 'Name is required'),
52
49
  email: z.string().email('Invalid email'),
50
+ name: z.string().min(1, 'Name is required'),
53
51
  })
54
52
 
55
53
  const form = useNotForm({
56
- schema,
57
54
  onSubmit: (values) => {
58
55
  console.log('Form submitted:', values)
59
56
  },
57
+ schema,
60
58
  })
61
59
  </script>
62
60
 
63
61
  <template>
64
- <NotForm :form="form" @submit="form.submit">
62
+ <NotForm
63
+ :form="form"
64
+ @submit="form.submit"
65
+ >
65
66
  <NotField path="name">
66
- <input v-model="form.values.name" type="text" />
67
+ <input
68
+ v-model="form.values.name"
69
+ type="text"
70
+ >
71
+
67
72
  <NotMessage path="name" />
68
73
  </NotField>
74
+
69
75
  <NotField path="email">
70
- <input v-model="form.values.email" type="email" />
76
+ <input
77
+ v-model="form.values.email"
78
+ type="email"
79
+ >
80
+
71
81
  <NotMessage path="email" />
72
82
  </NotField>
73
- <button type="submit">Submit</button>
83
+
84
+ <button type="submit">
85
+ Submit
86
+ </button>
74
87
  </NotForm>
75
88
  </template>
76
89
  ```
package/dist/module.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
- "name": "notform-nuxt",
3
- "configKey": "notform",
4
2
  "compatibility": {
5
3
  "nuxt": ">=4.0.0"
6
4
  },
7
- "version": "2.1.1",
5
+ "configKey": "notform",
6
+ "name": "notform-nuxt",
7
+ "version": "2.1.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addComponent, addImports } from '@nuxt/kit';
1
+ import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit';
2
2
 
3
3
  const components = [
4
4
  "NotForm",
@@ -6,35 +6,26 @@ const components = [
6
6
  "NotArrayField",
7
7
  "NotMessage"
8
8
  ];
9
- const composables = [
10
- "useNotForm"
11
- ];
12
9
  const module$1 = defineNuxtModule({
13
10
  meta: {
14
- name: "notform-nuxt",
15
- configKey: "notform",
16
11
  compatibility: {
17
12
  nuxt: ">=4.0.0"
18
- }
13
+ },
14
+ configKey: "notform",
15
+ name: "notform-nuxt"
19
16
  },
20
- // Module factory
21
17
  setup() {
22
- const { resolve } = createResolver(import.meta.url);
23
- const componentsRuntime = resolve("./runtime/components");
24
- const composablesRuntime = resolve("./runtime/composables");
25
- components.forEach((name) => {
18
+ for (const name of components) {
26
19
  addComponent({
27
- name,
28
20
  export: name,
29
- filePath: componentsRuntime
30
- });
31
- });
32
- composables.forEach((composable) => {
33
- addImports({
34
- name: composable,
35
- as: composable,
36
- from: composablesRuntime
21
+ filePath: "notform",
22
+ name
37
23
  });
24
+ }
25
+ addImports({
26
+ as: "useNotForm",
27
+ from: "notform",
28
+ name: "useNotForm"
38
29
  });
39
30
  }
40
31
  });
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "notform-nuxt",
3
- "version": "2.1.1",
3
+ "type": "module",
4
+ "version": "2.1.3",
4
5
  "private": false,
5
6
  "publishConfig": {
6
7
  "access": "public"
7
8
  },
8
- "type": "module",
9
9
  "description": "Official notform nuxt module - Vue Forms Without the Friction",
10
10
  "author": "Favour Emeka <favorodera@gmail.com>",
11
11
  "license": "MIT",
12
+ "funding": "https://github.com/sponsors/favorodera",
12
13
  "homepage": "https://notformdocs.vercel.app/",
13
14
  "repository": {
14
15
  "type": "git",
@@ -17,6 +18,14 @@
17
18
  "bugs": {
18
19
  "url": "https://github.com/favorodera/notform/issues"
19
20
  },
21
+ "keywords": [
22
+ "notform-nuxt",
23
+ "nuxt",
24
+ "form",
25
+ "nuxt form",
26
+ "validator",
27
+ "nuxt form validator"
28
+ ],
20
29
  "exports": {
21
30
  ".": {
22
31
  "types": "./dist/types.d.mts",
@@ -34,35 +43,29 @@
34
43
  "files": [
35
44
  "dist"
36
45
  ],
37
- "dependencies": {
38
- "@nuxt/kit": "^4.4.2",
39
- "notform": "2.1.1"
40
- },
41
- "devDependencies": {
42
- "@nuxt/module-builder": "^1.0.2",
43
- "@nuxt/schema": "^4.4.2",
44
- "nuxt": "^4.4.6",
45
- "vue-tsc": "^3.2.6"
46
+ "engines": {
47
+ "node": ">=22.0.0",
48
+ "pnpm": ">=11.0.0"
46
49
  },
47
50
  "peerDependencies": {
51
+ "notform": "^2.1.0",
48
52
  "nuxt": "^4.0.0"
49
53
  },
50
- "engines": {
51
- "node": ">=22.0.0",
52
- "pnpm": ">=11.0.0"
54
+ "dependencies": {
55
+ "@nuxt/kit": "4.4.8",
56
+ "notform": "2.1.3"
57
+ },
58
+ "devDependencies": {
59
+ "@favorodera/eslint-config": "^0.1.4",
60
+ "@nuxt/module-builder": "^1.0.2",
61
+ "@nuxt/schema": "^4.4.8",
62
+ "nuxt": "4.4.8",
63
+ "vue-tsc": "^3.3.5"
53
64
  },
54
- "keywords": [
55
- "notform-nuxt",
56
- "nuxt",
57
- "form",
58
- "nuxt form",
59
- "validator",
60
- "nuxt form validator"
61
- ],
62
65
  "scripts": {
63
66
  "dev": "nuxt prepare && nuxt-module-build build --stub",
64
67
  "build": "nuxt prepare && nuxt-module-build build",
65
- "typecheck": "nuxt prepare && vue-tsc --noEmit",
66
- "lint": "eslint . --fix"
68
+ "typecheck": "nuxt prepare && nuxt typecheck",
69
+ "lint": "nuxt prepare && eslint . --fix"
67
70
  }
68
71
  }
@@ -1 +0,0 @@
1
- export { NotForm, NotField, NotArrayField, NotMessage } from 'notform';
@@ -1 +0,0 @@
1
- export { NotForm, NotField, NotArrayField, NotMessage } from "notform";
@@ -1 +0,0 @@
1
- export { useNotForm } from 'notform';
@@ -1 +0,0 @@
1
- export { useNotForm } from "notform";