@rxdrag/website-lib 0.0.85 → 0.0.86
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdrag/website-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.86",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts"
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"eslint": "^7.32.0",
|
|
25
25
|
"gsap": "^3.12.7",
|
|
26
26
|
"typescript": "^5",
|
|
27
|
-
"@rxdrag/
|
|
27
|
+
"@rxdrag/entify-hooks": "0.2.76",
|
|
28
28
|
"@rxdrag/rxcms-models": "0.3.94",
|
|
29
|
-
"@rxdrag/slate-preview": "1.2.61",
|
|
30
29
|
"@rxdrag/eslint-config-custom": "0.2.12",
|
|
31
|
-
"@rxdrag/
|
|
30
|
+
"@rxdrag/slate-preview": "1.2.61",
|
|
31
|
+
"@rxdrag/tsconfig": "0.2.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"clsx": "^2.1.0",
|
|
35
35
|
"react": "^19.1.0",
|
|
36
36
|
"react-dom": "^19.1.0",
|
|
37
37
|
"@rxdrag/rxcms-models": "0.3.94",
|
|
38
|
-
"@rxdrag/website-lib-core": "0.0.
|
|
38
|
+
"@rxdrag/website-lib-core": "0.0.88"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"astro": "^4.0.0 || ^5.0.0"
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
const { className, class: originalClass, backgrounds } = Astro.props;
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
<div class:list={["w-full
|
|
19
|
+
<div class:list={["w-full h-full flex flex-col", className, originalClass]}>
|
|
20
20
|
<BackgroundGroup backgrounds={backgrounds} />
|
|
21
21
|
<slot />
|
|
22
22
|
</div>
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
---
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Icon as CoreIcon,
|
|
4
|
+
Entify,
|
|
5
|
+
type Locals,
|
|
6
|
+
} from "@rxdrag/website-lib-core";
|
|
7
|
+
|
|
3
8
|
interface Props {
|
|
4
9
|
className?: string;
|
|
5
10
|
icon?: string;
|
|
6
11
|
svg?: string;
|
|
7
12
|
}
|
|
13
|
+
const { env, imageSizes } = Astro.locals as Locals;
|
|
14
|
+
const { className, icon, svg, ...rest } = Astro.props;
|
|
15
|
+
|
|
16
|
+
const localIconName = icon?.startsWith("local:") ? icon?.split(":")[1] : null;
|
|
17
|
+
|
|
18
|
+
const rx = Entify.getInstance(env, imageSizes);
|
|
19
|
+
|
|
20
|
+
const svgIcon =
|
|
21
|
+
!!rx && localIconName ? await rx.getIcon(localIconName) : undefined;
|
|
8
22
|
---
|
|
9
23
|
|
|
10
|
-
<CoreIcon
|
|
24
|
+
<CoreIcon
|
|
25
|
+
className={className}
|
|
26
|
+
icon={localIconName ? undefined : icon}
|
|
27
|
+
svg={svgIcon?.code || svg}
|
|
28
|
+
{...rest}
|
|
29
|
+
client:load
|
|
30
|
+
/>
|