@plutocms/utils 0.2.2 → 0.3.0
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 +11 -0
- package/FEATURES.md +0 -2
- package/README.md +2 -2
- package/package.json +2 -3
- package/app/components/NavbarAdminActionButton.vue +0 -92
- package/app/composables/navbar-admin-actions.ts +0 -12
- package/app/composables/navbar-admin.ts +0 -12
- package/app/composables/sidebar-admin-actions.ts +0 -17
- package/shared/types/navbar.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0](https://github.com/plutocms/utils/compare/v0.2.2...v0.3.0) (2026-10-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* remove the old admin navigation composables ([#27](https://github.com/plutocms/utils/issues/27))
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* remove the old admin navigation composables ([#27](https://github.com/plutocms/utils/issues/27)) ([7518431](https://github.com/plutocms/utils/commit/751843127212fb40568816a20fee88d25e30776f))
|
|
13
|
+
|
|
3
14
|
## [0.2.2](https://github.com/plutocms/utils/compare/v0.2.1...v0.2.2) (2026-10-16)
|
|
4
15
|
|
|
5
16
|
|
package/FEATURES.md
CHANGED
|
@@ -6,8 +6,6 @@ with full detail, so this file stays short.
|
|
|
6
6
|
See the workspace-level `CLAUDE.md` (one directory up) for the delegation, writing, and git
|
|
7
7
|
policies shared by every project here.
|
|
8
8
|
|
|
9
|
-
- Admin navigation: composables and a component for registering and displaying admin UI
|
|
10
|
-
elements in the navbar and sidebar. @.claude/skills/admin-navigation/SKILL.md
|
|
11
9
|
- Currency formatting: a utility function to format numbers as localized currency strings.
|
|
12
10
|
@.claude/skills/currency-formatting/SKILL.md
|
|
13
11
|
- String utilities: helpers for string transformations and parsing.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @plutocms/utils
|
|
2
2
|
|
|
3
|
-
Shared utilities
|
|
3
|
+
Shared utilities for Pluto layers.
|
|
4
4
|
|
|
5
|
-
This package provides
|
|
5
|
+
This package provides utility functions for formatting and string handling. It is designed to be extended by other Pluto layers.
|
|
6
6
|
|
|
7
7
|
See `FEATURES.md` for the full list of implemented features.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plutocms/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "Victor Ribeiro",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"postinstall": "nuxt prepare",
|
|
23
23
|
"prettier": "prettier --write .",
|
|
24
24
|
"lint": "eslint .",
|
|
25
|
-
"lint:fix": "eslint . --fix
|
|
25
|
+
"lint:fix": "eslint . --fix",
|
|
26
26
|
"typecheck": "nuxi typecheck"
|
|
27
27
|
},
|
|
28
28
|
"trustedDependencies": [
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@antfu/eslint-config": "^9.5.1",
|
|
39
|
-
"@nuxt/ui": "^4.12.0",
|
|
40
39
|
"eslint": "^10.12.0",
|
|
41
40
|
"nuxt": "^4.6.1",
|
|
42
41
|
"prettier": "^3.9.10",
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { NavbarAdminActionButtonProps } from '../../shared/types/navbar'
|
|
3
|
-
|
|
4
|
-
type Props = NavbarAdminActionButtonProps
|
|
5
|
-
|
|
6
|
-
const props = defineProps<Props>()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<li v-if="props.show" class="nav-item">
|
|
11
|
-
<NuxtLink
|
|
12
|
-
:to="props.to?.toString()"
|
|
13
|
-
:title="props.title"
|
|
14
|
-
:disabled="props.disabled"
|
|
15
|
-
:target="props.target"
|
|
16
|
-
class="nav-link"
|
|
17
|
-
>
|
|
18
|
-
<span class="nav-content">
|
|
19
|
-
<Icon v-if="props.icon" :name="props.icon" class="link-icon" />
|
|
20
|
-
|
|
21
|
-
<span class="link-label"> {{ props.label }} </span>
|
|
22
|
-
</span>
|
|
23
|
-
</NuxtLink>
|
|
24
|
-
</li>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<style scoped>
|
|
28
|
-
.nav-item {
|
|
29
|
-
height: 100%;
|
|
30
|
-
list-style: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.nav-link {
|
|
34
|
-
display: block;
|
|
35
|
-
height: 100%;
|
|
36
|
-
background-color: transparent;
|
|
37
|
-
padding-top: 0.25rem;
|
|
38
|
-
padding-bottom: 0.25rem;
|
|
39
|
-
transition-property: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.nav-content {
|
|
43
|
-
box-sizing: content-box;
|
|
44
|
-
display: flex;
|
|
45
|
-
height: 100%;
|
|
46
|
-
align-items: center;
|
|
47
|
-
gap: 0.5rem;
|
|
48
|
-
border-radius: 0.125rem;
|
|
49
|
-
padding-left: 0.5rem;
|
|
50
|
-
padding-right: 0.5rem;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@media (max-width: 63.999rem) {
|
|
54
|
-
.nav-content {
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
min-width: 2.75rem;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
padding-left: 0.625rem;
|
|
59
|
-
padding-right: 0.625rem;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.link-label {
|
|
63
|
-
position: absolute;
|
|
64
|
-
width: 1px;
|
|
65
|
-
height: 1px;
|
|
66
|
-
padding: 0;
|
|
67
|
-
margin: -1px;
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
clip: rect(0, 0, 0, 0);
|
|
70
|
-
white-space: nowrap;
|
|
71
|
-
border: 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.nav-link:hover .nav-content {
|
|
76
|
-
background-color: rgba(0, 0, 0, 0.1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.dark .nav-link:hover .nav-content {
|
|
80
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.link-icon {
|
|
84
|
-
flex-shrink: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.link-label {
|
|
88
|
-
white-space: nowrap;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
text-overflow: ellipsis;
|
|
91
|
-
}
|
|
92
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NavigationMenuItem } from '@nuxt/ui'
|
|
2
|
-
|
|
3
|
-
const actions = shallowRef<NavigationMenuItem[]>([])
|
|
4
|
-
|
|
5
|
-
export function useSidebarAdminActions() {
|
|
6
|
-
const addAction = (action: NavigationMenuItem[]) => {
|
|
7
|
-
const existingLabels = new Set(actions.value.map((a) => a.label))
|
|
8
|
-
const newActions = action.filter((a) => !existingLabels.has(a.label))
|
|
9
|
-
|
|
10
|
-
actions.value = [...actions.value, ...newActions]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
actions,
|
|
15
|
-
addAction,
|
|
16
|
-
}
|
|
17
|
-
}
|
package/shared/types/navbar.ts
DELETED