@rxdrag/website-lib-core 0.0.4 → 0.0.7

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 (168) hide show
  1. package/index.ts +1 -0
  2. package/package.json +12 -13
  3. package/src/entify/Entify.ts +365 -0
  4. package/{dist/entify/index.d.ts → src/entify/index.ts} +4 -4
  5. package/src/entify/lib/createEntifyClient.ts +23 -0
  6. package/{dist/entify/lib/index.d.ts → src/entify/lib/index.ts} +29 -29
  7. package/src/entify/lib/langFields.ts +12 -0
  8. package/src/entify/lib/newAvatarQueryOptions.ts +5 -0
  9. package/src/entify/lib/newOgImageQueryOptions.ts +6 -0
  10. package/src/entify/lib/newPageMetaOptions.ts +20 -0
  11. package/src/entify/lib/newQueryPostOptions.ts +41 -0
  12. package/src/entify/lib/newQueryProductOptions.ts +90 -0
  13. package/src/entify/lib/newQueryProductsMediaOptions.ts +26 -0
  14. package/src/entify/lib/queryAllProducts.ts +27 -0
  15. package/src/entify/lib/queryEntityList.ts +44 -0
  16. package/src/entify/lib/queryFeaturedProducts.ts +47 -0
  17. package/src/entify/lib/queryLangs.ts +47 -0
  18. package/src/entify/lib/queryLatestPosts.ts +65 -0
  19. package/src/entify/lib/queryOneEntity.ts +67 -0
  20. package/src/entify/lib/queryOnePostById.ts +21 -0
  21. package/src/entify/lib/queryOnePostBySlug.ts +21 -0
  22. package/src/entify/lib/queryOnePostCategoryBySlug.ts +30 -0
  23. package/src/entify/lib/queryOneProductById.ts +20 -0
  24. package/src/entify/lib/queryOneProductBySlug.ts +21 -0
  25. package/src/entify/lib/queryOneProductCategoryBySlug.ts +30 -0
  26. package/src/entify/lib/queryOneTheme.ts +76 -0
  27. package/src/entify/lib/queryOneUser.ts +38 -0
  28. package/src/entify/lib/queryPostCategories.ts +48 -0
  29. package/src/entify/lib/queryPostSlugs.ts +32 -0
  30. package/src/entify/lib/queryPosts.ts +92 -0
  31. package/src/entify/lib/queryProductCategories.ts +44 -0
  32. package/src/entify/lib/queryProducts.ts +69 -0
  33. package/src/entify/lib/queryProductsInMenu.ts +31 -0
  34. package/src/entify/lib/queryUserIds.ts +24 -0
  35. package/src/entify/lib/queryUserPosts.ts +74 -0
  36. package/src/entify/lib/queryWebSiteSettings.ts +29 -0
  37. package/src/entify/lib/searchProducts.ts +70 -0
  38. package/src/entify/lib/sendEmail.ts +8 -0
  39. package/src/entify/lib/toQueryOptions.ts +20 -0
  40. package/src/entify/lib/upsertEntity.ts +9 -0
  41. package/src/entify/types/index.ts +2 -0
  42. package/src/entify/types/utils.ts +4 -0
  43. package/src/entify/types/variables.ts +7 -0
  44. package/src/entify/view-model/funcs.ts +271 -0
  45. package/src/entify/view-model/index.ts +2 -0
  46. package/src/entify/view-model/models.ts +143 -0
  47. package/{dist/index.d.ts → src/index.ts} +5 -5
  48. package/src/motion/consts.ts +598 -0
  49. package/{dist/motion/index.d.ts → src/motion/index.ts} +2 -2
  50. package/src/motion/types.ts +46 -0
  51. package/src/react/components/EnquiryForm/Input.tsx +52 -0
  52. package/src/react/components/EnquiryForm/Submit.tsx +30 -0
  53. package/src/react/components/EnquiryForm/Textarea.tsx +51 -0
  54. package/src/react/components/EnquiryForm/index.tsx +334 -0
  55. package/src/react/components/GoogleConsent/CookieItemPanel.tsx +81 -0
  56. package/src/react/components/GoogleConsent/CumtomizedModal.tsx +149 -0
  57. package/src/react/components/GoogleConsent/GoogleConsent.tsx +101 -0
  58. package/src/react/components/GoogleConsent/README.md +1 -0
  59. package/src/react/components/GoogleConsent/gtags.ts +68 -0
  60. package/src/react/components/GoogleConsent/index.ts +3 -0
  61. package/src/react/components/GoogleConsent/types.ts +18 -0
  62. package/src/react/components/GoogleConsent//345/217/202/350/200/203.md +4 -0
  63. package/src/react/components/Medias/index.tsx +347 -0
  64. package/src/react/components/ProductCard/ProductCard.tsx +23 -0
  65. package/src/react/components/ProductCard/ProductCardPreview.tsx +12 -0
  66. package/src/react/components/ProductCard/ProductCta/index.tsx +41 -0
  67. package/src/react/components/ProductCard/ProductCta/style.css +4 -0
  68. package/src/react/components/ProductCard/ProductDescription/index.tsx +13 -0
  69. package/src/react/components/ProductCard/ProductDescription/style.css +6 -0
  70. package/src/react/components/ProductCard/ProductMedia/index.tsx +34 -0
  71. package/src/react/components/ProductCard/ProductMedia/style.css +6 -0
  72. package/src/react/components/ProductCard/ProductTitle/index.tsx +7 -0
  73. package/src/react/components/ProductCard/ProductTitle/style.css +4 -0
  74. package/src/react/components/ProductCard/ProductView.tsx +35 -0
  75. package/{dist/react/components/ProductCard/index.d.ts → src/react/components/ProductCard/index.ts} +6 -6
  76. package/src/react/components/ProductCard/useQueryProduct.ts +32 -0
  77. package/src/react/components/RichTextOutline/index.tsx +76 -0
  78. package/src/react/components/RichTextOutline/useAcitviedHeading.ts +54 -0
  79. package/src/react/components/RichTextOutline/useAnchorScroll.ts +24 -0
  80. package/src/react/components/Scroller.tsx +7 -0
  81. package/src/react/components/SearchInput.tsx +34 -0
  82. package/src/react/components/Share/index.tsx +69 -0
  83. package/src/react/components/Share/socials.tsx +79 -0
  84. package/src/react/components/Share//350/265/204/346/226/231.md +7 -0
  85. package/src/react/components/ToTop/index.tsx +33 -0
  86. package/src/react/components/ToTop.tsx +33 -0
  87. package/{dist/react/components/index.d.ts → src/react/components/index.ts} +8 -8
  88. package/src/react/hooks/index.ts +1 -0
  89. package/src/react/hooks/useScroll.ts +23 -0
  90. package/{dist/react/index.d.ts → src/react/index.ts} +2 -2
  91. package/src/robots.ts +4 -0
  92. package/src/scripts/actions.ts +304 -0
  93. package/src/scripts/consts.ts +32 -0
  94. package/src/scripts/events.ts +33 -0
  95. package/{dist/scripts/index.d.ts → src/scripts/index.ts} +3 -3
  96. package/dist/entify/Entify.d.ts +0 -138
  97. package/dist/entify/lib/createEntifyClient.d.ts +0 -3
  98. package/dist/entify/lib/langFields.d.ts +0 -2
  99. package/dist/entify/lib/newAvatarQueryOptions.d.ts +0 -2
  100. package/dist/entify/lib/newOgImageQueryOptions.d.ts +0 -2
  101. package/dist/entify/lib/newPageMetaOptions.d.ts +0 -2
  102. package/dist/entify/lib/newQueryPostOptions.d.ts +0 -3
  103. package/dist/entify/lib/newQueryProductOptions.d.ts +0 -3
  104. package/dist/entify/lib/newQueryProductsMediaOptions.d.ts +0 -3
  105. package/dist/entify/lib/queryAllProducts.d.ts +0 -4
  106. package/dist/entify/lib/queryEntityList.d.ts +0 -3
  107. package/dist/entify/lib/queryFeaturedProducts.d.ts +0 -4
  108. package/dist/entify/lib/queryLangs.d.ts +0 -4
  109. package/dist/entify/lib/queryLatestPosts.d.ts +0 -4
  110. package/dist/entify/lib/queryOneEntity.d.ts +0 -5
  111. package/dist/entify/lib/queryOnePostById.d.ts +0 -3
  112. package/dist/entify/lib/queryOnePostBySlug.d.ts +0 -3
  113. package/dist/entify/lib/queryOnePostCategoryBySlug.d.ts +0 -3
  114. package/dist/entify/lib/queryOneProductById.d.ts +0 -3
  115. package/dist/entify/lib/queryOneProductBySlug.d.ts +0 -3
  116. package/dist/entify/lib/queryOneProductCategoryBySlug.d.ts +0 -3
  117. package/dist/entify/lib/queryOneTheme.d.ts +0 -3
  118. package/dist/entify/lib/queryOneUser.d.ts +0 -3
  119. package/dist/entify/lib/queryPostCategories.d.ts +0 -4
  120. package/dist/entify/lib/queryPostSlugs.d.ts +0 -4
  121. package/dist/entify/lib/queryPosts.d.ts +0 -10
  122. package/dist/entify/lib/queryProductCategories.d.ts +0 -4
  123. package/dist/entify/lib/queryProducts.d.ts +0 -6
  124. package/dist/entify/lib/queryProductsInMenu.d.ts +0 -2
  125. package/dist/entify/lib/queryUserIds.d.ts +0 -4
  126. package/dist/entify/lib/queryUserPosts.d.ts +0 -9
  127. package/dist/entify/lib/queryWebSiteSettings.d.ts +0 -3
  128. package/dist/entify/lib/searchProducts.d.ts +0 -4
  129. package/dist/entify/lib/sendEmail.d.ts +0 -3
  130. package/dist/entify/lib/toQueryOptions.d.ts +0 -3
  131. package/dist/entify/lib/upsertEntity.d.ts +0 -2
  132. package/dist/entify/types/index.d.ts +0 -2
  133. package/dist/entify/types/utils.d.ts +0 -4
  134. package/dist/entify/types/variables.d.ts +0 -7
  135. package/dist/entify/view-model/funcs.d.ts +0 -20
  136. package/dist/entify/view-model/index.d.ts +0 -2
  137. package/dist/entify/view-model/models.d.ts +0 -119
  138. package/dist/index.mjs +0 -40514
  139. package/dist/index.mjs.map +0 -1
  140. package/dist/motion/consts.d.ts +0 -77
  141. package/dist/motion/types.d.ts +0 -26
  142. package/dist/react/components/EnquiryForm/Input.d.ts +0 -15
  143. package/dist/react/components/EnquiryForm/Submit.d.ts +0 -8
  144. package/dist/react/components/EnquiryForm/Textarea.d.ts +0 -13
  145. package/dist/react/components/EnquiryForm/index.d.ts +0 -22
  146. package/dist/react/components/Medias/index.d.ts +0 -8
  147. package/dist/react/components/ProductCard/ProductCard.d.ts +0 -15
  148. package/dist/react/components/ProductCard/ProductCardPreview.d.ts +0 -2
  149. package/dist/react/components/ProductCard/ProductCta/index.d.ts +0 -5
  150. package/dist/react/components/ProductCard/ProductDescription/index.d.ts +0 -2
  151. package/dist/react/components/ProductCard/ProductMedia/index.d.ts +0 -7
  152. package/dist/react/components/ProductCard/ProductTitle/index.d.ts +0 -2
  153. package/dist/react/components/ProductCard/ProductView.d.ts +0 -5
  154. package/dist/react/components/ProductCard/useQueryProduct.d.ts +0 -2
  155. package/dist/react/components/RichTextOutline/index.d.ts +0 -8
  156. package/dist/react/components/RichTextOutline/useAcitviedHeading.d.ts +0 -1
  157. package/dist/react/components/Scroller.d.ts +0 -3
  158. package/dist/react/components/SearchInput.d.ts +0 -2
  159. package/dist/react/components/Share/index.d.ts +0 -6
  160. package/dist/react/components/Share/socials.d.ts +0 -10
  161. package/dist/react/components/ToTop.d.ts +0 -5
  162. package/dist/react/hooks/index.d.ts +0 -1
  163. package/dist/react/hooks/useScroll.d.ts +0 -2
  164. package/dist/robots.d.ts +0 -2
  165. package/dist/scripts/actions.d.ts +0 -85
  166. package/dist/scripts/consts.d.ts +0 -21
  167. package/dist/scripts/events.d.ts +0 -11
  168. package/dist/style.css +0 -98
