@1001-digital/layers.base 0.0.9 → 0.0.11
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/app/components/Icon.vue +8 -2
- package/app.config.ts +6 -0
- package/nuxt.config.ts +2 -0
- package/package.json +4 -4
package/app/components/Icon.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
const props = defineProps<{ type: string }>()
|
|
3
|
+
const appConfig = useAppConfig()
|
|
3
4
|
|
|
4
|
-
const
|
|
5
|
+
const DEFAULT_ICON_MAP: Record<string, string> = {
|
|
5
6
|
add: 'lucide:plus',
|
|
6
7
|
check: 'lucide:check',
|
|
7
8
|
'chevron-down': 'lucide:chevron-down',
|
|
@@ -30,7 +31,12 @@ const ICON_MAP: Record<string, string> = {
|
|
|
30
31
|
withdraw: 'lucide:undo',
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
const
|
|
34
|
+
const iconMap = computed(() => ({
|
|
35
|
+
...DEFAULT_ICON_MAP,
|
|
36
|
+
...(appConfig.icons?.map || {})
|
|
37
|
+
}))
|
|
38
|
+
|
|
39
|
+
const iconName = computed(() => iconMap.value[props.type] || props.type)
|
|
34
40
|
</script>
|
|
35
41
|
|
|
36
42
|
<template>
|
package/app.config.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export default defineAppConfig({
|
|
2
2
|
myLayer: {
|
|
3
3
|
name: 'Hello from Nuxt layer'
|
|
4
|
+
},
|
|
5
|
+
icons: {
|
|
6
|
+
map: {}
|
|
4
7
|
}
|
|
5
8
|
})
|
|
6
9
|
|
|
@@ -10,5 +13,8 @@ declare module '@nuxt/schema' {
|
|
|
10
13
|
/** Project name */
|
|
11
14
|
name?: string
|
|
12
15
|
}
|
|
16
|
+
icons?: {
|
|
17
|
+
map?: Record<string, string>
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
}
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1001-digital/layers.base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@iconify-json/lucide": "^1.2.
|
|
8
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
7
|
+
"@iconify-json/lucide": "^1.2.87",
|
|
8
|
+
"@iconify-json/simple-icons": "^1.2.69",
|
|
9
9
|
"@nuxt/eslint": "latest",
|
|
10
10
|
"@types/node": "^24.10.1",
|
|
11
11
|
"eslint": "^9.39.1",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"vue": "latest"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@nuxt/icon": "^
|
|
17
|
+
"@nuxt/icon": "^2.2.1",
|
|
18
18
|
"@types/luxon": "^3.6.2",
|
|
19
19
|
"luxon": "^3.6.1",
|
|
20
20
|
"modern-normalize": "^3.0.1",
|