@rxdrag/website-lib 0.0.151 → 0.0.153

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.
Files changed (51) hide show
  1. package/README.md +2 -2
  2. package/components/AnimationNumber.astro +217 -217
  3. package/components/Background.astro +140 -114
  4. package/components/BackgroundGroup.astro +20 -26
  5. package/components/BaseFooter.astro +24 -39
  6. package/components/BaseHeader.astro +22 -25
  7. package/components/Box.astro +20 -22
  8. package/components/Button.astro +80 -0
  9. package/components/Carousel.astro +456 -315
  10. package/components/CarouselPagination.astro +97 -76
  11. package/components/CarouselSlide.astro +10 -16
  12. package/components/Collapse.astro +125 -125
  13. package/components/CollapseIndicator.astro +20 -20
  14. package/components/Container.astro +27 -32
  15. package/components/Content.astro +20 -0
  16. package/components/CookieConsent.astro +47 -47
  17. package/components/CookieConsent.css +52 -52
  18. package/components/CookieConsentConfig.ts +208 -208
  19. package/components/Dialog.astro +342 -338
  20. package/components/DialogTrigger.astro +32 -32
  21. package/components/Document.astro +240 -225
  22. package/components/Frame.astro +32 -0
  23. package/components/GlassBorder.astro +104 -0
  24. package/components/GlassRefraction.astro +85 -0
  25. package/components/GradientBorder.astro +80 -0
  26. package/components/Grid.astro +32 -34
  27. package/components/GridCell.astro +28 -32
  28. package/components/Heading.astro +24 -24
  29. package/components/Icon.astro +29 -29
  30. package/components/Image.astro +100 -100
  31. package/components/Image.md +14 -14
  32. package/components/Link.astro +89 -99
  33. package/components/Main.astro +17 -17
  34. package/components/Meta.astro +65 -65
  35. package/components/Popover.astro +189 -189
  36. package/components/RichTextView.astro +28 -28
  37. package/components/Section.astro +26 -44
  38. package/components/TabButton.astro +32 -16
  39. package/components/TabPanel.astro +20 -19
  40. package/components/Tabs.astro +220 -147
  41. package/components/Video.astro +6 -4
  42. package/components/YearsSince.astro +20 -20
  43. package/components//344/270/211/345/261/202/346/250/241/345/236/213.md +5 -5
  44. package/components//344/270/273/351/242/230Token.md +198 -198
  45. package/components//345/216/237/345/255/220/345/206/273/347/273/223/346/270/205/345/215/225.md +270 -260
  46. package/components//347/211/251/346/226/231/346/270/205/345/215/225.md +599 -567
  47. package/index.ts +5 -5
  48. package/package.json +7 -7
  49. package/components/BaseBlock.astro +0 -34
  50. package/components/Motion.astro +0 -77
  51. package/components/Stack.astro +0 -31
package/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- // Do not write code directly here, instead use the `src` folder!
2
- // Then, use this file to export everything you want your user to access.
3
-
4
- export { default as Document } from "./components/Document.astro";
5
-
1
+ // Do not write code directly here, instead use the `src` folder!
2
+ // Then, use this file to export everything you want your user to access.
3
+
4
+ export { default as Document } from "./components/Document.astro";
5
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdrag/website-lib",
3
- "version": "0.0.151",
3
+ "version": "0.0.153",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
@@ -28,12 +28,12 @@
28
28
  "eslint": "^9.39.2",
29
29
  "gsap": "^3.12.7",
30
30
  "typescript": "^5",
31
- "@rxdrag/eslint-config-custom": "0.2.13",
32
- "@rxdrag/tsconfig": "0.2.1",
33
- "@rxdrag/rxcms-models": "0.3.106",
31
+ "@rxdrag/website-lib-core": "0.0.127",
34
32
  "@rxdrag/entify-hooks": "0.2.79",
35
- "@rxdrag/website-lib-core": "0.0.126",
36
- "@rxdrag/tiptap-preview": "0.0.3"
33
+ "@rxdrag/tiptap-preview": "0.0.3",
34
+ "@rxdrag/rxcms-models": "0.3.109",
35
+ "@rxdrag/eslint-config-custom": "0.2.13",
36
+ "@rxdrag/tsconfig": "0.2.1"
37
37
  },
