@anker-in/headless-ui 1.0.26-alpha.1763109270406 → 1.0.26-alpha.1763367560339

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 (104) hide show
  1. package/dist/cjs/biz-components/DownLoad/index.js +1 -1
  2. package/dist/cjs/biz-components/DownLoad/index.js.map +2 -2
  3. package/dist/cjs/biz-components/Features/index.js +1 -1
  4. package/dist/cjs/biz-components/Features/index.js.map +2 -2
  5. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +23 -7
  6. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +1 -1
  7. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +3 -3
  8. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +5 -2
  9. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +5 -5
  10. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  11. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +6 -2
  12. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  13. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  14. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +6 -2
  15. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  16. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +3 -3
  17. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +6 -2
  18. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  19. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
  20. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +6 -2
  21. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  22. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +3 -3
  23. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +6 -2
  24. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
  25. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +3 -3
  26. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +6 -2
  27. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  28. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  29. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +43 -12
  30. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +1 -1
  31. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +2 -2
  32. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +6 -2
  33. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  34. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  35. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  36. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  37. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +6 -2
  38. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  39. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  40. package/dist/cjs/biz-components/SelectStore/index.js +1 -1
  41. package/dist/cjs/biz-components/SelectStore/index.js.map +2 -2
  42. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +2 -2
  43. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
  44. package/dist/cjs/components/ExposureDetector.d.ts +45 -0
  45. package/dist/cjs/components/ExposureDetector.js +2 -0
  46. package/dist/cjs/components/ExposureDetector.js.map +7 -0
  47. package/dist/cjs/components/index.d.ts +1 -0
  48. package/dist/cjs/components/index.js +1 -1
  49. package/dist/cjs/components/index.js.map +3 -3
  50. package/dist/cjs/hooks/useExposureDetection.d.ts +69 -0
  51. package/dist/cjs/hooks/useExposureDetection.js +2 -0
  52. package/dist/cjs/hooks/useExposureDetection.js.map +7 -0
  53. package/dist/esm/biz-components/DownLoad/index.js +1 -1
  54. package/dist/esm/biz-components/DownLoad/index.js.map +2 -2
  55. package/dist/esm/biz-components/Features/index.js +1 -1
  56. package/dist/esm/biz-components/Features/index.js.map +2 -2
  57. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +23 -7
  58. package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +1 -1
  59. package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +3 -3
  60. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +5 -2
  61. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +5 -5
  62. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  63. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +6 -2
  64. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  65. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  66. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +6 -2
  67. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  68. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +3 -3
  69. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +6 -2
  70. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  71. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
  72. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +6 -2
  73. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
  74. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +3 -3
  75. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +6 -2
  76. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
  77. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +3 -3
  78. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +6 -2
  79. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  80. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  81. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +43 -12
  82. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +2 -2
  83. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +6 -2
  84. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  85. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  86. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  87. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +2 -2
  88. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +6 -2
  89. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  90. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  91. package/dist/esm/biz-components/SelectStore/index.js +1 -1
  92. package/dist/esm/biz-components/SelectStore/index.js.map +2 -2
  93. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +2 -2
  94. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
  95. package/dist/esm/components/ExposureDetector.d.ts +45 -0
  96. package/dist/esm/components/ExposureDetector.js +2 -0
  97. package/dist/esm/components/ExposureDetector.js.map +7 -0
  98. package/dist/esm/components/index.d.ts +1 -0
  99. package/dist/esm/components/index.js +1 -1
  100. package/dist/esm/components/index.js.map +3 -3
  101. package/dist/esm/hooks/useExposureDetection.d.ts +69 -0
  102. package/dist/esm/hooks/useExposureDetection.js +2 -0
  103. package/dist/esm/hooks/useExposureDetection.js.map +7 -0
  104. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type UseExposureDetectionOptions } from '../hooks/useExposureDetection.js';
