mapomodule 2.0.0-beta.16 → 2.0.0-beta.18
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 +34 -29
- package/dist/module.json +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,59 +1,64 @@
|
|
|
1
1
|
# mapomodule
|
|
2
2
|
|
|
3
|
-
The Mapo meta-module:
|
|
3
|
+
The Mapo meta-module: one Nuxt module that installs the whole Mapo v2 stack and reads its configuration from the `mapo` key. Mapo is a Nuxt 4 admin framework that turns a REST backend following Django REST Framework conventions into a backoffice, declaratively.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
pnpm add mapomodule @nuxt/ui
|
|
8
|
+
pnpm add mapomodule@next @nuxt/ui
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Mapo v2 is in beta and published on the `next` dist-tag; `latest` still points to Mapo v1 (Nuxt 2).
|
|
12
|
+
|
|
11
13
|
```ts
|
|
12
|
-
// nuxt.config.ts — @nuxt/ui
|
|
14
|
+
// nuxt.config.ts — register @nuxt/ui before mapomodule
|
|
13
15
|
export default defineNuxtConfig({
|
|
14
16
|
modules: ["@nuxt/ui", "mapomodule"],
|
|
15
17
|
|
|
16
18
|
mapo: {
|
|
19
|
+
// @mapomodule/core options (these are the defaults)
|
|
17
20
|
authLoginUrl: "/api/auth/login",
|
|
18
21
|
userInfoApi: "/api/profiles/me/",
|
|
19
22
|
logoutUrl: "/api/auth/logout",
|
|
20
23
|
loginUrl: "/login",
|
|
21
24
|
|
|
22
|
-
uikit: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
form: {
|
|
28
|
-
// optional — global field registry defaults and debounce config
|
|
29
|
-
},
|
|
25
|
+
uikit: { css: "~/assets/css/theme.css" }, // theme tokens, Nuxt UI defaults, media endpoints
|
|
26
|
+
form: { debounce: 300 }, // field registry defaults
|
|
27
|
+
i18n: { defaultLocale: "en" }, // locales
|
|
28
|
+
// mcp: false, // skip the development-only MCP server
|
|
30
29
|
},
|
|
31
30
|
});
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
Every key is optional. The app also needs an `app.vue` that wraps the page in `<UApp>` and `<NuxtLayout>`: see [Getting Started](https://lotrekagency.github.io/mapo-new/guide/getting-started).
|
|
35
34
|
|
|
36
35
|
## What it installs
|
|
37
36
|
|
|
38
|
-
|
|
|
39
|
-
| ------------------- |
|
|
40
|
-
| `@mapomodule/store` |
|
|
41
|
-
| `@mapomodule/
|
|
42
|
-
| `@mapomodule/
|
|
43
|
-
| `@mapomodule/
|
|
44
|
-
| `@mapomodule/
|
|
37
|
+
| Module | Configured under | Provides |
|
|
38
|
+
| ------------------- | ----------------------- | ---------------------------------------------------------------------------------------- |
|
|
39
|
+
| `@mapomodule/store` | — | Pinia stores (auth, snack, confirm, sidebar) and `usePermissions` |
|
|
40
|
+
| `@mapomodule/i18n` | `mapo.i18n` | `@nuxtjs/i18n` with Mapo's English and Italian catalogs |
|
|
41
|
+
| `@mapomodule/core` | `mapo` (top-level keys) | `$mapoFetch`, `useCrud`, `useMapoAuth`, the `auth`, `permissions` and `roles` middleware |
|
|
42
|
+
| `@mapomodule/uikit` | `mapo.uikit` | Layouts, sidebar, login, `MapoList`, `MapoDetail`, media and menu managers, theming |
|
|
43
|
+
| `@mapomodule/form` | `mapo.form` | The form engine and its field registry |
|
|
44
|
+
| `@mapomodule/mcp` | `mapo.mcp` | An MCP server for AI assistants, in development only |
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
`@mapomodule/utils`, `@nuxt/ui` and `@iconify-json/lucide` come along as dependencies. A module you register yourself in `modules` is not installed a second time, and it then reads its own config key (`mapoForm`, `mapoUikit`, …) instead of the `mapo` block.
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
## Types
|
|
49
|
+
|
|
50
|
+
Composables, stores and components are auto-imported. Types come from one aggregator:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
import type { FieldDescriptor, ListColumn } from "mapomodule/types";
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
`mapomodule/types` re-exports the public types of `core`, `store`, `form`, `uikit` and `utils`.
|
|
57
|
+
|
|
58
|
+
## Documentation
|
|
54
59
|
|
|
55
|
-
- [
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
- [
|
|
60
|
+
- [Getting Started](https://lotrekagency.github.io/mapo-new/guide/getting-started)
|
|
61
|
+
- [Concepts](https://lotrekagency.github.io/mapo-new/guide/concepts): the packages, the backend contract, the form engine, the customization layers
|
|
62
|
+
- [How-to recipes](https://lotrekagency.github.io/mapo-new/howto/)
|
|
63
|
+
- [Core options](https://lotrekagency.github.io/mapo-new/modules/core#options)
|
|
64
|
+
- [Migration v1 → v2](https://lotrekagency.github.io/mapo-new/migration/v1-to-v2)
|
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mapomodule",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.18",
|
|
4
4
|
"description": "Mapo meta-package: registers and re-exports all @mapomodule/* modules",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@iconify-json/lucide": "^1.2.0",
|
|
46
|
-
"@mapomodule/core": "2.0.0-beta.
|
|
47
|
-
"@mapomodule/form": "2.0.0-beta.
|
|
48
|
-
"@mapomodule/i18n": "2.0.0-beta.
|
|
49
|
-
"@mapomodule/mcp": "1.0.0-beta.
|
|
46
|
+
"@mapomodule/core": "2.0.0-beta.10",
|
|
47
|
+
"@mapomodule/form": "2.0.0-beta.11",
|
|
48
|
+
"@mapomodule/i18n": "2.0.0-beta.3",
|
|
49
|
+
"@mapomodule/mcp": "1.0.0-beta.2",
|
|
50
50
|
"@mapomodule/store": "2.0.0-beta.6",
|
|
51
|
-
"@mapomodule/uikit": "2.0.0-beta.
|
|
52
|
-
"@mapomodule/utils": "2.0.0-beta.
|
|
51
|
+
"@mapomodule/uikit": "2.0.0-beta.14",
|
|
52
|
+
"@mapomodule/utils": "2.0.0-beta.6",
|
|
53
53
|
"@nuxt/ui": "^4.7.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|