@r2digisolutions/components 0.25.5 → 0.25.7

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.
@@ -39,6 +39,8 @@
39
39
  meta?: string;
40
40
  priceLabel?: string;
41
41
  imageUrl?: string | null;
42
+ /** Fallback when `imageUrl` fails (e.g. thumb → full original). */
43
+ imageFallbackUrl?: string | null;
42
44
  href?: string;
43
45
  badge?: string;
44
46
  chip?: string;
@@ -634,13 +636,16 @@
634
636
  onclick={() => selectItem(item)}
635
637
  >
636
638
  {#if listView === 'flyer'}
637
- <div class="relative aspect-[3/4] w-full overflow-hidden">
639
+ <div
640
+ class="bg-surface-overlay relative aspect-[3/1] w-full overflow-hidden"
641
+ >
638
642
  {#if item.imageUrl}
639
643
  <Image
640
644
  src={item.imageUrl}
645
+ fallbackSrc={item.imageFallbackUrl ?? undefined}
641
646
  alt={item.title}
642
647
  class="inset-0 absolute h-full w-full"
643
- objectFit="cover"
648
+ objectFit="contain"
644
649
  />
645
650
  {:else}
646
651
  <div
@@ -663,6 +668,7 @@
663
668
  <div class="h-36 w-full overflow-hidden">
664
669
  <Image
665
670
  src={item.imageUrl}
671
+ fallbackSrc={item.imageFallbackUrl ?? undefined}
666
672
  alt={item.title}
667
673
  class="h-full w-full"
668
674
  objectFit="cover"
@@ -703,6 +709,7 @@
703
709
  <div class="w-28 relative shrink-0 overflow-hidden">
704
710
  <Image
705
711
  src={item.imageUrl}
712
+ fallbackSrc={item.imageFallbackUrl ?? undefined}
706
713
  alt={item.title}
707
714
  class="inset-0 absolute h-full w-full"
708
715
  objectFit="cover"
@@ -844,6 +851,7 @@
844
851
  {#if selected.imageUrl}
845
852
  <Image
846
853
  src={selected.imageUrl}
854
+ fallbackSrc={selected.imageFallbackUrl ?? undefined}
847
855
  alt={selected.title}
848
856
  aspectRatio="16 / 9"
849
857
  objectFit="cover"
@@ -15,6 +15,8 @@ export type MapExplorerItem = {
15
15
  meta?: string;
16
16
  priceLabel?: string;
17
17
  imageUrl?: string | null;
18
+ /** Fallback when `imageUrl` fails (e.g. thumb → full original). */
19
+ imageFallbackUrl?: string | null;
18
20
  href?: string;
19
21
  badge?: string;
20
22
  chip?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.25.5",
3
+ "version": "0.25.7",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",