@notform/nuxt 0.0.0-stage → 4.0.0-alpha.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Favour Emeka
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,53 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">
2
+ <img alt="NotForm Logo" loading="lazy" width="50" height="50" decoding="async" data-nimg="1" style="color:transparent" src="https://notformdocs.vercel.app/favicon.svg">
3
+ </br>
4
+ NotForm for Nuxt
5
+ </h1>
2
6
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
7
+ <p align="center">
8
+ Official Nuxt integration for NotForm.
9
+ </p>
10
+
11
+ This module registers NotForm's components and composable so you can use them in any page or component without importing them. The APIs are exactly the ones in the core package.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pnpm add @notform/nuxt
17
+ ```
18
+
19
+ The module brings `notform` with it. Add `notform` to your own dependencies only if you want to import its types directly.
20
+
21
+ Register the module in `nuxt.config.ts`:
22
+
23
+ ```ts
24
+ export default defineNuxtConfig({
25
+ modules: ['@notform/nuxt'],
26
+ })
27
+ ```
28
+
29
+ ## Auto-imports
30
+
31
+ The module registers `Form`, `Field`, `ArrayField`, `FieldError`, and `useForm`.
32
+
33
+ These APIs are otherwise identical to the vue package.
34
+
35
+ Use `notform.aliases` to change selected names:
36
+
37
+ ```ts
38
+ export default defineNuxtConfig({
39
+ modules: ['@notform/nuxt'],
40
+ notform: {
41
+ aliases: {
42
+ Form: 'AppForm',
43
+ useForm: 'useAppForm',
44
+ },
45
+ },
46
+ })
47
+ ```
48
+
49
+ See the [Nuxt guide](https://notformdocs.vercel.app/docs/getting-started/nuxt-module) for setup details.
50
+
51
+ ## License
52
+
53
+ MIT © [Favour Emeka](https://github.com/favorodera)
@@ -0,0 +1,11 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ declare const componentNames: readonly ["Form", "Field", "ArrayField", "FieldError"];
4
+ declare const composableName: "useForm";
5
+ interface ModuleOptions {
6
+ aliases?: Partial<Record<typeof componentNames[number] | typeof composableName, string>>;
7
+ }
8
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
9
+
10
+ export { _default as default };
11
+ export type { ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "compatibility": {
3
+ "nuxt": ">=4.0.0"
4
+ },
5
+ "configKey": "notform",
6
+ "name": "@notform/nuxt",
7
+ "version": "4.0.0-alpha.0",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.3",
10
+ "unbuild": "unknown"
11
+ }
12
+ }
@@ -0,0 +1,40 @@
1
+ import { defineNuxtModule, createResolver, addComponent, addImports } from '@nuxt/kit';
2
+
3
+ const name = "@notform/nuxt";
4
+ const version = "4.0.0-alpha.0";
5
+ const packageJson = {
6
+ name: name,
7
+ version: version};
8
+
9
+ const componentNames = ["Form", "Field", "ArrayField", "FieldError"];
10
+ const composableName = "useForm";
11
+ const module$1 = defineNuxtModule({
12
+ meta: {
13
+ compatibility: { nuxt: ">=4.0.0" },
14
+ configKey: "notform",
15
+ name: packageJson.name,
16
+ version: packageJson.version
17
+ },
18
+ async setup(options) {
19
+ const { resolvePath } = createResolver(import.meta.url);
20
+ const corePackagePath = await resolvePath("notform");
21
+ for (const componentExportName of componentNames) {
22
+ const registeredComponentName = options.aliases?.[componentExportName] ?? componentExportName;
23
+ addComponent({
24
+ export: componentExportName,
25
+ filePath: corePackagePath,
26
+ name: registeredComponentName,
27
+ priority: 1
28
+ });
29
+ }
30
+ const registeredComposableName = options.aliases?.[composableName] ?? composableName;
31
+ addImports({
32
+ as: registeredComposableName,
33
+ from: corePackagePath,
34
+ name: composableName,
35
+ priority: 1
36
+ });
37
+ }
38
+ });
39
+
40
+ export { module$1 as default };
@@ -0,0 +1,3 @@
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,66 @@
1
1
  {
2
2
  "name": "@notform/nuxt",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "type": "module",
4
+ "version": "4.0.0-alpha.0",
5
+ "private": false,
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "description": "Official Nuxt integration for NotForm.",
10
+ "author": "Favour Emeka <favorodera@gmail.com>",
11
+ "license": "MIT",
12
+ "funding": "https://github.com/sponsors/favorodera",
13
+ "homepage": "https://notformdocs.vercel.app/",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/favorodera/notform.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/favorodera/notform/issues"
20
+ },
21
+ "keywords": [
22
+ "notform",
23
+ "vue",
24
+ "nuxt",
25
+ "form",
26
+ "standard-schema"
27
+ ],
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/types.d.mts",
31
+ "import": "./dist/module.mjs"
32
+ }
33
+ },
34
+ "main": "./dist/module.mjs",
35
+ "typesVersions": {
36
+ "*": {
37
+ ".": [
38
+ "./dist/types.d.mts"
39
+ ]
40
+ }
41
+ },
42
+ "files": [
43
+ "dist"
44
+ ],
45
+ "engines": {
46
+ "node": ">=24.0.0"
47
+ },
48
+ "dependencies": {
49
+ "@nuxt/kit": "^4.6.4",
50
+ "notform": "4.0.0-alpha.0"
51
+ },
52
+ "devDependencies": {
53
+ "@nuxt/module-builder": "^1.0.3",
54
+ "@nuxt/schema": "^4.6.4",
55
+ "@types/node": "^26.6.5",
56
+ "nuxt": "^4.6.4",
57
+ "vue-tsc": "^3.3.13"
58
+ },
59
+ "scripts": {
60
+ "build": "nuxt-module-build prepare && nuxt-module-build build",
61
+ "dev": "nuxt-module-build prepare && nuxt-module-build build --stub",
62
+ "lint": "nuxt-module-build prepare && eslint .",
63
+ "lint:fix": "nuxt-module-build prepare && eslint . --fix",
64
+ "typecheck": "nuxt-module-build prepare && vue-tsc --noEmit"
65
+ }
6
66
  }