denwa-web-shared 1.0.20 → 1.0.23

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.
@@ -6663,12 +6663,12 @@ const BasePicture = ({
6663
6663
  mobileImage2xAvif
6664
6664
  } = data;
6665
6665
  return /* @__PURE__ */ jsxRuntime.jsxs("picture", { ...pictureProps, children: [
6666
- mobileImage1x && /* @__PURE__ */ jsxRuntime.jsx(
6666
+ mobileImage1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6667
6667
  "source",
6668
6668
  {
6669
- srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
6669
+ srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6670
6670
  media: `(max-width: ${mobileMaxWidth}px)`,
6671
- type
6671
+ type: "image/avif"
6672
6672
  }
6673
6673
  ),
6674
6674
  mobileImage1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
@@ -6679,26 +6679,26 @@ const BasePicture = ({
6679
6679
  type: "image/webp"
6680
6680
  }
6681
6681
  ),
6682
- mobileImage1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6682
+ mobileImage1x && /* @__PURE__ */ jsxRuntime.jsx(
6683
6683
  "source",
6684
6684
  {
6685
- srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6685
+ srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
6686
6686
  media: `(max-width: ${mobileMaxWidth}px)`,
6687
- type: "image/avif"
6687
+ type
6688
6688
  }
6689
6689
  ),
6690
- image1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
6690
+ image1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6691
6691
  "source",
6692
6692
  {
6693
- srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
6694
- type: "image/webp"
6693
+ srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6694
+ type: "image/avif"
6695
6695
  }
6696
6696
  ),
6697
- image1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6697
+ image1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
6698
6698
  "source",
6699
6699
  {
6700
- srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6701
- type: "image/avif"
6700
+ srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
6701
+ type: "image/webp"
6702
6702
  }
6703
6703
  ),
6704
6704
  /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
@@ -6706,10 +6706,11 @@ const BasePicture = ({
6706
6706
  "img",
6707
6707
  {
6708
6708
  ...imgProps,
6709
- className: imgProps == null ? void 0 : imgProps.className,
6710
6709
  src: image1x,
6711
6710
  alt,
6712
- loading
6711
+ loading,
6712
+ decoding: loading === "eager" ? "sync" : "async",
6713
+ fetchPriority: loading === "eager" ? "high" : "low"
6713
6714
  }
6714
6715
  )
6715
6716
  ] });
@@ -6661,12 +6661,12 @@ const BasePicture = ({
6661
6661
  mobileImage2xAvif
6662
6662
  } = data;
6663
6663
  return /* @__PURE__ */ jsxs("picture", { ...pictureProps, children: [
6664
- mobileImage1x && /* @__PURE__ */ jsx(
6664
+ mobileImage1xAvif && /* @__PURE__ */ jsx(
6665
6665
  "source",
6666
6666
  {
6667
- srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
6667
+ srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6668
6668
  media: `(max-width: ${mobileMaxWidth}px)`,
6669
- type
6669
+ type: "image/avif"
6670
6670
  }
6671
6671
  ),
6672
6672
  mobileImage1xWebp && /* @__PURE__ */ jsx(
@@ -6677,26 +6677,26 @@ const BasePicture = ({
6677
6677
  type: "image/webp"
6678
6678
  }
6679
6679
  ),
6680
- mobileImage1xAvif && /* @__PURE__ */ jsx(
6680
+ mobileImage1x && /* @__PURE__ */ jsx(
6681
6681
  "source",
6682
6682
  {
6683
- srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6683
+ srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
6684
6684
  media: `(max-width: ${mobileMaxWidth}px)`,
6685
- type: "image/avif"
6685
+ type
6686
6686
  }
6687
6687
  ),
6688
- image1xWebp && /* @__PURE__ */ jsx(
6688
+ image1xAvif && /* @__PURE__ */ jsx(
6689
6689
  "source",
6690
6690
  {
6691
- srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
6692
- type: "image/webp"
6691
+ srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6692
+ type: "image/avif"
6693
6693
  }
6694
6694
  ),
6695
- image1xAvif && /* @__PURE__ */ jsx(
6695
+ image1xWebp && /* @__PURE__ */ jsx(
6696
6696
  "source",
6697
6697
  {
6698
- srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6699
- type: "image/avif"
6698
+ srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
6699
+ type: "image/webp"
6700
6700
  }
6701
6701
  ),
6702
6702
  /* @__PURE__ */ jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
@@ -6704,10 +6704,11 @@ const BasePicture = ({
6704
6704
  "img",
6705
6705
  {
6706
6706
  ...imgProps,
6707
- className: imgProps == null ? void 0 : imgProps.className,
6708
6707
  src: image1x,
6709
6708
  alt,
6710
- loading
6709
+ loading,
6710
+ decoding: loading === "eager" ? "sync" : "async",
6711
+ fetchPriority: loading === "eager" ? "high" : "low"
6711
6712
  }
6712
6713
  )
6713
6714
  ] });
@@ -1,6 +1,6 @@
1
1
  import { DetailedHTMLProps, FC, HTMLAttributes, ImgHTMLAttributes } from 'react';
2
2
  import { ImageType } from '../types';
3
- export interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> {
3
+ export interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLPictureElement>, HTMLPictureElement> {
4
4
  imgProps?: DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
5
5
  data: PictureData;
6
6
  type: ImageType;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "denwa-web-shared",
3
3
  "private": false,
4
- "version": "1.0.20",
4
+ "version": "1.0.23",
5
5
  "type": "module",
6
6
  "author": "Denwa",
7
7
  "main": "dist/denwa-web-shared.cjs.js",