3
+ export interface ExposureDetectorProps extends Omit<UseExposureDetectionOptions, 'onExposure'> {
4
+ /**
5
+ * 子元素
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * 曝光回调函数
10
+ */
11
+ onExposure?: () => void;
12
+ /**
13
+ * 包装元素的标签,默认 'div'
14
+ */
15
+ as?: keyof JSX.IntrinsicElements;
16
+ /**
17
+ * 包装元素的 className
18
+ */
19
+ className?: string;
20
+ /**
21
+ * 包装元素的 style
22
+ */
23
+ style?: React.CSSProperties;
24
+ }
25
+ /**
26
+ * 曝光检测组件
27
+ * 使用 IntersectionObserver 检测子元素是否至少 50% 可见且停留时间超过指定时间
28
+ * 确保在整个页面生命周期中只曝光一次
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <ExposureDetector
33
+ * exposureKey="my-component-1"
34
+ * threshold={0.5}
35
+ * duration={2000}
36
+ * onExposure={() => {
37
+ * console.log('元素已曝光')
38
+ * }}
39
+ * >
40
+ * <div>内容</div>
41
+ * </ExposureDetector>
42
+ * ```
43
+ */
44
+ export declare const ExposureDetector: React.FC<ExposureDetectorProps>;
45
+ export default ExposureDetector;
@@ -0,0 +1,2 @@
1
+ "use strict";var R=Object.create;var n=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var P=(e,t)=>{for(var o in t)n(e,o,{get:t[o],enumerable:!0})},i=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of y(t))!O.call(e,r)&&r!==o&&n(e,r,{get:()=>t[r],enumerable:!(s=D(t,r))||s.enumerable});return e};var S=(e,t,o)=>(o=e!=null?R(N(e)):{},i(t||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),v=e=>i(n({},"__esModule",{value:!0}),e);var U={};P(U,{ExposureDetector:()=>x,default:()=>C});module.exports=v(U);var p=S(require("react")),u=require("../hooks/useExposureDetection.js");const x=({children:e,onExposure:t,exposureKey:o,threshold:s=.5,duration:r=2e3,once:a=!0,rootMargin:E="0px",as:l="div",className:m,style:f,...d})=>{const c=(0,p.useRef)(null);return(0,u.useExposureDetection)(c,{exposureKey:o,threshold:s,duration:r,once:a,onExposure:t,rootMargin:E}),p.default.createElement(l,{ref:c,className:m,style:f,...d},e)};var C=x;
2
+ //# sourceMappingURL=ExposureDetector.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ExposureDetector.tsx"],
4
+ "sourcesContent": ["import React, { useRef, type ReactNode } from 'react'\nimport { useExposureDetection, type UseExposureDetectionOptions } from '../hooks/useExposureDetection.js'\n\nexport interface ExposureDetectorProps extends Omit<UseExposureDetectionOptions, 'onExposure'> {\n /**\n * \u5B50\u5143\u7D20\n */\n children: ReactNode\n /**\n * \u66DD\u5149\u56DE\u8C03\u51FD\u6570\n */\n onExposure?: () => void\n /**\n * \u5305\u88C5\u5143\u7D20\u7684\u6807\u7B7E\uFF0C\u9ED8\u8BA4 'div'\n */\n as?: keyof JSX.IntrinsicElements\n /**\n * \u5305\u88C5\u5143\u7D20\u7684 className\n */\n className?: string\n /**\n * \u5305\u88C5\u5143\u7D20\u7684 style\n */\n style?: React.CSSProperties\n}\n\n/**\n * \u66DD\u5149\u68C0\u6D4B\u7EC4\u4EF6\n * \u4F7F\u7528 IntersectionObserver \u68C0\u6D4B\u5B50\u5143\u7D20\u662F\u5426\u81F3\u5C11 50% \u53EF\u89C1\u4E14\u505C\u7559\u65F6\u95F4\u8D85\u8FC7\u6307\u5B9A\u65F6\u95F4\n * \u786E\u4FDD\u5728\u6574\u4E2A\u9875\u9762\u751F\u547D\u5468\u671F\u4E2D\u53EA\u66DD\u5149\u4E00\u6B21\n *\n * @example\n * ```tsx\n * <ExposureDetector\n * exposureKey=\"my-component-1\"\n * threshold={0.5}\n * duration={2000}\n * onExposure={() => {\n * console.log('\u5143\u7D20\u5DF2\u66DD\u5149')\n * }}\n * >\n * <div>\u5185\u5BB9</div>\n * </ExposureDetector>\n * ```\n */\nexport const ExposureDetector: React.FC<ExposureDetectorProps> = ({\n children,\n onExposure,\n exposureKey,\n threshold = 0.5,\n duration = 2000,\n once = true,\n rootMargin = '0px',\n as: Component = 'div',\n className,\n style,\n ...rest\n}) => {\n const elementRef = useRef<HTMLElement>(null)\n\n useExposureDetection(elementRef, {\n exposureKey,\n threshold,\n duration,\n once,\n onExposure,\n rootMargin,\n })\n\n return React.createElement(\n Component,\n {\n ref: elementRef,\n className,\n style,\n ...rest,\n },\n children\n )\n}\n\nexport default ExposureDetector\n\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA8C,oBAC9CC,EAAuE,4CA4ChE,MAAMJ,EAAoD,CAAC,CAChE,SAAAK,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EAAW,IACX,KAAAC,EAAO,GACP,WAAAC,EAAa,MACb,GAAIC,EAAY,MAChB,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,KAAa,UAAoB,IAAI,EAE3C,iCAAqBA,EAAY,CAC/B,YAAAT,EACA,UAAAC,EACA,SAAAC,EACA,KAAAC,EACA,WAAAJ,EACA,WAAAK,CACF,CAAC,EAEM,EAAAM,QAAM,cACXL,EACA,CACE,IAAKI,EACL,UAAAH,EACA,MAAAC,EACA,GAAGC,CACL,EACAV,CACF,CACF,EAEA,IAAOJ,EAAQD",
6
+ "names": ["ExposureDetector_exports", "__export", "ExposureDetector", "ExposureDetector_default", "__toCommonJS", "import_react", "import_useExposureDetection", "children", "onExposure", "exposureKey", "threshold", "duration", "once", "rootMargin", "Component", "className", "style", "rest", "elementRef", "React"]
7
+ }
@@ -25,3 +25,4 @@ export { default as Theme } from './theme.js';
25
25
  export { default as Board } from './board.js';
26
26
  export { default as LoadingDots } from './loadingDots.js';
27
27
  export { default as Breadcrumb } from './breadcrumb.js';
28
+ export { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js';
@@ -1,2 +1,2 @@
1
- "use strict";var B=Object.create;var f=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var q=(t,p)=>{for(var d in p)f(t,d,{get:p[d],enumerable:!0})},P=(t,p,d,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let D of N(p))!j.call(t,D)&&D!==d&&f(t,D,{get:()=>p[D],enumerable:!(w=F(p,D))||w.enumerable});return t};var n=(t,p,d)=>(d=t!=null?B(O(t)):{},P(p||!t||!t.__esModule?f(d,"default",{value:t,enumerable:!0}):d,t)),z=t=>P(f({},"__esModule",{value:!0}),t);var E={};q(E,{Alert:()=>s.Alert,AlertDescription:()=>s.AlertDescription,AlertTitle:()=>s.AlertTitle,Avatar:()=>m.Avatar,AvatarFallback:()=>m.AvatarFallback,AvatarImage:()=>m.AvatarImage,Badge:()=>M.default,Board:()=>H.default,Breadcrumb:()=>h.default,Button:()=>T.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>u.Carousel,CarouselContent:()=>u.CarouselContent,CarouselItem:()=>u.CarouselItem,CarouselNext:()=>u.CarouselNext,CarouselPrevious:()=>u.CarouselPrevious,Checkbox:()=>b.default,Color:()=>v.Color,Container:()=>G.Container,Dialog:()=>o.Dialog,DialogClose:()=>o.DialogClose,DialogContent:()=>o.DialogContent,DialogDescription:()=>o.DialogDescription,DialogFooter:()=>o.DialogFooter,DialogHeader:()=>o.DialogHeader,DialogOverlay:()=>o.DialogOverlay,DialogPortal:()=>o.DialogPortal,DialogTitle:()=>o.DialogTitle,DialogTrigger:()=>o.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>r.DropdownMenu,DropdownMenuCheckboxItem:()=>r.DropdownMenuCheckboxItem,DropdownMenuContent:()=>r.DropdownMenuContent,DropdownMenuGroup:()=>r.DropdownMenuGroup,DropdownMenuItem:()=>r.DropdownMenuItem,DropdownMenuLabel:()=>r.DropdownMenuLabel,DropdownMenuPortal:()=>r.DropdownMenuPortal,DropdownMenuRadioGroup:()=>r.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>r.DropdownMenuRadioItem,DropdownMenuSeparator:()=>r.DropdownMenuSeparator,DropdownMenuShortcut:()=>r.DropdownMenuShortcut,DropdownMenuSub:()=>r.DropdownMenuSub,DropdownMenuSubContent:()=>r.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>r.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>r.DropdownMenuTrigger,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>c.Heading,Input:()=>x.Input,InputNumber:()=>S.default,InputSlot:()=>x.InputSlot,Link:()=>A.default,LoadingDots:()=>L.default,Picture:()=>k.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>y.default,Tabs:()=>i.Tabs,TabsContent:()=>i.TabsContent,TabsList:()=>i.TabsList,TabsTrigger:()=>i.TabsTrigger,Text:()=>I.Text,Theme:()=>R.default});module.exports=z(E);var T=n(require("./button.js")),M=n(require("./badge.js")),x=require("./input.js"),b=n(require("./checkbox.js")),y=n(require("./skeleton.js")),o=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),I=require("./text.js"),g=require("./gird.js"),c=require("./heading.js"),G=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),A=n(require("./link.js")),m=require("./avatar.js"),S=n(require("./input-number.js")),r=require("./drop-down.js"),a=require("./card.js"),u=require("./carousel.js"),i=require("./tabs.js"),s=require("./alert.js"),k=n(require("./picture.js")),R=n(require("./theme.js")),H=n(require("./board.js")),L=n(require("./loadingDots.js")),h=n(require("./breadcrumb.js"));
1
+ "use strict";var F=Object.create;var f=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var q=(t,p)=>{for(var d in p)f(t,d,{get:p[d],enumerable:!0})},P=(t,p,d,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let m of E(p))!j.call(t,m)&&m!==d&&f(t,m,{get:()=>p[m],enumerable:!(w=N(p,m))||w.enumerable});return t};var n=(t,p,d)=>(d=t!=null?F(O(t)):{},P(p||!t||!t.__esModule?f(d,"default",{value:t,enumerable:!0}):d,t)),z=t=>P(f({},"__esModule",{value:!0}),t);var J={};q(J,{Alert:()=>D.Alert,AlertDescription:()=>D.AlertDescription,AlertTitle:()=>D.AlertTitle,Avatar:()=>s.Avatar,AvatarFallback:()=>s.AvatarFallback,AvatarImage:()=>s.AvatarImage,Badge:()=>M.default,Board:()=>H.default,Breadcrumb:()=>h.default,Button:()=>T.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>u.Carousel,CarouselContent:()=>u.CarouselContent,CarouselItem:()=>u.CarouselItem,CarouselNext:()=>u.CarouselNext,CarouselPrevious:()=>u.CarouselPrevious,Checkbox:()=>b.default,Color:()=>v.Color,Container:()=>G.Container,Dialog:()=>o.Dialog,DialogClose:()=>o.DialogClose,DialogContent:()=>o.DialogContent,DialogDescription:()=>o.DialogDescription,DialogFooter:()=>o.DialogFooter,DialogHeader:()=>o.DialogHeader,DialogOverlay:()=>o.DialogOverlay,DialogPortal:()=>o.DialogPortal,DialogTitle:()=>o.DialogTitle,DialogTrigger:()=>o.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>r.DropdownMenu,DropdownMenuCheckboxItem:()=>r.DropdownMenuCheckboxItem,DropdownMenuContent:()=>r.DropdownMenuContent,DropdownMenuGroup:()=>r.DropdownMenuGroup,DropdownMenuItem:()=>r.DropdownMenuItem,DropdownMenuLabel:()=>r.DropdownMenuLabel,DropdownMenuPortal:()=>r.DropdownMenuPortal,DropdownMenuRadioGroup:()=>r.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>r.DropdownMenuRadioItem,DropdownMenuSeparator:()=>r.DropdownMenuSeparator,DropdownMenuShortcut:()=>r.DropdownMenuShortcut,DropdownMenuSub:()=>r.DropdownMenuSub,DropdownMenuSubContent:()=>r.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>r.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>r.DropdownMenuTrigger,ExposureDetector:()=>B.ExposureDetector,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>c.Heading,Input:()=>x.Input,InputNumber:()=>S.default,InputSlot:()=>x.InputSlot,Link:()=>A.default,LoadingDots:()=>L.default,Picture:()=>k.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>y.default,Tabs:()=>i.Tabs,TabsContent:()=>i.TabsContent,TabsList:()=>i.TabsList,TabsTrigger:()=>i.TabsTrigger,Text:()=>I.Text,Theme:()=>R.default});module.exports=z(J);var T=n(require("./button.js")),M=n(require("./badge.js")),x=require("./input.js"),b=n(require("./checkbox.js")),y=n(require("./skeleton.js")),o=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),I=require("./text.js"),g=require("./gird.js"),c=require("./heading.js"),G=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),A=n(require("./link.js")),s=require("./avatar.js"),S=n(require("./input-number.js")),r=require("./drop-down.js"),a=require("./card.js"),u=require("./carousel.js"),i=require("./tabs.js"),D=require("./alert.js"),k=n(require("./picture.js")),R=n(require("./theme.js")),H=n(require("./board.js")),L=n(require("./loadingDots.js")),h=n(require("./breadcrumb.js")),B=require("./ExposureDetector.js");
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { default as Breadcrumb } from './breadcrumb.js'\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,y9EAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAiC,yBACjCC,EAAuC,+BACvCC,EAAsC",
6
- "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "import_input", "import_checkbox", "import_skeleton", "import_dialog", "import_popover", "import_radio", "import_text", "import_gird", "import_heading", "import_container", "import_color", "import_drawer", "import_link", "import_avatar", "import_input_number", "import_drop_down", "import_card", "import_carousel", "import_tabs", "import_alert", "import_picture", "import_theme", "import_board", "import_loadingDots", "import_breadcrumb"]
4
+ "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { default as Breadcrumb } from './breadcrumb.js'\nexport { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js'\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,igFAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAiC,yBACjCC,EAAuC,+BACvCC,EAAsC,8BACtCC,EAA6D",
6
+ "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "import_input", "import_checkbox", "import_skeleton", "import_dialog", "import_popover", "import_radio", "import_text", "import_gird", "import_heading", "import_container", "import_color", "import_drawer", "import_link", "import_avatar", "import_input_number", "import_drop_down", "import_card", "import_carousel", "import_tabs", "import_alert", "import_picture", "import_theme", "import_board", "import_loadingDots", "import_breadcrumb", "import_ExposureDetector"]
7
7
  }
