jsonforms-nuxt-ui-renderers 0.1.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.
- package/LICENSE +22 -0
- package/README.md +66 -0
- package/dist/index.cjs +896 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +895 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenApp contributors
|
|
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.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# jsonforms-nuxt-ui-renderers
|
|
2
|
+
|
|
3
|
+
JSONForms renderer set for **Nuxt UI** (`@nuxt/ui`) on Vue 3 / Nuxt.
|
|
4
|
+
|
|
5
|
+
This package provides a `renderers` registry you pass to `@jsonforms/vue`'s `JsonForms` component.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add jsonforms-nuxt-ui-renderers @jsonforms/core @jsonforms/vue
|
|
11
|
+
pnpm add -D @nuxt/ui
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Nuxt UI should be installed/configured in your Nuxt app (see Nuxt UI docs).
|
|
15
|
+
|
|
16
|
+
## Usage (Nuxt / Vue)
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { JsonForms } from '@jsonforms/vue'
|
|
20
|
+
import { nuxtUiRenderers } from 'jsonforms-nuxt-ui-renderers'
|
|
21
|
+
|
|
22
|
+
// <JsonForms :schema="schema" :uischema="uischema" :data="data" :renderers="nuxtUiRenderers" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Important
|
|
26
|
+
|
|
27
|
+
- These renderers **resolve Nuxt UI components by name** (e.g. `UInput`, `UFormField`, `UButton`).
|
|
28
|
+
Your app must register Nuxt UI components globally (Nuxt does this when you use the `@nuxt/ui` module).
|
|
29
|
+
- If you override component names or use a different UI library, these renderers will not work out of the box.
|
|
30
|
+
|
|
31
|
+
## Supported UI schema / schema constructs
|
|
32
|
+
|
|
33
|
+
- **Controls**: string, multiline string, number, integer, boolean, enum
|
|
34
|
+
- **Layouts**: `VerticalLayout`, `HorizontalLayout`, `Group`, `Label`, `Category`, `Categorization`
|
|
35
|
+
- **Complex**: arrays (list UI), objects (delegates to generated/registered detail UI schema)
|
|
36
|
+
|
|
37
|
+
## Contributing
|
|
38
|
+
|
|
39
|
+
- Install deps: `pnpm install`
|
|
40
|
+
- Run tests: `pnpm test`
|
|
41
|
+
- Build: `pnpm build`
|
|
42
|
+
|
|
43
|
+
## Publishing (npm)
|
|
44
|
+
|
|
45
|
+
This repo is set up so you can publish via `just publish` (manual) or via GitHub Actions (recommended).
|
|
46
|
+
|
|
47
|
+
### CI publish (recommended)
|
|
48
|
+
|
|
49
|
+
- Bump `package.json` version
|
|
50
|
+
- Push a tag matching the version: `vX.Y.Z` (e.g. `v0.1.0`)
|
|
51
|
+
- CI will run checks and publish to npm using the `NPM_TOKEN` repo secret
|
|
52
|
+
|
|
53
|
+
1. Create `.env` from `.env.example` and set:
|
|
54
|
+
- `NPM_TOKEN`: an npm access token with publish rights
|
|
55
|
+
2. Run:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
just publish
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Optional:
|
|
62
|
+
- `NPM_TAG`: publish under a dist-tag (e.g. `next`)
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|