@1001-digital/layers.base 0.0.12 → 0.0.14

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.
@@ -1,5 +1,5 @@
1
1
  export default defineAppConfig({
2
- myLayer: {
3
- name: 'My amazing Nuxt layer (overwritten)'
4
- }
2
+ base: {
3
+ name: 'Hello from Nuxt layer'
4
+ },
5
5
  })
@@ -230,11 +230,13 @@
230
230
  <div class="component-demo">
231
231
  <h4>Dismissable Tags</h4>
232
232
  <Tags>
233
- <Tag v-for="tag in dismissableTags" :key="tag" dismissable @dismiss="dismissableTags = dismissableTags.filter(t => t !== tag)">
233
+ <Tag v-for="tag in dismissableTags" :key="tag" dismissable
234
+ @dismiss="dismissableTags = dismissableTags.filter(t => t !== tag)">
234
235
  {{ tag }}
235
236
  </Tag>
236
237
  </Tags>
237
- <Button v-if="dismissableTags.length === 0" class="small" @click="dismissableTags = ['Dismissable 1', 'Dismissable 2', 'Dismissable 3']">
238
+ <Button v-if="dismissableTags.length === 0" class="small"
239
+ @click="dismissableTags = ['Dismissable 1', 'Dismissable 2', 'Dismissable 3']">
238
240
  Reset Tags
239
241
  </Button>
240
242
  </div>
@@ -389,10 +391,8 @@ const fontSizes = ['xs', 'sm', 'base', 'lg', 'xl', '2xl', '3xl']
389
391
  const sizes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
390
392
  const spacers = ['xs', 'sm', 'default', 'md', 'lg', 'xl']
391
393
  const iconTypes = [
392
- 'add', 'check', 'chevron-down', 'chevron-left', 'chevron-right',
393
- 'chevron-up', 'close', 'code', 'discord', 'edit', 'email',
394
- 'folder', 'github', 'home', 'image', 'link', 'loader',
395
- 'maximize', 'times', 'trash', 'twitter', 'user', 'website', 'withdraw'
394
+ 'lucide:plus', 'check', 'chevron-down', 'lucide:chevron-left', 'lucide:chevron-right',
395
+ 'close',
396
396
  ]
397
397
 
398
398
  const showDialog = ref(false)
@@ -8,5 +8,10 @@ export default defineNuxtConfig({
8
8
  // Use the generated ESLint config for lint root project as well
9
9
  rootDir: fileURLToPath(new URL('..', import.meta.url))
10
10
  }
11
- }
11
+ },
12
+ icon: {
13
+ aliases: {
14
+ close: 'ic:baseline-close',
15
+ },
16
+ },
12
17
  })
package/README.md CHANGED
@@ -14,12 +14,12 @@ Running `pnpm dev` will prepare and boot `.playground` directory, which imports
14
14
 
15
15
  ## Icons
16
16
 
17
- The base `Icon` component includes a default semantic icon map. Extending layers or apps can override or add entries via `app.config`:
17
+ The base `Icon` component relies on Nuxt Icon aliases. Defaults are limited to icons used outside `.playground`. Extend or override aliases via `nuxt.config`:
18
18
 
