@rxdrag/website-lib-core 0.0.126 → 0.0.128

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 (138) hide show
  1. package/README.md +1 -1
  2. package/index.ts +1 -1
  3. package/package.json +2 -2
  4. package/src/astro/animation.ts +146 -146
  5. package/src/astro/background.ts +82 -53
  6. package/src/astro/base.ts +7 -0
  7. package/src/astro/business.ts +13 -0
  8. package/src/astro/grid/consts.ts +80 -80
  9. package/src/astro/grid/index.ts +2 -2
  10. package/src/astro/grid/types.ts +35 -35
  11. package/src/astro/image.ts +239 -239
  12. package/src/astro/index.ts +12 -9
  13. package/src/astro/link.ts +20 -0
  14. package/src/astro/media.ts +123 -123
  15. package/src/astro/nav.ts +13 -13
  16. package/src/astro/section/index.ts +7 -12
  17. package/src/component-logic/index.ts +1 -1
  18. package/src/component-logic/link-client.ts +32 -32
  19. package/src/component-logic/link.ts +61 -61
  20. package/src/design-tokens.ts +160 -160
  21. package/src/entify/Entify.ts +533 -530
  22. package/src/entify/IEntify.ts +151 -177
  23. package/src/entify/index.ts +4 -4
  24. package/src/entify/lib/collectCategoryIds.ts +20 -20
  25. package/src/entify/lib/fulltextSearch.ts +63 -62
  26. package/src/entify/lib/langFields.ts +14 -14
  27. package/src/entify/lib/listToTree.ts +23 -23
  28. package/src/entify/lib/newAvatarQueryOptions.ts +4 -4
  29. package/src/entify/lib/newOgImageQueryOptions.ts +5 -5
  30. package/src/entify/lib/newQueryPostOptions.ts +42 -45
  31. package/src/entify/lib/newQueryProductOptions.ts +96 -98
  32. package/src/entify/lib/newQueryProductsMediaOptions.ts +28 -28
  33. package/src/entify/lib/queryAllProducts.ts +40 -40
  34. package/src/entify/lib/queryBulletin.ts +28 -16
  35. package/src/entify/lib/queryEntityList.ts +41 -41
  36. package/src/entify/lib/queryFeaturedProducts.ts +69 -68
  37. package/src/entify/lib/queryLangs.ts +36 -60
  38. package/src/entify/lib/queryLatestPosts.ts +92 -91
  39. package/src/entify/lib/queryOneEntity.ts +63 -63
  40. package/src/entify/lib/queryOneMedia.ts +27 -27
  41. package/src/entify/lib/queryOnePostById.ts +21 -21
  42. package/src/entify/lib/queryOnePostBySlug.ts +40 -39
  43. package/src/entify/lib/queryOnePostCategoryBySlug.ts +35 -35
  44. package/src/entify/lib/queryOneProductById.ts +20 -20
  45. package/src/entify/lib/queryOneProductBySlug.ts +53 -52
  46. package/src/entify/lib/queryOneProductCategoryBySlug.ts +50 -49
  47. package/src/entify/lib/queryOneTheme.ts +54 -72
  48. package/src/entify/lib/queryOneUser.ts +38 -38
  49. package/src/entify/lib/queryPostCategories.ts +67 -67
  50. package/src/entify/lib/queryPostSlugs.ts +37 -37
  51. package/src/entify/lib/queryPosts.ts +175 -174
  52. package/src/entify/lib/queryProductCategories.ts +59 -59
  53. package/src/entify/lib/queryProducts.ts +145 -144
  54. package/src/entify/lib/queryProductsInMenu.ts +45 -45
  55. package/src/entify/lib/queryTagCategories.ts +58 -58
  56. package/src/entify/lib/queryTags.ts +57 -57
  57. package/src/entify/lib/queryUserIds.ts +24 -24
  58. package/src/entify/lib/queryUserPosts.ts +80 -79
  59. package/src/entify/lib/queryWebSiteSettings.ts +28 -28
  60. package/src/entify/lib/queryWebsite.ts +43 -43
  61. package/src/entify/lib/sendEmail.ts +7 -7
  62. package/src/entify/lib/toQueryOptions.ts +19 -19
  63. package/src/entify/lib/upsertEntity.ts +8 -8
  64. package/src/entify/types/index.ts +1 -1
  65. package/src/entify/types/utils.ts +11 -6
  66. package/src/entify/types/variables.ts +5 -6
  67. package/src/entify/view-model/funcs.ts +230 -230
  68. package/src/entify/view-model/index.ts +1 -1
  69. package/src/entify/view-model/models.ts +135 -135
  70. package/src/global.d.ts +7 -7
  71. package/src/index.ts +8 -8
  72. package/src/lib/formatDate.ts +15 -15
  73. package/src/lib/index.ts +3 -3
  74. package/src/lib/pagination.ts +114 -114
  75. package/src/lib/utils.ts +135 -135
  76. package/src/react/components/Analytics/eventHandlers.ts +173 -173
  77. package/src/react/components/Analytics/index.tsx +21 -21
  78. package/src/react/components/Analytics/singleton.ts +214 -214
  79. package/src/react/components/Analytics/tracking.ts +221 -221
  80. package/src/react/components/Analytics/types.ts +60 -60
  81. package/src/react/components/Analytics/utils.ts +95 -95
  82. package/src/react/components/AttachmentIcon/index.tsx +53 -53
  83. package/src/react/components/BackgroundHlsVideoPlayer.tsx +97 -97
  84. package/src/react/components/BackgroundVideoPlayer.tsx +32 -32
  85. package/src/react/components/Bulletin.tsx +30 -30
  86. package/src/react/components/ContactForm/ContactForm.tsx +289 -289
  87. package/src/react/components/ContactForm/Input.tsx +48 -48
  88. package/src/react/components/ContactForm/Input2.tsx +59 -59
  89. package/src/react/components/ContactForm/Submit.tsx +48 -48
  90. package/src/react/components/ContactForm/TelInput.tsx +215 -215
  91. package/src/react/components/ContactForm/Textarea.tsx +48 -48
  92. package/src/react/components/ContactForm/Textarea2.tsx +89 -89
  93. package/src/react/components/ContactForm/funcs.ts +64 -64
  94. package/src/react/components/ContactForm/index.ts +7 -7
  95. package/src/react/components/ContactForm/types.ts +68 -68
  96. package/src/react/components/GoogleConsent/CookieItemPanel.tsx +80 -80
  97. package/src/react/components/GoogleConsent/CumtomizedModal.tsx +148 -148
  98. package/src/react/components/GoogleConsent/GoogleConsent.tsx +100 -100
  99. package/src/react/components/GoogleConsent/gtags.ts +67 -67
  100. package/src/react/components/GoogleConsent/index.ts +2 -2
  101. package/src/react/components/GoogleConsent/types.ts +18 -18
  102. package/src/react/components/GoogleConsent//345/217/202/350/200/203.md +4 -4
  103. package/src/react/components/Icon/index.tsx +19 -19
  104. package/src/react/components/Medias/MainMedia.tsx +257 -257
  105. package/src/react/components/Medias/Thumbnail.tsx +62 -62
  106. package/src/react/components/Medias/VideoPlayer.tsx +114 -114
  107. package/src/react/components/Medias/index.tsx +271 -271
  108. package/src/react/components/ProductCard/ProductCard.tsx +24 -24
  109. package/src/react/components/ProductCard/ProductCta/index.tsx +28 -28
  110. package/src/react/components/ProductCard/ProductCta/style.css +3 -3
  111. package/src/react/components/ProductCard/ProductDescription/index.tsx +12 -12
  112. package/src/react/components/ProductCard/ProductDescription/style.css +5 -5
  113. package/src/react/components/ProductCard/ProductMedia/index.tsx +35 -35
  114. package/src/react/components/ProductCard/ProductMedia/style.css +5 -5
  115. package/src/react/components/ProductCard/ProductTitle/index.tsx +7 -7
  116. package/src/react/components/ProductCard/ProductTitle/style.css +3 -3
  117. package/src/react/components/ProductCard/ProductView.tsx +36 -36
  118. package/src/react/components/ProductCard/index.ts +4 -4
  119. package/src/react/components/ProductCard/useQueryProduct.ts +32 -32
  120. package/src/react/components/ReactModalTrigger.tsx +28 -28
  121. package/src/react/components/ReactVideoPlayer.tsx +29 -52
  122. package/src/react/components/RichTextOutline/index.tsx +75 -75
  123. package/src/react/components/RichTextOutline/useAnchorScroll.ts +23 -23
  124. package/src/react/components/Scroller.tsx +39 -39
  125. package/src/react/components/SearchInput.tsx +21 -21
  126. package/src/react/components/Share/index.tsx +86 -86
  127. package/src/react/components/Share/socials.tsx +79 -77
  128. package/src/react/components/Share//350/265/204/346/226/231.md +7 -7
  129. package/src/react/components/ToTop.tsx +72 -72
  130. package/src/react/components/VideoPlayIcon.tsx +43 -0
  131. package/src/react/components/all.ts +38 -38
  132. package/src/react/components/index.ts +16 -16
  133. package/src/robots.ts +4 -4
  134. package/src/entify/lib/newPageMetaOptions.ts +0 -18
  135. package/src/entify/lib/newQueryPageOptions.ts +0 -14
  136. package/src/entify/lib/queryOneIcon.ts +0 -27
  137. package/src/entify/lib/queryPageBySlug.ts +0 -43
  138. package/src/entify/lib/queryPageByType.ts +0 -44
