@rxdrag/website-lib 0.0.134 → 0.0.136
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/components/Image.astro +14 -1
- package/package.json +5 -5
package/components/Image.astro
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Image as AstroImage, Picture as AstroPicture } from "astro:assets";
|
|
3
|
-
import { type ImageProps,
|
|
3
|
+
import { type ImageProps, type ImageSizePreset } from "@rxdrag/website-lib-core";
|
|
4
4
|
|
|
5
5
|
interface Props extends ImageProps {}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 布局预设 → sizes 属性映射
|
|
9
|
+
*/
|
|
10
|
+
export const SIZES_MAP: Record<ImageSizePreset, string | undefined> = {
|
|
11
|
+
auto: undefined,
|
|
12
|
+
full: "100vw",
|
|
13
|
+
half: "(max-width: 768px) 100vw, 50vw",
|
|
14
|
+
third: "(max-width: 768px) 100vw, 33vw",
|
|
15
|
+
quarter: "(max-width: 768px) 100vw, 25vw",
|
|
16
|
+
sidebar: "(max-width: 768px) 100vw, 300px",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
|
|
7
20
|
const {
|
|
8
21
|
src,
|
|
9
22
|
alt = "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdrag/website-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.136",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"eslint": "^9.39.2",
|
|
27
27
|
"gsap": "^3.12.7",
|
|
28
28
|
"typescript": "^5",
|
|
29
|
-
"@rxdrag/entify-hooks": "0.2.79",
|
|
30
29
|
"@rxdrag/eslint-config-custom": "0.2.13",
|
|
31
|
-
"@rxdrag/
|
|
30
|
+
"@rxdrag/entify-hooks": "0.2.79",
|
|
31
|
+
"@rxdrag/rxcms-models": "0.3.105",
|
|
32
32
|
"@rxdrag/tsconfig": "0.2.1",
|
|
33
33
|
"@rxdrag/tiptap-preview": "0.0.3"
|
|
34
34
|
},
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"react": "^19.1.0",
|
|
39
39
|
"react-dom": "^19.1.0",
|
|
40
40
|
"vanilla-cookieconsent": "3.1.0",
|
|
41
|
-
"@rxdrag/website-lib-core": "0.0.
|
|
42
|
-
"@rxdrag/rxcms-models": "0.3.
|
|
41
|
+
"@rxdrag/website-lib-core": "0.0.124",
|
|
42
|
+
"@rxdrag/rxcms-models": "0.3.105"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"astro": "^5.16.6"
|