@iqual/nuxt-icms 1.5.16 → 1.5.17

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.
@@ -13,6 +13,7 @@ const blokkliData = defineBlokkli({
13
13
  'spacingTop',
14
14
  'spacingBottom',
15
15
  'width',
16
+ 'imageFormat',
16
17
  'colorScheme',
17
18
  ],
18
19
  options: {
@@ -20,7 +21,7 @@ const blokkliData = defineBlokkli({
20
21
  type: 'checkbox',
21
22
  label: 'Show captions',
22
23
  default: false,
23
- }
24
- }
24
+ },
25
+ },
25
26
  })
26
27
  </script>
@@ -13,6 +13,7 @@ const blokkliData = defineBlokkli({
13
13
  'spacingTop',
14
14
  'spacingBottom',
15
15
  'width',
16
+ 'imageFormat',
16
17
  'alignHorizontalReduced',
17
18
  'colorScheme',
18
19
  ],
@@ -10,11 +10,14 @@
10
10
  v-if="media && media.length > 1"
11
11
  :media="media"
12
12
  :imageSizes="imageSizes"
13
- :imageAspectRatios="imageAspectRatios"
13
+ :imageFormat="imageFormat"
14
14
  :containerClass="themedClass('mediaSliderContainerClass')"
15
15
  :mediaClass="themedClass('mediaSliderMediaClass')"
16
16
  :elementClass="
17
- themedClass('mediaSliderElementClass', 'block w-full h-auto')
17
+ themedClass(
18
+ 'mediaSliderElementClass',
19
+ 'block w-full h-auto max-h-dvh object-cover object-center',
20
+ )
18
21
  "
19
22
  :figcaptionClass="themedClass('mediaSliderFigcaptionClass')"
20
23
  :carouselClass="themedClass('mediaSliderCarouselClass')"
@@ -34,9 +37,14 @@
34
37
  v-else-if="media && media.length === 1 && media[0]"
35
38
  :media="media[0]"
36
39
  :imageSizes="imageSizes"
37
- :imageAspectRatios="imageAspectRatios"
40
+ :imageFormat="imageFormat"
38
41
  :mediaClass="themedClass('mediaMediaClass')"
39
- :elementClass="themedClass('mediaElementClass')"
42
+ :elementClass="
43
+ themedClass(
44
+ 'mediaElementClass',
45
+ 'block w-full h-auto max-h-dvh object-cover object-center',
46
+ )
47
+ "
40
48
  :figcaptionClass="themedClass('mediaFigcaptionClass')"
41
49
  :showCaption="showCaptions"
42
50
  />
@@ -73,6 +81,10 @@ const showCaptions = computed(() => {
73
81
  return options.value.showCaptions
74
82
  })
75
83
 
84
+ const imageFormat = computed(() => {
85
+ return options.value.imageFormat
86
+ })
87
+
76
88
  const rowClassList = computed(() => {
77
89
  const classList = ['grid grid-cols-12 gap-6']
78
90
  if (options.value.width === 'wide') {
@@ -95,18 +107,6 @@ const imageSizes = computed(() => {
95
107
  return 'xs:100vw sm:100vw md:50vw lg:640px'
96
108
  })
97
109
 
98
- const imageAspectRatios = computed(() => {
99
- if (options.value.width === 'wide') {
100
- return '3/1'
101
- }
102
-
103
- if (options.value.width === 'medium') {
104
- return '16/9'
105
- }
106
-
107
- return '4/3'
108
- })
109
-
110
110
  const columnClassList = computed(() => {
111
111
  const classList = ['col-span-12']
112
112
 
@@ -38,7 +38,7 @@
38
38
  v-if="media && media.length"
39
39
  :media="media"
40
40
  imageSizes="xs:100vw sm:100vw md:50vw lg:640px"
41
- :imageAspectRatios="imageAspectRatios"
41
+ :imageFormat="imageFormat"
42
42
  :containerClass="themedClass('containerClass', 'my-0')"
43
43
  :mediaClass="themedClass('mediaClass')"
44
44
  :elementClass="themedClass('elementClass')"
@@ -63,7 +63,7 @@
63
63
 
64
64
  <script lang="ts" setup>
65
65
  import type { ParagraphIcmsLayoutTextMediaFragment } from '#graphql-operations'
66
- import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
66
+ import type { ColorScheme, ImageFormat } from '@iqual/nuxt-icms/types/global'
67
67
  import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
68
68
  import cn from '@iqual/nuxt-icms/composables/useCn'
69
69
 
@@ -130,19 +130,6 @@ const imageColumnClassList = computed(() => {
130
130
  return classList.join(' ')
131
131
  })
132
132
 
133
- const imageAspectRatios = computed(() => {
134
- const width = options.value.textWidth
135
-
136
- switch (width) {
137
- case 'narrow':
138
- return '2/1'
139
- case 'medium':
140
- return '16/9'
141
- default:
142
- return '3/2'
143
- }
144
- })
145
-
146
133
  const parentColorScheme = inject<ColorScheme>('colorScheme', 'none')
147
134
  const colorScheme = computed(() => {
148
135
  if (options.value.colorScheme !== undefined) {
@@ -156,5 +143,9 @@ const spacing = computed(() => {
156
143
  return { bottom: options.value.spacingBottom, top: options.value.spacingTop }
157
144
  })
158
145
 
146
+ const imageFormat = computed(() => {
147
+ return options.value.imageFormat
148
+ })
149
+
159
150
  provide('colorScheme', colorScheme)
160
151
  </script>
@@ -7,7 +7,7 @@ export default defineNuxtConfigProperty<'svgIconSprite'>(() => {
7
7
  default: {
8
8
  importPatterns: [
9
9
  join(currentLayerDir, './assets/symbols/**/*.svg'),
10
- 'assets/symbols/**/*.svg',
10
+ 'app/assets/symbols/**/*.svg',
11
11
  ]
12
12
  },
13
13
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqual/nuxt-icms",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "description": "ICMS Base",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,25 +0,0 @@
1
- diff --git a/node_modules/@blokkli/editor/dist/module.mjs b/node_modules/@blokkli/editor/dist/module.mjs
2
- index 0ff0d3b..17da062 100644
3
- --- a/node_modules/@blokkli/editor/dist/module.mjs
4
- +++ b/node_modules/@blokkli/editor/dist/module.mjs
5
- @@ -470,7 +470,19 @@ class IconCollector extends Collector {
6
- this.helper.paths.srcDir,
7
- "**/icon-blokkli-*.svg"
8
- );
9
- - const allFiles = [...filesModule, ...filesApp];
10
- + // Also scan all Nuxt layer directories for icon SVGs.
11
- + const layerFiles = [];
12
- + const layers = this.helper.nuxt.options._layers || [];
13
- + for (const layer of layers) {
14
- + if (layer.config && layer.config.srcDir && layer.config.srcDir !== this.helper.paths.srcDir) {
15
- + const files = await resolveFiles(
16
- + layer.config.srcDir,
17
- + "**/icon-blokkli-*.svg"
18
- + );
19
- + layerFiles.push(...files);
20
- + }
21
- + }
22
- + const allFiles = [...filesModule, ...filesApp, ...layerFiles];
23
- await Promise.all(allFiles.map((filePath) => this.addFile(filePath)));
24
- }
25
- runHooks() {