@plutocms/pluto 0.2.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## [0.3.1](https://github.com/plutocms/pluto/compare/v0.3.0...v0.3.1) (2026-09-09)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **navbar:** render registered admin navbar ([#121](https://github.com/plutocms/pluto/issues/121)) ([0fa66dd](https://github.com/plutocms/pluto/commit/0fa66dde70acc7e8f8fb2a5685d9971ae0eba303))
10
+
11
+ ## [0.3.0](https://github.com/plutocms/pluto/compare/v0.2.1...v0.3.0) (2026-09-09)
12
+
13
+
14
+ ### Features
15
+
16
+ * make admin shell responsive ([#119](https://github.com/plutocms/pluto/issues/119)) ([5a4808d](https://github.com/plutocms/pluto/commit/5a4808de34e1a3796c496a8fad093290a8f7fb90))
17
+
4
18
  ## [0.2.1](https://github.com/plutocms/pluto/compare/v0.2.0...v0.2.1) (2026-09-08)
5
19
 
6
20
 
package/FEATURES.md ADDED
@@ -0,0 +1,7 @@
1
+ # Features
2
+
3
+ This file lists every implemented feature of this project. Each entry links to a skill file
4
+ with full detail, so this file stays short.
5
+
6
+ See the workspace-level `CLAUDE.md` (one directory up) for the delegation, writing, and git
7
+ policies shared by every project here.
package/README.md CHANGED
@@ -63,12 +63,16 @@ Pluto CMS is built around **layers**, each responsible for a specific concern.
63
63
 
64
64
  The core layer provides the foundation for your CMS:
65
65
 
66
- - `<PlutoRoot>`: Wraps your entire app (used in `app.vue`). Includes `NuxtLayout`, `NuxtLoadingIndicator`, and base styles.
66
+ - `<PlutoRoot>`: Wraps your entire app (used in `app.vue`). Includes the registered admin navbar, `NuxtLayout`, `NuxtLoadingIndicator`, and base styles.
67
67
  - `<ColorModeButton>`: Light/dark mode toggle with zero configuration.
68
68
  - Built-in auth and admin layouts
69
69
  - `<PlutoNavbarAdmin>` and `<PlutoNavbarAdminActions>`
70
70
  Provide structure for injecting actions from other layers
71
71
 
72
+ Backend layers can provide the complete admin navbar with
73
+ `useNavbarAdmin().registerNavbar(component)`. Feature layers can append controls
74
+ with `useNavbarAdminActions().addAction(component)`.
75
+
72
76
  ### Backend layers
73
77
 
74
78
  Backend layers handle data, authentication, and APIs.
@@ -2,11 +2,10 @@
2
2
  @import '@nuxt/ui';
3
3
 
4
4
  @source '../..';
5
- @source '../../../../../app/**';
6
5
 
7
6
  @theme {
8
- --color-admin-content: var(--color-slate-800);
9
- --color-admin-sidebar: var(--color-slate-900);
7
+ --color-admin-content: var(--color-zinc-800);
8
+ --color-admin-sidebar: var(--color-zinc-900);
10
9
 
11
10
  --font-outfit: 'Outfit', sans-serif;
12
11
  }
@@ -1,7 +1,9 @@
1
1
  <script setup lang="ts"></script>
2
2
 
3
3
  <template>
4
- <UContainer class="flex max-w-300 flex-col gap-y-8 py-10">
4
+ <UContainer
5
+ class="flex max-w-300 flex-col gap-y-6 px-4 py-6 sm:px-6 lg:gap-y-8 lg:px-8 lg:py-10"
6
+ >
5
7
  <slot />
6
8
  </UContainer>
7
9
  </template>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <template>
4
4
  <nav
5
- class="light:bg-white light:border-black/10 font-outfit sticky top-0 z-50 h-10 shrink-0 border-b dark:border-white/5 dark:bg-black dark:text-white"
5
+ class="light:bg-white light:border-black/10 font-outfit sticky top-0 z-50 h-14 shrink-0 border-b lg:h-10 dark:border-white/5 dark:bg-black dark:text-white"
6
6
  >
7
7
  <slot />
8
8
  </nav>
@@ -1,14 +1,20 @@
1
- <script setup lang="ts"></script>
1
+ <script setup lang="ts">
2
+ const { navbar } = useNavbarAdmin()
3
+ </script>
2
4
 
3
5
  <template>
4
- <div class="grow">
5
- <UApp>
6
+ <div class="flex min-h-0 min-w-0 w-full grow flex-col">
7
+ <UApp class="flex min-h-0 min-w-0 w-full grow flex-col">
6
8
  <NuxtRouteAnnouncer />
7
9
  <NuxtLoadingIndicator />
8
10
 
9
- <NuxtLayout>
10
- <slot />
11
- </NuxtLayout>
11
+ <component :is="navbar" v-if="navbar" />
12
+
13
+ <div class="min-h-0 min-w-0 w-full grow">
14
+ <NuxtLayout>
15
+ <slot />
16
+ </NuxtLayout>
17
+ </div>
12
18
  </UApp>
13
19
  </div>
14
20
  </template>
@@ -35,9 +35,9 @@ const resolvedClasses = computed(() => {
35
35
  const defaultClasses = `
36
36
  group
37
37
  relative
38
- w-234 h-fit
38
+ w-234 max-w-[calc(100vw-1rem)] h-fit
39
39
  rounded-lg
40
- my-4 mx-4
40
+ my-2 mx-2 sm:my-4 sm:mx-4
41
41
  shadow-2xl
42
42
  bg-default
43
43
  light:text-zinc-800 dark:text-white
@@ -68,7 +68,7 @@ const resolvedOverlayClasses = computed(() => {
68
68
  fixed
69
69
  left-0 top-0
70
70
  z-51
71
- h-screen w-screen
71
+ h-dvh w-screen
72
72
  bg-black/90
73
73
  `
74
74
 
@@ -109,14 +109,14 @@ function closeModal() {
109
109
  :class="resolvedOverlayClasses"
110
110
  @click="props.preventClickOutside === false ? closeModal() : null"
111
111
  >
112
- <div ref="scrollRef" class="h-full overflow-y-scroll py-4">
112
+ <div ref="scrollRef" class="h-full overflow-y-auto py-2 sm:py-4">
113
113
  <div class="flex min-h-full items-center justify-center">
114
114
  <div
115
115
  :class="twMerge(['modal-content my-auto', resolvedClasses])"
116
116
  :style="{
117
117
  width:
118
118
  !props.size && props.customSize
119
- ? `${props.customSize}px`
119
+ ? `min(${props.customSize}px, calc(100vw - 1rem))`
120
120
  : '',
121
121
  }"
122
122
  v-bind="$attrs"
@@ -3,7 +3,7 @@ import { twMerge } from 'tailwind-merge'
3
3
  </script>
4
4
 
5
5
  <template>
6
- <div class="flex flex-col gap-8 py-1">
6
+ <div class="flex flex-col gap-5 py-1 sm:gap-8">
7
7
  <div
8
8
  v-if="$slots.header"
9
9
  :class="twMerge(['bg-opacity-90 sticky z-50 backdrop-blur-md'])"
@@ -12,7 +12,7 @@ import { twMerge } from 'tailwind-merge'
12
12
  <slot name="header" />
13
13
  </div>
14
14
 
15
- <div class="px-4 pt-6">
15
+ <div class="px-3 pt-4 sm:px-4 sm:pt-6">
16
16
  <slot />
17
17
  </div>
18
18
  </div>
@@ -52,7 +52,10 @@ const resolvedClasses = computed(() => {
52
52
  "
53
53
  />
54
54
 
55
- <div :class="resolvedAlign" class="flex py-4">
55
+ <div
56
+ :class="resolvedAlign"
57
+ class="flex flex-wrap gap-2 px-3 py-3 sm:px-4 sm:py-4"
58
+ >
56
59
  <slot />
57
60
  </div>
58
61
  </div>
@@ -45,8 +45,12 @@ function closeModal() {
45
45
  class="bg-default absolute top-0 left-0 z-[-1] h-full w-full rounded-t-lg backdrop-blur-md"
46
46
  />
47
47
 
48
- <div class="flex items-start justify-between py-4">
49
- <h2 :class="twMerge(['text-3xl leading-10 font-medium'])">
48
+ <div class="flex items-start justify-between gap-3 py-3 sm:py-4">
49
+ <h2
50
+ :class="
51
+ twMerge(['text-2xl leading-8 font-medium sm:text-3xl sm:leading-10'])
52
+ "
53
+ >
50
54
  <slot />
51
55
  </h2>
52
56
 
@@ -7,6 +7,12 @@ import type { NavigationMenuItem } from '@nuxt/ui'
7
7
  type SidebarMenuItem = Omit<NavigationMenuItem, 'to'>
8
8
 
9
9
  const { actions: sidebarActions } = useSidebarAdminActions()
10
+ const route = useRoute()
11
+ const isSidebarOpen = useState<boolean>('pluto-admin-sidebar-open', () => false)
12
+
13
+ function closeSidebar() {
14
+ isSidebarOpen.value = false
15
+ }
10
16
 
11
17
  const menu = shallowRef<SidebarMenuItem[]>([
12
18
  {
@@ -21,18 +27,44 @@ const menu = shallowRef<SidebarMenuItem[]>([
21
27
  icon: 'lucide:settings',
22
28
  },
23
29
  ])
30
+
31
+ watch(
32
+ () => route.fullPath,
33
+ closeSidebar
34
+ )
24
35
  </script>
25
36
 
26
37
  <template>
27
38
  <div
28
- class="dark:bg-admin-content light:bg-white font-outfit flex h-full grow flex-col"
39
+ class="dark:bg-admin-content light:bg-white font-outfit flex h-full min-h-0 grow flex-col overflow-hidden"
29
40
  >
30
- <NavbarAdmin />
41
+ <div class="relative flex min-h-0 flex-1 items-stretch">
42
+ <Transition name="sidebar-fade">
43
+ <button
44
+ v-if="isSidebarOpen"
45
+ type="button"
46
+ aria-label="Close navigation"
47
+ class="fixed inset-x-0 top-14 bottom-0 z-40 bg-black/50 backdrop-blur-xs lg:hidden"
48
+ @click="closeSidebar"
49
+ />
50
+ </Transition>
31
51
 
32
- <div class="flex h-full items-stretch">
33
- <div
34
- class="dark:bg-admin-sidebar light:bg-zinc-100 w-64 shrink-0 px-4 py-4"
52
+ <aside
53
+ :class="isSidebarOpen ? 'translate-x-0' : '-translate-x-full'"
54
+ class="dark:bg-admin-sidebar light:bg-zinc-100 border-default fixed inset-y-14 left-0 z-50 flex w-[min(18rem,85vw)] shrink-0 flex-col border-r px-3 py-4 shadow-2xl transition-transform duration-200 lg:static lg:inset-auto lg:z-auto lg:w-64 lg:translate-x-0 lg:shadow-none"
35
55
  >
56
+ <div class="mb-3 flex items-center justify-between px-2 lg:hidden">
57
+ <span class="text-muted text-sm font-semibold">Navigation</span>
58
+ <UButton
59
+ icon="lucide:x"
60
+ color="neutral"
61
+ variant="ghost"
62
+ aria-label="Close navigation"
63
+ square
64
+ @click="closeSidebar"
65
+ />
66
+ </div>
67
+
36
68
  <UNavigationMenu
37
69
  :items="menu"
38
70
  :ui="{
@@ -42,11 +74,23 @@ const menu = shallowRef<SidebarMenuItem[]>([
42
74
  class="data-[orientation=vertical]:w-full"
43
75
  highlight
44
76
  />
45
- </div>
77
+ </aside>
46
78
 
47
- <div class="grow overflow-hidden">
79
+ <div class="min-w-0 grow overflow-x-hidden overflow-y-auto">
48
80
  <slot />
49
81
  </div>
50
82
  </div>
51
83
  </div>
52
84
  </template>
85
+
86
+ <style scoped>
87
+ .sidebar-fade-enter-active,
88
+ .sidebar-fade-leave-active {
89
+ transition: opacity 200ms ease;
90
+ }
91
+
92
+ .sidebar-fade-enter-from,
93
+ .sidebar-fade-leave-to {
94
+ opacity: 0;
95
+ }
96
+ </style>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts"></script>
2
2
 
3
3
  <template>
4
- <div class="bg-admin-content font-outfit flex h-full grow flex-col">
4
+ <div class="bg-admin-content font-outfit flex min-h-dvh grow flex-col">
5
5
  <slot />
6
6
  </div>
7
7
  </template>
@@ -7,9 +7,9 @@ useHead({
7
7
  <template>
8
8
  <main>
9
9
  <AdminView>
10
- <h1 class="text-4xl font-bold">Admin Dashboard</h1>
10
+ <h1 class="text-3xl font-bold lg:text-4xl">Admin Dashboard</h1>
11
11
 
12
- <div class="grid grid-cols-3 gap-x-4 gap-y-6">
12
+ <div class="grid grid-cols-1 gap-4 lg:grid-cols-3 lg:gap-x-4 lg:gap-y-6">
13
13
  <div
14
14
  v-for="i in 6"
15
15
  :key="i"
package/nuxt.config.ts CHANGED
@@ -1,5 +1,3 @@
1
- import tailwindcss from '@tailwindcss/vite'
2
-
3
1
  const websiteName = process.env.WEBSITE_NAME || 'Untitled'
4
2
 
5
3
  // Point PLUTO_UTILS_PATH at a local checkout (e.g. `../utils`) to test
@@ -67,10 +65,6 @@ export default defineNuxtConfig({
67
65
 
68
66
  compatibilityDate: '2025-08-15',
69
67
 
70
- vite: {
71
- plugins: [tailwindcss()],
72
- },
73
-
74
68
  typescript: {
75
69
  includeWorkspace: true,
76
70
  typeCheck: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plutocms/pluto",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.3.1",
5
5
  "description": "The layerable CMS",
6
6
  "author": "Victor Ribeiro",
7
7
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "vue-demi"
43
43
  ],
44
44
  "dependencies": {
45
- "@plutocms/utils": "^0.1.0",
45
+ "@plutocms/utils": "^0.2.1",
46
46
  "@vueuse/nuxt": "^14.3.0"
47
47
  },
48
48
  "devDependencies": {