package/README.md CHANGED
@@ -1,2 +1,2 @@
1
- @rxdrag/webiste-lib-core
1
+ @rxdrag/webiste-lib-core
2
2
  含react组件,不含astro组件,这样可以在react中使用
package/index.ts CHANGED
@@ -1 +1 @@
1
- export * from "./src"
1
+ export * from "./src"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdrag/website-lib-core",
3
- "version": "0.0.126",
3
+ "version": "0.0.128",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts"
@@ -34,7 +34,7 @@
34
34
  "hls.js": "^1.6.13",
35
35
  "lodash-es": "^4.17.21",
36
36
  "@rxdrag/entify-lib": "0.0.24",
37
- "@rxdrag/rxcms-models": "0.3.106"
37
+ "@rxdrag/rxcms-models": "0.3.110"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "astro": "^5.16.6",
@@ -1,146 +1,146 @@
1
- /**
2
- * AOS (Animate On Scroll) 动画配置类型定义
3
- * 基于 AOS 库的 data-aos 属性
4
- */
5
-
6
- // AOS 动画类型
7
- export type AOSAnimation =
8
- | "" // 无动效
9
- // Fade animations
10
- | "fade"
11
- | "fade-up"
12
- | "fade-down"
13
- | "fade-left"
14
- | "fade-right"
15
- | "fade-up-right"
16
- | "fade-up-left"
17
- | "fade-down-right"
18
- | "fade-down-left"
19
- // Flip animations
20
- | "flip-up"
21
- | "flip-down"
22
- | "flip-left"
23
- | "flip-right"
24
- // Slide animations
25
- | "slide-up"
26
- | "slide-down"
27
- | "slide-left"
28
- | "slide-right"
29
- // Zoom animations
30
- | "zoom-in"
31
- | "zoom-in-up"
32
- | "zoom-in-down"
33
- | "zoom-in-left"
34
- | "zoom-in-right"
35
- | "zoom-out"
36
- | "zoom-out-up"
37
- | "zoom-out-down"
38
- | "zoom-out-left"
39
- | "zoom-out-right";
40
-
41
- // AOS 缓动函数
42
- export type AOSEasing =
43
- | "ease"
44
- | "linear"
45
- | "ease-in"
46
- | "ease-out"
47
- | "ease-in-out"
48
- | "ease-in-back"
49
- | "ease-out-back"
50
- | "ease-in-out-back"
51
- | "ease-in-sine"
52
- | "ease-out-sine"
53
- | "ease-in-out-sine"
54
- | "ease-in-quad"
55
- | "ease-out-quad"
56
- | "ease-in-out-quad"
57
- | "ease-in-cubic"
58
- | "ease-out-cubic"
59
- | "ease-in-out-cubic"
60
- | "ease-in-quart"
61
- | "ease-out-quart"
62
- | "ease-in-out-quart";
63
-
64
- // AOS 锚点位置
65
- export type AOSAnchorPlacement =
66
- | "top-bottom"
67
- | "top-center"
68
- | "top-top"
69
- | "center-bottom"
70
- | "center-center"
71
- | "center-top"
72
- | "bottom-bottom"
73
- | "bottom-center"
74
- | "bottom-top";
75
-
76
- /**
77
- * 动画配置
78
- * 使用 data-aos-* 格式的键名,可以直接通过 {...props} 展开到 HTML 元素上
79
- */
80
- export type AOSAnimationConfig = {
81
- /**
82
- * 动画类型
83
- * 默认值: 无
84
- */
85
- "data-aos"?: AOSAnimation;
86
-
87
- /**
88
- * 动画偏移量(像素)
89
- * 默认值: 120
90
- * 说明: 元素距离视口多少像素时触发动画
91
- */
92
- "data-aos-offset"?: number | string;
93
-
94
- /**
95
- * 动画延迟(毫秒)
96
- * 默认值: 0
97
- * 可选值: 0-3000,步长 50
98
- */
99
- "data-aos-delay"?: number | string;
100
-
101
- /**
102
- * 动画持续时间(毫秒)
103
- * 默认值: 400
104
- * 可选值: 0-3000,步长 50
105
- */
106
- "data-aos-duration"?: number | string;
107
-
108
- /**
109
- * 缓动函数
110
- * 默认值: ease
111
- */
112
- "data-aos-easing"?: AOSEasing;
113
-
114
- /**
115
- * 锚点位置
116
- * 默认值: top-bottom
117
- * 说明: 定义元素的哪个位置相对于窗口的哪个位置触发动画
118
- * 格式: [元素位置]-[窗口位置]
119
- */
120
- "data-aos-anchor-placement"?: AOSAnchorPlacement;
121
-
122
- /**
123
- * 锚点元素选择器
124
- * 说明: 使用另一个元素作为触发点
125
- */
126
- "data-aos-anchor"?: string;
127
-
128
- /**
129
- * 是否只执行一次
130
- * 默认值: false
131
- * 说明: 设置为 true 时,动画只在第一次滚动到时执行
132
- */
133
- "data-aos-once"?: boolean | "true" | "false";
134
-
135
- /**
136
- * 是否在移动设备上禁用
137
- * 可选值: 'mobile' | 'phone' | 'tablet' | false
138
- */
139
- "data-aos-disable"?: "mobile" | "phone" | "tablet" | false;
140
-
141
- /**
142
- * 动画 ID
143
- * 说明: 用于单独控制动画
144
- */
145
- "data-aos-id"?: string;
146
- };
1
+ /**
2
+ * AOS (Animate On Scroll) 动画配置类型定义
3
+ * 基于 AOS 库的 data-aos 属性
4
+ */
5
+
6
+ // AOS 动画类型
7
+ export type AOSAnimation =
8
+ | "" // 无动效
9
+ // Fade animations
10
+ | "fade"
11
+ | "fade-up"
12
+ | "fade-down"
13
+ | "fade-left"
14
+ | "fade-right"
15
+ | "fade-up-right"
16
+ | "fade-up-left"
17
+ | "fade-down-right"
18
+ | "fade-down-left"
19
+ // Flip animations
20
+ | "flip-up"
21
+ | "flip-down"
22
+ | "flip-left"
23
+ | "flip-right"
24
+ // Slide animations
25
+ | "slide-up"
26
+ | "slide-down"
27
+ | "slide-left"
28
+ | "slide-right"
29
+ // Zoom animations
30
+ | "zoom-in"
31
+ | "zoom-in-up"
32
+ | "zoom-in-down"
33
+ | "zoom-in-left"
34
+ | "zoom-in-right"
35
+ | "zoom-out"
36
+ | "zoom-out-up"
37
+ | "zoom-out-down"
38
+ | "zoom-out-left"
39
+ | "zoom-out-right";
40
+
41
+ // AOS 缓动函数
42
+ export type AOSEasing =
43
+ | "ease"
44
+ | "linear"
45
+ | "ease-in"
46
+ | "ease-out"
47
+ | "ease-in-out"
48
+ | "ease-in-back"
49
+ | "ease-out-back"
50
+ | "ease-in-out-back"
51
+ | "ease-in-sine"
52
+ | "ease-out-sine"
53
+ | "ease-in-out-sine"
54
+ | "ease-in-quad"
55
+ | "ease-out-quad"
56
+ | "ease-in-out-quad"
57
+ | "ease-in-cubic"
58
+ | "ease-out-cubic"
59
+ | "ease-in-out-cubic"
60
+ | "ease-in-quart"
61
+ | "ease-out-quart"
62
+ | "ease-in-out-quart";
63
+
64
+ // AOS 锚点位置
65
+ export type AOSAnchorPlacement =
66
+ | "top-bottom"
67
+ | "top-center"
68
+ | "top-top"
69
+ | "center-bottom"
70
+ | "center-center"
71
+ | "center-top"
72
+ | "bottom-bottom"
73
+ | "bottom-center"
74
+ | "bottom-top";
75
+
76
+ /**
77
+ * 动画配置
78
+ * 使用 data-aos-* 格式的键名,可以直接通过 {...props} 展开到 HTML 元素上
79
+ */
80
+ export type AOSAnimationConfig = {
81
+ /**
82
+ * 动画类型
83
+ * 默认值: 无
84
+ */
85
+ "data-aos"?: AOSAnimation;
86
+
87
+ /**
88
+ * 动画偏移量(像素)
89
+ * 默认值: 120
90
+ * 说明: 元素距离视口多少像素时触发动画
91
+ */
92
+ "data-aos-offset"?: number | string;
93
+
94
+ /**
95
+ * 动画延迟(毫秒)
96
+ * 默认值: 0
97
+ * 可选值: 0-3000,步长 50
98
+ */
99
+ "data-aos-delay"?: number | string;
100
+
101
+ /**
102
+ * 动画持续时间(毫秒)
103
+ * 默认值: 400
104
+ * 可选值: 0-3000,步长 50
105
+ */
106
+ "data-aos-duration"?: number | string;
107
+
108
+ /**
109
+ * 缓动函数
110
+ * 默认值: ease
111
+ */
112
+ "data-aos-easing"?: AOSEasing;
113
+
114
+ /**
115
+ * 锚点位置
116
+ * 默认值: top-bottom
117
+ * 说明: 定义元素的哪个位置相对于窗口的哪个位置触发动画
118
+ * 格式: [元素位置]-[窗口位置]
119
+ */
120
+ "data-aos-anchor-placement"?: AOSAnchorPlacement;
121
+
122
+ /**
123
+ * 锚点元素选择器
124
+ * 说明: 使用另一个元素作为触发点
125
+ */
126
+ "data-aos-anchor"?: string;
127
+
128
+ /**
129
+ * 是否只执行一次
130
+ * 默认值: false
131
+ * 说明: 设置为 true 时,动画只在第一次滚动到时执行
132
+ */
133
+ "data-aos-once"?: boolean | "true" | "false";
134
+
135
+ /**
136
+ * 是否在移动设备上禁用
137
+ * 可选值: 'mobile' | 'phone' | 'tablet' | false
138
+ */
139
+ "data-aos-disable"?: "mobile" | "phone" | "tablet" | false;
140
+
141
+ /**
142
+ * 动画 ID
143
+ * 说明: 用于单独控制动画
144
+ */
145
+ "data-aos-id"?: string;
146
+ };
@@ -1,53 +1,82 @@
1
- import { ImageLayout, ImageMetadata } from "./image";
2
-
3
- // 背景样式类型定义,支持tailwind类
4
- export type ColorBackgroundConfig = {
5
- id?: string;
6
- type: "color";
7
- class?: string; // 颜色 ,模糊,图案等,如 "bg-blue-500", "bg-gradient-to-r from-blue-500 to-purple-600"
8
- };
9
-
10
- export type BlurBackgroundConfig = {
11
- id?: string;
12
- type: "blur";
13
- class?: string; // 模糊,如 "backdrop-blur"
14
- };
15
-
16
- export type ImageBackgroundConfig = {
17
- id?: string;
18
- type: "image";
19
- class?: string; // 图片,如 "bg-cover bg-center bg-no-repeat"
20
- layout?: ImageLayout;
21
- src?: string | ImageMetadata; // 图片源
22
- };
23
-
24
- export type SvgBackgroundConfig = {
25
- id?: string;
26
- type: "svg";
27
- class?: string; // 图案,如 "bg-dots-sm bg-gray-100"
28
- code?: string; // SVG代码
29
- };
30
-
31
- export type VideoBackgroundConfig = {
32
- id?: string;
33
- type: "video";
34
- class?: string; // 视频,如 "bg-cover bg-center bg-no-repeat"
35
- mediaRef?: string; // 视频源
36
- poster?: string | ImageMetadata; // 视频封面图源
37
- };
38
-
39
- export type SplineBackgroundConfig = {
40
- id?: string;
41
- type: "spline";
42
- class?: string; // Spline,如 "bg-cover bg-center bg-no-repeat"
43
- spline?: string; // Spline ID
44
- url?: string; // Spline 场景 URL
45
- };
46
-
47
- export type BackgroundConfig =
48
- | ColorBackgroundConfig
49
- | BlurBackgroundConfig
50
- | ImageBackgroundConfig
51
- | SvgBackgroundConfig
52
- | VideoBackgroundConfig
53
- | SplineBackgroundConfig;
1
+ import { ImageLayout, ImageMetadata } from "./image";
2
+
3
+ /**
4
+ * 背景基础属性(所有背景类型共享)
5
+ * 布局/尺寸/位置通过 class(Tailwind)控制,支持响应式前缀
6
+ */
7
+ export interface BackgroundBase {
8
+ id?: string;
9
+ class?: string;
10
+ }
11
+
12
+ // 背景样式类型定义
13
+ export type ColorBackgroundConfig = BackgroundBase & {
14
+ type: "color";
15
+ };
16
+
17
+ export type BlurBackgroundConfig = BackgroundBase & {
18
+ type: "blur";
19
+ };
20
+
21
+ export type GlassBackgroundConfig = BackgroundBase & {
22
+ type: "glass";
23
+ };
24
+
25
+ export type ImageBackgroundConfig = BackgroundBase & {
26
+ type: "image";
27
+ layout?: ImageLayout;
28
+ src?: string | ImageMetadata;
29
+ };
30
+
31
+ export type SvgBackgroundConfig = BackgroundBase & {
32
+ type: "svg";
33
+ code?: string;
34
+ };
35
+
36
+ export type VideoBackgroundConfig = BackgroundBase & {
37
+ type: "video";
38
+ mediaRef?: string;
39
+ poster?: string | ImageMetadata;
40
+ };
41
+
42
+ export type SplineBackgroundConfig = BackgroundBase & {
43
+ type: "spline";
44
+ spline?: string;
45
+ url?: string;
46
+ };
47
+
48
+ export type GradientDirection = "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
49
+
50
+ export type GradientConfig = {
51
+ colors?: string[];
52
+ fromColor?: string;
53
+ toColor?: string;
54
+ viaColor?: string;
55
+ angle?: number | string;
56
+ direction?: GradientDirection;
57
+ };
58
+
59
+ export type GradientBorderConfig = BackgroundBase & GradientConfig & {
60
+ type: "gradient-border";
61
+ width?: number | string;
62
+ };
63
+
64
+ export type GlassBorderConfig = BackgroundBase & {
65
+ type: "glass-border";
66
+ color?: string;
67
+ width?: number | string;
68
+ opacity?: number;
69
+ shadowRatio?: number;
70
+ angle?: number | string;
71
+ };
72
+
73
+ export type BackgroundConfig =
74
+ | ColorBackgroundConfig
75
+ | BlurBackgroundConfig
76
+ | GlassBackgroundConfig
77
+ | ImageBackgroundConfig
78
+ | SvgBackgroundConfig
79
+ | VideoBackgroundConfig
80
+ | SplineBackgroundConfig
81
+ | GradientBorderConfig
82
+ | GlassBorderConfig;
@@ -0,0 +1,7 @@
1
+ import { BackgroundConfig } from "./background";
2
+ import type { HTMLAttributes, HTMLTag } from "astro/types";
3
+
4
+ export interface FrameProps extends HTMLAttributes<HTMLTag> {
5
+ className?: string;
6
+ backgrounds?: BackgroundConfig[];
7
+ }
@@ -0,0 +1,13 @@
1
+ import { SvgComponent } from "astro/types"
2
+
3
+ export type FeatureExtra = {
4
+ type?: string,
5
+ [key: string]: unknown | undefined,
6
+ }
7
+
8
+ export type Feature = {
9
+ Icon?: SvgComponent,
10
+ title?: string,
11
+ description?: string,
12
+ extra?: FeatureExtra
13
+ }
@@ -1,80 +1,80 @@
1
- import { ResponsiveGridLayout } from "./types";
2
-
3
- const oneCellLayout = {
4
- id: "cell1",
5
- colStart: 1,
6
- colSpan: 12,
7
- rowStart: 1,
8
- };
9
-
10
- //单行布局
11
- export const layout1: ResponsiveGridLayout = {
12
- lg: {
13
- cols: 12,
14
- cells: [oneCellLayout],
15
- },
16
- md: {
17
- cols: 12,
18
- cells: [oneCellLayout],
19
- },
20
- sm: {
21
- cols: 12,
22
- cells: [oneCellLayout],
23
- },
24
- };
25
-
26
- export const layout2: ResponsiveGridLayout = {
27
- lg: {
28
- cols: 12,
29
- cells: [
30
- {
31
- id: "cell1",
32
- colStart: 1,
33
- colSpan: 6,
34
- rowStart: 1,
35
- },
36
- {
37
- id: "cell2",
38
- colStart: 7,
39
- colSpan: 6,
40
- rowStart: 1,
41
- },
42
- ],
43
- },
44
- md: {
45
- cols: 12,
46
- cells: [
47
- {
48
- id: "cell1",
49
- colStart: 1,
50
- colSpan: 6,
51
- rowStart: 1,
52
- },
53
- {
54
- id: "cell2",
55
- colStart: 7,
56
- colSpan: 6,
57
- rowStart: 1,
58
- },
59
- ],
60
- },
61
- sm: {
62
- cols: 12,
63
- cells: [
64
- {
65
- id: "cell1",
66
- colStart: 1,
67
- colSpan: 12,
68
- rowStart: 1,
69
- },
70
- {
71
- id: "cell2",
72
- colStart: 1,
73
- colSpan: 12,
74
- rowStart: 1,
75
- },
76
- ],
77
- },
78
- };
79
-
80
- export const singleRowLayouts: ResponsiveGridLayout[] = [layout1, layout2];
1
+ import { ResponsiveGridLayout } from "./types";
2
+
3
+ const oneCellLayout = {
4
+ id: "cell1",
5
+ colStart: 1,
6
+ colSpan: 12,
7
+ rowStart: 1,
8
+ };
9
+
10
+ //单行布局
11
+ export const layout1: ResponsiveGridLayout = {
12
+ lg: {
13
+ cols: 12,
14
+ cells: [oneCellLayout],
15
+ },
16
+ md: {
17
+ cols: 12,
18
+ cells: [oneCellLayout],
19
+ },
20
+ sm: {
21
+ cols: 12,
22
+ cells: [oneCellLayout],
23
+ },
24
+ };
25
+
26
+ export const layout2: ResponsiveGridLayout = {
27
+ lg: {
28
+ cols: 12,
29
+ cells: [
30
+ {
31
+ id: "cell1",
32
+ colStart: 1,
33
+ colSpan: 6,
34
+ rowStart: 1,
35
+ },
36
+ {
37
+ id: "cell2",
38
+ colStart: 7,
39
+ colSpan: 6,
40
+ rowStart: 1,
41
+ },
42
+ ],
43
+ },
44
+ md: {
45
+ cols: 12,
46
+ cells: [
47
+ {
48
+ id: "cell1",
49
+ colStart: 1,
50
+ colSpan: 6,
51
+ rowStart: 1,
52
+ },
53
+ {
54
+ id: "cell2",
55
+ colStart: 7,
56
+ colSpan: 6,
57
+ rowStart: 1,
58
+ },
59
+ ],
60
+ },
61
+ sm: {
62
+ cols: 12,
63
+ cells: [
64
+ {
65
+ id: "cell1",
66
+ colStart: 1,
67
+ colSpan: 12,
68
+ rowStart: 1,
69
+ },
70
+ {
71
+ id: "cell2",
72
+ colStart: 1,
73
+ colSpan: 12,
74
+ rowStart: 1,
75
+ },
76
+ ],
77
+ },
78
+ };
79
+
80
+ export const singleRowLayouts: ResponsiveGridLayout[] = [layout1, layout2];
@@ -1,2 +1,2 @@
1
- export * from "./consts"
2
- export * from "./types"
1
+ export * from "./consts"
2
+ export * from "./types"