@@ -1,77 +0,0 @@
1
- import { AnchorOffsets, SimpleAnimation, DualAnimation } from "./types";
2
- export declare const EASINGS: {
3
- readonly linear: readonly [0, 0, 1, 1];
4
- readonly ease: readonly [0.25, 0.1, 0.25, 1];
5
- readonly easeIn: readonly [0.42, 0, 1, 1];
6
- readonly easeOut: readonly [0, 0, 0.58, 1];
7
- readonly easeInOut: readonly [0.42, 0, 0.58, 1];
8
- readonly easeInBack: readonly [0.36, 0, 0.66, -0.56];
9
- readonly easeOutBack: readonly [0.34, 1.56, 0.64, 1];
10
- readonly easeInOutBack: readonly [0.68, -0.6, 0.32, 1.6];
11
- readonly easeInSine: readonly [0.12, 0, 0.39, 0];
12
- readonly easeOutSine: readonly [0.61, 1, 0.88, 1];
13
- readonly easeInOutSine: readonly [0.37, 0, 0.63, 1];
14
- readonly easeInQuad: readonly [0.11, 0, 0.5, 0];
15
- readonly easeOutQuad: readonly [0.5, 1, 0.89, 1];
16
- readonly easeInOutQuad: readonly [0.45, 0, 0.55, 1];
17
- readonly easeInCubic: readonly [0.32, 0, 0.67, 0];
18
- readonly easeOutCubic: readonly [0.33, 1, 0.68, 1];
19
- readonly easeInOutCubic: readonly [0.65, 0, 0.35, 1];
20
- readonly easeInQuart: readonly [0.5, 0, 0.75, 0];
21
- readonly easeOutQuart: readonly [0.25, 1, 0.5, 1];
22
- readonly easeInOutQuart: readonly [0.76, 0, 0.24, 1];
23
- readonly softEaseOut: readonly [0.16, 1, 0.3, 1];
24
- readonly softEaseInOut: readonly [0.4, 0, 0.2, 1];
25
- readonly gentleEaseOut: readonly [0.1, 0.9, 0.2, 1];
26
- readonly gentleBackOut: readonly [0.2, 1.2, 0.5, 1];
27
- readonly smoothEaseOut: readonly [0.15, 0.85, 0.15, 1];
28
- readonly ultraSmoothOut: readonly [0.05, 0.9, 0.1, 1];
29
- readonly microSmoothOut: readonly [0.03, 0.94, 0.08, 1];
30
- readonly silkEaseOut: readonly [0.04, 0.88, 0.06, 0.98];
31
- readonly featherEaseOut: readonly [0.08, 0.82, 0.17, 1];
32
- readonly gentleSilkOut: readonly [0.02, 0.9, 0.1, 0.99];
33
- readonly ultraSlowOut: readonly [0.02, 0.9, 0.05, 0.99];
34
- readonly silkSlowOut: readonly [0.01, 0.85, 0.05, 0.95];
35
- readonly luxurySlowOut: readonly [0.01, 0.8, 0.03, 0.92];
36
- };
37
- export declare const DATA_MOTION_ANIMATE = "data-motion-animate";
38
- export declare const DATA_MOTION_HOVER = "data-motion-hover";
39
- export declare const DATA_MOTION_TAP = "data-motion-tap";
40
- export declare const DATA_MOTION_SCROLL = "data-motion-scroll";
41
- export declare const DATA_MOTION_INVIEW = "data-motion-inview";
42
- export declare const DATA_MOTION_OPEN = "data-motion-open";
43
- export declare const DATA_MOTION_CLOSE = "data-motion-close";
44
- export declare enum ANIMATION {
45
- FADE = "fade",
46
- FADE_UP = "fade-up",
47
- FADE_DOWN = "fade-down",
48
- FADE_LEFT = "fade-left",
49
- FADE_RIGHT = "fade-right",
50
- FADE_UP_RIGHT = "fade-up-right",
51
- FADE_UP_LEFT = "fade-up-left",
52
- FADE_DOWN_RIGHT = "fade-down-right",
53
- FADE_DOWN_LEFT = "fade-down-left",
54
- FLIP_UP = "flip-up",
55
- FLIP_DOWN = "flip-down",
56
- FLIP_LEFT = "flip-left",
57
- FLIP_RIGHT = "flip-right",
58
- SLIDE_UP = "slide-up",
59
- SLIDE_DOWN = "slide-down",
60
- SLIDE_LEFT = "slide-left",
61
- SLIDE_RIGHT = "slide-right",
62
- ZOOM_IN = "zoom-in",
63
- ZOOM_IN_UP = "zoom-in-up",
64
- ZOOM_IN_DOWN = "zoom-in-down",
65
- ZOOM_IN_LEFT = "zoom-in-left",
66
- ZOOM_IN_RIGHT = "zoom-in-right",
67
- ZOOM_OUT = "zoom-out",
68
- ZOOM_OUT_UP = "zoom-out-up",
69
- ZOOM_OUT_DOWN = "zoom-out-down",
70
- ZOOM_OUT_LEFT = "zoom-out-left",
71
- ZOOM_OUT_RIGHT = "zoom-out-right",
72
- ROTATE = "rotate",
73
- ROTATE_SCALE = "rotate-scale"
74
- }
75
- export declare const ANCHOR_PLACEMENTS: AnchorOffsets;
76
- export declare const ANIMATIONS: Record<string, SimpleAnimation>;
77
- export declare const DUAL_ANIMATIONS: Record<string, DualAnimation>;
@@ -1,26 +0,0 @@
1
- import { AnimationOptions, DOMKeyframesDefinition } from "motion";
2
- import { ANIMATION } from "./consts";
3
- export type BaseAnimation = {
4
- preset?: ANIMATION;
5
- keyframes?: DOMKeyframesDefinition;
6
- transition?: AnimationOptions;
7
- };
8
- export type SimpleAnimation = BaseAnimation;
9
- export type DualAnimation = {
10
- preset?: ANIMATION;
11
- in?: SimpleAnimation;
12
- out?: SimpleAnimation;
13
- };
14
- export type HoverAnimation = DualAnimation;
15
- export type TapAnimation = DualAnimation;
16
- export type ScrollAnimation = SimpleAnimation;
17
- export type ViewportAnimation = DualAnimation & {
18
- once?: boolean;
19
- };
20
- export type SelectionAnimation = DualAnimation;
21
- export type AnchorPlacement = "top-bottom" | "top-center" | "top-top" | "center-bottom" | "center-center" | "center-top" | "bottom-bottom" | "bottom-center" | "bottom-top";
22
- export type AnchorOffset = {
23
- element: number;
24
- viewport: number;
25
- };
26
- export type AnchorOffsets = Record<AnchorPlacement, AnchorOffset>;
@@ -1,15 +0,0 @@
1
- import { HTMLInputTypeAttribute } from "react";
2
- export type InputProps = {
3
- label: string;
4
- name: string;
5
- required?: boolean;
6
- className?: string;
7
- labelClassName?: string;
8
- inputClassName?: string;
9
- type?: HTMLInputTypeAttribute;
10
- autoFocus?: boolean;
11
- value?: string;
12
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
- error?: string;
14
- };
15
- export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,8 +0,0 @@
1
- export type SubmitProps = {
2
- title: string;
3
- className?: string;
4
- spinner?: React.ReactNode;
5
- submitting?: boolean;
6
- onClick?: (e: React.MouseEvent) => void;
7
- };
8
- export declare const Submit: React.FC<SubmitProps>;
@@ -1,13 +0,0 @@
1
- export type TextareaProps = {
2
- label: string;
3
- name: string;
4
- required?: boolean;
5
- className?: string;
6
- labelClassName?: string;
7
- textareaClassName?: string;
8
- rows?: number;
9
- value?: string;
10
- onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
11
- error?: string;
12
- };
13
- export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1,22 +0,0 @@
1
- /**
2
- * 验证加密字段是否有效
3
- * @param encryptedValue 加密后的字符串
4
- * @param originalValue 原始值(如蜜罐字段的值)
5
- * @param maxAgeMinutes 最大有效时间(分钟)
6
- * @returns 是否有效
7
- */
8
- export declare const verifyEncryption: (formSalt: string, encryptedValue?: string, originalValue?: string, maxAgeMinutes?: number) => boolean;
9
- export interface QuoteRequest {
10
- name?: string;
11
- email?: string;
12
- company?: string;
13
- message?: string;
14
- fromCta?: string;
15
- phone: string;
16
- encryptedField?: string;
17
- }
18
- export declare function EnquiryForm(props: {
19
- submitAlign?: "left" | "center" | "right";
20
- actionUrl?: string;
21
- formSalt: string;
22
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { TMedias } from "../../../entify";
2
- export type MediasProps = {
3
- value?: TMedias;
4
- className?: string;
5
- children?: React.ReactNode;
6
- aspect?: string;
7
- };
8
- export declare const Medias: import("react").ForwardRefExoticComponent<MediasProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,15 +0,0 @@
1
- import { CSSProperties } from "react";
2
- import { TSlateResizable } from "@rxdrag/slate-preview";
3
- import { Product } from "@rxdrag/rxcms-models";
4
- export type TSlateProduct = TSlateResizable & {
5
- product?: Product;
6
- title?: string;
7
- description?: string;
8
- aspect?: string;
9
- };
10
- export declare const PRODUCT_KEY = "Product";
11
- export type ProductCardProps = {
12
- node?: TSlateProduct;
13
- style?: CSSProperties;
14
- };
15
- export declare const ProductCard: ({ node }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { ProductCardProps } from "./ProductCard";
2
- export declare const createXProductCardPreview: (websiteId?: string) => ({ node }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { Product } from "@rxdrag/rxcms-models";
2
- export declare function ProductCta(props: {
3
- product?: Product;
4
- popupKey?: string;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export declare function ProductDescription(props: HTMLAttributes<HTMLParagraphElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import { Product } from "@rxdrag/rxcms-models";
2
- import { HtmlHTMLAttributes } from "react";
3
- export declare function ProductMedia(props: {
4
- product?: Product;
5
- width?: number;
6
- aspect?: string;
7
- } & HtmlHTMLAttributes<HTMLImageElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { HTMLAttributes } from "react";
2
- export declare function ProductTitle(props: HTMLAttributes<HTMLHeadingElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { Product } from "@rxdrag/rxcms-models";
2
- import { ProductCardProps } from "./ProductCard";
3
- export declare function ProductView(props: {
4
- product?: Product;
5
- } & ProductCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { Product } from "@rxdrag/rxcms-models";
2
- export declare function useQueryProduct(productId?: string, websiteId?: string): Product | undefined;
@@ -1,8 +0,0 @@
1
- export type RichTextOutlineProps = {
2
- className?: string;
3
- itemClassName?: string;
4
- value?: string;
5
- yOffset?: number;
6
- style?: React.CSSProperties;
7
- };
8
- export declare const RichTextOutline: import("react").ForwardRefExoticComponent<RichTextOutlineProps & import("react").RefAttributes<HTMLUListElement>>;
@@ -1 +0,0 @@
1
- export declare function useAcitviedHeading(): string | null;
@@ -1,3 +0,0 @@
1
- export declare function Scroller(props: {
2
- threshold?: number;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export type SearchProps = React.InputHTMLAttributes<HTMLInputElement>;
2
- export declare const SearchInput: import("react").ForwardRefExoticComponent<SearchProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,6 +0,0 @@
1
- export type ShareProps = {
2
- socials?: string[];
3
- size?: "xs" | "sm" | "md" | "lg" | "xl";
4
- className?: string;
5
- };
6
- export declare const Share: import("react").ForwardRefExoticComponent<ShareProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,10 +0,0 @@
1
- export interface IconListType {
2
- [key: string]: {
3
- title: string;
4
- path: JSX.Element;
5
- url: (l: string, t?: string, ti?: string) => string;
6
- color: string;
7
- viewBox?: string;
8
- };
9
- }
10
- export declare const iconList: IconListType;
@@ -1,5 +0,0 @@
1
- export type XToTopProps = {
2
- className?: string;
3
- children?: React.ReactNode;
4
- };
5
- export declare const ToTop: import("react").ForwardRefExoticComponent<XToTopProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1 +0,0 @@
1
- export * from "./useScroll";
@@ -1,2 +0,0 @@
1
- export declare const defualtThreshold = 10;
2
- export declare function useScroll(threshold?: number): void;
package/dist/robots.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const disallowAllRobots = "User-agent: *\nDisallow: /";
2
- export declare const allowAllRobots = "User-agent: *\nDisallow:";
@@ -1,85 +0,0 @@
1
- import { PopupEvent, SelectionEvent } from "./events";
2
- import { DualAnimation, SimpleAnimation } from "../motion/types";
3
- /**
4
- * 在每次页面切换后执行回调函数
5
- * 注意:此函数注册的事件监听器不会自动解注册,将在每次页面切换时执行
6
- *
7
- * @param init - 每次页面切换时要执行的回调函数
8
- * @returns 用于手动解注册事件的函数
9
- */
10
- export declare function onEverySwap(init: () => void): () => void;
11
- /**
12
- * 初始化动画,在 page-load 事件触发时执行
13
- *
14
- * @param init - 初始化动画的回调函数
15
- */
16
- export declare function onPageLoaded(init: () => void): void;
17
- /**
18
- * 用于在脚本中监听弹出层的打开/关闭事件,并处理相关动画效果
19
- * 注意:此函数主要用于脚本中的事件处理,组件内部已有相应实现,无需使用
20
- *
21
- * @param targetKey - 要监听的弹出层的唯一标识
22
- * @param callback - 弹出层打开时的回调函数,可返回关闭时的清理函数
23
- * @returns 取消监听的函数
24
- *
25
- * @example
26
- * ```typescript
27
- * // 监听产品菜单的打开/关闭事件并添加旋转动画
28
- * onOpen("products-popup", () => {
29
- * // 打开时顺时针旋转
30
- * animate("#products-indicator", {
31
- * rotate: [0, 180],
32
- * });
33
- *
34
- * // 返回关闭时的动画处理函数
35
- * return () => {
36
- * animate("#products-indicator", {
37
- * rotate: [180, 0],
38
- * });
39
- * };
40
- * });
41
- * ```
42
- */
43
- export declare function onOpen(targetKey: string, callback?: (evnet?: PopupEvent) => VoidFunction | void): () => void;
44
- /**
45
- * 用于在脚本中监听弹出层的打开/关闭事件,并处理相关动画效果
46
- * 注意:此函数主要用于脚本中的事件处理,组件内部已有相应实现,无需使用
47
- *
48
- * @param callback - 弹出层打开时的回调函数,可返回关闭时的清理函数
49
- * @returns 取消监听的函数
50
- *
51
- */
52
- export declare function onPopupOpen(callback: (event: PopupEvent) => VoidFunction | void): () => void;
53
- export declare function onPopupClose(callback: (event: PopupEvent) => VoidFunction | void): () => void;
54
- export declare function onSelected(callback: (event: SelectionEvent) => VoidFunction | void): () => void;
55
- export declare function onUnSelected(callback: (event: SelectionEvent) => VoidFunction | void): () => void;
56
- /**
57
- * 初始化Popover的鼠标交互事件
58
- * @param popupKey - 弹出层的唯一标识
59
- * @param element - 弹出层的 DOM 元素
60
- */
61
- export declare function initPopover(popupKey: string, element: HTMLElement): void;
62
- export declare function getPopupContainer(popupKey: string): HTMLElement | undefined;
63
- export declare function initModal(popupKey: string, trigger: HTMLElement): void;
64
- /**
65
- * 初始化Modal关闭按钮
66
- * @param popupKey - 弹出层的唯一标识
67
- * @param closer - 关闭按钮元素
68
- */
69
- export declare function initModalCloser(popupKey: string, closer: HTMLElement): void;
70
- /**
71
- * 打开弹出层
72
- * @param popupKey
73
- * @param target
74
- */
75
- export declare function openPopup(popupKey: string, target: HTMLElement): void;
76
- export declare function select(key: string, target: HTMLElement, selection: string): void;
77
- export declare function unselect(key: string, target: HTMLElement, selection: string): void;
78
- /**
79
- * 关闭弹出层
80
- * @param popupKey - 弹出层的唯一标识
81
- * @param target - 可选的目标元素,如果提供则使用该元素,否则查找容器
82
- */
83
- export declare function closePopup(popupKey: string, target?: HTMLElement): void;
84
- export declare function normalizeSimpleAnimation(animation?: SimpleAnimation): import("../motion/types").BaseAnimation | undefined;
85
- export declare function normalizeDualAnimation(animation?: DualAnimation): DualAnimation | undefined;
@@ -1,21 +0,0 @@
1
- export declare const DATA_POPUP = "data-popup";
2
- export declare const DATA_POPUP_ROLE = "data-popup-role";
3
- export declare const DATA_POPUP_CTA = "data-popup-cta";
4
- export declare const DATA_VIEWPORT_ENTERED = "data-viewport-entered";
5
- export declare enum PopupRole {
6
- PopoverContainer = "popover-container",
7
- PopoverPanel = "popover-panel",
8
- ModalContainer = "modal-container",
9
- ModalTrigger = "modal-trigger",
10
- ModalPanel = "modal-panel",
11
- ModalCloser = "modal-closer"
12
- }
13
- export declare const DEFAULT_ENQUIRY_POPUP = "enquiry-modal";
14
- /** 弹出层打开事件名称 */
15
- export declare const EVENT_OPEN = "popup-open";
16
- /** 弹出层关闭事件名称 */
17
- export declare const EVENT_CLOSE = "popup-close";
18
- /** 元素选中事件名称,比如tab切换 */
19
- export declare const EVENT_SELECT = "element-select";
20
- /** 元素取消选中事件名称 */
21
- export declare const EVENT_UNSELECT = "element-unselect";
@@ -1,11 +0,0 @@
1
- export type PopupEvent = {
2
- key: string;
3
- target?: HTMLElement;
4
- };
5
- export type SelectionEvent = {
6
- key: string;
7
- target: HTMLElement;
8
- selection: string;
9
- };
10
- export declare const $emit: (event: string, options?: PopupEvent | SelectionEvent) => void;
11
- export declare const $on: <T = PopupEvent | SelectionEvent>(event: string, callback: (options: T) => void) => () => void;
package/dist/style.css DELETED
@@ -1,98 +0,0 @@
1
- .product-cta-button {
2
- width: 100%;
3
- padding: 8px 16px;
4
- }.x-figure .product-title{
5
- margin-top: 0.6rem;
6
- padding-top: 0;
7
- }.x-figure .product-description {
8
- margin-top: 0;
9
- margin-bottom: 0;
10
- padding-top: 0;
11
- padding-bottom: 0.4rem;
12
- }.x-figure .x-figure-caption{
13
- text-align: center;
14
- }/* 默认prose间距过大,此处处理,跟官网展示的有点不一致,后面升级可能就不需要这个代码了 */
15
- .x-figure img {
16
- margin-top: 0;
17
- margin-bottom: 0;
18
- }
19
-
20
- .media-container {
21
- position: relative;
22
- margin-left: auto;
23
- margin-right: auto;
24
- max-width: 100%;
25
- }
26
-
27
- .media-caption {
28
- flex: 1;
29
- max-width: 100%;
30
- text-align: center;
31
- }.x-slate-image{
32
- object-fit: cover;
33
- max-width: 100%;
34
- width: 100%;
35
- }.x-slate-table {
36
- margin-top: 1rem;
37
- /* my-4 (4 * 0.25rem) */
38
- margin-bottom: 1rem;
39
- /* my-4 (4 * 0.25rem) */
40
- margin-left: 1px;
41
- /* ml-px */
42
- margin-right: 0;
43
- /* mr-0 */
44
- display: table;
45
- /* table */
46
- height: 1px;
47
- /* h-px */
48
- width: 100%;
49
- /* w-full */
50
- table-layout: fixed;
51
- /* table-fixed */
52
- border-collapse: collapse;
53
- /* border-collapse */
54
- }
55
-
56
- .x-slate-table th {
57
- padding-top: .6em;
58
- padding-bottom: .6em;
59
- padding-inline-start: 0.6em;
60
- }
61
-
62
- .x-slate-table th:first-child{
63
- padding-inline-start: 0;
64
- }
65
-
66
- .x-slate-table p {
67
- padding: 0;
68
- margin: 0;
69
- }
70
-
71
- /* 默认条纹表格 */
72
- .table-striped tbody tr:nth-child(odd) {
73
- background-color: #f3f4f6;
74
- }
75
-
76
- .table-striped p {
77
- padding: 0;
78
- margin: 0;
79
- }
80
-
81
- .table-striped tbody tr:nth-child(even) {
82
- background-color: #ffffff;
83
- }
84
-
85
- .dark .table-striped tbody tr:nth-child(odd) {
86
- background-color: #1e293b;
87
- }
88
-
89
- .dark .table-striped tbody tr:nth-child(even) {
90
- background-color: #000000;
91
- }.x-slate-blockquote{
92
- white-space: pre-wrap;
93
- }.x-figure .product-media {
94
- overflow: hidden;
95
- display: flex;
96
- align-items: center;
97
- justify-content: center;
98
- }