19
19
  ```ts
20
- export default defineAppConfig({
21
- icons: {
22
- map: {
20
+ export default defineNuxtConfig({
21
+ icon: {
22
+ aliases: {
23
23
  check: 'custom:check-circle',
24
24
  add: 'heroicons:plus'
25
25
  }
package/app/app.config.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  export default defineAppConfig({
2
2
  base: {
3
- name: 'Hello from Nuxt layer',
4
- icons: {
5
- map: {}
6
- }
3
+ name: 'Hello from Nuxt layer'
7
4
  },
8
5
  })
9
6
 
@@ -11,10 +8,7 @@ declare module '@nuxt/schema' {
11
8
  interface AppConfigInput {
12
9
  base?: {
13
10
  /** Project name */
14
- name?: string,
15
- icons?: {
16
- map?: Record<string, string>
17
- }
11
+ name?: string
18
12
  }
19
13
  }
20
14
  }
@@ -1,48 +1,13 @@
1
+ <template>
2
+ <NuxtIcon v-if="iconName" :name="iconName" class="icon" />
3
+ </template>
4
+
1
5
  <script setup lang="ts">
2
6
  const props = defineProps<{ type: string }>()
3
- const appConfig = useAppConfig()
4
-
5
- const DEFAULT_ICON_MAP: Record<string, string> = {
6
- add: 'lucide:plus',
7
- check: 'lucide:check',
8
- 'chevron-down': 'lucide:chevron-down',
9
- 'chevron-left': 'lucide:chevron-left',
10
- 'chevron-right': 'lucide:chevron-right',
11
- 'chevron-up': 'lucide:chevron-up',
12
- close: 'lucide:x',
13
- copy: 'lucide:copy',
14
- code: 'lucide:code',
15
- discord: 'simple-icons:discord',
16
- edit: 'lucide:pencil',
17
- email: 'lucide:mail',
18
- folder: 'lucide:folder',
19
- github: 'simple-icons:github',
20
- home: 'lucide:home',
21
- help: 'lucide:circle-question-mark',
22
- image: 'lucide:image',
23
- link: 'lucide:link',
24
- loader: 'lucide:loader-2',
25
- maximize: 'lucide:maximize',
26
- times: 'lucide:x',
27
- trash: 'lucide:trash-2',
28
- twitter: 'simple-icons:x',
29
- user: 'lucide:user',
30
- website: 'lucide:globe',
31
- withdraw: 'lucide:undo',
32
- }
33
7
 
34
- const iconMap = computed(() => ({
35
- ...DEFAULT_ICON_MAP,
36
- ...(appConfig.icons?.map || {})
37
- }))
38
-
39
- const iconName = computed(() => iconMap.value[props.type] || props.type)
8
+ const iconName = computed(() => props.type)
40
9
  </script>
41
10
 
42
- <template>
43
- <NuxtIcon v-if="iconName" :name="iconName" class="icon" />
44
- </template>
45
-
46
11
  <style scoped>
47
12
  .icon {
48
13
  display: inline-flex;
package/nuxt.config.ts CHANGED
@@ -11,11 +11,19 @@ export default defineNuxtConfig({
11
11
 
12
12
  icon: {
13
13
  componentName: 'NuxtIcon',
14
+ aliases: {
15
+ check: 'lucide:check',
16
+ 'chevron-down': 'lucide:chevron-down',
17
+ close: 'lucide:x',
18
+ copy: 'lucide:copy',
19
+ help: 'lucide:circle-question-mark',
20
+ loader: 'lucide:loader-2',
21
+ }
14
22
  },
15
23
 
16
24
  css: [
17
25
  join(currentDir, './app/assets/styles/index.css'),
18
26
  ],
19
27
 
20
- compatibilityDate: '2026-01-28'
28
+ compatibilityDate: '2026-01-28',
21
29
  })
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@1001-digital/layers.base",
3
3
  "type": "module",
4
- "version": "0.0.12",
4
+ "version": "0.0.14",
5
5
  "main": "./nuxt.config.ts",
6
6
  "devDependencies": {
7
- "@iconify-json/lucide": "^1.2.87",
8
- "@iconify-json/simple-icons": "^1.2.69",
9
7
  "@nuxt/eslint": "latest",
10
8
  "@types/node": "^24.10.1",
11
9
  "eslint": "^9.39.1",
12
- "nuxt": "^4.2.2",
10
+ "nuxt": "^4.3.0",
13
11
  "typescript": "^5.9.3",
14
12
  "vue": "latest"
15
13
  },
16
14
  "dependencies": {
15
+ "@iconify-json/lucide": "^1.2.87",
16
+ "@iconify-json/simple-icons": "^1.2.69",
17
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",
21
- "reka-ui": "^2.7.0"
21
+ "reka-ui": "^2.8.0"
22
22
  },
23
23
  "scripts": {
24
24
  "dev": "nuxi dev .playground",