notform-nuxt 1.0.0-alpha.2 → 1.0.0-alpha.6

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.d.mts CHANGED
@@ -1,9 +1,21 @@
1
1
  import { NuxtModule } from '@nuxt/schema';
2
+ export * from 'notform';
2
3
 
3
- interface ModuleOptions {
4
- enabled: boolean;
4
+ /** Nuxt module options for `notform` */
5
+ interface NotFormModuleOptions {
6
+ /** Enable auto imports for components and composables */
7
+ autoImport?: boolean;
5
8
  }
6
- declare const module$1: NuxtModule<ModuleOptions>;
9
+ declare const _default: NuxtModule<NotFormModuleOptions>;
7
10
 
8
- export { module$1 as default };
9
- export type { ModuleOptions };
11
+ declare module '@nuxt/schema' {
12
+ interface NuxtConfig {
13
+ notform?: NotFormModuleOptions;
14
+ }
15
+ interface NuxtOptions {
16
+ notform?: NotFormModuleOptions;
17
+ }
18
+ }
19
+
20
+ export { _default as default };
21
+ export type { NotFormModuleOptions };
package/dist/module.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "notform-nuxt",
3
3
  "configKey": "notform",
4
- "version": "1.0.0-alpha.2",
4
+ "compatibility": {
5
+ "nuxt": ">=4.0.0"
6
+ },
7
+ "version": "1.0.0-alpha.6",
5
8
  "builder": {
6
9
  "@nuxt/module-builder": "1.0.2",
7
10
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,13 +1,50 @@
1
- import { defineNuxtModule } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addComponent, addImports } from '@nuxt/kit';
2
+ export * from 'notform';
2
3
 
4
+ const components = [
5
+ "NotForm",
6
+ "NotField",
7
+ "NotArrayField",
8
+ "NotMessage"
9
+ ];
10
+ const composables = [
11
+ "useNotForm"
12
+ ];
3
13
  const module$1 = defineNuxtModule({
4
14
  meta: {
5
15
  name: "notform-nuxt",
6
- configKey: "notform"
16
+ configKey: "notform",
17
+ compatibility: {
18
+ nuxt: ">=4.0.0"
19
+ }
7
20
  },
8
21
  // Default configuration options of the Nuxt module
9
- defaults: {},
10
- setup(_options, _nuxt) {
22
+ defaults: {
23
+ autoImport: true
24
+ },
25
+ // Module factory
26
+ setup(options, nuxt) {
27
+ const { resolve } = createResolver(import.meta.url);
28
+ const runtimeExports = resolve("./runtime/notform");
29
+ nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
30
+ nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude || [];
31
+ nuxt.options.vite.optimizeDeps.exclude.push("notform");
32
+ if (options.autoImport) {
33
+ components.forEach((component) => {
34
+ addComponent({
35
+ name: component,
36
+ export: component,
37
+ filePath: runtimeExports
38
+ });
39
+ });
40
+ composables.forEach((composable) => {
41
+ addImports({
42
+ name: composable,
43
+ as: composable,
44
+ from: runtimeExports
45
+ });
46
+ });
47
+ }
11
48
  }
12
49
  });
13
50
 
@@ -0,0 +1,2 @@
1
+ export * from 'notform';
2
+ export type * from 'notform';
@@ -0,0 +1 @@
1
+ export * from "notform";
package/dist/types.d.mts CHANGED
@@ -1,3 +1,11 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
2
+
3
+ import type { default as Module } from './module.mjs'
4
+
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
+
1
7
  export { default } from './module.mjs'
2
8
 
3
- export { type ModuleOptions } from './module.mjs'
9
+ export { type NotFormModuleOptions } from './module.mjs'
10
+
11
+ export * from 'notform'
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "notform-nuxt",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.6",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "type": "module",
9
- "description": "Effortless Vue Forms Validation",
9
+ "description": "Official notform nuxt module - Effortless Vue Forms Validation",
10
10
  "author": "Favour Emeka <favorodera@gmail.com>",
11
11
  "license": "MIT",
12
12
  "homepage": "https://notform-docs.vercel.app/",
@@ -24,6 +24,7 @@
24
24
  }
25
25
  },
26
26
  "main": "./dist/module.mjs",
27
+ "types": "./dist/types.d.mts",
27
28
  "typesVersions": {
28
29
  "*": {
29
30
  ".": [
@@ -35,7 +36,8 @@
35
36
  "dist"
36
37
  ],
37
38
  "dependencies": {
38
- "@nuxt/kit": "^4.3.0"
39
+ "@nuxt/kit": "^4.3.0",
40
+ "notform": "1.0.0-alpha.6"
39
41
  },
40
42
  "devDependencies": {
41
43
  "@nuxt/devtools": "^3.1.1",
@@ -47,7 +49,6 @@
47
49
  "@types/node": "latest",
48
50
  "@vitejs/plugin-vue": "^6.0.3",
49
51
  "@vitejs/plugin-vue-jsx": "^5.1.3",
50
- "changelogen": "^0.6.2",
51
52
  "eslint": "^9.39.2",
52
53
  "nitropack": "^2.13.1",
53
54
  "nuxt": "^4.3.0",
@@ -68,9 +69,10 @@
68
69
  "nuxt form validator"
69
70
  ],
70
71
  "scripts": {
71
- "build": "nuxt-module-build build",
72
72
  "dev": "nuxt-module-build build --stub && nuxt-module-build prepare",
73
+ "build": "nuxt-module-build build",
73
74
  "lint": "eslint . --fix",
74
- "typecheck": "vue-tsc --noEmit"
75
+ "typecheck": "vue-tsc --noEmit",
76
+ "cleanup": "rm -rf dist node_modules .turbo .nuxt"
75
77
  }
76
78
  }
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../../.nuxt/tsconfig.server.json",
3
- }