@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.85",
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/tsconfig": "0.2.0",
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/entify-hooks": "0.2.75"
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.85"
38
+ "@rxdrag/website-lib-core": "0.0.88"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "astro": "^4.0.0 || ^5.0.0"
@@ -8,6 +8,6 @@ interface Props {
8
8
  const { className, class: classAttr, ...rest } = Astro.props;
9
9
  ---
10
10
 
11
- <div class:list={["container", className, classAttr]} {...rest}>
11
+ <div class:list={["section-container", className, classAttr]} {...rest}>
12
12
  <slot />
13
13
  </div>
@@ -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, h-full flex flex-col", className, originalClass]}>
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 { Icon as CoreIcon } from "@rxdrag/website-lib-core";
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 {...Astro.props} client:load />
24
+ <CoreIcon
25
+ className={className}
26
+ icon={localIconName ? undefined : icon}
27
+ svg={svgIcon?.code || svg}
28
+ {...rest}
29
+ client:load
30
+ />
@@ -35,7 +35,7 @@ const {
35
35
  disableContainer ? (
36
36
  <slot />
37
37
  ) : (
38
- <Container class:list={["section-container", containerClassName]}>
38
+ <Container class:list={["w-full h-full", containerClassName]}>
39
39
  <slot />
40
40
  </Container>
41
41
  )