@plutocms/utils 0.2.1 → 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 CHANGED
@@ -1,5 +1,23 @@
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
+
14
+ ## [0.2.2](https://github.com/plutocms/utils/compare/v0.2.1...v0.2.2) (2026-10-16)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **deps:** upgrade dependencies ([#20](https://github.com/plutocms/utils/issues/20)) ([1086d05](https://github.com/plutocms/utils/commit/1086d05ca572f1eb4d226e0821c933d754081112))
20
+
3
21
  ## [0.2.1](https://github.com/plutocms/utils/compare/v0.2.0...v0.2.1) (2026-09-09)
4
22
 
5
23
 
package/FEATURES.md CHANGED
@@ -5,3 +5,8 @@ with full detail, so this file stays short.
5
5
 
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
+
9
+ - Currency formatting: a utility function to format numbers as localized currency strings.
10
+ @.claude/skills/currency-formatting/SKILL.md
11
+ - String utilities: helpers for string transformations and parsing.
12
+ @.claude/skills/string-utilities/SKILL.md
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @plutocms/utils
2
+
3
+ Shared utilities for Pluto layers.
4
+
5
+ This package provides utility functions for formatting and string handling. It is designed to be extended by other Pluto layers.
6
+
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.2.1",
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 && prettier --write .",
25
+ "lint:fix": "eslint . --fix",
26
26
  "typecheck": "nuxi typecheck"
27
27
  },
28
28
  "trustedDependencies": [
@@ -32,17 +32,17 @@
32
32
  "vue-demi"
33
33
  ],
34
34
  "dependencies": {
35
- "@nuxt/eslint": "^1.15.2"
35
+ "@nuxt/eslint": "^1.17.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@antfu/eslint-config": "^6.7.3",
39
- "@nuxt/ui": "^4.4.0",
40
- "eslint": "^9.39.2",
41
- "nuxt": "^4.3.1",
42
- "prettier": "^3.7.4",
43
- "vue": "^3.5.28",
44
- "vue-router": "^5.0.2",
45
- "vue-tsc": "^3.3.7"
38
+ "@antfu/eslint-config": "^9.5.1",
39
+ "eslint": "^10.12.0",
40
+ "nuxt": "^4.6.1",
41
+ "prettier": "^3.9.10",
42
+ "typescript": "6.0.3",
43
+ "vue": "^3.5.44",
44
+ "vue-router": "^5.4.0",
45
+ "vue-tsc": "^3.3.13"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
@@ -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,12 +0,0 @@
1
- const actions = ref<Component[]>([])
2
-
3
- export function useNavbarAdminActions() {
4
- const addAction = (action: Component) => {
5
- actions.value.push(action)
6
- }
7
-
8
- return {
9
- actions,
10
- addAction,
11
- }
12
- }
@@ -1,12 +0,0 @@
1
- const navbar = shallowRef<Component | null>(null)
2
-
3
- export function useNavbarAdmin() {
4
- const registerNavbar = (component: Component) => {
5
- navbar.value = markRaw(component)
6
- }
7
-
8
- return {
9
- navbar,
10
- registerNavbar,
11
- }
12
- }
@@ -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
- }
@@ -1,9 +0,0 @@
1
- export interface NavbarAdminActionButtonProps {
2
- label: string
3
- icon: string | undefined
4
- to: string | null | undefined
5
- show?: boolean
6
- title?: string
7
- disabled?: boolean
8
- target?: '_blank' | '_self' | '_parent' | '_top'
9
- }