@anker-in/headless-ui 0.0.27 → 0.0.28-alpha.1

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 (73) hide show
  1. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  2. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  3. package/dist/cjs/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
  4. package/dist/cjs/biz-components/SectionHeading/SectionHeading.js +2 -0
  5. package/dist/cjs/biz-components/SectionHeading/SectionHeading.js.map +7 -0
  6. package/dist/cjs/biz-components/SectionHeading/index.d.ts +0 -0
  7. package/dist/cjs/biz-components/SectionHeading/index.js +2 -0
  8. package/dist/cjs/biz-components/SectionHeading/index.js.map +7 -0
  9. package/dist/cjs/biz-components/SectionHeading/types.d.ts +6 -0
  10. package/dist/cjs/biz-components/SectionHeading/types.js +2 -0
  11. package/dist/cjs/biz-components/SectionHeading/types.js.map +7 -0
  12. package/dist/cjs/biz-components/Shelf/Shelf.d.ts +6 -0
  13. package/dist/cjs/biz-components/Shelf/Shelf.js +2 -0
  14. package/dist/cjs/biz-components/Shelf/Shelf.js.map +7 -0
  15. package/dist/cjs/biz-components/Shelf/index.d.ts +1 -0
  16. package/dist/cjs/biz-components/Shelf/index.js +2 -0
  17. package/dist/cjs/biz-components/Shelf/index.js.map +7 -0
  18. package/dist/cjs/biz-components/Shelf/types.d.ts +6 -0
  19. package/dist/cjs/biz-components/Shelf/types.js +2 -0
  20. package/dist/cjs/biz-components/Shelf/types.js.map +7 -0
  21. package/dist/cjs/components/picture.js +1 -1
  22. package/dist/cjs/components/picture.js.map +3 -3
  23. package/dist/cjs/helpers/GloablContext.d.ts +10 -0
  24. package/dist/cjs/helpers/GloablContext.js +2 -0
  25. package/dist/cjs/helpers/GloablContext.js.map +7 -0
  26. package/dist/cjs/hooks/useMergeRefs.d.ts +4 -0
  27. package/dist/cjs/shared/trackRef.d.ts +0 -0
  28. package/dist/cjs/stories/shelf.stories.d.ts +16 -0
  29. package/dist/cjs/stories/shelf.stories.js +2 -0
  30. package/dist/cjs/stories/shelf.stories.js.map +7 -0
  31. package/dist/cjs/tsconfig.tsbuildinfo +1 -0
  32. package/dist/cjs/types/libs.d.js +2 -0
  33. package/dist/cjs/types/libs.d.js.map +7 -0
  34. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  35. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  36. package/dist/esm/biz-components/SectionHeading/SectionHeading.d.ts +4 -0
  37. package/dist/esm/biz-components/SectionHeading/SectionHeading.js +2 -0
  38. package/dist/esm/biz-components/SectionHeading/SectionHeading.js.map +7 -0
  39. package/dist/esm/biz-components/SectionHeading/index.d.ts +0 -0
  40. package/dist/esm/biz-components/SectionHeading/index.js +2 -0
  41. package/dist/esm/biz-components/SectionHeading/index.js.map +7 -0
  42. package/dist/esm/biz-components/SectionHeading/types.d.ts +6 -0
  43. package/dist/esm/biz-components/SectionHeading/types.js +2 -0
  44. package/dist/esm/biz-components/SectionHeading/types.js.map +7 -0
  45. package/dist/esm/biz-components/Shelf/Shelf.d.ts +6 -0
  46. package/dist/esm/biz-components/Shelf/Shelf.js +2 -0
  47. package/dist/esm/biz-components/Shelf/Shelf.js.map +7 -0
  48. package/dist/esm/biz-components/Shelf/index.d.ts +1 -0
  49. package/dist/esm/biz-components/Shelf/index.js +2 -0
  50. package/dist/esm/biz-components/Shelf/index.js.map +7 -0
  51. package/dist/esm/biz-components/Shelf/types.d.ts +6 -0
  52. package/dist/esm/biz-components/Shelf/types.js +1 -0
  53. package/dist/esm/biz-components/Shelf/types.js.map +7 -0
  54. package/dist/esm/components/picture.js +1 -1
  55. package/dist/esm/components/picture.js.map +3 -3
  56. package/dist/esm/helpers/GloablContext.d.ts +10 -0
  57. package/dist/esm/helpers/GloablContext.js +2 -0
  58. package/dist/esm/helpers/GloablContext.js.map +7 -0
  59. package/dist/esm/hooks/useMergeRefs.d.ts +4 -0
  60. package/dist/esm/shared/trackRef.d.ts +0 -0
  61. package/dist/esm/stories/shelf.stories.d.ts +16 -0
  62. package/dist/esm/stories/shelf.stories.js +2 -0
  63. package/dist/esm/stories/shelf.stories.js.map +7 -0
  64. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  65. package/dist/esm/types/libs.d.js +2 -0
  66. package/dist/esm/types/libs.d.js.map +7 -0
  67. package/package.json +1 -1
  68. /package/dist/cjs/hooks/{useExposure.d.ts → useEXposure.d.ts} +0 -0
  69. /package/dist/cjs/hooks/{useExposure.js → useEXposure.js} +0 -0
  70. /package/dist/cjs/hooks/{useExposure.js.map → useEXposure.js.map} +0 -0
  71. /package/dist/esm/hooks/{useExposure.d.ts → useEXposure.d.ts} +0 -0
  72. /package/dist/esm/hooks/{useExposure.js → useEXposure.js} +0 -0
  73. /package/dist/esm/hooks/{useExposure.js.map → useEXposure.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var L=Object.create;var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(t,a)=>{for(var r in a)f(t,r,{get:a[r],enumerable:!0})},B=(t,a,r,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of U(a))!_.call(t,p)&&p!==r&&f(t,p,{get:()=>a[p],enumerable:!(c=M(a,p))||c.enumerable});return t};var z=(t,a,r)=>(r=t!=null?L(S(t)):{},B(a||!t||!t.__esModule?f(r,"default",{value:t,enumerable:!0}):r,t)),A=t=>B(f({},"__esModule",{value:!0}),t);var C={};j(C,{default:()=>F});module.exports=A(C);var e=require("react/jsx-runtime"),s=z(require("react")),T=require("@gsap/react"),x=z(require("gsap")),m=require("gsap/dist/ScrollTrigger"),o=require("../../components/index.js"),i=require("../../helpers/index.js"),R=require("../../shared/Styles.js"),E=require("../../hooks/useExposure.js"),N=require("../../shared/trackUrlRef.js");const k="image",H="hero_banner",P=s.default.forwardRef(({data:t,className:a},r)=>{const{title:c,subtitle:p,pcImage:$,mobileImage:D,primaryButton:d,secondaryButton:b,theme:I="light",caption:h=[]}=t,u=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,E.useExposure)(n,{componentType:k,componentName:H,componentTitle:c,componentDescription:p}),(0,s.useImperativeHandle)(r,()=>n.current),(0,T.useGSAP)(()=>{if(x.default.registerPlugin(m.ScrollTrigger),!u.current)return;const v=n.current?.clientHeight||100;return window.innerHeight<=v?m.ScrollTrigger.create({trigger:n.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:l=>{const g=l.progress*40-20;x.default.set(u.current,{yPercent:g})}}):(m.ScrollTrigger.create({trigger:n.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:l=>{const g=l.progress*20-20;x.default.set(u.current,{yPercent:g})}}),m.ScrollTrigger.create({trigger:n.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:l=>{const g=l.progress*20;x.default.set(u.current,{yPercent:g})}})),()=>{m.ScrollTrigger.getAll().forEach(l=>l.kill())}},[]),(0,e.jsxs)("div",{ref:n,"data-ui-component-id":"HeroBanner",className:(0,i.cn)(I==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden",a),children:[(0,e.jsx)("div",{ref:u,className:(0,i.cn)("absolute left-0 top-0 size-full"),children:(0,e.jsx)(o.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",source:`${$?.url||""} , ${D?.url||""} 767`})}),(0,e.jsxs)("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] absolute top-24 z-10 flex flex-col gap-[24px] px-[16px]",children:[(0,e.jsxs)("div",{className:"laptop:text-left max-w-[686px]",children:[c&&(0,e.jsx)(o.Heading,{as:"h1",size:5,className:(0,i.cn)("hero-banner-title"),html:c}),p&&(0,e.jsx)(o.Text,{as:"p",size:3,className:(0,i.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:p})]}),(0,e.jsxs)("div",{className:"laptop:justify-start laptop:gap-3 flex items-center gap-2",children:[b&&b.text&&(0,e.jsx)("a",{href:(0,N.trackUrlRef)(b.link,`${k}_${H}`),children:(0,e.jsx)(o.Button,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:b.text})}),d&&d.text&&(0,e.jsx)("a",{href:(0,N.trackUrlRef)(d.link,`${k}_${H}`),children:(0,e.jsx)(o.Button,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:d.text})})]})]}),h.length>0&&(0,e.jsx)("div",{className:"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:h.map((v,y)=>(0,e.jsxs)(s.default.Fragment,{children:[(0,e.jsx)(o.Text,{size:3,className:(0,i.cn)("hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]"),html:v.title}),y<h.length-1&&(0,e.jsx)("div",{className:(0,i.cn)("bg-info-primary w-px")})]},y))})]})});P.displayName="HeroBanner";var F=(0,R.withStyles)(P);
1
+ "use strict";"use client";var L=Object.create;var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(t,r)=>{for(var a in r)f(t,a,{get:r[a],enumerable:!0})},B=(t,r,a,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let p of U(r))!_.call(t,p)&&p!==a&&f(t,p,{get:()=>r[p],enumerable:!(c=M(r,p))||c.enumerable});return t};var P=(t,r,a)=>(a=t!=null?L(S(t)):{},B(r||!t||!t.__esModule?f(a,"default",{value:t,enumerable:!0}):a,t)),A=t=>B(f({},"__esModule",{value:!0}),t);var C={};j(C,{default:()=>F});module.exports=A(C);var e=require("react/jsx-runtime"),s=P(require("react")),T=require("@gsap/react"),x=P(require("gsap")),m=require("gsap/dist/ScrollTrigger"),o=require("../../components/index.js"),i=require("../../helpers/index.js"),R=require("../../shared/Styles.js"),E=require("../../hooks/useExposure.js"),N=require("../../shared/trackUrlRef.js");const k="image",H="hero_banner",z=s.default.forwardRef(({data:t,className:r},a)=>{const{title:c,subtitle:p,pcImage:$,mobileImage:D,primaryButton:d,secondaryButton:b,theme:I="light",caption:h=[]}=t,g=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,E.useExposure)(n,{componentType:k,componentName:H,componentTitle:c,componentDescription:p}),(0,s.useImperativeHandle)(a,()=>n.current),(0,T.useGSAP)(()=>{if(x.default.registerPlugin(m.ScrollTrigger),!g.current)return;const v=n.current?.clientHeight||100;return window.innerHeight<=v?m.ScrollTrigger.create({trigger:n.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:l=>{const u=l.progress*40-20;x.default.set(g.current,{yPercent:u})}}):(m.ScrollTrigger.create({trigger:n.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:l=>{const u=l.progress*20-20;x.default.set(g.current,{yPercent:u})}}),m.ScrollTrigger.create({trigger:n.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:l=>{const u=l.progress*20;x.default.set(g.current,{yPercent:u})}})),()=>{m.ScrollTrigger.getAll().forEach(l=>l.kill())}},[]),(0,e.jsxs)("div",{ref:n,"data-ui-component-id":"HeroBanner",className:(0,i.cn)(I==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden",r),children:[(0,e.jsx)("div",{ref:g,className:(0,i.cn)("absolute left-0 top-0 size-full"),children:(0,e.jsx)(o.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",source:`${$?.url||""} , ${D?.url||""} 767`})}),(0,e.jsxs)("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] absolute top-24 z-10 flex flex-col gap-[24px] px-[16px]",children:[(0,e.jsxs)("div",{className:"laptop:text-left max-w-[686px]",children:[c&&(0,e.jsx)(o.Heading,{as:"h1",size:5,className:(0,i.cn)("hero-banner-title"),html:c}),p&&(0,e.jsx)(o.Text,{as:"p",size:3,className:(0,i.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:p})]}),(0,e.jsxs)("div",{className:"laptop:justify-start laptop:gap-3 flex items-center gap-2",children:[b&&b.text&&(0,e.jsx)("a",{href:(0,N.trackUrlRef)(b.link,`${k}_${H}`),children:(0,e.jsx)(o.Button,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:b.text})}),d&&d.text&&(0,e.jsx)("a",{href:(0,N.trackUrlRef)(d.link,`${k}_${H}`),children:(0,e.jsx)(o.Button,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:d.text})})]})]}),h.length>0&&(0,e.jsx)("div",{className:"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:h.map((v,y)=>(0,e.jsxs)(s.default.Fragment,{children:[(0,e.jsx)(o.Text,{size:3,className:(0,i.cn)("hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]"),html:v.title}),y<h.length-1&&(0,e.jsx)("div",{className:(0,i.cn)("bg-info-primary w-px")})]},y))})]})});z.displayName="HeroBanner";var F=(0,R.withStyles)(z);
2
2
  //# sourceMappingURL=HeroBanner.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, pcImage, mobileImage, primaryButton, secondaryButton, theme = 'light', caption = [] } = data\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useGSAP(() => {\n gsap.registerPlugin(ScrollTrigger)\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n return () => {\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={boxRef}\n data-ui-component-id=\"HeroBanner\"\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n source={`${pcImage?.url || ''} , ${mobileImage?.url || ''} 767`}\n />\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] absolute top-24 z-10 flex flex-col gap-[24px] px-[16px]\">\n <div className=\"laptop:text-left max-w-[686px]\">\n {title && <Heading as=\"h1\" size={5} className={cn('hero-banner-title')} html={title} />}\n {subtitle && (\n <Text\n as=\"p\"\n size={3}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]'\n )}\n html={subtitle}\n />\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"laptop:justify-start laptop:gap-3 flex items-center gap-2\">\n {secondaryButton && secondaryButton.text && (\n <a href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}>\n <Button size=\"lg\" variant=\"secondary\" className=\"hero-banner-secondary-button\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}>\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div className=\"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c, index) => (\n <React.Fragment key={index}>\n <Text\n size={3}\n className={cn(\n 'hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyFQ,IAAAI,EAAA,6BAxFRC,EAAmD,oBACnDA,EAAwB,uBACxBC,EAAiB,mBACjBC,EAA8B,mCAE9BC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5B,MAAMC,EAAgB,QAChBC,EAAgB,cAEhBC,EAAa,EAAAC,QAAM,WAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,YAAAC,EAAa,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,QAAAC,EAAU,CAAC,CAAE,EAAIV,EAE3GW,KAAQ,UAAyB,IAAI,EACrCC,KAAS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,EAAE,MAAMC,GAAa,KAAO,EAAE,OAC3D,EACF,KAGA,QAAC,OAAI,UAAU,yLACb,qBAAC,OAAI,UAAU,iCACZ,UAAAH,MAAS,OAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,aAAW,MAAG,mBAAmB,EAAG,KAAMA,EAAO,EACpFC,MACC,OAAC,QACC,GAAG,IACH,KAAM,EACN,aAAW,MACT,oHACF,EACA,KAAMA,EACR,GAEJ,KAEA,QAAC,OAAI,UAAU,4DACZ,UAAAI,GAAmBA,EAAgB,SAClC,OAAC,KAAE,QAAM,eAAYA,EAAgB,KAAM,GAAGZ,CAAa,IAAIC,CAAa,EAAE,EAC5E,mBAAC,UAAO,KAAK,KAAK,QAAQ,YAAY,UAAU,+BAC7C,SAAAW,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,SAC9B,OAAC,KAAE,QAAM,eAAYA,EAAc,KAAM,GAAGX,CAAa,IAAIC,CAAa,EAAE,EAC1E,mBAAC,UAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAC3C,SAAAU,EAAc,KACjB,EACF,GAEJ,GACF,EAGCG,EAAQ,OAAS,MAChB,OAAC,OAAI,UAAU,uKACZ,SAAAA,EAAQ,IAAI,CAACQ,EAAGC,OACf,QAAC,EAAApB,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,8KACF,EACA,KAAMmB,EAAE,MACV,EACCC,EAAQT,EAAQ,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IARxDS,CASrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDrB,EAAW,YAAc,aAEzB,IAAOb,KAAQ,cAAWa,CAAU",
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, pcImage, mobileImage, primaryButton, secondaryButton, theme = 'light', caption = [] } = data\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useGSAP(() => {\n gsap.registerPlugin(ScrollTrigger)\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n return () => {\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={boxRef}\n data-ui-component-id=\"HeroBanner\"\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n source={`${pcImage?.url || ''} , ${mobileImage?.url || ''} 767`}\n />\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] absolute top-24 z-10 flex flex-col gap-[24px] px-[16px]\">\n <div className=\"laptop:text-left max-w-[686px]\">\n {title && <Heading as=\"h1\" size={5} className={cn('hero-banner-title')} html={title} />}\n {subtitle && (\n <Text\n as=\"p\"\n size={3}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]'\n )}\n html={subtitle}\n />\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"laptop:justify-start laptop:gap-3 flex items-center gap-2\">\n {secondaryButton && secondaryButton.text && (\n <a href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}>\n <Button size=\"lg\" variant=\"secondary\" className=\"hero-banner-secondary-button\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}>\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div className=\"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c, index) => (\n <React.Fragment key={index}>\n <Text\n size={3}\n className={cn(\n 'hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyFQ,IAAAI,EAAA,6BAxFRC,EAAmD,oBACnDA,EAAwB,uBACxBC,EAAiB,mBACjBC,EAA8B,mCAE9BC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5B,MAAMC,EAAgB,QAChBC,EAAgB,cAEhBC,EAAa,EAAAC,QAAM,WAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,YAAAC,EAAa,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,QAAAC,EAAU,CAAC,CAAE,EAAIV,EAE3GW,KAAQ,UAAyB,IAAI,EACrCC,KAAS,UAAuB,IAAI,EAG1C,wBAAYA,EAAQ,CAClB,cAAAhB,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMU,EAAO,OAAyB,KAE/D,WAAQ,IAAM,CAEZ,GADA,EAAAC,QAAK,eAAe,eAAa,EAC7B,CAACF,EAAM,QAAS,OACpB,MAAMG,EAAeF,EAAO,SAAS,cAAgB,IAGrD,OAFqB,OAAO,aAERE,EAClB,gBAAc,OAAO,CACnB,QAASF,EAAO,QAChB,MAAO,aAC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EAAgB,SAClC,OAAC,KAAE,QAAM,eAAYA,EAAgB,KAAM,GAAGZ,CAAa,IAAIC,CAAa,EAAE,EAC5E,mBAAC,UAAO,KAAK,KAAK,QAAQ,YAAY,UAAU,+BAC7C,SAAAW,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,SAC9B,OAAC,KAAE,QAAM,eAAYA,EAAc,KAAM,GAAGX,CAAa,IAAIC,CAAa,EAAE,EAC1E,mBAAC,UAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAC3C,SAAAU,EAAc,KACjB,EACF,GAEJ,GACF,EAGCG,EAAQ,OAAS,MAChB,OAAC,OAAI,UAAU,uKACZ,SAAAA,EAAQ,IAAI,CAACQ,EAAGC,OACf,QAAC,EAAApB,QAAM,SAAN,CACC,oBAAC,QACC,KAAM,EACN,aAAW,MACT,8KACF,EACA,KAAMmB,EAAE,MACV,EACCC,EAAQT,EAAQ,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IARxDS,CASrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDrB,EAAW,YAAc,aAEzB,IAAOb,KAAQ,cAAWa,CAAU",
6
6
  "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_components", "import_helpers", "import_Styles", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "HeroBanner", "React", "data", "className", "ref", "title", "subtitle", "pcImage", "mobileImage", "primaryButton", "secondaryButton", "theme", "caption", "bgRef", "boxRef", "gsap", "clientHeight", "self", "value", "t", "c", "index"]
7
7
  }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { SectionHeadingProps } from './types.js';
3
+ declare const SectionHeading: React.ForwardRefExoticComponent<SectionHeadingProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default SectionHeading;
@@ -0,0 +1,2 @@
1
+ "use strict";var f=Object.create;var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var o in t)n(e,o,{get:t[o],enumerable:!0})},a=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of l(t))!H.call(e,r)&&r!==o&&n(e,r,{get:()=>t[r],enumerable:!(i=d(t,r))||i.enumerable});return e};var h=(e,t,o)=>(o=e!=null?f(g(e)):{},a(t||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>a(n({},"__esModule",{value:!0}),e);var R={};S(R,{default:()=>P});module.exports=y(R);var p=require("react/jsx-runtime"),m=h(require("react")),s=require("../../helpers/utils.js"),c=require("../../components/index.js");const N=m.default.forwardRef((e,t)=>{const{title:o,className:i,...r}=e;return(0,p.jsx)(c.Heading,{ref:t,className:(0,s.cn)("section-heading",i),html:o,...r})});var P=N;
2
+ //# sourceMappingURL=SectionHeading.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/SectionHeading/SectionHeading.tsx"],
4
+ "sourcesContent": ["import React from 'react'\nimport type { SectionHeadingProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\n\nconst SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>((props, ref) => {\n const { title, className, ...rest } = props\n\n return <Heading ref={ref} className={cn('section-heading', className)} html={title} {...rest} />\n})\n\nexport default SectionHeading\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAQS,IAAAI,EAAA,6BARTC,EAAkB,oBAElBC,EAAmB,kCACnBC,EAAwB,qCAExB,MAAMC,EAAiB,EAAAC,QAAM,WAAgD,CAACC,EAAOC,IAAQ,CAC3F,KAAM,CAAE,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAK,EAAIJ,EAEtC,SAAO,OAAC,WAAQ,IAAKC,EAAK,aAAW,MAAG,kBAAmBE,CAAS,EAAG,KAAMD,EAAQ,GAAGE,EAAM,CAChG,CAAC,EAED,IAAOZ,EAAQM",
6
+ "names": ["SectionHeading_exports", "__export", "SectionHeading_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "SectionHeading", "React", "props", "ref", "title", "className", "rest"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface SectionHeadingProps {
3
+ title: string;
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(t,e,c,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of o(e))!s.call(t,i)&&i!==c&&a(t,i,{get:()=>e[i],enumerable:!(r=n(e,i))||r.enumerable});return t};var g=t=>d(a({},"__esModule",{value:!0}),t);var l={};module.exports=g(l);var p=require("react");
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/SectionHeading/types.ts"],
4
+ "sourcesContent": ["import React from 'react'\nexport interface SectionHeadingProps {\n title: string\n className?: string\n children: React.ReactNode\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAA,IAAAE,EAAkB",
6
+ "names": ["types_exports", "__toCommonJS", "import_react"]
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { ShelfProps } from './types.js';
2
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<ShelfProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
3
+ className?: string;
4
+ data?: Record<string, any>;
5
+ } & import("react").RefAttributes<any>>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use strict";var h=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var r=(e,t)=>{for(var i in t)h(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!v.call(e,o)&&o!==i&&h(e,o,{get:()=>t[o],enumerable:!(s=f(t,o))||s.enumerable});return e};var a=e=>S(h({},"__esModule",{value:!0}),e);var y={};r(y,{default:()=>p});module.exports=a(y);var l=require("react/jsx-runtime"),d=require("../../shared/Styles.js");const n=e=>(console.log("~ Shelf props",e),(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold",children:e.title}),(0,l.jsx)("h2",{children:e.subtitle}),(0,l.jsx)("div",{children:e.products.map(t=>(0,l.jsx)("div",{children:t.name},t.sku))})]}));var p=(0,d.withStyles)(n);
2
+ //# sourceMappingURL=Shelf.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Shelf/Shelf.tsx"],
4
+ "sourcesContent": ["/**\n * \u8FD9\u662F\u4E00\u4E2Ademo \u6A21\u7248\n */\nimport { withStyles } from '../../shared/Styles.js'\nimport type { ShelfProps } from './types.js'\n\nconst Shelf = (props: ShelfProps) => {\n console.log('~ Shelf props', props)\n return (\n <div>\n <h1 className=\"text-2xl font-bold\">{props.title}</h1>\n <h2>{props.subtitle}</h2>\n <div>\n {props.products.map(product => (\n <div key={product.sku}>{product.name}</div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default withStyles(Shelf)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GASI,IAAAI,EAAA,6BANJC,EAA2B,kCAG3B,MAAMC,EAASC,IACb,QAAQ,IAAI,gBAAiBA,CAAK,KAEhC,QAAC,OACC,oBAAC,MAAG,UAAU,qBAAsB,SAAAA,EAAM,MAAM,KAChD,OAAC,MAAI,SAAAA,EAAM,SAAS,KACpB,OAAC,OACE,SAAAA,EAAM,SAAS,IAAIC,MAClB,OAAC,OAAuB,SAAAA,EAAQ,MAAtBA,EAAQ,GAAmB,CACtC,EACH,GACF,GAIJ,IAAON,KAAQ,cAAWI,CAAK",
6
+ "names": ["Shelf_exports", "__export", "Shelf_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "Shelf", "props", "product"]
7
+ }
@@ -0,0 +1 @@
1
+ export { default } from './Shelf.js';
@@ -0,0 +1,2 @@
1
+ "use strict";var m=Object.create;var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(e,f)=>{for(var o in f)t(e,o,{get:f[o],enumerable:!0})},d=(e,f,o,a)=>{if(f&&typeof f=="object"||typeof f=="function")for(let r of u(f))!b.call(e,r)&&r!==o&&t(e,r,{get:()=>f[r],enumerable:!(a=p(f,r))||a.enumerable});return e};var g=(e,f,o)=>(o=e!=null?m(x(e)):{},d(f||!e||!e.__esModule?t(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>d(t({},"__esModule",{value:!0}),e);var i={};c(i,{default:()=>l.default});module.exports=h(i);var l=g(require("./Shelf.js"));
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Shelf/index.ts"],
4
+ "sourcesContent": ["export { default } from './Shelf.js'\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wCAAAE,EAAAF,GAAA,IAAAG,EAAwB",
6
+ "names": ["Shelf_exports", "__export", "__toCommonJS", "import_Shelf"]
7
+ }
@@ -0,0 +1,6 @@
1
+ export type ShelfProps = {
2
+ id: string;
3
+ title: string;
4
+ subtitle: string;
5
+ products: any[];
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var o=(i,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!l.call(i,r)&&r!==n&&e(i,r,{get:()=>t[r],enumerable:!(s=p(t,r))||s.enumerable});return i};var d=i=>o(e({},"__esModule",{value:!0}),i);var u={};module.exports=d(u);
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Shelf/types.ts"],
4
+ "sourcesContent": ["export type ShelfProps = {\n id: string\n title: string\n subtitle: string\n products: any[]\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["types_exports", "__toCommonJS"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var I=Object.create;var f=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},M=(e,t,r,m)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of x(t))!$.call(e,o)&&o!==r&&f(e,o,{get:()=>t[o],enumerable:!(m=_(t,o))||m.enumerable});return e};var L=(e,t,r)=>(r=e!=null?I(S(e)):{},M(t||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),k=e=>M(f({},"__esModule",{value:!0}),e);var X={};A(X,{default:()=>T});module.exports=k(X);var g=require("react/jsx-runtime"),a=L(require("react"));const y=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],F=3960,N=3980,D=e=>y.some(t=>e==t),H=(e="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(e),R=a.default.forwardRef(({imgClassName:e="",source:t="",quality:r=2,deviceSizes:m=[375,767,1023,1279,1439,1539,1919],className:o,...d},P)=>{const u=(0,a.useCallback)(({src:n,width:c})=>{const i=c;try{const s=new URL(n);if(!D(s.hostname))return n;const p=s.pathname.split("/").pop()||"";if(H(p)&&!/_[0-9]{2,4}x/.test(n)){const[w,l]=p.split(".");return`${s.origin}${s.pathname.replace(p,`${w}_${i<F?i:N}x.${l}`)}`}}catch{return n}},[]),h=(0,a.useCallback)(({srcArr:n,width:c})=>{const i=c*r,s=u({src:n[0][0],width:i});let p;return n.forEach(l=>{var E=l[0];l.length>1&&parseInt(l[1],10)>=c&&(p=u({src:E,width:i}))}),(0,g.jsx)("source",{srcSet:p||s,media:`(max-width: ${c}px)`},c)},[u,r]),b=(0,a.useMemo)(()=>{if(typeof t!="string"||!t)return[];let n;try{n=t.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(s=>s.split(" ").filter(Boolean))}catch(s){return console.log(s),[]}const c=m.map(s=>h({srcArr:n,width:s})),i=u({src:n[0][0],width:1920*r});return c.push((0,g.jsx)("img",{src:i,className:`w-full ${e}`,...d},"default")),c},[m,e,u,r,d,t,h]);return(0,g.jsxs)("picture",{ref:P,className:`block overflow-hidden ${o}`,children:[b,d.children]})});var T=R;
1
+ "use strict";"use client";var _=Object.create;var f=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},M=(e,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!A.call(e,o)&&o!==r&&f(e,o,{get:()=>t[o],enumerable:!(l=x(t,o))||l.enumerable});return e};var y=(e,t,r)=>(r=e!=null?_($(e)):{},M(t||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),k=e=>M(f({},"__esModule",{value:!0}),e);var v={};L(v,{default:()=>X});module.exports=k(v);var g=require("react/jsx-runtime"),a=y(require("react"));const F=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],N=3960,D=3980,H=e=>F.some(t=>e==t),R=(e="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(e),T=a.default.forwardRef(({imgClassName:e="",source:t="",quality:r=2,deviceSizes:l=[375,767,1023,1279,1439,1539,1919],className:o,loading:P="lazy",...d},b)=>{const m=(0,a.useCallback)(({src:n,width:c})=>{const i=c;try{const s=new URL(n);if(!H(s.hostname))return n;const p=s.pathname.split("/").pop()||"";if(R(p)&&!/_[0-9]{2,4}x/.test(n)){const[w,u]=p.split(".");return`${s.origin}${s.pathname.replace(p,`${w}_${i<N?i:D}x.${u}`)}`}}catch{return n}},[]),h=(0,a.useCallback)(({srcArr:n,width:c})=>{const i=c*r,s=m({src:n[0][0],width:i});let p;return n.forEach(u=>{var I=u[0];u.length>1&&parseInt(u[1],10)>=c&&(p=m({src:I,width:i}))}),(0,g.jsx)("source",{srcSet:p||s,media:`(max-width: ${c}px)`},c)},[m,r]),E=(0,a.useMemo)(()=>{if(typeof t!="string"||!t)return[];let n;try{n=t.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(s=>s.split(" ").filter(Boolean))}catch(s){return console.log(s),[]}const c=l.map(s=>h({srcArr:n,width:s})),i=m({src:n[0][0],width:1920*r});return c.push((0,g.jsx)("img",{src:i,className:`w-full ${e}`,loading:P,...d},"default")),c},[l,e,m,r,t,h]);return(0,g.jsxs)("picture",{ref:b,className:`block overflow-hidden ${o}`,children:[E,d.children]})});var X=T;
2
2
  //# sourceMappingURL=picture.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/picture.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 767, 1023, 1279, 1439, 1539, 1919],\n className,\n ...rest\n }: PictureProps,\n ref\n ) => {\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n try {\n const parsedUrl = new URL(src)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return src\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName) && !/_[0-9]{2,4}x/.test(src)) {\n const [name, extension] = fileName.split('.')\n return `${parsedUrl.origin}${parsedUrl.pathname.replace(\n fileName,\n `${name}_${size < MAX_SIZE ? size : FIXED_MAX_SIZE}x.${extension}`\n )}`\n }\n } catch (error) {\n return src\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const def = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n let result\n srcArr.forEach(ele => {\n var img = ele[0]\n if (ele.length > 1 && parseInt(ele[1], 10) >= width) {\n result = imgSrcSetsize({ src: img, width: computedWidth })\n }\n })\n const srcset = result || def\n return <source key={width} srcSet={srcset} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n let srcArr\n try {\n srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n } catch (error) {\n console.log(error)\n return []\n }\n const sourceList = deviceSizes.map(width => {\n return sourceSrcSet({ srcArr, width })\n })\n\n const img = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n sourceList.push(<img key=\"default\" src={img} className={`w-full ${imgClassName}`} {...rest} />)\n return sourceList\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, rest, source, sourceSrcSet])\n\n return (\n <picture ref={ref} className={`block overflow-hidden ${className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n }\n)\nexport default Picture\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoEe,IAAAI,EAAA,6BAnEfC,EAA4C,oBAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAiBC,GACdJ,EAAgC,KAAKK,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAEzGC,EAAU,EAAAC,QAAM,WACpB,CACE,CACE,aAAAC,EAAe,GACf,OAAAC,EAAS,GACT,QAAAC,EAAU,EACV,YAAAC,EAAc,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,EACrD,UAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,KAAgB,eAAY,CAAC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AM,GAAG,EACT,IAAIqB,GAAQA,EAAK,MAAM,GAAG,EAAE,OAAO,OAAO,CAAC,CAChD,OAASC,EAAO,CACd,eAAQ,IAAIA,CAAK,EACV,CAAC,CACV,CACA,MAAMF,EAAalB,EAAY,IAAIM,GAC1BK,EAAa,CAAE,OAAAC,EAAQ,MAAAN,CAAM,CAAC,CACtC,EAEKW,EAAMb,EAAc,CAAE,IAAKQ,EAAO,CAAC,EAAE,CAAC,EAAG,MAAO,KAAOb,CAAQ,CAAC,EAEtE,OAAAmB,EAAW,QAAK,OAAC,OAAkB,IAAKD,EAAK,UAAW,UAAUpB,CAAY,GAAK,GAAGK,GAA7D,SAAmE,CAAE,EACvFgB,CACT,EAAG,CAAClB,EAAaH,EAAcO,EAAeL,EAASG,EAAMJ,EAAQa,CAAY,CAAC,EAElF,SACE,QAAC,WAAQ,IAAKR,EAAK,UAAW,yBAAyBF,CAAS,GAC7D,UAAAiB,EACAhB,EAAK,UACR,CAEJ,CACF,EACA,IAAOnB,EAAQY",
6
- "names": ["picture_exports", "__export", "picture_default", "__toCommonJS", "import_jsx_runtime", "import_react", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "Picture", "React", "imgClassName", "source", "quality", "deviceSizes", "className", "rest", "ref", "imgSrcSetsize", "src", "width", "size", "parsedUrl", "name", "extension", "sourceSrcSet", "srcArr", "computedWidth", "def", "result", "ele", "img", "sourceList", "item", "error"]
4
+ "sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 767, 1023, 1279, 1439, 1539, 1919],\n className,\n loading = 'lazy',\n ...rest\n }: PictureProps,\n ref\n ) => {\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n try {\n const parsedUrl = new URL(src)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return src\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName) && !/_[0-9]{2,4}x/.test(src)) {\n const [name, extension] = fileName.split('.')\n return `${parsedUrl.origin}${parsedUrl.pathname.replace(\n fileName,\n `${name}_${size < MAX_SIZE ? size : FIXED_MAX_SIZE}x.${extension}`\n )}`\n }\n } catch (error) {\n return src\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const def = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n let result\n srcArr.forEach(ele => {\n var img = ele[0]\n if (ele.length > 1 && parseInt(ele[1], 10) >= width) {\n result = imgSrcSetsize({ src: img, width: computedWidth })\n }\n })\n const srcset = result || def\n return <source key={width} srcSet={srcset} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n let srcArr\n try {\n srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n } catch (error) {\n console.log(error)\n return []\n }\n const sourceList = deviceSizes.map(width => {\n return sourceSrcSet({ srcArr, width })\n })\n\n const img = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n sourceList.push(<img key=\"default\" src={img} className={`w-full ${imgClassName}`} loading={loading} {...rest} />)\n return sourceList\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, source, sourceSrcSet])\n\n return (\n <picture ref={ref} className={`block overflow-hidden ${className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n }\n)\nexport default Picture\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqEe,IAAAI,EAAA,6BApEfC,EAA4C,oBAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAiBC,GACdJ,EAAgC,KAAKK,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAEzGC,EAAU,EAAAC,QAAM,WACpB,CACE,CACE,aAAAC,EAAe,GACf,OAAAC,EAAS,GACT,QAAAC,EAAU,EACV,YAAAC,EAAc,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,EACrD,UAAAC,EACA,QAAAC,EAAU,OACV,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,KAAgB,eAAY,CAAC,CAAE,IAAAC,EAAK,MAAAC,CAAM,IAAsC,CACpF,MAAMC,EAAOD,EACb,GAAI,CACF,MAAME,EAAY,IAAI,I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,CACd,eAAQ,IAAIA,CAAK,EACV,CAAC,CACV,CACA,MAAMF,EAAanB,EAAY,IAAIO,GAC1BK,EAAa,CAAE,OAAAC,EAAQ,MAAAN,CAAM,CAAC,CACtC,EAEKW,EAAMb,EAAc,CAAE,IAAKQ,EAAO,CAAC,EAAE,CAAC,EAAG,MAAO,KAAOd,CAAQ,CAAC,EAEtE,OAAAoB,EAAW,QAAK,OAAC,OAAkB,IAAKD,EAAK,UAAW,UAAUrB,CAAY,GAAI,QAASK,EAAU,GAAGC,GAA/E,SAAqF,CAAE,EACzGgB,CACT,EAAG,CAACnB,EAAaH,EAAcQ,EAAeN,EAASD,EAAQc,CAAY,CAAC,EAE5E,SACE,QAAC,WAAQ,IAAKR,EAAK,UAAW,yBAAyBH,CAAS,GAC7D,UAAAkB,EACAhB,EAAK,UACR,CAEJ,CACF,EACA,IAAOpB,EAAQY",
6
+ "names": ["picture_exports", "__export", "picture_default", "__toCommonJS", "import_jsx_runtime", "import_react", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "Picture", "React", "imgClassName", "source", "quality", "deviceSizes", "className", "loading", "rest", "ref", "imgSrcSetsize", "src", "width", "size", "parsedUrl", "name", "extension", "sourceSrcSet", "srcArr", "computedWidth", "def", "result", "ele", "img", "sourceList", "item", "error"]
7
7
  }
@@ -0,0 +1,10 @@
1
+ export declare const GlobalContext: import("react").Context<{
2
+ gsap: null;
3
+ ScrollTrigger: null;
4
+ SplitText: null;
5
+ }>;
6
+ export declare const useGlobalContext: () => {
7
+ gsap: null;
8
+ ScrollTrigger: null;
9
+ SplitText: null;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},C=(e,t,o,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of s(t))!a.call(e,l)&&l!==o&&r(e,l,{get:()=>t[l],enumerable:!(x=p(t,l))||x.enumerable});return e};var g=e=>C(r({},"__esModule",{value:!0}),e);var b={};c(b,{GlobalContext:()=>u,useGlobalContext:()=>i});module.exports=g(b);var n=require("react");const u=(0,n.createContext)({gsap:null,ScrollTrigger:null,SplitText:null}),i=()=>(0,n.useContext)(u);
2
+ //# sourceMappingURL=GloablContext.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/helpers/GloablContext.ts"],
4
+ "sourcesContent": ["import { createContext, useContext } from 'react'\n\nexport const GlobalContext = createContext({\n gsap: null,\n ScrollTrigger: null,\n SplitText: null,\n})\n\nexport const useGlobalContext = () => {\n return useContext(GlobalContext)\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,qBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA0C,iBAEnC,MAAMH,KAAgB,iBAAc,CACzC,KAAM,KACN,cAAe,KACf,UAAW,IACb,CAAC,EAEYC,EAAmB,OACvB,cAAWD,CAAa",
6
+ "names": ["GloablContext_exports", "__export", "GlobalContext", "useGlobalContext", "__toCommonJS", "import_react"]
7
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export type ReactRef<T> = React.RefCallback<T> | React.MutableRefObject<T>;
3
+ export declare function assignRef<T = any>(ref: ReactRef<T> | null | undefined, value: T): void;
4
+ export declare function useMergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
File without changes
@@ -0,0 +1,16 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import React from 'react';
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Omit<import("../biz-components/Shelf/types.js").ShelfProps, keyof import("../shared/Styles.js").StylesProps> & Partial<import("../shared/Styles.js").StylesProps> & {
6
+ className?: string;
7
+ data?: Record<string, any>;
8
+ } & React.RefAttributes<any>>;
9
+ parameters: {
10
+ layout: string;
11
+ };
12
+ tags: string[];
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ export declare const Default: Story;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var s in t)r(e,s,{get:t[s],enumerable:!0})},l=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!u.call(e,o)&&o!==s&&r(e,o,{get:()=>t[o],enumerable:!(a=p(t,o))||a.enumerable});return e};var c=e=>l(r({},"__esModule",{value:!0}),e);var S={};f(S,{Default:()=>d,default:()=>n});module.exports=c(S);var i=require("../biz-components/index.js"),b=require("react");const y={title:"Biz-Components/Shelf",component:i.Shelf,parameters:{layout:"centered"},tags:["autodocs"]};var n=y;const d={args:{id:"shelf",title:"this is title",subtitle:"this is subtitle",products:[{sku:"sku1",name:"product 1"},{sku:"sku2",name:"product 2"}]}};
2
+ //# sourceMappingURL=shelf.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/stories/shelf.stories.tsx"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\n\nimport { Shelf } from '../biz-components/index.js'\nimport React from 'react'\n\nconst meta = {\n title: 'Biz-Components/Shelf',\n component: Shelf,\n parameters: {\n layout: 'centered',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Shelf>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n id: 'shelf',\n title: 'this is title',\n subtitle: 'this is subtitle',\n products: [\n {\n sku: 'sku1',\n name: 'product 1',\n },\n {\n sku: 'sku2',\n name: 'product 2',\n },\n ],\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAEA,IAAAK,EAAsB,sCACtBC,EAAkB,iBAElB,MAAMC,EAAO,CACX,MAAO,uBACP,UAAW,QACX,WAAY,CACV,OAAQ,UACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOJ,EAAQI,EAIR,MAAML,EAAiB,CAC5B,KAAM,CACJ,GAAI,QACJ,MAAO,gBACP,SAAU,mBACV,SAAU,CACR,CACE,IAAK,OACL,KAAM,WACR,EACA,CACE,IAAK,OACL,KAAM,WACR,CACF,CACF,CACF",
6
+ "names": ["shelf_stories_exports", "__export", "Default", "shelf_stories_default", "__toCommonJS", "import_biz_components", "import_react", "meta"]
7
+ }