38
38
  "dependencies": {
39
39
  "aos": "3.0.0-beta.6",
@@ -41,7 +41,7 @@
41
41
  "react": "^19.1.0",
42
42
  "react-dom": "^19.1.0",
43
43
  "vanilla-cookieconsent": "3.1.0",
44
- "@rxdrag/rxcms-models": "0.3.106"
44
+ "@rxdrag/rxcms-models": "0.3.109"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "astro": "^5.16.6",
@@ -1,34 +0,0 @@
1
- ---
2
- import type { HTMLAttributes } from "astro/types";
3
- import type { BackgroundConfig } from "@rxdrag/website-lib-core";
4
- import BackgroundGroup from "./BackgroundGroup.astro";
5
-
6
- /**
7
- * 基础容器壳
8
- *
9
- * 规范:被冻结(Frozen)的设计器原子组件(基础壳)
10
- * - 对外接口与 DOM 结构应保持稳定,不随业务随意增删/调整
11
- * - 允许通过原生属性透传(...rest)注入 id/style/data-*(如 data-aos-*)等通用能力
12
- * - baseClass 用于提供组件的默认类名;class/className 由使用方叠加
13
- * - backgrounds 用于渲染 BackgroundGroup
14
- */
15
-
16
- interface Props extends HTMLAttributes<"div"> {
17
- baseClass?: string | string[];
18
- className?: string;
19
- backgrounds?: BackgroundConfig[];
20
- }
21
-
22
- const {
23
- baseClass = "",
24
- className,
25
- class: classAttr,
26
- backgrounds,
27
- ...rest
28
- } = Astro.props;
29
- ---
30
-
31
- <div class:list={[baseClass, className, classAttr]} {...rest}>
32
- {backgrounds?.length ? <BackgroundGroup backgrounds={backgrounds} /> : null}
33
- <slot />
34
- </div>
@@ -1,77 +0,0 @@
1
- ---
2
- import type { HTMLAttributes } from "astro/types";
3
-
4
- type WhileInViewPreset =
5
- | "fade"
6
- | "fade-up"
7
- | "fade-down"
8
- | "fade-left"
9
- | "fade-right"
10
- | "zoom-in"
11
- | "zoom-out"
12
- | "slide-up"
13
- | "slide-down"
14
- | "slide-left"
15
- | "slide-right";
16
-
17
- type WhileInViewConfig = {
18
- preset?: WhileInViewPreset;
19
- once?: boolean;
20
- duration?: number;
21
- delay?: number;
22
- easing?: string;
23
- offset?: number;
24
- anchorPlacement?: string;
25
- anchor?: string;
26
- };
27
-
28
- interface Props extends HTMLAttributes<"div"> {
29
- as?: string;
30
- class?: string;
31
- className?: string;
32
- whileInView?: WhileInViewPreset | WhileInViewConfig;
33
- }
34
-
35
- const {
36
- as = "div",
37
- whileInView,
38
- class: cls,
39
- className,
40
- ...rest
41
- } = Astro.props;
42
-
43
- const Tag = as as any;
44
-
45
- const config: WhileInViewConfig | undefined =
46
- typeof whileInView === "string" ? { preset: whileInView } : whileInView;
47
-
48
- const dataAos = config?.preset;
49
- const dataAosOnce = config?.once;
50
- const dataAosDuration = config?.duration;
51
- const dataAosDelay = config?.delay;
52
- const dataAosEasing = config?.easing;
53
- const dataAosOffset = config?.offset;
54
- const dataAosAnchorPlacement = config?.anchorPlacement;
55
- const dataAosAnchor = config?.anchor;
56
-
57
- const aosAttrs = dataAos
58
- ? {
59
- "data-aos": dataAos,
60
- "data-aos-once":
61
- typeof dataAosOnce === "boolean" ? String(dataAosOnce) : undefined,
62
- "data-aos-duration":
63
- typeof dataAosDuration === "number" ? String(dataAosDuration) : undefined,
64
- "data-aos-delay":
65
- typeof dataAosDelay === "number" ? String(dataAosDelay) : undefined,
66
- "data-aos-easing": dataAosEasing,
67
- "data-aos-offset":
68
- typeof dataAosOffset === "number" ? String(dataAosOffset) : undefined,
69
- "data-aos-anchor-placement": dataAosAnchorPlacement,
70
- "data-aos-anchor": dataAosAnchor,
71
- }
72
- : {};
73
- ---
74
-
75
- <Tag class:list={[cls, className]} {...aosAttrs} {...rest}>
76
- <slot />
77
- </Tag>
@@ -1,31 +0,0 @@
1
- ---
2
- import type { HTMLAttributes } from "astro/types";
3
- import type { BackgroundConfig } from "@rxdrag/website-lib-core";
4
- import BaseBlock from "./BaseBlock.astro";
5
-
6
- /**
7
- * 堆叠布局
8
- *
9
- * 规范:被冻结(Frozen)的设计器原子组件
10
- * - 对外接口与 DOM 结构应保持稳定,不随业务随意增删/调整
11
- * - 允许通过原生属性透传(...rest)注入 id/style/data-*(如 data-aos-*)等通用能力
12
- * - 默认 mobile 为 vertical(flex-col);响应式方向/间距/对齐通过 class / className(Tailwind)表达
13
- */
14
-
15
- interface Props extends HTMLAttributes<'div'> {
16
- className?: string;
17
- backgrounds?: BackgroundConfig[];
18
- }
19
-
20
- const { className, class: classAttr, backgrounds, ...rest } = Astro.props;
21
- ---
22
-
23
- <BaseBlock
24
- baseClass={["flex", "flex-col"]}
25
- className={className}
26
- class={classAttr}
27
- backgrounds={backgrounds}
28
- {...rest}
29
- >
30
- <slot />
31
- </BaseBlock>