@innertia-solutions/innertia-nuxt 0.1.4 → 0.1.5
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
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Capa Nuxt unificada de Innertia Solutions. Provee en un solo paquete:
|
|
4
4
|
|
|
5
|
-
- **
|
|
6
|
-
- **
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
5
|
+
- **Utilities** — composables base (useApi, useDate, useDevice, useDownload, useRealtime, etc.) + plugin pusher + SEO
|
|
6
|
+
- **Auth** — JWT, contextos, permisos, vue-query, stores de notifications/auth, middlewares `auth`/`guest`
|
|
7
|
+
- **Multitenancy** — multi-tenant por subdomain (`X-Tenant` header, validación de tenant, store de tenant)
|
|
8
|
+
- **Design system** — components, layouts, theme Tailwind, Preline, Tabler icons, tema configurable
|
|
9
|
+
- **App contexts** — apps multi-contexto (backoffice/teacher/technician...), mobile guard configurable
|
|
10
10
|
|
|
11
11
|
## Uso
|
|
12
12
|
|
|
@@ -18,17 +18,19 @@ pnpm add @innertia-solutions/innertia-nuxt
|
|
|
18
18
|
// nuxt.config.ts
|
|
19
19
|
export default defineNuxtConfig({
|
|
20
20
|
extends: ['@innertia-solutions/innertia-nuxt'],
|
|
21
|
-
css: ['@innertia-solutions/innertia-nuxt/
|
|
21
|
+
css: ['@innertia-solutions/innertia-nuxt/theme.css'],
|
|
22
22
|
|
|
23
23
|
appConfig: {
|
|
24
24
|
innertia: {
|
|
25
25
|
mode: 'saas', // 'saas' (default) | 'app'
|
|
26
26
|
|
|
27
27
|
branding: { name: 'MyApp', version: '1.0.0' },
|
|
28
|
+
|
|
28
29
|
// Tema Preline — define el "feel" completo (paleta neutral, dark mode tone).
|
|
29
30
|
// Ver https://preline.co/docs/themes.html
|
|
30
31
|
theme: 'moon', // 'default' | 'harvest' | 'retro' | 'ocean' | 'autumn' | 'moon' | 'bubblegum' | 'cashmere' | 'olive'
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
// Override del brand color del tema (opcional)
|
|
32
34
|
colors: { primary: 'violet', secondary: 'slate' },
|
|
33
35
|
|
|
34
36
|
apps: {
|
|
@@ -46,8 +48,6 @@ export default defineNuxtConfig({
|
|
|
46
48
|
|
|
47
49
|
mobile: { breakpoint: 1024, rememberChoice: true },
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
spark: { theme: 'default' },
|
|
51
51
|
},
|
|
52
52
|
})
|
|
53
53
|
```
|
|
@@ -11,7 +11,7 @@ const isOpen = ref(false)
|
|
|
11
11
|
const open = () => { isOpen.value = true }
|
|
12
12
|
const close = () => { isOpen.value = false }
|
|
13
13
|
|
|
14
|
-
provide('
|
|
14
|
+
provide('innertia:sidebar', { isOpen, open, close })
|
|
15
15
|
|
|
16
16
|
const userInitial = computed(() =>
|
|
17
17
|
props.user?.name?.charAt(0).toUpperCase() ?? props.user?.email?.charAt(0).toUpperCase() ?? 'U'
|
|
@@ -48,7 +48,7 @@ const emit = defineEmits<{ logout: [] }>()
|
|
|
48
48
|
const isOpen = ref(false)
|
|
49
49
|
const open = () => { isOpen.value = true }
|
|
50
50
|
const close = () => { isOpen.value = false }
|
|
51
|
-
provide('
|
|
51
|
+
provide('innertia:sidebar', { isOpen, open, close })
|
|
52
52
|
|
|
53
53
|
// ─── Route matching ───────────────────────────────────────────────────────────
|
|
54
54
|
|
package/nuxt.config.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import tailwindcss from '@tailwindcss/vite'
|
|
2
2
|
|
|
3
|
-
// @innertia-solutions/innertia-nuxt — capa
|
|
4
|
-
// Provee:
|
|
5
|
-
// + saas (multitenancy) + spark (tema visual, components, layouts)
|
|
3
|
+
// @innertia-solutions/innertia-nuxt — capa Nuxt unificada de Innertia Solutions.
|
|
4
|
+
// Provee: utilidades base + auth + multitenancy + design system + app contexts.
|
|
6
5
|
export default defineNuxtConfig({
|
|
7
6
|
modules: [
|
|
8
7
|
'@nuxtjs/seo',
|
|
9
8
|
'@pinia/nuxt',
|
|
10
9
|
'pinia-plugin-persistedstate/nuxt', // requerido para persistir auth, dockedPreviews, etc.
|
|
11
10
|
],
|
|
12
|
-
css: ['@innertia-solutions/innertia-nuxt/
|
|
11
|
+
css: ['@innertia-solutions/innertia-nuxt/theme.css'],
|
|
13
12
|
components: [
|
|
14
13
|
{ path: './components', pathPrefix: true, prefix: '' },
|
|
15
14
|
],
|
|
@@ -28,11 +27,7 @@ export default defineNuxtConfig({
|
|
|
28
27
|
homePath: '/backoffice',
|
|
29
28
|
},
|
|
30
29
|
},
|
|
31
|
-
appConfig
|
|
32
|
-
spark: {
|
|
33
|
-
theme: 'default', // default | harvest | retro | ocean | autumn | moon | bubblegum | olive | cashmere
|
|
34
|
-
},
|
|
35
|
-
},
|
|
30
|
+
// Defaults de appConfig.innertia viven en app.config.ts del root
|
|
36
31
|
vite: {
|
|
37
32
|
plugins: [tailwindcss()],
|
|
38
33
|
optimizeDeps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innertia-solutions/innertia-nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app contexts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nuxt",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": "./nuxt.config.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": "./nuxt.config.ts",
|
|
24
|
-
"./
|
|
24
|
+
"./theme.css": "./theme.css"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"nuxt": ">=4.0.0",
|
/package/{spark.css → theme.css}
RENAMED
|
File without changes
|