@yatoday/astro-ui 0.17.28 → 0.17.32

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.
@@ -122,9 +122,9 @@ const isHtmlImage = typeof image === 'string' && !Array.isArray(image);
122
122
  3/4: pb-[133%]
123
123
  9/16: pb-[177%]
124
124
  -->
125
- <div class={cn("relative w-full h-auto", aspectClass)}>
125
+ <div class={cn("relative w-full h-auto min-h-full", aspectClass)}>
126
126
  {image && (
127
- <Fragment>
127
+ <div class="absolute inset-0">
128
128
  {isHtmlImage ? (
129
129
  <Fragment set:html={image}/>
130
130
  ) : (
@@ -139,7 +139,7 @@ const isHtmlImage = typeof image === 'string' && !Array.isArray(image);
139
139
  hoverEffect={false}
140
140
  />
141
141
  )}
142
- </Fragment>
142
+ </div>
143
143
  )}
144
144
  </div>
145
145
  </div>
@@ -1,17 +1,11 @@
1
- import type { HTMLTag } from 'astro/types';
2
- import type { Snippet } from 'svelte';
1
+ // Re-export the canonical Image props so the public API stays in sync with
2
+ // what the component actually accepts. The real definition lives next to the
3
+ // optimizer (`utils/images-optimization.ts`) and supports `src` as
4
+ // string | ImageMetadata, plus `widths`, `sizes`, `srcset`, and every other
5
+ // <img> attribute. A hand-maintained subset here let the two drift.
6
+ import type { ImageProps } from '../../utils/images-optimization';
3
7
 
4
- export type ImageProps = {
5
- src: string;
6
- alt?: string;
7
- aspectRatio?: string;
8
- width?: string | number;
9
- height?: string | number;
10
- loading?: 'eager' | 'lazy';
11
- decoding?: 'sync' | 'async' | 'auto';
12
- class?: string;
13
- layout?: 'fixed' | 'constrained' | 'fullWidth' | 'cover' | 'responsive' | 'contained';
14
- };
8
+ export type { ImageProps };
15
9
 
16
10
  export type SvelteImageProps = ImageProps & {
17
11
  ref?: HTMLImageElement | null;
@@ -4,11 +4,17 @@ export type SwiperSliderProps = {
4
4
  id?: string;
5
5
  withNavigation?: boolean;
6
6
  classes?: Record<string, string>;
7
+ /**
8
+ * Swiper `breakpoints` config, passed through to <swiper-container> as a
9
+ * JSON string. Overrides the component's default responsive breakpoints.
10
+ */
11
+ breakpoints?: string;
7
12
  };
8
13
 
9
14
  export type SvelteSwiperSliderProps = {
10
15
  id?: string;
11
16
  withNavigation?: boolean;
12
17
  classes?: Record<string, string>;
18
+ breakpoints?: string;
13
19
  children?: Snippet;
14
20
  };
@@ -117,7 +117,7 @@ const imagePaths = Object.keys(images).filter((imagePath) => {
117
117
 
118
118
  const lightbox = new PhotoSwipeLightbox({
119
119
  gallery: '.gallery',
120
- children: 'a',
120
+ children: 'swiper-slide a',
121
121
  pswpModule: () => import('photoswipe'),
122
122
  });
123
123
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yatoday/astro-ui",
3
3
  "type": "module",
4
- "version": "0.17.28",
4
+ "version": "0.17.32",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "pre-commit": "lint-staged",