mapomodule 2.0.0-beta.15 → 2.0.0-beta.17

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
@@ -1,59 +1,64 @@
1
1
  # mapomodule
2
2
 
3
- The Mapo meta-module: a single Nuxt module that registers the entire Mapo stack with one entry in `nuxt.config.ts`.
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 MUST come before mapomodule
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
- css: "~/assets/css/theme.css", // optional CSS token override
24
- ui: { button: { defaultVariants: { color: "primary" } } }, // optional Nuxt UI defaults
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
- All options are optional and fall back to `MAPO_DEFAULTS`.
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
- | Package | Status |
39
- | ------------------- | ------------------------------------------------------------------------ |
40
- | `@mapomodule/store` | ✅ Pinia stores |
41
- | `@mapomodule/core` | ✅ Service layer (forwards `mapo` config) |
42
- | `@mapomodule/uikit` | ✅ UI shell + theming + MapoOverride system + List engine + Detail shell |
43
- | `@mapomodule/form` | ✅ Form engine (`MapoForm`, `MapoDetail`, `useMapoForm`, field types) |
44
- | `@mapomodule/i18n` | 🔲 Planned |
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
- ## Dev workflow
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
- ```bash
49
- # watch mode — rebuilds dist/ on src/ changes
50
- pnpm dev:mapomodule # from monorepo root
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
- ## Reference
56
+ `mapomodule/types` re-exports the public types of `core`, `store`, `form`, `uikit` and `utils`.
57
+
58
+ ## Documentation
54
59
 
55
- - [`@mapomodule/core`](../@mapomodule/core/) — CRUD, auth, middleware
56
- - [`@mapomodule/store`](../@mapomodule/store/) — Pinia stores
57
- - [`@mapomodule/uikit`](../@mapomodule/uikit/) — UI shell, theming, MapoOverride, List engine, MapoDetail
58
- - [`@mapomodule/form`](../@mapomodule/form/) — form engine, field types, `useMapoForm`
59
- - [docs/modules/core](../../docs/modules/core.md) — full config reference
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mapomodule",
3
3
  "configKey": "mapo",
4
- "version": "2.0.0-beta.15",
4
+ "version": "2.0.0-beta.17",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapomodule",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.17",
4
4
  "description": "Mapo meta-package: registers and re-exports all @mapomodule/* modules",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "@mapomodule/core": "2.0.0-beta.9",
47
47
  "@mapomodule/form": "2.0.0-beta.10",
48
48
  "@mapomodule/i18n": "2.0.0-beta.2",
49
- "@mapomodule/mcp": "1.0.0-beta.1",
49
+ "@mapomodule/mcp": "1.0.0-beta.2",
50
50
  "@mapomodule/store": "2.0.0-beta.6",
51
51
  "@mapomodule/uikit": "2.0.0-beta.13",
52
52
  "@mapomodule/utils": "2.0.0-beta.5",