@rxdrag/website-lib 0.0.47 → 0.0.49
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.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.ts"
|
|
@@ -24,17 +24,18 @@
|
|
|
24
24
|
"eslint": "^7.32.0",
|
|
25
25
|
"gsap": "^3.12.7",
|
|
26
26
|
"typescript": "^5",
|
|
27
|
+
"@rxdrag/eslint-config-custom": "0.2.12",
|
|
28
|
+
"@rxdrag/rxcms-models": "0.3.76",
|
|
27
29
|
"@rxdrag/entify-hooks": "0.2.60",
|
|
28
30
|
"@rxdrag/slate-preview": "1.2.57",
|
|
29
|
-
"@rxdrag/eslint-config-custom": "0.2.12",
|
|
30
31
|
"@rxdrag/tsconfig": "0.2.0"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"clsx": "^2.1.0",
|
|
34
35
|
"react": "^18.2.0",
|
|
35
36
|
"react-dom": "^18.2.0",
|
|
36
|
-
"@rxdrag/rxcms-models": "0.3.
|
|
37
|
-
"@rxdrag/website-lib-core": "0.0.
|
|
37
|
+
"@rxdrag/rxcms-models": "0.3.76",
|
|
38
|
+
"@rxdrag/website-lib-core": "0.0.50"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
41
|
"astro": "^4.0.0 || ^5.0.0"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { FileRef, Media } from "@rxdrag/rxcms-models";
|
|
3
|
+
|
|
4
|
+
interface Props extends Omit<astroHTML.JSX.ImgHTMLAttributes, "src" | "class"> {
|
|
5
|
+
showField?: keyof FileRef;
|
|
6
|
+
image?: Media;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { showField = "url", image, className, ...props } = Astro.props;
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<img src={image?.file?.[showField] || ""} class={className} {...props} />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Media } from "@rxdrag/rxcms-models";
|
|
3
|
+
|
|
4
|
+
interface Props
|
|
5
|
+
extends Omit<astroHTML.JSX.VideoHTMLAttributes, "src" | "class"> {
|
|
6
|
+
video?: Media;
|
|
7
|
+
className?: string;
|
|
8
|
+
children?: astroHTML.JSX.Element;
|
|
9
|
+
classNames?: {
|
|
10
|
+
video?: string;
|
|
11
|
+
source?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { video, className, children, classNames, ...props } = Astro.props;
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<video class:list={[classNames?.video, className]} {...props}>
|
|
19
|
+
<source
|
|
20
|
+
src={video?.file?.url || ""}
|
|
21
|
+
type="video/mp4"
|
|
22
|
+
class={classNames?.source}
|
|
23
|
+
/>
|
|
24
|
+
{children}
|
|
25
|
+
</video>
|
package/src/components/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as Collapse } from "./Collapse.astro";
|
|
|
3
3
|
export { default as CollapseTrigger } from "./CollapseTrigger.astro";
|
|
4
4
|
export { default as CollapsePanel } from "./CollapsePanel.astro";
|
|
5
5
|
export { default as Flip } from "./Flip.astro";
|
|
6
|
+
export { default as Image } from "./Image.astro";
|
|
6
7
|
export { default as Link } from "./Link.astro";
|
|
7
8
|
export { default as Meta } from "./Meta.astro";
|
|
8
9
|
export { default as Modal } from "./Modal.astro";
|
|
@@ -19,3 +20,5 @@ export { default as TabsHeader } from "./TabsHeader.astro";
|
|
|
19
20
|
export { default as TabsPanel } from "./TabsPanel.astro";
|
|
20
21
|
export { default as TabsTab } from "./TabsTab.astro";
|
|
21
22
|
export { default as SlotContent } from "./SlotContent.astro";
|
|
23
|
+
export { default as Video } from "./Video.astro";
|
|
24
|
+
|