denwa-web-shared 1.0.20 → 1.0.21
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.
- package/dist/server/index.cjs.js +16 -15
- package/dist/server/index.es.js +16 -15
- package/dist/server/ui/image.d.ts +1 -1
- package/package.json +1 -1
package/dist/server/index.cjs.js
CHANGED
|
@@ -6663,22 +6663,21 @@ const BasePicture = ({
|
|
|
6663
6663
|
mobileImage2xAvif
|
|
6664
6664
|
} = data;
|
|
6665
6665
|
return /* @__PURE__ */ jsxRuntime.jsxs("picture", { ...pictureProps, children: [
|
|
6666
|
-
|
|
6666
|
+
image1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6667
6667
|
"source",
|
|
6668
6668
|
{
|
|
6669
|
-
srcSet: `${
|
|
6670
|
-
|
|
6671
|
-
type
|
|
6669
|
+
srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
|
|
6670
|
+
type: "image/avif"
|
|
6672
6671
|
}
|
|
6673
6672
|
),
|
|
6674
|
-
|
|
6673
|
+
image1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6675
6674
|
"source",
|
|
6676
6675
|
{
|
|
6677
|
-
srcSet: `${
|
|
6678
|
-
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6676
|
+
srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
|
|
6679
6677
|
type: "image/webp"
|
|
6680
6678
|
}
|
|
6681
6679
|
),
|
|
6680
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
|
|
6682
6681
|
mobileImage1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6683
6682
|
"source",
|
|
6684
6683
|
{
|
|
@@ -6687,29 +6686,31 @@ const BasePicture = ({
|
|
|
6687
6686
|
type: "image/avif"
|
|
6688
6687
|
}
|
|
6689
6688
|
),
|
|
6690
|
-
|
|
6689
|
+
mobileImage1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6691
6690
|
"source",
|
|
6692
6691
|
{
|
|
6693
|
-
srcSet: `${
|
|
6692
|
+
srcSet: `${mobileImage1xWebp} 1x${mobileImage2xWebp ? `, ${mobileImage2xWebp} 2x` : ""}`,
|
|
6693
|
+
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6694
6694
|
type: "image/webp"
|
|
6695
6695
|
}
|
|
6696
6696
|
),
|
|
6697
|
-
|
|
6697
|
+
mobileImage1x && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6698
6698
|
"source",
|
|
6699
6699
|
{
|
|
6700
|
-
srcSet: `${
|
|
6701
|
-
|
|
6700
|
+
srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
|
|
6701
|
+
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6702
|
+
type
|
|
6702
6703
|
}
|
|
6703
6704
|
),
|
|
6704
|
-
/* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
|
|
6705
6705
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
] });
|
package/dist/server/index.es.js
CHANGED
|
@@ -6661,22 +6661,21 @@ const BasePicture = ({
|
|
|
6661
6661
|
mobileImage2xAvif
|
|
6662
6662
|
} = data;
|
|
6663
6663
|
return /* @__PURE__ */ jsxs("picture", { ...pictureProps, children: [
|
|
6664
|
-
|
|
6664
|
+
image1xAvif && /* @__PURE__ */ jsx(
|
|
6665
6665
|
"source",
|
|
6666
6666
|
{
|
|
6667
|
-
srcSet: `${
|
|
6668
|
-
|
|
6669
|
-
type
|
|
6667
|
+
srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
|
|
6668
|
+
type: "image/avif"
|
|
6670
6669
|
}
|
|
6671
6670
|
),
|
|
6672
|
-
|
|
6671
|
+
image1xWebp && /* @__PURE__ */ jsx(
|
|
6673
6672
|
"source",
|
|
6674
6673
|
{
|
|
6675
|
-
srcSet: `${
|
|
6676
|
-
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6674
|
+
srcSet: `${image1xWebp} 1x${image2xWebp ? `, ${image2xWebp} 2x` : ""}`,
|
|
6677
6675
|
type: "image/webp"
|
|
6678
6676
|
}
|
|
6679
6677
|
),
|
|
6678
|
+
/* @__PURE__ */ jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
|
|
6680
6679
|
mobileImage1xAvif && /* @__PURE__ */ jsx(
|
|
6681
6680
|
"source",
|
|
6682
6681
|
{
|
|
@@ -6685,29 +6684,31 @@ const BasePicture = ({
|
|
|
6685
6684
|
type: "image/avif"
|
|
6686
6685
|
}
|
|
6687
6686
|
),
|
|
6688
|
-
|
|
6687
|
+
mobileImage1xWebp && /* @__PURE__ */ jsx(
|
|
6689
6688
|
"source",
|
|
6690
6689
|
{
|
|
6691
|
-
srcSet: `${
|
|
6690
|
+
srcSet: `${mobileImage1xWebp} 1x${mobileImage2xWebp ? `, ${mobileImage2xWebp} 2x` : ""}`,
|
|
6691
|
+
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6692
6692
|
type: "image/webp"
|
|
6693
6693
|
}
|
|
6694
6694
|
),
|
|
6695
|
-
|
|
6695
|
+
mobileImage1x && /* @__PURE__ */ jsx(
|
|
6696
6696
|
"source",
|
|
6697
6697
|
{
|
|
6698
|
-
srcSet: `${
|
|
6699
|
-
|
|
6698
|
+
srcSet: `${mobileImage1x} 1x${mobileImage2x ? `, ${mobileImage2x} 2x` : ""}`,
|
|
6699
|
+
media: `(max-width: ${mobileMaxWidth}px)`,
|
|
6700
|
+
type
|
|
6700
6701
|
}
|
|
6701
6702
|
),
|
|
6702
|
-
/* @__PURE__ */ jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
|
|
6703
6703
|
/* @__PURE__ */ jsx(
|
|
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<
|
|
3
|
+
export interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLPictureElement>, HTMLPictureElement> {
|
|
4
4
|
imgProps?: DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
5
5
|
data: PictureData;
|
|
6
6
|
type: ImageType;
|