@@ -0,0 +1,69 @@
1
+ import { type RefObject } from 'react';
2
+ export interface UseExposureDetectionOptions {
3
+ /**
4
+ * 唯一标识,用于判断是否已曝光
5
+ * 如果不提供,将使用元素的唯一标识(如果可能)
6
+ */
7
+ exposureKey?: string;
8
+ /**
9
+ * 可见性阈值,0-1 之间,默认 0.5(50%)
10
+ */
11
+ threshold?: number;
12
+ /**
13
+ * 停留时间(毫秒),默认 2000ms
14
+ */
15
+ duration?: number;
16
+ /**
17
+ * 是否只触发一次,默认 true
18
+ */
19
+ once?: boolean;
20
+ /**
21
+ * 曝光回调函数
22
+ */
23
+ onExposure?: () => void;
24
+ /**
25
+ * IntersectionObserver 的 rootMargin
26
+ */
27
+ rootMargin?: string;
28
+ }
29
+ /**
30
+ * 曝光检测 Hook
31
+ * 使用 IntersectionObserver 检测元素是否至少 50% 可见且停留时间超过指定时间
32
+ * 确保在整个页面生命周期中只曝光一次
33
+ *
34
+ * @param elementRef - 要检测的元素的 ref
35
+ * @param options - 配置选项
36
+ * @returns 返回清除计时器的方法(用于切换时清理)
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * const MyComponent = () => {
41
+ * const ref = useRef<HTMLDivElement>(null)
42
+ * const { clearTimer } = useExposureDetection(ref, {
43
+ * exposureKey: 'my-component-1',
44
+ * threshold: 0.5,
45
+ * duration: 2000,
46
+ * onExposure: () => {
47
+ * console.log('元素已曝光')
48
+ * }
49
+ * })
50
+ *
51
+ * return <div ref={ref}>内容</div>
52
+ * }
53
+ * ```
54
+ */
55
+ export declare const useExposureDetection: (elementRef: RefObject<HTMLElement>, options?: UseExposureDetectionOptions) => {
56
+ clearTimer: () => void;
57
+ };
58
+ /**
59
+ * 清除指定 key 的曝光记录(用于测试或特殊场景)
60
+ */
61
+ export declare const clearExposureRecord: (key: string) => void;
62
+ /**
63
+ * 清除所有曝光记录(用于测试或特殊场景)
64
+ */
65
+ export declare const clearAllExposureRecords: () => void;
66
+ /**
67
+ * 检查指定 key 是否已曝光
68
+ */
69
+ export declare const hasExposed: (key: string) => boolean;
@@ -0,0 +1,2 @@
1
+ "use strict";var E=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var O=(e,r)=>{for(var o in r)E(e,o,{get:r[o],enumerable:!0})},w=(e,r,o,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of T(r))!K.call(e,u)&&u!==o&&E(e,u,{get:()=>r[u],enumerable:!(l=y(r,u))||l.enumerable});return e};var v=e=>w(E({},"__esModule",{value:!0}),e);var R={};O(R,{clearAllExposureRecords:()=>j,clearExposureRecord:()=>M,hasExposed:()=>A,useExposureDetection:()=>D});module.exports=v(R);var c=require("react");const i=new Set,D=(e,r={})=>{const{exposureKey:o,threshold:l=.5,duration:u=2e3,once:p=!0,onExposure:x,rootMargin:h="0px"}=r,t=(0,c.useRef)(null),d=(0,c.useRef)(null),m=(0,c.useCallback)(()=>{if(o)return o;if(e.current&&!d.current){const a=e.current.getAttribute("data-exposure-id");if(a)return d.current=a,a;const s=[];let n=e.current;for(;n&&n!==document.body;){const f=Array.from(n.parentElement?.children||[]).indexOf(n);s.unshift(`${n.tagName.toLowerCase()}[${f}]`),n=n.parentElement}return d.current=s.join(" > "),d.current}return d.current||""},[o,e]),g=(0,c.useCallback)(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]);return(0,c.useEffect)(()=>{const a=e.current;if(!a||!x)return;const s=m();if(!s){console.warn("useExposureDetection: \u65E0\u6CD5\u751F\u6210\u552F\u4E00\u7684 exposureKey\uFF0C\u8BF7\u63D0\u4F9B exposureKey \u53C2\u6570");return}if(p&&i.has(s))return;const n=new IntersectionObserver(f=>{f.forEach(b=>{b.intersectionRatio>=l?(!p||!i.has(s))&&!t.current&&(t.current=setTimeout(()=>{p&&i.has(s)||(p&&i.add(s),x())},u)):t.current&&(clearTimeout(t.current),t.current=null)})},{threshold:l,rootMargin:h});return n.observe(a),()=>{n.disconnect(),t.current&&(clearTimeout(t.current),t.current=null)}},[e,x,l,u,p,h,m]),{clearTimer:g}},M=e=>{i.delete(e)},j=()=>{i.clear()},A=e=>i.has(e);
2
+ //# sourceMappingURL=useExposureDetection.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/useExposureDetection.ts"],
4
+ "sourcesContent": ["import { type RefObject, useRef, useEffect, useCallback } from 'react'\n\n// \u5168\u5C40\u66DD\u5149\u8BB0\u5F55\uFF0C\u786E\u4FDD\u6BCF\u4E2A\u5143\u7D20\u5728\u6574\u4E2A\u9875\u9762\u751F\u547D\u5468\u671F\u4E2D\u53EA\u66DD\u5149\u4E00\u6B21\nconst exposedElementsSet = new Set<string>()\n\nexport interface UseExposureDetectionOptions {\n /**\n * \u552F\u4E00\u6807\u8BC6\uFF0C\u7528\u4E8E\u5224\u65AD\u662F\u5426\u5DF2\u66DD\u5149\n * \u5982\u679C\u4E0D\u63D0\u4F9B\uFF0C\u5C06\u4F7F\u7528\u5143\u7D20\u7684\u552F\u4E00\u6807\u8BC6\uFF08\u5982\u679C\u53EF\u80FD\uFF09\n */\n exposureKey?: string\n /**\n * \u53EF\u89C1\u6027\u9608\u503C\uFF0C0-1 \u4E4B\u95F4\uFF0C\u9ED8\u8BA4 0.5\uFF0850%\uFF09\n */\n threshold?: number\n /**\n * \u505C\u7559\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\uFF0C\u9ED8\u8BA4 2000ms\n */\n duration?: number\n /**\n * \u662F\u5426\u53EA\u89E6\u53D1\u4E00\u6B21\uFF0C\u9ED8\u8BA4 true\n */\n once?: boolean\n /**\n * \u66DD\u5149\u56DE\u8C03\u51FD\u6570\n */\n onExposure?: () => void\n /**\n * IntersectionObserver \u7684 rootMargin\n */\n rootMargin?: string\n}\n\n/**\n * \u66DD\u5149\u68C0\u6D4B Hook\n * \u4F7F\u7528 IntersectionObserver \u68C0\u6D4B\u5143\u7D20\u662F\u5426\u81F3\u5C11 50% \u53EF\u89C1\u4E14\u505C\u7559\u65F6\u95F4\u8D85\u8FC7\u6307\u5B9A\u65F6\u95F4\n * \u786E\u4FDD\u5728\u6574\u4E2A\u9875\u9762\u751F\u547D\u5468\u671F\u4E2D\u53EA\u66DD\u5149\u4E00\u6B21\n *\n * @param elementRef - \u8981\u68C0\u6D4B\u7684\u5143\u7D20\u7684 ref\n * @param options - \u914D\u7F6E\u9009\u9879\n * @returns \u8FD4\u56DE\u6E05\u9664\u8BA1\u65F6\u5668\u7684\u65B9\u6CD5\uFF08\u7528\u4E8E\u5207\u6362\u65F6\u6E05\u7406\uFF09\n *\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const ref = useRef<HTMLDivElement>(null)\n * const { clearTimer } = useExposureDetection(ref, {\n * exposureKey: 'my-component-1',\n * threshold: 0.5,\n * duration: 2000,\n * onExposure: () => {\n * console.log('\u5143\u7D20\u5DF2\u66DD\u5149')\n * }\n * })\n *\n * return <div ref={ref}>\u5185\u5BB9</div>\n * }\n * ```\n */\nexport const useExposureDetection = (\n elementRef: RefObject<HTMLElement>,\n options: UseExposureDetectionOptions = {}\n) => {\n const {\n exposureKey,\n threshold = 0.5,\n duration = 2000,\n once = true,\n onExposure,\n rootMargin = '0px',\n } = options\n\n const exposureTimerRef = useRef<NodeJS.Timeout | null>(null)\n const generatedKeyRef = useRef<string | null>(null)\n\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\n const getExposureKey = useCallback(() => {\n if (exposureKey) {\n return exposureKey\n }\n // \u5982\u679C\u6CA1\u6709\u63D0\u4F9B key\uFF0C\u5C1D\u8BD5\u4F7F\u7528\u5143\u7D20\u7684\u552F\u4E00\u6807\u8BC6\n if (elementRef.current && !generatedKeyRef.current) {\n // \u4F7F\u7528\u5143\u7D20\u7684 data-exposure-id \u5C5E\u6027\uFF0C\u6216\u8005\u751F\u6210\u4E00\u4E2A\u57FA\u4E8E\u4F4D\u7F6E\u7684 key\n const dataId = elementRef.current.getAttribute('data-exposure-id')\n if (dataId) {\n generatedKeyRef.current = dataId\n return dataId\n }\n // \u5982\u679C\u6CA1\u6709 data-exposure-id\uFF0C\u4F7F\u7528\u5143\u7D20\u5728 DOM \u4E2D\u7684\u4F4D\u7F6E\u751F\u6210 key\n const path: string[] = []\n let el: Element | null = elementRef.current\n while (el && el !== document.body) {\n const index = Array.from(el.parentElement?.children || []).indexOf(el)\n path.unshift(`${el.tagName.toLowerCase()}[${index}]`)\n el = el.parentElement\n }\n generatedKeyRef.current = path.join(' > ')\n return generatedKeyRef.current\n }\n return generatedKeyRef.current || ''\n }, [exposureKey, elementRef])\n\n // \u6E05\u9664\u8BA1\u65F6\u5668\u7684\u65B9\u6CD5\uFF08\u4E0D\u91CD\u7F6E\u66DD\u5149\u72B6\u6001\uFF09\n const clearTimer = useCallback(() => {\n if (exposureTimerRef.current) {\n clearTimeout(exposureTimerRef.current)\n exposureTimerRef.current = null\n }\n }, [])\n\n useEffect(() => {\n const element = elementRef.current\n if (!element || !onExposure) return\n\n const key = getExposureKey()\n if (!key) {\n console.warn('useExposureDetection: \u65E0\u6CD5\u751F\u6210\u552F\u4E00\u7684 exposureKey\uFF0C\u8BF7\u63D0\u4F9B exposureKey \u53C2\u6570')\n return\n }\n\n // \u5982\u679C\u5DF2\u7ECF\u66DD\u5149\u8FC7\u4E14\u8BBE\u7F6E\u4E86 once\uFF0C\u76F4\u63A5\u8FD4\u56DE\uFF0C\u4E0D\u518D\u76D1\u542C\n if (once && exposedElementsSet.has(key)) {\n return\n }\n\n const observer = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n // \u5982\u679C\u53EF\u89C1\u6027\u8FBE\u5230\u9608\u503C\uFF08\u9ED8\u8BA4 50%\uFF09\n if (entry.intersectionRatio >= threshold) {\n // \u5982\u679C\u8FD8\u6CA1\u6709\u89E6\u53D1\u8FC7\u66DD\u5149\u4E14\u6CA1\u6709\u6B63\u5728\u8BA1\u65F6\u7684\u8BA1\u65F6\u5668\uFF0C\u5F00\u59CB\u8BA1\u65F6\n if ((!once || !exposedElementsSet.has(key)) && !exposureTimerRef.current) {\n exposureTimerRef.current = setTimeout(() => {\n // \u518D\u6B21\u68C0\u67E5\u662F\u5426\u5DF2\u66DD\u5149\uFF08\u9632\u6B62\u5728\u8BA1\u65F6\u671F\u95F4\u88AB\u5176\u4ED6\u64CD\u4F5C\u89E6\u53D1\uFF09\n if (once && exposedElementsSet.has(key)) return\n\n // \u6807\u8BB0\u4E3A\u5DF2\u66DD\u5149\n if (once) {\n exposedElementsSet.add(key)\n }\n // \u89E6\u53D1\u66DD\u5149\u4E8B\u4EF6\n onExposure()\n }, duration)\n }\n } else {\n // \u5982\u679C\u53EF\u89C1\u6027\u4F4E\u4E8E\u9608\u503C\uFF0C\u6E05\u9664\u8BA1\u65F6\u5668\uFF08\u4F46\u4E0D\u79FB\u9664\u66DD\u5149\u6807\u8BB0\uFF09\n if (exposureTimerRef.current) {\n clearTimeout(exposureTimerRef.current)\n exposureTimerRef.current = null\n }\n }\n })\n },\n {\n threshold: threshold,\n rootMargin: rootMargin,\n }\n )\n\n observer.observe(element)\n\n return () => {\n observer.disconnect()\n if (exposureTimerRef.current) {\n clearTimeout(exposureTimerRef.current)\n exposureTimerRef.current = null\n }\n }\n }, [elementRef, onExposure, threshold, duration, once, rootMargin, getExposureKey])\n\n return { clearTimer }\n}\n\n/**\n * \u6E05\u9664\u6307\u5B9A key \u7684\u66DD\u5149\u8BB0\u5F55\uFF08\u7528\u4E8E\u6D4B\u8BD5\u6216\u7279\u6B8A\u573A\u666F\uFF09\n */\nexport const clearExposureRecord = (key: string) => {\n exposedElementsSet.delete(key)\n}\n\n/**\n * \u6E05\u9664\u6240\u6709\u66DD\u5149\u8BB0\u5F55\uFF08\u7528\u4E8E\u6D4B\u8BD5\u6216\u7279\u6B8A\u573A\u666F\uFF09\n */\nexport const clearAllExposureRecords = () => {\n exposedElementsSet.clear()\n}\n\n/**\n * \u68C0\u67E5\u6307\u5B9A key \u662F\u5426\u5DF2\u66DD\u5149\n */\nexport const hasExposed = (key: string): boolean => {\n return exposedElementsSet.has(key)\n}\n\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,wBAAAC,EAAA,eAAAC,EAAA,yBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAA+D,iBAG/D,MAAMC,EAAqB,IAAI,IAwDlBH,EAAuB,CAClCI,EACAC,EAAuC,CAAC,IACrC,CACH,KAAM,CACJ,YAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EAAW,IACX,KAAAC,EAAO,GACP,WAAAC,EACA,WAAAC,EAAa,KACf,EAAIN,EAEEO,KAAmB,UAA8B,IAAI,EACrDC,KAAkB,UAAsB,IAAI,EAG5CC,KAAiB,eAAY,IAAM,CACvC,GAAIR,EACF,OAAOA,EAGT,GAAIF,EAAW,SAAW,CAACS,EAAgB,QAAS,CAElD,MA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CACd,CACF,EAEA,OAAAW,EAAS,QAAQF,CAAO,EAEjB,IAAM,CACXE,EAAS,WAAW,EAChBV,EAAiB,UACnB,aAAaA,EAAiB,OAAO,EACrCA,EAAiB,QAAU,KAE/B,CACF,EAAG,CAACR,EAAYM,EAAYH,EAAWC,EAAUC,EAAME,EAAYG,CAAc,CAAC,EAE3E,CAAE,WAAAK,CAAW,CACtB,EAKarB,EAAuBuB,GAAgB,CAClDlB,EAAmB,OAAOkB,CAAG,CAC/B,EAKaxB,EAA0B,IAAM,CAC3CM,EAAmB,MAAM,CAC3B,EAKaJ,EAAcsB,GAClBlB,EAAmB,IAAIkB,CAAG",
6
+ "names": ["useExposureDetection_exports", "__export", "clearAllExposureRecords", "clearExposureRecord", "hasExposed", "useExposureDetection", "__toCommonJS", "import_react", "exposedElementsSet", "elementRef", "options", "exposureKey", "threshold", "duration", "once", "onExposure", "rootMargin", "exposureTimerRef", "generatedKeyRef", "getExposureKey", "dataId", "path", "el", "index", "clearTimer", "element", "key", "observer", "entries", "entry"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as d,jsx as t,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import{withLayout as n}from"../../shared/Styles.js";import{Text as l,Link as x}from"../../components/index.js";const r=a=>{const{data:o}=a,{list:s}=o;return t(d,{children:t("div",{className:"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]",children:s?.map((e,i)=>t("div",{className:"w-full",children:p(x,{href:e?.link,target:"_blank",className:"w-full flex items-center justify-between py-[12px] px-[24px]",children:[p("div",{className:"flex items-center flex-row laptop:gap-[24px] gap-[12px]",children:[t(l,{html:e?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),e?.text&&t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"17",viewBox:"0 0 2 17",fill:"none",children:t("path",{d:"M1 0.5V16.5",stroke:"#3D3D3F"})}),t(l,{html:e?.text,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]}),p("div",{className:"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]",children:[t(l,{html:e?.time,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:t("path",{d:"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z",fill:"#1D1D1F"})})]})]})},i))})})};var v=n(r);export{v as default};
1
+ "use client";import{Fragment as d,jsx as t,jsxs as p}from"react/jsx-runtime";import"../../helpers/utils.js";import{withLayout as n}from"../../shared/Styles.js";import{Text as l,Link as x}from"../../components/index.js";const r=a=>{const{data:o}=a,{list:s}=o;return t(d,{children:t("div",{className:"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]",children:s?.map((e,i)=>t("div",{className:"w-full",children:p(x,{href:e?.link,target:"_blank",className:"w-full flex items-center justify-between py-[12px] px-[24px]",children:[p("div",{className:"flex items-center flex-row laptop:gap-[24px] gap-[12px]",children:[t(l,{html:e?.title,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),e?.text&&t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"17",viewBox:"0 0 2 17",fill:"none",children:t("path",{d:"M1 0.5V16.5",stroke:"#3D3D3F"})}),t(l,{html:e?.text,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"})]}),p("div",{className:"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]",children:[t(l,{html:e?.time,className:"text-[14px] font-bold leading-[1.4] laptop:text-[18px]"}),t("svg",{className:"icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:t("path",{d:"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z",fill:"currentColor"})})]})]})},i))})})};var C=n(r);export{C as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/DownLoad/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text ,Link} from '../../components/index.js'\n\nexport type DownLoadDataType = {\n title: string\n text: string\n time: string\n link: string\n line: Img\n icon: Img\n}\n\ntype DownLoadType = {\n data: {\n list:DownLoadDataType[]\n }\n className?: string\n}\n\nconst DownLoad = (props: DownLoadType) => {\n const { data } = props\n const { list } = data\n\n return (\n <>\n <div className=\"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]\">\n {list?.map((item, index) => (\n <div key={index} className=\"w-full\">\n <Link \n href={item?.link}\n target=\"_blank\" \n className=\"w-full flex items-center justify-between py-[12px] px-[24px]\">\n <div className=\"flex items-center flex-row laptop:gap-[24px] gap-[12px]\">\n <Text\n html={item?.title}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"h-[16px]\"\n source={item.line?.url}\n alt={item.line?.alt || ''}\n /> */}\n {\n item?.text && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2\" height=\"17\" viewBox=\"0 0 2 17\" fill=\"none\">\n <path d=\"M1 0.5V16.5\" stroke=\"#3D3D3F\"/>\n </svg>\n )\n }\n <Text\n html={item?.text}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n </div>\n\n {/* <Link\n href={item?.link}\n target=\"_blank\"\n > */}\n <div className=\"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]\">\n <Text\n html={item?.time}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"w-[24px]\"\n imgClassName=\"w-full h-auto\"\n source={item.icon?.url}\n alt={item.icon?.alt || ''}\n /> */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <path d=\"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z\" fill=\"#1D1D1F\"/>\n </svg>\n </div>\n \n {/* </Link> */}\n </Link>\n </div>\n ))}\n</div>\n\n </>\n )\n}\n\nexport default withLayout(DownLoad)\n"],
5
- "mappings": "aA2BI,mBAAAA,EASU,OAAAC,EADF,QAAAC,MARR,oBA1BJ,MAAmB,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAkB,QAAAC,EAAM,QAAAC,MAAW,4BAkBnC,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,CAAK,EAAID,EACX,CAAE,KAAAE,CAAK,EAAID,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAC,EAAC,OAAI,UAAU,oEACd,SAAAQ,GAAM,IAAI,CAACC,EAAMC,IAChBV,EAAC,OAAgB,UAAU,SACzB,SAAAC,EAACG,EAAA,CACC,KAAMK,GAAM,KACZ,OAAO,SACP,UAAU,+DACV,UAAAR,EAAC,OAAI,UAAU,0DACb,UAAAD,EAACG,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,yDACZ,EAOEA,GAAM,MACJT,EAAC,OAAI,MAAM,6BAA6B,MAAM,IAAI,OAAO,KAAK,QAAQ,WAAW,KAAK,OACpF,SAAAA,EAAC,QAAK,EAAE,cAAc,OAAO,UAAS,EACxC,EAGJA,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,GACF,EAMER,EAAC,OAAI,UAAU,wEACb,UAAAD,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,EAOAT,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QAAK,EAAE,8sBAA8sB,KAAK,UAAS,EACtuB,GACF,GAGJ,GAjDQU,CAkDV,CACL,EACH,EAEI,CAEJ,EAEA,IAAOC,EAAQT,EAAWG,CAAQ",
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text ,Link} from '../../components/index.js'\n\nexport type DownLoadDataType = {\n title: string\n text: string\n time: string\n link: string\n line: Img\n icon: Img\n}\n\ntype DownLoadType = {\n data: {\n list:DownLoadDataType[]\n }\n className?: string\n}\n\nconst DownLoad = (props: DownLoadType) => {\n const { data } = props\n const { list } = data\n\n return (\n <>\n <div className=\"bg-[#EAEAEC] rounded-2xl w-full p-[12px] flex flex-col gap-[12px]\">\n {list?.map((item, index) => (\n <div key={index} className=\"w-full\">\n <Link \n href={item?.link}\n target=\"_blank\" \n className=\"w-full flex items-center justify-between py-[12px] px-[24px]\">\n <div className=\"flex items-center flex-row laptop:gap-[24px] gap-[12px]\">\n <Text\n html={item?.title}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"h-[16px]\"\n source={item.line?.url}\n alt={item.line?.alt || ''}\n /> */}\n {\n item?.text && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2\" height=\"17\" viewBox=\"0 0 2 17\" fill=\"none\">\n <path d=\"M1 0.5V16.5\" stroke=\"#3D3D3F\"/>\n </svg>\n )\n }\n <Text\n html={item?.text}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n </div>\n\n {/* <Link\n href={item?.link}\n target=\"_blank\"\n > */}\n <div className=\"flex items-center justify-center flex-row laptop:gap-[24px] gap-[4px]\">\n <Text\n html={item?.time}\n className=\"text-[14px] font-bold leading-[1.4] laptop:text-[18px]\"\n />\n {/* <Picture\n className=\"w-[24px]\"\n imgClassName=\"w-full h-auto\"\n source={item.icon?.url}\n alt={item.icon?.alt || ''}\n /> */}\n <svg className='icon' xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <path d=\"M21 11.5C21.5523 11.5 22 11.9477 22 12.5V18.5C22 20.1569 20.6569 21.5 19 21.5H5C3.34315 21.5 2 20.1569 2 18.5V12.5C2 11.9477 2.44772 11.5 3 11.5C3.55228 11.5 4 11.9477 4 12.5V18.5C4 19.0523 4.44772 19.5 5 19.5H19C19.5523 19.5 20 19.0523 20 18.5V12.5C20 11.9477 20.4477 11.5 21 11.5ZM12.0039 2.25391C12.5562 2.25391 13.0039 2.70162 13.0039 3.25391V13.4736L16.4893 9.98828C16.8798 9.59777 17.5128 9.59779 17.9033 9.98828C18.2938 10.3788 18.2938 11.0118 17.9033 11.4023L13.4541 15.8516C12.6471 16.6583 11.3392 16.6582 10.5322 15.8516L6.08984 11.4092C5.69932 11.0187 5.69932 10.3856 6.08984 9.99512C6.48037 9.60466 7.11341 9.60462 7.50391 9.99512L11.0039 13.4951V3.25391C11.0039 2.70162 11.4516 2.25391 12.0039 2.25391Z\" fill=\"currentColor\"/>\n </svg>\n </div>\n \n {/* </Link> */}\n </Link>\n </div>\n ))}\n</div>\n\n </>\n )\n}\n\nexport default withLayout(DownLoad)\n"],
5
+ "mappings": "aA2BI,mBAAAA,EASU,OAAAC,EADF,QAAAC,MARR,oBA1BJ,MAAmB,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAkB,QAAAC,EAAM,QAAAC,MAAW,4BAkBnC,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,CAAK,EAAID,EACX,CAAE,KAAAE,CAAK,EAAID,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAC,EAAC,OAAI,UAAU,oEACd,SAAAQ,GAAM,IAAI,CAACC,EAAMC,IAChBV,EAAC,OAAgB,UAAU,SACzB,SAAAC,EAACG,EAAA,CACC,KAAMK,GAAM,KACZ,OAAO,SACP,UAAU,+DACV,UAAAR,EAAC,OAAI,UAAU,0DACb,UAAAD,EAACG,EAAA,CACC,KAAMM,GAAM,MACZ,UAAU,yDACZ,EAOEA,GAAM,MACJT,EAAC,OAAI,MAAM,6BAA6B,MAAM,IAAI,OAAO,KAAK,QAAQ,WAAW,KAAK,OACpF,SAAAA,EAAC,QAAK,EAAE,cAAc,OAAO,UAAS,EACxC,EAGJA,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,GACF,EAMER,EAAC,OAAI,UAAU,wEACb,UAAAD,EAACG,EAAA,CACC,KAAMM,GAAM,KACZ,UAAU,yDACZ,EAOAT,EAAC,OAAI,UAAU,OAAO,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACvG,SAAAA,EAAC,QAAK,EAAE,8sBAA8sB,KAAK,eAAc,EAC3uB,GACF,GAGJ,GAjDQU,CAkDV,CACL,EACH,EAEI,CAEJ,EAEA,IAAOC,EAAQT,EAAWG,CAAQ",
6
6
  "names": ["Fragment", "jsx", "jsxs", "withLayout", "Text", "Link", "DownLoad", "props", "data", "list", "item", "index", "DownLoad_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as n,jsx as t,jsxs as a}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as s}from"../../components/index.js";const x=d=>{const{data:l,className:g}=d,{list:i}=l;return t(n,{children:a("div",{className:"",children:[l?.title&&t("div",{className:"pb-[24px] desktop:w-[800px]",children:t(s,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&t(p,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&t(p,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),t("div",{className:"",children:t("div",{className:"flex flex-col gap-4",children:i.map((e,o)=>a("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${o%2===0?"laptop:flex-row-reverse":""}`,children:[a("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[t(s,{html:e?.title,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),t(s,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&a("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[a("div",{className:"",children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),a("div",{children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&t("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:t(p,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),t("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:t(p,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),t("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:t(p,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},o))})})]})})};var f=r(x);export{f as default};
1
+ "use client";import{Fragment as n,jsx as t,jsxs as s}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as a}from"../../components/index.js";const x=d=>{const{data:l,className:g}=d,{list:i}=l;return t(n,{children:s("div",{className:"",children:[l?.title&&t("div",{className:"pb-[24px] desktop:w-[800px]",children:t(a,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&t(p,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&t(p,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),t("div",{className:"",children:t("div",{className:"flex flex-col gap-4",children:i.map((e,o)=>s("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${o%2===0?"laptop:flex-row-reverse":""}`,children:[s("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[t(a,{html:e?.title,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),t(a,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&s("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[s("div",{className:"",children:[t(a,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(a,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),s("div",{children:[t(a,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(a,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&t("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:t(p,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),t("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:t(p,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),t("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:t(p,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},o))})})]})})};var f=r(x);export{f as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Features/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
- "mappings": "aAkCI,mBAAAA,EAIQ,OAAAC,EAuCgB,QAAAC,MA3CxB,oBAjCJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAwB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,GACZ,UAAAM,GAAM,OACHP,EAAC,OAAI,UAAU,8BACf,SAAAA,EAACI,EAAA,CACG,KAAMG,GAAM,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,EAAC,OAAI,UAAU,4GACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,8BAA8B,OAAQO,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACxG,EACAV,EAAC,OAAI,UAAU,uEACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,6BAA6B,OAAQO,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAQ",
4
+ "sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\n\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
5
+ "mappings": "aAkCI,mBAAAA,EAIQ,OAAAC,EAuCgB,QAAAC,MA3CxB,oBAjCJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAwB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EAEjB,OACEP,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,GACZ,UAAAM,GAAM,OACHP,EAAC,OAAI,UAAU,8BACf,SAAAA,EAACI,EAAA,CACG,KAAMG,GAAM,MACZ,UAAU,8HACd,EACA,EAGHA,GAAM,KAAK,KACRP,EAACG,EAAA,CACG,UAAU,iDACV,aAAa,GACb,OAAQI,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EAEHA,GAAM,W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AAAA,EAACG,EAAA,CAAQ,UAAU,6BAA6B,OAAQO,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQV,EAAWG,CAAQ",
6
6
  "names": ["Fragment", "jsx", "jsxs", "withLayout", "Picture", "Text", "Features", "props", "data", "className", "list", "item", "index", "Features_default"]
7
7
  }
@@ -1,12 +1,28 @@
1
- import type { Product, ProductVariant } from '../../types/product';
1
+ /// <reference types="react" />
2
+ import type { ProductVariant } from '../../types/product';
2
3
  import type { DeliveryCustom } from './type';
3
- declare const PaidShipping: ({ metafields, productList, onShippingInfoChange, variant, className, }: {
4
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<{
4
5
  metafields: any;
5
- productList: Array<Product & {
6
+ productList: ({
7
+ path?: string | undefined;
8
+ images: import("../../types/graphql.js").Image[];
9
+ media: import("../../types/product").ProductMedia[];
10
+ variants: ProductVariant[];
11
+ price: import("../../types/product").ProductPrice;
12
+ options: import("../../types/product").ProductOption[];
13
+ metafields?: {
14
+ [key: string]: any;
15
+ } | undefined;
16
+ slug: string;
17
+ payload?: any;
18
+ } & Omit<import("../../types/graphql.js").Product, "media" | "metafields" | "price" | "options" | "images" | "variants"> & {
6
19
  variant: ProductVariant;
7
- }>;
20
+ })[];
8
21
  variant: ProductVariant;
9
22
  onShippingInfoChange: (deliveryCustom: DeliveryCustom) => void;
10
- className?: string;
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- export default PaidShipping;
23
+ className?: string | undefined;
24
+ }, keyof import("../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../shared/Styles.js").StylesProps & import("../../../../shared/Styles.js").ContainerProps> & {
25
+ className?: string | undefined;
26
+ data?: Record<string, any> | undefined;
27
+ } & import("react").RefAttributes<any>>;
28
+ export default _default;
@@ -1,2 +1,2 @@
1
- import{jsx as o,jsxs as T}from"react/jsx-runtime";import{Text as c}from"../../../../components/index.js";import{useCallback as h,useEffect as D,useMemo as b,useState as g}from"react";import{cn as O}from"../../../../helpers";import z from"./ShippingMethod";import{ShippingPolicyModal as E}from"./ShippingPolicyModal";import{isWeightAvailable as v}from"./utils";import I from"./LearnMore";import{useBizProductContext as L}from"../../BizProductProvider.js";const V=({metafields:i,productList:m,onShippingInfoChange:u,variant:y,className:P})=>{const{isLogin:_,openSignInPopup:w}=L(),[k,x]=g(!1),[M,C]=g(!1),[N,S]=g(null),f=b(()=>m.reduce((e,p)=>e+(p?.variant?.weight||0),0),[m]),r=h((e,p,n)=>({id:`${e.__code}__${e.price}`,code:e.__code,mode:e.__mode,title:e.title,disabled:!v(p,e),price:e.price,subtitle:e.subtitle,tag:n!==0?i?.memberOnly:"",error:v(p,e)?"":i.overWeightError}),[i?.memberOnly,i.overWeightError]),l=b(()=>{const e=i?.list?.map((p,n)=>r(p,f,n));return e?.reduce((p,n)=>{const a=e.filter(t=>t.code==n.code);let s;return a.every(t=>t.disabled)?s=a[a.length-1]:s=a.find(t=>!t.disabled),p.find(t=>s.id===t.id)?p:[...p,s]},[])},[r,i?.list,f]),d=h(e=>{u({selected_delivery_code:e.code,selected_delivery_mode:e.mode})},[u]);D(()=>{if(i?.list?.length>0&&!M){const e=r(i?.list[0],0,0);S(e),d(e),C(!0)}},[r,i?.list,d,M]);const A=h(e=>{e.disabled||(S(e),d(e))},[_,l,y.sku,d,w]);return T("div",{id:"ipc-product-paid-shipping",className:O(" mt-16 desktop:mt-[96px] lg-desktop:mt-[128px] px-4 tablet:px-0 tablet:px-8 laptop:px-16 desktop:px-0",P),children:[o("div",{className:"flex flex-wrap justify-between space-x-2 md:space-x-1",children:o(c,{className:"text-[20px] font-bold leading-[1.4] text-[#1F2021] md:text-[16px]",html:i?.title})}),T("div",{className:"mt-[16px] flex flex-wrap gap-[12px] overflow-hidden md:mt-[12px] desktop:flex-nowrap",children:[l.map((e,p)=>o(z,{index:p,item:e,active:N?.code===e.code,toggleShipping:()=>A(e),currencyCode:y.price.currencyCode,metafields:i,className:"w-full laptop:w-[calc(50%-6px)] desktop:flex-1"},p)),o(I,{setOpenShippingPolicyModal:x,metafields:i,className:"w-full laptop:w-[calc(50%-6px)] desktop:w-[calc(33.33%-16px)] lg-desktop:w-[calc(33.33%-24px)]"})]}),l.find(e=>e?.error)&&o(c,{className:"mt-[16px] font-bold leading-[1.4] text-[#D41435] md:mt-[12px]",html:l.find(e=>e.error)?.error,as:"p"}),i?.seeAvailableArea&&o(c,{as:"div",className:"mt-[16px] font-bold leading-[1.4] text-[#1D1D1F] [&_a]:underline",html:i?.seeAvailableArea}),i?.shippingPolicy&&o(E,{data:i?.shippingPolicy,onClose:()=>x(!1),open:k})]})};var Q=V;export{Q as default};
1
+ import{jsx as o,jsxs as T}from"react/jsx-runtime";import{Text as c}from"../../../../components/index.js";import{useCallback as h,useEffect as D,useMemo as b,useState as g}from"react";import{cn as L}from"../../../../helpers";import O from"./ShippingMethod";import{ShippingPolicyModal as z}from"./ShippingPolicyModal";import{isWeightAvailable as v}from"./utils";import E from"./LearnMore";import{useBizProductContext as I}from"../../BizProductProvider.js";import{withLayout as V}from"../../../../shared/Styles.js";const W=({metafields:i,productList:m,onShippingInfoChange:u,variant:y,className:P})=>{const{isLogin:w,openSignInPopup:_}=I(),[k,x]=g(!1),[M,C]=g(!1),[N,f]=g(null),S=b(()=>m.reduce((e,p)=>e+(p?.variant?.weight||0),0),[m]),r=h((e,p,n)=>({id:`${e.__code}__${e.price}`,code:e.__code,mode:e.__mode,title:e.title,disabled:!v(p,e),price:e.price,subtitle:e.subtitle,tag:n!==0?i?.memberOnly:"",error:v(p,e)?"":i.overWeightError}),[i?.memberOnly,i.overWeightError]),l=b(()=>{const e=i?.list?.map((p,n)=>r(p,S,n));return e?.reduce((p,n)=>{const d=e.filter(t=>t.code==n.code);let s;return d.every(t=>t.disabled)?s=d[d.length-1]:s=d.find(t=>!t.disabled),p.find(t=>s.id===t.id)?p:[...p,s]},[])},[r,i?.list,S]),a=h(e=>{u({selected_delivery_code:e.code,selected_delivery_mode:e.mode})},[u]);D(()=>{if(i?.list?.length>0&&!M){const e=r(i?.list[0],0,0);f(e),a(e),C(!0)}},[r,i?.list,a,M]);const A=h(e=>{e.disabled||(f(e),a(e))},[w,l,y.sku,a,_]);return T("div",{id:"ipc-product-paid-shipping",className:L(" mt-16 desktop:mt-[96px] lg-desktop:mt-[128px] px-4 tablet:px-0 tablet:px-8 laptop:px-16 desktop:px-0",P),children:[o("div",{className:"flex flex-wrap justify-between space-x-2 md:space-x-1",children:o(c,{className:"text-[20px] font-bold leading-[1.4] text-[#1F2021] md:text-[16px]",html:i?.title})}),T("div",{className:"mt-[16px] flex flex-wrap gap-[12px] overflow-hidden md:mt-[12px] desktop:flex-nowrap",children:[l.map((e,p)=>o(O,{index:p,item:e,active:N?.code===e.code,toggleShipping:()=>A(e),currencyCode:y.price.currencyCode,metafields:i,className:"w-full laptop:w-[calc(50%-6px)] desktop:flex-1"},p)),o(E,{setOpenShippingPolicyModal:x,metafields:i,className:"w-full laptop:w-[calc(50%-6px)] desktop:w-[calc(33.33%-16px)] lg-desktop:w-[calc(33.33%-24px)]"})]}),l.find(e=>e?.error)&&o(c,{className:"mt-[16px] font-bold leading-[1.4] text-[#D41435] md:mt-[12px]",html:l.find(e=>e.error)?.error,as:"p"}),i?.seeAvailableArea&&o(c,{as:"div",className:"mt-[16px] font-bold leading-[1.4] text-[#1D1D1F] [&_a]:underline",html:i?.seeAvailableArea}),i?.shippingPolicy&&o(z,{data:i?.shippingPolicy,onClose:()=>x(!1),open:k})]})};var U=V(W);export{U as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/PaidShipping/index.tsx"],
4
- "sourcesContent": ["import { Container, Text } from '../../../../components/index.js'\nimport type { Product, ProductVariant } from '../../types/product'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { cn } from '../../../../helpers'\n\nimport ShippingMethod from './ShippingMethod'\nimport { ShippingPolicyModal } from './ShippingPolicyModal'\nimport type { DeliveryCustom, shippingMetafields, ShippingMethodType } from './type'\nimport { isWeightAvailable } from './utils'\nimport LearnMore from './LearnMore'\nimport { useBizProductContext } from '../../BizProductProvider.js'\n\nconst PaidShipping = ({\n metafields,\n productList,\n onShippingInfoChange,\n variant,\n className,\n}: {\n metafields: any\n productList: Array<Product & { variant: ProductVariant }>\n variant: ProductVariant\n onShippingInfoChange: (deliveryCustom: DeliveryCustom) => void\n className?: string\n}) => {\n const { isLogin, openSignInPopup } = useBizProductContext()\n const [openShippingPolicyModal, setOpenShippingPolicyModal] = useState(false)\n const [init, setInit] = useState(false)\n\n const [selectedMethod, setSelectedMethod] = useState<ShippingMethodType | null>(null)\n\n const weight = useMemo(() => {\n return productList.reduce((acc, product) => acc + (product?.variant?.weight || 0), 0)\n }, [productList])\n\n const normalizedMethod = useCallback(\n (method: shippingMetafields, weight: number, index: number) => {\n return {\n id: `${method.__code}__${method.price}`,\n code: method.__code,\n mode: method.__mode,\n title: method.title,\n disabled: !isWeightAvailable(weight, method),\n price: method.price,\n subtitle: method.subtitle,\n tag: index !== 0 ? metafields?.memberOnly : '',\n error: !isWeightAvailable(weight, method) ? metafields.overWeightError : '',\n }\n },\n [metafields?.memberOnly, metafields.overWeightError]\n )\n\n const list = useMemo(() => {\n const normalizedList: ShippingMethodType[] = metafields?.list?.map((method: shippingMetafields, index: number) =>\n normalizedMethod(method, weight, index)\n )\n\n return normalizedList?.reduce((prev: ShippingMethodType[], method: ShippingMethodType) => {\n // \u5982\u679C\u8D85\u91CD\uFF0C\u540C\u4E00\u4E2A\u7269\u6D41\u9009\u9879\u7C7B\u578B\u4E0B\uFF0C\u5C55\u793A\u5176\u4E2D\u4E00\u4E2A\u4E14\u4E0D\u53EF\u9009\n const sameTypeMethod = normalizedList.filter((m: ShippingMethodType) => m.code == method.code)\n let availableMethod: ShippingMethodType\n // \u6240\u6709\u7269\u6D41\u9009\u9879\u90FD\u4E0D\u53EF\u9009\n if (sameTypeMethod.every((m: ShippingMethodType) => m.disabled)) {\n availableMethod = sameTypeMethod[sameTypeMethod.length - 1]\n } else {\n // \u53EF\u9009\u7269\u6D41\u9009\u9879\n availableMethod = sameTypeMethod.find((m: ShippingMethodType) => !m.disabled)!\n }\n // \u5F53\u524D\u7269\u6D41\u9009\u9879\u5DF2\u5B58\u5728\n const hasSameMethod = prev.find((m: ShippingMethodType) => availableMethod.id === m.id)\n if (!hasSameMethod) {\n return [...prev, availableMethod]\n } else {\n return prev\n }\n }, [] as ShippingMethodType[])\n }, [normalizedMethod, metafields?.list, weight])\n\n const handleChangeShippingInfo = useCallback(\n (selectedMethod: ShippingMethodType) => {\n onShippingInfoChange({\n selected_delivery_code: selectedMethod.code,\n selected_delivery_mode: selectedMethod.mode,\n })\n },\n [onShippingInfoChange]\n )\n\n useEffect(() => {\n // \u9ED8\u8BA4\u9009\u4E2D\u7B2C\u4E00\u4E2A\u7269\u6D41\u9009\u9879\n if (metafields?.list?.length > 0 && !init) {\n const standardShippingMethod = normalizedMethod(metafields?.list[0], 0, 0)\n setSelectedMethod(standardShippingMethod)\n handleChangeShippingInfo(standardShippingMethod)\n setInit(true)\n }\n }, [normalizedMethod, metafields?.list, handleChangeShippingInfo, init])\n\n const toggleShipping = useCallback(\n (method: ShippingMethodType) => {\n if (method.disabled) {\n return\n }\n setSelectedMethod(method)\n handleChangeShippingInfo(method)\n // gaTrack({\n // event: 'ga4Event',\n // event_name: 'lp_button',\n // member_active_status: isLogin ? 'active' : 'not active', //\u7528\u4E8E\u8F93\u5165code\u6FC0\u6D3B\u4F1A\u5458\u5F39'\u7A97\u7684\u6309\u94AE\uFF0C\u533A\u5206\u4F1A\u5458\u6FC0\u6D3B\u72B6\u6001\uFF0C\u4F20active\u6216not active\n // event_parameters: {\n // page_group: 'Product Detail Page' + variant.sku, //\u5982\u679C\u662F\u9996\u9875\uFF0C\u5219\u4F20\"Home Page\";\u5982\u679C\u662Flisting\u7684\u9996\u5C4F\u6309\u94AE\uFF0C\u4F20Product Detail Page+$SKU\n // position: 'masterbanner1', //\u4F4D\u7F6E\u6807\u8BB0\u3002\u9996\u9875\u9996\u5C4F\u8F6E\u64AD\u4F4D\u7F6E\u4F20masterbanner1\u3001masterbanner2\u3001masterbanner3\uFF0C\u7B2C\u4E8C\u5C4F\u4F202nd_banner\uFF0C\u7B2C\u4E09\u5C4F\u4F203rd_banner\uFF0C\u6216\u8005\u53D6\u8BE5\u6A21\u5757\u5C0F\u6807\u9898\uFF0C\u6216\u80FD\u8BC6\u522B\u51FA\u662F\u54EA\u4E2A\u6A21\u5757\u4F4D\u7F6E\u7684\u6587\u6848\uFF0C\u5F39\u7A97\u4F20pop;\u5982\u679C\u662F\u8D2D\u7269\u8F66\u4FA7\u8FB9\u680F\uFF0C\u5219\u4F20\"Cart Pop Up\"\n // button_name: method.title, //\u53D6\u6309\u94AE\u6587\u6848\uFF0C\u6216\u80FD\u8BC6\u522B\u51FA\u662F\u54EA\u4E2A\u6309\u94AE\u7684\u6587\u6848,\u6BD4\u5982\u53F3\u4E0A\u89D2\u5173\u95ED\u4F20close,\u793E\u5A92\u5206\u4EAB\u56FE\u6807\u4F20\u5BF9\u5E94\u5E73\u53F0\u540D\u5B57\u5982Facebook,\u56FE\u7247\u5207\u6362\u5219\u4F20\u5BF9\u5E94\u5C55\u793A\u56FE\u7247\u7684\u540D\u5B57\n // info: '', //\u9ED8\u8BA4\u7A7A\u503C\uFF0C\u4E00\u822C\u4F20\u590D\u9009\u6846\u7684\u6587\u6848\u5185\u5BB9\uFF0C\u7279\u6B8A\u60C5\u51B5\u53EF\u6307\u5B9Ainfo\u503C\n // },\n // })\n },\n\n [isLogin, list, variant.sku, handleChangeShippingInfo, openSignInPopup]\n )\n\n return (\n <div\n id=\"ipc-product-paid-shipping\"\n className={cn(\n ' mt-16 desktop:mt-[96px] lg-desktop:mt-[128px] px-4 tablet:px-0 tablet:px-8 laptop:px-16 desktop:px-0',\n className\n )}\n >\n <div className=\"flex flex-wrap justify-between space-x-2 md:space-x-1\">\n <Text\n className=\"text-[20px] font-bold leading-[1.4] text-[#1F2021] md:text-[16px]\"\n html={metafields?.title}\n ></Text>\n {/* <button\n onClick={() => {\n setOpenShippingPolicyModal(true)\n }}\n className='text-brand-color text-[16px] font-semibold text-[#595959] underline md:text-[14px]'\n >\n {metafields?.policy}\n </button> */}\n </div>\n <div className=\"mt-[16px] flex flex-wrap gap-[12px] overflow-hidden md:mt-[12px] desktop:flex-nowrap\">\n {list.map((method: ShippingMethodType, index: number) => (\n <ShippingMethod\n key={index}\n index={index}\n item={method}\n active={selectedMethod?.code === method.code}\n toggleShipping={() => toggleShipping(method)}\n currencyCode={variant.price.currencyCode}\n metafields={metafields}\n className=\"w-full laptop:w-[calc(50%-6px)] desktop:flex-1\"\n />\n ))}\n {/* learn more \u5361\u7247 */}\n <LearnMore\n setOpenShippingPolicyModal={setOpenShippingPolicyModal}\n metafields={metafields}\n className=\"w-full laptop:w-[calc(50%-6px)] desktop:w-[calc(33.33%-16px)] lg-desktop:w-[calc(33.33%-24px)]\"\n />\n </div>\n {list.find((method: ShippingMethodType) => method?.error) && (\n <Text\n className=\"mt-[16px] font-bold leading-[1.4] text-[#D41435] md:mt-[12px]\"\n html={list.find((method: ShippingMethodType) => method.error)?.error as string}\n as=\"p\"\n />\n )}\n\n {metafields?.seeAvailableArea && (\n <Text\n as=\"div\"\n className=\"mt-[16px] font-bold leading-[1.4] text-[#1D1D1F] [&_a]:underline\"\n html={metafields?.seeAvailableArea}\n />\n )}\n {metafields?.shippingPolicy && (\n <ShippingPolicyModal\n data={metafields?.shippingPolicy}\n onClose={() => setOpenShippingPolicyModal(false)}\n open={openShippingPolicyModal}\n />\n )}\n </div>\n )\n}\n\nexport default PaidShipping\n"],
5
- "mappings": "AAkIQ,cAAAA,EAaF,QAAAC,MAbE,oBAlIR,OAAoB,QAAAC,MAAY,kCAEhC,OAAS,eAAAC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D,EACN,OAAQN,GAAgB,OAASM,EAAO,KACxC,eAAgB,IAAMU,EAAeV,CAAM,EAC3C,aAAcd,EAAQ,MAAM,aAC5B,WAAYH,EACZ,UAAU,kDAPLkB,CAQP,CACD,EAEDhC,EAACW,EAAA,CACC,2BAA4BW,EAC5B,WAAYR,EACZ,UAAU,iGACZ,GACF,EACCmB,EAAK,KAAMF,GAA+BA,GAAQ,KAAK,GACtD/B,EAACE,EAAA,CACC,UAAU,gEACV,KAAM+B,EAAK,KAAMF,GAA+BA,EAAO,KAAK,GAAG,MAC/D,GAAG,IACL,EAGDjB,GAAY,kBACXd,EAACE,EAAA,CACC,GAAG,MACH,UAAU,mEACV,KAAMY,GAAY,iBACpB,EAEDA,GAAY,gBACXd,EAACS,EAAA,CACC,KAAMK,GAAY,eAClB,QAAS,IAAMQ,EAA2B,EAAK,EAC/C,KAAMD,EACR,GAEJ,CAEJ,EAEA,IAAOqB,EAAQ7B",
6
- "names": ["jsx", "jsxs", "Text", "useCallback", "useEffect", "useMemo", "useState", "cn", "ShippingMethod", "ShippingPolicyModal", "isWeightAvailable", "LearnMore", "useBizProductContext", "PaidShipping", "metafields", "productList", "onShippingInfoChange", "variant", "className", "isLogin", "openSignInPopup", "openShippingPolicyModal", "setOpenShippingPolicyModal", "init", "setInit", "selectedMethod", "setSelectedMethod", "weight", "acc", "product", "normalizedMethod", "method", "index", "list", "normalizedList", "prev", "sameTypeMethod", "m", "availableMethod", "handleChangeShippingInfo", "standardShippingMethod", "toggleShipping", "PaidShipping_default"]
4
+ "sourcesContent": ["import { Container, Text } from '../../../../components/index.js'\nimport type { Product, ProductVariant } from '../../types/product'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { cn } from '../../../../helpers'\n\nimport ShippingMethod from './ShippingMethod'\nimport { ShippingPolicyModal } from './ShippingPolicyModal'\nimport type { DeliveryCustom, shippingMetafields, ShippingMethodType } from './type'\nimport { isWeightAvailable } from './utils'\nimport LearnMore from './LearnMore'\nimport { useBizProductContext } from '../../BizProductProvider.js'\nimport { withLayout } from '../../../../shared/Styles.js'\n\nconst PaidShipping = ({\n metafields,\n productList,\n onShippingInfoChange,\n variant,\n className,\n}: {\n metafields: any\n productList: Array<Product & { variant: ProductVariant }>\n variant: ProductVariant\n onShippingInfoChange: (deliveryCustom: DeliveryCustom) => void\n className?: string\n}) => {\n const { isLogin, openSignInPopup } = useBizProductContext()\n const [openShippingPolicyModal, setOpenShippingPolicyModal] = useState(false)\n const [init, setInit] = useState(false)\n\n const [selectedMethod, setSelectedMethod] = useState<ShippingMethodType | null>(null)\n\n const weight = useMemo(() => {\n return productList.reduce((acc, product) => acc + (product?.variant?.weight || 0), 0)\n }, [productList])\n\n const normalizedMethod = useCallback(\n (method: shippingMetafields, weight: number, index: number) => {\n return {\n id: `${method.__code}__${method.price}`,\n code: method.__code,\n mode: method.__mode,\n title: method.title,\n disabled: !isWeightAvailable(weight, method),\n price: method.price,\n subtitle: method.subtitle,\n tag: index !== 0 ? metafields?.memberOnly : '',\n error: !isWeightAvailable(weight, method) ? metafields.overWeightError : '',\n }\n },\n [metafields?.memberOnly, metafields.overWeightError]\n )\n\n const list = useMemo(() => {\n const normalizedList: ShippingMethodType[] = metafields?.list?.map((method: shippingMetafields, index: number) =>\n normalizedMethod(method, weight, index)\n )\n\n return normalizedList?.reduce((prev: ShippingMethodType[], method: ShippingMethodType) => {\n // \u5982\u679C\u8D85\u91CD\uFF0C\u540C\u4E00\u4E2A\u7269\u6D41\u9009\u9879\u7C7B\u578B\u4E0B\uFF0C\u5C55\u793A\u5176\u4E2D\u4E00\u4E2A\u4E14\u4E0D\u53EF\u9009\n const sameTypeMethod = normalizedList.filter((m: ShippingMethodType) => m.code == method.code)\n let availableMethod: ShippingMethodType\n // \u6240\u6709\u7269\u6D41\u9009\u9879\u90FD\u4E0D\u53EF\u9009\n if (sameTypeMethod.every((m: ShippingMethodType) => m.disabled)) {\n availableMethod = sameTypeMethod[sameTypeMethod.length - 1]\n } else {\n // \u53EF\u9009\u7269\u6D41\u9009\u9879\n availableMethod = sameTypeMethod.find((m: ShippingMethodType) => !m.disabled)!\n }\n // \u5F53\u524D\u7269\u6D41\u9009\u9879\u5DF2\u5B58\u5728\n const hasSameMethod = prev.find((m: ShippingMethodType) => availableMethod.id === m.id)\n if (!hasSameMethod) {\n return [...prev, availableMethod]\n } else {\n return prev\n }\n }, [] as ShippingMethodType[])\n }, [normalizedMethod, metafields?.list, weight])\n\n const handleChangeShippingInfo = useCallback(\n (selectedMethod: ShippingMethodType) => {\n onShippingInfoChange({\n selected_delivery_code: selectedMethod.code,\n selected_delivery_mode: selectedMethod.mode,\n })\n },\n [onShippingInfoChange]\n )\n\n useEffect(() => {\n // \u9ED8\u8BA4\u9009\u4E2D\u7B2C\u4E00\u4E2A\u7269\u6D41\u9009\u9879\n if (metafields?.list?.length > 0 && !init) {\n const standardShippingMethod = normalizedMethod(metafields?.list[0], 0, 0)\n setSelectedMethod(standardShippingMethod)\n handleChangeShippingInfo(standardShippingMethod)\n setInit(true)\n }\n }, [normalizedMethod, metafields?.list, handleChangeShippingInfo, init])\n\n const toggleShipping = useCallback(\n (method: ShippingMethodType) => {\n if (method.disabled) {\n return\n }\n setSelectedMethod(method)\n handleChangeShippingInfo(method)\n // gaTrack({\n // event: 'ga4Event',\n // event_name: 'lp_button',\n // member_active_status: isLogin ? 'active' : 'not active', //\u7528\u4E8E\u8F93\u5165code\u6FC0\u6D3B\u4F1A\u5458\u5F39'\u7A97\u7684\u6309\u94AE\uFF0C\u533A\u5206\u4F1A\u5458\u6FC0\u6D3B\u72B6\u6001\uFF0C\u4F20active\u6216not active\n // event_parameters: {\n // page_group: 'Product Detail Page' + variant.sku, //\u5982\u679C\u662F\u9996\u9875\uFF0C\u5219\u4F20\"Home Page\";\u5982\u679C\u662Flisting\u7684\u9996\u5C4F\u6309\u94AE\uFF0C\u4F20Product Detail Page+$SKU\n // position: 'masterbanner1', //\u4F4D\u7F6E\u6807\u8BB0\u3002\u9996\u9875\u9996\u5C4F\u8F6E\u64AD\u4F4D\u7F6E\u4F20masterbanner1\u3001masterbanner2\u3001masterbanner3\uFF0C\u7B2C\u4E8C\u5C4F\u4F202nd_banner\uFF0C\u7B2C\u4E09\u5C4F\u4F203rd_banner\uFF0C\u6216\u8005\u53D6\u8BE5\u6A21\u5757\u5C0F\u6807\u9898\uFF0C\u6216\u80FD\u8BC6\u522B\u51FA\u662F\u54EA\u4E2A\u6A21\u5757\u4F4D\u7F6E\u7684\u6587\u6848\uFF0C\u5F39\u7A97\u4F20pop;\u5982\u679C\u662F\u8D2D\u7269\u8F66\u4FA7\u8FB9\u680F\uFF0C\u5219\u4F20\"Cart Pop Up\"\n // button_name: method.title, //\u53D6\u6309\u94AE\u6587\u6848\uFF0C\u6216\u80FD\u8BC6\u522B\u51FA\u662F\u54EA\u4E2A\u6309\u94AE\u7684\u6587\u6848,\u6BD4\u5982\u53F3\u4E0A\u89D2\u5173\u95ED\u4F20close,\u793E\u5A92\u5206\u4EAB\u56FE\u6807\u4F20\u5BF9\u5E94\u5E73\u53F0\u540D\u5B57\u5982Facebook,\u56FE\u7247\u5207\u6362\u5219\u4F20\u5BF9\u5E94\u5C55\u793A\u56FE\u7247\u7684\u540D\u5B57\n // info: '', //\u9ED8\u8BA4\u7A7A\u503C\uFF0C\u4E00\u822C\u4F20\u590D\u9009\u6846\u7684\u6587\u6848\u5185\u5BB9\uFF0C\u7279\u6B8A\u60C5\u51B5\u53EF\u6307\u5B9Ainfo\u503C\n // },\n // })\n },\n\n [isLogin, list, variant.sku, handleChangeShippingInfo, openSignInPopup]\n )\n\n return (\n <div\n id=\"ipc-product-paid-shipping\"\n className={cn(\n ' mt-16 desktop:mt-[96px] lg-desktop:mt-[128px] px-4 tablet:px-0 tablet:px-8 laptop:px-16 desktop:px-0',\n className\n )}\n >\n <div className=\"flex flex-wrap justify-between space-x-2 md:space-x-1\">\n <Text\n className=\"text-[20px] font-bold leading-[1.4] text-[#1F2021] md:text-[16px]\"\n html={metafields?.title}\n ></Text>\n {/* <button\n onClick={() => {\n setOpenShippingPolicyModal(true)\n }}\n className='text-brand-color text-[16px] font-semibold text-[#595959] underline md:text-[14px]'\n >\n {metafields?.policy}\n </button> */}\n </div>\n <div className=\"mt-[16px] flex flex-wrap gap-[12px] overflow-hidden md:mt-[12px] desktop:flex-nowrap\">\n {list.map((method: ShippingMethodType, index: number) => (\n <ShippingMethod\n key={index}\n index={index}\n item={method}\n active={selectedMethod?.code === method.code}\n toggleShipping={() => toggleShipping(method)}\n currencyCode={variant.price.currencyCode}\n metafields={metafields}\n className=\"w-full laptop:w-[calc(50%-6px)] desktop:flex-1\"\n />\n ))}\n {/* learn more \u5361\u7247 */}\n <LearnMore\n setOpenShippingPolicyModal={setOpenShippingPolicyModal}\n metafields={metafields}\n className=\"w-full laptop:w-[calc(50%-6px)] desktop:w-[calc(33.33%-16px)] lg-desktop:w-[calc(33.33%-24px)]\"\n />\n </div>\n {list.find((method: ShippingMethodType) => method?.error) && (\n <Text\n className=\"mt-[16px] font-bold leading-[1.4] text-[#D41435] md:mt-[12px]\"\n html={list.find((method: ShippingMethodType) => method.error)?.error as string}\n as=\"p\"\n />\n )}\n\n {metafields?.seeAvailableArea && (\n <Text\n as=\"div\"\n className=\"mt-[16px] font-bold leading-[1.4] text-[#1D1D1F] [&_a]:underline\"\n html={metafields?.seeAvailableArea}\n />\n )}\n {metafields?.shippingPolicy && (\n <ShippingPolicyModal\n data={metafields?.shippingPolicy}\n onClose={() => setOpenShippingPolicyModal(false)}\n open={openShippingPolicyModal}\n />\n )}\n </div>\n )\n}\n\nexport default withLayout(PaidShipping)\n"],
5
+ "mappings": "AAmIQ,cAAAA,EAaF,QAAAC,MAbE,oBAnIR,OAAoB,QAAAC,MAAY,kCAEhC,OAAS,eAAAC,EAAa,aAAAC,EAAW,WAAAC,EAAS,YAAAC,MAAgB,QAC1D,OAAS,MAAAC,MAAU,sBAEnB,OAAOC,MAAoB,mBAC3B,OAAS,uBAAAC,MAA2B,wB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AAYH,EACZ,UAAU,kDAPLkB,CAQP,CACD,EAEDjC,EAACW,EAAA,CACC,2BAA4BY,EAC5B,WAAYR,EACZ,UAAU,iGACZ,GACF,EACCmB,EAAK,KAAMF,GAA+BA,GAAQ,KAAK,GACtDhC,EAACE,EAAA,CACC,UAAU,gEACV,KAAMgC,EAAK,KAAMF,GAA+BA,EAAO,KAAK,GAAG,MAC/D,GAAG,IACL,EAGDjB,GAAY,kBACXf,EAACE,EAAA,CACC,GAAG,MACH,UAAU,mEACV,KAAMa,GAAY,iBACpB,EAEDA,GAAY,gBACXf,EAACS,EAAA,CACC,KAAMM,GAAY,eAClB,QAAS,IAAMQ,EAA2B,EAAK,EAC/C,KAAMD,EACR,GAEJ,CAEJ,EAEA,IAAOqB,EAAQ9B,EAAWC,CAAY",
6
+ "names": ["jsx", "jsxs", "Text", "useCallback", "useEffect", "useMemo", "useState", "cn", "ShippingMethod", "ShippingPolicyModal", "isWeightAvailable", "LearnMore", "useBizProductContext", "withLayout", "PaidShipping", "metafields", "productList", "onShippingInfoChange", "variant", "className", "isLogin", "openSignInPopup", "openShippingPolicyModal", "setOpenShippingPolicyModal", "init", "setInit", "selectedMethod", "setSelectedMethod", "weight", "acc", "product", "normalizedMethod", "method", "index", "list", "normalizedList", "prev", "sameTypeMethod", "m", "availableMethod", "handleChangeShippingInfo", "standardShippingMethod", "toggleShipping", "PaidShipping_default"]
7
7
  }
@@ -32,5 +32,8 @@ export type ModalData = {
32
32
  interface BenefitsTabProps {
33
33
  textConfig?: BenefitsTabTextConfig;
34
34
  }
35
- declare const BenefitsTab: ({ textConfig }: BenefitsTabProps) => import("react/jsx-runtime").JSX.Element | null;
36
- export default BenefitsTab;
35
+ declare const _default: React.ForwardRefExoticComponent<Omit<BenefitsTabProps, keyof import("../../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../../shared/Styles.js").StylesProps & import("../../../../../shared/Styles.js").ContainerProps> & {
36
+ className?: string | undefined;
37
+ data?: Record<string, any> | undefined;
38
+ } & React.RefAttributes<any>>;
39
+ export default _default;